nnews-react 0.0.10 → 0.1.2
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 +90 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14700 -15083
- package/dist/index.js.map +1 -1
- package/dist/style.css +4 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,118 +1,126 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime"),ae=require("react"),Pu=require("react-dom");function Du(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 _e=Du(ae);var Ie=(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))(Ie||{});function Bu({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:a,showActions:o=!1,emptyMessage:l="No articles found"}){return t?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?j.jsx("div",{className:"rounded-md bg-red-50 p-4",children:j.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:l})}):j.jsxs("div",{className:"space-y-4",children:[e.items.map(s=>j.jsx("div",{className:"rounded-lg border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow",children:j.jsxs("div",{className:"flex items-start justify-between",children:[j.jsxs("div",{className:"flex-1",children:[j.jsx("h3",{className:`text-xl font-semibold text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(s),children:s.title}),j.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[s.dateAt&&j.jsxs("span",{className:"flex items-center gap-1",children:[j.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.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(s.dateAt).toLocaleDateString()]}),s.category&&j.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:s.category.title}),j.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${s.status===Ie.Published?"bg-green-100 text-green-800":s.status===Ie.Draft?"bg-gray-100 text-gray-800":s.status===Ie.Review?"bg-yellow-100 text-yellow-800":s.status===Ie.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Ie[s.status]})]}),s.tags&&s.tags.length>0&&j.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:s.tags.map(c=>j.jsxs("span",{className:"rounded-md bg-gray-100 px-2 py-1 text-xs text-gray-700",children:["#",c.title]},c.tagId))}),s.roles&&s.roles.length>0&&j.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:s.roles.map(c=>j.jsx("span",{className:"rounded-md bg-purple-100 px-2 py-1 text-xs text-purple-700",children:c.name},c.slug))})]}),o&&(i||a)&&j.jsxs("div",{className:"ml-4 flex gap-2",children:[i&&j.jsx("button",{onClick:()=>i(s),className:"rounded p-2 text-blue-600 hover:bg-blue-50",title:"Edit",children:j.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.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"})})}),a&&j.jsx("button",{onClick:()=>a(s),className:"rounded p-2 text-red-600 hover:bg-red-50",title:"Delete",children:j.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})},s.articleId)),e.totalPages>1&&j.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 pt-4",children:j.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function Fu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ju=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uu=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zu={};function eo(e,t){return(zu.jsx?Uu:ju).test(e)}const qu=/[ \t\n\f\r]/g;function $u(e){return typeof e=="object"?e.type==="text"?to(e.value):!1:to(e)}function to(e){return e.replace(qu,"")===""}class dn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}dn.prototype.normal={};dn.prototype.property={};dn.prototype.space=void 0;function yl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new dn(n,r,t)}function Yr(e){return e.toLowerCase()}class qe{constructor(t,n){this.attribute=n,this.property=t}}qe.prototype.attribute="";qe.prototype.booleanish=!1;qe.prototype.boolean=!1;qe.prototype.commaOrSpaceSeparated=!1;qe.prototype.commaSeparated=!1;qe.prototype.defined=!1;qe.prototype.mustUseProperty=!1;qe.prototype.number=!1;qe.prototype.overloadedBoolean=!1;qe.prototype.property="";qe.prototype.spaceSeparated=!1;qe.prototype.space=void 0;let Hu=0;const ve=xt(),Re=xt(),Zr=xt(),re=xt(),Ne=xt(),It=xt(),He=xt();function xt(){return 2**++Hu}const Xr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:Re,commaOrSpaceSeparated:He,commaSeparated:It,number:re,overloadedBoolean:Zr,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),xr=Object.keys(Xr);class _i extends qe{constructor(t,n,r,i){let a=-1;if(super(t,n),no(this,"space",i),typeof r=="number")for(;++a<xr.length;){const o=xr[a];no(this,xr[a],(r&Xr[o])===Xr[o])}}}_i.prototype.defined=!0;function no(e,t,n){n&&(e[t]=n)}function Bt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new _i(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yr(r)]=r,n[Yr(a.attribute)]=r}return new dn(t,n,e.space)}const bl=Bt({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:Ne,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:re,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:Ne,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Re,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function vl(e,t){return t in e?e[t]:t}function _l(e,t){return vl(e,t.toLowerCase())}const Gu=Bt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:It,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:Ne,autoFocus:ve,autoPlay:ve,blocking:Ne,capture:null,charSet:null,checked:ve,cite:null,className:Ne,cols:re,colSpan:null,content:null,contentEditable:Re,controls:ve,controlsList:Ne,coords:re|It,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:Zr,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Ne,height:re,hidden:Zr,high:re,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:ve,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,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:ve,optimum:re,pattern:null,ping:Ne,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:Ne,required:ve,reversed:ve,rows:re,rowSpan:re,sandbox:Ne,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Re,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:_l}),Ku=Bt({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:He,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:Ne,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:It,g2:It,glyphName:It,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:He,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,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:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:He,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:He,rev:He,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:He,requiredFeatures:He,requiredFonts:He,requiredFormats:He,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:He,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:He,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:He,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vl}),El=Bt({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()}}),xl=Bt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_l}),wl=Bt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Wu={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"},Vu=/[A-Z]/g,ro=/-[a-z]/g,Yu=/^data[-\w.:]+$/i;function Zu(e,t){const n=Yr(t);let r=t,i=qe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Yu.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ro,Qu);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ro.test(a)){let o=a.replace(Vu,Xu);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=_i}return new i(r,t)}function Xu(e){return"-"+e.toLowerCase()}function Qu(e){return e.charAt(1).toUpperCase()}const Ju=yl([bl,Gu,El,xl,wl],"html"),Ei=yl([bl,Ku,El,xl,wl],"svg");function ef(e){return e.join(" ").trim()}var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xi={},io=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tf=/\n/g,nf=/^\s*/,rf=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,of=/^:\s*/,af=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,lf=/^[;\s]*/,sf=/^\s+|\s+$/g,cf=`
|
|
2
|
-
`,oo="/",ao="*",mt="",uf="comment",ff="declaration";function df(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(g){var p=g.match(tf);p&&(n+=p.length);var y=g.lastIndexOf(cf);r=~y?g.length-y:r+g.length}function a(){var g={line:n,column:r};return function(p){return p.position=new o(g),c(),p}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(g){var p=new Error(t.source+":"+n+":"+r+": "+g);if(p.reason=g,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function s(g){var p=g.exec(e);if(p){var y=p[0];return i(y),e=e.slice(y.length),p}}function c(){s(nf)}function d(g){var p;for(g=g||[];p=u();)p!==!1&&g.push(p);return g}function u(){var g=a();if(!(oo!=e.charAt(0)||ao!=e.charAt(1))){for(var p=2;mt!=e.charAt(p)&&(ao!=e.charAt(p)||oo!=e.charAt(p+1));)++p;if(p+=2,mt===e.charAt(p-1))return l("End of comment missing");var y=e.slice(2,p-2);return r+=2,i(y),e=e.slice(p),r+=2,g({type:uf,comment:y})}}function h(){var g=a(),p=s(rf);if(p){if(u(),!s(of))return l("property missing ':'");var y=s(af),m=g({type:ff,property:lo(p[0].replace(io,mt)),value:y?lo(y[0].replace(io,mt)):mt});return s(lf),m}}function f(){var g=[];d(g);for(var p;p=h();)p!==!1&&(g.push(p),d(g));return g}return c(),f()}function lo(e){return e?e.replace(sf,mt):mt}var hf=df,pf=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xi,"__esModule",{value:!0});xi.default=mf;const gf=pf(hf);function mf(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,gf.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;i?t(o,l,a):l&&(n=n||{},n[o]=l)}),n}var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.camelCase=void 0;var yf=/^--[a-zA-Z0-9_-]+$/,bf=/-([a-z])/g,vf=/^[^-]+$/,_f=/^-(webkit|moz|ms|o|khtml)-/,Ef=/^-(ms)-/,xf=function(e){return!e||vf.test(e)||yf.test(e)},wf=function(e,t){return t.toUpperCase()},so=function(e,t){return"".concat(t,"-")},kf=function(e,t){return t===void 0&&(t={}),xf(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ef,so):e=e.replace(_f,so),e.replace(bf,wf))};Zn.camelCase=kf;var Sf=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Af=Sf(xi),Nf=Zn;function Qr(e,t){var n={};return!e||typeof e!="string"||(0,Af.default)(e,function(r,i){r&&i&&(n[(0,Nf.camelCase)(r,t)]=i)}),n}Qr.default=Qr;var Of=Qr;const Tf=Yn(Of),kl=Sl("end"),wi=Sl("start");function Sl(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 Cf(e){const t=wi(e),n=kl(e);if(t&&n)return{start:t,end:n}}function on(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?co(e.position):"start"in e||"end"in e?co(e):"line"in e||"column"in e?Jr(e):""}function Jr(e){return uo(e&&e.line)+":"+uo(e&&e.column)}function co(e){return Jr(e&&e.start)+"-"+Jr(e&&e.end)}function uo(e){return e&&typeof e=="number"?e:1}class De extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?a.ruleId=r:(a.source=r.slice(0,s),a.ruleId=r.slice(s+1))}if(!a.place&&a.ancestors&&a.ancestors){const s=a.ancestors[a.ancestors.length-1];s&&(a.place=s.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=on(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}De.prototype.file="";De.prototype.name="";De.prototype.reason="";De.prototype.message="";De.prototype.stack="";De.prototype.column=void 0;De.prototype.line=void 0;De.prototype.ancestors=void 0;De.prototype.cause=void 0;De.prototype.fatal=void 0;De.prototype.place=void 0;De.prototype.ruleId=void 0;De.prototype.source=void 0;const ki={}.hasOwnProperty,Rf=new Map,If=/[A-Z]/g,Lf=new Set(["table","tbody","thead","tfoot","tr"]),Mf=new Set(["td","th"]),Al="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pf(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=$f(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=qf(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"?Ei:Ju,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nl(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nl(e,t,n){if(t.type==="element")return Df(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Bf(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jf(e,t,n);if(t.type==="mdxjsEsm")return Ff(e,t);if(t.type==="root")return Uf(e,t,n);if(t.type==="text")return zf(e,t)}function Df(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ei,e.schema=i),e.ancestors.push(t);const a=Tl(e,t.tagName,!1),o=Hf(e,t);let l=Ai(e,t);return Lf.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!$u(s):!0})),Ol(e,o,a,t),Si(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Bf(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)}sn(e,t.position)}function Ff(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sn(e,t.position)}function jf(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ei,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Tl(e,t.name,!0),o=Gf(e,t),l=Ai(e,t);return Ol(e,o,a,t),Si(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Uf(e,t,n){const r={};return Si(r,Ai(e,t)),e.create(t,e.Fragment,r,n)}function zf(e,t){return t.value}function Ol(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Si(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qf(e,t,n){return r;function r(i,a,o,l){const c=Array.isArray(o.children)?n:t;return l?c(a,o,l):c(a,o)}}function $f(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),s=wi(r);return t(i,a,o,l,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Hf(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ki.call(t.properties,i)){const a=Kf(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Mf.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Gf(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else sn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else sn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ai(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Rf;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const s=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(s){const c=i.get(s)||0;o=s+"-"+c,i.set(s,c+1)}}const l=Nl(e,a,o);l!==void 0&&n.push(l)}return n}function Kf(e,t,n){const r=Zu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Fu(n):ef(n)),r.property==="style"){let i=typeof n=="object"?n:Wf(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Vf(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Wu[r.property]||r.property:r.attribute,n]}}function Wf(e,t){try{return Tf(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new De("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=Al+"#cannot-parse-style-attribute",i}}function Tl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=eo(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=eo(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ki.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);sn(e)}function sn(e,t){const n=new De("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=Al+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Vf(e){const t={};let n;for(n in e)ki.call(e,n)&&(t[Yf(n)]=e[n]);return t}function Yf(e){let t=e.replace(If,Zf);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Zf(e){return"-"+e.toLowerCase()}const wr={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"]},Xf={};function Qf(e,t){const n=Xf,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cl(e,r,i)}function Cl(e,t,n){if(Jf(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 fo(e.children,t,n)}return Array.isArray(e)?fo(e,t,n):""}function fo(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Cl(e[i],t,n);return r.join("")}function Jf(e){return!!(e&&typeof e=="object")}const ho=document.createElement("i");function Ni(e){const t="&"+e+";";ho.innerHTML=t;const n=ho.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ge(e,t,n,r){const i=e.length;let a=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);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Ke(e,t){return e.length>0?(Ge(e,e.length,0,t),e):t}const po={}.hasOwnProperty;function Rl(e){const t={};let n=-1;for(;++n<e.length;)ed(t,e[n]);return t}function ed(e,t){let n;for(n in t){const i=(po.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){po.call(i,o)||(i[o]=[]);const l=a[o];td(i[o],Array.isArray(l)?l:l?[l]:[])}}}function td(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ge(e,0,0,r)}function Il(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 Ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fe=ht(/[A-Za-z]/),Pe=ht(/[\dA-Za-z]/),nd=ht(/[#-'*+\--9=?A-Z^-~]/);function Dn(e){return e!==null&&(e<32||e===127)}const ei=ht(/\d/),rd=ht(/[\dA-Fa-f]/),id=ht(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function Ee(e){return e===-2||e===-1||e===32}const Xn=ht(new RegExp("\\p{P}|\\p{S}","u")),_t=ht(/\s/);function ht(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ft(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Pe(e.charCodeAt(n+1))&&Pe(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);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 a=0;return o;function o(s){return Ee(s)?(e.enter(n),l(s)):t(s)}function l(s){return Ee(s)&&a++<i?(e.consume(s),l):(e.exit(n),t(s))}}const od={tokenize:ad};function ad(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return se(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const ld={tokenize:sd},go={tokenize:cd};function sd(e){const t=this,n=[];let r=0,i,a,o;return l;function l(_){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,s,c)(_)}return c(_)}function s(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const v=t.events.length;let E=v,k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){k=t.events[E][1].end;break}m(r);let O=v;for(;O<t.events.length;)t.events[O][1].end={...k},O++;return Ge(t.events,E+1,0,t.events.slice(v)),t.events.length=O,c(_)}return l(_)}function c(_){if(r===n.length){if(!i)return h(_);if(i.currentConstruct&&i.currentConstruct.concrete)return g(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(go,d,u)(_)}function d(_){return i&&b(),m(r),h(_)}function u(_){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(_)}function h(_){return t.containerState={},e.attempt(go,f,g)(_)}function f(_){return r++,n.push([t.currentConstruct,t.containerState]),h(_)}function g(_){if(_===null){i&&b(),m(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),p(_)}function p(_){if(_===null){y(e.exit("chunkFlow"),!0),m(0),e.consume(_);return}return se(_)?(e.consume(_),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(_),p)}function y(_,v){const E=t.sliceStream(_);if(v&&E.push(null),_.previous=a,a&&(a.next=_),a=_,i.defineSkip(_.start),i.write(E),t.parser.lazy[_.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;const O=t.events.length;let T=O,R,x;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(R){x=t.events[T][1].end;break}R=!0}for(m(r),k=O;k<t.events.length;)t.events[k][1].end={...x},k++;Ge(t.events,T+1,0,t.events.slice(O)),t.events.length=k}}function m(_){let v=n.length;for(;v-- >_;){const E=n[v];t.containerState=E[1],E[0].exit.call(t,e)}n.length=_}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cd(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 Mt(e){if(e===null||Ae(e)||_t(e))return 1;if(Xn(e))return 2}function Qn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ti={name:"attention",resolveAll:ud,tokenize:fd};function ud(e,t){let n=-1,r,i,a,o,l,s,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const u={...e[r][1].end},h={...e[n][1].start};mo(u,-s),mo(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},l={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},a={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ke(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ke(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Ke(c,Qn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ke(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=Ke(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ge(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function fd(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Mt(r);let a;return o;function o(s){return a=s,e.enter("attentionSequence"),l(s)}function l(s){if(s===a)return e.consume(s),l;const c=e.exit("attentionSequence"),d=Mt(s),u=!d||d===2&&i||n.includes(s),h=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?u:u&&(i||!h)),c._close=!!(a===42?h:h&&(d||!u)),t(s)}}function mo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dd={name:"autolink",tokenize:hd};function hd(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"),a}function a(f){return Fe(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Pe(f)?(r=1,l(f)):c(f)}function l(f){return f===58?(e.consume(f),r=0,s):(f===43||f===45||f===46||Pe(f))&&r++<32?(e.consume(f),l):(r=0,c(f))}function s(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||Dn(f)?n(f):(e.consume(f),s)}function c(f){return f===64?(e.consume(f),d):nd(f)?(e.consume(f),c):n(f)}function d(f){return Pe(f)?u(f):n(f)}function u(f){return f===46?(e.consume(f),r=0,d):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||Pe(f))&&r++<63){const g=f===45?h:u;return e.consume(f),g}return n(f)}}const hn={partial:!0,tokenize:pd};function pd(e,t,n){return r;function r(a){return Ee(a)?xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||se(a)?t(a):n(a)}}const Ll={continuation:{tokenize:md},exit:yd,name:"blockQuote",tokenize:gd};function gd(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ee(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function md(e,t,n){const r=this;return i;function i(o){return Ee(o)?xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Ll,t,n)(o)}}function yd(e){e.exit("blockQuote")}const Ml={name:"characterEscape",tokenize:bd};function bd(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return id(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Pl={name:"characterReference",tokenize:vd};function vd(e,t,n){const r=this;let i=0,a,o;return l;function l(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),s}function s(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=Pe,d(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=rd,d):(e.enter("characterReferenceValue"),a=7,o=ei,d(u))}function d(u){if(u===59&&i){const h=e.exit("characterReferenceValue");return o===Pe&&!Ni(r.sliceSerialize(h))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(u)&&i++<a?(e.consume(u),d):n(u)}}const yo={partial:!0,tokenize:Ed},bo={concrete:!0,name:"codeFenced",tokenize:_d};function _d(e,t,n){const r=this,i={partial:!0,tokenize:E};let a=0,o=0,l;return s;function s(k){return c(k)}function c(k){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===l?(o++,e.consume(k),d):o<3?n(k):(e.exit("codeFencedFenceSequence"),Ee(k)?xe(e,u,"whitespace")(k):u(k))}function u(k){return k===null||se(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(yo,p,v)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||se(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(k)):Ee(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,f,"whitespace")(k)):k===96&&k===l?n(k):(e.consume(k),h)}function f(k){return k===null||se(k)?u(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||se(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(k)):k===96&&k===l?n(k):(e.consume(k),g)}function p(k){return e.attempt(i,v,y)(k)}function y(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return a>0&&Ee(k)?xe(e,b,"linePrefix",a+1)(k):b(k)}function b(k){return k===null||se(k)?e.check(yo,p,v)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||se(k)?(e.exit("codeFlowValue"),b(k)):(e.consume(k),_)}function v(k){return e.exit("codeFenced"),t(k)}function E(k,O,T){let R=0;return x;function x(B){return k.enter("lineEnding"),k.consume(B),k.exit("lineEnding"),w}function w(B){return k.enter("codeFencedFence"),Ee(B)?xe(k,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):S(B)}function S(B){return B===l?(k.enter("codeFencedFenceSequence"),I(B)):T(B)}function I(B){return B===l?(R++,k.consume(B),I):R>=o?(k.exit("codeFencedFenceSequence"),Ee(B)?xe(k,L,"whitespace")(B):L(B)):T(B)}function L(B){return B===null||se(B)?(k.exit("codeFencedFence"),O(B)):T(B)}}}function Ed(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"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const kr={name:"codeIndented",tokenize:wd},xd={partial:!0,tokenize:kd};function wd(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),xe(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?s(c):se(c)?e.attempt(xd,o,s)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||se(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function s(c){return e.exit("codeIndented"),t(c)}}function kd(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):xe(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):se(o)?i(o):n(o)}}const Sd={name:"codeText",previous:Nd,resolve:Ad,tokenize:Od};function Ad(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 Nd(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Od(e,t,n){let r=0,i,a;return o;function o(u){return e.enter("codeText"),e.enter("codeTextSequence"),l(u)}function l(u){return u===96?(e.consume(u),r++,l):(e.exit("codeTextSequence"),s(u))}function s(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),s):u===96?(a=e.enter("codeTextSequence"),i=0,d(u)):se(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||se(u)?(e.exit("codeTextData"),s(u)):(e.consume(u),c)}function d(u){return u===96?(e.consume(u),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(a.type="codeTextData",c(u))}}class Td{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Zt(this.left,r),a.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),Zt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zt(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);Zt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zt(this.left,n.reverse())}}}function Zt(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 Dl(e){const t={};let n=-1,r,i,a,o,l,s,c;const d=new Td(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,a=0,a<s.length&&s[a][1].type==="lineEndingBlank"&&(a+=2),a<s.length&&s[a][1].type==="content"))for(;++a<s.length&&s[a][1].type!=="content";)s[a][1].type==="chunkText"&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Cd(d,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=d.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},l=d.slice(i,n),l.unshift(r),d.splice(i,n-i+1,l))}}return Ge(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function Cd(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,s=[],c={};let d,u,h=-1,f=n,g=0,p=0;const y=[p];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),u&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(p=h+1,y.push(p),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),h=y.length;h--;){const m=l.slice(y[h],y[h+1]),b=a.pop();s.push([b,b+m.length-1]),e.splice(b,2,m)}for(s.reverse(),h=-1;++h<s.length;)c[g+s[h][0]]=g+s[h][1],g+=s[h][1]-s[h][0]-1;return c}const Rd={resolve:Ld,tokenize:Md},Id={partial:!0,tokenize:Pd};function Ld(e){return Dl(e),e}function Md(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):se(l)?e.check(Id,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pd(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,a,"linePrefix")}function a(o){if(o===null||se(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Bl(e,t,n,r,i,a,o,l,s){const c=s||Number.POSITIVE_INFINITY;let d=0;return u;function u(m){return m===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(m),e.exit(a),h):m===null||m===32||m===41||Dn(m)?n(m):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(m))}function h(m){return m===62?(e.enter(a),e.consume(m),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===62?(e.exit("chunkString"),e.exit(l),h(m)):m===null||m===60||se(m)?n(m):(e.consume(m),m===92?g:f)}function g(m){return m===60||m===62||m===92?(e.consume(m),f):f(m)}function p(m){return!d&&(m===null||m===41||Ae(m))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(m)):d<c&&m===40?(e.consume(m),d++,p):m===41?(e.consume(m),d--,p):m===null||m===32||m===40||Dn(m)?n(m):(e.consume(m),m===92?y:p)}function y(m){return m===40||m===41||m===92?(e.consume(m),p):p(m)}}function Fl(e,t,n,r,i,a){const o=this;let l=0,s;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),d}function d(f){return l>999||f===null||f===91||f===93&&!s||f===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):se(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===null||f===91||f===93||se(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),s||(s=!Ee(f)),f===92?h:u)}function h(f){return f===91||f===92||f===93?(e.consume(f),l++,u):u(f)}}function jl(e,t,n,r,i,a){let o;return l;function l(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,s):n(h)}function s(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(a),c(h))}function c(h){return h===o?(e.exit(a),s(o)):h===null?n(h):se(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===o||h===null||se(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?u:d)}function u(h){return h===o||h===92?(e.consume(h),d):d(h)}}function an(e,t){let n;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ee(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Dd={name:"definition",tokenize:Fd},Bd={partial:!0,tokenize:jd};function Fd(e,t,n){const r=this;let i;return a;function a(f){return e.enter("definition"),o(f)}function o(f){return Fl.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):n(f)}function s(f){return Ae(f)?an(e,c)(f):c(f)}function c(f){return Bl(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(Bd,u,u)(f)}function u(f){return Ee(f)?xe(e,h,"whitespace")(f):h(f)}function h(f){return f===null||se(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function jd(e,t,n){return r;function r(l){return Ae(l)?an(e,i)(l):n(l)}function i(l){return jl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ee(l)?xe(e,o,"whitespace")(l):o(l)}function o(l){return l===null||se(l)?t(l):n(l)}}const Ud={name:"hardBreakEscape",tokenize:zd};function zd(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return se(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const qd={name:"headingAtx",resolve:$d,tokenize:Hd};function $d(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ge(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Hd(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Ae(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),s(d)):d===null||se(d)?(e.exit("atxHeading"),t(d)):Ee(d)?xe(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function s(d){return d===35?(e.consume(d),s):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||Ae(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const Gd=["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"],vo=["pre","script","style","textarea"],Kd={concrete:!0,name:"htmlFlow",resolveTo:Yd,tokenize:Zd},Wd={partial:!0,tokenize:Qd},Vd={partial:!0,tokenize:Xd};function Yd(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 Zd(e,t,n){const r=this;let i,a,o,l,s;return c;function c(N){return d(N)}function d(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),a=!0,p):N===63?(e.consume(N),i=3,r.interrupt?t:A):Fe(N)?(e.consume(N),o=String.fromCharCode(N),y):n(N)}function h(N){return N===45?(e.consume(N),i=2,f):N===91?(e.consume(N),i=5,l=0,g):Fe(N)?(e.consume(N),i=4,r.interrupt?t:A):n(N)}function f(N){return N===45?(e.consume(N),r.interrupt?t:A):n(N)}function g(N){const H="CDATA[";return N===H.charCodeAt(l++)?(e.consume(N),l===H.length?r.interrupt?t:S:g):n(N)}function p(N){return Fe(N)?(e.consume(N),o=String.fromCharCode(N),y):n(N)}function y(N){if(N===null||N===47||N===62||Ae(N)){const H=N===47,$=o.toLowerCase();return!H&&!a&&vo.includes($)?(i=1,r.interrupt?t(N):S(N)):Gd.includes(o.toLowerCase())?(i=6,H?(e.consume(N),m):r.interrupt?t(N):S(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?b(N):_(N))}return N===45||Pe(N)?(e.consume(N),o+=String.fromCharCode(N),y):n(N)}function m(N){return N===62?(e.consume(N),r.interrupt?t:S):n(N)}function b(N){return Ee(N)?(e.consume(N),b):x(N)}function _(N){return N===47?(e.consume(N),x):N===58||N===95||Fe(N)?(e.consume(N),v):Ee(N)?(e.consume(N),_):x(N)}function v(N){return N===45||N===46||N===58||N===95||Pe(N)?(e.consume(N),v):E(N)}function E(N){return N===61?(e.consume(N),k):Ee(N)?(e.consume(N),E):_(N)}function k(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,O):Ee(N)?(e.consume(N),k):T(N)}function O(N){return N===s?(e.consume(N),s=null,R):N===null||se(N)?n(N):(e.consume(N),O)}function T(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ae(N)?E(N):(e.consume(N),T)}function R(N){return N===47||N===62||Ee(N)?_(N):n(N)}function x(N){return N===62?(e.consume(N),w):n(N)}function w(N){return N===null||se(N)?S(N):Ee(N)?(e.consume(N),w):n(N)}function S(N){return N===45&&i===2?(e.consume(N),M):N===60&&i===1?(e.consume(N),F):N===62&&i===4?(e.consume(N),C):N===63&&i===3?(e.consume(N),A):N===93&&i===5?(e.consume(N),U):se(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wd,P,I)(N)):N===null||se(N)?(e.exit("htmlFlowData"),I(N)):(e.consume(N),S)}function I(N){return e.check(Vd,L,P)(N)}function L(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),B}function B(N){return N===null||se(N)?I(N):(e.enter("htmlFlowData"),S(N))}function M(N){return N===45?(e.consume(N),A):S(N)}function F(N){return N===47?(e.consume(N),o="",G):S(N)}function G(N){if(N===62){const H=o.toLowerCase();return vo.includes(H)?(e.consume(N),C):S(N)}return Fe(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),G):S(N)}function U(N){return N===93?(e.consume(N),A):S(N)}function A(N){return N===62?(e.consume(N),C):N===45&&i===2?(e.consume(N),A):S(N)}function C(N){return N===null||se(N)?(e.exit("htmlFlowData"),P(N)):(e.consume(N),C)}function P(N){return e.exit("htmlFlow"),t(N)}}function Xd(e,t,n){const r=this;return i;function i(o){return se(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Qd(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(hn,t,n)}}const Jd={name:"htmlText",tokenize:eh};function eh(e,t,n){const r=this;let i,a,o;return l;function l(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),s}function s(A){return A===33?(e.consume(A),c):A===47?(e.consume(A),E):A===63?(e.consume(A),_):Fe(A)?(e.consume(A),T):n(A)}function c(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),a=0,g):Fe(A)?(e.consume(A),b):n(A)}function d(A){return A===45?(e.consume(A),f):n(A)}function u(A){return A===null?n(A):A===45?(e.consume(A),h):se(A)?(o=u,F(A)):(e.consume(A),u)}function h(A){return A===45?(e.consume(A),f):u(A)}function f(A){return A===62?M(A):A===45?h(A):u(A)}function g(A){const C="CDATA[";return A===C.charCodeAt(a++)?(e.consume(A),a===C.length?p:g):n(A)}function p(A){return A===null?n(A):A===93?(e.consume(A),y):se(A)?(o=p,F(A)):(e.consume(A),p)}function y(A){return A===93?(e.consume(A),m):p(A)}function m(A){return A===62?M(A):A===93?(e.consume(A),m):p(A)}function b(A){return A===null||A===62?M(A):se(A)?(o=b,F(A)):(e.consume(A),b)}function _(A){return A===null?n(A):A===63?(e.consume(A),v):se(A)?(o=_,F(A)):(e.consume(A),_)}function v(A){return A===62?M(A):_(A)}function E(A){return Fe(A)?(e.consume(A),k):n(A)}function k(A){return A===45||Pe(A)?(e.consume(A),k):O(A)}function O(A){return se(A)?(o=O,F(A)):Ee(A)?(e.consume(A),O):M(A)}function T(A){return A===45||Pe(A)?(e.consume(A),T):A===47||A===62||Ae(A)?R(A):n(A)}function R(A){return A===47?(e.consume(A),M):A===58||A===95||Fe(A)?(e.consume(A),x):se(A)?(o=R,F(A)):Ee(A)?(e.consume(A),R):M(A)}function x(A){return A===45||A===46||A===58||A===95||Pe(A)?(e.consume(A),x):w(A)}function w(A){return A===61?(e.consume(A),S):se(A)?(o=w,F(A)):Ee(A)?(e.consume(A),w):R(A)}function S(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,I):se(A)?(o=S,F(A)):Ee(A)?(e.consume(A),S):(e.consume(A),L)}function I(A){return A===i?(e.consume(A),i=void 0,B):A===null?n(A):se(A)?(o=I,F(A)):(e.consume(A),I)}function L(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Ae(A)?R(A):(e.consume(A),L)}function B(A){return A===47||A===62||Ae(A)?R(A):n(A)}function M(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function F(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),G}function G(A){return Ee(A)?xe(e,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):U(A)}function U(A){return e.enter("htmlTextData"),o(A)}}const Oi={name:"labelEnd",resolveAll:ih,resolveTo:oh,tokenize:ah},th={tokenize:lh},nh={tokenize:sh},rh={tokenize:ch};function ih(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&&Ge(e,0,e.length,n),e}function oh(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){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&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const s={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",s,t],["enter",c,t]],l=Ke(l,e.slice(a+1,a+r+3)),l=Ke(l,[["enter",d,t]]),l=Ke(l,Qn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=Ke(l,[["exit",d,t],e[o-2],e[o-1],["exit",c,t]]),l=Ke(l,e.slice(o+1)),l=Ke(l,[["exit",s,t]]),Ge(e,a,e.length,l),e}function ah(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(h){return a?a._inactive?u(h):(o=r.parser.defined.includes(Ye(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(th,d,o?d:u)(h):h===91?e.attempt(nh,d,o?c:u)(h):o?d(h):u(h)}function c(h){return e.attempt(rh,d,u)(h)}function d(h){return t(h)}function u(h){return a._balanced=!0,n(h)}}function lh(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return Ae(u)?an(e,a)(u):a(u)}function a(u){return u===41?d(u):Bl(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function o(u){return Ae(u)?an(e,s)(u):d(u)}function l(u){return n(u)}function s(u){return u===34||u===39||u===40?jl(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return Ae(u)?an(e,d)(u):d(u)}function d(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function sh(e,t,n){const r=this;return i;function i(l){return Fl.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function ch(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const uh={name:"labelStartImage",resolveAll:Oi.resolveAll,tokenize:fh};function fh(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const dh={name:"labelStartLink",resolveAll:Oi.resolveAll,tokenize:hh};function hh(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"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Sr={name:"lineEnding",tokenize:ph};function ph(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const Rn={name:"thematicBreak",tokenize:gh};function gh(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),s(c)):r>=3&&(c===null||se(c))?(e.exit("thematicBreak"),t(c)):n(c)}function s(c){return c===i?(e.consume(c),r++,s):(e.exit("thematicBreakSequence"),Ee(c)?xe(e,l,"whitespace")(c):l(c))}}const je={continuation:{tokenize:vh},exit:Eh,name:"list",tokenize:bh},mh={partial:!0,tokenize:xh},yh={partial:!0,tokenize:_h};function bh(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ei(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Rn,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return n(f)}function s(f){return ei(f)&&++o<10?(e.consume(f),s):(!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(hn,r.interrupt?n:d,e.attempt(mh,h,u))}function d(f){return r.containerState.initialBlankLine=!0,a++,h(f)}function u(f){return Ee(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function vh(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(hn,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ee(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yh,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function _h(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){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(a):n(a)}}function Eh(e){e.exit(this.containerState.type)}function xh(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ee(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const _o={name:"setextUnderline",resolveTo:wh,tokenize:kh};function wh(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function kh(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,u;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){u=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Ee(c)?xe(e,s,"lineSuffix")(c):s(c))}function s(c){return c===null||se(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Sh={tokenize:Ah};function Ah(e){const t=this,n=e.attempt(hn,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Rd,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Nh={resolveAll:zl()},Oh=Ul("string"),Th=Ul("text");function Ul(e){return{resolveAll:zl(e==="text"?Ch:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(d){return c(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),s}function s(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),s)}function c(d){if(d===null)return!0;const u=i[d];let h=-1;if(u)for(;++h<u.length;){const f=u[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function zl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Ch(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 a=i.length,o=-1,l=0,s;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(c===-2)s=!0,l++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||s||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},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 Rh={42:je,43:je,45:je,48:je,49:je,50:je,51:je,52:je,53:je,54:je,55:je,56:je,57:je,62:Ll},Ih={91:Dd},Lh={[-2]:kr,[-1]:kr,32:kr},Mh={35:qd,42:Rn,45:[_o,Rn],60:Kd,61:_o,95:Rn,96:bo,126:bo},Ph={38:Pl,92:Ml},Dh={[-5]:Sr,[-4]:Sr,[-3]:Sr,33:uh,38:Pl,42:ti,60:[dd,Jd],91:dh,92:[Ud,Ml],93:Oi,95:ti,96:Sd},Bh={null:[ti,Nh]},Fh={null:[42,95]},jh={null:[]},Uh=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fh,contentInitial:Ih,disable:jh,document:Rh,flow:Mh,flowInitial:Lh,insideSpan:Bh,string:Ph,text:Dh},Symbol.toStringTag,{value:"Module"}));function zh(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={},a=[];let o=[],l=[];const s={attempt:O(E),check:O(k),consume:b,enter:_,exit:v,interrupt:O(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:p,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:u};let d=t.tokenize.call(c,s);return t.resolveAll&&a.push(t),c;function u(w){return o=Ke(o,w),y(),o[o.length-1]!==null?[]:(T(t,0),c.events=Qn(a,c.events,c),c.events)}function h(w,S){return $h(f(w),S)}function f(w){return qh(o,w)}function g(){const{_bufferIndex:w,_index:S,line:I,column:L,offset:B}=r;return{_bufferIndex:w,_index:S,line:I,column:L,offset:B}}function p(w){i[w.line]=w.column,x()}function y(){let w;for(;r._index<o.length;){const S=o[r._index];if(typeof S=="string")for(w=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===w&&r._bufferIndex<S.length;)m(S.charCodeAt(r._bufferIndex));else m(S)}}function m(w){d=d(w)}function b(w){se(w)?(r.line++,r.column=1,r.offset+=w===-3?2:1,x()):w!==-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=w}function _(w,S){const I=S||{};return I.type=w,I.start=g(),c.events.push(["enter",I,c]),l.push(I),I}function v(w){const S=l.pop();return S.end=g(),c.events.push(["exit",S,c]),S}function E(w,S){T(w,S.from)}function k(w,S){S.restore()}function O(w,S){return I;function I(L,B,M){let F,G,U,A;return Array.isArray(L)?P(L):"tokenize"in L?P([L]):C(L);function C(D){return q;function q(W){const V=W!==null&&D[W],Q=W!==null&&D.null,ie=[...Array.isArray(V)?V:V?[V]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return P(ie)(W)}}function P(D){return F=D,G=0,D.length===0?M:N(D[G])}function N(D){return q;function q(W){return A=R(),U=D,D.partial||(c.currentConstruct=D),D.name&&c.parser.constructs.disable.null.includes(D.name)?$():D.tokenize.call(S?Object.assign(Object.create(c),S):c,s,H,$)(W)}}function H(D){return w(U,A),B}function $(D){return A.restore(),++G<F.length?N(F[G]):M}}}function T(w,S){w.resolveAll&&!a.includes(w)&&a.push(w),w.resolve&&Ge(c.events,S,c.events.length-S,w.resolve(c.events.slice(S),c)),w.resolveTo&&(c.events=w.resolveTo(c.events,c))}function R(){const w=g(),S=c.previous,I=c.currentConstruct,L=c.events.length,B=Array.from(l);return{from:L,restore:M};function M(){r=w,c.previous=S,c.currentConstruct=I,c.events.length=L,l=B,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qh(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function $h(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
1
|
+
"use strict";var Fm=Object.defineProperty;var $m=(e,t,n)=>t in e?Fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>$m(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),G=require("react");require("react-dom");function Um(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 fe=Um(G);var Fe=(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))(Fe||{});function qm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No articles found"}){return t?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?_.jsx("div",{className:"rounded-md bg-red-50 p-4",children:_.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:a})}):_.jsxs("div",{className:"space-y-4",children:[e.items.map(l=>_.jsx("div",{className:"rounded-lg border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow",children:_.jsxs("div",{className:"flex items-start justify-between",children:[_.jsxs("div",{className:"flex-1",children:[_.jsx("h3",{className:`text-xl font-semibold text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(l),children:l.title}),_.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[l.dateAt&&_.jsxs("span",{className:"flex items-center gap-1",children:[_.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.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&&_.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:l.category.title}),_.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${l.status===Fe.Published?"bg-green-100 text-green-800":l.status===Fe.Draft?"bg-gray-100 text-gray-800":l.status===Fe.Review?"bg-yellow-100 text-yellow-800":l.status===Fe.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Fe[l.status]})]}),l.tags&&l.tags.length>0&&_.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:l.tags.map(c=>_.jsxs("span",{className:"rounded-md bg-gray-100 px-2 py-1 text-xs text-gray-700",children:["#",c.title]},c.tagId))}),l.roles&&l.roles.length>0&&_.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:l.roles.map(c=>_.jsx("span",{className:"rounded-md bg-purple-100 px-2 py-1 text-xs text-purple-700",children:c.name},c.slug))})]}),o&&(i||s)&&_.jsxs("div",{className:"ml-4 flex gap-2",children:[i&&_.jsx("button",{onClick:()=>i(l),className:"rounded p-2 text-blue-600 hover:bg-blue-50",title:"Edit",children:_.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.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"})})}),s&&_.jsx("button",{onClick:()=>s(l),className:"rounded p-2 text-red-600 hover:bg-red-50",title:"Delete",children:_.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})},l.articleId)),e.totalPages>1&&_.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 pt-4",children:_.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function zm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const jm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm={};function Mc(e,t){return(Gm.jsx?Hm:jm).test(e)}const Km=/[ \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(Km,"")===""}class Ii{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ii.prototype.normal={};Ii.prototype.property={};Ii.prototype.space=void 0;function kf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ii(n,r,t)}function ja(e){return e.toLowerCase()}class gt{constructor(t,n){this.attribute=n,this.property=t}}gt.prototype.attribute="";gt.prototype.booleanish=!1;gt.prototype.boolean=!1;gt.prototype.commaOrSpaceSeparated=!1;gt.prototype.commaSeparated=!1;gt.prototype.defined=!1;gt.prototype.mustUseProperty=!1;gt.prototype.number=!1;gt.prototype.overloadedBoolean=!1;gt.prototype.property="";gt.prototype.spaceSeparated=!1;gt.prototype.space=void 0;let Wm=0;const de=er(),Me=er(),Ha=er(),z=er(),Te=er(),Sr=er(),yt=er();function er(){return 2**++Wm}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:yt,commaSeparated:Sr,number:z,overloadedBoolean:Ha,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends gt{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 Ii(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Te,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:z,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Te,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Me,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 Ym=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Te,autoFocus:de,autoPlay:de,blocking:Te,capture:null,charSet:null,checked:de,cite:null,className:Te,cols:z,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:Te,coords:z|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ha,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Te,height:z,hidden:Ha,high:z,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Te,itemRef:Te,itemScope:de,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:z,pattern:null,ping:Te,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Te,required:de,reversed:de,rows:z,rowSpan:z,sandbox:Te,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Me,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:de,useMap:null,value:Me,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,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:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Me,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:de,disableRemotePlayback:de,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:Tf}),Zm=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:yt,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:Te,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:de,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:yt,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:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yt,rev:yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yt,requiredFeatures:yt,requiredFonts:yt,requiredFormats:yt,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:yt,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:yt,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:yt,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}),Rf=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xm={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"},Qm=/[A-Z]/g,Bc=/-[a-z]/g,Jm=/^data[-\w.:]+$/i;function eb(e,t){const n=ja(t);let r=t,i=gt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Jm.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,nb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Qm,tb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function tb(e){return"-"+e.toLowerCase()}function nb(e){return e.charAt(1).toUpperCase()}const rb=kf([Af,Ym,Cf,Of,Rf],"html"),Dl=kf([Af,Zm,Cf,Of,Rf],"svg");function ib(e){return e.join(" ").trim()}var Ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Li(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,sb=/\n/g,ob=/^\s*/,ab=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lb=/^:\s*/,cb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ub=/^[;\s]*/,db=/^\s+|\s+$/g,fb=`
|
|
2
|
+
`,$c="/",Uc="*",Gn="",hb="comment",pb="declaration";function gb(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(sb);m&&(n+=m.length);var b=p.lastIndexOf(fb);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(ob)}function u(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!($c!=e.charAt(0)||Uc!=e.charAt(1))){for(var m=2;Gn!=e.charAt(m)&&(Uc!=e.charAt(m)||$c!=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:hb,comment:b})}}function h(){var p=s(),m=l(ab);if(m){if(d(),!l(lb))return a("property missing ':'");var b=l(cb),y=p({type:pb,property:qc(m[0].replace(Fc,Gn)),value:b?qc(b[0].replace(Fc,Gn)):Gn});return l(ub),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 qc(e){return e?e.replace(db,Gn):Gn}var mb=gb,bb=Ot&&Ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=Eb;const yb=bb(mb);function Eb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,yb.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 Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.camelCase=void 0;var xb=/^--[a-zA-Z0-9_-]+$/,wb=/-([a-z])/g,_b=/^[^-]+$/,vb=/^-(webkit|moz|ms|o|khtml)-/,Nb=/^-(ms)-/,kb=function(e){return!e||_b.test(e)||xb.test(e)},Ab=function(e,t){return t.toUpperCase()},zc=function(e,t){return"".concat(t,"-")},Sb=function(e,t){return t===void 0&&(t={}),kb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Nb,zc):e=e.replace(vb,zc),e.replace(wb,Ab))};Gs.camelCase=Sb;var Tb=Ot&&Ot.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cb=Tb(Pl),Ob=Gs;function Ka(e,t){var n={};return!e||typeof e!="string"||(0,Cb.default)(e,function(r,i){r&&i&&(n[(0,Ob.camelCase)(r,t)]=i)}),n}Ka.default=Ka;var Rb=Ka;const Ib=Li(Rb),If=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 Lb(e){const t=Bl(e),n=If(e);if(t&&n)return{start:t,end:n}}function hi(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?Va(e):""}function Va(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function jc(e){return Va(e&&e.start)+"-"+Va(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class Qe 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=hi(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}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const Fl={}.hasOwnProperty,Mb=new Map,Db=/[A-Z]/g,Pb=new Set(["table","tbody","thead","tfoot","tr"]),Bb=new Set(["td","th"]),Mf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fb(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=Kb(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=Gb(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:rb,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 $b(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ub(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zb(e,t,n);if(t.type==="mdxjsEsm")return qb(e,t);if(t.type==="root")return jb(e,t,n);if(t.type==="text")return Hb(e,t)}function $b(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 Pb.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Vm(l):!0})),Pf(e,o,s,t),$l(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Ub(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)}xi(e,t.position)}function qb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xi(e,t.position)}function zb(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=Wb(e,t),a=Ul(e,t);return Pf(e,o,s,t),$l(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function jb(e,t,n){const r={};return $l(r,Ul(e,t)),e.create(t,e.Fragment,r,n)}function Hb(e,t){return t.value}function Pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $l(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gb(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 Kb(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=Yb(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Bb.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 Wb(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 xi(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 xi(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:Mb;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 Yb(e,t,n){const r=eb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zm(n):ib(n)),r.property==="style"){let i=typeof n=="object"?n:Zb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Xb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Xm[r.property]||r.property:r.attribute,n]}}function Zb(e,t){try{return Ib(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Qe("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);xi(e)}function xi(e,t){const n=new Qe("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 Xb(e){const t={};let n;for(n in e)Fl.call(e,n)&&(t[Qb(n)]=e[n]);return t}function Qb(e){let t=e.replace(Db,Jb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jb(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"]},ey={};function ty(e,t){const n=ey,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(ny(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 ny(e){return!!(e&&typeof e=="object")}const Kc=document.createElement("i");function ql(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 xt(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 At(e,t){return e.length>0?(xt(e,e.length,0,t),e):t}const Vc={}.hasOwnProperty;function $f(e){const t={};let n=-1;for(;++n<e.length;)ry(t,e[n]);return t}function ry(e,t){let n;for(n in t){const i=(Vc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Vc.call(i,o)||(i[o]=[]);const a=s[o];iy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xt(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 jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const it=Pn(/[A-Za-z]/),Ze=Pn(/[\dA-Za-z]/),sy=Pn(/[#-'*+\--9=?A-Z^-~]/);function Os(e){return e!==null&&(e<32||e===127)}const Wa=Pn(/\d/),oy=Pn(/[\dA-Fa-f]/),ay=Pn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function Ne(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Ks=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 qr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Ze(e.charCodeAt(n+1))&&Ze(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 be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return ge(l)?(e.enter(n),a(l)):t(l)}function a(l){return ge(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const ly={tokenize:cy};function cy(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"),be(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 oe(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const uy={tokenize:dy},Wc={tokenize:fy};function dy(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&&w();const T=t.events.length;let O=T,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){A=t.events[O][1].end;break}y(r);let F=T;for(;F<t.events.length;)t.events[F][1].end={...A},F++;return xt(t.events,O+1,0,t.events.slice(T)),t.events.length=F,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(Wc,u,d)(v)}function u(v){return i&&w(),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(Wc,f,p)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&w(),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 oe(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function b(v,T){const O=t.sliceStream(v);if(T&&O.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(O),t.parser.lazy[v.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const F=t.events.length;let $=F,B,C;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){C=t.events[$][1].end;break}B=!0}for(y(r),A=F;A<t.events.length;)t.events[A][1].end={...C},A++;xt(t.events,$+1,0,t.events.slice(F)),t.events.length=A}}function y(v){let T=n.length;for(;T-- >v;){const O=n[T];t.containerState=O[1],O[0].exit.call(t,e)}n.length=v}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ir(e){if(e===null||Ne(e)||Yn(e))return 1;if(Ks(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:hy,tokenize:py};function hy(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=At(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=At(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=At(c,Vs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=At(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=At(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,xt(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 py(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ir(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=Ir(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 gy={name:"autolink",tokenize:my};function my(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 it(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Ze(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||Ze(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||Os(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):sy(f)?(e.consume(f),c):n(f)}function u(f){return Ze(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||Ze(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Mi={partial:!0,tokenize:by};function by(e,t,n){return r;function r(s){return ge(s)?be(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const qf={continuation:{tokenize:Ey},exit:xy,name:"blockQuote",tokenize:yy};function yy(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 ge(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 ge(o)?be(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(qf,t,n)(o)}}function xy(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:wy};function wy(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 ay(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jf={name:"characterReference",tokenize:_y};function _y(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=Ze,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=oy,u):(e.enter("characterReferenceValue"),s=7,o=Wa,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Ze&&!ql(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:vy};function vy(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,o=0,a;return l;function l(A){return c(A)}function c(A){const F=r.events[r.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,a=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(A)}function u(A){return A===a?(o++,e.consume(A),u):o<3?n(A):(e.exit("codeFencedFenceSequence"),ge(A)?be(e,d,"whitespace")(A):d(A))}function d(A){return A===null||oe(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Zc,m,T)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):ge(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,f,"whitespace")(A)):A===96&&A===a?n(A):(e.consume(A),h)}function f(A){return A===null||oe(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===a?n(A):(e.consume(A),p)}function m(A){return e.attempt(i,T,b)(A)}function b(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y}function y(A){return s>0&&ge(A)?be(e,w,"linePrefix",s+1)(A):w(A)}function w(A){return A===null||oe(A)?e.check(Zc,m,T)(A):(e.enter("codeFlowValue"),v(A))}function v(A){return A===null||oe(A)?(e.exit("codeFlowValue"),w(A)):(e.consume(A),v)}function T(A){return e.exit("codeFenced"),t(A)}function O(A,F,$){let B=0;return C;function C(Z){return A.enter("lineEnding"),A.consume(Z),A.exit("lineEnding"),U}function U(Z){return A.enter("codeFencedFence"),ge(Z)?be(A,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):P(Z)}function P(Z){return Z===a?(A.enter("codeFencedFenceSequence"),ie(Z)):$(Z)}function ie(Z){return Z===a?(B++,A.consume(Z),ie):B>=o?(A.exit("codeFencedFenceSequence"),ge(Z)?be(A,X,"whitespace")(Z):X(Z)):$(Z)}function X(Z){return Z===null||oe(Z)?(A.exit("codeFencedFence"),F(Z)):$(Z)}}}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:Ay},ky={partial:!0,tokenize:Sy};function Ay(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),be(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):oe(c)?e.attempt(ky,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||oe(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function Sy(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):be(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):oe(o)?i(o):n(o)}}const Ty={name:"codeText",previous:Oy,resolve:Cy,tokenize:Ry};function Cy(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 Oy(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)):oe(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||oe(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 Iy{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&&ii(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),ii(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ii(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);ii(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ii(this.left,n.reverse())}}}function ii(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 Iy(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,Ly(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 xt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Ly(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]),w=s.pop();l.push([w,w+y.length-1]),e.splice(w,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const My={resolve:Py,tokenize:By},Dy={partial:!0,tokenize:Fy};function Py(e){return Hf(e),e}function By(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):oe(a)?e.check(Dy,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 Fy(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),be(e,s,"linePrefix")}function s(o){if(o===null||oe(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||Os(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||oe(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||Ne(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||Os(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):oe(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||oe(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Vf(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):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||oe(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 pi(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $y={name:"definition",tokenize:qy},Uy={partial:!0,tokenize:zy};function qy(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=jt(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 Ne(f)?pi(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(Uy,d,d)(f)}function d(f){return ge(f)?be(e,h,"whitespace")(f):h(f)}function h(f){return f===null||oe(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function zy(e,t,n){return r;function r(a){return Ne(a)?pi(e,i)(a):n(a)}function i(a){return Vf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ge(a)?be(e,o,"whitespace")(a):o(a)}function o(a){return a===null||oe(a)?t(a):n(a)}}const jy={name:"hardBreakEscape",tokenize:Hy};function Hy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Gy={name:"headingAtx",resolve:Ky,tokenize:Vy};function Ky(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"},xt(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||Ne(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||oe(u)?(e.exit("atxHeading"),t(u)):ge(u)?be(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||Ne(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Wy=["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"],Yy={concrete:!0,name:"htmlFlow",resolveTo:Qy,tokenize:Jy},Zy={partial:!0,tokenize:t0},Xy={partial:!0,tokenize:e0};function Qy(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 Jy(e,t,n){const r=this;let i,s,o,a,l;return c;function c(N){return u(N)}function u(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),s=!0,m):N===63?(e.consume(N),i=3,r.interrupt?t:x):it(N)?(e.consume(N),o=String.fromCharCode(N),b):n(N)}function h(N){return N===45?(e.consume(N),i=2,f):N===91?(e.consume(N),i=5,a=0,p):it(N)?(e.consume(N),i=4,r.interrupt?t:x):n(N)}function f(N){return N===45?(e.consume(N),r.interrupt?t:x):n(N)}function p(N){const he="CDATA[";return N===he.charCodeAt(a++)?(e.consume(N),a===he.length?r.interrupt?t:P:p):n(N)}function m(N){return it(N)?(e.consume(N),o=String.fromCharCode(N),b):n(N)}function b(N){if(N===null||N===47||N===62||Ne(N)){const he=N===47,se=o.toLowerCase();return!he&&!s&&Qc.includes(se)?(i=1,r.interrupt?t(N):P(N)):Wy.includes(o.toLowerCase())?(i=6,he?(e.consume(N),y):r.interrupt?t(N):P(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):s?w(N):v(N))}return N===45||Ze(N)?(e.consume(N),o+=String.fromCharCode(N),b):n(N)}function y(N){return N===62?(e.consume(N),r.interrupt?t:P):n(N)}function w(N){return ge(N)?(e.consume(N),w):C(N)}function v(N){return N===47?(e.consume(N),C):N===58||N===95||it(N)?(e.consume(N),T):ge(N)?(e.consume(N),v):C(N)}function T(N){return N===45||N===46||N===58||N===95||Ze(N)?(e.consume(N),T):O(N)}function O(N){return N===61?(e.consume(N),A):ge(N)?(e.consume(N),O):v(N)}function A(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,F):ge(N)?(e.consume(N),A):$(N)}function F(N){return N===l?(e.consume(N),l=null,B):N===null||oe(N)?n(N):(e.consume(N),F)}function $(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ne(N)?O(N):(e.consume(N),$)}function B(N){return N===47||N===62||ge(N)?v(N):n(N)}function C(N){return N===62?(e.consume(N),U):n(N)}function U(N){return N===null||oe(N)?P(N):ge(N)?(e.consume(N),U):n(N)}function P(N){return N===45&&i===2?(e.consume(N),L):N===60&&i===1?(e.consume(N),j):N===62&&i===4?(e.consume(N),Q):N===63&&i===3?(e.consume(N),x):N===93&&i===5?(e.consume(N),W):oe(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Zy,ae,ie)(N)):N===null||oe(N)?(e.exit("htmlFlowData"),ie(N)):(e.consume(N),P)}function ie(N){return e.check(Xy,X,ae)(N)}function X(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Z}function Z(N){return N===null||oe(N)?ie(N):(e.enter("htmlFlowData"),P(N))}function L(N){return N===45?(e.consume(N),x):P(N)}function j(N){return N===47?(e.consume(N),o="",q):P(N)}function q(N){if(N===62){const he=o.toLowerCase();return Qc.includes(he)?(e.consume(N),Q):P(N)}return it(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),q):P(N)}function W(N){return N===93?(e.consume(N),x):P(N)}function x(N){return N===62?(e.consume(N),Q):N===45&&i===2?(e.consume(N),x):P(N)}function Q(N){return N===null||oe(N)?(e.exit("htmlFlowData"),ae(N)):(e.consume(N),Q)}function ae(N){return e.exit("htmlFlow"),t(N)}}function e0(e,t,n){const r=this;return i;function i(o){return oe(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 t0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Mi,t,n)}}const n0={name:"htmlText",tokenize:r0};function r0(e,t,n){const r=this;let i,s,o;return a;function a(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),O):x===63?(e.consume(x),v):it(x)?(e.consume(x),$):n(x)}function c(x){return x===45?(e.consume(x),u):x===91?(e.consume(x),s=0,p):it(x)?(e.consume(x),w):n(x)}function u(x){return x===45?(e.consume(x),f):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),h):oe(x)?(o=d,j(x)):(e.consume(x),d)}function h(x){return x===45?(e.consume(x),f):d(x)}function f(x){return x===62?L(x):x===45?h(x):d(x)}function p(x){const Q="CDATA[";return x===Q.charCodeAt(s++)?(e.consume(x),s===Q.length?m:p):n(x)}function m(x){return x===null?n(x):x===93?(e.consume(x),b):oe(x)?(o=m,j(x)):(e.consume(x),m)}function b(x){return x===93?(e.consume(x),y):m(x)}function y(x){return x===62?L(x):x===93?(e.consume(x),y):m(x)}function w(x){return x===null||x===62?L(x):oe(x)?(o=w,j(x)):(e.consume(x),w)}function v(x){return x===null?n(x):x===63?(e.consume(x),T):oe(x)?(o=v,j(x)):(e.consume(x),v)}function T(x){return x===62?L(x):v(x)}function O(x){return it(x)?(e.consume(x),A):n(x)}function A(x){return x===45||Ze(x)?(e.consume(x),A):F(x)}function F(x){return oe(x)?(o=F,j(x)):ge(x)?(e.consume(x),F):L(x)}function $(x){return x===45||Ze(x)?(e.consume(x),$):x===47||x===62||Ne(x)?B(x):n(x)}function B(x){return x===47?(e.consume(x),L):x===58||x===95||it(x)?(e.consume(x),C):oe(x)?(o=B,j(x)):ge(x)?(e.consume(x),B):L(x)}function C(x){return x===45||x===46||x===58||x===95||Ze(x)?(e.consume(x),C):U(x)}function U(x){return x===61?(e.consume(x),P):oe(x)?(o=U,j(x)):ge(x)?(e.consume(x),U):B(x)}function P(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,ie):oe(x)?(o=P,j(x)):ge(x)?(e.consume(x),P):(e.consume(x),X)}function ie(x){return x===i?(e.consume(x),i=void 0,Z):x===null?n(x):oe(x)?(o=ie,j(x)):(e.consume(x),ie)}function X(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||Ne(x)?B(x):(e.consume(x),X)}function Z(x){return x===47||x===62||Ne(x)?B(x):n(x)}function L(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function j(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),q}function q(x){return ge(x)?be(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):W(x)}function W(x){return e.enter("htmlTextData"),o(x)}}const zl={name:"labelEnd",resolveAll:a0,resolveTo:l0,tokenize:c0},i0={tokenize:u0},s0={tokenize:d0},o0={tokenize:f0};function a0(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&&xt(e,0,e.length,n),e}function l0(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=At(a,e.slice(s+1,s+r+3)),a=At(a,[["enter",u,t]]),a=At(a,Vs(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=At(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=At(a,e.slice(o+1)),a=At(a,[["exit",l,t]]),xt(e,s,e.length,a),e}function c0(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(jt(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(i0,u,o?u:d)(h):h===91?e.attempt(s0,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(o0,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function u0(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 Ne(d)?pi(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 Ne(d)?pi(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Vf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Ne(d)?pi(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 d0(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(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function f0(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 h0={name:"labelStartImage",resolveAll:zl.resolveAll,tokenize:p0};function p0(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 g0={name:"labelStartLink",resolveAll:zl.resolveAll,tokenize:m0};function m0(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:b0};function b0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const _s={name:"thematicBreak",tokenize:y0};function y0(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||oe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?be(e,a,"whitespace")(c):a(c))}}const ft={continuation:{tokenize:_0},exit:N0,name:"list",tokenize:w0},E0={partial:!0,tokenize:k0},x0={partial:!0,tokenize:v0};function w0(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:Wa(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(_s,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 Wa(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(Mi,r.interrupt?n:u,e.attempt(E0,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return ge(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 _0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Mi,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ge(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(x0,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(ft,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function v0(e,t,n){const r=this;return be(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 k0(e,t,n){const r=this;return be(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!ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Jc={name:"setextUnderline",resolveTo:A0,tokenize:S0};function A0(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 S0(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"),ge(c)?be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||oe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const T0={tokenize:C0};function C0(e){const t=this,n=e.attempt(Mi,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(My,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 O0={resolveAll:Yf()},R0=Wf("string"),I0=Wf("text");function Wf(e){return{resolveAll:Yf(e==="text"?L0: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 L0(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 M0={42:ft,43:ft,45:ft,48:ft,49:ft,50:ft,51:ft,52:ft,53:ft,54:ft,55:ft,56:ft,57:ft,62:qf},D0={91:$y},P0={[-2]:la,[-1]:la,32:la},B0={35:Gy,42:_s,45:[Jc,_s],60:Yy,61:Jc,95:_s,96:Xc,126:Xc},F0={38:jf,92:zf},$0={[-5]:ca,[-4]:ca,[-3]:ca,33:h0,38:jf,42:Ya,60:[gy,n0],91:g0,92:[jy,zf],93:zl,95:Ya,96:Ty},U0={null:[Ya,O0]},q0={null:[42,95]},z0={null:[]},j0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:q0,contentInitial:D0,disable:z0,document:M0,flow:B0,flowInitial:P0,insideSpan:U0,string:F0,text:$0},Symbol.toStringTag,{value:"Module"}));function H0(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:F(O),check:F(A),consume:w,enter:v,exit:T,interrupt:F(A,{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(U){return o=At(o,U),b(),o[o.length-1]!==null?[]:($(t,0),c.events=Vs(s,c.events,c),c.events)}function h(U,P){return K0(f(U),P)}function f(U){return G0(o,U)}function p(){const{_bufferIndex:U,_index:P,line:ie,column:X,offset:Z}=r;return{_bufferIndex:U,_index:P,line:ie,column:X,offset:Z}}function m(U){i[U.line]=U.column,C()}function b(){let U;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<P.length;)y(P.charCodeAt(r._bufferIndex));else y(P)}}function y(U){u=u(U)}function w(U){oe(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,C()):U!==-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=U}function v(U,P){const ie=P||{};return ie.type=U,ie.start=p(),c.events.push(["enter",ie,c]),a.push(ie),ie}function T(U){const P=a.pop();return P.end=p(),c.events.push(["exit",P,c]),P}function O(U,P){$(U,P.from)}function A(U,P){P.restore()}function F(U,P){return ie;function ie(X,Z,L){let j,q,W,x;return Array.isArray(X)?ae(X):"tokenize"in X?ae([X]):Q(X);function Q(we){return ot;function ot(ke){const Je=ke!==null&&we[ke],et=ke!==null&&we.null,at=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(et)?et:et?[et]:[]];return ae(at)(ke)}}function ae(we){return j=we,q=0,we.length===0?L:N(we[q])}function N(we){return ot;function ot(ke){return x=B(),W=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?se():we.tokenize.call(P?Object.assign(Object.create(c),P):c,l,he,se)(ke)}}function he(we){return U(W,x),Z}function se(we){return x.restore(),++q<j.length?N(j[q]):L}}}function $(U,P){U.resolveAll&&!s.includes(U)&&s.push(U),U.resolve&&xt(c.events,P,c.events.length-P,U.resolve(c.events.slice(P),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function B(){const U=p(),P=c.previous,ie=c.currentConstruct,X=c.events.length,Z=Array.from(a);return{from:X,restore:L};function L(){r=U,c.previous=P,c.currentConstruct=ie,c.events.length=X,a=Z,C()}}function C(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function G0(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 K0(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(a)}i=a===-2,r.push(o)}return r.join("")}function Hh(e){const r={constructs:Rl([Uh,...(e||{}).extensions||[]]),content:i(od),defined:[],document:i(ld),flow:i(Sh),lazy:{},string:i(Oh),text:i(Th)};return r;function i(a){return o;function o(l){return zh(r,a,l)}}}function Gh(e){for(;!Dl(e););return e}const Eo=/[\0\t\n\r]/g;function Kh(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const s=[];let c,d,u,h,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,t="",n&&(a.charCodeAt(0)===65279&&u++,n=void 0);u<a.length;){if(Eo.lastIndex=u,c=Eo.exec(a),h=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(h),!c){t=a.slice(u);break}if(f===10&&u===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),u<h&&(s.push(a.slice(u,h)),e+=h-u),f){case 0:{s.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,s.push(-2);e++<d;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}u=h+1}return l&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Wh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vh(e){return e.replace(Wh,Yh)}function Yh(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Il(n.slice(a?2:1),a?16:10)}return Ni(n)||e}const ql={}.hasOwnProperty;function Zh(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Xh(n)(Gh(Hh(n).document().write(Kh()(e,t,!0))))}function Xh(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(X),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(he),blockQuote:a(Q),characterEscape:R,characterReference:R,codeFenced:a(ie),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ie,o),codeText:a(ce,o),codeTextData:R,data:R,codeFlowValue:R,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(me),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(we,o),htmlFlowData:R,htmlText:a(we,o),htmlTextData:R,image:a(K),label:o,link:a(X),listItem:a(te),listItemValue:h,listOrdered:a(ne,u),listUnordered:a(ne),paragraph:a(ee),reference:N,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(he),strong:a(fe),thematicBreak:a(ge)},exit:{atxHeading:s(),atxHeadingSequence:E,autolink:s(),autolinkEmail:V,autolinkProtocol:W,blockQuote:s(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:$,characterReferenceMarkerNumeric:$,characterReferenceValue:D,characterReference:q,codeFenced:s(y),codeFencedFence:p,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:s(m),codeText:s(B),codeTextData:x,data:x,definition:s(),definitionDestinationString:v,definitionLabelString:b,definitionTitleString:_,emphasis:s(),hardBreakEscape:s(S),hardBreakTrailing:s(S),htmlFlow:s(I),htmlFlowData:x,htmlText:s(L),htmlTextData:x,image:s(F),label:U,labelText:G,lineEnding:w,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:H,resourceDestinationString:A,resourceTitleString:C,resource:P,setextHeading:s(T),setextHeadingLineSequence:O,setextHeadingText:k,strong:s(),thematicBreak:s()}};$l(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let Y={type:"root",children:[]};const J={stack:[Y],tokenStack:[],config:t,enter:l,exit:c,buffer:o,resume:d,data:n},oe=[];let le=-1;for(;++le<z.length;)if(z[le][1].type==="listOrdered"||z[le][1].type==="listUnordered")if(z[le][0]==="enter")oe.push(le);else{const ke=oe.pop();le=i(z,ke,le)}for(le=-1;++le<z.length;){const ke=t[z[le][0]];ql.call(ke,z[le][1].type)&&ke[z[le][1].type].call(Object.assign({sliceSerialize:z[le][2].sliceSerialize},J),z[le][1])}if(J.tokenStack.length>0){const ke=J.tokenStack[J.tokenStack.length-1];(ke[1]||xo).call(J,void 0,ke[0])}for(Y.position={start:ct(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:ct(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<t.transforms.length;)Y=t.transforms[le](Y)||Y;return Y}function i(z,Y,J){let oe=Y-1,le=-1,ke=!1,it,We,Vt,Yt;for(;++oe<=J;){const $e=z[oe];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?le++:le--,Yt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(it&&!Yt&&!le&&!Vt&&(Vt=oe),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!le&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||le===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(it){let At=oe;for(We=void 0;At--;){const ot=z[At];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;We&&(z[We][1].type="lineEndingBlank",ke=!0),ot[1].type="lineEnding",We=At}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}Vt&&(!We||Vt<We)&&(it._spread=!0),it.end=Object.assign({},We?z[We][1].start:$e[1].end),z.splice(We||oe,0,["exit",it,$e[2]]),oe++,J++}if($e[1].type==="listItemPrefix"){const At={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};it=At,z.splice(oe,0,["enter",At,$e[2]]),oe++,J++,Vt=void 0,Yt=!0}}}return z[Y][1]._spread=ke,J}function a(z,Y){return J;function J(oe){l.call(this,z(oe),oe),Y&&Y.call(this,oe)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(z,Y,J){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([Y,J||void 0]),z.position={start:ct(Y.start),end:void 0}}function s(z){return Y;function Y(J){z&&z.call(this,J),c.call(this,J)}}function c(z,Y){const J=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==z.type&&(Y?Y.call(this,z,oe[0]):(oe[1]||xo).call(this,z,oe[0]));else throw new Error("Cannot close `"+z.type+"` ("+on({start:z.start,end:z.end})+"): it’s not open");J.position.end=ct(z.end)}function d(){return Qf(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function h(z){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function f(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=z}function g(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=z}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/(\r?\n|\r)$/g,"")}function b(z){const Y=this.resume(),J=this.stack[this.stack.length-1];J.label=Y,J.identifier=Ye(this.sliceSerialize(z)).toLowerCase()}function _(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function v(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function E(z){const Y=this.stack[this.stack.length-1];if(!Y.depth){const J=this.sliceSerialize(z).length;Y.depth=J}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function O(z){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function R(z){const J=this.stack[this.stack.length-1].children;let oe=J[J.length-1];(!oe||oe.type!=="text")&&(oe=pe(),oe.position={start:ct(z.start),end:void 0},J.push(oe)),this.stack.push(oe)}function x(z){const Y=this.stack.pop();Y.value+=this.sliceSerialize(z),Y.position.end=ct(z.end)}function w(z){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=Y.children[Y.children.length-1];J.position.end=ct(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(R.call(this,z),x.call(this,z))}function S(){this.data.atHardBreak=!0}function I(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function L(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function B(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function M(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function F(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function G(z){const Y=this.sliceSerialize(z),J=this.stack[this.stack.length-2];J.label=Vh(Y),J.identifier=Ye(Y).toLowerCase()}function U(){const z=this.stack[this.stack.length-1],Y=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const oe=z.children;J.children=oe}else J.alt=Y}function A(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function C(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function P(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function H(z){const Y=this.resume(),J=this.stack[this.stack.length-1];J.label=Y,J.identifier=Ye(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function $(z){this.data.characterReferenceType=z.type}function D(z){const Y=this.sliceSerialize(z),J=this.data.characterReferenceType;let oe;J?(oe=Il(Y,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=Ni(Y);const le=this.stack[this.stack.length-1];le.value+=oe}function q(z){const Y=this.stack.pop();Y.position.end=ct(z.end)}function W(z){x.call(this,z);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(z)}function V(z){x.call(this,z);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(z)}function Q(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ce(){return{type:"inlineCode",value:""}}function ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function me(){return{type:"emphasis",children:[]}}function he(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function we(){return{type:"html",value:""}}function K(){return{type:"image",title:null,url:"",alt:null}}function X(){return{type:"link",title:null,url:"",children:[]}}function ne(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function te(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function ee(){return{type:"paragraph",children:[]}}function fe(){return{type:"strong",children:[]}}function pe(){return{type:"text",value:""}}function ge(){return{type:"thematicBreak"}}}function ct(e){return{line:e.line,column:e.column,offset:e.offset}}function $l(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$l(e,r):Qh(e,r)}}function Qh(e,t){let n;for(n in t)if(ql.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 xo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+on({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+on({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+on({start:t.start,end:t.end})+") is still open")}function Jh(e){const t=this;t.parser=n;function n(r){return Zh(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ep(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 tp(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
-
`}]}function
|
|
6
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let
|
|
7
|
-
`}),
|
|
8
|
-
`});const c={type:"element",tagName:"li",properties:
|
|
9
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(
|
|
10
|
-
`}]}}const
|
|
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:$f([j0,...(e||{}).extensions||[]]),content:i(ly),defined:[],document:i(uy),flow:i(T0),lazy:{},string:i(R0),text:i(I0)};return r;function i(s){return o;function o(a){return H0(r,s,a)}}}function W0(e){for(;!Hf(e););return e}const eu=/[\0\t\n\r]/g;function Y0(){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 Z0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function X0(e){return e.replace(Z0,Q0)}function Q0(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 ql(n)||e}const Zf={}.hasOwnProperty;function J0(e,t,n){return typeof t!="string"&&(n=t,t=void 0),eE(n)(W0(V0(n).document().write(Y0()(e,t,!0))))}function eE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Lt),autolinkProtocol:B,autolinkEmail:B,atxHeading:s(Ie),blockQuote:s(et),characterEscape:B,characterReference:B,codeFenced:s(at),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(at,o),codeText:s(It,o),codeTextData:B,data:B,codeFlowValue:B,definition:s(mt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(_t),hardBreakEscape:s(pe),hardBreakTrailing:s(pe),htmlFlow:s(je,o),htmlFlowData:B,htmlText:s(je,o),htmlTextData:B,image:s(re),label:o,link:s(Lt),listItem:s(me),listItemValue:h,listOrdered:s(ve,d),listUnordered:s(ve),paragraph:s(Mt),reference:N,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Ie),strong:s(lt),thematicBreak:s(vt)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:Je,autolinkProtocol:ke,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:we,characterReference:ot,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:l(y),codeText:l(Z),codeTextData:C,data:C,definition:l(),definitionDestinationString:T,definitionLabelString:w,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(P),hardBreakTrailing:l(P),htmlFlow:l(ie),htmlFlowData:C,htmlText:l(X),htmlTextData:C,image:l(j),label:W,labelText:q,lineEnding:U,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:x,resourceTitleString:Q,resource:ae,setextHeading:l($),setextHeadingLineSequence:F,setextHeadingText:A,strong:l(),thematicBreak:l()}};Xf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let R={type:"root",children:[]};const H={stack:[R],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},K=[];let te=-1;for(;++te<S.length;)if(S[te][1].type==="listOrdered"||S[te][1].type==="listUnordered")if(S[te][0]==="enter")K.push(te);else{const Ae=K.pop();te=i(S,Ae,te)}for(te=-1;++te<S.length;){const Ae=t[S[te][0]];Zf.call(Ae,S[te][1].type)&&Ae[S[te][1].type].call(Object.assign({sliceSerialize:S[te][2].sliceSerialize},H),S[te][1])}if(H.tokenStack.length>0){const Ae=H.tokenStack[H.tokenStack.length-1];(Ae[1]||tu).call(H,void 0,Ae[0])}for(R.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})},te=-1;++te<t.transforms.length;)R=t.transforms[te](R)||R;return R}function i(S,R,H){let K=R-1,te=-1,Ae=!1,ct,tt,Dt,Nt;for(;++K<=H;){const Be=S[K];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?te++:te--,Nt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(ct&&!Nt&&!te&&!Dt&&(Dt=K),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!te&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||te===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(ct){let bt=K;for(tt=void 0;bt--;){const $e=S[bt];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;tt&&(S[tt][1].type="lineEndingBlank",Ae=!0),$e[1].type="lineEnding",tt=bt}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}Dt&&(!tt||Dt<tt)&&(ct._spread=!0),ct.end=Object.assign({},tt?S[tt][1].start:Be[1].end),S.splice(tt||K,0,["exit",ct,Be[2]]),K++,H++}if(Be[1].type==="listItemPrefix"){const bt={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};ct=bt,S.splice(K,0,["enter",bt,Be[2]]),K++,H++,Dt=void 0,Nt=!0}}}return S[R][1]._spread=Ae,H}function s(S,R){return H;function H(K){a.call(this,S(K),K),R&&R.call(this,K)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(S,R,H){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([R,H||void 0]),S.position={start:An(R.start),end:void 0}}function l(S){return R;function R(H){S&&S.call(this,H),c.call(this,H)}}function c(S,R){const H=this.stack.pop(),K=this.tokenStack.pop();if(K)K[0].type!==S.type&&(R?R.call(this,S,K[0]):(K[1]||tu).call(this,S,K[0]));else throw new Error("Cannot close `"+S.type+"` ("+hi({start:S.start,end:S.end})+"): it’s not open");H.position.end=An(S.end)}function u(){return ty(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function f(){const S=this.resume(),R=this.stack[this.stack.length-1];R.lang=S}function p(){const S=this.resume(),R=this.stack[this.stack.length-1];R.meta=S}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/(\r?\n|\r)$/g,"")}function w(S){const R=this.resume(),H=this.stack[this.stack.length-1];H.label=R,H.identifier=jt(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function T(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function O(S){const R=this.stack[this.stack.length-1];if(!R.depth){const H=this.sliceSerialize(S).length;R.depth=H}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function F(S){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function B(S){const H=this.stack[this.stack.length-1].children;let K=H[H.length-1];(!K||K.type!=="text")&&(K=He(),K.position={start:An(S.start),end:void 0},H.push(K)),this.stack.push(K)}function C(S){const R=this.stack.pop();R.value+=this.sliceSerialize(S),R.position.end=An(S.end)}function U(S){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=R.children[R.children.length-1];H.position.end=An(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(B.call(this,S),C.call(this,S))}function P(){this.data.atHardBreak=!0}function ie(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function X(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function Z(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function L(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function j(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function q(S){const R=this.sliceSerialize(S),H=this.stack[this.stack.length-2];H.label=X0(R),H.identifier=jt(R).toLowerCase()}function W(){const S=this.stack[this.stack.length-1],R=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const K=S.children;H.children=K}else H.alt=R}function x(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function Q(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function ae(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function he(S){const R=this.resume(),H=this.stack[this.stack.length-1];H.label=R,H.identifier=jt(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function se(S){this.data.characterReferenceType=S.type}function we(S){const R=this.sliceSerialize(S),H=this.data.characterReferenceType;let K;H?(K=Uf(R,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):K=ql(R);const te=this.stack[this.stack.length-1];te.value+=K}function ot(S){const R=this.stack.pop();R.position.end=An(S.end)}function ke(S){C.call(this,S);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(S)}function Je(S){C.call(this,S);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(S)}function et(){return{type:"blockquote",children:[]}}function at(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _t(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function je(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function Lt(){return{type:"link",title:null,url:"",children:[]}}function ve(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function me(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Mt(){return{type:"paragraph",children:[]}}function lt(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function vt(){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):tE(e,r)}}function tE(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+"` ("+hi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hi({start:t.start,end:t.end})+") is still open")}function nE(e){const t=this;t.parser=n;function n(r){return J0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rE(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 iE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function sE(e,t){const n=t.value?t.value+`
|
|
6
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function oE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qr(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 cE(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 uE(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 dE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={src:qr(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 fE(e,t){const n={src:qr(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 hE(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 pE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={href:qr(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 gE(e,t){const n={href:qr(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 mE(e,t,n){const r=e.all(t),i=n?bE(n):Jf(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function bE(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jf(n[r])}return t}function Jf(e){const t=e.spread;return t??e.children.length>1}function yE(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function EE(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xE(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wE(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _E(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Bl(t.children[1]),l=If(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function vE(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},f=o?o[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function NE(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nu=9,ru=32;function kE(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(iu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(iu(t.slice(i),i>0,!1)),s.join("")}function iu(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===nu||s===ru;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===nu||s===ru;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function AE(e,t){const n={type:"text",value:kE(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function SE(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const TE={blockquote:rE,break:iE,code:sE,delete:oE,emphasis:aE,footnoteReference:lE,heading:cE,html:uE,imageReference:dE,image:fE,inlineCode:hE,linkReference:pE,link:gE,listItem:mE,list:yE,paragraph:EE,root:xE,strong:wE,table:_E,tableCell:NE,tableRow:vE,text:AE,thematicBreak:SE,toml:is,yaml:is,definition:is,footnoteDefinition:is};function is(){}const eh=-1,Ws=0,gi=1,Rs=2,jl=3,Hl=4,Gl=5,Kl=6,th=7,nh=8,su=typeof self=="object"?self:globalThis,CE=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Ws:case eh:return n(o,i);case gi:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Rs:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case jl:return n(new Date(o),i);case Hl:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Gl:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case Kl:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case th:{const{name:a,message:l}=o;return n(new su[a](l),i)}case nh:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new su[s](o),i)};return r},ou=e=>CE(new Map,e)(0),mr="",{toString:OE}={},{keys:RE}=Object,si=e=>{const t=typeof e;if(t!=="object"||!e)return[Ws,t];const n=OE.call(e).slice(8,-1);switch(n){case"Array":return[gi,mr];case"Object":return[Rs,mr];case"Date":return[jl,mr];case"RegExp":return[Hl,mr];case"Map":return[Gl,mr];case"Set":return[Kl,mr];case"DataView":return[gi,n]}return n.includes("Array")?[gi,n]:n.includes("Error")?[th,n]:[Rs,n]},ss=([e,t])=>e===Ws&&(t==="function"||t==="symbol"),IE=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=si(o);switch(a){case Ws:{let u=o;switch(l){case"bigint":a=nh,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([eh],o)}return i([a,u],o)}case gi:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Rs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of RE(o))(e||!ss(si(o[h])))&&u.push([s(h),s(o[h])]);return d}case jl:return i([a,o.toISOString()],o);case Hl:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Gl:{const u=[],d=i([a,u],o);for(const[h,f]of o)(e||!(ss(si(h))||ss(si(f))))&&u.push([s(h),s(f)]);return d}case Kl:{const u=[],d=i([a,u],o);for(const h of o)(e||!ss(si(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},au=(e,{json:t,lossy:n}={})=>{const r=[];return IE(!(t||n),!!t,new Map,r)(e),r},Is=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ou(au(e,t)):structuredClone(e):(e,t)=>ou(au(e,t));function LE(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ME(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function DE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LE,r=e.options.footnoteBackLabel||ME,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=qr(d.toLowerCase());let f=0;const p=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let w=typeof n=="string"?n:n(l,f);typeof w=="string"&&(w={type:"text",value:w}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const w=b.children[b.children.length-1];w&&w.type==="text"?w.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Is(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
10
|
+
`}]}}const rh=function(e){if(e==null)return $E;if(typeof e=="function")return Ys(e);if(typeof e=="object")return Array.isArray(e)?PE(e):BE(e);if(typeof e=="string")return FE(e);throw new Error("Expected function, string, or object as test")};function PE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rh(e[n]);return Ys(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function BE(e){const t=e;return Ys(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function FE(e){return Ys(t);function t(n){return n&&n.type===e}}function Ys(e){return t;function t(n,r,i){return!!(UE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $E(){return!0}function UE(e){return e!==null&&typeof e=="object"&&"type"in e}const ih=[],qE=!0,lu=!1,zE="skip";function jE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=rh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ih,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=HE(n(l,u)),f[0]===lu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==zE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const w=y.children[m];if(p=a(w,m,b)(),p[0]===lu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function HE(e){return Array.isArray(e)?e:typeof e=="number"?[qE,e]:e==null?ih:[e]}function GE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),jE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Za={}.hasOwnProperty,KE={};function VE(e,t){const n=t||KE,r=new Map,i=new Map,s=new Map,o={...TE,...n.handlers},a={all:c,applyData:YE,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:WE,wrap:XE};return GE(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,f=a.handlers[h];if(Za.call(a.handlers,h)&&f)return f(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:m,...b}=u,y=Is(b);return y.children=a.all(u),y}return Is(u)}return(a.options.unknownHandler||ZE)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],u);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=cu(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=cu(m.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function WE(e,t){e.position&&(t.position=Lb(e))}function YE(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Is(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ZE(e,t){const n=t.data||{},r="value"in t&&!(Za.call(n,"hProperties")||Za.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function XE(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
11
11
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
12
12
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
13
|
-
`}),n}function
|
|
14
|
-
`},i),a}function Yp(e,t){return e&&"run"in e?async function(n,r){const i=Ro(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ro(n,{file:r,...e||t})}}function Io(e){if(e)throw e}var In=Object.prototype.hasOwnProperty,Xl=Object.prototype.toString,Lo=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,Po=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xl.call(t)==="[object Array]"},Do=function(t){if(!t||Xl.call(t)!=="[object Object]")return!1;var n=In.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&In.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||In.call(t,i)},Bo=function(t,n){Lo&&n.name==="__proto__"?Lo(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Fo=function(t,n){if(n==="__proto__")if(In.call(t,n)){if(Mo)return Mo(t,n).value}else return;return t[n]},Zp=function e(){var t,n,r,i,a,o,l=arguments[0],s=1,c=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});s<c;++s)if(t=arguments[s],t!=null)for(n in t)r=Fo(l,n),i=Fo(t,n),l!==i&&(d&&i&&(Do(i)||(a=Po(i)))?(a?(a=!1,o=r&&Po(r)?r:[]):o=r&&Do(r)?r:{},Bo(l,{name:n,newValue:e(d,o,i)})):typeof i<"u"&&Bo(l,{name:n,newValue:i}));return l};const Ar=Yn(Zp);function ri(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xp(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(s,...c){const d=e[++a];let u=-1;if(s){o(s);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,d?Qp(d,l)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Qp(e,t){let n;return r;function r(...o){const l=e.length>o.length;let s;l&&o.push(i);try{s=e.apply(this,o)}catch(c){const d=c;if(l&&n)throw d;return i(d)}l||(s&&s.then&&typeof s.then=="function"?s.then(a,i):s instanceof Error?i(s):a(s))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const nt={basename:Jp,dirname:eg,extname:tg,join:ng,sep:"/"};function Jp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function eg(e){if(pn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tg(e){pn(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ng(...e){let t=-1,n;for(;++t<e.length;)pn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rg(n)}function rg(e){pn(e);const t=e.codePointAt(0)===47;let n=ig(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ig(e,t){let n="",r=0,i=-1,a=0,o=-1,l,s;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function pn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const og={cwd:ag};function ag(){return"/"}function ii(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lg(e){if(typeof e=="string")e=new URL(e);else if(!ii(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return sg(e)}function sg(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Nr=["history","path","basename","stem","extname","dirname"];class Ql{constructor(t){let n;t?ii(t)?n={path:t}:typeof t=="string"||cg(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":og.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Nr.length;){const a=Nr[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Nr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?nt.basename(this.path):void 0}set basename(t){Tr(t,"basename"),Or(t,"basename"),this.path=nt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?nt.dirname(this.path):void 0}set dirname(t){jo(this.basename,"dirname"),this.path=nt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?nt.extname(this.path):void 0}set extname(t){if(Or(t,"extname"),jo(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=nt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ii(t)&&(t=lg(t)),Tr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?nt.basename(this.path,this.extname):void 0}set stem(t){Tr(t,"stem"),Or(t,"stem"),this.path=nt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new De(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Or(e,t){if(e&&e.includes(nt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+nt.sep+"`")}function Tr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ug=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},fg={}.hasOwnProperty;class Li extends ug{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xp()}copy(){const t=new Li;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ar(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ir("data",this.frozen),this.namespace[t]=n,this):fg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ir("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=En(t),r=this.parser||this.Parser;return Cr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Cr("process",this.parser||this.Parser),Rr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=En(t),s=r.parse(l);r.run(s,l,function(d,u,h){if(d||!u||!h)return c(d);const f=u,g=r.stringify(f,h);pg(g)?h.value=g:h.result=g,c(d,h)});function c(d,u){d||!u?o(d):a?a(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),Cr("processSync",this.parser||this.Parser),Rr("processSync",this.compiler||this.Compiler),this.process(t,i),zo("processSync","process",n),r;function i(a,o){n=!0,Io(a),r=o}}run(t,n,r){Uo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const s=En(n);i.run(t,s,c);function c(d,u,h){const f=u||t;d?l(d):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),zo("runSync","run",r),i;function a(o,l){Io(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=En(n),i=this.compiler||this.Compiler;return Rr("stringify",i),Uo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ir("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")s(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...u]=c;s(d,u)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=Ar(!0,i.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const u=c[d];a(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function s(c,d){let u=-1,h=-1;for(;++u<r.length;)if(r[u][0]===c){h=u;break}if(h===-1)r.push([c,...d]);else if(d.length>0){let[f,...g]=d;const p=r[h][1];ri(p)&&ri(f)&&(f=Ar(!0,p,f)),r[h]=[c,f,...g]}}}}const dg=new Li().freeze();function Cr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uo(e){if(!ri(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function En(e){return hg(e)?e:new Ql(e)}function hg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pg(e){return typeof e=="string"||gg(e)}function gg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jl=function(e){if(e==null)return vg;if(typeof e=="function")return tr(e);if(typeof e=="object")return Array.isArray(e)?mg(e):yg(e);if(typeof e=="string")return bg(e);throw new Error("Expected function, string, or object as test")};function mg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Jl(e[n]);return tr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function yg(e){const t=e;return tr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function bg(e){return tr(t);function t(n){return n&&n.type===e}}function tr(e){return t;function t(n,r,i){return!!(_g(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vg(){return!0}function _g(e){return e!==null&&typeof e=="object"&&"type"in e}const es=[],Eg=!0,qo=!1,xg="skip";function wg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Jl(i),o=r?-1:1;l(e,void 0,[])();function l(s,c,d){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=es,g,p,y;if((!t||a(s,c,d[d.length-1]||void 0))&&(f=kg(n(s,d)),f[0]===qo))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==xg)for(p=(r?m.children.length:-1)+o,y=d.concat(m);p>-1&&p<m.children.length;){const b=m.children[p];if(g=l(b,p,y)(),g[0]===qo)return g;p=typeof g[1]=="number"?g[1]:p+o}}return f}}}function kg(e){return Array.isArray(e)?e:typeof e=="number"?[Eg,e]:e==null?es:[e]}function Sg(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),wg(e,a,l,i);function l(s,c){const d=c[c.length-1],u=d?d.children.indexOf(s):void 0;return o(s,u,d)}}const Ag="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$o=[],Ho={allowDangerousHtml:!0},Ng=/^(https?|ircs?|mailto|xmpp)$/i,Og=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ts(e){const t=Tg(e),n=Cg(e);return Rg(t.runSync(t.parse(n),n),e)}function Tg(e){const t=e.rehypePlugins||$o,n=e.remarkPlugins||$o,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ho}:Ho;return dg().use(Jh).use(n).use(Yp,r).use(t)}function Cg(e){const t=e.children||"",n=new Ql;return typeof t=="string"&&(n.value=t),n}function Rg(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||Ig;for(const d of Og)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Ag+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Sg(e,c),Pf(e,{Fragment:j.Fragment,components:i,ignoreInvalidStyle:!0,jsx:j.jsx,jsxs:j.jsxs,passKeys:!0,passNode:!0});function c(d,u,h){if(d.type==="raw"&&h&&typeof u=="number")return o?h.children.splice(u,1):h.children[u]={type:"text",value:d.value},u;if(d.type==="element"){let f;for(f in wr)if(Object.hasOwn(wr,f)&&Object.hasOwn(d.properties,f)){const g=d.properties[f],p=wr[f];(p===null||p.includes(d.tagName))&&(d.properties[f]=s(String(g||""),f,d))}}if(d.type==="element"){let f=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!f&&r&&typeof u=="number"&&(f=!r(d,u,h)),f&&h&&typeof u=="number")return l&&d.children?h.children.splice(u,1,...d.children):h.children.splice(u,1),u}}}function Ig(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ng.test(e.slice(0,t))?e:""}function Go(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Lg(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Mi=function(e){if(e==null)return Bg;if(typeof e=="function")return nr(e);if(typeof e=="object")return Array.isArray(e)?Mg(e):Pg(e);if(typeof e=="string")return Dg(e);throw new Error("Expected function, string, or object as test")};function Mg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Mi(e[n]);return nr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Pg(e){const t=e;return nr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Dg(e){return nr(t);function t(n){return n&&n.type===e}}function nr(e){return t;function t(n,r,i){return!!(Fg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Bg(){return!0}function Fg(e){return e!==null&&typeof e=="object"&&"type"in e}const ns=[],jg=!0,Ko=!1,Ug="skip";function zg(e,t,n,r){let i;i=t;const a=Mi(i),o=1;l(e,void 0,[])();function l(s,c,d){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ns,g,p,y;if(a(s,c,d[d.length-1]||void 0)&&(f=qg(n(s,d)),f[0]===Ko))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==Ug)for(p=-1+o,y=d.concat(m);p>-1&&p<m.children.length;){const b=m.children[p];if(g=l(b,p,y)(),g[0]===Ko)return g;p=typeof g[1]=="number"?g[1]:p+o}}return f}}}function qg(e){return Array.isArray(e)?e:typeof e=="number"?[jg,e]:e==null?ns:[e]}function $g(e,t,n){const i=Mi((n||{}).ignore||[]),a=Hg(t);let o=-1;for(;++o<a.length;)zg(e,"text",l);function l(c,d){let u=-1,h;for(;++u<d.length;){const f=d[u],g=h?h.children:void 0;if(i(f,g?g.indexOf(f):void 0,h))return;h=f}if(h)return s(c,d)}function s(c,d){const u=d[d.length-1],h=a[o][0],f=a[o][1];let g=0;const y=u.children.indexOf(c);let m=!1,b=[];h.lastIndex=0;let _=h.exec(c.value);for(;_;){const v=_.index,E={index:_.index,input:_.input,stack:[...d,c]};let k=f(..._,E);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?h.lastIndex=v+1:(g!==v&&b.push({type:"text",value:c.value.slice(g,v)}),Array.isArray(k)?b.push(...k):k&&b.push(k),g=v+_[0].length,m=!0),!h.global)break;_=h.exec(c.value)}return m?(g<c.value.length&&b.push({type:"text",value:c.value.slice(g)}),u.children.splice(y,1,...b)):b=[c],y+b.length}}function Hg(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Gg(i[0]),Kg(i[1])])}return t}function Gg(e){return typeof e=="string"?new RegExp(Lg(e),"g"):e}function Kg(e){return typeof e=="function"?e:function(){return e}}const Lr="phrasing",Mr=["autolink","link","image","label"];function Wg(){return{transforms:[em],enter:{literalAutolink:Yg,literalAutolinkEmail:Pr,literalAutolinkHttp:Pr,literalAutolinkWww:Pr},exit:{literalAutolink:Jg,literalAutolinkEmail:Qg,literalAutolinkHttp:Zg,literalAutolinkWww:Xg}}}function Vg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Lr,notInConstruct:Mr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Lr,notInConstruct:Mr},{character:":",before:"[ps]",after:"\\/",inConstruct:Lr,notInConstruct:Mr}]}}function Yg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pr(e){this.config.enter.autolinkProtocol.call(this,e)}function Zg(e){this.config.exit.autolinkProtocol.call(this,e)}function Xg(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Qg(e){this.config.exit.autolinkEmail.call(this,e)}function Jg(e){this.exit(e)}function em(e){$g(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tm],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nm]],{ignore:["link","linkReference"]})}function tm(e,t,n,r,i){let a="";if(!rs(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!rm(n)))return!1;const o=im(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function nm(e,t,n,r){return!rs(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rm(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function im(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Go(e,"(");let a=Go(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function rs(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||_t(n)||Xn(n))&&(!t||n!==47)}is.peek=hm;function om(){this.buffer()}function am(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lm(){this.buffer()}function sm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function um(e){this.exit(e)}function fm(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dm(e){this.exit(e)}function hm(){return"["}function is(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function pm(){return{enter:{gfmFootnoteCallString:om,gfmFootnoteCall:am,gfmFootnoteDefinitionLabelString:lm,gfmFootnoteDefinition:sm},exit:{gfmFootnoteCallString:cm,gfmFootnoteCall:um,gfmFootnoteDefinitionLabelString:fm,gfmFootnoteDefinition:dm}}}function gm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:is},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let s=l.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return s+=l.move(a.safe(a.associationId(r),{before:s,after:"]"})),d(),s+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),s+=l.move((t?`
|
|
15
|
-
`:" ")+
|
|
16
|
-
`)}function
|
|
17
|
-
`&&
|
|
18
|
-
`}function
|
|
19
|
-
`,encode:["`"],...
|
|
20
|
-
`),
|
|
21
|
-
`)),
|
|
22
|
-
`,...
|
|
13
|
+
`}),n}function cu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=VE(e,t),r=n.one(e,void 0),i=DE(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
14
|
+
`},i),s}function QE(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var vs=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=vs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&vs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||vs.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(vs.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},JE=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Li(JE);function Xa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function e1(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?t1(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function t1(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:n1,dirname:r1,extname:i1,join:s1,sep:"/"};function n1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Di(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function r1(e){if(Di(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function i1(e){Di(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function s1(...e){let t=-1,n;for(;++t<e.length;)Di(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":o1(n)}function o1(e){Di(e);const t=e.codePointAt(0)===47;let n=a1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function a1(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Di(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const l1={cwd:c1};function c1(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function u1(e){if(typeof e=="string")e=new URL(e);else if(!Qa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return d1(e)}function d1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||f1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":l1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=u1(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Qe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function f1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h1=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},p1={}.hasOwnProperty;class Vl extends h1{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=e1()}copy(){const t=new Vl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):p1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=os(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=os(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);b1(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),xu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){Eu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=os(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),xu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=os(n),i=this.compiler||this.Compiler;return ga("stringify",i),Eu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const g1=new Vl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Eu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function os(e){return m1(e)?e:new oh(e)}function m1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function b1(e){return typeof e=="string"||y1(e)}function y1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return _1;if(typeof e=="function")return Zs(e);if(typeof e=="object")return Array.isArray(e)?E1(e):x1(e);if(typeof e=="string")return w1(e);throw new Error("Expected function, string, or object as test")};function E1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Zs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function x1(e){const t=e;return Zs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function w1(e){return Zs(t);function t(n){return n&&n.type===e}}function Zs(e){return t;function t(n,r,i){return!!(v1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _1(){return!0}function v1(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],N1=!0,wu=!1,k1="skip";function A1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=S1(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==k1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const w=y.children[m];if(p=a(w,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function S1(e){return Array.isArray(e)?e:typeof e=="number"?[N1,e]:e==null?lh:[e]}function T1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),A1(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 C1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},O1=/^(https?|ircs?|mailto|xmpp)$/i,R1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=I1(e),n=L1(e);return M1(t.runSync(t.parse(n),n),e)}function I1(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return g1().use(nE).use(n).use(QE,r).use(t)}function L1(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function M1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||D1;for(const u of R1)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+C1+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),T1(e,c),Fb(e,{Fragment:_.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function D1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||O1.test(e.slice(0,t))?e:""}function Nu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function P1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Wl=function(e){if(e==null)return U1;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?B1(e):F1(e);if(typeof e=="string")return $1(e);throw new Error("Expected function, string, or object as test")};function B1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wl(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function F1(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function $1(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(q1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function U1(){return!0}function q1(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],z1=!0,ku=!1,j1="skip";function H1(e,t,n,r){let i;i=t;const s=Wl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=G1(n(l,u)),f[0]===ku))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==j1)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const w=y.children[m];if(p=a(w,m,b)(),p[0]===ku)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function G1(e){return Array.isArray(e)?e:typeof e=="number"?[z1,e]:e==null?uh:[e]}function K1(e,t,n){const i=Wl((n||{}).ignore||[]),s=V1(t);let o=-1;for(;++o<s.length;)H1(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,w=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,O={index:v.index,input:v.input,stack:[...u,c]};let A=f(...v,O);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?h.lastIndex=T+1:(p!==T&&w.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(A)?w.push(...A):A&&w.push(A),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&w.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...w)):w=[c],b+w.length}}function V1(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([W1(i[0]),Y1(i[1])])}return t}function W1(e){return typeof e=="string"?new RegExp(P1(e),"g"):e}function Y1(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function Z1(){return{transforms:[rx],enter:{literalAutolink:Q1,literalAutolinkEmail:Ea,literalAutolinkHttp:Ea,literalAutolinkWww:Ea},exit:{literalAutolink:nx,literalAutolinkEmail:tx,literalAutolinkHttp:J1,literalAutolinkWww:ex}}}function X1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function Q1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ea(e){this.config.enter.autolinkProtocol.call(this,e)}function J1(e){this.config.exit.autolinkProtocol.call(this,e)}function ex(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function tx(e){this.config.exit.autolinkEmail.call(this,e)}function nx(e){this.exit(e)}function rx(e){K1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ix],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sx]],{ignore:["link","linkReference"]})}function ix(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!ox(n)))return!1;const o=ax(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function sx(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ox(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ax(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Nu(e,"(");let s=Nu(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ks(n))&&(!t||n!==47)}fh.peek=mx;function lx(){this.buffer()}function cx(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ux(){this.buffer()}function dx(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hx(e){this.exit(e)}function px(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gx(e){this.exit(e)}function mx(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function bx(){return{enter:{gfmFootnoteCallString:lx,gfmFootnoteCall:cx,gfmFootnoteDefinitionLabelString:ux,gfmFootnoteDefinition:dx},exit:{gfmFootnoteCallString:fx,gfmFootnoteCall:hx,gfmFootnoteDefinitionLabelString:px,gfmFootnoteDefinition:gx}}}function yx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
|
|
15
|
+
`:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:Ex))),c(),l}}function Ex(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const xx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=kx;function wx(){return{canContainEols:["delete"],enter:{strikethrough:vx},exit:{strikethrough:Nx}}}function _x(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xx}],handlers:{delete:ph}}}function vx(e){this.enter({type:"delete",children:[]},e)}function Nx(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function kx(){return"~"}function Ax(e){return e.length}function Sx(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ax,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const w=Tx(e[u][y]);if(n.alignDelimiters!==!1){const v=i(w);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(w)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let w=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(w)+y;n.alignDelimiters!==!1&&(w=b.length+w+y.length,w>l[d]&&(l[d]=w),f[d]=w),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const w=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const O=l[d]-(b[d]||0),A=s[d];A===114?v=" ".repeat(O):A===99?O%2?(v=" ".repeat(O/2+.5),T=" ".repeat(O/2-.5)):(v=" ".repeat(O/2),T=v):T=" ".repeat(O)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&w==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(w),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
|
|
16
|
+
`)}function Tx(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Cx(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Ox);return i(),o}function Ox(e,t,n){return">"+(n?"":" ")+e}function Rx(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
17
|
+
`&&Rx(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
18
|
+
`}function Ix(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function Lx(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Mx(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Dx(e,t,n,r){const i=Mx(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Lx(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,Px);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(Ix(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
|
|
19
|
+
`,encode:["`"],...a.current()})),d()}return u+=a.move(`
|
|
20
|
+
`),s&&(u+=a.move(s+`
|
|
21
|
+
`)),u+=a.move(l),c(),u}function Px(e,t,n){return(n?"":" ")+e}function Yl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Bx(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
22
|
+
`,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function Fx(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ls(e,t,n){const r=Ir(e),i=Ir(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gh.peek=$x;function gh(e,t,n,r){const i=Fx(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ls(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=wi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ls(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+wi(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function $x(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return jx;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?Ux(e):qx(e);if(typeof e=="string")return zx(e);throw new Error("Expected function, string, or object as test")};function Ux(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function qx(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function zx(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(Hx(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jx(){return!0}function Hx(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],Gx=!0,Ja=!1,Kx="skip";function Vx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Wx(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Kx)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const w=y.children[m];if(p=a(w,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Wx(e){return Array.isArray(e)?e:typeof e=="number"?[Gx,e]:e==null?bh:[e]}function Yx(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),Vx(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 Zx={};function yh(e,t){const n=Zx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Eh(e,r,i)}function Eh(e,t,n){if(Xx(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Eh(e[i],t,n);return r.join("")}function Xx(e){return!!(e&&typeof e=="object")}function Qx(e,t){let n=!1;return Yx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function Jx(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Qx(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
|
|
23
23
|
`,after:`
|
|
24
|
-
`});return
|
|
24
|
+
`});return d(),u(),h+`
|
|
25
25
|
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
26
|
-
`))+1))}const o="#".repeat(i),
|
|
27
|
-
`,...
|
|
28
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:
|
|
29
|
-
`))}function s(f,g,p,y){const m=p.enter("tableCell"),b=p.enter("phrasing"),_=p.containerPhrasing(f,{...y,before:a,after:a});return b(),m(),_}function c(f,g){return km(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(f,g,p){const y=f.children;let m=-1;const b=[],_=g.enter("table");for(;++m<y.length;)b[m]=u(y[m],g,p);return _(),b}function u(f,g,p){const y=f.children;let m=-1;const b=[],_=g.enter("tableRow");for(;++m<y.length;)b[m]=s(y[m],f,g,p);return _(),b}function h(f,g,p){let y=xs.inlineCode(f,g,p);return p.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Oy(){return{exit:{taskListCheckValueChecked:Qo,taskListCheckValueUnchecked:Qo,paragraph:Cy}}}function Ty(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ry}}}function Qo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Cy(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 a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;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 Ry(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=xs.listItem(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),s;function c(d){return d+o}}function Iy(){return[Wg(),pm(),bm(),Ey(),Oy()]}function Ly(e){return{extensions:[Vg(),gm(e),vm(),Ny(e),Ty()]}}const My={tokenize:Uy,partial:!0},ws={tokenize:zy,partial:!0},ks={tokenize:qy,partial:!0},Ss={tokenize:$y,partial:!0},Py={tokenize:Hy,partial:!0},As={name:"wwwAutolink",tokenize:Fy,previous:Os},Ns={name:"protocolAutolink",tokenize:jy,previous:Ts},lt={name:"emailAutolink",tokenize:By,previous:Cs},rt={};function Dy(){return{text:rt}}let pt=48;for(;pt<123;)rt[pt]=lt,pt++,pt===58?pt=65:pt===91&&(pt=97);rt[43]=lt;rt[45]=lt;rt[46]=lt;rt[95]=lt;rt[72]=[lt,Ns];rt[104]=[lt,Ns];rt[87]=[lt,As];rt[119]=[lt,As];function By(e,t,n){const r=this;let i,a;return o;function o(u){return!ai(u)||!Cs.call(r,r.previous)||Bi(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(u))}function l(u){return ai(u)?(e.consume(u),l):u===64?(e.consume(u),s):n(u)}function s(u){return u===46?e.check(Py,d,c)(u):u===45||u===95||Pe(u)?(a=!0,e.consume(u),s):d(u)}function c(u){return e.consume(u),i=!0,s}function d(u){return a&&i&&Fe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function Fy(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Os.call(r,r.previous)||Bi(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(My,e.attempt(ws,e.attempt(ks,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jy(e,t,n){const r=this;let i="",a=!1;return o;function o(u){return(u===72||u===104)&&Ts.call(r,r.previous)&&!Bi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),l):n(u)}function l(u){if(Fe(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),l;if(u===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(u),s}return n(u)}function s(u){return u===47?(e.consume(u),a?c:(a=!0,s)):n(u)}function c(u){return u===null||Dn(u)||Ae(u)||_t(u)||Xn(u)?n(u):e.attempt(ws,e.attempt(ks,d),n)(u)}function d(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Uy(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),a):n(o)}function a(o){return o===null?n(o):t(o)}}function zy(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(Ss,s,l)(c):c===null||Ae(c)||_t(c)||c!==45&&Xn(c)?s(c):(a=!0,e.consume(c),o)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function s(c){return i||r||!a?n(c):t(c)}}function qy(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(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(Ss,t,a)(o):o===null||Ae(o)||_t(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function $y(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Ae(l)||_t(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Ae(l)||_t(l)?t(l):r(l)}function a(l){return Fe(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Fe(l)?(e.consume(l),o):n(l)}}function Hy(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Pe(a)?n(a):t(a)}}function Os(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ae(e)}function Ts(e){return!Fe(e)}function Cs(e){return!(e===47||ai(e))}function ai(e){return e===43||e===45||e===46||e===95||Pe(e)}function Bi(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 Gy={tokenize:Jy,partial:!0};function Ky(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Zy,continuation:{tokenize:Xy},exit:Qy}},text:{91:{name:"gfmFootnoteCall",tokenize:Yy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wy,resolveTo:Vy}}}}function Wy(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){o=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return l;function l(s){if(!o||!o._balanced)return n(s);const c=Ye(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Vy(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Yy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),s}function s(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(a>999||u===93&&!o||u===null||u===91||Ae(u))return n(u);if(u===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ye(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return Ae(u)||(o=!0),a++,e.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(e.consume(u),a++,c):c(u)}}function Zy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(o>999||g===93&&!l||g===null||g===91||Ae(g))return n(g);if(g===93){e.exit("chunkString");const p=e.exit("gfmFootnoteDefinitionLabelString");return a=Ye(r.sliceSerialize(p)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ae(g)||(l=!0),o++,e.consume(g),g===92?u:d}function u(g){return g===91||g===92||g===93?(e.consume(g),o++,d):d(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),xe(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function Xy(e,t,n){return e.check(hn,t,e.attempt(Gy,t,n))}function Qy(e){e.exit("gfmFootnoteDefinition")}function Jy(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function eb(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let c=s;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[s][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[s][1].end)},u={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[s][1].start)},h=[["enter",d,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",u,l]],f=l.parser.constructs.insideSpan.null;f&&Ge(h,h.length,0,Qn(f,o.slice(c+1,s),l)),Ge(h,h.length,0,[["exit",u,l],["enter",o[s][1],l],["exit",o[s][1],l],["exit",d,l]]),Ge(o,c-1,s-c+3,h),s=c+h.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function a(o,l,s){const c=this.previous,d=this.events;let u=0;return h;function h(g){return c===126&&d[d.length-1][1].type!=="characterEscape"?s(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const p=Mt(c);if(g===126)return u>1?s(g):(o.consume(g),u++,f);if(u<2&&!n)return s(g);const y=o.exit("strikethroughSequenceTemporary"),m=Mt(g);return y._open=!m||m===2&&!!p,y._close=!p||p===2&&!!m,l(g)}}}class tb{constructor(){this.map=[]}add(t,n,r){nb(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[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 a of i)t.push(a);i=r.pop()}this.map.length=0}}function nb(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 rb(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 a=r.length-1;r[a]=r[a]==="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 ib(){return{flow:{null:{name:"table",tokenize:ob,resolveAll:ab}}}}function ob(e,t,n){const r=this;let i=0,a=0,o;return l;function l(x){let w=r.events.length-1;for(;w>-1;){const L=r.events[w][1].type;if(L==="lineEnding"||L==="linePrefix")w--;else break}const S=w>-1?r.events[w][1].type:null,I=S==="tableHead"||S==="tableRow"?k:s;return I===k&&r.parser.lazy[r.now().line]?n(x):I(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),c(x)}function c(x){return x===124||(o=!0,a+=1),d(x)}function d(x){return x===null?n(x):se(x)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):n(x):Ee(x)?xe(e,d,"whitespace")(x):(a+=1,o&&(o=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),u(x)))}function u(x){return x===null||x===124||Ae(x)?(e.exit("data"),d(x)):(e.consume(x),x===92?h:u)}function h(x){return x===92||x===124?(e.consume(x),u):u(x)}function f(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),o=!1,Ee(x)?xe(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?y(x):x===124?(o=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),p):E(x)}function p(x){return Ee(x)?xe(e,y,"whitespace")(x):y(x)}function y(x){return x===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),m):x===45?(a+=1,m(x)):x===null||se(x)?v(x):E(x)}function m(x){return x===45?(e.enter("tableDelimiterFiller"),b(x)):E(x)}function b(x){return x===45?(e.consume(x),b):x===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(x))}function _(x){return Ee(x)?xe(e,v,"whitespace")(x):v(x)}function v(x){return x===124?g(x):x===null||se(x)?!o||i!==a?E(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):E(x)}function E(x){return n(x)}function k(x){return e.enter("tableRow"),O(x)}function O(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),O):x===null||se(x)?(e.exit("tableRow"),t(x)):Ee(x)?xe(e,O,"whitespace")(x):(e.enter("data"),T(x))}function T(x){return x===null||x===124||Ae(x)?(e.exit("data"),O(x)):(e.consume(x),x===92?R:T)}function R(x){return x===92||x===124?(e.consume(x),T):T(x)}}function ab(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,s=0,c,d,u;const h=new tb;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(l=!1,s!==0&&(Jo(h,t,s,c,d),d=void 0,s=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,u=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],u=xn(h,t,a,i,void 0,u),a=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],u=xn(h,t,a,i,void 0,u)),a=o,o=[a[1],n,0,0])):g.type==="tableHead"?(l=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,a[1]!==0?(o[0]=o[1],u=xn(h,t,a,i,n,u)):o[1]!==0&&(u=xn(h,t,o,i,n,u)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&Jo(h,t,s,c,d),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=rb(t.events,n))}return e}function xn(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Tt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=Tt(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Tt(t.events,n[2]),d=Tt(t.events,n[3]),u={type:l,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",u,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 g=n[2]+1,p=n[3]-n[2]-1;e.add(g,p,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(a.end=Object.assign({},Tt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Jo(e,t,n,r,i){const a=[],o=Tt(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Tt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lb={name:"tasklistCheck",tokenize:cb};function sb(){return{text:{91:lb}}}function cb(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),a)}function a(s){return Ae(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(s)}function l(s){return se(s)?t(s):Ee(s)?e.check({tokenize:ub},t,n)(s):n(s)}}function ub(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fb(e){return Rl([Dy(),Ky(),eb(e),ib(),sb()])}const db={};function Rs(e){const t=this,n=e||db,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fb(n)),a.push(Iy()),o.push(Ly(n))}const Is=function(e){if(e==null)return mb;if(typeof e=="function")return or(e);if(typeof e=="object")return Array.isArray(e)?hb(e):pb(e);if(typeof e=="string")return gb(e);throw new Error("Expected function, string, or object as test")};function hb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Is(e[n]);return or(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function pb(e){const t=e;return or(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function gb(e){return or(t);function t(n){return n&&n.type===e}}function or(e){return t;function t(n,r,i){return!!(yb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mb(){return!0}function yb(e){return e!==null&&typeof e=="object"&&"type"in e}const ea=function(e,t,n){const r=Is(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]},wt=function(e){if(e==null)return _b;if(typeof e=="string")return vb(e);if(typeof e=="object")return bb(e);if(typeof e=="function")return Fi(e);throw new Error("Expected function, string, or array as `test`")};function bb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wt(e[n]);return Fi(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function vb(e){return Fi(t);function t(n){return n.tagName===e}}function Fi(e){return t;function t(n,r,i){return!!(Eb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function _b(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Eb(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const ta=/\n/g,na=/[\t ]+/g,li=wt("br"),ra=wt(Tb),xb=wt("p"),ia=wt("tr"),wb=wt(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Ob,Cb]),Ls=wt(["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 kb(e,t){const n=t||{},r="children"in e?e.children:[],i=Ls(e),a=Ds(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...Ps(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<r.length;)o.push(...Ms(r[l],e,{whitespace:a,breakBefore:l?void 0:i,breakAfter:l<r.length-1?li(r[l+1]):i}));const s=[];let c;for(l=-1;++l<o.length;){const d=o[l];typeof d=="number"?c!==void 0&&d>c&&(c=d):d&&(c!==void 0&&c>-1&&s.push(`
|
|
30
|
-
`.repeat(c)||" "),c=-1,
|
|
31
|
-
`:xb(e)?(l=2,s=2):Ls(e)&&(l=1,s=1);++a<i.length;)o=o.concat(Ms(i[a],e,{whitespace:r,breakBefore:a?void 0:l,breakAfter:a<i.length-1?li(i[a+1]):s}));return ra(e)&&ea(t,e,ra)&&o.push(" "),l&&o.unshift(l),s&&o.push(s),o}function Ps(e,t){const n=String(e.value),r=[],i=[];let a=0;for(;a<=n.length;){ta.lastIndex=a;const s=ta.exec(n),c=s&&"index"in s?s.index:n.length;r.push(Nb(n.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),a=c+1}let o=-1,l;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]),l=void 0):r[o]?(typeof l=="number"&&i.push(l),i.push(r[o]),l=0):(o===0||o===r.length-1)&&i.push(0);return i}function Ab(e){return[String(e.value)]}function Nb(e,t,n){const r=[];let i=0,a;for(;i<e.length;){na.lastIndex=i;const o=na.exec(e);a=o?o.index:e.length,!i&&!a&&o&&!t&&r.push(""),i!==a&&r.push(e.slice(i,a)),i=o?a+o[0].length:a}return i!==a&&!n&&r.push(""),r.join(" ")}function Ds(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 Ob(e){return!!(e.properties||{}).hidden}function Tb(e){return e.tagName==="td"||e.tagName==="th"}function Cb(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Rb(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("<[^<>]+>")+")",l={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})"/})]},d={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},u={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*\\(",g=["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"],p=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["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"],m=["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"],v={type:p,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},E={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[E,u,l,n,e.C_BLOCK_COMMENT_MODE,d,c],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:k.concat([{begin:/\(/,end:/\)/,keywords:v,contains:k.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(O,T,E,k,[u,{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:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Ib(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=Rb(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 Lb(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]},a=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"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(l);const s={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},u={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}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},p=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],m={match:/(\/[a-z._-]+)+/},b=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],v=["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"],E=["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:p,literal:y,built_in:[...b,..._,"set","shopt",...v,...E]},contains:[f,e.SHEBANG(),g,u,a,o,m,l,s,c,d,n]}}function Mb(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("<[^<>]+>")+")",l={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})"/})]},d={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},u={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*\\(",y={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"},m=[u,l,n,e.C_BLOCK_COMMENT_MODE,d,c],b={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:m.concat([{begin:/\(/,end:/\)/,keywords:y,contains:m.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:y,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(b,_,m,[u,{begin:e.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:u,strings:c,keywords:y}}}function Pb(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("<[^<>]+>")+")",l={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})"/})]},d={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},u={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*\\(",g=["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"],p=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["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"],m=["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"],v={type:p,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},E={className:"function.dispatch",relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[E,u,l,n,e.C_BLOCK_COMMENT_MODE,d,c],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:k.concat([{begin:/\(/,end:/\)/,keywords:v,contains:k.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:v,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:v,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(O,T,E,k,[u,{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:v,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:v},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Db(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"],a=["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(a),built_in:t,literal:r},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),s={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},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},u=e.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(h,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},p={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},y=e.inherit(p,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[p,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,e.C_BLOCK_COMMENT_MODE],f.contains=[y,g,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const m={variants:[c,p,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",v={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"}},m,s,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,b],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[m,s,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}const Bb=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_-]*/}}),Fb=["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"],jb=["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"],Ub=[...Fb,...jb],zb=["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(),qb=["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(),$b=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Hb=["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 Gb(e){const t=e.regex,n=Bb(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",a=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",l=[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:":("+qb.join("|")+")"},{begin:":(:)?("+$b.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Hb.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:zb.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ub.join("|")+")\\b"}]}}function Kb(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 Wb(e){const a={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:a,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:a,illegal:/["']/}]}]}}function Vb(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 Yb(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:/\$\{(.*?)\}/}]},a={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:"'"}]},l={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,"self"],relevance:0},s=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,d=/'[^']*'/,u=t.either(s,c,d),h=t.concat(u,"(\\s*\\.\\s*",u,")*",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,l,a,i,o,n]}}]}}var Ct="[0-9](_*[0-9])*",wn=`\\.(${Ct})`,kn="[0-9a-fA-F](_*[0-9a-fA-F])*",oa={className:"number",variants:[{begin:`(\\b(${Ct})((${wn})|\\.)?|(${wn}))[eE][+-]?(${Ct})[fFdD]?\\b`},{begin:`\\b(${Ct})((${wn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wn})[fFdD]?\\b`},{begin:`\\b(${Ct})[fFdD]\\b`},{begin:`\\b0[xX]((${kn})\\.?|(${kn})?\\.(${kn}))[pP][+-]?(${Ct})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${kn})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Bs(e,t,n){return n===-1?"":e.replace(t,r=>Bs(e,t,n-1))}function Zb(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Bs("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),s={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"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:s,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:s,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:[d,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:s,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:s,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,oa,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},oa,c]}}const aa="[A-Za-z$_][0-9A-Za-z$_]*",Xb=["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"],Qb=["true","false","null","undefined","NaN","Infinity"],Fs=["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"],js=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Us=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Jb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ev=[].concat(Us,Fs,js);function tv(e){const t=e.regex,n=(G,{after:U})=>{const A="</"+G[0].slice(1);return G.input.indexOf(A,U)!==-1},r=aa,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,U)=>{const A=G[0].length+G.index,C=G.input[A];if(C==="<"||C===","){U.ignoreMatch();return}C===">"&&(n(G,{after:A})||U.ignoreMatch());let P;const N=G.input.substring(A);if(P=N.match(/^\s*=/)){U.ignoreMatch();return}if((P=N.match(/^\s+extends\s+/))&&P.index===0){U.ignoreMatch();return}}},l={$pattern:aa,keyword:Xb,literal:Qb,built_in:ev,"variable.language":Jb},s="[0-9](_?[0-9])*",c=`\\.(${s})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${s})\\b`},{begin:`\\b(${d})\\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:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},b={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,p,y,{match:/\$\d+/},u];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(_)});const v=[].concat(b,h.contains),E=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:E},O={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"}}]},T={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:{_:[...Fs,...js]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},x={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},w={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function S(G){return t.concat("(?!",G.join("|"),")")}const I={match:t.concat(/\b/,S([...Us,"super","import"].map(G=>`${G}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},B={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,p,y,b,{match:/\$\d+/},u,T,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,e.REGEXP_MODE,{className:"function",begin:M,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:l,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[k,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},I,w,O,B,{match:/\$[(.]/}]}}function nv(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 Rt="[0-9](_*[0-9])*",Sn=`\\.(${Rt})`,An="[0-9a-fA-F](_*[0-9a-fA-F])*",rv={className:"number",variants:[{begin:`(\\b(${Rt})((${Sn})|\\.)?|(${Sn}))[eE][+-]?(${Rt})[fFdD]?\\b`},{begin:`\\b(${Rt})((${Sn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Sn})[fFdD]?\\b`},{begin:`\\b(${Rt})[fFdD]\\b`},{begin:`\\b0[xX]((${An})\\.?|(${An})?\\.(${An}))[pP][+-]?(${Rt})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${An})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function iv(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]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},s={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=rv,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=u;return h.variants[1].contains=[u],u.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,d,n,r,l,s,{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:[u,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,s,o,e.C_NUMBER_MODE]},d]},{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},l,s]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
32
|
-
`},c]}}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_-]*/}}),av=["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"],lv=["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"],sv=[...av,...lv],cv=["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(),zs=["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(),qs=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),uv=["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(),fv=zs.concat(qs).sort().reverse();function dv(e){const t=ov(e),n=fv,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",o=[],l=[],s=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},c=function(_,v,E){return{className:_,begin:v,relevance:E}},d={$pattern:/[a-z-]+/,keyword:r,attribute:cv.join(" ")},u={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s("'"),s('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,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=l.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},g={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+uv.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},p={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},y={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,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("+sv.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",a,0),c("selector-id","#"+a),c("selector-class","\\."+a,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+zs.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+qs.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[m]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,y,b,g,m,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function hv(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 pv(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*(?=[:+?]?=)"},a={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,a,o]}}function gv(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}]},a={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}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),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}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),h=e.inherit(d,{contains:[]});c.contains.push(h),d.contains.push(u);let f=[n,s];return[c,d,u,h].forEach(m=>{m.contains=m.contains.concat(f)}),f=f.concat(c,d),{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,a,c,d,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,s,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function mv(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_]*/,l={"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"]},s={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,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:"("+s.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:s,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function yv(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(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},s={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},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},d=[e.BACKSLASH_ESCAPE,a,s],u=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(p,y,m="\\1")=>{const b=m==="\\1"?m:t.concat(m,y);return t.concat(t.concat("(?:",p,")"),y,/(?:\\.|[^\\\/])*?/,b,/(?:\\.|[^\\\/])*?/,m,r)},f=(p,y,m)=>t.concat(t.concat("(?:",p,")"),y,/(?:\\.|[^\\\/])*?/,m,r),g=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,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(...u,{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(...u,{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,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=g,o.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:g}}function bv(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),a=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),u={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s),"on:begin":(L,B)=>{B.data._beginMatch=L[1]||L[2]},"on:end":(L,B)=>{B.data._beginMatch!==L[1]&&B.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
|
|
33
|
-
]`,g={scope:"string",variants:[d,c,u,h]},p={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},y=["false","null","true"],m=["__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"],b=["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"],v={keyword:m,literal:(L=>{const B=[];return L.forEach(M=>{B.push(M),M.toLowerCase()===M?B.push(M.toUpperCase()):B.push(M.toLowerCase())}),B})(y),built_in:b},E=L=>L.map(B=>B.replace(/\|\d+$/,"")),k={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",E(b).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},O=t.concat(r,"\\b(?!\\()"),T={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),O],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),O],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"}}]},R={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:v,contains:[R,o,T,e.C_BLOCK_COMMENT_MODE,g,p,k]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",E(m).join("\\b|"),"|",E(b).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const S=[R,T,e.C_BLOCK_COMMENT_MODE,g,p,k],I={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:y,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:y,keyword:["new","array"]},contains:["self",...S]},...S,{scope:"meta",variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:v,contains:[I,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}]}},l,{scope:"variable.language",match:/\$this\b/},o,w,T,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},k,{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:v,contains:["self",I,o,T,e.C_BLOCK_COMMENT_MODE,g,p]}]},{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]},g,p]}}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 _v(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Ev(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"],l={$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"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,d,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,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",f=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,g=`\\b|${r.join("|")}`,p={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${f}))[eE][+-]?(${h})[jJ]?(?=${g})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${h})[jJ](?=${g})`}]},y={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",s,p,u,e.HASH_COMMENT_MODE]}]};return c.contains=[u,p,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[s,p,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},u,y,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{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:[p,m,u]}]}}function xv(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function wv(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=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=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:[a,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:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function kv(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"]},l={className:"doctag",begin:"@[A-Za-z]+"},s={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,d],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,d]})]}]},h="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",g={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"}]},p={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},k=[u,{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:[p]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},g,{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,d],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(s,c),relevance:0}].concat(s,c);d.contains=k,p.contains=k;const x=[{begin:/^\s*=>/,starts:{end:"$",contains:k}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:k}}];return c.unshift(s),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(x).concat(c).concat(k)}}function Sv(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={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))?",l=["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"],s=["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!"],d=["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:d,keyword:l,literal:s,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:d}},{className:"punctuation",begin:"->"},a]}}const Av=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_-]*/}}),Nv=["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"],Ov=["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"],Tv=[...Nv,...Ov],Cv=["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(),Rv=["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(),Iv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Lv=["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 Mv(e){const t=Av(e),n=Iv,r=Rv,i="@[a-z-]+",a="and or not only",l={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("+Tv.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Lv.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,l,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:a,attribute:Cv.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function Pv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Dv(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],l=["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"],s=["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"],d=["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"],u=["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=d,g=[...c,...s].filter(E=>!d.includes(E)),p={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},m={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function b(E){return t.concat(/\b/,t.either(...E.map(k=>k.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:b(h),relevance:0};function v(E,{exceptions:k,when:O}={}){const T=O;return k=k||[],E.map(R=>R.match(/\|\d+$/)||k.includes(R)?R:T(R)?`${R}|0`:R)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:v(g,{when:E=>E.length<3}),literal:a,type:l,built_in:u},contains:[{scope:"type",match:b(o)},_,m,p,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,y]}}function $s(e){return e?typeof e=="string"?e:e.source:null}function Qt(e){return Se("(?=",e,")")}function Se(...e){return e.map(n=>$s(n)).join("")}function Bv(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Be(...e){return"("+(Bv(e).capture?"":"?:")+e.map(r=>$s(r)).join("|")+")"}const ji=e=>Se(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Fv=["Protocol","Type"].map(ji),la=["init","self"].map(ji),jv=["Any","Self"],Br=["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"],sa=["false","nil","true"],Uv=["assignment","associativity","higherThan","left","lowerThan","none","right"],zv=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],ca=["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"],Hs=Be(/[/=\-+!*%<>&|^~?]/,/[\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]/),Gs=Be(Hs,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Fr=Se(Hs,Gs,"*"),Ks=Be(/[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]/),Un=Be(Ks,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),tt=Se(Ks,Un,"*"),Nn=Se(/[A-Z]/,Un,"*"),qv=["attached","autoclosure",Se(/convention\(/,Be("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Se(/objc\(/,tt,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],$v=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Hv(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Be(...Fv,...la)],className:{2:"keyword"}},a={match:Se(/\./,Be(...Br)),relevance:0},o=Br.filter(de=>typeof de=="string").concat(["_|0"]),l=Br.filter(de=>typeof de!="string").concat(jv).map(ji),s={variants:[{className:"keyword",match:Be(...l,...la)}]},c={$pattern:Be(/\b\w+/,/#\w+/),keyword:o.concat(zv),literal:sa},d=[i,a,s],u={match:Se(/\./,Be(...ca)),relevance:0},h={className:"built_in",match:Se(/\b/,Be(...ca),/(?=\()/)},f=[u,h],g={match:/->/,relevance:0},p={className:"operator",relevance:0,variants:[{match:Fr},{match:`\\.(\\.|${Gs})+`}]},y=[g,p],m="([0-9]_*)+",b="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${m})(\\.(${m}))?([eE][+-]?(${m}))?\\b`},{match:`\\b0x(${b})(\\.(${b}))?([pP][+-]?(${m}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},v=(de="")=>({className:"subst",variants:[{match:Se(/\\/,de,/[0\\tnr"']/)},{match:Se(/\\/,de,/u\{[0-9a-fA-F]{1,8}\}/)}]}),E=(de="")=>({className:"subst",match:Se(/\\/,de,/[\t ]*(?:[\r\n]|\r\n)/)}),k=(de="")=>({className:"subst",label:"interpol",begin:Se(/\\/,de,/\(/),end:/\)/}),O=(de="")=>({begin:Se(de,/"""/),end:Se(/"""/,de),contains:[v(de),E(de),k(de)]}),T=(de="")=>({begin:Se(de,/"/),end:Se(/"/,de),contains:[v(de),k(de)]}),R={className:"string",variants:[O(),O("#"),O("##"),O("###"),T(),T("#"),T("##"),T("###")]},x=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],w={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:x},S=de=>{const we=Se(de,/\//),K=Se(/\//,de);return{begin:we,end:K,contains:[...x,{scope:"comment",begin:`#(?!.*${K})`,end:/$/}]}},I={scope:"regexp",variants:[S("###"),S("##"),S("#"),w]},L={match:Se(/`/,tt,/`/)},B={className:"variable",match:/\$\d+/},M={className:"variable",match:`\\$${Un}+`},F=[L,B,M],G={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:$v,contains:[...y,_,R]}]}},U={scope:"keyword",match:Se(/@/,Be(...qv),Qt(Be(/\(/,/\s+/)))},A={scope:"meta",match:Se(/@/,tt)},C=[G,U,A],P={match:Qt(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Se(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Un,"+")},{className:"type",match:Nn,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Se(/\s+&\s+/,Qt(Nn)),relevance:0}]},N={begin:/</,end:/>/,keywords:c,contains:[...r,...d,...C,g,P]};P.contains.push(N);const H={match:Se(tt,/\s*:/),keywords:"_|0",relevance:0},$={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",H,...r,I,...d,...f,...y,_,R,...F,...C,P]},D={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,P]},q={begin:Be(Qt(Se(tt,/\s*:/)),Qt(Se(tt,/\s+/,tt,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:tt}]},W={begin:/\(/,end:/\)/,keywords:c,contains:[q,...r,...d,...y,_,R,...C,P,$],endsParent:!0,illegal:/["']/},V={match:[/(func|macro)/,/\s+/,Be(L.match,tt,Fr)],className:{1:"keyword",3:"title.function"},contains:[D,W,t],illegal:[/\[/,/%/]},Q={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[D,W,t],illegal:/\[|%/},ie={match:[/operator/,/\s+/,Fr],className:{1:"keyword",3:"title"}},ce={begin:[/precedencegroup/,/\s+/,Nn],className:{1:"keyword",3:"title"},contains:[P],keywords:[...Uv,...sa],end:/}/},ue={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},me={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},he={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,tt,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[D,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Nn},...d],relevance:0}]};for(const de of R.variants){const we=de.contains.find(X=>X.label==="interpol");we.keywords=c;const K=[...d,...f,...y,_,R,...F];we.contains=[...K,{begin:/\(/,end:/\)/,contains:["self",...K]}]}return{name:"Swift",keywords:c,contains:[...r,V,Q,ue,me,he,ie,ce,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},I,...d,...f,...y,_,R,...F,...C,P,$]}}const zn="[A-Za-z$_][0-9A-Za-z$_]*",Ws=["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"],Vs=["true","false","null","undefined","NaN","Infinity"],Ys=["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"],Zs=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Xs=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Qs=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Js=[].concat(Xs,Ys,Zs);function Gv(e){const t=e.regex,n=(G,{after:U})=>{const A="</"+G[0].slice(1);return G.input.indexOf(A,U)!==-1},r=zn,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,U)=>{const A=G[0].length+G.index,C=G.input[A];if(C==="<"||C===","){U.ignoreMatch();return}C===">"&&(n(G,{after:A})||U.ignoreMatch());let P;const N=G.input.substring(A);if(P=N.match(/^\s*=/)){U.ignoreMatch();return}if((P=N.match(/^\s+extends\s+/))&&P.index===0){U.ignoreMatch();return}}},l={$pattern:zn,keyword:Ws,literal:Vs,built_in:Js,"variable.language":Qs},s="[0-9](_?[0-9])*",c=`\\.(${s})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${s})\\b`},{begin:`\\b(${d})\\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:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},b={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,p,y,{match:/\$\d+/},u];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(_)});const v=[].concat(b,h.contains),E=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(v)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:E},O={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"}}]},T={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:{_:[...Ys,...Zs]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},x={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},w={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function S(G){return t.concat("(?!",G.join("|"),")")}const I={match:t.concat(/\b/,S([...Xs,"super","import"].map(G=>`${G}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},L={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},B={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,p,y,b,{match:/\$\d+/},u,T,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,e.REGEXP_MODE,{className:"function",begin:M,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:l,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},x,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[k,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},L,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},I,w,O,B,{match:/\$[(.]/}]}}function Kv(e){const t=e.regex,n=Gv(e),r=zn,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={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]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},s=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:zn,keyword:Ws.concat(s),literal:Vs,built_in:Js.concat(i),"variable.language":Qs},d={className:"meta",begin:"@"+r},u=(p,y,m)=>{const b=p.contains.findIndex(_=>_.label===y);if(b===-1)throw new Error("can not find mode to replace");p.contains.splice(b,1,m)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(d);const h=n.contains.find(p=>p.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([d,a,o,f]),u(n,"shebang",e.SHEBANG()),u(n,"use_strict",l);const g=n.contains.find(p=>p.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Wv(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}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,l),/ *#/)}]},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])|[%&])?/}]},d={className:"label",begin:/^\w+:/},u=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,s,c,d,u,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 Vv(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"}},a={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={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/},s={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"}},a,o,i,e.QUOTE_STRING_MODE,s,c,l]}}function Yv(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]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=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:[a,s,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,s,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{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 Zv(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:/\}/}]},a={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]},l=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},g={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},p={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},y=[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},g,p,a,o],m=[...y];return m.pop(),m.push(l),f.contains=m,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}const Xv={arduino:Ib,bash:Lb,c:Mb,cpp:Pb,csharp:Db,css:Gb,diff:Kb,go:Wb,graphql:Vb,ini:Yb,java:Zb,javascript:tv,json:nv,kotlin:iv,less:dv,lua:hv,makefile:pv,markdown:gv,objectivec:mv,perl:yv,php:bv,"php-template":vv,plaintext:_v,python:Ev,"python-repl":xv,r:wv,ruby:kv,rust:Sv,scss:Mv,shell:Pv,sql:Dv,swift:Hv,typescript:Kv,vbnet:Wv,wasm:Vv,xml:Yv,yaml:Zv};function ec(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)&&ec(n)}),e}class ua{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function tc(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function dt(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 Qv="</span>",fa=e=>!!e.scope,Jv=(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 e0{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=tc(t)}openNode(t){if(!fa(t))return;const n=Jv(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){fa(t)&&(this.buffer+=Qv)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const da=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Ui{constructor(){this.rootNode=da(),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=da({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=>{Ui._collapse(n)}))}}class t0 extends Ui{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 e0(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function un(e){return e?typeof e=="string"?e:e.source:null}function nc(e){return kt("(?=",e,")")}function n0(e){return kt("(?:",e,")*")}function r0(e){return kt("(?:",e,")?")}function kt(...e){return e.map(n=>un(n)).join("")}function i0(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function zi(...e){return"("+(i0(e).capture?"":"?:")+e.map(r=>un(r)).join("|")+")"}function rc(e){return new RegExp(e.toString()+"|").exec("").length-1}function o0(e,t){const n=e&&e.exec(t);return n&&n.index===0}const a0=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function qi(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=un(r),o="";for(;a.length>0;){const l=a0.exec(a);if(!l){o+=a;break}o+=a.substring(0,l.index),a=a.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?o+="\\"+String(Number(l[1])+i):(o+=l[0],l[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const l0=/\b\B/,ic="[a-zA-Z]\\w*",$i="[a-zA-Z_]\\w*",oc="\\b\\d+(\\.\\d+)?",ac="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",lc="\\b(0b[01]+)",s0="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",c0=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=kt(t,/.*\b/,e.binary,/\b.*/)),dt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},fn={begin:"\\\\[\\s\\S]",relevance:0},u0={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[fn]},f0={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[fn]},d0={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/},ar=function(e,t,n={}){const r=dt({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=zi("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:kt(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},h0=ar("//","$"),p0=ar("/\\*","\\*/"),g0=ar("#","$"),m0={scope:"number",begin:oc,relevance:0},y0={scope:"number",begin:ac,relevance:0},b0={scope:"number",begin:lc,relevance:0},v0={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[fn,{begin:/\[/,end:/\]/,relevance:0,contains:[fn]}]},_0={scope:"title",begin:ic,relevance:0},E0={scope:"title",begin:$i,relevance:0},x0={begin:"\\.\\s*"+$i,relevance:0},w0=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 On=Object.freeze({__proto__:null,APOS_STRING_MODE:u0,BACKSLASH_ESCAPE:fn,BINARY_NUMBER_MODE:b0,BINARY_NUMBER_RE:lc,COMMENT:ar,C_BLOCK_COMMENT_MODE:p0,C_LINE_COMMENT_MODE:h0,C_NUMBER_MODE:y0,C_NUMBER_RE:ac,END_SAME_AS_BEGIN:w0,HASH_COMMENT_MODE:g0,IDENT_RE:ic,MATCH_NOTHING_RE:l0,METHOD_GUARD:x0,NUMBER_MODE:m0,NUMBER_RE:oc,PHRASAL_WORDS_MODE:d0,QUOTE_STRING_MODE:f0,REGEXP_MODE:v0,RE_STARTERS_RE:s0,SHEBANG:c0,TITLE_MODE:_0,UNDERSCORE_IDENT_RE:$i,UNDERSCORE_TITLE_MODE:E0});function k0(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function S0(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function A0(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=k0,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function N0(e,t){Array.isArray(e.illegal)&&(e.illegal=zi(...e.illegal))}function O0(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 T0(e,t){e.relevance===void 0&&(e.relevance=1)}const C0=(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=kt(n.beforeMatch,nc(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},R0=["of","and","for","in","not","or","if","then","parent","list","value"],I0="keyword";function sc(e,t,n=I0){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(a){Object.assign(r,sc(e[a],t,a))}),r;function i(a,o){t&&(o=o.map(l=>l.toLowerCase())),o.forEach(function(l){const s=l.split("|");r[s[0]]=[a,L0(s[0],s[1])]})}}function L0(e,t){return t?Number(t):M0(e)?0:1}function M0(e){return R0.includes(e.toLowerCase())}const ha={},bt=e=>{console.error(e)},pa=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Ot=(e,t)=>{ha[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ha[`${e}/${t}`]=!0)},qn=new Error;function cc(e,t,{key:n}){let r=0;const i=e[n],a={},o={};for(let l=1;l<=t.length;l++)o[l+r]=i[l],a[l+r]=!0,r+=rc(t[l-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function P0(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw bt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),qn;if(typeof e.beginScope!="object"||e.beginScope===null)throw bt("beginScope must be object"),qn;cc(e,e.begin,{key:"beginScope"}),e.begin=qi(e.begin,{joinWith:""})}}function D0(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw bt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),qn;if(typeof e.endScope!="object"||e.endScope===null)throw bt("endScope must be object"),qn;cc(e,e.end,{key:"endScope"}),e.end=qi(e.end,{joinWith:""})}}function B0(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function F0(e){B0(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),P0(e),D0(e)}function j0(e){function t(o,l){return new RegExp(un(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,s){s.position=this.position++,this.matchIndexes[this.matchAt]=s,this.regexes.push([s,l]),this.matchAt+=rc(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(s=>s[1]);this.matcherRe=t(qi(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const s=this.matcherRe.exec(l);if(!s)return null;const c=s.findIndex((u,h)=>h>0&&u!==void 0),d=this.matchIndexes[c];return s.splice(0,c),Object.assign(s,d)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const s=new n;return this.rules.slice(l).forEach(([c,d])=>s.addRule(c,d)),s.compile(),this.multiRegexes[l]=s,s}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,s){this.rules.push([l,s]),s.type==="begin"&&this.count++}exec(l){const s=this.getMatcher(this.regexIndex);s.lastIndex=this.lastIndex;let c=s.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const l=new r;return o.contains.forEach(s=>l.addRule(s.begin,{rule:s,type:"begin"})),o.terminatorEnd&&l.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&l.addRule(o.illegal,{type:"illegal"}),l}function a(o,l){const s=o;if(o.isCompiled)return s;[S0,O0,F0,C0].forEach(d=>d(o,l)),e.compilerExtensions.forEach(d=>d(o,l)),o.__beforeBegin=null,[A0,N0,T0].forEach(d=>d(o,l)),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=sc(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(c,!0),l&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=un(s.end)||"",o.endsWithParent&&l.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+l.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return U0(d==="self"?o:d)})),o.contains.forEach(function(d){a(d,s)}),o.starts&&a(o.starts,l),s.matcher=i(s),s}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=dt(e.classNameAliases||{}),a(e)}function uc(e){return e?e.endsWithParent||uc(e.starts):!1}function U0(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return dt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:uc(e)?dt(e,{starts:e.starts?dt(e.starts):null}):Object.isFrozen(e)?dt(e):e}var z0="11.11.1";class q0 extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const jr=tc,ga=dt,ma=Symbol("nomatch"),$0=7,fc=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:t0};function s(M){return l.noHighlightRe.test(M)}function c(M){let F=M.className+" ";F+=M.parentNode?M.parentNode.className:"";const G=l.languageDetectRe.exec(F);if(G){const U=T(G[1]);return U||(pa(a.replace("{}",G[1])),pa("Falling back to no-highlight mode for this block.",M)),U?G[1]:"no-highlight"}return F.split(/\s+/).find(U=>s(U)||T(U))}function d(M,F,G){let U="",A="";typeof F=="object"?(U=M,G=F.ignoreIllegals,A=F.language):(Ot("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ot("10.7.0",`Please use highlight(code, options) instead.
|
|
34
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
35
|
-
`,1;if(pe>1e5&&pe>Y.index*3)throw new Error("potential infinite loop, way more iterations than matches");return te+=J,J.length}const he=T(M);if(!he)throw bt(a.replace("{}",M)),new Error('Unknown language: "'+M+'"');const de=j0(he);let we="",K=U||de;const X={},ne=new l.__emitter(l);ce();let te="",ee=0,fe=0,pe=0,ge=!1;try{if(he.__emitTokens)he.__emitTokens(F,ne);else{for(K.matcher.considerAll();;){pe++,ge?ge=!1:K.matcher.considerAll(),K.matcher.lastIndex=fe;const z=K.matcher.exec(F);if(!z)break;const Y=F.substring(fe,z.index),J=me(Y,z);fe=z.index+J}me(F.substring(fe))}return ne.finalize(),we=ne.toHTML(),{language:M,value:we,relevance:ee,illegal:!1,_emitter:ne,_top:K}}catch(z){if(z.message&&z.message.includes("Illegal"))return{language:M,value:jr(F),illegal:!0,relevance:0,_illegalBy:{message:z.message,index:fe,context:F.slice(fe-100,fe+100),mode:z.mode,resultSoFar:we},_emitter:ne};if(i)return{language:M,value:jr(F),illegal:!1,relevance:0,errorRaised:z,_emitter:ne,_top:K};throw z}}function h(M){const F={value:jr(M),illegal:!1,relevance:0,_top:o,_emitter:new l.__emitter(l)};return F._emitter.addText(M),F}function f(M,F){F=F||l.languages||Object.keys(t);const G=h(M),U=F.filter(T).filter(x).map(H=>u(H,M,!1));U.unshift(G);const A=U.sort((H,$)=>{if(H.relevance!==$.relevance)return $.relevance-H.relevance;if(H.language&&$.language){if(T(H.language).supersetOf===$.language)return 1;if(T($.language).supersetOf===H.language)return-1}return 0}),[C,P]=A,N=C;return N.secondBest=P,N}function g(M,F,G){const U=F&&n[F]||G;M.classList.add("hljs"),M.classList.add(`language-${U}`)}function p(M){let F=null;const G=c(M);if(s(G))return;if(L("before:highlightElement",{el:M,language:G}),M.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",M);return}if(M.children.length>0&&(l.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(M)),l.throwUnescapedHTML))throw new q0("One of your code blocks includes unescaped HTML.",M.innerHTML);F=M;const U=F.textContent,A=G?d(U,{language:G,ignoreIllegals:!0}):f(U);M.innerHTML=A.value,M.dataset.highlighted="yes",g(M,G,A.language),M.result={language:A.language,re:A.relevance,relevance:A.relevance},A.secondBest&&(M.secondBest={language:A.secondBest.language,relevance:A.secondBest.relevance}),L("after:highlightElement",{el:M,result:A,text:U})}function y(M){l=ga(l,M)}const m=()=>{v(),Ot("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function b(){v(),Ot("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function v(){function M(){v()}if(document.readyState==="loading"){_||window.addEventListener("DOMContentLoaded",M,!1),_=!0;return}document.querySelectorAll(l.cssSelector).forEach(p)}function E(M,F){let G=null;try{G=F(e)}catch(U){if(bt("Language definition for '{}' could not be registered.".replace("{}",M)),i)bt(U);else throw U;G=o}G.name||(G.name=M),t[M]=G,G.rawDefinition=F.bind(null,e),G.aliases&&R(G.aliases,{languageName:M})}function k(M){delete t[M];for(const F of Object.keys(n))n[F]===M&&delete n[F]}function O(){return Object.keys(t)}function T(M){return M=(M||"").toLowerCase(),t[M]||t[n[M]]}function R(M,{languageName:F}){typeof M=="string"&&(M=[M]),M.forEach(G=>{n[G.toLowerCase()]=F})}function x(M){const F=T(M);return F&&!F.disableAutodetect}function w(M){M["before:highlightBlock"]&&!M["before:highlightElement"]&&(M["before:highlightElement"]=F=>{M["before:highlightBlock"](Object.assign({block:F.el},F))}),M["after:highlightBlock"]&&!M["after:highlightElement"]&&(M["after:highlightElement"]=F=>{M["after:highlightBlock"](Object.assign({block:F.el},F))})}function S(M){w(M),r.push(M)}function I(M){const F=r.indexOf(M);F!==-1&&r.splice(F,1)}function L(M,F){const G=M;r.forEach(function(U){U[G]&&U[G](F)})}function B(M){return Ot("10.7.0","highlightBlock will be removed entirely in v12.0"),Ot("10.7.0","Please use highlightElement now."),p(M)}Object.assign(e,{highlight:d,highlightAuto:f,highlightAll:v,highlightElement:p,highlightBlock:B,configure:y,initHighlighting:m,initHighlightingOnLoad:b,registerLanguage:E,unregisterLanguage:k,listLanguages:O,getLanguage:T,registerAliases:R,autoDetection:x,inherit:ga,addPlugin:S,removePlugin:I}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=z0,e.regex={concat:kt,lookahead:nc,either:zi,optional:r0,anyNumberOfTimes:n0};for(const M in On)typeof On[M]=="object"&&ec(On[M]);return Object.assign(e,On),e},Pt=fc({});Pt.newInstance=()=>fc({});var H0=Pt;Pt.HighlightJS=Pt;Pt.default=Pt;const G0=Yn(H0),ya={},K0="hljs-";function W0(e){const t=G0.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:l};function n(s,c,d){const u=d||ya,h=typeof u.prefix=="string"?u.prefix:K0;if(!t.getLanguage(s))throw new Error("Unknown language: `"+s+"` is not registered");t.configure({__emitter:V0,classPrefix:h});const f=t.highlight(c,{ignoreIllegals:!0,language:s});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const g=f._emitter.root,p=g.data;return p.language=f.language,p.relevance=f.relevance,g}function r(s,c){const u=(c||ya).subset||i();let h=-1,f=0,g;for(;++h<u.length;){const p=u[h];if(!t.getLanguage(p))continue;const y=n(p,s,c);y.data&&y.data.relevance!==void 0&&y.data.relevance>f&&(f=y.data.relevance,g=y)}return g||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function a(s,c){if(typeof s=="string")t.registerLanguage(s,c);else{let d;for(d in s)Object.hasOwn(s,d)&&t.registerLanguage(d,s[d])}}function o(s,c){if(typeof s=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:s});else{let d;for(d in s)if(Object.hasOwn(s,d)){const u=s[d];t.registerAliases(typeof u=="string"?u:[...u],{languageName:d})}}}function l(s){return!!t.getLanguage(s)}}class V0{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,l){return l?o+"_".repeat(l):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const dc=function(e){if(e==null)return Q0;if(typeof e=="function")return lr(e);if(typeof e=="object")return Array.isArray(e)?Y0(e):Z0(e);if(typeof e=="string")return X0(e);throw new Error("Expected function, string, or object as test")};function Y0(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dc(e[n]);return lr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Z0(e){const t=e;return lr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function X0(e){return lr(t);function t(n){return n&&n.type===e}}function lr(e){return t;function t(n,r,i){return!!(J0(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Q0(){return!0}function J0(e){return e!==null&&typeof e=="object"&&"type"in e}const hc=[],e_=!0,ba=!1,t_="skip";function n_(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=dc(i),o=r?-1:1;l(e,void 0,[])();function l(s,c,d){const u=s&&typeof s=="object"?s:{};if(typeof u.type=="string"){const f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=hc,g,p,y;if((!t||a(s,c,d[d.length-1]||void 0))&&(f=r_(n(s,d)),f[0]===ba))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==t_)for(p=(r?m.children.length:-1)+o,y=d.concat(m);p>-1&&p<m.children.length;){const b=m.children[p];if(g=l(b,p,y)(),g[0]===ba)return g;p=typeof g[1]=="number"?g[1]:p+o}}return f}}}function r_(e){return Array.isArray(e)?e:typeof e=="number"?[e_,e]:e==null?hc:[e]}function i_(e,t,n,r){let i,a,o;a=t,o=n,i=r,n_(e,a,l,i);function l(s,c){const d=c[c.length-1],u=d?d.children.indexOf(s):void 0;return o(s,u,d)}}const o_={};function pc(e){const t=e||o_,n=t.aliases,r=t.detect||!1,i=t.languages||Xv,a=t.plainText,o=t.prefix,l=t.subset;let s="hljs";const c=W0(i);if(n&&c.registerAlias(n),o){const d=o.indexOf("-");s=d===-1?o:o.slice(0,d)}return function(d,u){i_(d,"element",function(h,f,g){if(h.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const p=a_(h);if(p===!1||!p&&!r||p&&a&&a.includes(p))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(s)||h.properties.className.unshift(s);const y=kb(h,{whitespace:"pre"});let m;try{m=p?c.highlight(p,y,{prefix:o}):c.highlightAuto(y,{prefix:o,subset:l})}catch(b){const _=b;if(p&&/Unknown language/.test(_.message)){u.message("Cannot highlight as `"+p+"`, it’s not registered",{ancestors:[g,h],cause:_,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw _}!p&&m.data&&m.data.language&&h.properties.className.push("language-"+m.data.language),m.children.length>0&&(h.children=m.children)})}}function a_(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 l_({article:e,onBack:t,onEdit:n,showActions:r=!1}){return j.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&j.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&j.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[j.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&j.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:[j.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.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"]})]}),j.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[j.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[j.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),j.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&j.jsxs("span",{className:"flex items-center gap-2",children:[j.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:j.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&&j.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),j.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===Ie.Published?"bg-green-100 text-green-800":e.status===Ie.Draft?"bg-gray-100 text-gray-800":e.status===Ie.Review?"bg-yellow-100 text-yellow-800":e.status===Ie.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Ie[e.status]})]}),e.tags&&e.tags.length>0&&j.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>j.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&&j.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>j.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),j.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:j.jsx(ts,{remarkPlugins:[Rs],rehypePlugins:[pc],children:e.content})})]})]})}function s_(){this.__data__=[],this.size=0}var c_=s_;function u_(e,t){return e===t||e!==e&&t!==t}var gc=u_,f_=gc;function d_(e,t){for(var n=e.length;n--;)if(f_(e[n][0],t))return n;return-1}var sr=d_,h_=sr,p_=Array.prototype,g_=p_.splice;function m_(e){var t=this.__data__,n=h_(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():g_.call(t,n,1),--this.size,!0}var y_=m_,b_=sr;function v_(e){var t=this.__data__,n=b_(t,e);return n<0?void 0:t[n][1]}var __=v_,E_=sr;function x_(e){return E_(this.__data__,e)>-1}var w_=x_,k_=sr;function S_(e,t){var n=this.__data__,r=k_(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var A_=S_,N_=c_,O_=y_,T_=__,C_=w_,R_=A_;function jt(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])}}jt.prototype.clear=N_;jt.prototype.delete=O_;jt.prototype.get=T_;jt.prototype.has=C_;jt.prototype.set=R_;var cr=jt,I_=cr;function L_(){this.__data__=new I_,this.size=0}var M_=L_;function P_(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var D_=P_;function B_(e){return this.__data__.get(e)}var F_=B_;function j_(e){return this.__data__.has(e)}var U_=j_,z_=typeof Le=="object"&&Le&&Le.Object===Object&&Le,mc=z_,q_=mc,$_=typeof self=="object"&&self&&self.Object===Object&&self,H_=q_||$_||Function("return this")(),st=H_,G_=st,K_=G_.Symbol,Hi=K_,va=Hi,yc=Object.prototype,W_=yc.hasOwnProperty,V_=yc.toString,Jt=va?va.toStringTag:void 0;function Y_(e){var t=W_.call(e,Jt),n=e[Jt];try{e[Jt]=void 0;var r=!0}catch{}var i=V_.call(e);return r&&(t?e[Jt]=n:delete e[Jt]),i}var Z_=Y_,X_=Object.prototype,Q_=X_.toString;function J_(e){return Q_.call(e)}var eE=J_,_a=Hi,tE=Z_,nE=eE,rE="[object Null]",iE="[object Undefined]",Ea=_a?_a.toStringTag:void 0;function oE(e){return e==null?e===void 0?iE:rE:Ea&&Ea in Object(e)?tE(e):nE(e)}var ur=oE;function aE(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bc=aE,lE=ur,sE=bc,cE="[object AsyncFunction]",uE="[object Function]",fE="[object GeneratorFunction]",dE="[object Proxy]";function hE(e){if(!sE(e))return!1;var t=lE(e);return t==uE||t==fE||t==cE||t==dE}var vc=hE,pE=st,gE=pE["__core-js_shared__"],mE=gE,Ur=mE,xa=function(){var e=/[^.]+$/.exec(Ur&&Ur.keys&&Ur.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yE(e){return!!xa&&xa in e}var bE=yE,vE=Function.prototype,_E=vE.toString;function EE(e){if(e!=null){try{return _E.call(e)}catch{}try{return e+""}catch{}}return""}var _c=EE,xE=vc,wE=bE,kE=bc,SE=_c,AE=/[\\^$.*+?()[\]{}|]/g,NE=/^\[object .+?Constructor\]$/,OE=Function.prototype,TE=Object.prototype,CE=OE.toString,RE=TE.hasOwnProperty,IE=RegExp("^"+CE.call(RE).replace(AE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function LE(e){if(!kE(e)||wE(e))return!1;var t=xE(e)?IE:NE;return t.test(SE(e))}var ME=LE;function PE(e,t){return e==null?void 0:e[t]}var DE=PE,BE=ME,FE=DE;function jE(e,t){var n=FE(e,t);return BE(n)?n:void 0}var Ut=jE,UE=Ut,zE=st,qE=UE(zE,"Map"),Gi=qE,$E=Ut,HE=$E(Object,"create"),fr=HE,wa=fr;function GE(){this.__data__=wa?wa(null):{},this.size=0}var KE=GE;function WE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var VE=WE,YE=fr,ZE="__lodash_hash_undefined__",XE=Object.prototype,QE=XE.hasOwnProperty;function JE(e){var t=this.__data__;if(YE){var n=t[e];return n===ZE?void 0:n}return QE.call(t,e)?t[e]:void 0}var ex=JE,tx=fr,nx=Object.prototype,rx=nx.hasOwnProperty;function ix(e){var t=this.__data__;return tx?t[e]!==void 0:rx.call(t,e)}var ox=ix,ax=fr,lx="__lodash_hash_undefined__";function sx(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ax&&t===void 0?lx:t,this}var cx=sx,ux=KE,fx=VE,dx=ex,hx=ox,px=cx;function zt(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])}}zt.prototype.clear=ux;zt.prototype.delete=fx;zt.prototype.get=dx;zt.prototype.has=hx;zt.prototype.set=px;var gx=zt,ka=gx,mx=cr,yx=Gi;function bx(){this.size=0,this.__data__={hash:new ka,map:new(yx||mx),string:new ka}}var vx=bx;function _x(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ex=_x,xx=Ex;function wx(e,t){var n=e.__data__;return xx(t)?n[typeof t=="string"?"string":"hash"]:n.map}var dr=wx,kx=dr;function Sx(e){var t=kx(this,e).delete(e);return this.size-=t?1:0,t}var Ax=Sx,Nx=dr;function Ox(e){return Nx(this,e).get(e)}var Tx=Ox,Cx=dr;function Rx(e){return Cx(this,e).has(e)}var Ix=Rx,Lx=dr;function Mx(e,t){var n=Lx(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Px=Mx,Dx=vx,Bx=Ax,Fx=Tx,jx=Ix,Ux=Px;function qt(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])}}qt.prototype.clear=Dx;qt.prototype.delete=Bx;qt.prototype.get=Fx;qt.prototype.has=jx;qt.prototype.set=Ux;var Ec=qt,zx=cr,qx=Gi,$x=Ec,Hx=200;function Gx(e,t){var n=this.__data__;if(n instanceof zx){var r=n.__data__;if(!qx||r.length<Hx-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $x(r)}return n.set(e,t),this.size=n.size,this}var Kx=Gx,Wx=cr,Vx=M_,Yx=D_,Zx=F_,Xx=U_,Qx=Kx;function $t(e){var t=this.__data__=new Wx(e);this.size=t.size}$t.prototype.clear=Vx;$t.prototype.delete=Yx;$t.prototype.get=Zx;$t.prototype.has=Xx;$t.prototype.set=Qx;var Jx=$t,e1="__lodash_hash_undefined__";function t1(e){return this.__data__.set(e,e1),this}var n1=t1;function r1(e){return this.__data__.has(e)}var i1=r1,o1=Ec,a1=n1,l1=i1;function $n(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new o1;++t<n;)this.add(e[t])}$n.prototype.add=$n.prototype.push=a1;$n.prototype.has=l1;var s1=$n;function c1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var u1=c1;function f1(e,t){return e.has(t)}var d1=f1,h1=s1,p1=u1,g1=d1,m1=1,y1=2;function b1(e,t,n,r,i,a){var o=n&m1,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,f=n&y1?new h1:void 0;for(a.set(e,t),a.set(t,e);++u<l;){var g=e[u],p=t[u];if(r)var y=o?r(p,g,u,t,e,a):r(g,p,u,e,t,a);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!p1(t,function(m,b){if(!g1(f,b)&&(g===m||i(g,m,n,r,a)))return f.push(b)})){h=!1;break}}else if(!(g===p||i(g,p,n,r,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var xc=b1,v1=st,_1=v1.Uint8Array,E1=_1;function x1(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var w1=x1;function k1(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var S1=k1,Sa=Hi,Aa=E1,A1=gc,N1=xc,O1=w1,T1=S1,C1=1,R1=2,I1="[object Boolean]",L1="[object Date]",M1="[object Error]",P1="[object Map]",D1="[object Number]",B1="[object RegExp]",F1="[object Set]",j1="[object String]",U1="[object Symbol]",z1="[object ArrayBuffer]",q1="[object DataView]",Na=Sa?Sa.prototype:void 0,zr=Na?Na.valueOf:void 0;function $1(e,t,n,r,i,a,o){switch(n){case q1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case z1:return!(e.byteLength!=t.byteLength||!a(new Aa(e),new Aa(t)));case I1:case L1:case D1:return A1(+e,+t);case M1:return e.name==t.name&&e.message==t.message;case B1:case j1:return e==t+"";case P1:var l=O1;case F1:var s=r&C1;if(l||(l=T1),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=R1,o.set(e,t);var d=N1(l(e),l(t),r,i,a,o);return o.delete(e),d;case U1:if(zr)return zr.call(e)==zr.call(t)}return!1}var H1=$1;function G1(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var K1=G1,W1=Array.isArray,Ki=W1,V1=K1,Y1=Ki;function Z1(e,t,n){var r=t(e);return Y1(e)?r:V1(r,n(e))}var X1=Z1;function Q1(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var J1=Q1;function ew(){return[]}var tw=ew,nw=J1,rw=tw,iw=Object.prototype,ow=iw.propertyIsEnumerable,Oa=Object.getOwnPropertySymbols,aw=Oa?function(e){return e==null?[]:(e=Object(e),nw(Oa(e),function(t){return ow.call(e,t)}))}:rw,lw=aw;function sw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cw=sw;function uw(e){return e!=null&&typeof e=="object"}var hr=uw,fw=ur,dw=hr,hw="[object Arguments]";function pw(e){return dw(e)&&fw(e)==hw}var gw=pw,Ta=gw,mw=hr,wc=Object.prototype,yw=wc.hasOwnProperty,bw=wc.propertyIsEnumerable,vw=Ta(function(){return arguments}())?Ta:function(e){return mw(e)&&yw.call(e,"callee")&&!bw.call(e,"callee")},_w=vw,Hn={exports:{}};function Ew(){return!1}var xw=Ew;Hn.exports;(function(e,t){var n=st,r=xw,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,s=l?l.isBuffer:void 0,c=s||r;e.exports=c})(Hn,Hn.exports);var kc=Hn.exports,ww=9007199254740991,kw=/^(?:0|[1-9]\d*)$/;function Sw(e,t){var n=typeof e;return t=t??ww,!!t&&(n=="number"||n!="symbol"&&kw.test(e))&&e>-1&&e%1==0&&e<t}var Aw=Sw,Nw=9007199254740991;function Ow(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Nw}var Sc=Ow,Tw=ur,Cw=Sc,Rw=hr,Iw="[object Arguments]",Lw="[object Array]",Mw="[object Boolean]",Pw="[object Date]",Dw="[object Error]",Bw="[object Function]",Fw="[object Map]",jw="[object Number]",Uw="[object Object]",zw="[object RegExp]",qw="[object Set]",$w="[object String]",Hw="[object WeakMap]",Gw="[object ArrayBuffer]",Kw="[object DataView]",Ww="[object Float32Array]",Vw="[object Float64Array]",Yw="[object Int8Array]",Zw="[object Int16Array]",Xw="[object Int32Array]",Qw="[object Uint8Array]",Jw="[object Uint8ClampedArray]",ek="[object Uint16Array]",tk="[object Uint32Array]",Te={};Te[Ww]=Te[Vw]=Te[Yw]=Te[Zw]=Te[Xw]=Te[Qw]=Te[Jw]=Te[ek]=Te[tk]=!0;Te[Iw]=Te[Lw]=Te[Gw]=Te[Mw]=Te[Kw]=Te[Pw]=Te[Dw]=Te[Bw]=Te[Fw]=Te[jw]=Te[Uw]=Te[zw]=Te[qw]=Te[$w]=Te[Hw]=!1;function nk(e){return Rw(e)&&Cw(e.length)&&!!Te[Tw(e)]}var rk=nk;function ik(e){return function(t){return e(t)}}var ok=ik,Gn={exports:{}};Gn.exports;(function(e,t){var n=mc,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(Gn,Gn.exports);var ak=Gn.exports,lk=rk,sk=ok,Ca=ak,Ra=Ca&&Ca.isTypedArray,ck=Ra?sk(Ra):lk,Ac=ck,uk=cw,fk=_w,dk=Ki,hk=kc,pk=Aw,gk=Ac,mk=Object.prototype,yk=mk.hasOwnProperty;function bk(e,t){var n=dk(e),r=!n&&fk(e),i=!n&&!r&&hk(e),a=!n&&!r&&!i&&gk(e),o=n||r||i||a,l=o?uk(e.length,String):[],s=l.length;for(var c in e)(t||yk.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||pk(c,s)))&&l.push(c);return l}var vk=bk,_k=Object.prototype;function Ek(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_k;return e===n}var xk=Ek;function wk(e,t){return function(n){return e(t(n))}}var kk=wk,Sk=kk,Ak=Sk(Object.keys,Object),Nk=Ak,Ok=xk,Tk=Nk,Ck=Object.prototype,Rk=Ck.hasOwnProperty;function Ik(e){if(!Ok(e))return Tk(e);var t=[];for(var n in Object(e))Rk.call(e,n)&&n!="constructor"&&t.push(n);return t}var Lk=Ik,Mk=vc,Pk=Sc;function Dk(e){return e!=null&&Pk(e.length)&&!Mk(e)}var Bk=Dk,Fk=vk,jk=Lk,Uk=Bk;function zk(e){return Uk(e)?Fk(e):jk(e)}var qk=zk,$k=X1,Hk=lw,Gk=qk;function Kk(e){return $k(e,Gk,Hk)}var Wk=Kk,Ia=Wk,Vk=1,Yk=Object.prototype,Zk=Yk.hasOwnProperty;function Xk(e,t,n,r,i,a){var o=n&Vk,l=Ia(e),s=l.length,c=Ia(t),d=c.length;if(s!=d&&!o)return!1;for(var u=s;u--;){var h=l[u];if(!(o?h in t:Zk.call(t,h)))return!1}var f=a.get(e),g=a.get(t);if(f&&g)return f==t&&g==e;var p=!0;a.set(e,t),a.set(t,e);for(var y=o;++u<s;){h=l[u];var m=e[h],b=t[h];if(r)var _=o?r(b,m,h,t,e,a):r(m,b,h,e,t,a);if(!(_===void 0?m===b||i(m,b,n,r,a):_)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var v=e.constructor,E=t.constructor;v!=E&&"constructor"in e&&"constructor"in t&&!(typeof v=="function"&&v instanceof v&&typeof E=="function"&&E instanceof E)&&(p=!1)}return a.delete(e),a.delete(t),p}var Qk=Xk,Jk=Ut,eS=st,tS=Jk(eS,"DataView"),nS=tS,rS=Ut,iS=st,oS=rS(iS,"Promise"),aS=oS,lS=Ut,sS=st,cS=lS(sS,"Set"),uS=cS,fS=Ut,dS=st,hS=fS(dS,"WeakMap"),pS=hS,si=nS,ci=Gi,ui=aS,fi=uS,di=pS,Nc=ur,Ht=_c,La="[object Map]",gS="[object Object]",Ma="[object Promise]",Pa="[object Set]",Da="[object WeakMap]",Ba="[object DataView]",mS=Ht(si),yS=Ht(ci),bS=Ht(ui),vS=Ht(fi),_S=Ht(di),gt=Nc;(si&>(new si(new ArrayBuffer(1)))!=Ba||ci&>(new ci)!=La||ui&>(ui.resolve())!=Ma||fi&>(new fi)!=Pa||di&>(new di)!=Da)&&(gt=function(e){var t=Nc(e),n=t==gS?e.constructor:void 0,r=n?Ht(n):"";if(r)switch(r){case mS:return Ba;case yS:return La;case bS:return Ma;case vS:return Pa;case _S:return Da}return t});var ES=gt,qr=Jx,xS=xc,wS=H1,kS=Qk,Fa=ES,ja=Ki,Ua=kc,SS=Ac,AS=1,za="[object Arguments]",qa="[object Array]",Tn="[object Object]",NS=Object.prototype,$a=NS.hasOwnProperty;function OS(e,t,n,r,i,a){var o=ja(e),l=ja(t),s=o?qa:Fa(e),c=l?qa:Fa(t);s=s==za?Tn:s,c=c==za?Tn:c;var d=s==Tn,u=c==Tn,h=s==c;if(h&&Ua(e)){if(!Ua(t))return!1;o=!0,d=!1}if(h&&!d)return a||(a=new qr),o||SS(e)?xS(e,t,n,r,i,a):wS(e,t,s,n,r,i,a);if(!(n&AS)){var f=d&&$a.call(e,"__wrapped__"),g=u&&$a.call(t,"__wrapped__");if(f||g){var p=f?e.value():e,y=g?t.value():t;return a||(a=new qr),i(p,y,n,r,a)}}return h?(a||(a=new qr),kS(e,t,n,r,i,a)):!1}var TS=OS,CS=TS,Ha=hr;function Oc(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ha(e)&&!Ha(t)?e!==e&&t!==t:CS(e,t,n,r,Oc,i)}var RS=Oc,IS=RS;function LS(e,t){return IS(e,t)}var MS=LS,Tc={exports:{}};/*!
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* Copyright (c) 2013, salesforce.com
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`)){var F=h.default.create(R.blotName);this.parent.insertBefore(F,L===0?this:this.next),F.insertAt(0,B.slice(0,-1))}else o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,L,B,M)}}]),S}(h.default.Embed);T.scope=h.default.Scope.BLOCK_BLOT;var R=function(w){k(S,w);function S(I){v(this,S);var L=E(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I));return L.cache={},L}return a(S,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(h.default.Leaf).reduce(function(L,B){return B.length()===0?L:L.insert(B.value(),x(B))},new d.default).insert(`
|
|
43
|
-
`,x(this))),this.cache.delta}},{key:"deleteAt",value:function(L,B){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"deleteAt",this).call(this,L,B),this.cache={}}},{key:"formatAt",value:function(L,B,M,F){B<=0||(h.default.query(M,h.default.Scope.BLOCK)?L+B===this.length()&&this.format(M,F):o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"formatAt",this).call(this,L,Math.min(B,this.length()-L-1),M,F),this.cache={})}},{key:"insertAt",value:function(L,B,M){if(M!=null)return o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,L,B,M);if(B.length!==0){var F=B.split(`
|
|
44
|
-
`),G=F.shift();G.length>0&&(L<this.length()-1||this.children.tail==null?o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertAt",this).call(this,Math.min(L,this.length()-1),G):this.children.tail.insertAt(this.children.tail.length(),G),this.cache={});var U=this;F.reduce(function(A,C){return U=U.split(A,!0),U.insertAt(0,C),C.length},L+G.length)}}},{key:"insertBefore",value:function(L,B){var M=this.children.head;o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,L,B),M instanceof g.default&&M.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"length",this).call(this)+O),this.cache.length}},{key:"moveChildren",value:function(L,B){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"moveChildren",this).call(this,L,B),this.cache={}}},{key:"optimize",value:function(L){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,L),this.cache={}}},{key:"path",value:function(L){return o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"path",this).call(this,L,!0)}},{key:"removeChild",value:function(L){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"removeChild",this).call(this,L),this.cache={}}},{key:"split",value:function(L){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(B&&(L===0||L>=this.length()-O)){var M=this.clone();return L===0?(this.parent.insertBefore(M,this),this):(this.parent.insertBefore(M,this.next),M)}else{var F=o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"split",this).call(this,L,B);return this.cache={},F}}}]),S}(h.default.Block);R.blotName="block",R.tagName="P",R.defaultChild="break",R.allowedChildren=[y.default,h.default.Embed,b.default];function x(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w==null||(typeof w.formats=="function"&&(S=(0,s.default)(S,w.formats())),w.parent==null||w.parent.blotName=="scroll"||w.parent.statics.scope!==w.statics.scope)?S:x(w.parent,S)}r.bubbleFormats=x,r.BlockEmbed=T,r.default=R},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},o=function(){function U(A,C){var P=[],N=!0,H=!1,$=void 0;try{for(var D=A[Symbol.iterator](),q;!(N=(q=D.next()).done)&&(P.push(q.value),!(C&&P.length===C));N=!0);}catch(W){H=!0,$=W}finally{try{!N&&D.return&&D.return()}finally{if(H)throw $}}return P}return function(A,C){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return U(A,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function U(A,C){for(var P=0;P<C.length;P++){var N=C[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(A,N.key,N)}}return function(A,C,P){return C&&U(A.prototype,C),P&&U(A,P),A}}();i(50);var s=i(2),c=x(s),d=i(14),u=x(d),h=i(8),f=x(h),g=i(9),p=x(g),y=i(0),m=x(y),b=i(15),_=x(b),v=i(3),E=x(v),k=i(10),O=x(k),T=i(34),R=x(T);function x(U){return U&&U.__esModule?U:{default:U}}function w(U,A,C){return A in U?Object.defineProperty(U,A,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[A]=C,U}function S(U,A){if(!(U instanceof A))throw new TypeError("Cannot call a class as a function")}var I=(0,O.default)("quill"),L=function(){l(U,null,[{key:"debug",value:function(C){C===!0&&(C="log"),O.default.level(C)}},{key:"find",value:function(C){return C.__quill||m.default.find(C)}},{key:"import",value:function(C){return this.imports[C]==null&&I.error("Cannot import "+C+". Are you sure it was registered?"),this.imports[C]}},{key:"register",value:function(C,P){var N=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof C!="string"){var $=C.attrName||C.blotName;typeof $=="string"?this.register("formats/"+$,C,P):Object.keys(C).forEach(function(D){N.register(D,C[D],P)})}else this.imports[C]!=null&&!H&&I.warn("Overwriting "+C+" with",P),this.imports[C]=P,(C.startsWith("blots/")||C.startsWith("formats/"))&&P.blotName!=="abstract"?m.default.register(P):C.startsWith("modules")&&typeof P.register=="function"&&P.register()}}]);function U(A){var C=this,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(S(this,U),this.options=B(A,P),this.container=this.options.container,this.container==null)return I.error("Invalid Quill container",A);this.options.debug&&U.debug(this.options.debug);var N=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new f.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new u.default(this.scroll),this.selection=new _.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(f.default.events.EDITOR_CHANGE,function($){$===f.default.events.TEXT_CHANGE&&C.root.classList.toggle("ql-blank",C.editor.isBlank())}),this.emitter.on(f.default.events.SCROLL_UPDATE,function($,D){var q=C.selection.lastRange,W=q&&q.length===0?q.index:void 0;M.call(C,function(){return C.editor.update(null,D,W)},$)});var H=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+N+"<p><br></p></div>");this.setContents(H),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(U,[{key:"addContainer",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof C=="string"){var N=C;C=document.createElement("div"),C.classList.add(N)}return this.container.insertBefore(C,P),C}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(C,P,N){var H=this,$=F(C,P,N),D=o($,4);return C=D[0],P=D[1],N=D[3],M.call(this,function(){return H.editor.deleteText(C,P)},N,C,-1*P)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(C),this.container.classList.toggle("ql-disabled",!C)}},{key:"focus",value:function(){var C=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=C,this.scrollIntoView()}},{key:"format",value:function(C,P){var N=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;return M.call(this,function(){var $=N.getSelection(!0),D=new c.default;if($==null)return D;if(m.default.query(C,m.default.Scope.BLOCK))D=N.editor.formatLine($.index,$.length,w({},C,P));else{if($.length===0)return N.selection.format(C,P),D;D=N.editor.formatText($.index,$.length,w({},C,P))}return N.setSelection($,f.default.sources.SILENT),D},H)}},{key:"formatLine",value:function(C,P,N,H,$){var D=this,q=void 0,W=F(C,P,N,H,$),V=o(W,4);return C=V[0],P=V[1],q=V[2],$=V[3],M.call(this,function(){return D.editor.formatLine(C,P,q)},$,C,0)}},{key:"formatText",value:function(C,P,N,H,$){var D=this,q=void 0,W=F(C,P,N,H,$),V=o(W,4);return C=V[0],P=V[1],q=V[2],$=V[3],M.call(this,function(){return D.editor.formatText(C,P,q)},$,C,0)}},{key:"getBounds",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=void 0;typeof C=="number"?N=this.selection.getBounds(C,P):N=this.selection.getBounds(C.index,C.length);var H=this.container.getBoundingClientRect();return{bottom:N.bottom-H.top,height:N.height,left:N.left-H.left,right:N.right-H.left,top:N.top-H.top,width:N.width}}},{key:"getContents",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,N=F(C,P),H=o(N,2);return C=H[0],P=H[1],this.editor.getContents(C,P)}},{key:"getFormat",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof C=="number"?this.editor.getFormat(C,P):this.editor.getFormat(C.index,C.length)}},{key:"getIndex",value:function(C){return C.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(C){return this.scroll.leaf(C)}},{key:"getLine",value:function(C){return this.scroll.line(C)}},{key:"getLines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof C!="number"?this.scroll.lines(C.index,C.length):this.scroll.lines(C,P)}},{key:"getModule",value:function(C){return this.theme.modules[C]}},{key:"getSelection",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return C&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-C,N=F(C,P),H=o(N,2);return C=H[0],P=H[1],this.editor.getText(C,P)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(C,P,N){var H=this,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:U.sources.API;return M.call(this,function(){return H.editor.insertEmbed(C,P,N)},$,C)}},{key:"insertText",value:function(C,P,N,H,$){var D=this,q=void 0,W=F(C,0,N,H,$),V=o(W,4);return C=V[0],q=V[2],$=V[3],M.call(this,function(){return D.editor.insertText(C,P,q)},$,C,P.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(C,P,N){this.clipboard.dangerouslyPasteHTML(C,P,N)}},{key:"removeFormat",value:function(C,P,N){var H=this,$=F(C,P,N),D=o($,4);return C=D[0],P=D[1],N=D[3],M.call(this,function(){return H.editor.removeFormat(C,P)},N,C)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(C){var P=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return M.call(this,function(){C=new c.default(C);var H=P.getLength(),$=P.editor.deleteText(0,H),D=P.editor.applyDelta(C),q=D.ops[D.ops.length-1];q!=null&&typeof q.insert=="string"&&q.insert[q.insert.length-1]===`
|
|
45
|
-
`&&(P.editor.deleteText(P.getLength()-1,1),D.delete(1));var W=$.compose(D);return W},N)}},{key:"setSelection",value:function(C,P,N){if(C==null)this.selection.setRange(null,P||U.sources.API);else{var H=F(C,P,N),$=o(H,4);C=$[0],P=$[1],N=$[3],this.selection.setRange(new b.Range(C,P),N),N!==f.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API,N=new c.default().insert(C);return this.setContents(N,P)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,P=this.scroll.update(C);return this.selection.update(C),P}},{key:"updateContents",value:function(C){var P=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.default.sources.API;return M.call(this,function(){return C=new c.default(C),P.editor.applyDelta(C,N)},N,!0)}}]),U}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=f.default.events,L.sources=f.default.sources,L.version="1.3.7",L.imports={delta:c.default,parchment:m.default,"core/module":p.default,"core/theme":R.default};function B(U,A){if(A=(0,E.default)(!0,{container:U,modules:{clipboard:!0,keyboard:!0,history:!0}},A),!A.theme||A.theme===L.DEFAULTS.theme)A.theme=R.default;else if(A.theme=L.import("themes/"+A.theme),A.theme==null)throw new Error("Invalid theme "+A.theme+". Did you register it?");var C=(0,E.default)(!0,{},A.theme.DEFAULTS);[C,A].forEach(function(H){H.modules=H.modules||{},Object.keys(H.modules).forEach(function($){H.modules[$]===!0&&(H.modules[$]={})})});var P=Object.keys(C.modules).concat(Object.keys(A.modules)),N=P.reduce(function(H,$){var D=L.import("modules/"+$);return D==null?I.error("Cannot load "+$+" module. Are you sure you registered it?"):H[$]=D.DEFAULTS||{},H},{});return A.modules!=null&&A.modules.toolbar&&A.modules.toolbar.constructor!==Object&&(A.modules.toolbar={container:A.modules.toolbar}),A=(0,E.default)(!0,{},L.DEFAULTS,{modules:N},C,A),["bounds","container","scrollingContainer"].forEach(function(H){typeof A[H]=="string"&&(A[H]=document.querySelector(A[H]))}),A.modules=Object.keys(A.modules).reduce(function(H,$){return A.modules[$]&&(H[$]=A.modules[$]),H},{}),A}function M(U,A,C,P){if(this.options.strict&&!this.isEnabled()&&A===f.default.sources.USER)return new c.default;var N=C==null?null:this.getSelection(),H=this.editor.delta,$=U();if(N!=null&&(C===!0&&(C=N.index),P==null?N=G(N,$,A):P!==0&&(N=G(N,C,P,A)),this.setSelection(N,f.default.sources.SILENT)),$.length()>0){var D,q=[f.default.events.TEXT_CHANGE,$,H,A];if((D=this.emitter).emit.apply(D,[f.default.events.EDITOR_CHANGE].concat(q)),A!==f.default.sources.SILENT){var W;(W=this.emitter).emit.apply(W,q)}}return $}function F(U,A,C,P,N){var H={};return typeof U.index=="number"&&typeof U.length=="number"?typeof A!="number"?(N=P,P=C,C=A,A=U.length,U=U.index):(A=U.length,U=U.index):typeof A!="number"&&(N=P,P=C,C=A,A=0),(typeof C>"u"?"undefined":a(C))==="object"?(H=C,N=P):typeof C=="string"&&(P!=null?H[C]=P:N=C),N=N||f.default.sources.API,[U,A,H,N]}function G(U,A,C,P){if(U==null)return null;var N=void 0,H=void 0;if(A instanceof c.default){var $=[U.index,U.index+U.length].map(function(V){return A.transformPosition(V,P!==f.default.sources.USER)}),D=o($,2);N=D[0],H=D[1]}else{var q=[U.index,U.index+U.length].map(function(V){return V<A||V===A&&P===f.default.sources.USER?V:C>=0?V+C:Math.max(A,V+C)}),W=o(q,2);N=W[0],H=W[1]}return new b.Range(N,H-N)}r.expandConfig=B,r.overload=F,r.default=L},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(m,b){for(var _=0;_<b.length;_++){var v=b[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,b,_){return b&&y(m.prototype,b),_&&y(m,_),m}}(),o=function y(m,b,_){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,b);if(v===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:y(E,b,_)}else{if("value"in v)return v.value;var k=v.get;return k===void 0?void 0:k.call(_)}},l=i(7),s=u(l),c=i(0),d=u(c);function u(y){return y&&y.__esModule?y:{default:y}}function h(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function f(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function g(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var p=function(y){g(m,y);function m(){return h(this,m),f(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"formatAt",value:function(_,v,E,k){if(m.compare(this.statics.blotName,E)<0&&d.default.query(E,d.default.Scope.BLOT)){var O=this.isolate(_,v);k&&O.wrap(E,k)}else o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,_,v,E,k)}},{key:"optimize",value:function(_){if(o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,_),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var v=this.parent.isolate(this.offset(),this.length());this.moveChildren(v),v.wrap(this)}}}],[{key:"compare",value:function(_,v){var E=m.order.indexOf(_),k=m.order.indexOf(v);return E>=0||k>=0?E-k:_===v?0:_<v?-1:1}}]),m}(d.default.Inline);p.allowedChildren=[p,d.default.Embed,s.default],p.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function d(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var u=function(h){d(f,h);function f(){return s(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default.Text);r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function b(_,v){for(var E=0;E<v.length;E++){var k=v[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(_,k.key,k)}}return function(_,v,E){return v&&b(_.prototype,v),E&&b(_,E),_}}(),o=function b(_,v,E){_===null&&(_=Function.prototype);var k=Object.getOwnPropertyDescriptor(_,v);if(k===void 0){var O=Object.getPrototypeOf(_);return O===null?void 0:b(O,v,E)}else{if("value"in k)return k.value;var T=k.get;return T===void 0?void 0:T.call(E)}},l=i(54),s=u(l),c=i(10),d=u(c);function u(b){return b&&b.__esModule?b:{default:b}}function h(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function f(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function g(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var p=(0,d.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(b){document.addEventListener(b,function(){for(var _=arguments.length,v=Array(_),E=0;E<_;E++)v[E]=arguments[E];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(k){if(k.__quill&&k.__quill.emitter){var O;(O=k.__quill.emitter).handleDOM.apply(O,v)}})})});var m=function(b){g(_,b);function _(){h(this,_);var v=f(this,(_.__proto__||Object.getPrototypeOf(_)).call(this));return v.listeners={},v.on("error",p.error),v}return a(_,[{key:"emit",value:function(){p.log.apply(p,arguments),o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(E){for(var k=arguments.length,O=Array(k>1?k-1:0),T=1;T<k;T++)O[T-1]=arguments[T];(this.listeners[E.type]||[]).forEach(function(R){var x=R.node,w=R.handler;(E.target===x||x.contains(E.target))&&w.apply(void 0,[E].concat(O))})}},{key:"listenDOM",value:function(E,k,O){this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push({node:k,handler:O})}}]),_}(s.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},r.default=m},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function a(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}var o=function l(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,l),this.quill=s,this.options=c};o.DEFAULTS={},r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=["error","warn","log","info"],o="warn";function l(c){if(a.indexOf(c)<=a.indexOf(o)){for(var d,u=arguments.length,h=Array(u>1?u-1:0),f=1;f<u;f++)h[f-1]=arguments[f];(d=console)[c].apply(d,h)}}function s(c){return a.reduce(function(d,u){return d[u]=l.bind(console,u,c),d},{})}l.level=s.level=function(c){o=c},r.default=s},function(n,r,i){var a=Array.prototype.slice,o=i(52),l=i(53),s=n.exports=function(h,f,g){return g||(g={}),h===f?!0:h instanceof Date&&f instanceof Date?h.getTime()===f.getTime():!h||!f||typeof h!="object"&&typeof f!="object"?g.strict?h===f:h==f:u(h,f,g)};function c(h){return h==null}function d(h){return!(!h||typeof h!="object"||typeof h.length!="number"||typeof h.copy!="function"||typeof h.slice!="function"||h.length>0&&typeof h[0]!="number")}function u(h,f,g){var p,y;if(c(h)||c(f)||h.prototype!==f.prototype)return!1;if(l(h))return l(f)?(h=a.call(h),f=a.call(f),s(h,f,g)):!1;if(d(h)){if(!d(f)||h.length!==f.length)return!1;for(p=0;p<h.length;p++)if(h[p]!==f[p])return!1;return!0}try{var m=o(h),b=o(f)}catch{return!1}if(m.length!=b.length)return!1;for(m.sort(),b.sort(),p=m.length-1;p>=0;p--)if(m[p]!=b[p])return!1;for(p=m.length-1;p>=0;p--)if(y=m[p],!s(h[y],f[y],g))return!1;return typeof h==typeof f}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=function(){function l(s,c,d){d===void 0&&(d={}),this.attrName=s,this.keyName=c;var u=a.Scope.TYPE&a.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&a.Scope.LEVEL|u:this.scope=a.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return l.keys=function(s){return[].map.call(s.attributes,function(c){return c.name})},l.prototype.add=function(s,c){return this.canAdd(s,c)?(s.setAttribute(this.keyName,c),!0):!1},l.prototype.canAdd=function(s,c){var d=a.query(s,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof c=="string"?this.whitelist.indexOf(c.replace(/["']/g,""))>-1:this.whitelist.indexOf(c)>-1},l.prototype.remove=function(s){s.removeAttribute(this.keyName)},l.prototype.value=function(s){var c=s.getAttribute(this.keyName);return this.canAdd(s,c)&&c?c:""},l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var a=function(){function T(R,x){var w=[],S=!0,I=!1,L=void 0;try{for(var B=R[Symbol.iterator](),M;!(S=(M=B.next()).done)&&(w.push(M.value),!(x&&w.length===x));S=!0);}catch(F){I=!0,L=F}finally{try{!S&&B.return&&B.return()}finally{if(I)throw L}}return w}return function(R,x){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return T(R,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(R,x){for(var w=0;w<x.length;w++){var S=x[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(R,S.key,S)}}return function(R,x,w){return x&&T(R.prototype,x),w&&T(R,w),R}}(),l=function T(R,x,w){R===null&&(R=Function.prototype);var S=Object.getOwnPropertyDescriptor(R,x);if(S===void 0){var I=Object.getPrototypeOf(R);return I===null?void 0:T(I,x,w)}else{if("value"in S)return S.value;var L=S.get;return L===void 0?void 0:L.call(w)}},s=i(2),c=b(s),d=i(0),u=b(d),h=i(4),f=b(h),g=i(6),p=b(g),y=i(7),m=b(y);function b(T){return T&&T.__esModule?T:{default:T}}function _(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}function v(T,R){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:T}function E(T,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);T.prototype=Object.create(R&&R.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(T,R):T.__proto__=R)}var k=function(T){E(R,T);function R(){return _(this,R),v(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return R}(p.default);k.blotName="code",k.tagName="CODE";var O=function(T){E(R,T);function R(){return _(this,R),v(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return o(R,[{key:"delta",value:function(){var w=this,S=this.domNode.textContent;return S.endsWith(`
|
|
46
|
-
`)&&(S=S.slice(0,-1)),S.split(`
|
|
47
|
-
`).reduce(function(I,L){return I.insert(L).insert(`
|
|
48
|
-
`,w.formats())},new c.default)}},{key:"format",value:function(w,S){if(!(w===this.statics.blotName&&S)){var I=this.descendant(m.default,this.length()-1),L=a(I,1),B=L[0];B!=null&&B.deleteAt(B.length()-1,1),l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"format",this).call(this,w,S)}}},{key:"formatAt",value:function(w,S,I,L){if(S!==0&&!(u.default.query(I,u.default.Scope.BLOCK)==null||I===this.statics.blotName&&L===this.statics.formats(this.domNode))){var B=this.newlineIndex(w);if(!(B<0||B>=w+S)){var M=this.newlineIndex(w,!0)+1,F=B-M+1,G=this.isolate(M,F),U=G.next;G.format(I,L),U instanceof R&&U.formatAt(0,w-M+S-F,I,L)}}}},{key:"insertAt",value:function(w,S,I){if(I==null){var L=this.descendant(m.default,w),B=a(L,2),M=B[0],F=B[1];M.insertAt(F,S)}}},{key:"length",value:function(){var w=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
49
|
-
`)?w:w+1}},{key:"newlineIndex",value:function(w){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(S)return this.domNode.textContent.slice(0,w).lastIndexOf(`
|
|
50
|
-
`);var I=this.domNode.textContent.slice(w).indexOf(`
|
|
51
|
-
`);return I>-1?w+I:-1}},{key:"optimize",value:function(w){this.domNode.textContent.endsWith(`
|
|
52
|
-
`)||this.appendChild(u.default.create("text",`
|
|
53
|
-
`)),l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,w);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===S.statics.formats(S.domNode)&&(S.optimize(w),S.moveChildren(this),S.remove())}},{key:"replace",value:function(w){l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replace",this).call(this,w),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(S){var I=u.default.find(S);I==null?S.parentNode.removeChild(S):I instanceof u.default.Embed?I.remove():I.unwrap()})}}],[{key:"create",value:function(w){var S=l(R.__proto__||Object.getPrototypeOf(R),"create",this).call(this,w);return S.setAttribute("spellcheck",!1),S}},{key:"formats",value:function(){return!0}}]),R}(f.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",r.Code=k,r.default=O},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},o=function(){function U(A,C){var P=[],N=!0,H=!1,$=void 0;try{for(var D=A[Symbol.iterator](),q;!(N=(q=D.next()).done)&&(P.push(q.value),!(C&&P.length===C));N=!0);}catch(W){H=!0,$=W}finally{try{!N&&D.return&&D.return()}finally{if(H)throw $}}return P}return function(A,C){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return U(A,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function U(A,C){for(var P=0;P<C.length;P++){var N=C[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(A,N.key,N)}}return function(A,C,P){return C&&U(A.prototype,C),P&&U(A,P),A}}(),s=i(2),c=S(s),d=i(20),u=S(d),h=i(0),f=S(h),g=i(13),p=S(g),y=i(24),m=S(y),b=i(4),_=S(b),v=i(16),E=S(v),k=i(21),O=S(k),T=i(11),R=S(T),x=i(3),w=S(x);function S(U){return U&&U.__esModule?U:{default:U}}function I(U,A,C){return A in U?Object.defineProperty(U,A,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[A]=C,U}function L(U,A){if(!(U instanceof A))throw new TypeError("Cannot call a class as a function")}var B=/^[ -~]*$/,M=function(){function U(A){L(this,U),this.scroll=A,this.delta=this.getDelta()}return l(U,[{key:"applyDelta",value:function(C){var P=this,N=!1;this.scroll.update();var H=this.scroll.length();return this.scroll.batchStart(),C=G(C),C.reduce(function($,D){var q=D.retain||D.delete||D.insert.length||1,W=D.attributes||{};if(D.insert!=null){if(typeof D.insert=="string"){var V=D.insert;V.endsWith(`
|
|
54
|
-
`)&&N&&(N=!1,V=V.slice(0,-1)),$>=H&&!V.endsWith(`
|
|
55
|
-
`)&&(N=!0),P.scroll.insertAt($,V);var Q=P.scroll.line($),ie=o(Q,2),ce=ie[0],ue=ie[1],me=(0,w.default)({},(0,b.bubbleFormats)(ce));if(ce instanceof _.default){var he=ce.descendant(f.default.Leaf,ue),de=o(he,1),we=de[0];me=(0,w.default)(me,(0,b.bubbleFormats)(we))}W=u.default.attributes.diff(me,W)||{}}else if(a(D.insert)==="object"){var K=Object.keys(D.insert)[0];if(K==null)return $;P.scroll.insertAt($,K,D.insert[K])}H+=q}return Object.keys(W).forEach(function(X){P.scroll.formatAt($,q,X,W[X])}),$+q},0),C.reduce(function($,D){return typeof D.delete=="number"?(P.scroll.deleteAt($,D.delete),$):$+(D.retain||D.insert.length||1)},0),this.scroll.batchEnd(),this.update(C)}},{key:"deleteText",value:function(C,P){return this.scroll.deleteAt(C,P),this.update(new c.default().retain(C).delete(P))}},{key:"formatLine",value:function(C,P){var N=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(H).forEach(function($){if(!(N.scroll.whitelist!=null&&!N.scroll.whitelist[$])){var D=N.scroll.lines(C,Math.max(P,1)),q=P;D.forEach(function(W){var V=W.length();if(!(W instanceof p.default))W.format($,H[$]);else{var Q=C-W.offset(N.scroll),ie=W.newlineIndex(Q+q)-Q+1;W.formatAt(Q,ie,$,H[$])}q-=V})}}),this.scroll.optimize(),this.update(new c.default().retain(C).retain(P,(0,O.default)(H)))}},{key:"formatText",value:function(C,P){var N=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(H).forEach(function($){N.scroll.formatAt(C,P,$,H[$])}),this.update(new c.default().retain(C).retain(P,(0,O.default)(H)))}},{key:"getContents",value:function(C,P){return this.delta.slice(C,C+P)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(C,P){return C.concat(P.delta())},new c.default)}},{key:"getFormat",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=[],H=[];P===0?this.scroll.path(C).forEach(function(D){var q=o(D,1),W=q[0];W instanceof _.default?N.push(W):W instanceof f.default.Leaf&&H.push(W)}):(N=this.scroll.lines(C,P),H=this.scroll.descendants(f.default.Leaf,C,P));var $=[N,H].map(function(D){if(D.length===0)return{};for(var q=(0,b.bubbleFormats)(D.shift());Object.keys(q).length>0;){var W=D.shift();if(W==null)return q;q=F((0,b.bubbleFormats)(W),q)}return q});return w.default.apply(w.default,$)}},{key:"getText",value:function(C,P){return this.getContents(C,P).filter(function(N){return typeof N.insert=="string"}).map(function(N){return N.insert}).join("")}},{key:"insertEmbed",value:function(C,P,N){return this.scroll.insertAt(C,P,N),this.update(new c.default().retain(C).insert(I({},P,N)))}},{key:"insertText",value:function(C,P){var N=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return P=P.replace(/\r\n/g,`
|
|
26
|
+
`))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
27
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=wi(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}xh.peek=ew;function xh(e){return e.value||""}function ew(){return"<"}wh.peek=tw;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 tw(){return"!"}_h.peek=nw;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 nw(){return"!"}vh.peek=rw;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 rw(){return"`"}function Nh(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))}kh.peek=iw;function kh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(Nh(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 iw(e,t,n){return Nh(e,n)?"<":"["}Ah.peek=sw;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 sw(){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 ow(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 aw(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 lw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?aw(n):Zl(n);const a=e.ordered?o==="."?")":".":ow(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 cw(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 uw(e,t,n,r){const i=cw(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 dw(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 gw;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?fw(e):hw(e);if(typeof e=="string")return pw(e);throw new Error("Expected function, string, or object as test")};function fw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function hw(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function pw(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(mw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function gw(){return!0}function mw(e){return e!==null&&typeof e=="object"&&"type"in e}const bw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yw(e,t,n,r){return(e.children.some(function(o){return bw(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=xw;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=Ls(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=wi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ls(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+wi(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function xw(e,t,n){return n.options.strong||"*"}function ww(e,t,n,r){return n.safe(e.value,r)}function _w(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 vw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(_w(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:Cx,break:Tu,code:Dx,definition:Bx,emphasis:gh,hardBreak:Tu,heading:Jx,html:xh,image:wh,imageReference:_h,inlineCode:vh,link:kh,linkReference:Ah,list:lw,listItem:uw,paragraph:dw,root:yw,strong:Ch,text:ww,thematicBreak:vw};function Nw(){return{enter:{table:kw,tableData:Ou,tableHeader:Ou,tableRow:Sw},exit:{codeText:Tw,table:Aw,tableData:xa,tableHeader:xa,tableRow:xa}}}function kw(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 Aw(e){this.exit(e),this.data.inTable=void 0}function Sw(e){this.enter({type:"tableRow",children:[]},e)}function xa(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Tw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Cw));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Cw(e,t){return t==="|"?t:e}function Ow(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
28
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const y=d(f,m,b),w=c([y]);return w.slice(0,w.indexOf(`
|
|
29
|
+
`))}function l(f,p,m,b){const y=m.enter("tableCell"),w=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return w(),y(),v}function c(f,p){return Sx(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const w=[],v=p.enter("table");for(;++y<b.length;)w[y]=d(b[y],p,m);return v(),w}function d(f,p,m){const b=f.children;let y=-1;const w=[],v=p.enter("tableRow");for(;++y<b.length;)w[y]=l(b[y],f,p,m);return v(),w}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:Ru,taskListCheckValueUnchecked:Ru,paragraph:Lw}}}function Iw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mw}}}function Ru(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Lw(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 Mw(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 Dw(){return[Z1(),bx(),wx(),Nw(),Rw()]}function Pw(e){return{extensions:[X1(),yx(e),_x(),Ow(e),Iw()]}}const Bw={tokenize:jw,partial:!0},Rh={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Lh={tokenize:Kw,partial:!0},Fw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:qw,previous:Ph},Dh={name:"protocolAutolink",tokenize:zw,previous:Bh},wn={name:"emailAutolink",tokenize:Uw,previous:Fh},un={};function $w(){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 Uw(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(Fw,u,c)(d):d===45||d===95||Ze(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&&it(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function qw(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(Bw,e.attempt(Rh,e.attempt(Ih,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function zw(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(it(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||Os(d)||Ne(d)||Yn(d)||Ks(d)?n(d):e.attempt(Rh,e.attempt(Ih,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function jw(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 Hw(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||Ne(c)||Yn(c)||c!==45&&Ks(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 Gw(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||Ne(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Kw(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||Ne(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Ne(a)||Yn(a)?t(a):r(a)}function s(a){return it(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):it(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 Ze(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ne(e)}function Bh(e){return!it(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||Ze(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 Ww={tokenize:n_,partial:!0};function Yw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Jw,continuation:{tokenize:e_},exit:t_}},text:{91:{name:"gfmFootnoteCall",tokenize:Qw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zw,resolveTo:Xw}}}}function Zw(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=jt(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 Xw(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 Qw(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||Ne(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(jt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ne(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 Jw(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||Ne(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=jt(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Ne(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),be(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function e_(e,t,n){return e.check(Mi,t,e.attempt(Ww,t,n))}function t_(e){e.exit("gfmFootnoteDefinition")}function n_(e,t,n){const r=this;return be(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 r_(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&&xt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),xt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),xt(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=Ir(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=Ir(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class i_{constructor(){this.map=[]}add(t,n,r){s_(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 s_(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 o_(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 a_(){return{flow:{null:{name:"table",tokenize:l_,resolveAll:c_}}}}function l_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(C){let U=r.events.length-1;for(;U>-1;){const X=r.events[U][1].type;if(X==="lineEnding"||X==="linePrefix")U--;else break}const P=U>-1?r.events[U][1].type:null,ie=P==="tableHead"||P==="tableRow"?A:l;return ie===A&&r.parser.lazy[r.now().line]?n(C):ie(C)}function l(C){return e.enter("tableHead"),e.enter("tableRow"),c(C)}function c(C){return C===124||(o=!0,s+=1),u(C)}function u(C){return C===null?n(C):oe(C)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),f):n(C):ge(C)?be(e,u,"whitespace")(C):(s+=1,o&&(o=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||Ne(C)?(e.exit("data"),u(C)):(e.consume(C),C===92?h:d)}function h(C){return C===92||C===124?(e.consume(C),d):d(C)}function f(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),o=!1,ge(C)?be(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?b(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),m):O(C)}function m(C){return ge(C)?be(e,b,"whitespace")(C):b(C)}function b(C){return C===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(s+=1,y(C)):C===null||oe(C)?T(C):O(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),w(C)):O(C)}function w(C){return C===45?(e.consume(C),w):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(C))}function v(C){return ge(C)?be(e,T,"whitespace")(C):T(C)}function T(C){return C===124?p(C):C===null||oe(C)?!o||i!==s?O(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):O(C)}function O(C){return n(C)}function A(C){return e.enter("tableRow"),F(C)}function F(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),F):C===null||oe(C)?(e.exit("tableRow"),t(C)):ge(C)?be(e,F,"whitespace")(C):(e.enter("data"),$(C))}function $(C){return C===null||C===124||Ne(C)?(e.exit("data"),F(C)):(e.consume(C),C===92?B:$)}function B(C){return C===92||C===124?(e.consume(C),$):$(C)}}function c_(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 i_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Iu(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=as(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=as(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=as(h,t,s,i,n,d)):o[1]!==0&&(d=as(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Iu(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=o_(t.events,n))}return e}function as(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 Iu(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 u_={name:"tasklistCheck",tokenize:f_};function d_(){return{text:{91:u_}}}function f_(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 Ne(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 oe(l)?t(l):ge(l)?e.check({tokenize:h_},t,n)(l):n(l)}}function h_(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function p_(e){return $f([$w(),Yw(),r_(e),a_(),d_()])}const g_={};function $h(e){const t=this,n=e||g_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(p_(n)),s.push(Dw()),o.push(Pw(n))}const Uh=function(e){if(e==null)return E_;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?m_(e):b_(e);if(typeof e=="string")return y_(e);throw new Error("Expected function, string, or object as test")};function m_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(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 b_(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 y_(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(x_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function E_(){return!0}function x_(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 v_;if(typeof e=="string")return __(e);if(typeof e=="object")return w_(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function w_(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 __(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 v_(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(I_),k_=tr("p"),Bu=tr("tr"),A_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,L_]),qh=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 S_(e,t){const n=t||{},r="children"in e?e.children:[],i=qh(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
|
|
30
|
+
`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function zh(e,t,n){return e.type==="element"?T_(e,t,n):e.type==="text"?n.whitespace==="normal"?jh(e,n):C_(e):[]}function T_(e,t,n){const r=Hh(e,n),i=e.children||[];let s=-1,o=[];if(A_(e))return o;let a,l;for(tl(e)||Bu(e)&&Lu(t,e,Bu)?l=`
|
|
31
|
+
`:k_(e)?(a=2,l=2):qh(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(O_(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 C_(e){return[String(e.value)]}function O_(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 I_(e){return e.tagName==="td"||e.tagName==="th"}function L_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function M_(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},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:A.concat([{begin:/\(/,end:/\)/,keywords:T,contains:A.concat(["self"]),relevance:0}]),relevance:0},$={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(F,$,O,A,[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 D_(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=M_(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 P_(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._-]+)+/},w=["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"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[...w,...v,"set","shopt",...T,...O]},contains:[f,e.SHEBANG(),p,d,s,o,y,a,l,c,u,n]}}function B_(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],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},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(w,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 F_(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},O={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[O,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:A.concat([{begin:/\(/,end:/\)/,keywords:T,contains:A.concat(["self"]),relevance:0}]),relevance:0},$={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(F,$,O,A,[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 $_(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]},w={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,w,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,w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+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,w],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 U_=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_-]*/}}),q_=["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"],z_=["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"],j_=[...q_,...z_],H_=["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(),G_=["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(),K_=["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 W_(e){const t=e.regex,n=U_(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:":("+G_.join("|")+")"},{begin:":(:)?("+K_.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:H_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+j_.join("|")+")\\b"}]}}function Y_(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 Z_(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 X_(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 Q_(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 Er="[0-9](_*[0-9])*",ls=`\\.(${Er})`,cs="[0-9a-fA-F](_*[0-9a-fA-F])*",Fu={className:"number",variants:[{begin:`(\\b(${Er})((${ls})|\\.)?|(${ls}))[eE][+-]?(${Er})[fFdD]?\\b`},{begin:`\\b(${Er})((${ls})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ls})[fFdD]?\\b`},{begin:`\\b(${Er})[fFdD]\\b`},{begin:`\\b0[xX]((${cs})\\.?|(${cs})?\\.(${cs}))[pP][+-]?(${Er})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${cs})[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 J_(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 $u="[A-Za-z$_][0-9A-Za-z$_]*",ev=["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"],tv=["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"],Vh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Wh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],nv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],rv=[].concat(Wh,Kh,Vh);function iv(e){const t=e.regex,n=(q,{after:W})=>{const x="</"+q[0].slice(1);return q.input.indexOf(x,W)!==-1},r=$u,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,W)=>{const x=q[0].length+q.index,Q=q.input[x];if(Q==="<"||Q===","){W.ignoreMatch();return}Q===">"&&(n(q,{after:x})||W.ignoreMatch());let ae;const N=q.input.substring(x);if(ae=N.match(/^\s*=/)){W.ignoreMatch();return}if((ae=N.match(/^\s+extends\s+/))&&ae.index===0){W.ignoreMatch();return}}},a={$pattern:$u,keyword:ev,literal:tv,built_in:rv,"variable.language":nv},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]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},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(w,h.contains),O=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:O},F={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"}}]},$={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,...Vh]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(q){return t.concat("(?!",q.join("|"),")")}const ie={match:t.concat(/\b/,P([...Wh,"super","import"].map(q=>`${q}\\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},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,w,{match:/\$\d+/},d,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin: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:O}]}]},{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"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,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:[A]},ie,U,F,Z,{match:/\$[(.]/}]}}function sv(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 xr="[0-9](_*[0-9])*",us=`\\.(${xr})`,ds="[0-9a-fA-F](_*[0-9a-fA-F])*",ov={className:"number",variants:[{begin:`(\\b(${xr})((${us})|\\.)?|(${us}))[eE][+-]?(${xr})[fFdD]?\\b`},{begin:`\\b(${xr})((${us})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${us})[fFdD]?\\b`},{begin:`\\b(${xr})[fFdD]\\b`},{begin:`\\b0[xX]((${ds})\\.?|(${ds})?\\.(${ds}))[pP][+-]?(${xr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ds})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function av(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=ov,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
32
|
+
`},c]}}const lv=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_-]*/}}),cv=["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"],uv=["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"],dv=[...cv,...uv],fv=["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(),hv=["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(),pv=Yh.concat(Zh).sort().reverse();function gv(e){const t=lv(e),n=pv,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,O){return{className:v,begin:T,relevance:O}},u={$pattern:/[a-z-]+/,keyword:r,attribute:fv.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("+hv.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("+dv.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]},w={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,w,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function mv(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 bv(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 yv(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 xv(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 w=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,w,/(?:\\.|[^\\\/])*?/,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 wv(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,Z)=>{Z.data._beginMatch=X[1]||X[2]},"on:end":(X,Z)=>{Z.data._beginMatch!==X[1]&&Z.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"],w=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],T={keyword:y,literal:(X=>{const Z=[];return X.forEach(L=>{Z.push(L),L.toLowerCase()===L?Z.push(L.toUpperCase()):Z.push(L.toLowerCase())}),Z})(b),built_in:w},O=X=>X.map(Z=>Z.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(w).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},F=t.concat(r,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),F],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),F],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"}}]},B={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},C={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[B,o,$,e.C_BLOCK_COMMENT_MODE,p,m,A]},U={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(y).join("\\b|"),"|",O(w).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[C]};C.contains.push(U);const P=[B,$,e.C_BLOCK_COMMENT_MODE,p,m,A],ie={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:[ie,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,U,$,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{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",ie,o,$,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 _v(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 vv(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 kv(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Av(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 Sv(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}]},A=[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=A,m.contains=A;const C=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:A}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(C).concat(c).concat(A)}}function Tv(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 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_-]*/}}),Ov=["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"],Iv=[...Ov,...Rv],Lv=["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(),Mv=["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(),Dv=["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();function Bv(e){const t=Cv(e),n=Dv,r=Mv,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("+Iv.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("+Pv.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:Lv.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 Fv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function $v(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(O=>!u.includes(O)),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 w(O){return t.concat(/\b/,t.either(...O.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const v={scope:"keyword",match:w(h),relevance:0};function T(O,{exceptions:A,when:F}={}){const $=F;return A=A||[],O.map(B=>B.match(/\|\d+$/)||A.includes(B)?B:$(B)?`${B}|0`:B)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:O=>O.length<3}),literal:s,type:a,built_in:d},contains:[{scope:"type",match:w(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 oi(e){return _e("(?=",e,")")}function _e(...e){return e.map(n=>Xh(n)).join("")}function Uv(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function rt(...e){return"("+(Uv(e).capture?"":"?:")+e.map(r=>Xh(r)).join("|")+")"}const Jl=e=>_e(/\b/,e,/\w$/.test(e)?/\b/:/\B/),qv=["Protocol","Type"].map(Jl),Uu=["init","self"].map(Jl),zv=["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"],qu=["false","nil","true"],jv=["assignment","associativity","higherThan","left","lowerThan","none","right"],Hv=["#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=rt(/[/=\-+!*%<>&|^~?]/,/[\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=rt(Qh,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_a=_e(Qh,Jh,"*"),ep=rt(/[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]/),Ms=rt(ep,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),nn=_e(ep,Ms,"*"),fs=_e(/[A-Z]/,Ms,"*"),Gv=["attached","autoclosure",_e(/convention\(/,rt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",_e(/objc\(/,nn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Kv=["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:[/\./,rt(...qv,...Uu)],className:{2:"keyword"}},s={match:_e(/\./,rt(...wa)),relevance:0},o=wa.filter(pe=>typeof pe=="string").concat(["_|0"]),a=wa.filter(pe=>typeof pe!="string").concat(zv).map(Jl),l={variants:[{className:"keyword",match:rt(...a,...Uu)}]},c={$pattern:rt(/\b\w+/,/#\w+/),keyword:o.concat(Hv),literal:qu},u=[i,s,l],d={match:_e(/\./,rt(...zu)),relevance:0},h={className:"built_in",match:_e(/\b/,rt(...zu),/(?=\()/)},f=[d,h],p={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:_a},{match:`\\.(\\.|${Jh})+`}]},b=[p,m],y="([0-9]_*)+",w="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${w})(\\.(${w}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},T=(pe="")=>({className:"subst",variants:[{match:_e(/\\/,pe,/[0\\tnr"']/)},{match:_e(/\\/,pe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(pe="")=>({className:"subst",match:_e(/\\/,pe,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(pe="")=>({className:"subst",label:"interpol",begin:_e(/\\/,pe,/\(/),end:/\)/}),F=(pe="")=>({begin:_e(pe,/"""/),end:_e(/"""/,pe),contains:[T(pe),O(pe),A(pe)]}),$=(pe="")=>({begin:_e(pe,/"/),end:_e(/"/,pe),contains:[T(pe),A(pe)]}),B={className:"string",variants:[F(),F("#"),F("##"),F("###"),$(),$("#"),$("##"),$("###")]},C=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],U={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:C},P=pe=>{const je=_e(pe,/\//),re=_e(/\//,pe);return{begin:je,end:re,contains:[...C,{scope:"comment",begin:`#(?!.*${re})`,end:/$/}]}},ie={scope:"regexp",variants:[P("###"),P("##"),P("#"),U]},X={match:_e(/`/,nn,/`/)},Z={className:"variable",match:/\$\d+/},L={className:"variable",match:`\\$${Ms}+`},j=[X,Z,L],q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Kv,contains:[...b,v,B]}]}},W={scope:"keyword",match:_e(/@/,rt(...Gv),oi(rt(/\(/,/\s+/)))},x={scope:"meta",match:_e(/@/,nn)},Q=[q,W,x],ae={match:oi(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:_e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ms,"+")},{className:"type",match:fs,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:_e(/\s+&\s+/,oi(fs)),relevance:0}]},N={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...Q,p,ae]};ae.contains.push(N);const he={match:_e(nn,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",he,...r,ie,...u,...f,...b,v,B,...j,...Q,ae]},we={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ae]},ot={begin:rt(oi(_e(nn,/\s*:/)),oi(_e(nn,/\s+/,nn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:nn}]},ke={begin:/\(/,end:/\)/,keywords:c,contains:[ot,...r,...u,...b,v,B,...Q,ae,se],endsParent:!0,illegal:/["']/},Je={match:[/(func|macro)/,/\s+/,rt(X.match,nn,_a)],className:{1:"keyword",3:"title.function"},contains:[we,ke,t],illegal:[/\[/,/%/]},et={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[we,ke,t],illegal:/\[|%/},at={match:[/operator/,/\s+/,_a],className:{1:"keyword",3:"title"}},It={begin:[/precedencegroup/,/\s+/,fs],className:{1:"keyword",3:"title"},contains:[ae],keywords:[...jv,...qu],end:/}/},mt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},_t={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ie={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,nn,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[we,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:fs},...u],relevance:0}]};for(const pe of B.variants){const je=pe.contains.find(Lt=>Lt.label==="interpol");je.keywords=c;const re=[...u,...f,...b,v,B,...j];je.contains=[...re,{begin:/\(/,end:/\)/,contains:["self",...re]}]}return{name:"Swift",keywords:c,contains:[...r,Je,et,mt,_t,Ie,at,It,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},ie,...u,...f,...b,v,B,...j,...Q,ae,se]}}const Ds="[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 Wv(e){const t=e.regex,n=(q,{after:W})=>{const x="</"+q[0].slice(1);return q.input.indexOf(x,W)!==-1},r=Ds,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,W)=>{const x=q[0].length+q.index,Q=q.input[x];if(Q==="<"||Q===","){W.ignoreMatch();return}Q===">"&&(n(q,{after:x})||W.ignoreMatch());let ae;const N=q.input.substring(x);if(ae=N.match(/^\s*=/)){W.ignoreMatch();return}if((ae=N.match(/^\s+extends\s+/))&&ae.index===0){W.ignoreMatch();return}}},a={$pattern:Ds,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]},w={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},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(w,h.contains),O=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:O},F={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"}}]},$={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]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},C={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(q){return t.concat("(?!",q.join("|"),")")}const ie={match:t.concat(/\b/,P([...sp,"super","import"].map(q=>`${q}\\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},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,w,{match:/\$\d+/},d,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},j,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,e.REGEXP_MODE,{className:"function",begin: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:O}]}]},{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"]}]}]},C,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,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:[A]},ie,U,F,Z,{match:/\$[(.]/}]}}function Yv(e){const t=e.regex,n=Wv(e),r=Ds,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:Ds,keyword:tp.concat(l),literal:np,built_in:ap.concat(i),"variable.language":op},u={className:"meta",begin:"@"+r},d=(m,b,y)=>{const w=m.contains.findIndex(v=>v.label===b);if(w===-1)throw new Error("can not find mode to replace");m.contains.splice(w,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 Zv(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 Xv(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 Qv(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 Jv(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 eN={arduino:D_,bash:P_,c:B_,cpp:F_,csharp:$_,css:W_,diff:Y_,go:Z_,graphql:X_,ini:Q_,java:J_,javascript:iv,json:sv,kotlin:av,less:gv,lua:mv,makefile:bv,markdown:yv,objectivec:Ev,perl:xv,php:wv,"php-template":_v,plaintext:vv,python:Nv,"python-repl":kv,r:Av,ruby:Sv,rust:Tv,scss:Bv,shell:Fv,sql:$v,swift:Vv,typescript:Yv,vbnet:Zv,wasm:Xv,xml:Qv,yaml:Jv};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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Rn(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 tN="</span>",Hu=e=>!!e.scope,nN=(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 rN{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=nN(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Hu(t)&&(this.buffer+=tN)}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 iN 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 rN(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function _i(e){return e?typeof e=="string"?e:e.source:null}function up(e){return nr("(?=",e,")")}function sN(e){return nr("(?:",e,")*")}function oN(e){return nr("(?:",e,")?")}function nr(...e){return e.map(n=>_i(n)).join("")}function aN(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"("+(aN(e).capture?"":"?:")+e.map(r=>_i(r)).join("|")+")"}function dp(e){return new RegExp(e.toString()+"|").exec("").length-1}function lN(e,t){const n=e&&e.exec(t);return n&&n.index===0}const cN=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nc(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=_i(r),o="";for(;s.length>0;){const a=cN.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 uN=/\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]+)",dN="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",fN=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=nr(t,/.*\b/,e.binary,/\b.*/)),Rn({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},vi={begin:"\\\\[\\s\\S]",relevance:0},hN={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[vi]},pN={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[vi]},gN={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/},to=function(e,t,n={}){const r=Rn({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},mN=to("//","$"),bN=to("/\\*","\\*/"),yN=to("#","$"),EN={scope:"number",begin:hp,relevance:0},xN={scope:"number",begin:pp,relevance:0},wN={scope:"number",begin:gp,relevance:0},_N={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[vi,{begin:/\[/,end:/\]/,relevance:0,contains:[vi]}]},vN={scope:"title",begin:fp,relevance:0},NN={scope:"title",begin:rc,relevance:0},kN={begin:"\\.\\s*"+rc,relevance:0},AN=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 hs=Object.freeze({__proto__:null,APOS_STRING_MODE:hN,BACKSLASH_ESCAPE:vi,BINARY_NUMBER_MODE:wN,BINARY_NUMBER_RE:gp,COMMENT:to,C_BLOCK_COMMENT_MODE:bN,C_LINE_COMMENT_MODE:mN,C_NUMBER_MODE:xN,C_NUMBER_RE:pp,END_SAME_AS_BEGIN:AN,HASH_COMMENT_MODE:yN,IDENT_RE:fp,MATCH_NOTHING_RE:uN,METHOD_GUARD:kN,NUMBER_MODE:EN,NUMBER_RE:hp,PHRASAL_WORDS_MODE:gN,QUOTE_STRING_MODE:pN,REGEXP_MODE:_N,RE_STARTERS_RE:dN,SHEBANG:fN,TITLE_MODE:vN,UNDERSCORE_IDENT_RE:rc,UNDERSCORE_TITLE_MODE:NN});function SN(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function TN(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function CN(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=SN,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ON(e,t){Array.isArray(e.illegal)&&(e.illegal=tc(...e.illegal))}function RN(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 IN(e,t){e.relevance===void 0&&(e.relevance=1)}const LN=(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},MN=["of","and","for","in","not","or","if","then","parent","list","value"],DN="keyword";function mp(e,t,n=DN){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,PN(l[0],l[1])]})}}function PN(e,t){return t?Number(t):BN(e)?0:1}function BN(e){return MN.includes(e.toLowerCase())}const Ku={},Vn=e=>{console.error(e)},Vu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},br=(e,t)=>{Ku[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ku[`${e}/${t}`]=!0)},Ps=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 FN(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Vn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ps;if(typeof e.beginScope!="object"||e.beginScope===null)throw Vn("beginScope must be object"),Ps;bp(e,e.begin,{key:"beginScope"}),e.begin=nc(e.begin,{joinWith:""})}}function $N(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Vn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ps;if(typeof e.endScope!="object"||e.endScope===null)throw Vn("endScope must be object"),Ps;bp(e,e.end,{key:"endScope"}),e.end=nc(e.end,{joinWith:""})}}function UN(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function qN(e){UN(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),FN(e),$N(e)}function zN(e){function t(o,a){return new RegExp(_i(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;[TN,RN,qN,LN].forEach(u=>u(o,a)),e.compilerExtensions.forEach(u=>u(o,a)),o.__beforeBegin=null,[CN,ON,IN].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=_i(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 jN(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=Rn(e.classNameAliases||{}),s(e)}function yp(e){return e?e.endsWithParent||yp(e.starts):!1}function jN(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Rn(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yp(e)?Rn(e,{starts:e.starts?Rn(e.starts):null}):Object.isFrozen(e)?Rn(e):e}var HN="11.11.1";class GN extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const va=cp,Wu=Rn,Yu=Symbol("nomatch"),KN=7,Ep=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:iN};function l(L){return a.noHighlightRe.test(L)}function c(L){let j=L.className+" ";j+=L.parentNode?L.parentNode.className:"";const q=a.languageDetectRe.exec(j);if(q){const W=$(q[1]);return W||(Vu(s.replace("{}",q[1])),Vu("Falling back to no-highlight mode for this block.",L)),W?q[1]:"no-highlight"}return j.split(/\s+/).find(W=>l(W)||$(W))}function u(L,j,q){let W="",x="";typeof j=="object"?(W=L,q=j.ignoreIllegals,x=j.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`),x=L,W=j),q===void 0&&(q=!0);const Q={code:W,language:x};X("before:highlight",Q);const ae=Q.result?Q.result:d(Q.language,Q.code,q);return ae.code=Q.code,X("after:highlight",ae),ae}function d(L,j,q,W){const x=Object.create(null);function Q(S,R){return S.keywords[R]}function ae(){if(!re.keywords){ve.addText(me);return}let S=0;re.keywordPatternRe.lastIndex=0;let R=re.keywordPatternRe.exec(me),H="";for(;R;){H+=me.substring(S,R.index);const K=Ie.case_insensitive?R[0].toLowerCase():R[0],te=Q(re,K);if(te){const[Ae,ct]=te;if(ve.addText(H),H="",x[K]=(x[K]||0)+1,x[K]<=KN&&(Mt+=ct),Ae.startsWith("_"))H+=R[0];else{const tt=Ie.classNameAliases[Ae]||Ae;se(R[0],tt)}}else H+=R[0];S=re.keywordPatternRe.lastIndex,R=re.keywordPatternRe.exec(me)}H+=me.substring(S),ve.addText(H)}function N(){if(me==="")return;let S=null;if(typeof re.subLanguage=="string"){if(!t[re.subLanguage]){ve.addText(me);return}S=d(re.subLanguage,me,!0,Lt[re.subLanguage]),Lt[re.subLanguage]=S._top}else S=f(me,re.subLanguage.length?re.subLanguage:null);re.relevance>0&&(Mt+=S.relevance),ve.__addSublanguage(S._emitter,S.language)}function he(){re.subLanguage!=null?N():ae(),me=""}function se(S,R){S!==""&&(ve.startScope(R),ve.addText(S),ve.endScope())}function we(S,R){let H=1;const K=R.length-1;for(;H<=K;){if(!S._emit[H]){H++;continue}const te=Ie.classNameAliases[S[H]]||S[H],Ae=R[H];te?se(Ae,te):(me=Ae,ae(),me=""),H++}}function ot(S,R){return S.scope&&typeof S.scope=="string"&&ve.openNode(Ie.classNameAliases[S.scope]||S.scope),S.beginScope&&(S.beginScope._wrap?(se(me,Ie.classNameAliases[S.beginScope._wrap]||S.beginScope._wrap),me=""):S.beginScope._multi&&(we(S.beginScope,R),me="")),re=Object.create(S,{parent:{value:re}}),re}function ke(S,R,H){let K=lN(S.endRe,H);if(K){if(S["on:end"]){const te=new ju(S);S["on:end"](R,te),te.isMatchIgnored&&(K=!1)}if(K){for(;S.endsParent&&S.parent;)S=S.parent;return S}}if(S.endsWithParent)return ke(S.parent,R,H)}function Je(S){return re.matcher.regexIndex===0?(me+=S[0],1):(vt=!0,0)}function et(S){const R=S[0],H=S.rule,K=new ju(H),te=[H.__beforeBegin,H["on:begin"]];for(const Ae of te)if(Ae&&(Ae(S,K),K.isMatchIgnored))return Je(R);return H.skip?me+=R:(H.excludeBegin&&(me+=R),he(),!H.returnBegin&&!H.excludeBegin&&(me=R)),ot(H,S),H.returnBegin?0:R.length}function at(S){const R=S[0],H=j.substring(S.index),K=ke(re,S,H);if(!K)return Yu;const te=re;re.endScope&&re.endScope._wrap?(he(),se(R,re.endScope._wrap)):re.endScope&&re.endScope._multi?(he(),we(re.endScope,S)):te.skip?me+=R:(te.returnEnd||te.excludeEnd||(me+=R),he(),te.excludeEnd&&(me=R));do re.scope&&ve.closeNode(),!re.skip&&!re.subLanguage&&(Mt+=re.relevance),re=re.parent;while(re!==K.parent);return K.starts&&ot(K.starts,S),te.returnEnd?0:R.length}function It(){const S=[];for(let R=re;R!==Ie;R=R.parent)R.scope&&S.unshift(R.scope);S.forEach(R=>ve.openNode(R))}let mt={};function _t(S,R){const H=R&&R[0];if(me+=S,H==null)return he(),0;if(mt.type==="begin"&&R.type==="end"&&mt.index===R.index&&H===""){if(me+=j.slice(R.index,R.index+1),!i){const K=new Error(`0 width match regex (${L})`);throw K.languageName=L,K.badRule=mt.rule,K}return 1}if(mt=R,R.type==="begin")return et(R);if(R.type==="illegal"&&!q){const K=new Error('Illegal lexeme "'+H+'" for mode "'+(re.scope||"<unnamed>")+'"');throw K.mode=re,K}else if(R.type==="end"){const K=at(R);if(K!==Yu)return K}if(R.type==="illegal"&&H==="")return me+=`
|
|
35
|
+
`,1;if(He>1e5&&He>R.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=H,H.length}const Ie=$(L);if(!Ie)throw Vn(s.replace("{}",L)),new Error('Unknown language: "'+L+'"');const pe=zN(Ie);let je="",re=W||pe;const Lt={},ve=new a.__emitter(a);It();let me="",Mt=0,lt=0,He=0,vt=!1;try{if(Ie.__emitTokens)Ie.__emitTokens(j,ve);else{for(re.matcher.considerAll();;){He++,vt?vt=!1:re.matcher.considerAll(),re.matcher.lastIndex=lt;const S=re.matcher.exec(j);if(!S)break;const R=j.substring(lt,S.index),H=_t(R,S);lt=S.index+H}_t(j.substring(lt))}return ve.finalize(),je=ve.toHTML(),{language:L,value:je,relevance:Mt,illegal:!1,_emitter:ve,_top:re}}catch(S){if(S.message&&S.message.includes("Illegal"))return{language:L,value:va(j),illegal:!0,relevance:0,_illegalBy:{message:S.message,index:lt,context:j.slice(lt-100,lt+100),mode:S.mode,resultSoFar:je},_emitter:ve};if(i)return{language:L,value:va(j),illegal:!1,relevance:0,errorRaised:S,_emitter:ve,_top:re};throw S}}function h(L){const j={value:va(L),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return j._emitter.addText(L),j}function f(L,j){j=j||a.languages||Object.keys(t);const q=h(L),W=j.filter($).filter(C).map(he=>d(he,L,!1));W.unshift(q);const x=W.sort((he,se)=>{if(he.relevance!==se.relevance)return se.relevance-he.relevance;if(he.language&&se.language){if($(he.language).supersetOf===se.language)return 1;if($(se.language).supersetOf===he.language)return-1}return 0}),[Q,ae]=x,N=Q;return N.secondBest=ae,N}function p(L,j,q){const W=j&&n[j]||q;L.classList.add("hljs"),L.classList.add(`language-${W}`)}function m(L){let j=null;const q=c(L);if(l(q))return;if(X("before:highlightElement",{el:L,language:q}),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 GN("One of your code blocks includes unescaped HTML.",L.innerHTML);j=L;const W=j.textContent,x=q?u(W,{language:q,ignoreIllegals:!0}):f(W);L.innerHTML=x.value,L.dataset.highlighted="yes",p(L,q,x.language),L.result={language:x.language,re:x.relevance,relevance:x.relevance},x.secondBest&&(L.secondBest={language:x.secondBest.language,relevance:x.secondBest.relevance}),X("after:highlightElement",{el:L,result:x,text:W})}function b(L){a=Wu(a,L)}const y=()=>{T(),br("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function w(){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 O(L,j){let q=null;try{q=j(e)}catch(W){if(Vn("Language definition for '{}' could not be registered.".replace("{}",L)),i)Vn(W);else throw W;q=o}q.name||(q.name=L),t[L]=q,q.rawDefinition=j.bind(null,e),q.aliases&&B(q.aliases,{languageName:L})}function A(L){delete t[L];for(const j of Object.keys(n))n[j]===L&&delete n[j]}function F(){return Object.keys(t)}function $(L){return L=(L||"").toLowerCase(),t[L]||t[n[L]]}function B(L,{languageName:j}){typeof L=="string"&&(L=[L]),L.forEach(q=>{n[q.toLowerCase()]=j})}function C(L){const j=$(L);return j&&!j.disableAutodetect}function U(L){L["before:highlightBlock"]&&!L["before:highlightElement"]&&(L["before:highlightElement"]=j=>{L["before:highlightBlock"](Object.assign({block:j.el},j))}),L["after:highlightBlock"]&&!L["after:highlightElement"]&&(L["after:highlightElement"]=j=>{L["after:highlightBlock"](Object.assign({block:j.el},j))})}function P(L){U(L),r.push(L)}function ie(L){const j=r.indexOf(L);j!==-1&&r.splice(j,1)}function X(L,j){const q=L;r.forEach(function(W){W[q]&&W[q](j)})}function Z(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:Z,configure:b,initHighlighting:y,initHighlightingOnLoad:w,registerLanguage:O,unregisterLanguage:A,listLanguages:F,getLanguage:$,registerAliases:B,autoDetection:C,inherit:Wu,addPlugin:P,removePlugin:ie}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=HN,e.regex={concat:nr,lookahead:up,either:tc,optional:oN,anyNumberOfTimes:sN};for(const L in hs)typeof hs[L]=="object"&&lp(hs[L]);return Object.assign(e,hs),e},Lr=Ep({});Lr.newInstance=()=>Ep({});var VN=Lr;Lr.HighlightJS=Lr;Lr.default=Lr;const WN=Li(VN),Zu={},YN="hljs-";function ZN(e){const t=WN.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:YN;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:XN,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 XN{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 xp=function(e){if(e==null)return tk;if(typeof e=="function")return no(e);if(typeof e=="object")return Array.isArray(e)?QN(e):JN(e);if(typeof e=="string")return ek(e);throw new Error("Expected function, string, or object as test")};function QN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xp(e[n]);return no(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function JN(e){const t=e;return no(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function ek(e){return no(t);function t(n){return n&&n.type===e}}function no(e){return t;function t(n,r,i){return!!(nk(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function tk(){return!0}function nk(e){return e!==null&&typeof e=="object"&&"type"in e}const wp=[],rk=!0,Xu=!1,ik="skip";function sk(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=xp(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=ok(n(l,u)),f[0]===Xu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==ik)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const w=y.children[m];if(p=a(w,m,b)(),p[0]===Xu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function ok(e){return Array.isArray(e)?e:typeof e=="number"?[rk,e]:e==null?wp:[e]}function ak(e,t,n,r){let i,s,o;s=t,o=n,i=r,sk(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 lk={};function _p(e){const t=e||lk,n=t.aliases,r=t.detect||!1,i=t.languages||eN,s=t.plainText,o=t.prefix,a=t.subset;let l="hljs";const c=ZN(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){ak(u,"element",function(h,f,p){if(h.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const m=ck(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=S_(h,{whitespace:"pre"});let y;try{y=m?c.highlight(m,b,{prefix:o}):c.highlightAuto(b,{prefix:o,subset:a})}catch(w){const v=w;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 ck(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 uk({article:e,onBack:t,onEdit:n,showActions:r=!1}){return _.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&_.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&_.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[_.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&_.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:[_.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.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"]})]}),_.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[_.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[_.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),_.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:_.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&&_.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),_.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===Fe.Published?"bg-green-100 text-green-800":e.status===Fe.Draft?"bg-gray-100 text-gray-800":e.status===Fe.Review?"bg-yellow-100 text-yellow-800":e.status===Fe.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Fe[e.status]})]}),e.tags&&e.tags.length>0&&_.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>_.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&&_.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>_.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),_.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:_.jsx(ch,{remarkPlugins:[$h],rehypePlugins:[_p],children:e.content})})]})]})}var vp=typeof global=="object"&&global&&global.Object===Object&&global,dk=typeof self=="object"&&self&&self.Object===Object&&self,dn=vp||dk||Function("return this")(),Dn=dn.Symbol,Np=Object.prototype,fk=Np.hasOwnProperty,hk=Np.toString,ai=Dn?Dn.toStringTag:void 0;function pk(e){var t=fk.call(e,ai),n=e[ai];try{e[ai]=void 0;var r=!0}catch{}var i=hk.call(e);return r&&(t?e[ai]=n:delete e[ai]),i}var gk=Object.prototype,mk=gk.toString;function bk(e){return mk.call(e)}var yk="[object Null]",Ek="[object Undefined]",Qu=Dn?Dn.toStringTag:void 0;function zr(e){return e==null?e===void 0?Ek:yk:Qu&&Qu in Object(e)?pk(e):bk(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 kp(e){return e}var xk="[object AsyncFunction]",wk="[object Function]",_k="[object GeneratorFunction]",vk="[object Proxy]";function ic(e){if(!Bn(e))return!1;var t=zr(e);return t==wk||t==_k||t==xk||t==vk}var Na=dn["__core-js_shared__"],Ju=function(){var e=/[^.]+$/.exec(Na&&Na.keys&&Na.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Nk(e){return!!Ju&&Ju in e}var kk=Function.prototype,Ak=kk.toString;function rr(e){if(e!=null){try{return Ak.call(e)}catch{}try{return e+""}catch{}}return""}var Sk=/[\\^$.*+?()[\]{}|]/g,Tk=/^\[object .+?Constructor\]$/,Ck=Function.prototype,Ok=Object.prototype,Rk=Ck.toString,Ik=Ok.hasOwnProperty,Lk=RegExp("^"+Rk.call(Ik).replace(Sk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mk(e){if(!Bn(e)||Nk(e))return!1;var t=ic(e)?Lk:Tk;return t.test(rr(e))}function Dk(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=Dk(e,t);return Mk(n)?n:void 0}var nl=ir(dn,"WeakMap"),ed=Object.create,Pk=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 Bk(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 Fk(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $k=800,Uk=16,qk=Date.now;function zk(e){var t=0,n=0;return function(){var r=qk(),i=Uk-(r-n);if(n=r,i>0){if(++t>=$k)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function jk(e){return function(){return e}}var Bs=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Hk=Bs?function(e,t){return Bs(e,"toString",{configurable:!0,enumerable:!1,value:jk(t),writable:!0})}:kp,Gk=zk(Hk);function Kk(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Vk=9007199254740991,Wk=/^(?:0|[1-9]\d*)$/;function Ap(e,t){var n=typeof e;return t=t??Vk,!!t&&(n=="number"||n!="symbol"&&Wk.test(e))&&e>-1&&e%1==0&&e<t}function sc(e,t,n){t=="__proto__"&&Bs?Bs(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pi(e,t){return e===t||e!==e&&t!==t}var Yk=Object.prototype,Zk=Yk.hasOwnProperty;function Sp(e,t,n){var r=e[t];(!(Zk.call(e,t)&&Pi(r,n))||n===void 0&&!(t in e))&&sc(e,t,n)}function Xk(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 Qk(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),Bk(e,this,a)}}function Jk(e,t){return Gk(Qk(e,t,kp),e+"")}var eA=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=eA}function ro(e){return e!=null&&Tp(e.length)&&!ic(e)}function tA(e,t,n){if(!Bn(n))return!1;var r=typeof t;return(r=="number"?ro(n)&&Ap(t,n.length):r=="string"&&t in n)?Pi(n[t],e):!1}function nA(e){return Jk(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&&tA(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 rA=Object.prototype;function oc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rA;return e===n}function iA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var sA="[object Arguments]";function nd(e){return yn(e)&&zr(e)==sA}var Cp=Object.prototype,oA=Cp.hasOwnProperty,aA=Cp.propertyIsEnumerable,rl=nd(function(){return arguments}())?nd:function(e){return yn(e)&&oA.call(e,"callee")&&!aA.call(e,"callee")};function lA(){return!1}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=Op&&typeof module=="object"&&module&&!module.nodeType&&module,cA=rd&&rd.exports===Op,id=cA?dn.Buffer:void 0,uA=id?id.isBuffer:void 0,Ni=uA||lA,dA="[object Arguments]",fA="[object Array]",hA="[object Boolean]",pA="[object Date]",gA="[object Error]",mA="[object Function]",bA="[object Map]",yA="[object Number]",EA="[object Object]",xA="[object RegExp]",wA="[object Set]",_A="[object String]",vA="[object WeakMap]",NA="[object ArrayBuffer]",kA="[object DataView]",AA="[object Float32Array]",SA="[object Float64Array]",TA="[object Int8Array]",CA="[object Int16Array]",OA="[object Int32Array]",RA="[object Uint8Array]",IA="[object Uint8ClampedArray]",LA="[object Uint16Array]",MA="[object Uint32Array]",Oe={};Oe[AA]=Oe[SA]=Oe[TA]=Oe[CA]=Oe[OA]=Oe[RA]=Oe[IA]=Oe[LA]=Oe[MA]=!0;Oe[dA]=Oe[fA]=Oe[NA]=Oe[hA]=Oe[kA]=Oe[pA]=Oe[gA]=Oe[mA]=Oe[bA]=Oe[yA]=Oe[EA]=Oe[xA]=Oe[wA]=Oe[_A]=Oe[vA]=!1;function DA(e){return yn(e)&&Tp(e.length)&&!!Oe[zr(e)]}function ac(e){return function(t){return e(t)}}var Rp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mi=Rp&&typeof module=="object"&&module&&!module.nodeType&&module,PA=mi&&mi.exports===Rp,ka=PA&&vp.process,Mr=function(){try{var e=mi&&mi.require&&mi.require("util").types;return e||ka&&ka.binding&&ka.binding("util")}catch{}}(),sd=Mr&&Mr.isTypedArray,lc=sd?ac(sd):DA,BA=Object.prototype,FA=BA.hasOwnProperty;function Ip(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?iA(e.length,String):[],l=a.length;for(var c in e)(t||FA.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 $A=Lp(Object.keys,Object),UA=Object.prototype,qA=UA.hasOwnProperty;function zA(e){if(!oc(e))return $A(e);var t=[];for(var n in Object(e))qA.call(e,n)&&n!="constructor"&&t.push(n);return t}function jA(e){return ro(e)?Ip(e):zA(e)}function HA(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var GA=Object.prototype,KA=GA.hasOwnProperty;function VA(e){if(!Bn(e))return HA(e);var t=oc(e),n=[];for(var r in e)r=="constructor"&&(t||!KA.call(e,r))||n.push(r);return n}function Mp(e){return ro(e)?Ip(e,!0):VA(e)}var ki=ir(Object,"create");function WA(){this.__data__=ki?ki(null):{},this.size=0}function YA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ZA="__lodash_hash_undefined__",XA=Object.prototype,QA=XA.hasOwnProperty;function JA(e){var t=this.__data__;if(ki){var n=t[e];return n===ZA?void 0:n}return QA.call(t,e)?t[e]:void 0}var eS=Object.prototype,tS=eS.hasOwnProperty;function nS(e){var t=this.__data__;return ki?t[e]!==void 0:tS.call(t,e)}var rS="__lodash_hash_undefined__";function iS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ki&&t===void 0?rS: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=WA;Xn.prototype.delete=YA;Xn.prototype.get=JA;Xn.prototype.has=nS;Xn.prototype.set=iS;function sS(){this.__data__=[],this.size=0}function io(e,t){for(var n=e.length;n--;)if(Pi(e[n][0],t))return n;return-1}var oS=Array.prototype,aS=oS.splice;function lS(e){var t=this.__data__,n=io(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():aS.call(t,n,1),--this.size,!0}function cS(e){var t=this.__data__,n=io(t,e);return n<0?void 0:t[n][1]}function uS(e){return io(this.__data__,e)>-1}function dS(e,t){var n=this.__data__,r=io(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=sS;_n.prototype.delete=lS;_n.prototype.get=cS;_n.prototype.has=uS;_n.prototype.set=dS;var Ai=ir(dn,"Map");function fS(){this.size=0,this.__data__={hash:new Xn,map:new(Ai||_n),string:new Xn}}function hS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function so(e,t){var n=e.__data__;return hS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function pS(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t}function gS(e){return so(this,e).get(e)}function mS(e){return so(this,e).has(e)}function bS(e,t){var n=so(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=fS;sr.prototype.delete=pS;sr.prototype.get=gS;sr.prototype.has=mS;sr.prototype.set=bS;function yS(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]",xS=Function.prototype,wS=Object.prototype,Pp=xS.toString,_S=wS.hasOwnProperty,vS=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=_S.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pp.call(n)==vS}function kS(){this.__data__=new _n,this.size=0}function AS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function SS(e){return this.__data__.get(e)}function TS(e){return this.__data__.has(e)}var CS=200;function OS(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!Ai||r.length<CS-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=kS;on.prototype.delete=AS;on.prototype.get=SS;on.prototype.has=TS;on.prototype.set=OS;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 IS(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 LS(){return[]}var MS=Object.prototype,DS=MS.propertyIsEnumerable,cd=Object.getOwnPropertySymbols,PS=cd?function(e){return e==null?[]:(e=Object(e),IS(cd(e),function(t){return DS.call(e,t)}))}:LS;function BS(e,t,n){var r=t(e);return Zn(e)?r:yS(r,n(e))}function il(e){return BS(e,jA,PS)}var sl=ir(dn,"DataView"),ol=ir(dn,"Promise"),al=ir(dn,"Set"),ud="[object Map]",FS="[object Object]",dd="[object Promise]",fd="[object Set]",hd="[object WeakMap]",pd="[object DataView]",$S=rr(sl),US=rr(Ai),qS=rr(ol),zS=rr(al),jS=rr(nl),qt=zr;(sl&&qt(new sl(new ArrayBuffer(1)))!=pd||Ai&&qt(new Ai)!=ud||ol&&qt(ol.resolve())!=dd||al&&qt(new al)!=fd||nl&&qt(new nl)!=hd)&&(qt=function(e){var t=zr(e),n=t==FS?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case $S:return pd;case US:return ud;case qS:return dd;case zS:return fd;case jS:return hd}return t});var HS=Object.prototype,GS=HS.hasOwnProperty;function KS(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&GS.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Fs=dn.Uint8Array;function cc(e){var t=new e.constructor(e.byteLength);return new Fs(t).set(new Fs(e)),t}function VS(e,t){var n=cc(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var WS=/\w*$/;function YS(e){var t=new e.constructor(e.source,WS.exec(e));return t.lastIndex=e.lastIndex,t}var gd=Dn?Dn.prototype:void 0,md=gd?gd.valueOf:void 0;function ZS(e){return md?Object(md.call(e)):{}}function $p(e,t){var n=t?cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var XS="[object Boolean]",QS="[object Date]",JS="[object Map]",eT="[object Number]",tT="[object RegExp]",nT="[object Set]",rT="[object String]",iT="[object Symbol]",sT="[object ArrayBuffer]",oT="[object DataView]",aT="[object Float32Array]",lT="[object Float64Array]",cT="[object Int8Array]",uT="[object Int16Array]",dT="[object Int32Array]",fT="[object Uint8Array]",hT="[object Uint8ClampedArray]",pT="[object Uint16Array]",gT="[object Uint32Array]";function mT(e,t,n){var r=e.constructor;switch(t){case sT:return cc(e);case XS:case QS:return new r(+e);case oT:return VS(e);case aT:case lT:case cT:case uT:case dT:case fT:case hT:case pT:case gT:return $p(e,n);case JS:return new r;case eT:case rT:return new r(e);case tT:return YS(e);case nT:return new r;case iT:return ZS(e)}}function Up(e){return typeof e.constructor=="function"&&!oc(e)?Pk(Dp(e)):{}}var bT="[object Map]";function yT(e){return yn(e)&&qt(e)==bT}var bd=Mr&&Mr.isMap,ET=bd?ac(bd):yT,xT="[object Set]";function wT(e){return yn(e)&&qt(e)==xT}var yd=Mr&&Mr.isSet,_T=yd?ac(yd):wT,vT=1,qp="[object Arguments]",NT="[object Array]",kT="[object Boolean]",AT="[object Date]",ST="[object Error]",zp="[object Function]",TT="[object GeneratorFunction]",CT="[object Map]",OT="[object Number]",jp="[object Object]",RT="[object RegExp]",IT="[object Set]",LT="[object String]",MT="[object Symbol]",DT="[object WeakMap]",PT="[object ArrayBuffer]",BT="[object DataView]",FT="[object Float32Array]",$T="[object Float64Array]",UT="[object Int8Array]",qT="[object Int16Array]",zT="[object Int32Array]",jT="[object Uint8Array]",HT="[object Uint8ClampedArray]",GT="[object Uint16Array]",KT="[object Uint32Array]",Se={};Se[qp]=Se[NT]=Se[PT]=Se[BT]=Se[kT]=Se[AT]=Se[FT]=Se[$T]=Se[UT]=Se[qT]=Se[zT]=Se[CT]=Se[OT]=Se[jp]=Se[RT]=Se[IT]=Se[LT]=Se[MT]=Se[jT]=Se[HT]=Se[GT]=Se[KT]=!0;Se[ST]=Se[zp]=Se[DT]=!1;function Ns(e,t,n,r,i,s){var o,a=t&vT;if(o!==void 0)return o;if(!Bn(e))return e;var l=Zn(e);if(l)o=KS(e);else{var c=qt(e),u=c==zp||c==TT;if(Ni(e))return Fp(e,a);if(c==jp||c==qp||u&&!i)o=u?{}:Up(e);else{if(!Se[c])return i?e:{};o=mT(e,c,a)}}s||(s=new on);var d=s.get(e);if(d)return d;s.set(e,o),_T(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 Kk(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,WT=4;function Tr(e){return Ns(e,VT|WT)}var YT="__lodash_hash_undefined__";function ZT(e){return this.__data__.set(e,YT),this}function XT(e){return this.__data__.has(e)}function $s(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sr;++t<n;)this.add(e[t])}$s.prototype.add=$s.prototype.push=ZT;$s.prototype.has=XT;function QT(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 JT(e,t){return e.has(t)}var eC=1,tC=2;function Hp(e,t,n,r,i,s){var o=n&eC,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&tC?new $s: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(!QT(t,function(y,w){if(!JT(f,w)&&(p===y||i(p,y,n,r,s)))return f.push(w)})){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 nC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function rC(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var iC=1,sC=2,oC="[object Boolean]",aC="[object Date]",lC="[object Error]",cC="[object Map]",uC="[object Number]",dC="[object RegExp]",fC="[object Set]",hC="[object String]",pC="[object Symbol]",gC="[object ArrayBuffer]",mC="[object DataView]",Ed=Dn?Dn.prototype:void 0,Aa=Ed?Ed.valueOf:void 0;function bC(e,t,n,r,i,s,o){switch(n){case mC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gC:return!(e.byteLength!=t.byteLength||!s(new Fs(e),new Fs(t)));case oC:case aC:case uC:return Pi(+e,+t);case lC:return e.name==t.name&&e.message==t.message;case dC:case hC:return e==t+"";case cC:var a=nC;case fC:var l=r&iC;if(a||(a=rC),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=sC,o.set(e,t);var u=Hp(a(e),a(t),r,i,s,o);return o.delete(e),u;case pC:if(Aa)return Aa.call(e)==Aa.call(t)}return!1}var yC=1,EC=Object.prototype,xC=EC.hasOwnProperty;function wC(e,t,n,r,i,s){var o=n&yC,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:xC.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],w=t[h];if(r)var v=o?r(w,y,h,t,e,s):r(y,w,h,e,t,s);if(!(v===void 0?y===w||i(y,w,n,r,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var T=e.constructor,O=t.constructor;T!=O&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof O=="function"&&O instanceof O)&&(m=!1)}return s.delete(e),s.delete(t),m}var _C=1,xd="[object Arguments]",wd="[object Array]",ps="[object Object]",vC=Object.prototype,_d=vC.hasOwnProperty;function NC(e,t,n,r,i,s){var o=Zn(e),a=Zn(t),l=o?wd:qt(e),c=a?wd:qt(t);l=l==xd?ps:l,c=c==xd?ps:c;var u=l==ps,d=c==ps,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):bC(e,t,l,n,r,i,s);if(!(n&_C)){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),wC(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 kC(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 AC=kC();function ll(e,t,n){(n!==void 0&&!Pi(e[t],n)||n===void 0&&!(t in e))&&sc(e,t,n)}function SC(e){return yn(e)&&ro(e)}function cl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function TC(e){return Xk(e,Mp(e))}function CC(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:SC(a)?u=Fk(a):f?(d=!1,u=Fp(l,!0)):p?(d=!1,u=$p(l,!0)):u=[]:NS(l)||rl(l)?(u=a,rl(a)?u=TC(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&&AC(t,function(s,o){if(i||(i=new on),Bn(s))CC(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=nA(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 Vp=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})}};Vp.blots=new WeakMap;let Dr=Vp;function vd(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class OC 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 Kt=OC;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 IC{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=Kt.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 oo=IC,Wp=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}};Wp.blotName="abstract";let Yp=Wp;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 LC=Zp;const We=LC;class MC{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 Nd(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 MC,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=Nd(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=Nd(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 DC=Xp;const Ht=DC;function PC(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 Ht{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 oo(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&&PC(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,We],wr.blotName="inline",wr.scope=ee.INLINE_BLOT,wr.tagName="SPAN";let BC=wr;const uc=BC,vr=class dl extends Ht{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 oo(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,We];let FC=vr;const Si=FC,fl=class extends Ht{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 $C=fl;const ao=$C;class UC extends We{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 wt=UC,qC={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},zC=100,Nr=class extends Ht{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,qC),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 Ht&&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>=zC)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 Ht&&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)}};Nr.blotName="scroll",Nr.defaultChild=Si,Nr.allowedChildren=[Si,ao],Nr.scope=ee.BLOCK_BLOT,Nr.tagName="DIV";let jC=Nr;const dc=jC,hl=class Qp extends We{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 HC=hl;const Us=HC,GC=Object.freeze(Object.defineProperty({__proto__:null,Attributor:ln,AttributorStore:oo,BlockBlot:Si,ClassAttributor:Kt,ContainerBlot:ao,EmbedBlot:wt,InlineBlot:uc,LeafBlot:We,ParentBlot:Ht,Registry:Dr,Scope:ee,ScrollBlot:dc,StyleAttributor:Fn,TextBlot:Us},Symbol.toStringTag,{value:"Module"}));var pl={exports:{}},Et=-1,st=1,Pe=0;function Ti(e,t,n,r,i){if(e===t)return e?[[Pe,e]]:[];if(n!=null){var s=eO(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=lo(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=KC(e,t);return a&&c.unshift([Pe,a]),l&&c.push([Pe,l]),hc(c,i),r&&YC(c),c}function KC(e,t){var n;if(!e)return[[st,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=[[st,r.substring(0,s)],[Pe,i],[st,r.substring(s+i.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Et),n;if(i.length===1)return[[Et,e],[st,t]];var o=WC(e,t);if(o){var a=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Ti(a,c),f=Ti(l,u);return h.concat([[Pe,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 w=s+y,v;y===-b||y!==b&&a[w-1]<a[w+1]?v=a[w+1]:v=a[w-1]+1;for(var T=v-y;v<n&&T<r&&e.charAt(v)===t.charAt(T);)v++,T++;if(a[w]=v,v>n)f+=2;else if(T>r)h+=2;else if(d){var O=s+u-y;if(O>=0&&O<o&&l[O]!==-1){var A=n-l[O];if(v>=A)return kd(e,t,v,T)}}}for(var F=-b+p;F<=b-m;F+=2){var O=s+F,A;F===-b||F!==b&&l[O-1]<l[O+1]?A=l[O+1]:A=l[O-1]+1;for(var $=A-F;A<n&&$<r&&e.charAt(n-A-1)===t.charAt(r-$-1);)A++,$++;if(l[O]=A,A>n)m+=2;else if($>r)p+=2;else if(!d){var w=s+u-F;if(w>=0&&w<o&&a[w]!==-1){var v=a[w],T=s+v-w;if(A=n-A,v>=A)return kd(e,t,v,T)}}}}return[[Et,e],[st,t]]}function kd(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),o=e.substring(n),a=t.substring(r),l=Ti(i,s),c=Ti(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 lo(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 WC(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,w="",v,T,O,A;(y=p.indexOf(b,y+1))!==-1;){var F=fc(f.substring(m),p.substring(y)),$=lo(f.substring(0,m),p.substring(0,y));w.length<$+F&&(w=p.substring(y-$,y)+p.substring(y,y+F),v=f.substring(0,m-$),T=f.substring(m+F),O=p.substring(0,y-$),A=p.substring(y+F))}return w.length*2>=f.length?[v,T,O,A,w]: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 YC(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]==Pe?(n[r++]=s,o=l,a=c,l=0,c=0,i=e[s][1]):(e[s][0]==st?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]=st,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),QC(e),s=1;s<e.length;){if(e[s-1][0]==Et&&e[s][0]==st){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,[Pe,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,[Pe,u.substring(0,f)]),e[s-1][0]=st,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]/,ZC=/\n\r?\n$/,XC=/^\r?\n\r?\n/;function QC(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),w=b.match(Sd),v=y&&m.match(Td),T=w&&b.match(Td),O=v&&m.match(Cd),A=T&&b.match(Cd),F=O&&f.match(ZC),$=A&&p.match(XC);return F||$?5:O||A?4:y&&!v&&T?3:v||T?2:y||w?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==Pe&&e[n+1][0]==Pe){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],o=lo(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([Pe,""]);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 st:i++,o+=e[n][1],n++;break;case Et:r++,s+=e[n][1],n++;break;case Pe: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]===st&&(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,[Pe,o.substring(0,a)]),n++),o=o.substring(a),s=s.substring(a)),a=lo(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,[st,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],[st,o]),n=n-d+2)}n!==0&&e[n-1][0]===Pe?(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]===Pe&&e[n+1][0]===Pe&&(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 JC(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:JC([[Pe,e],[Et,t],[st,n],[Pe,r]])}function eO(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),w=h.slice(p);return Ta(m,y,w,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),O=c.slice(c.length-T),A=f.slice(f.length-T);if(O!==A)break e;var y=c.slice(0,c.length-T),w=f.slice(0,f.length-T);return Ta(l,y,w,O)}}if(r.length>0&&i&&i.length===0)e:{var m=e.slice(0,r.index),O=e.slice(r.index+r.length),p=m.length,T=O.length;if(o<p+T)break e;var b=t.slice(0,p),A=t.slice(o-T);if(m!==b||O!==A)break e;var y=e.slice(p,s-T),w=t.slice(p,o-T);return Ta(m,y,w,O)}return null}function co(e,t,n,r){return Ti(e,t,n,r,!0)}co.INSERT=st;co.DELETE=Et;co.EQUAL=Pe;var tO=co,qs={exports:{}};qs.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]",w="[object String]",v="[object Symbol]",T="[object WeakMap]",O="[object ArrayBuffer]",A="[object DataView]",F="[object Float32Array]",$="[object Float64Array]",B="[object Int8Array]",C="[object Int16Array]",U="[object Int32Array]",P="[object Uint8Array]",ie="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",L=/[\\^$.*+?()[\]{}|]/g,j=/\w*$/,q=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,x={};x[s]=x[o]=x[O]=x[A]=x[a]=x[l]=x[F]=x[$]=x[B]=x[C]=x[U]=x[h]=x[f]=x[p]=x[b]=x[y]=x[w]=x[v]=x[P]=x[ie]=x[X]=x[Z]=!0,x[c]=x[u]=x[T]=!1;var Q=typeof Ot=="object"&&Ot&&Ot.Object===Object&&Ot,ae=typeof self=="object"&&self&&self.Object===Object&&self,N=Q||ae||Function("return this")(),he=t&&!t.nodeType&&t,se=he&&!0&&e&&!e.nodeType&&e,we=se&&se.exports===he;function ot(g,E){return g.set(E[0],E[1]),g}function ke(g,E){return g.add(E),g}function Je(g,E){for(var k=-1,M=g?g.length:0;++k<M&&E(g[k],k,g)!==!1;);return g}function et(g,E){for(var k=-1,M=E.length,le=g.length;++k<M;)g[le+k]=E[k];return g}function at(g,E,k,M){for(var le=-1,ne=g?g.length:0;++le<ne;)k=E(k,g[le],le,g);return k}function It(g,E){for(var k=-1,M=Array(g);++k<g;)M[k]=E(k);return M}function mt(g,E){return g==null?void 0:g[E]}function _t(g){var E=!1;if(g!=null&&typeof g.toString!="function")try{E=!!(g+"")}catch{}return E}function Ie(g){var E=-1,k=Array(g.size);return g.forEach(function(M,le){k[++E]=[le,M]}),k}function pe(g,E){return function(k){return g(E(k))}}function je(g){var E=-1,k=Array(g.size);return g.forEach(function(M){k[++E]=M}),k}var re=Array.prototype,Lt=Function.prototype,ve=Object.prototype,me=N["__core-js_shared__"],Mt=function(){var g=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),lt=Lt.toString,He=ve.hasOwnProperty,vt=ve.toString,S=RegExp("^"+lt.call(He).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=we?N.Buffer:void 0,H=N.Symbol,K=N.Uint8Array,te=pe(Object.getPrototypeOf,Object),Ae=Object.create,ct=ve.propertyIsEnumerable,tt=re.splice,Dt=Object.getOwnPropertySymbols,Nt=R?R.isBuffer:void 0,Be=pe(Object.keys,Object),bt=Bt(N,"DataView"),$e=Bt(N,"Map"),Pt=Bt(N,"Promise"),ur=Bt(N,"Set"),Kr=Bt(N,"WeakMap"),$n=Bt(Object,"create"),Vr=nt(bt),Un=nt($e),Wr=nt(Pt),Yr=nt(ur),Zr=nt(Kr),Nn=H?H.prototype:void 0,Gi=Nn?Nn.valueOf:void 0;function fn(g){var E=-1,k=g?g.length:0;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function vo(){this.__data__=$n?$n(null):{}}function No(g){return this.has(g)&&delete this.__data__[g]}function ko(g){var E=this.__data__;if($n){var k=E[g];return k===r?void 0:k}return He.call(E,g)?E[g]:void 0}function Ki(g){var E=this.__data__;return $n?E[g]!==void 0:He.call(E,g)}function Xr(g,E){var k=this.__data__;return k[g]=$n&&E===void 0?r:E,this}fn.prototype.clear=vo,fn.prototype.delete=No,fn.prototype.get=ko,fn.prototype.has=Ki,fn.prototype.set=Xr;function Ue(g){var E=-1,k=g?g.length:0;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function Ao(){this.__data__=[]}function So(g){var E=this.__data__,k=fr(E,g);if(k<0)return!1;var M=E.length-1;return k==M?E.pop():tt.call(E,k,1),!0}function To(g){var E=this.__data__,k=fr(E,g);return k<0?void 0:E[k][1]}function Co(g){return fr(this.__data__,g)>-1}function Oo(g,E){var k=this.__data__,M=fr(k,g);return M<0?k.push([g,E]):k[M][1]=E,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var E=-1,k=g?g.length:0;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function Ro(){this.__data__={hash:new fn,map:new($e||Ue),string:new fn}}function Io(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,E){return zn(this,g).set(g,E),this}Ge.prototype.clear=Ro,Ge.prototype.delete=Io,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function ut(g){this.__data__=new Ue(g)}function Po(){this.__data__=new Ue}function Bo(g){return this.__data__.delete(g)}function Fo(g){return this.__data__.get(g)}function $o(g){return this.__data__.has(g)}function Uo(g,E){var k=this.__data__;if(k instanceof Ue){var M=k.__data__;if(!$e||M.length<n-1)return M.push([g,E]),this;k=this.__data__=new Ge(M)}return k.set(g,E),this}ut.prototype.clear=Po,ut.prototype.delete=Bo,ut.prototype.get=Fo,ut.prototype.has=$o,ut.prototype.set=Uo;function dr(g,E){var k=ti(g)||pr(g)?It(g.length,String):[],M=k.length,le=!!M;for(var ne in g)He.call(g,ne)&&!(le&&(ne=="length"||ea(ne,M)))&&k.push(ne);return k}function Vi(g,E,k){var M=g[E];(!(He.call(g,E)&&Qi(M,k))||k===void 0&&!(E in g))&&(g[E]=k)}function fr(g,E){for(var k=g.length;k--;)if(Qi(g[k][0],E))return k;return-1}function Zt(g,E){return g&&ei(E,ri(E),g)}function Qr(g,E,k,M,le,ne,Ee){var ye;if(M&&(ye=ne?M(g,le,ne,Ee):M(g)),ye!==void 0)return ye;if(!Qt(g))return g;var Le=ti(g);if(Le){if(ye=Qo(g),!E)return Yo(g,ye)}else{var xe=pn(g),Ke=xe==u||xe==d;if(Ji(g))return hr(g,E);if(xe==p||xe==s||Ke&&!ne){if(_t(g))return ne?g:{};if(ye=Xt(Ke?{}:g),!E)return Zo(g,Zt(ye,g))}else{if(!x[xe])return ne?g:{};ye=Jo(g,xe,Qr,E)}}Ee||(Ee=new ut);var dt=Ee.get(g);if(dt)return dt;if(Ee.set(g,ye),!Le)var De=k?Xo(g):ri(g);return Je(De||g,function(Ve,qe){De&&(qe=Ve,Ve=g[qe]),Vi(ye,qe,Qr(Ve,E,k,M,qe,g,Ee))}),ye}function qo(g){return Qt(g)?Ae(g):{}}function zo(g,E,k){var M=E(g);return ti(g)?M:et(M,k(g))}function jo(g){return vt.call(g)}function Ho(g){if(!Qt(g)||na(g))return!1;var E=ni(g)||_t(g)?S:q;return E.test(nt(g))}function Go(g){if(!Zi(g))return Be(g);var E=[];for(var k in Object(g))He.call(g,k)&&k!="constructor"&&E.push(k);return E}function hr(g,E){if(E)return g.slice();var k=new g.constructor(g.length);return g.copy(k),k}function Jr(g){var E=new g.constructor(g.byteLength);return new K(E).set(new K(g)),E}function qn(g,E){var k=E?Jr(g.buffer):g.buffer;return new g.constructor(k,g.byteOffset,g.byteLength)}function Wi(g,E,k){var M=E?k(Ie(g),!0):Ie(g);return at(M,ot,new g.constructor)}function Yi(g){var E=new g.constructor(g.source,j.exec(g));return E.lastIndex=g.lastIndex,E}function Ko(g,E,k){var M=E?k(je(g),!0):je(g);return at(M,ke,new g.constructor)}function Vo(g){return Gi?Object(Gi.call(g)):{}}function Wo(g,E){var k=E?Jr(g.buffer):g.buffer;return new g.constructor(k,g.byteOffset,g.length)}function Yo(g,E){var k=-1,M=g.length;for(E||(E=Array(M));++k<M;)E[k]=g[k];return E}function ei(g,E,k,M){k||(k={});for(var le=-1,ne=E.length;++le<ne;){var Ee=E[le],ye=void 0;Vi(k,Ee,ye===void 0?g[Ee]:ye)}return k}function Zo(g,E){return ei(g,hn(g),E)}function Xo(g){return zo(g,ri,hn)}function zn(g,E){var k=g.__data__;return ta(E)?k[typeof E=="string"?"string":"hash"]:k.map}function Bt(g,E){var k=mt(g,E);return Ho(k)?k:void 0}var hn=Dt?pe(Dt,Object):ia,pn=jo;(bt&&pn(new bt(new ArrayBuffer(1)))!=A||$e&&pn(new $e)!=h||Pt&&pn(Pt.resolve())!=m||ur&&pn(new ur)!=y||Kr&&pn(new Kr)!=T)&&(pn=function(g){var E=vt.call(g),k=E==p?g.constructor:void 0,M=k?nt(k):void 0;if(M)switch(M){case Vr:return A;case Un:return h;case Wr:return m;case Yr:return y;case Zr:return T}return E});function Qo(g){var E=g.length,k=g.constructor(E);return E&&typeof g[0]=="string"&&He.call(g,"index")&&(k.index=g.index,k.input=g.input),k}function Xt(g){return typeof g.constructor=="function"&&!Zi(g)?qo(te(g)):{}}function Jo(g,E,k,M){var le=g.constructor;switch(E){case O:return Jr(g);case a:case l:return new le(+g);case A:return qn(g,M);case F:case $:case B:case C:case U:case P:case ie:case X:case Z:return Wo(g,M);case h:return Wi(g,M,k);case f:case w:return new le(g);case b:return Yi(g);case y:return Ko(g,M,k);case v:return Vo(g)}}function ea(g,E){return E=E??i,!!E&&(typeof g=="number"||W.test(g))&&g>-1&&g%1==0&&g<E}function ta(g){var E=typeof g;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?g!=="__proto__":g===null}function na(g){return!!Mt&&Mt in g}function Zi(g){var E=g&&g.constructor,k=typeof E=="function"&&E.prototype||ve;return g===k}function nt(g){if(g!=null){try{return lt.call(g)}catch{}try{return g+""}catch{}}return""}function Xi(g){return Qr(g,!0,!0)}function Qi(g,E){return g===E||g!==g&&E!==E}function pr(g){return ra(g)&&He.call(g,"callee")&&(!ct.call(g,"callee")||vt.call(g)==s)}var ti=Array.isArray;function gr(g){return g!=null&&es(g.length)&&!ni(g)}function ra(g){return ts(g)&&gr(g)}var Ji=Nt||sa;function ni(g){var E=Qt(g)?vt.call(g):"";return E==u||E==d}function es(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=i}function Qt(g){var E=typeof g;return!!g&&(E=="object"||E=="function")}function ts(g){return!!g&&typeof g=="object"}function ri(g){return gr(g)?dr(g):Go(g)}function ia(){return[]}function sa(){return!1}e.exports=Xi})(qs,qs.exports);var rg=qs.exports,zs={exports:{}};zs.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]",w="[object Object]",v="[object Promise]",T="[object Proxy]",O="[object RegExp]",A="[object Set]",F="[object String]",$="[object Symbol]",B="[object Undefined]",C="[object WeakMap]",U="[object ArrayBuffer]",P="[object DataView]",ie="[object Float32Array]",X="[object Float64Array]",Z="[object Int8Array]",L="[object Int16Array]",j="[object Int32Array]",q="[object Uint8Array]",W="[object Uint8ClampedArray]",x="[object Uint16Array]",Q="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,N=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,se={};se[ie]=se[X]=se[Z]=se[L]=se[j]=se[q]=se[W]=se[x]=se[Q]=!0,se[a]=se[l]=se[U]=se[u]=se[P]=se[d]=se[h]=se[f]=se[m]=se[b]=se[w]=se[O]=se[A]=se[F]=se[C]=!1;var we=typeof Ot=="object"&&Ot&&Ot.Object===Object&&Ot,ot=typeof self=="object"&&self&&self.Object===Object&&self,ke=we||ot||Function("return this")(),Je=t&&!t.nodeType&&t,et=Je&&!0&&e&&!e.nodeType&&e,at=et&&et.exports===Je,It=at&&we.process,mt=function(){try{return It&&It.binding&&It.binding("util")}catch{}}(),_t=mt&&mt.isTypedArray;function Ie(g,E){for(var k=-1,M=g==null?0:g.length,le=0,ne=[];++k<M;){var Ee=g[k];E(Ee,k,g)&&(ne[le++]=Ee)}return ne}function pe(g,E){for(var k=-1,M=E.length,le=g.length;++k<M;)g[le+k]=E[k];return g}function je(g,E){for(var k=-1,M=g==null?0:g.length;++k<M;)if(E(g[k],k,g))return!0;return!1}function re(g,E){for(var k=-1,M=Array(g);++k<g;)M[k]=E(k);return M}function Lt(g){return function(E){return g(E)}}function ve(g,E){return g.has(E)}function me(g,E){return g==null?void 0:g[E]}function Mt(g){var E=-1,k=Array(g.size);return g.forEach(function(M,le){k[++E]=[le,M]}),k}function lt(g,E){return function(k){return g(E(k))}}function He(g){var E=-1,k=Array(g.size);return g.forEach(function(M){k[++E]=M}),k}var vt=Array.prototype,S=Function.prototype,R=Object.prototype,H=ke["__core-js_shared__"],K=S.toString,te=R.hasOwnProperty,Ae=function(){var g=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ct=R.toString,tt=RegExp("^"+K.call(te).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=at?ke.Buffer:void 0,Nt=ke.Symbol,Be=ke.Uint8Array,bt=R.propertyIsEnumerable,$e=vt.splice,Pt=Nt?Nt.toStringTag:void 0,ur=Object.getOwnPropertySymbols,Kr=Dt?Dt.isBuffer:void 0,$n=lt(Object.keys,Object),Vr=hn(ke,"DataView"),Un=hn(ke,"Map"),Wr=hn(ke,"Promise"),Yr=hn(ke,"Set"),Zr=hn(ke,"WeakMap"),Nn=hn(Object,"create"),Gi=nt(Vr),fn=nt(Un),vo=nt(Wr),No=nt(Yr),ko=nt(Zr),Ki=Nt?Nt.prototype:void 0,Xr=Ki?Ki.valueOf:void 0;function Ue(g){var E=-1,k=g==null?0:g.length;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function Ao(){this.__data__=Nn?Nn(null):{},this.size=0}function So(g){var E=this.has(g)&&delete this.__data__[g];return this.size-=E?1:0,E}function To(g){var E=this.__data__;if(Nn){var k=E[g];return k===r?void 0:k}return te.call(E,g)?E[g]:void 0}function Co(g){var E=this.__data__;return Nn?E[g]!==void 0:te.call(E,g)}function Oo(g,E){var k=this.__data__;return this.size+=this.has(g)?0:1,k[g]=Nn&&E===void 0?r:E,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var E=-1,k=g==null?0:g.length;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function Ro(){this.__data__=[],this.size=0}function Io(g){var E=this.__data__,k=hr(E,g);if(k<0)return!1;var M=E.length-1;return k==M?E.pop():$e.call(E,k,1),--this.size,!0}function Lo(g){var E=this.__data__,k=hr(E,g);return k<0?void 0:E[k][1]}function Mo(g){return hr(this.__data__,g)>-1}function Do(g,E){var k=this.__data__,M=hr(k,g);return M<0?(++this.size,k.push([g,E])):k[M][1]=E,this}Ge.prototype.clear=Ro,Ge.prototype.delete=Io,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function ut(g){var E=-1,k=g==null?0:g.length;for(this.clear();++E<k;){var M=g[E];this.set(M[0],M[1])}}function Po(){this.size=0,this.__data__={hash:new Ue,map:new(Un||Ge),string:new Ue}}function Bo(g){var E=Bt(this,g).delete(g);return this.size-=E?1:0,E}function Fo(g){return Bt(this,g).get(g)}function $o(g){return Bt(this,g).has(g)}function Uo(g,E){var k=Bt(this,g),M=k.size;return k.set(g,E),this.size+=k.size==M?0:1,this}ut.prototype.clear=Po,ut.prototype.delete=Bo,ut.prototype.get=Fo,ut.prototype.has=$o,ut.prototype.set=Uo;function dr(g){var E=-1,k=g==null?0:g.length;for(this.__data__=new ut;++E<k;)this.add(g[E])}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 Zt(g){var E=this.__data__=new Ge(g);this.size=E.size}function Qr(){this.__data__=new Ge,this.size=0}function qo(g){var E=this.__data__,k=E.delete(g);return this.size=E.size,k}function zo(g){return this.__data__.get(g)}function jo(g){return this.__data__.has(g)}function Ho(g,E){var k=this.__data__;if(k instanceof Ge){var M=k.__data__;if(!Un||M.length<n-1)return M.push([g,E]),this.size=++k.size,this;k=this.__data__=new ut(M)}return k.set(g,E),this.size=k.size,this}Zt.prototype.clear=Qr,Zt.prototype.delete=qo,Zt.prototype.get=zo,Zt.prototype.has=jo,Zt.prototype.set=Ho;function Go(g,E){var k=pr(g),M=!k&&Qi(g),le=!k&&!M&&gr(g),ne=!k&&!M&&!le&&ts(g),Ee=k||M||le||ne,ye=Ee?re(g.length,String):[],Le=ye.length;for(var xe in g)te.call(g,xe)&&!(Ee&&(xe=="length"||le&&(xe=="offset"||xe=="parent")||ne&&(xe=="buffer"||xe=="byteLength"||xe=="byteOffset")||Jo(xe,Le)))&&ye.push(xe);return ye}function hr(g,E){for(var k=g.length;k--;)if(Xi(g[k][0],E))return k;return-1}function Jr(g,E,k){var M=E(g);return pr(g)?M:pe(M,k(g))}function qn(g){return g==null?g===void 0?B:y:Pt&&Pt in Object(g)?pn(g):Zi(g)}function Wi(g){return Qt(g)&&qn(g)==a}function Yi(g,E,k,M,le){return g===E?!0:g==null||E==null||!Qt(g)&&!Qt(E)?g!==g&&E!==E:Ko(g,E,k,M,Yi,le)}function Ko(g,E,k,M,le,ne){var Ee=pr(g),ye=pr(E),Le=Ee?l:Xt(g),xe=ye?l:Xt(E);Le=Le==a?w:Le,xe=xe==a?w:xe;var Ke=Le==w,dt=xe==w,De=Le==xe;if(De&&gr(g)){if(!gr(E))return!1;Ee=!0,Ke=!1}if(De&&!Ke)return ne||(ne=new Zt),Ee||ts(g)?ei(g,E,k,M,le,ne):Zo(g,E,Le,k,M,le,ne);if(!(k&i)){var Ve=Ke&&te.call(g,"__wrapped__"),qe=dt&&te.call(E,"__wrapped__");if(Ve||qe){var kn=Ve?g.value():g,gn=qe?E.value():E;return ne||(ne=new Zt),le(kn,gn,k,M,ne)}}return De?(ne||(ne=new Zt),Xo(g,E,k,M,le,ne)):!1}function Vo(g){if(!es(g)||ta(g))return!1;var E=Ji(g)?tt:N;return E.test(nt(g))}function Wo(g){return Qt(g)&&ni(g.length)&&!!se[qn(g)]}function Yo(g){if(!na(g))return $n(g);var E=[];for(var k in Object(g))te.call(g,k)&&k!="constructor"&&E.push(k);return E}function ei(g,E,k,M,le,ne){var Ee=k&i,ye=g.length,Le=E.length;if(ye!=Le&&!(Ee&&Le>ye))return!1;var xe=ne.get(g);if(xe&&ne.get(E))return xe==E;var Ke=-1,dt=!0,De=k&s?new dr:void 0;for(ne.set(g,E),ne.set(E,g);++Ke<ye;){var Ve=g[Ke],qe=E[Ke];if(M)var kn=Ee?M(qe,Ve,Ke,E,g,ne):M(Ve,qe,Ke,g,E,ne);if(kn!==void 0){if(kn)continue;dt=!1;break}if(De){if(!je(E,function(gn,jn){if(!ve(De,jn)&&(Ve===gn||le(Ve,gn,k,M,ne)))return De.push(jn)})){dt=!1;break}}else if(!(Ve===qe||le(Ve,qe,k,M,ne))){dt=!1;break}}return ne.delete(g),ne.delete(E),dt}function Zo(g,E,k,M,le,ne,Ee){switch(k){case P:if(g.byteLength!=E.byteLength||g.byteOffset!=E.byteOffset)return!1;g=g.buffer,E=E.buffer;case U:return!(g.byteLength!=E.byteLength||!ne(new Be(g),new Be(E)));case u:case d:case b:return Xi(+g,+E);case h:return g.name==E.name&&g.message==E.message;case O:case F:return g==E+"";case m:var ye=Mt;case A:var Le=M&i;if(ye||(ye=He),g.size!=E.size&&!Le)return!1;var xe=Ee.get(g);if(xe)return xe==E;M|=s,Ee.set(g,E);var Ke=ei(ye(g),ye(E),M,le,ne,Ee);return Ee.delete(g),Ke;case $:if(Xr)return Xr.call(g)==Xr.call(E)}return!1}function Xo(g,E,k,M,le,ne){var Ee=k&i,ye=zn(g),Le=ye.length,xe=zn(E),Ke=xe.length;if(Le!=Ke&&!Ee)return!1;for(var dt=Le;dt--;){var De=ye[dt];if(!(Ee?De in E:te.call(E,De)))return!1}var Ve=ne.get(g);if(Ve&&ne.get(E))return Ve==E;var qe=!0;ne.set(g,E),ne.set(E,g);for(var kn=Ee;++dt<Le;){De=ye[dt];var gn=g[De],jn=E[De];if(M)var Lc=Ee?M(jn,gn,De,E,g,ne):M(gn,jn,De,g,E,ne);if(!(Lc===void 0?gn===jn||le(gn,jn,k,M,ne):Lc)){qe=!1;break}kn||(kn=De=="constructor")}if(qe&&!kn){var ns=g.constructor,rs=E.constructor;ns!=rs&&"constructor"in g&&"constructor"in E&&!(typeof ns=="function"&&ns instanceof ns&&typeof rs=="function"&&rs instanceof rs)&&(qe=!1)}return ne.delete(g),ne.delete(E),qe}function zn(g){return Jr(g,ri,Qo)}function Bt(g,E){var k=g.__data__;return ea(E)?k[typeof E=="string"?"string":"hash"]:k.map}function hn(g,E){var k=me(g,E);return Vo(k)?k:void 0}function pn(g){var E=te.call(g,Pt),k=g[Pt];try{g[Pt]=void 0;var M=!0}catch{}var le=ct.call(g);return M&&(E?g[Pt]=k:delete g[Pt]),le}var Qo=ur?function(g){return g==null?[]:(g=Object(g),Ie(ur(g),function(E){return bt.call(g,E)}))}:ia,Xt=qn;(Vr&&Xt(new Vr(new ArrayBuffer(1)))!=P||Un&&Xt(new Un)!=m||Wr&&Xt(Wr.resolve())!=v||Yr&&Xt(new Yr)!=A||Zr&&Xt(new Zr)!=C)&&(Xt=function(g){var E=qn(g),k=E==w?g.constructor:void 0,M=k?nt(k):"";if(M)switch(M){case Gi:return P;case fn:return m;case vo:return v;case No:return A;case ko:return C}return E});function Jo(g,E){return E=E??o,!!E&&(typeof g=="number"||he.test(g))&&g>-1&&g%1==0&&g<E}function ea(g){var E=typeof g;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?g!=="__proto__":g===null}function ta(g){return!!Ae&&Ae in g}function na(g){var E=g&&g.constructor,k=typeof E=="function"&&E.prototype||R;return g===k}function Zi(g){return ct.call(g)}function nt(g){if(g!=null){try{return K.call(g)}catch{}try{return g+""}catch{}}return""}function Xi(g,E){return g===E||g!==g&&E!==E}var Qi=Wi(function(){return arguments}())?Wi:function(g){return Qt(g)&&te.call(g,"callee")&&!bt.call(g,"callee")},pr=Array.isArray;function ti(g){return g!=null&&ni(g.length)&&!Ji(g)}var gr=Kr||sa;function ra(g,E){return Yi(g,E)}function Ji(g){if(!es(g))return!1;var E=qn(g);return E==f||E==p||E==c||E==T}function ni(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=o}function es(g){var E=typeof g;return g!=null&&(E=="object"||E=="function")}function Qt(g){return g!=null&&typeof g=="object"}var ts=_t?Lt(_t):Wo;function ri(g){return ti(g)?Go(g):Yo(g)}function ia(){return[]}function sa(){return!1}e.exports=ra})(zs,zs.exports);var ig=zs.exports,pc={};Object.defineProperty(pc,"__esModule",{value:!0});const nO=rg,rO=ig;var gl;(function(e){function t(s={},o={},a=!1){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});let l=nO(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)=>(rO(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 uo={};Object.defineProperty(uo,"__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={}));uo.default=ml;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const Od=uo;class iO{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=iO;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=tO,r=rg,i=ig,s=pc;t.AttributeMap=s.default;const o=uo;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 w=b.retain;for(;f.peekType()==="insert"&&f.peekLength()<=w;)w-=f.peekLength(),m.push(f.next());b.retain-w>0&&p.next(b.retain-w)}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 w=Math.min(f.peekLength(),p.peekLength()),v=f.next(w),T=p.next(w);if(T.retain){const O={};if(typeof v.retain=="number")O.retain=typeof T.retain=="number"?w:T.retain;else if(typeof T.retain=="number")v.retain==null?O.insert=v.insert:O.retain=v.retain;else{const F=v.retain==null?"insert":"retain",[$,B,C]=c(v[F],T.retain),U=u.getHandler($);O[F]={[$]:U.compose(B,C,F==="retain")}}const A=s.default.compose(v.attributes,T.attributes,typeof v.retain=="number");if(A&&(O.attributes=A),y.push(O),!p.hasNext()&&i(y.ops[y.ops.length-1],O)){const F=new u(f.rest());return y.concat(F).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 O=v===h?"on":"with";throw new Error("diff() called "+O+" non-document")}).join("")),m=new u,b=n(p[0],p[1],f,!0),y=new a.default(this.ops),w=new a.default(h.ops);return b.forEach(v=>{let T=v[1].length;for(;T>0;){let O=0;switch(v[0]){case n.INSERT:O=Math.min(w.peekLength(),T),m.push(w.next(O));break;case n.DELETE:O=Math.min(T,y.peekLength()),y.next(O),m.delete(O);break;case n.EQUAL:O=Math.min(y.peekLength(),w.peekLength(),T);const A=y.next(O),F=w.next(O);i(A.insert,F.insert)?m.retain(O,s.default.diff(A.attributes,F.attributes)):m.push(F).delete(O);break}T-=O}}),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(),w=o.default.length(y)-p.peekLength(),v=typeof y.insert=="string"?y.insert.indexOf(f,w)-w:-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(w=>{m.delete?f.push(w):m.retain&&m.attributes&&f.retain(o.default.length(w),s.default.invert(m.attributes,w.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(),[w,v,T]=c(m.retain,y.insert),O=u.getHandler(w);return f.retain({[w]:O.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 w=Math.min(m.peekLength(),b.peekLength()),v=m.next(w),T=b.next(w);if(v.delete)continue;if(T.delete)y.push(T);else{const O=v.retain,A=T.retain;let F=typeof A=="object"&&A!==null?A:w;if(typeof O=="object"&&O!==null&&typeof A=="object"&&A!==null){const $=Object.keys(O)[0];if($===Object.keys(A)[0]){const B=u.getHandler($);B&&(F={[$]:B.transform(O[$],A[$],f)})}}y.retain(F,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=Li(Rt);class Vt extends wt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Vt.blotName="break";Vt.tagName="BR";let Gt=class extends Us{};const sO={"&":"&","<":"<",">":">",'"':""","'":"'"};function fo(e){return e.replace(/[&<>"']/g,t=>sO[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,wt,Gt]),V(sn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let cn=sn;const Rd=1;class ze extends Si{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=sg(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,s){r<=0||(this.scroll.query(i,ee.BLOCK)?n+r===this.length()&&this.format(i,s):super.formatAt(n,Math.min(r,this.length()-n-1),i,s),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const s=r.split(`
|
|
37
|
+
`),o=s.shift();o.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),n+o.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof Vt&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Rd),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()-Rd)){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}}ze.blotName="block";ze.tagName="P";ze.defaultChild=Vt;ze.allowedChildren=[Vt,cn,wt,Gt];class Ct extends wt{attach(){super.attach(),this.attributes=new oo(this.domNode)}delta(){return new J().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,ee.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,i){this.format(r,i)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const i=n.split(`
|
|
38
|
+
`),s=i.pop(),o=i.map(l=>{const c=this.scroll.create(ze.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)}}Ct.scope=ee.BLOCK_BLOT;function sg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(We).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),St(r,{},t)),new J).insert(`
|
|
39
|
+
`,St(e))}function St(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:St(e.parent,t,n)}const kt=class kt extends wt{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(kt.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=kt.CONTENTS.length,r.optimize(),r.formatAt(i,kt.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 Gt?this.prev:null,r=n?n.length():0,i=this.next instanceof Gt?this.next:null,s=i?i.text:"",{textNode:o}=this,a=o.data.split(kt.CONTENTS).join("");o.data=kt.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=kt.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};V(kt,"blotName","cursor"),V(kt,"className","ql-cursor"),V(kt,"tagName","span"),V(kt,"CONTENTS","\uFEFF");let Pr=kt;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,w,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,w=new Array(y-1);v<y;v++)w[v-1]=arguments[v];b.fn.apply(b.context,w)}else{var T=b.length,O;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(!w)for(O=1,w=new Array(y-1);O<y;O++)w[O-1]=arguments[O];b[v].fn.apply(b[v].context,w)}}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 oO=og.exports;const aO=Li(oO),bl=new WeakMap,yl=["error","warn","log","info"];let El="warn";function ag(e){if(El&&yl.indexOf(e)<=yl.indexOf(El)){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=>{El=e};ag.level=vn.level;const Ca=vn("quill:events"),lO=["selectionchange","mousedown","mouseup","click"];lO.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 Y extends aO{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(Y,"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(Y,"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 cO{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,Y.sources.USER),1)}),this.emitter.on(Y.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Y.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?Y.sources.SILENT:i)}catch{}})}),this.emitter.on(Y.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(Y.sources.SILENT)}}),this.update(Y.sources.SILENT)}handleComposition(){this.emitter.on(Y.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Y.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(Y.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 We){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&&Ra(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 We?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(!Ra(this.root,t.startContainer)||!t.collapsed&&!Ra(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]:Y.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]:Y.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=[Y.events.SELECTION_CHANGE,Tr(this.lastRange),Tr(n),t];this.emitter.emit(Y.events.EDITOR_CHANGE,...s),t!==Y.sources.SILENT&&this.emitter.emit(...s)}}}function Ra(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const uO=/^[ -~]*$/;class dO{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=Id(t),i=new J;return hO(r.ops.slice()).reduce((o,a)=>{const l=Rt.Op.length(a);let c=a.attributes||{},u=!1,d=!1;if(a.insert!=null){if(i.retain(l),typeof a.insert=="string"){const p=a.insert;d=!p.endsWith(`
|
|
40
|
+
`)&&(n<=o||!!this.scroll.descendant(Ct,o)[0]),this.scroll.insertAt(o,p);const[m,b]=this.scroll.line(o);let y=Mn({},St(m));if(m instanceof ze){const[w]=m.descendant(We,b);w&&(y=Mn(y,St(w)))}c=Rt.AttributeMap.diff(y,c)||{}}else if(typeof a.insert=="object"){const p=Object.keys(a.insert)[0];if(p==null)return o;const m=this.scroll.query(p,ee.INLINE)!=null;if(m)(n<=o||this.scroll.descendant(Ct,o)[0])&&(d=!0);else if(o>0){const[b,y]=this.scroll.descendant(We,o-1);b instanceof Gt?b.value()[y]!==`
|
|
41
|
+
`&&(u=!0):b instanceof wt&&b.statics.scope===ee.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(o,p,a.insert[p]),m){const[b]=this.scroll.descendant(We,o);if(b){const y=Mn({},St(b));c=Rt.AttributeMap.diff(y,c)||{}}}}n+=l}else if(i.push(a),a.retain!==null&&typeof a.retain=="object"){const p=Object.keys(a.retain)[0];if(p==null)return o;this.scroll.updateEmbedAt(o,p,a.retain[p])}Object.keys(c).forEach(p=>{this.scroll.formatAt(o,l,p,c[p])});const h=u?1:0,f=d?1:0;return n+=h+f,i.retain(h),i.delete(f),o+l+h+f},0),i.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+Rt.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update(new J().retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(s=>{this.scroll.lines(t,Math.max(n,1)).forEach(o=>{o.format(s,r[s])})}),this.scroll.optimize();const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}formatText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(s=>{this.scroll.formatAt(t,n,s,r[s])});const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce((t,n)=>t.concat(n.delta()),new J)}getFormat(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];n===0?this.scroll.path(t).forEach(a=>{const[l]=a;l instanceof ze?r.push(l):l instanceof We&&i.push(l)}):(r=this.scroll.lines(t,n),i=this.scroll.descendants(We,t,n));const[s,o]=[r,i].map(a=>{const l=a.shift();if(l==null)return{};let c=St(l);for(;Object.keys(c).length>0;){const u=a.shift();if(u==null)return c;c=fO(St(u),c)}return c});return{...s,...o}}getHTML(t,n){const[r,i]=this.scroll.line(t);if(r){const s=r.length();return r.length()>=i+n&&!(i===0&&n===s)?Ci(r,i,n,!0):Ci(this.scroll,t,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,n){const r=Id(n),i=new J().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(i)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update(new J().retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
|
|
56
42
|
`).replace(/\r/g,`
|
|
57
|
-
`),this.scroll.insertAt(
|
|
58
|
-
`));
|
|
43
|
+
`),this.scroll.insertAt(t,n),Object.keys(r).forEach(i=>{this.scroll.formatAt(t,n.length,i,r[i])}),this.update(new J().retain(t).insert(n,Tr(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==ze.blotName)return!1;const n=t;return n.children.length>1?!1:n.children.head instanceof Vt}removeFormat(t,n){const r=this.getText(t,n),[i,s]=this.scroll.line(t+n);let o=0,a=new J;i!=null&&(o=i.length()-s,a=i.delta().slice(s,s+o-1).insert(`
|
|
44
|
+
`));const c=this.getContents(t,n+o).diff(new J().insert(r).concat(a)),u=new J().retain(t).concat(c);return this.applyDelta(u)}update(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const i=this.delta;if(n.length===1&&n[0].type==="characterData"&&n[0].target.data.match(uO)&&this.scroll.find(n[0].target)){const s=this.scroll.find(n[0].target),o=St(s),a=s.offset(this.scroll),l=n[0].oldValue.replace(Pr.CONTENTS,""),c=new J().insert(l),u=new J().insert(s.value()),d=r&&{oldRange:Ld(r.oldRange,-a),newRange:Ld(r.newRange,-a)};t=new J().retain(a).concat(c.diff(u,d)).reduce((f,p)=>p.insert?f.insert(p.insert,o):f.push(p),new J),this.delta=i.compose(t)}else this.delta=this.getDelta(),(!t||!On(i.compose(t),this.delta))&&(t=i.diff(this.delta,r));return t}}function kr(e,t,n){if(e.length===0){const[f]=Ia(n.pop());return t<=0?`</li></${f}>`:`</li></${f}>${kr([],t-1,n)}`}const[{child:r,offset:i,length:s,indent:o,type:a},...l]=e,[c,u]=Ia(a);if(o>t)return n.push(a),o===t+1?`<${c}><li${u}>${Ci(r,i,s)}${kr(l,o,n)}`:`<${c}><li>${kr(e,t+1,n)}`;const d=n[n.length-1];if(o===t&&a===d)return`</li><li${u}>${Ci(r,i,s)}${kr(l,o,n)}`;const[h]=Ia(n.pop());return`</li></${h}>${kr(e,t-1,n)}`}function Ci(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in e&&typeof e.html=="function")return e.html(t,n);if(e instanceof Gt)return fo(e.value().slice(t,t+n)).replaceAll(" "," ");if(e instanceof Ht){if(e.statics.blotName==="list-container"){const c=[];return e.children.forEachAt(t,n,(u,d,h)=>{const f="formats"in u&&typeof u.formats=="function"?u.formats():{};c.push({child:u,offset:d,length:h,indent:f.indent||0,type:f.list})}),kr(c,-1,[])}const i=[];if(e.children.forEachAt(t,n,(c,u,d)=>{i.push(Ci(c,u,d))}),r||e.statics.blotName==="list")return i.join("");const{outerHTML:s,innerHTML:o}=e.domNode,[a,l]=s.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${i.join("")}<${l}`:`${a}>${i.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function fO(e,t){return Object.keys(t).reduce((n,r)=>{if(e[r]==null)return n;const i=t[r];return i===e[r]?n[r]=i:Array.isArray(i)?i.indexOf(e[r])<0?n[r]=i.concat([e[r]]):n[r]=i:n[r]=[i,e[r]],n},{})}function Ia(e){const t=e==="ordered"?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Id(e){return e.reduce((t,n)=>{if(typeof n.insert=="string"){const r=n.insert.replace(/\r\n/g,`
|
|
59
45
|
`).replace(/\r/g,`
|
|
60
|
-
`);return A.insert(N,C.attributes)}return A.push(C)},new c.default)}r.default=M},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var a=function(){function T(R,x){var w=[],S=!0,I=!1,L=void 0;try{for(var B=R[Symbol.iterator](),M;!(S=(M=B.next()).done)&&(w.push(M.value),!(x&&w.length===x));S=!0);}catch(F){I=!0,L=F}finally{try{!S&&B.return&&B.return()}finally{if(I)throw L}}return w}return function(R,x){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return T(R,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(R,x){for(var w=0;w<x.length;w++){var S=x[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(R,S.key,S)}}return function(R,x,w){return x&&T(R.prototype,x),w&&T(R,w),R}}(),l=i(0),s=m(l),c=i(21),d=m(c),u=i(11),h=m(u),f=i(8),g=m(f),p=i(10),y=m(p);function m(T){return T&&T.__esModule?T:{default:T}}function b(T){if(Array.isArray(T)){for(var R=0,x=Array(T.length);R<T.length;R++)x[R]=T[R];return x}else return Array.from(T)}function _(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}var v=(0,y.default)("quill:selection"),E=function T(R){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;_(this,T),this.index=R,this.length=x},k=function(){function T(R,x){var w=this;_(this,T),this.emitter=x,this.scroll=R,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=s.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){w.mouseDown||setTimeout(w.update.bind(w,g.default.sources.USER),1)}),this.emitter.on(g.default.events.EDITOR_CHANGE,function(S,I){S===g.default.events.TEXT_CHANGE&&I.length()>0&&w.update(g.default.sources.SILENT)}),this.emitter.on(g.default.events.SCROLL_BEFORE_UPDATE,function(){if(w.hasFocus()){var S=w.getNativeRange();S!=null&&S.start.node!==w.cursor.textNode&&w.emitter.once(g.default.events.SCROLL_UPDATE,function(){try{w.setNativeRange(S.start.node,S.start.offset,S.end.node,S.end.offset)}catch{}})}}),this.emitter.on(g.default.events.SCROLL_OPTIMIZE,function(S,I){if(I.range){var L=I.range,B=L.startNode,M=L.startOffset,F=L.endNode,G=L.endOffset;w.setNativeRange(B,M,F,G)}}),this.update(g.default.sources.SILENT)}return o(T,[{key:"handleComposition",value:function(){var x=this;this.root.addEventListener("compositionstart",function(){x.composing=!0}),this.root.addEventListener("compositionend",function(){if(x.composing=!1,x.cursor.parent){var w=x.cursor.restore();if(!w)return;setTimeout(function(){x.setNativeRange(w.startNode,w.startOffset,w.endNode,w.endOffset)},1)}})}},{key:"handleDragging",value:function(){var x=this;this.emitter.listenDOM("mousedown",document.body,function(){x.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){x.mouseDown=!1,x.update(g.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(x,w){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[x])){this.scroll.update();var S=this.getNativeRange();if(!(S==null||!S.native.collapsed||s.default.query(x,s.default.Scope.BLOCK))){if(S.start.node!==this.cursor.textNode){var I=s.default.find(S.start.node,!1);if(I==null)return;if(I instanceof s.default.Leaf){var L=I.split(S.start.offset);I.parent.insertBefore(this.cursor,L)}else I.insertBefore(this.cursor,S.start.node);this.cursor.attach()}this.cursor.format(x,w),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=this.scroll.length();x=Math.min(x,S-1),w=Math.min(x+w,S-1)-x;var I=void 0,L=this.scroll.leaf(x),B=a(L,2),M=B[0],F=B[1];if(M==null)return null;var G=M.position(F,!0),U=a(G,2);I=U[0],F=U[1];var A=document.createRange();if(w>0){A.setStart(I,F);var C=this.scroll.leaf(x+w),P=a(C,2);if(M=P[0],F=P[1],M==null)return null;var N=M.position(F,!0),H=a(N,2);return I=H[0],F=H[1],A.setEnd(I,F),A.getBoundingClientRect()}else{var $="left",D=void 0;return I instanceof Text?(F<I.data.length?(A.setStart(I,F),A.setEnd(I,F+1)):(A.setStart(I,F-1),A.setEnd(I,F),$="right"),D=A.getBoundingClientRect()):(D=M.domNode.getBoundingClientRect(),F>0&&($="right")),{bottom:D.top+D.height,height:D.height,left:D[$],right:D[$],top:D.top,width:0}}}},{key:"getNativeRange",value:function(){var x=document.getSelection();if(x==null||x.rangeCount<=0)return null;var w=x.getRangeAt(0);if(w==null)return null;var S=this.normalizeNative(w);return v.info("getNativeRange",S),S}},{key:"getRange",value:function(){var x=this.getNativeRange();if(x==null)return[null,null];var w=this.normalizedToRange(x);return[w,x]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(x){var w=this,S=[[x.start.node,x.start.offset]];x.native.collapsed||S.push([x.end.node,x.end.offset]);var I=S.map(function(M){var F=a(M,2),G=F[0],U=F[1],A=s.default.find(G,!0),C=A.offset(w.scroll);return U===0?C:A instanceof s.default.Container?C+A.length():C+A.index(G,U)}),L=Math.min(Math.max.apply(Math,b(I)),this.scroll.length()-1),B=Math.min.apply(Math,[L].concat(b(I)));return new E(B,L-B)}},{key:"normalizeNative",value:function(x){if(!O(this.root,x.startContainer)||!x.collapsed&&!O(this.root,x.endContainer))return null;var w={start:{node:x.startContainer,offset:x.startOffset},end:{node:x.endContainer,offset:x.endOffset},native:x};return[w.start,w.end].forEach(function(S){for(var I=S.node,L=S.offset;!(I instanceof Text)&&I.childNodes.length>0;)if(I.childNodes.length>L)I=I.childNodes[L],L=0;else if(I.childNodes.length===L)I=I.lastChild,L=I instanceof Text?I.data.length:I.childNodes.length+1;else break;S.node=I,S.offset=L}),w}},{key:"rangeToNative",value:function(x){var w=this,S=x.collapsed?[x.index]:[x.index,x.index+x.length],I=[],L=this.scroll.length();return S.forEach(function(B,M){B=Math.min(L-1,B);var F=void 0,G=w.scroll.leaf(B),U=a(G,2),A=U[0],C=U[1],P=A.position(C,M!==0),N=a(P,2);F=N[0],C=N[1],I.push(F,C)}),I.length<2&&(I=I.concat(I)),I}},{key:"scrollIntoView",value:function(x){var w=this.lastRange;if(w!=null){var S=this.getBounds(w.index,w.length);if(S!=null){var I=this.scroll.length()-1,L=this.scroll.line(Math.min(w.index,I)),B=a(L,1),M=B[0],F=M;if(w.length>0){var G=this.scroll.line(Math.min(w.index+w.length,I)),U=a(G,1);F=U[0]}if(!(M==null||F==null)){var A=x.getBoundingClientRect();S.top<A.top?x.scrollTop-=A.top-S.top:S.bottom>A.bottom&&(x.scrollTop+=S.bottom-A.bottom)}}}}},{key:"setNativeRange",value:function(x,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(v.info("setNativeRange",x,w,S,I),!(x!=null&&(this.root.parentNode==null||x.parentNode==null||S.parentNode==null))){var B=document.getSelection();if(B!=null)if(x!=null){this.hasFocus()||this.root.focus();var M=(this.getNativeRange()||{}).native;if(M==null||L||x!==M.startContainer||w!==M.startOffset||S!==M.endContainer||I!==M.endOffset){x.tagName=="BR"&&(w=[].indexOf.call(x.parentNode.childNodes,x),x=x.parentNode),S.tagName=="BR"&&(I=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode);var F=document.createRange();F.setStart(x,w),F.setEnd(S,I),B.removeAllRanges(),B.addRange(F)}}else B.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof w=="string"&&(S=w,w=!1),v.info("setRange",x),x!=null){var I=this.rangeToNative(x);this.setNativeRange.apply(this,b(I).concat([w]))}else this.setNativeRange(null);this.update(S)}},{key:"update",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g.default.sources.USER,w=this.lastRange,S=this.getRange(),I=a(S,2),L=I[0],B=I[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,h.default)(w,this.lastRange)){var M;!this.composing&&B!=null&&B.native.collapsed&&B.start.node!==this.cursor.textNode&&this.cursor.restore();var F=[g.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(w),x];if((M=this.emitter).emit.apply(M,[g.default.events.EDITOR_CHANGE].concat(F)),x!==g.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,F)}}}}]),T}();function O(T,R){try{R.parentNode}catch{return!1}return R instanceof Text&&(R=R.parentNode),T.contains(R)}r.Range=E,r.default=k},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(p,y){for(var m=0;m<y.length;m++){var b=y[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,y,m){return y&&g(p.prototype,y),m&&g(p,m),p}}(),o=function g(p,y,m){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,y);if(b===void 0){var _=Object.getPrototypeOf(p);return _===null?void 0:g(_,y,m)}else{if("value"in b)return b.value;var v=b.get;return v===void 0?void 0:v.call(m)}},l=i(0),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(){return d(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"insertInto",value:function(m,b){m.children.length===0?o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertInto",this).call(this,m,b):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),p}(s.default.Embed);f.blotName="break",f.tagName="BR",r.default=f},function(n,r,i){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var g in f)f.hasOwnProperty(g)&&(h[g]=f[g])};return function(h,f){u(h,f);function g(){this.constructor=h}h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),l=i(30),s=i(1),c=function(u){a(h,u);function h(f){var g=u.call(this,f)||this;return g.build(),g}return h.prototype.appendChild=function(f){this.insertBefore(f)},h.prototype.attach=function(){u.prototype.attach.call(this),this.children.forEach(function(f){f.attach()})},h.prototype.build=function(){var f=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(g){try{var p=d(g);f.insertBefore(p,f.children.head||void 0)}catch(y){if(y instanceof s.ParchmentError)return;throw y}})},h.prototype.deleteAt=function(f,g){if(f===0&&g===this.length())return this.remove();this.children.forEachAt(f,g,function(p,y,m){p.deleteAt(y,m)})},h.prototype.descendant=function(f,g){var p=this.children.find(g),y=p[0],m=p[1];return f.blotName==null&&f(y)||f.blotName!=null&&y instanceof f?[y,m]:y instanceof h?y.descendant(f,m):[null,-1]},h.prototype.descendants=function(f,g,p){g===void 0&&(g=0),p===void 0&&(p=Number.MAX_VALUE);var y=[],m=p;return this.children.forEachAt(g,p,function(b,_,v){(f.blotName==null&&f(b)||f.blotName!=null&&b instanceof f)&&y.push(b),b instanceof h&&(y=y.concat(b.descendants(f,_,m))),m-=v}),y},h.prototype.detach=function(){this.children.forEach(function(f){f.detach()}),u.prototype.detach.call(this)},h.prototype.formatAt=function(f,g,p,y){this.children.forEachAt(f,g,function(m,b,_){m.formatAt(b,_,p,y)})},h.prototype.insertAt=function(f,g,p){var y=this.children.find(f),m=y[0],b=y[1];if(m)m.insertAt(b,g,p);else{var _=p==null?s.create("text",g):s.create(g,p);this.appendChild(_)}},h.prototype.insertBefore=function(f,g){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(p){return f instanceof p}))throw new s.ParchmentError("Cannot insert "+f.statics.blotName+" into "+this.statics.blotName);f.insertInto(this,g)},h.prototype.length=function(){return this.children.reduce(function(f,g){return f+g.length()},0)},h.prototype.moveChildren=function(f,g){this.children.forEach(function(p){f.insertBefore(p,g)})},h.prototype.optimize=function(f){if(u.prototype.optimize.call(this,f),this.children.length===0)if(this.statics.defaultChild!=null){var g=s.create(this.statics.defaultChild);this.appendChild(g),g.optimize(f)}else this.remove()},h.prototype.path=function(f,g){g===void 0&&(g=!1);var p=this.children.find(f,g),y=p[0],m=p[1],b=[[this,f]];return y instanceof h?b.concat(y.path(m,g)):(y!=null&&b.push([y,m]),b)},h.prototype.removeChild=function(f){this.children.remove(f)},h.prototype.replace=function(f){f instanceof h&&f.moveChildren(this),u.prototype.replace.call(this,f)},h.prototype.split=function(f,g){if(g===void 0&&(g=!1),!g){if(f===0)return this;if(f===this.length())return this.next}var p=this.clone();return this.parent.insertBefore(p,this.next),this.children.forEachAt(f,this.length(),function(y,m,b){y=y.split(m,g),p.appendChild(y)}),p},h.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},h.prototype.update=function(f,g){var p=this,y=[],m=[];f.forEach(function(b){b.target===p.domNode&&b.type==="childList"&&(y.push.apply(y,b.addedNodes),m.push.apply(m,b.removedNodes))}),m.forEach(function(b){if(!(b.parentNode!=null&&b.tagName!=="IFRAME"&&document.body.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var _=s.find(b);_!=null&&(_.domNode.parentNode==null||_.domNode.parentNode===p.domNode)&&_.detach()}}),y.filter(function(b){return b.parentNode==p.domNode}).sort(function(b,_){return b===_?0:b.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(b){var _=null;b.nextSibling!=null&&(_=s.find(b.nextSibling));var v=d(b);(v.next!=_||v.next==null)&&(v.parent!=null&&v.parent.removeChild(p),p.insertBefore(v,_||void 0))})},h}(l.default);function d(u){var h=s.find(u);if(h==null)try{h=s.create(u)}catch{h=s.create(s.Scope.INLINE),[].slice.call(u.childNodes).forEach(function(g){h.domNode.appendChild(g)}),u.parentNode&&u.parentNode.replaceChild(h.domNode,u),h.attach()}return h}r.default=c},function(n,r,i){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var g in f)f.hasOwnProperty(g)&&(h[g]=f[g])};return function(h,f){u(h,f);function g(){this.constructor=h}h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),l=i(31),s=i(17),c=i(1),d=function(u){a(h,u);function h(f){var g=u.call(this,f)||this;return g.attributes=new l.default(g.domNode),g}return h.formats=function(f){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return f.tagName.toLowerCase()},h.prototype.format=function(f,g){var p=c.query(f);p instanceof o.default?this.attributes.attribute(p,g):g&&p!=null&&(f!==this.statics.blotName||this.formats()[f]!==g)&&this.replaceWith(f,g)},h.prototype.formats=function(){var f=this.attributes.values(),g=this.statics.formats(this.domNode);return g!=null&&(f[this.statics.blotName]=g),f},h.prototype.replaceWith=function(f,g){var p=u.prototype.replaceWith.call(this,f,g);return this.attributes.copy(p),p},h.prototype.update=function(f,g){var p=this;u.prototype.update.call(this,f,g),f.some(function(y){return y.target===p.domNode&&y.type==="attributes"})&&this.attributes.build()},h.prototype.wrap=function(f,g){var p=u.prototype.wrap.call(this,f,g);return p instanceof h&&p.statics.scope===this.statics.scope&&this.attributes.move(p),p},h}(s.default);r.default=d},function(n,r,i){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),l=i(1),s=function(c){a(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.value=function(u){return!0},d.prototype.index=function(u,h){return this.domNode===u||this.domNode.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(h,1):-1},d.prototype.position=function(u,h){var f=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return u>0&&(f+=1),[this.parent.domNode,f]},d.prototype.value=function(){var u;return u={},u[this.statics.blotName]=this.statics.value(this.domNode)||!0,u},d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=s},function(n,r,i){var a=i(11),o=i(3),l={attributes:{compose:function(c,d,u){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var h=o(!0,{},d);u||(h=Object.keys(h).reduce(function(g,p){return h[p]!=null&&(g[p]=h[p]),g},{}));for(var f in c)c[f]!==void 0&&d[f]===void 0&&(h[f]=c[f]);return Object.keys(h).length>0?h:void 0},diff:function(c,d){typeof c!="object"&&(c={}),typeof d!="object"&&(d={});var u=Object.keys(c).concat(Object.keys(d)).reduce(function(h,f){return a(c[f],d[f])||(h[f]=d[f]===void 0?null:d[f]),h},{});return Object.keys(u).length>0?u:void 0},transform:function(c,d,u){if(typeof c!="object")return d;if(typeof d=="object"){if(!u)return d;var h=Object.keys(d).reduce(function(f,g){return c[g]===void 0&&(f[g]=d[g]),f},{});return Object.keys(h).length>0?h:void 0}}},iterator:function(c){return new s(c)},length:function(c){return typeof c.delete=="number"?c.delete:typeof c.retain=="number"?c.retain:typeof c.insert=="string"?c.insert.length:1}};function s(c){this.ops=c,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(c){c||(c=1/0);var d=this.ops[this.index];if(d){var u=this.offset,h=l.length(d);if(c>=h-u?(c=h-u,this.index+=1,this.offset=0):this.offset+=c,typeof d.delete=="number")return{delete:c};var f={};return d.attributes&&(f.attributes=d.attributes),typeof d.retain=="number"?f.retain=c:typeof d.insert=="string"?f.insert=d.insert.substr(u,c):f.insert=d.insert,f}else return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},s.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var c=this.offset,d=this.index,u=this.next(),h=this.ops.slice(this.index);return this.offset=c,this.index=d,[u].concat(h)}else return[]},n.exports=l},function(n,r){var i=function(){function a(p,y){return y!=null&&p instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var s;try{s=Promise}catch{s=function(){}}function c(p,y,m,b,_){typeof y=="object"&&(m=y.depth,b=y.prototype,_=y.includeNonEnumerable,y=y.circular);var v=[],E=[],k=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof m>"u"&&(m=1/0);function O(T,R){if(T===null)return null;if(R===0)return T;var x,w;if(typeof T!="object")return T;if(a(T,o))x=new o;else if(a(T,l))x=new l;else if(a(T,s))x=new s(function(A,C){T.then(function(P){A(O(P,R-1))},function(P){C(O(P,R-1))})});else if(c.__isArray(T))x=[];else if(c.__isRegExp(T))x=new RegExp(T.source,g(T)),T.lastIndex&&(x.lastIndex=T.lastIndex);else if(c.__isDate(T))x=new Date(T.getTime());else{if(k&&Buffer.isBuffer(T))return Buffer.allocUnsafe?x=Buffer.allocUnsafe(T.length):x=new Buffer(T.length),T.copy(x),x;a(T,Error)?x=Object.create(T):typeof b>"u"?(w=Object.getPrototypeOf(T),x=Object.create(w)):(x=Object.create(b),w=b)}if(y){var S=v.indexOf(T);if(S!=-1)return E[S];v.push(T),E.push(x)}a(T,o)&&T.forEach(function(A,C){var P=O(C,R-1),N=O(A,R-1);x.set(P,N)}),a(T,l)&&T.forEach(function(A){var C=O(A,R-1);x.add(C)});for(var I in T){var L;w&&(L=Object.getOwnPropertyDescriptor(w,I)),!(L&&L.set==null)&&(x[I]=O(T[I],R-1))}if(Object.getOwnPropertySymbols)for(var B=Object.getOwnPropertySymbols(T),I=0;I<B.length;I++){var M=B[I],F=Object.getOwnPropertyDescriptor(T,M);F&&!F.enumerable&&!_||(x[M]=O(T[M],R-1),F.enumerable||Object.defineProperty(x,M,{enumerable:!1}))}if(_)for(var G=Object.getOwnPropertyNames(T),I=0;I<G.length;I++){var U=G[I],F=Object.getOwnPropertyDescriptor(T,U);F&&F.enumerable||(x[U]=O(T[U],R-1),Object.defineProperty(x,U,{enumerable:!1}))}return x}return O(p,m)}c.clonePrototype=function(y){if(y===null)return null;var m=function(){};return m.prototype=y,new m};function d(p){return Object.prototype.toString.call(p)}c.__objToStr=d;function u(p){return typeof p=="object"&&d(p)==="[object Date]"}c.__isDate=u;function h(p){return typeof p=="object"&&d(p)==="[object Array]"}c.__isArray=h;function f(p){return typeof p=="object"&&d(p)==="[object RegExp]"}c.__isRegExp=f;function g(p){var y="";return p.global&&(y+="g"),p.ignoreCase&&(y+="i"),p.multiline&&(y+="m"),y}return c.__getRegExpFlags=g,c}();typeof n=="object"&&n.exports&&(n.exports=i)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(w,S){var I=[],L=!0,B=!1,M=void 0;try{for(var F=w[Symbol.iterator](),G;!(L=(G=F.next()).done)&&(I.push(G.value),!(S&&I.length===S));L=!0);}catch(U){B=!0,M=U}finally{try{!L&&F.return&&F.return()}finally{if(B)throw M}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return x(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function x(w,S){for(var I=0;I<S.length;I++){var L=S[I];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(w,L.key,L)}}return function(w,S,I){return S&&x(w.prototype,S),I&&x(w,I),w}}(),l=function x(w,S,I){w===null&&(w=Function.prototype);var L=Object.getOwnPropertyDescriptor(w,S);if(L===void 0){var B=Object.getPrototypeOf(w);return B===null?void 0:x(B,S,I)}else{if("value"in L)return L.value;var M=L.get;return M===void 0?void 0:M.call(I)}},s=i(0),c=v(s),d=i(8),u=v(d),h=i(4),f=v(h),g=i(16),p=v(g),y=i(13),m=v(y),b=i(25),_=v(b);function v(x){return x&&x.__esModule?x:{default:x}}function E(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function k(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function O(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}function T(x){return x instanceof f.default||x instanceof h.BlockEmbed}var R=function(x){O(w,x);function w(S,I){E(this,w);var L=k(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S));return L.emitter=I.emitter,Array.isArray(I.whitelist)&&(L.whitelist=I.whitelist.reduce(function(B,M){return B[M]=!0,B},{})),L.domNode.addEventListener("DOMNodeInserted",function(){}),L.optimize(),L.enable(),L}return o(w,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(I,L){var B=this.line(I),M=a(B,2),F=M[0],G=M[1],U=this.line(I+L),A=a(U,1),C=A[0];if(l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"deleteAt",this).call(this,I,L),C!=null&&F!==C&&G>0){if(F instanceof h.BlockEmbed||C instanceof h.BlockEmbed){this.optimize();return}if(F instanceof m.default){var P=F.newlineIndex(F.length(),!0);if(P>-1&&(F=F.split(P+1),F===C)){this.optimize();return}}else if(C instanceof m.default){var N=C.newlineIndex(0);N>-1&&C.split(N+1)}var H=C.children.head instanceof p.default?null:C.children.head;F.moveChildren(C,H),F.remove()}this.optimize()}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",I)}},{key:"formatAt",value:function(I,L,B,M){this.whitelist!=null&&!this.whitelist[B]||(l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"formatAt",this).call(this,I,L,B,M),this.optimize())}},{key:"insertAt",value:function(I,L,B){if(!(B!=null&&this.whitelist!=null&&!this.whitelist[L])){if(I>=this.length())if(B==null||c.default.query(L,c.default.Scope.BLOCK)==null){var M=c.default.create(this.statics.defaultChild);this.appendChild(M),B==null&&L.endsWith(`
|
|
61
|
-
`)
|
|
62
|
-
`,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`);he=0,X.forEach(function(ne,te){D?(me.insertAt(we+he,V.TAB),he+=V.TAB.length,te===0?Q+=V.TAB.length:ie+=V.TAB.length):ne.startsWith(V.TAB)&&(me.deleteAt(we+he,V.TAB.length),he-=V.TAB.length,te===0?Q-=V.TAB.length:ie-=V.TAB.length),he+=ne.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(Q,ie,E.default.sources.SILENT)}}}}function H(D){return{key:D[0].toUpperCase(),shortKey:!0,handler:function(W,V){this.quill.format(D,!V.format[D],E.default.sources.USER)}}}function $(D){if(typeof D=="string"||typeof D=="number")return $({key:D});if((typeof D>"u"?"undefined":a(D))==="object"&&(D=(0,c.default)(D,!1)),typeof D.key=="string")if(F.keys[D.key.toUpperCase()]!=null)D.key=F.keys[D.key.toUpperCase()];else if(D.key.length===1)D.key=D.key.toUpperCase().charCodeAt(0);else return null;return D.shortKey&&(D[M]=D.shortKey,delete D.shortKey),D}r.default=F,r.SHORTKEY=M},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(b,_){var v=[],E=!0,k=!1,O=void 0;try{for(var T=b[Symbol.iterator](),R;!(E=(R=T.next()).done)&&(v.push(R.value),!(_&&v.length===_));E=!0);}catch(x){k=!0,O=x}finally{try{!E&&T.return&&T.return()}finally{if(k)throw O}}return v}return function(b,_){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return m(b,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function m(b,_,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,_);if(E===void 0){var k=Object.getPrototypeOf(b);return k===null?void 0:m(k,_,v)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(v)}},l=function(){function m(b,_){for(var v=0;v<_.length;v++){var E=_[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,_,v){return _&&m(b.prototype,_),v&&m(b,v),b}}(),s=i(0),c=h(s),d=i(7),u=h(d);function h(m){return m&&m.__esModule?m:{default:m}}function f(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function g(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function p(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var y=function(m){p(b,m),l(b,null,[{key:"value",value:function(){}}]);function b(_,v){f(this,b);var E=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return E.selection=v,E.textNode=document.createTextNode(b.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return l(b,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(v,E){if(this._length!==0)return o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,v,E);for(var k=this,O=0;k!=null&&k.statics.scope!==c.default.Scope.BLOCK_BLOT;)O+=k.offset(k.parent),k=k.parent;k!=null&&(this._length=b.CONTENTS.length,k.optimize(),k.formatAt(O,b.CONTENTS.length,v,E),this._length=0)}},{key:"index",value:function(v,E){return v===this.textNode?0:o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,v,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var v=this.textNode,E=this.selection.getNativeRange(),k=void 0,O=void 0,T=void 0;if(E!=null&&E.start.node===v&&E.end.node===v){var R=[v,E.start.offset,E.end.offset];k=R[0],O=R[1],T=R[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==b.CONTENTS){var x=this.textNode.data.split(b.CONTENTS).join("");this.next instanceof u.default?(k=this.next.domNode,this.next.insertAt(0,x),this.textNode.data=b.CONTENTS):(this.textNode.data=x,this.parent.insertBefore(c.default.create(this.textNode),this),this.textNode=document.createTextNode(b.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),O!=null){var w=[O,T].map(function(I){return Math.max(0,Math.min(k.data.length,I-1))}),S=a(w,2);return O=S[0],T=S[1],{startNode:k,startOffset:O,endNode:k,endOffset:T}}}}},{key:"update",value:function(v,E){var k=this;if(v.some(function(T){return T.type==="characterData"&&T.target===k.textNode})){var O=this.restore();O&&(E.range=O)}}},{key:"value",value:function(){return""}}]),b}(c.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",r.default=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=c(a),l=i(4),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(){return d(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(o.default.Container);f.allowedChildren=[s.default,l.BlockEmbed,f],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var a=function(){function y(m,b){for(var _=0;_<b.length;_++){var v=b[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,b,_){return b&&y(m.prototype,b),_&&y(m,_),m}}(),o=function y(m,b,_){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,b);if(v===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:y(E,b,_)}else{if("value"in v)return v.value;var k=v.get;return k===void 0?void 0:k.call(_)}},l=i(0),s=c(l);function c(y){return y&&y.__esModule?y:{default:y}}function d(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function u(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function h(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var f=function(y){h(m,y);function m(){return d(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"value",value:function(_){var v=o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,_);return v.startsWith("rgb(")?(v=v.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+v.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):v}}]),m}(s.default.Attributor.Style),g=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),p=new f("color","color",{scope:s.default.Scope.INLINE});r.ColorAttributor=f,r.ColorClass=g,r.ColorStyle=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var a=function(){function p(y,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(y,_.key,_)}}return function(y,m,b){return m&&p(y.prototype,m),b&&p(y,b),y}}(),o=function p(y,m,b){y===null&&(y=Function.prototype);var _=Object.getOwnPropertyDescriptor(y,m);if(_===void 0){var v=Object.getPrototypeOf(y);return v===null?void 0:p(v,m,b)}else{if("value"in _)return _.value;var E=_.get;return E===void 0?void 0:E.call(b)}},l=i(6),s=c(l);function c(p){return p&&p.__esModule?p:{default:p}}function d(p,y){if(!(p instanceof y))throw new TypeError("Cannot call a class as a function")}function u(p,y){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:p}function h(p,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);p.prototype=Object.create(y&&y.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(p,y):p.__proto__=y)}var f=function(p){h(y,p);function y(){return d(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(b,_){if(b!==this.statics.blotName||!_)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,b,_);_=this.constructor.sanitize(_),this.domNode.setAttribute("href",_)}}],[{key:"create",value:function(b){var _=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,b);return b=this.sanitize(b),_.setAttribute("href",b),_.setAttribute("rel","noopener noreferrer"),_.setAttribute("target","_blank"),_}},{key:"formats",value:function(b){return b.getAttribute("href")}},{key:"sanitize",value:function(b){return g(b,this.PROTOCOL_WHITELIST)?b:this.SANITIZED_URL}}]),y}(s.default);f.blotName="link",f.tagName="A",f.SANITIZED_URL="about:blank",f.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function g(p,y){var m=document.createElement("a");m.href=p;var b=m.href.slice(0,m.href.indexOf(":"));return y.indexOf(b)>-1}r.default=f,r.sanitize=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=function(){function y(m,b){for(var _=0;_<b.length;_++){var v=b[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,b,_){return b&&y(m.prototype,b),_&&y(m,_),m}}(),l=i(23),s=u(l),c=i(107),d=u(c);function u(y){return y&&y.__esModule?y:{default:y}}function h(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}var f=0;function g(y,m){y.setAttribute(m,y.getAttribute(m)!=="true")}var p=function(){function y(m){var b=this;h(this,y),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){b.togglePicker()}),this.label.addEventListener("keydown",function(_){switch(_.keyCode){case s.default.keys.ENTER:b.togglePicker();break;case s.default.keys.ESCAPE:b.escape(),_.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),g(this.label,"aria-expanded"),g(this.options,"aria-hidden")}},{key:"buildItem",value:function(b){var _=this,v=document.createElement("span");return v.tabIndex="0",v.setAttribute("role","button"),v.classList.add("ql-picker-item"),b.hasAttribute("value")&&v.setAttribute("data-value",b.getAttribute("value")),b.textContent&&v.setAttribute("data-label",b.textContent),v.addEventListener("click",function(){_.selectItem(v,!0)}),v.addEventListener("keydown",function(E){switch(E.keyCode){case s.default.keys.ENTER:_.selectItem(v,!0),E.preventDefault();break;case s.default.keys.ESCAPE:_.escape(),E.preventDefault();break}}),v}},{key:"buildLabel",value:function(){var b=document.createElement("span");return b.classList.add("ql-picker-label"),b.innerHTML=d.default,b.tabIndex="0",b.setAttribute("role","button"),b.setAttribute("aria-expanded","false"),this.container.appendChild(b),b}},{key:"buildOptions",value:function(){var b=this,_=document.createElement("span");_.classList.add("ql-picker-options"),_.setAttribute("aria-hidden","true"),_.tabIndex="-1",_.id="ql-picker-options-"+f,f+=1,this.label.setAttribute("aria-controls",_.id),this.options=_,[].slice.call(this.select.options).forEach(function(v){var E=b.buildItem(v);_.appendChild(E),v.selected===!0&&b.selectItem(E)}),this.container.appendChild(_)}},{key:"buildPicker",value:function(){var b=this;[].slice.call(this.select.attributes).forEach(function(_){b.container.setAttribute(_.name,_.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var b=this;this.close(),setTimeout(function(){return b.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(b){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=this.container.querySelector(".ql-selected");if(b!==v&&(v!=null&&v.classList.remove("ql-selected"),b!=null&&(b.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(b.parentNode.children,b),b.hasAttribute("data-value")?this.label.setAttribute("data-value",b.getAttribute("data-value")):this.label.removeAttribute("data-value"),b.hasAttribute("data-label")?this.label.setAttribute("data-label",b.getAttribute("data-label")):this.label.removeAttribute("data-label"),_))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var b=void 0;if(this.select.selectedIndex>-1){var _=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];b=this.select.options[this.select.selectedIndex],this.selectItem(_)}else this.selectItem(null);var v=b!=null&&b!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",v)}}]),y}();r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=B(a),l=i(5),s=B(l),c=i(4),d=B(c),u=i(16),h=B(u),f=i(25),g=B(f),p=i(24),y=B(p),m=i(35),b=B(m),_=i(6),v=B(_),E=i(22),k=B(E),O=i(7),T=B(O),R=i(55),x=B(R),w=i(42),S=B(w),I=i(23),L=B(I);function B(M){return M&&M.__esModule?M:{default:M}}s.default.register({"blots/block":d.default,"blots/block/embed":c.BlockEmbed,"blots/break":h.default,"blots/container":g.default,"blots/cursor":y.default,"blots/embed":b.default,"blots/inline":v.default,"blots/scroll":k.default,"blots/text":T.default,"modules/clipboard":x.default,"modules/history":S.default,"modules/keyboard":L.default}),o.default.register(d.default,h.default,y.default,v.default,k.default,T.default),r.default=s.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=function(){function l(s){this.domNode=s,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(s){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var c;return Array.isArray(this.tagName)?(typeof s=="string"&&(s=s.toUpperCase(),parseInt(s).toString()===s&&(s=parseInt(s))),typeof s=="number"?c=document.createElement(this.tagName[s-1]):this.tagName.indexOf(s)>-1?c=document.createElement(s):c=document.createElement(this.tagName[0])):c=document.createElement(this.tagName),this.className&&c.classList.add(this.className),c},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var s=this.domNode.cloneNode(!1);return a.create(s)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},l.prototype.deleteAt=function(s,c){var d=this.isolate(s,c);d.remove()},l.prototype.formatAt=function(s,c,d,u){var h=this.isolate(s,c);if(a.query(d,a.Scope.BLOT)!=null&&u)h.wrap(d,u);else if(a.query(d,a.Scope.ATTRIBUTE)!=null){var f=a.create(this.statics.scope);h.wrap(f),f.format(d,u)}},l.prototype.insertAt=function(s,c,d){var u=d==null?a.create("text",c):a.create(c,d),h=this.split(s);this.parent.insertBefore(u,h)},l.prototype.insertInto=function(s,c){c===void 0&&(c=null),this.parent!=null&&this.parent.children.remove(this);var d=null;s.children.insertBefore(this,c),c!=null&&(d=c.domNode),(this.domNode.parentNode!=s.domNode||this.domNode.nextSibling!=d)&&s.domNode.insertBefore(this.domNode,d),this.parent=s,this.attach()},l.prototype.isolate=function(s,c){var d=this.split(s);return d.split(c),d},l.prototype.length=function(){return 1},l.prototype.offset=function(s){return s===void 0&&(s=this.parent),this.parent==null||this==s?0:this.parent.children.offset(this)+this.parent.offset(s)},l.prototype.optimize=function(s){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(s){s.parent!=null&&(s.parent.insertBefore(this,s.next),s.remove())},l.prototype.replaceWith=function(s,c){var d=typeof s=="string"?a.create(s,c):s;return d.replace(this),d},l.prototype.split=function(s,c){return s===0?this:this.next},l.prototype.update=function(s,c){},l.prototype.wrap=function(s,c){var d=typeof s=="string"?a.create(s,c):s;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},l.blotName="abstract",l}();r.default=o},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(12),o=i(32),l=i(33),s=i(1),c=function(){function d(u){this.attributes={},this.domNode=u,this.build()}return d.prototype.attribute=function(u,h){h?u.add(this.domNode,h)&&(u.value(this.domNode)!=null?this.attributes[u.attrName]=u:delete this.attributes[u.attrName]):(u.remove(this.domNode),delete this.attributes[u.attrName])},d.prototype.build=function(){var u=this;this.attributes={};var h=a.default.keys(this.domNode),f=o.default.keys(this.domNode),g=l.default.keys(this.domNode);h.concat(f).concat(g).forEach(function(p){var y=s.query(p,s.Scope.ATTRIBUTE);y instanceof a.default&&(u.attributes[y.attrName]=y)})},d.prototype.copy=function(u){var h=this;Object.keys(this.attributes).forEach(function(f){var g=h.attributes[f].value(h.domNode);u.format(f,g)})},d.prototype.move=function(u){var h=this;this.copy(u),Object.keys(this.attributes).forEach(function(f){h.attributes[f].remove(h.domNode)}),this.attributes={}},d.prototype.values=function(){var u=this;return Object.keys(this.attributes).reduce(function(h,f){return h[f]=u.attributes[f].value(u.domNode),h},{})},d}();r.default=c},function(n,r,i){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c,d){var u=c.getAttribute("class")||"";return u.split(/\s+/).filter(function(h){return h.indexOf(d+"-")===0})}var s=function(c){a(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(u){return(u.getAttribute("class")||"").split(/\s+/).map(function(h){return h.split("-").slice(0,-1).join("-")})},d.prototype.add=function(u,h){return this.canAdd(u,h)?(this.remove(u),u.classList.add(this.keyName+"-"+h),!0):!1},d.prototype.remove=function(u){var h=l(u,this.keyName);h.forEach(function(f){u.classList.remove(f)}),u.classList.length===0&&u.removeAttribute("class")},d.prototype.value=function(u){var h=l(u,this.keyName)[0]||"",f=h.slice(this.keyName.length+1);return this.canAdd(u,f)?f:""},d}(o.default);r.default=s},function(n,r,i){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(c){var d=c.split("-"),u=d.slice(1).map(function(h){return h[0].toUpperCase()+h.slice(1)}).join("");return d[0]+u}var s=function(c){a(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.keys=function(u){return(u.getAttribute("style")||"").split(";").map(function(h){var f=h.split(":");return f[0].trim()})},d.prototype.add=function(u,h){return this.canAdd(u,h)?(u.style[l(this.keyName)]=h,!0):!1},d.prototype.remove=function(u){u.style[l(this.keyName)]="",u.getAttribute("style")||u.removeAttribute("style")},d.prototype.value=function(u){var h=u.style[l(this.keyName)];return this.canAdd(u,h)?h:""},d}(o.default);r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function s(c,d){for(var u=0;u<d.length;u++){var h=d[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(c,h.key,h)}}return function(c,d,u){return d&&s(c.prototype,d),u&&s(c,u),c}}();function o(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function s(c,d){o(this,s),this.quill=c,this.options=d,this.modules={}}return a(s,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(u){d.modules[u]==null&&d.addModule(u)})}},{key:"addModule",value:function(d){var u=this.quill.constructor.import("modules/"+d);return this.modules[d]=new u(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),s}();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function m(b,_){for(var v=0;v<_.length;v++){var E=_[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,_,v){return _&&m(b.prototype,_),v&&m(b,v),b}}(),o=function m(b,_,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,_);if(E===void 0){var k=Object.getPrototypeOf(b);return k===null?void 0:m(k,_,v)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(v)}},l=i(0),s=u(l),c=i(7),d=u(c);function u(m){return m&&m.__esModule?m:{default:m}}function h(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function f(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function g(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var p="\uFEFF",y=function(m){g(b,m);function b(_){h(this,b);var v=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return v.contentNode=document.createElement("span"),v.contentNode.setAttribute("contenteditable",!1),[].slice.call(v.domNode.childNodes).forEach(function(E){v.contentNode.appendChild(E)}),v.leftGuard=document.createTextNode(p),v.rightGuard=document.createTextNode(p),v.domNode.appendChild(v.leftGuard),v.domNode.appendChild(v.contentNode),v.domNode.appendChild(v.rightGuard),v}return a(b,[{key:"index",value:function(v,E){return v===this.leftGuard?0:v===this.rightGuard?1:o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"index",this).call(this,v,E)}},{key:"restore",value:function(v){var E=void 0,k=void 0,O=v.data.split(p).join("");if(v===this.leftGuard)if(this.prev instanceof d.default){var T=this.prev.length();this.prev.insertAt(T,O),E={startNode:this.prev.domNode,startOffset:T+O.length}}else k=document.createTextNode(O),this.parent.insertBefore(s.default.create(k),this),E={startNode:k,startOffset:O.length};else v===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,O),E={startNode:this.next.domNode,startOffset:O.length}):(k=document.createTextNode(O),this.parent.insertBefore(s.default.create(k),this.next),E={startNode:k,startOffset:O.length}));return v.data=p,E}},{key:"update",value:function(v,E){var k=this;v.forEach(function(O){if(O.type==="characterData"&&(O.target===k.leftGuard||O.target===k.rightGuard)){var T=k.restore(O.target);T&&(E.range=T)}})}}]),b}(s.default.Embed);r.default=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var a=i(0),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}var s={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},c=new o.default.Attributor.Attribute("align","align",s),d=new o.default.Attributor.Class("align","ql-align",s),u=new o.default.Attributor.Style("align","text-align",s);r.AlignAttribute=c,r.AlignClass=d,r.AlignStyle=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var a=i(0),o=s(a),l=i(26);function s(u){return u&&u.__esModule?u:{default:u}}var c=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=c,r.BackgroundStyle=d},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var a=i(0),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}var s={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},c=new o.default.Attributor.Attribute("direction","dir",s),d=new o.default.Attributor.Class("direction","ql-direction",s),u=new o.default.Attributor.Style("direction","direction",s);r.DirectionAttribute=c,r.DirectionClass=d,r.DirectionStyle=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var a=function(){function m(b,_){for(var v=0;v<_.length;v++){var E=_[v];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,_,v){return _&&m(b.prototype,_),v&&m(b,v),b}}(),o=function m(b,_,v){b===null&&(b=Function.prototype);var E=Object.getOwnPropertyDescriptor(b,_);if(E===void 0){var k=Object.getPrototypeOf(b);return k===null?void 0:m(k,_,v)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(v)}},l=i(0),s=c(l);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function u(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function h(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var f={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},g=new s.default.Attributor.Class("font","ql-font",f),p=function(m){h(b,m);function b(){return d(this,b),u(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,[{key:"value",value:function(v){return o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,v).replace(/["']/g,"")}}]),b}(s.default.Attributor.Style),y=new p("font","font-family",f);r.FontStyle=y,r.FontClass=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var a=i(0),o=l(a);function l(d){return d&&d.__esModule?d:{default:d}}var s=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),c=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=s,r.SizeStyle=c},function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var a=function(){function _(v,E){for(var k=0;k<E.length;k++){var O=E[k];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,E,k){return E&&_(v.prototype,E),k&&_(v,k),v}}(),o=i(0),l=h(o),s=i(5),c=h(s),d=i(9),u=h(d);function h(_){return _&&_.__esModule?_:{default:_}}function f(_,v){if(!(_ instanceof v))throw new TypeError("Cannot call a class as a function")}function g(_,v){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:_}function p(_,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);_.prototype=Object.create(v&&v.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(_,v):_.__proto__=v)}var y=function(_){p(v,_);function v(E,k){f(this,v);var O=g(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,E,k));return O.lastRecorded=0,O.ignoreChange=!1,O.clear(),O.quill.on(c.default.events.EDITOR_CHANGE,function(T,R,x,w){T!==c.default.events.TEXT_CHANGE||O.ignoreChange||(!O.options.userOnly||w===c.default.sources.USER?O.record(R,x):O.transform(R))}),O.quill.keyboard.addBinding({key:"Z",shortKey:!0},O.undo.bind(O)),O.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},O.redo.bind(O)),/Win/i.test(navigator.platform)&&O.quill.keyboard.addBinding({key:"Y",shortKey:!0},O.redo.bind(O)),O}return a(v,[{key:"change",value:function(k,O){if(this.stack[k].length!==0){var T=this.stack[k].pop();this.stack[O].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[k],c.default.sources.USER),this.ignoreChange=!1;var R=b(T[k]);this.quill.setSelection(R)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(k,O){if(k.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(O),R=Date.now();if(this.lastRecorded+this.options.delay>R&&this.stack.undo.length>0){var x=this.stack.undo.pop();T=T.compose(x.undo),k=x.redo.compose(k)}else this.lastRecorded=R;this.stack.undo.push({redo:k,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(O){O.undo=k.transform(O.undo,!0),O.redo=k.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=k.transform(O.undo,!0),O.redo=k.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),v}(u.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(_){var v=_.ops[_.ops.length-1];return v==null?!1:v.insert!=null?typeof v.insert=="string"&&v.insert.endsWith(`
|
|
66
|
-
`):v.attributes!=null?Object.keys(v.attributes).some(function(E){return l.default.query(E,l.default.Scope.BLOCK)!=null}):!1}function b(_){var v=_.reduce(function(k,O){return k+=O.delete||0,k},0),E=_.length()-v;return m(_)&&(E-=1),E}r.default=y,r.getLastChangeIndex=b},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var a=function(){function P(N,H){for(var $=0;$<H.length;$++){var D=H[$];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(N,D.key,D)}}return function(N,H,$){return H&&P(N.prototype,H),$&&P(N,$),N}}(),o=function P(N,H,$){N===null&&(N=Function.prototype);var D=Object.getOwnPropertyDescriptor(N,H);if(D===void 0){var q=Object.getPrototypeOf(N);return q===null?void 0:P(q,H,$)}else{if("value"in D)return D.value;var W=D.get;return W===void 0?void 0:W.call($)}},l=i(3),s=R(l),c=i(2),d=R(c),u=i(8),h=R(u),f=i(23),g=R(f),p=i(34),y=R(p),m=i(59),b=R(m),_=i(60),v=R(_),E=i(28),k=R(E),O=i(61),T=R(O);function R(P){return P&&P.__esModule?P:{default:P}}function x(P,N){if(!(P instanceof N))throw new TypeError("Cannot call a class as a function")}function w(P,N){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:P}function S(P,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);P.prototype=Object.create(N&&N.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(P,N):P.__proto__=N)}var I=[!1,"center","right","justify"],L=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],B=[!1,"serif","monospace"],M=["1","2","3",!1],F=["small",!1,"large","huge"],G=function(P){S(N,P);function N(H,$){x(this,N);var D=w(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,H,$)),q=function W(V){if(!document.body.contains(H.root))return document.body.removeEventListener("click",W);D.tooltip!=null&&!D.tooltip.root.contains(V.target)&&document.activeElement!==D.tooltip.textbox&&!D.quill.hasFocus()&&D.tooltip.hide(),D.pickers!=null&&D.pickers.forEach(function(Q){Q.container.contains(V.target)||Q.close()})};return H.emitter.listenDOM("click",document.body,q),D}return a(N,[{key:"addModule",value:function($){var D=o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"addModule",this).call(this,$);return $==="toolbar"&&this.extendToolbar(D),D}},{key:"buildButtons",value:function($,D){$.forEach(function(q){var W=q.getAttribute("class")||"";W.split(/\s+/).forEach(function(V){if(V.startsWith("ql-")&&(V=V.slice(3),D[V]!=null))if(V==="direction")q.innerHTML=D[V][""]+D[V].rtl;else if(typeof D[V]=="string")q.innerHTML=D[V];else{var Q=q.value||"";Q!=null&&D[V][Q]&&(q.innerHTML=D[V][Q])}})})}},{key:"buildPickers",value:function($,D){var q=this;this.pickers=$.map(function(V){if(V.classList.contains("ql-align"))return V.querySelector("option")==null&&C(V,I),new v.default(V,D.align);if(V.classList.contains("ql-background")||V.classList.contains("ql-color")){var Q=V.classList.contains("ql-background")?"background":"color";return V.querySelector("option")==null&&C(V,L,Q==="background"?"#ffffff":"#000000"),new b.default(V,D[Q])}else return V.querySelector("option")==null&&(V.classList.contains("ql-font")?C(V,B):V.classList.contains("ql-header")?C(V,M):V.classList.contains("ql-size")&&C(V,F)),new k.default(V)});var W=function(){q.pickers.forEach(function(Q){Q.update()})};this.quill.on(h.default.events.EDITOR_CHANGE,W)}}]),N}(y.default);G.DEFAULTS=(0,s.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var N=this,H=this.container.querySelector("input.ql-image[type=file]");H==null&&(H=document.createElement("input"),H.setAttribute("type","file"),H.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),H.classList.add("ql-image"),H.addEventListener("change",function(){if(H.files!=null&&H.files[0]!=null){var $=new FileReader;$.onload=function(D){var q=N.quill.getSelection(!0);N.quill.updateContents(new d.default().retain(q.index).delete(q.length).insert({image:D.target.result}),h.default.sources.USER),N.quill.setSelection(q.index+1,h.default.sources.SILENT),H.value=""},$.readAsDataURL(H.files[0])}}),this.container.appendChild(H)),H.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var U=function(P){S(N,P);function N(H,$){x(this,N);var D=w(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,H,$));return D.textbox=D.root.querySelector('input[type="text"]'),D.listen(),D}return a(N,[{key:"listen",value:function(){var $=this;this.textbox.addEventListener("keydown",function(D){g.default.match(D,"enter")?($.save(),D.preventDefault()):g.default.match(D,"escape")&&($.cancel(),D.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),D!=null?this.textbox.value=D:$!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+$)||""),this.root.setAttribute("data-mode",$)}},{key:"restoreFocus",value:function(){var $=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=$}},{key:"save",value:function(){var $=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var D=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",$,h.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",$,h.default.sources.USER)),this.quill.root.scrollTop=D;break}case"video":$=A($);case"formula":{if(!$)break;var q=this.quill.getSelection(!0);if(q!=null){var W=q.index+q.length;this.quill.insertEmbed(W,this.root.getAttribute("data-mode"),$,h.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(W+1," ",h.default.sources.USER),this.quill.setSelection(W+2,h.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),N}(T.default);function A(P){var N=P.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||P.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return N?(N[1]||"https")+"://www.youtube.com/embed/"+N[2]+"?showinfo=0":(N=P.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(N[1]||"https")+"://player.vimeo.com/video/"+N[2]+"/":P}function C(P,N){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;N.forEach(function($){var D=document.createElement("option");$===H?D.setAttribute("selected","selected"):D.setAttribute("value",$),P.appendChild(D)})}r.BaseTooltip=U,r.default=G},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var s,c=this.iterator();s=c();)if(s===l)return!0;return!1},o.prototype.insertBefore=function(l,s){l&&(l.next=s,s!=null?(l.prev=s.prev,s.prev!=null&&(s.prev.next=l),s.prev=l,s===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var s=0,c=this.head;c!=null;){if(c===l)return s;s+=c.length(),c=c.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var s=l;return l!=null&&(l=l.next),s}},o.prototype.find=function(l,s){s===void 0&&(s=!1);for(var c,d=this.iterator();c=d();){var u=c.length();if(l<u||s&&l===u&&(c.next==null||c.next.length()!==0))return[c,l];l-=u}return[null,0]},o.prototype.forEach=function(l){for(var s,c=this.iterator();s=c();)l(s)},o.prototype.forEachAt=function(l,s,c){if(!(s<=0))for(var d=this.find(l),u=d[0],h=d[1],f,g=l-h,p=this.iterator(u);(f=p())&&g<l+s;){var y=f.length();l>g?c(f,l-g,Math.min(s,g+y-l)):c(f,0,Math.min(y,l+s-g)),g+=y}},o.prototype.map=function(l){return this.reduce(function(s,c){return s.push(l(c)),s},[])},o.prototype.reduce=function(l,s){for(var c,d=this.iterator();c=d();)s=l(s,c);return s},o}();r.default=a},function(n,r,i){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var g in f)f.hasOwnProperty(g)&&(h[g]=f[g])};return function(h,f){u(h,f);function g(){this.constructor=h}h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),l=i(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},c=100,d=function(u){a(h,u);function h(f){var g=u.call(this,f)||this;return g.scroll=g,g.observer=new MutationObserver(function(p){g.update(p)}),g.observer.observe(g.domNode,s),g.attach(),g}return h.prototype.detach=function(){u.prototype.detach.call(this),this.observer.disconnect()},h.prototype.deleteAt=function(f,g){this.update(),f===0&&g===this.length()?this.children.forEach(function(p){p.remove()}):u.prototype.deleteAt.call(this,f,g)},h.prototype.formatAt=function(f,g,p,y){this.update(),u.prototype.formatAt.call(this,f,g,p,y)},h.prototype.insertAt=function(f,g,p){this.update(),u.prototype.insertAt.call(this,f,g,p)},h.prototype.optimize=function(f,g){var p=this;f===void 0&&(f=[]),g===void 0&&(g={}),u.prototype.optimize.call(this,g);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)f.push(y.pop());for(var m=function(E,k){k===void 0&&(k=!0),!(E==null||E===p)&&E.domNode.parentNode!=null&&(E.domNode[l.DATA_KEY].mutations==null&&(E.domNode[l.DATA_KEY].mutations=[]),k&&m(E.parent))},b=function(E){E.domNode[l.DATA_KEY]==null||E.domNode[l.DATA_KEY].mutations==null||(E instanceof o.default&&E.children.forEach(b),E.optimize(g))},_=f,v=0;_.length>0;v+=1){if(v>=c)throw new Error("[Parchment] Maximum optimize iterations reached");for(_.forEach(function(E){var k=l.find(E.target,!0);k!=null&&(k.domNode===E.target&&(E.type==="childList"?(m(l.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(O){var T=l.find(O,!1);m(T,!1),T instanceof o.default&&T.children.forEach(function(R){m(R,!1)})})):E.type==="attributes"&&m(k.prev)),m(k))}),this.children.forEach(b),_=[].slice.call(this.observer.takeRecords()),y=_.slice();y.length>0;)f.push(y.pop())}},h.prototype.update=function(f,g){var p=this;g===void 0&&(g={}),f=f||this.observer.takeRecords(),f.map(function(y){var m=l.find(y.target,!0);return m==null?null:m.domNode[l.DATA_KEY].mutations==null?(m.domNode[l.DATA_KEY].mutations=[y],m):(m.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===p||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],g)}),this.domNode[l.DATA_KEY].mutations!=null&&u.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,g),this.optimize(f,g)},h.blotName="scroll",h.defaultChild="block",h.scope=l.Scope.BLOCK_BLOT,h.tagName="DIV",h}(o.default);r.default=d},function(n,r,i){var a=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,h){u.__proto__=h}||function(u,h){for(var f in h)h.hasOwnProperty(f)&&(u[f]=h[f])};return function(u,h){d(u,h);function f(){this.constructor=u}u.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1);function s(d,u){if(Object.keys(d).length!==Object.keys(u).length)return!1;for(var h in d)if(d[h]!==u[h])return!1;return!0}var c=function(d){a(u,d);function u(){return d!==null&&d.apply(this,arguments)||this}return u.formats=function(h){if(h.tagName!==u.tagName)return d.formats.call(this,h)},u.prototype.format=function(h,f){var g=this;h===this.statics.blotName&&!f?(this.children.forEach(function(p){p instanceof o.default||(p=p.wrap(u.blotName,!0)),g.attributes.copy(p)}),this.unwrap()):d.prototype.format.call(this,h,f)},u.prototype.formatAt=function(h,f,g,p){if(this.formats()[g]!=null||l.query(g,l.Scope.ATTRIBUTE)){var y=this.isolate(h,f);y.format(g,p)}else d.prototype.formatAt.call(this,h,f,g,p)},u.prototype.optimize=function(h){d.prototype.optimize.call(this,h);var f=this.formats();if(Object.keys(f).length===0)return this.unwrap();var g=this.next;g instanceof u&&g.prev===this&&s(f,g.formats())&&(g.moveChildren(this),g.remove())},u.blotName="inline",u.scope=l.Scope.INLINE_BLOT,u.tagName="SPAN",u}(o.default);r.default=c},function(n,r,i){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1),s=function(c){a(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.formats=function(u){var h=l.query(d.blotName).tagName;if(u.tagName!==h)return c.formats.call(this,u)},d.prototype.format=function(u,h){l.query(u,l.Scope.BLOCK)!=null&&(u===this.statics.blotName&&!h?this.replaceWith(d.blotName):c.prototype.format.call(this,u,h))},d.prototype.formatAt=function(u,h,f,g){l.query(f,l.Scope.BLOCK)!=null?this.format(f,g):c.prototype.formatAt.call(this,u,h,f,g)},d.prototype.insertAt=function(u,h,f){if(f==null||l.query(h,l.Scope.INLINE)!=null)c.prototype.insertAt.call(this,u,h,f);else{var g=this.split(u),p=l.create(h,f);g.parent.insertBefore(p,g)}},d.prototype.update=function(u,h){navigator.userAgent.match(/Trident/)?this.build():c.prototype.update.call(this,u,h)},d.blotName="block",d.scope=l.Scope.BLOCK_BLOT,d.tagName="P",d}(o.default);r.default=s},function(n,r,i){var a=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var u in d)d.hasOwnProperty(u)&&(c[u]=d[u])};return function(c,d){s(c,d);function u(){this.constructor=c}c.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=function(s){a(c,s);function c(){return s!==null&&s.apply(this,arguments)||this}return c.formats=function(d){},c.prototype.format=function(d,u){s.prototype.formatAt.call(this,0,this.length(),d,u)},c.prototype.formatAt=function(d,u,h,f){d===0&&u===this.length()?this.format(h,f):s.prototype.formatAt.call(this,d,u,h,f)},c.prototype.formats=function(){return this.statics.formats(this.domNode)},c}(o.default);r.default=l},function(n,r,i){var a=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var h in u)u.hasOwnProperty(h)&&(d[h]=u[h])};return function(d,u){c(d,u);function h(){this.constructor=d}d.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=i(1),s=function(c){a(d,c);function d(u){var h=c.call(this,u)||this;return h.text=h.statics.value(h.domNode),h}return d.create=function(u){return document.createTextNode(u)},d.value=function(u){var h=u.data;return h.normalize&&(h=h.normalize()),h},d.prototype.deleteAt=function(u,h){this.domNode.data=this.text=this.text.slice(0,u)+this.text.slice(u+h)},d.prototype.index=function(u,h){return this.domNode===u?h:-1},d.prototype.insertAt=function(u,h,f){f==null?(this.text=this.text.slice(0,u)+h+this.text.slice(u),this.domNode.data=this.text):c.prototype.insertAt.call(this,u,h,f)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(u){c.prototype.optimize.call(this,u),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(u,h){return[this.domNode,u]},d.prototype.split=function(u,h){if(h===void 0&&(h=!1),!h){if(u===0)return this;if(u===this.length())return this.next}var f=l.create(this.domNode.splitText(u));return this.parent.insertBefore(f,this.next),this.text=this.statics.value(this.domNode),f},d.prototype.update=function(u,h){var f=this;u.some(function(g){return g.type==="characterData"&&g.target===f.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=l.Scope.INLINE_BLOT,d}(o.default);r.default=s},function(n,r,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,s){return arguments.length>1&&!this.contains(l)==!s?s:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,s){return s=s||0,this.substr(s,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,s){var c=this.toString();(typeof s!="number"||!isFinite(s)||Math.floor(s)!==s||s>c.length)&&(s=c.length),s-=l.length;var d=c.indexOf(l,s);return d!==-1&&d===s}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(s){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof s!="function")throw new TypeError("predicate must be a function");for(var c=Object(this),d=c.length>>>0,u=arguments[1],h,f=0;f<d;f++)if(h=c[f],s.call(u,h,f,c))return h}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var i=-1,a=1,o=0;function l(v,E,k){if(v==E)return v?[[o,v]]:[];(k<0||v.length<k)&&(k=null);var O=u(v,E),T=v.substring(0,O);v=v.substring(O),E=E.substring(O),O=h(v,E);var R=v.substring(v.length-O);v=v.substring(0,v.length-O),E=E.substring(0,E.length-O);var x=s(v,E);return T&&x.unshift([o,T]),R&&x.push([o,R]),g(x),k!=null&&(x=m(x,k)),x=b(x),x}function s(v,E){var k;if(!v)return[[a,E]];if(!E)return[[i,v]];var O=v.length>E.length?v:E,T=v.length>E.length?E:v,R=O.indexOf(T);if(R!=-1)return k=[[a,O.substring(0,R)],[o,T],[a,O.substring(R+T.length)]],v.length>E.length&&(k[0][0]=k[2][0]=i),k;if(T.length==1)return[[i,v],[a,E]];var x=f(v,E);if(x){var w=x[0],S=x[1],I=x[2],L=x[3],B=x[4],M=l(w,I),F=l(S,L);return M.concat([[o,B]],F)}return c(v,E)}function c(v,E){for(var k=v.length,O=E.length,T=Math.ceil((k+O)/2),R=T,x=2*T,w=new Array(x),S=new Array(x),I=0;I<x;I++)w[I]=-1,S[I]=-1;w[R+1]=0,S[R+1]=0;for(var L=k-O,B=L%2!=0,M=0,F=0,G=0,U=0,A=0;A<T;A++){for(var C=-A+M;C<=A-F;C+=2){var P=R+C,N;C==-A||C!=A&&w[P-1]<w[P+1]?N=w[P+1]:N=w[P-1]+1;for(var H=N-C;N<k&&H<O&&v.charAt(N)==E.charAt(H);)N++,H++;if(w[P]=N,N>k)F+=2;else if(H>O)M+=2;else if(B){var $=R+L-C;if($>=0&&$<x&&S[$]!=-1){var D=k-S[$];if(N>=D)return d(v,E,N,H)}}}for(var q=-A+G;q<=A-U;q+=2){var $=R+q,D;q==-A||q!=A&&S[$-1]<S[$+1]?D=S[$+1]:D=S[$-1]+1;for(var W=D-q;D<k&&W<O&&v.charAt(k-D-1)==E.charAt(O-W-1);)D++,W++;if(S[$]=D,D>k)U+=2;else if(W>O)G+=2;else if(!B){var P=R+L-q;if(P>=0&&P<x&&w[P]!=-1){var N=w[P],H=R+N-P;if(D=k-D,N>=D)return d(v,E,N,H)}}}}return[[i,v],[a,E]]}function d(v,E,k,O){var T=v.substring(0,k),R=E.substring(0,O),x=v.substring(k),w=E.substring(O),S=l(T,R),I=l(x,w);return S.concat(I)}function u(v,E){if(!v||!E||v.charAt(0)!=E.charAt(0))return 0;for(var k=0,O=Math.min(v.length,E.length),T=O,R=0;k<T;)v.substring(R,T)==E.substring(R,T)?(k=T,R=k):O=T,T=Math.floor((O-k)/2+k);return T}function h(v,E){if(!v||!E||v.charAt(v.length-1)!=E.charAt(E.length-1))return 0;for(var k=0,O=Math.min(v.length,E.length),T=O,R=0;k<T;)v.substring(v.length-T,v.length-R)==E.substring(E.length-T,E.length-R)?(k=T,R=k):O=T,T=Math.floor((O-k)/2+k);return T}function f(v,E){var k=v.length>E.length?v:E,O=v.length>E.length?E:v;if(k.length<4||O.length*2<k.length)return null;function T(F,G,U){for(var A=F.substring(U,U+Math.floor(F.length/4)),C=-1,P="",N,H,$,D;(C=G.indexOf(A,C+1))!=-1;){var q=u(F.substring(U),G.substring(C)),W=h(F.substring(0,U),G.substring(0,C));P.length<W+q&&(P=G.substring(C-W,C)+G.substring(C,C+q),N=F.substring(0,U-W),H=F.substring(U+q),$=G.substring(0,C-W),D=G.substring(C+q))}return P.length*2>=F.length?[N,H,$,D,P]:null}var R=T(k,O,Math.ceil(k.length/4)),x=T(k,O,Math.ceil(k.length/2)),w;if(!R&&!x)return null;x?R?w=R[4].length>x[4].length?R:x:w=x:w=R;var S,I,L,B;v.length>E.length?(S=w[0],I=w[1],L=w[2],B=w[3]):(L=w[0],B=w[1],S=w[2],I=w[3]);var M=w[4];return[S,I,L,B,M]}function g(v){v.push([o,""]);for(var E=0,k=0,O=0,T="",R="",x;E<v.length;)switch(v[E][0]){case a:O++,R+=v[E][1],E++;break;case i:k++,T+=v[E][1],E++;break;case o:k+O>1?(k!==0&&O!==0&&(x=u(R,T),x!==0&&(E-k-O>0&&v[E-k-O-1][0]==o?v[E-k-O-1][1]+=R.substring(0,x):(v.splice(0,0,[o,R.substring(0,x)]),E++),R=R.substring(x),T=T.substring(x)),x=h(R,T),x!==0&&(v[E][1]=R.substring(R.length-x)+v[E][1],R=R.substring(0,R.length-x),T=T.substring(0,T.length-x))),k===0?v.splice(E-O,k+O,[a,R]):O===0?v.splice(E-k,k+O,[i,T]):v.splice(E-k-O,k+O,[i,T],[a,R]),E=E-k-O+(k?1:0)+(O?1:0)+1):E!==0&&v[E-1][0]==o?(v[E-1][1]+=v[E][1],v.splice(E,1)):E++,O=0,k=0,T="",R="";break}v[v.length-1][1]===""&&v.pop();var w=!1;for(E=1;E<v.length-1;)v[E-1][0]==o&&v[E+1][0]==o&&(v[E][1].substring(v[E][1].length-v[E-1][1].length)==v[E-1][1]?(v[E][1]=v[E-1][1]+v[E][1].substring(0,v[E][1].length-v[E-1][1].length),v[E+1][1]=v[E-1][1]+v[E+1][1],v.splice(E-1,1),w=!0):v[E][1].substring(0,v[E+1][1].length)==v[E+1][1]&&(v[E-1][1]+=v[E+1][1],v[E][1]=v[E][1].substring(v[E+1][1].length)+v[E+1][1],v.splice(E+1,1),w=!0)),E++;w&&g(v)}var p=l;p.INSERT=a,p.DELETE=i,p.EQUAL=o,n.exports=p;function y(v,E){if(E===0)return[o,v];for(var k=0,O=0;O<v.length;O++){var T=v[O];if(T[0]===i||T[0]===o){var R=k+T[1].length;if(E===R)return[O+1,v];if(E<R){v=v.slice();var x=E-k,w=[T[0],T[1].slice(0,x)],S=[T[0],T[1].slice(x)];return v.splice(O,1,w,S),[O+1,v]}else k=R}}throw new Error("cursor_pos is out of bounds!")}function m(v,E){var k=y(v,E),O=k[1],T=k[0],R=O[T],x=O[T+1];if(R==null)return v;if(R[0]!==o)return v;if(x!=null&&R[1]+x[1]===x[1]+R[1])return O.splice(T,2,x,R),_(O,T,2);if(x!=null&&x[1].indexOf(R[1])===0){O.splice(T,2,[x[0],R[1]],[0,R[1]]);var w=x[1].slice(R[1].length);return w.length>0&&O.splice(T+2,0,[x[0],w]),_(O,T,3)}else return v}function b(v){for(var E=!1,k=function(x){return x.charCodeAt(0)>=56320&&x.charCodeAt(0)<=57343},O=function(x){return x.charCodeAt(x.length-1)>=55296&&x.charCodeAt(x.length-1)<=56319},T=2;T<v.length;T+=1)v[T-2][0]===o&&O(v[T-2][1])&&v[T-1][0]===i&&k(v[T-1][1])&&v[T][0]===a&&k(v[T][1])&&(E=!0,v[T-1][1]=v[T-2][1].slice(-1)+v[T-1][1],v[T][1]=v[T-2][1].slice(-1)+v[T][1],v[T-2][1]=v[T-2][1].slice(0,-1));if(!E)return v;for(var R=[],T=0;T<v.length;T+=1)v[T][1].length>0&&R.push(v[T]);return R}function _(v,E,k){for(var O=E+k-1;O>=0&&O>=E-1;O--)if(O+1<v.length){var T=v[O],R=v[O+1];T[0]===R[1]&&v.splice(O,2,[T[0],T[1]+R[1]])}return v}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(a){var o=[];for(var l in a)o.push(l);return o}},function(n,r){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=i?a:o,r.supported=a;function a(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(n,r){var i=Object.prototype.hasOwnProperty,a="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(a=!1));function l(c,d,u){this.fn=c,this.context=d,this.once=u||!1}function s(){this._events=new o,this._eventsCount=0}s.prototype.eventNames=function(){var d=[],u,h;if(this._eventsCount===0)return d;for(h in u=this._events)i.call(u,h)&&d.push(a?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},s.prototype.listeners=function(d,u){var h=a?a+d:d,f=this._events[h];if(u)return!!f;if(!f)return[];if(f.fn)return[f.fn];for(var g=0,p=f.length,y=new Array(p);g<p;g++)y[g]=f[g].fn;return y},s.prototype.emit=function(d,u,h,f,g,p){var y=a?a+d:d;if(!this._events[y])return!1;var m=this._events[y],b=arguments.length,_,v;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,u),!0;case 3:return m.fn.call(m.context,u,h),!0;case 4:return m.fn.call(m.context,u,h,f),!0;case 5:return m.fn.call(m.context,u,h,f,g),!0;case 6:return m.fn.call(m.context,u,h,f,g,p),!0}for(v=1,_=new Array(b-1);v<b;v++)_[v-1]=arguments[v];m.fn.apply(m.context,_)}else{var E=m.length,k;for(v=0;v<E;v++)switch(m[v].once&&this.removeListener(d,m[v].fn,void 0,!0),b){case 1:m[v].fn.call(m[v].context);break;case 2:m[v].fn.call(m[v].context,u);break;case 3:m[v].fn.call(m[v].context,u,h);break;case 4:m[v].fn.call(m[v].context,u,h,f);break;default:if(!_)for(k=1,_=new Array(b-1);k<b;k++)_[k-1]=arguments[k];m[v].fn.apply(m[v].context,_)}}return!0},s.prototype.on=function(d,u,h){var f=new l(u,h||this),g=a?a+d:d;return this._events[g]?this._events[g].fn?this._events[g]=[this._events[g],f]:this._events[g].push(f):(this._events[g]=f,this._eventsCount++),this},s.prototype.once=function(d,u,h){var f=new l(u,h||this,!0),g=a?a+d:d;return this._events[g]?this._events[g].fn?this._events[g]=[this._events[g],f]:this._events[g].push(f):(this._events[g]=f,this._eventsCount++),this},s.prototype.removeListener=function(d,u,h,f){var g=a?a+d:d;if(!this._events[g])return this;if(!u)return--this._eventsCount===0?this._events=new o:delete this._events[g],this;var p=this._events[g];if(p.fn)p.fn===u&&(!f||p.once)&&(!h||p.context===h)&&(--this._eventsCount===0?this._events=new o:delete this._events[g]);else{for(var y=0,m=[],b=p.length;y<b;y++)(p[y].fn!==u||f&&!p[y].once||h&&p[y].context!==h)&&m.push(p[y]);m.length?this._events[g]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new o:delete this._events[g]}return this},s.prototype.removeAllListeners=function(d){var u;return d?(u=a?a+d:d,this._events[u]&&(--this._eventsCount===0?this._events=new o:delete this._events[u])):(this._events=new o,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=a,s.EventEmitter=s,typeof n<"u"&&(n.exports=s)},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},o=function(){function K(X,ne){var te=[],ee=!0,fe=!1,pe=void 0;try{for(var ge=X[Symbol.iterator](),z;!(ee=(z=ge.next()).done)&&(te.push(z.value),!(ne&&te.length===ne));ee=!0);}catch(Y){fe=!0,pe=Y}finally{try{!ee&&ge.return&&ge.return()}finally{if(fe)throw pe}}return te}return function(X,ne){if(Array.isArray(X))return X;if(Symbol.iterator in Object(X))return K(X,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function K(X,ne){for(var te=0;te<ne.length;te++){var ee=ne[te];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(X,ee.key,ee)}}return function(X,ne,te){return ne&&K(X.prototype,ne),te&&K(X,te),X}}(),s=i(3),c=S(s),d=i(2),u=S(d),h=i(0),f=S(h),g=i(5),p=S(g),y=i(10),m=S(y),b=i(9),_=S(b),v=i(36),E=i(37),k=i(13),O=S(k),T=i(26),R=i(38),x=i(39),w=i(40);function S(K){return K&&K.__esModule?K:{default:K}}function I(K,X,ne){return X in K?Object.defineProperty(K,X,{value:ne,enumerable:!0,configurable:!0,writable:!0}):K[X]=ne,K}function L(K,X){if(!(K instanceof X))throw new TypeError("Cannot call a class as a function")}function B(K,X){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X&&(typeof X=="object"||typeof X=="function")?X:K}function M(K,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof X);K.prototype=Object.create(X&&X.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),X&&(Object.setPrototypeOf?Object.setPrototypeOf(K,X):K.__proto__=X)}var F=(0,m.default)("quill:clipboard"),G="__ql-matcher",U=[[Node.TEXT_NODE,we],[Node.TEXT_NODE,me],["br",ie],[Node.ELEMENT_NODE,me],[Node.ELEMENT_NODE,Q],[Node.ELEMENT_NODE,he],[Node.ELEMENT_NODE,V],[Node.ELEMENT_NODE,de],["li",ue],["b",W.bind(W,"bold")],["i",W.bind(W,"italic")],["style",ce]],A=[v.AlignAttribute,R.DirectionAttribute].reduce(function(K,X){return K[X.keyName]=X,K},{}),C=[v.AlignStyle,E.BackgroundStyle,T.ColorStyle,R.DirectionStyle,x.FontStyle,w.SizeStyle].reduce(function(K,X){return K[X.keyName]=X,K},{}),P=function(K){M(X,K);function X(ne,te){L(this,X);var ee=B(this,(X.__proto__||Object.getPrototypeOf(X)).call(this,ne,te));return ee.quill.root.addEventListener("paste",ee.onPaste.bind(ee)),ee.container=ee.quill.addContainer("ql-clipboard"),ee.container.setAttribute("contenteditable",!0),ee.container.setAttribute("tabindex",-1),ee.matchers=[],U.concat(ee.options.matchers).forEach(function(fe){var pe=o(fe,2),ge=pe[0],z=pe[1];!te.matchVisual&&z===he||ee.addMatcher(ge,z)}),ee}return l(X,[{key:"addMatcher",value:function(te,ee){this.matchers.push([te,ee])}},{key:"convert",value:function(te){if(typeof te=="string")return this.container.innerHTML=te.replace(/\>\r?\n +\</g,"><"),this.convert();var ee=this.quill.getFormat(this.quill.selection.savedRange.index);if(ee[O.default.blotName]){var fe=this.container.innerText;return this.container.innerHTML="",new u.default().insert(fe,I({},O.default.blotName,ee[O.default.blotName]))}var pe=this.prepareMatching(),ge=o(pe,2),z=ge[0],Y=ge[1],J=q(this.container,z,Y);return $(J,`
|
|
67
|
-
`)
|
|
68
|
-
`)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`))
|
|
75
|
-
`)}return X}function de(K,X){var ne={},te=K.style||{};return te.fontStyle&&H(K).fontStyle==="italic"&&(ne.italic=!0),te.fontWeight&&(H(K).fontWeight.startsWith("bold")||parseInt(H(K).fontWeight)>=700)&&(ne.bold=!0),Object.keys(ne).length>0&&(X=N(X,ne)),parseFloat(te.textIndent||0)>0&&(X=new u.default().insert(" ").concat(X)),X}function we(K,X){var ne=K.data;if(K.parentNode.tagName==="O:P")return X.insert(ne.trim());if(ne.trim().length===0&&K.parentNode.classList.contains("ql-clipboard"))return X;if(!H(K.parentNode).whiteSpace.startsWith("pre")){var te=function(fe,pe){return pe=pe.replace(/[^\u00a0]/g,""),pe.length<1&&fe?" ":pe};ne=ne.replace(/\r\n/g," ").replace(/\n/g," "),ne=ne.replace(/\s\s+/g,te.bind(te,!0)),(K.previousSibling==null&&D(K.parentNode)||K.previousSibling!=null&&D(K.previousSibling))&&(ne=ne.replace(/^\s+/,te.bind(te,!1))),(K.nextSibling==null&&D(K.parentNode)||K.nextSibling!=null&&D(K.nextSibling))&&(ne=ne.replace(/\s+$/,te.bind(te,!1)))}return X.insert(ne)}r.default=P,r.matchAttributor=V,r.matchBlot=Q,r.matchNewline=me,r.matchSpacing=he,r.matchText=we},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(p,y){for(var m=0;m<y.length;m++){var b=y[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,y,m){return y&&g(p.prototype,y),m&&g(p,m),p}}(),o=function g(p,y,m){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,y);if(b===void 0){var _=Object.getPrototypeOf(p);return _===null?void 0:g(_,y,m)}else{if("value"in b)return b.value;var v=b.get;return v===void 0?void 0:v.call(m)}},l=i(6),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(){return d(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"optimize",value:function(m){o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),p}(s.default);f.blotName="bold",f.tagName=["STRONG","B"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=function(){function w(S,I){var L=[],B=!0,M=!1,F=void 0;try{for(var G=S[Symbol.iterator](),U;!(B=(U=G.next()).done)&&(L.push(U.value),!(I&&L.length===I));B=!0);}catch(A){M=!0,F=A}finally{try{!B&&G.return&&G.return()}finally{if(M)throw F}}return L}return function(S,I){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return w(S,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function w(S,I){for(var L=0;L<I.length;L++){var B=I[L];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(S,B.key,B)}}return function(S,I,L){return I&&w(S.prototype,I),L&&w(S,L),S}}(),l=i(2),s=m(l),c=i(0),d=m(c),u=i(5),h=m(u),f=i(10),g=m(f),p=i(9),y=m(p);function m(w){return w&&w.__esModule?w:{default:w}}function b(w,S,I){return S in w?Object.defineProperty(w,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):w[S]=I,w}function _(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function v(w,S){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:w}function E(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);w.prototype=Object.create(S&&S.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(w,S):w.__proto__=S)}var k=(0,g.default)("quill:toolbar"),O=function(w){E(S,w);function S(I,L){_(this,S);var B=v(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I,L));if(Array.isArray(B.options.container)){var M=document.createElement("div");R(M,B.options.container),I.container.parentNode.insertBefore(M,I.container),B.container=M}else typeof B.options.container=="string"?B.container=document.querySelector(B.options.container):B.container=B.options.container;if(!(B.container instanceof HTMLElement)){var F;return F=k.error("Container required for toolbar",B.options),v(B,F)}return B.container.classList.add("ql-toolbar"),B.controls=[],B.handlers={},Object.keys(B.options.handlers).forEach(function(G){B.addHandler(G,B.options.handlers[G])}),[].forEach.call(B.container.querySelectorAll("button, select"),function(G){B.attach(G)}),B.quill.on(h.default.events.EDITOR_CHANGE,function(G,U){G===h.default.events.SELECTION_CHANGE&&B.update(U)}),B.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){var G=B.quill.selection.getRange(),U=a(G,1),A=U[0];B.update(A)}),B}return o(S,[{key:"addHandler",value:function(L,B){this.handlers[L]=B}},{key:"attach",value:function(L){var B=this,M=[].find.call(L.classList,function(G){return G.indexOf("ql-")===0});if(M){if(M=M.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[M]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[M]==null){k.warn("ignoring attaching to disabled format",M,L);return}if(d.default.query(M)==null){k.warn("ignoring attaching to nonexistent format",M,L);return}}var F=L.tagName==="SELECT"?"change":"click";L.addEventListener(F,function(G){var U=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var A=L.options[L.selectedIndex];A.hasAttribute("selected")?U=!1:U=A.value||!1}else L.classList.contains("ql-active")?U=!1:U=L.value||!L.hasAttribute("value"),G.preventDefault();B.quill.focus();var C=B.quill.selection.getRange(),P=a(C,1),N=P[0];if(B.handlers[M]!=null)B.handlers[M].call(B,U);else if(d.default.query(M).prototype instanceof d.default.Embed){if(U=prompt("Enter "+M),!U)return;B.quill.updateContents(new s.default().retain(N.index).delete(N.length).insert(b({},M,U)),h.default.sources.USER)}else B.quill.format(M,U,h.default.sources.USER);B.update(N)}),this.controls.push([M,L])}}},{key:"update",value:function(L){var B=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(M){var F=a(M,2),G=F[0],U=F[1];if(U.tagName==="SELECT"){var A=void 0;if(L==null)A=null;else if(B[G]==null)A=U.querySelector("option[selected]");else if(!Array.isArray(B[G])){var C=B[G];typeof C=="string"&&(C=C.replace(/\"/g,'\\"')),A=U.querySelector('option[value="'+C+'"]')}A==null?(U.value="",U.selectedIndex=-1):A.selected=!0}else if(L==null)U.classList.remove("ql-active");else if(U.hasAttribute("value")){var P=B[G]===U.getAttribute("value")||B[G]!=null&&B[G].toString()===U.getAttribute("value")||B[G]==null&&!U.getAttribute("value");U.classList.toggle("ql-active",P)}else U.classList.toggle("ql-active",B[G]!=null)})}}]),S}(y.default);O.DEFAULTS={};function T(w,S,I){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+S),I!=null&&(L.value=I),w.appendChild(L)}function R(w,S){Array.isArray(S[0])||(S=[S]),S.forEach(function(I){var L=document.createElement("span");L.classList.add("ql-formats"),I.forEach(function(B){if(typeof B=="string")T(L,B);else{var M=Object.keys(B)[0],F=B[M];Array.isArray(F)?x(L,M,F):T(L,M,F)}}),w.appendChild(L)})}function x(w,S,I){var L=document.createElement("select");L.classList.add("ql-"+S),I.forEach(function(B){var M=document.createElement("option");B!==!1?M.setAttribute("value",B):M.setAttribute("selected","selected"),L.appendChild(M)}),w.appendChild(L)}O.DEFAULTS={container:null,handlers:{clean:function(){var S=this,I=this.quill.getSelection();if(I!=null)if(I.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(B){d.default.query(B,d.default.Scope.INLINE)!=null&&S.quill.format(B,!1)})}else this.quill.removeFormat(I,h.default.sources.USER)},direction:function(S){var I=this.quill.getFormat().align;S==="rtl"&&I==null?this.quill.format("align","right",h.default.sources.USER):!S&&I==="right"&&this.quill.format("align",!1,h.default.sources.USER),this.quill.format("direction",S,h.default.sources.USER)},indent:function(S){var I=this.quill.getSelection(),L=this.quill.getFormat(I),B=parseInt(L.indent||0);if(S==="+1"||S==="-1"){var M=S==="+1"?1:-1;L.direction==="rtl"&&(M*=-1),this.quill.format("indent",B+M,h.default.sources.USER)}},link:function(S){S===!0&&(S=prompt("Enter link URL:")),this.quill.format("link",S,h.default.sources.USER)},list:function(S){var I=this.quill.getSelection(),L=this.quill.getFormat(I);S==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,h.default.sources.USER):this.quill.format("list","unchecked",h.default.sources.USER):this.quill.format("list",S,h.default.sources.USER)}}},r.default=O,r.addControls=R},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(p,y){for(var m=0;m<y.length;m++){var b=y[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,y,m){return y&&g(p.prototype,y),m&&g(p,m),p}}(),o=function g(p,y,m){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,y);if(b===void 0){var _=Object.getPrototypeOf(p);return _===null?void 0:g(_,y,m)}else{if("value"in b)return b.value;var v=b.get;return v===void 0?void 0:v.call(m)}},l=i(28),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(y,m){d(this,p);var b=u(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,y));return b.label.innerHTML=m,b.container.classList.add("ql-color-picker"),[].slice.call(b.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(_){_.classList.add("ql-primary")}),b}return a(p,[{key:"buildItem",value:function(m){var b=o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"buildItem",this).call(this,m);return b.style.backgroundColor=m.getAttribute("value")||"",b}},{key:"selectItem",value:function(m,b){o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,m,b);var _=this.label.querySelector(".ql-color-label"),v=m&&m.getAttribute("data-value")||"";_&&(_.tagName==="line"?_.style.stroke=v:_.style.fill=v)}}]),p}(s.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(p,y){for(var m=0;m<y.length;m++){var b=y[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,y,m){return y&&g(p.prototype,y),m&&g(p,m),p}}(),o=function g(p,y,m){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,y);if(b===void 0){var _=Object.getPrototypeOf(p);return _===null?void 0:g(_,y,m)}else{if("value"in b)return b.value;var v=b.get;return v===void 0?void 0:v.call(m)}},l=i(28),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(y,m){d(this,p);var b=u(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,y));return b.container.classList.add("ql-icon-picker"),[].forEach.call(b.container.querySelectorAll(".ql-picker-item"),function(_){_.innerHTML=m[_.getAttribute("data-value")||""]}),b.defaultItem=b.container.querySelector(".ql-selected"),b.selectItem(b.defaultItem),b}return a(p,[{key:"selectItem",value:function(m,b){o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,m,b),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),p}(s.default);r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function s(c,d){for(var u=0;u<d.length;u++){var h=d[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(c,h.key,h)}}return function(c,d,u){return d&&s(c.prototype,d),u&&s(c,u),c}}();function o(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}var l=function(){function s(c,d){var u=this;o(this,s),this.quill=c,this.boundsContainer=d||document.body,this.root=c.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){u.root.style.marginTop=-1*u.quill.root.scrollTop+"px"}),this.hide()}return a(s,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var u=d.left+d.width/2-this.root.offsetWidth/2,h=d.bottom+this.quill.root.scrollTop;this.root.style.left=u+"px",this.root.style.top=h+"px",this.root.classList.remove("ql-flip");var f=this.boundsContainer.getBoundingClientRect(),g=this.root.getBoundingClientRect(),p=0;if(g.right>f.right&&(p=f.right-g.right,this.root.style.left=u+p+"px"),g.left<f.left&&(p=f.left-g.left,this.root.style.left=u+p+"px"),g.bottom>f.bottom){var y=g.bottom-g.top,m=d.bottom-d.top+y;this.root.style.top=h-m+"px",this.root.classList.add("ql-flip")}return p}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),s}();r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function x(w,S){var I=[],L=!0,B=!1,M=void 0;try{for(var F=w[Symbol.iterator](),G;!(L=(G=F.next()).done)&&(I.push(G.value),!(S&&I.length===S));L=!0);}catch(U){B=!0,M=U}finally{try{!L&&F.return&&F.return()}finally{if(B)throw M}}return I}return function(w,S){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return x(w,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function x(w,S,I){w===null&&(w=Function.prototype);var L=Object.getOwnPropertyDescriptor(w,S);if(L===void 0){var B=Object.getPrototypeOf(w);return B===null?void 0:x(B,S,I)}else{if("value"in L)return L.value;var M=L.get;return M===void 0?void 0:M.call(I)}},l=function(){function x(w,S){for(var I=0;I<S.length;I++){var L=S[I];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(w,L.key,L)}}return function(w,S,I){return S&&x(w.prototype,S),I&&x(w,I),w}}(),s=i(3),c=_(s),d=i(8),u=_(d),h=i(43),f=_(h),g=i(27),p=_(g),y=i(15),m=i(41),b=_(m);function _(x){return x&&x.__esModule?x:{default:x}}function v(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function E(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function k(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(x){k(w,x);function w(S,I){v(this,w),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=O);var L=E(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return L.quill.container.classList.add("ql-snow"),L}return l(w,[{key:"extendToolbar",value:function(I){I.container.classList.add("ql-snow"),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),b.default),this.tooltip=new R(this.quill,this.options.bounds),I.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,B){I.handlers.link.call(I,!B.format.link)})}}]),w}(f.default);T.DEFAULTS=(0,c.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(w){if(w){var S=this.quill.getSelection();if(S==null||S.length==0)return;var I=this.quill.getText(S);/^\S+@\S+\.\S+$/.test(I)&&I.indexOf("mailto:")!==0&&(I="mailto:"+I);var L=this.quill.theme.tooltip;L.edit("link",I)}else this.quill.format("link",!1)}}}}});var R=function(x){k(w,x);function w(S,I){v(this,w);var L=E(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,S,I));return L.preview=L.root.querySelector("a.ql-preview"),L}return l(w,[{key:"listen",value:function(){var I=this;o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){I.root.classList.contains("ql-editing")?I.save():I.edit("link",I.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(I.linkRange!=null){var B=I.linkRange;I.restoreFocus(),I.quill.formatText(B,"link",!1,u.default.sources.USER),delete I.linkRange}L.preventDefault(),I.hide()}),this.quill.on(u.default.events.SELECTION_CHANGE,function(L,B,M){if(L!=null){if(L.length===0&&M===u.default.sources.USER){var F=I.quill.scroll.descendant(p.default,L.index),G=a(F,2),U=G[0],A=G[1];if(U!=null){I.linkRange=new y.Range(L.index-A,U.length());var C=p.default.formats(U.domNode);I.preview.textContent=C,I.preview.setAttribute("href",C),I.show(),I.position(I.quill.getBounds(I.linkRange));return}}else delete I.linkRange;I.hide()}})}},{key:"show",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),w}(h.BaseTooltip);R.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(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(29),o=ee(a),l=i(36),s=i(38),c=i(64),d=i(65),u=ee(d),h=i(66),f=ee(h),g=i(67),p=ee(g),y=i(37),m=i(26),b=i(39),_=i(40),v=i(56),E=ee(v),k=i(68),O=ee(k),T=i(27),R=ee(T),x=i(69),w=ee(x),S=i(70),I=ee(S),L=i(71),B=ee(L),M=i(72),F=ee(M),G=i(73),U=ee(G),A=i(13),C=ee(A),P=i(74),N=ee(P),H=i(75),$=ee(H),D=i(57),q=ee(D),W=i(41),V=ee(W),Q=i(28),ie=ee(Q),ce=i(59),ue=ee(ce),me=i(60),he=ee(me),de=i(61),we=ee(de),K=i(108),X=ee(K),ne=i(62),te=ee(ne);function ee(fe){return fe&&fe.__esModule?fe:{default:fe}}o.default.register({"attributors/attribute/direction":s.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":s.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":s.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":_.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":s.DirectionClass,"formats/indent":c.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":b.FontClass,"formats/size":_.SizeClass,"formats/blockquote":u.default,"formats/code-block":C.default,"formats/header":f.default,"formats/list":p.default,"formats/bold":E.default,"formats/code":A.Code,"formats/italic":O.default,"formats/link":R.default,"formats/script":w.default,"formats/strike":I.default,"formats/underline":B.default,"formats/image":F.default,"formats/video":U.default,"formats/list/item":g.ListItem,"modules/formula":N.default,"modules/syntax":$.default,"modules/toolbar":q.default,"themes/bubble":X.default,"themes/snow":te.default,"ui/icons":V.default,"ui/picker":ie.default,"ui/icon-picker":he.default,"ui/color-picker":ue.default,"ui/tooltip":we.default},!0),r.default=o.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=function(){function p(y,m){for(var b=0;b<m.length;b++){var _=m[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(y,_.key,_)}}return function(y,m,b){return m&&p(y.prototype,m),b&&p(y,b),y}}(),o=function p(y,m,b){y===null&&(y=Function.prototype);var _=Object.getOwnPropertyDescriptor(y,m);if(_===void 0){var v=Object.getPrototypeOf(y);return v===null?void 0:p(v,m,b)}else{if("value"in _)return _.value;var E=_.get;return E===void 0?void 0:E.call(b)}},l=i(0),s=c(l);function c(p){return p&&p.__esModule?p:{default:p}}function d(p,y){if(!(p instanceof y))throw new TypeError("Cannot call a class as a function")}function u(p,y){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:p}function h(p,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);p.prototype=Object.create(y&&y.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(p,y):p.__proto__=y)}var f=function(p){h(y,p);function y(){return d(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"add",value:function(b,_){if(_==="+1"||_==="-1"){var v=this.value(b)||0;_=_==="+1"?v+1:v-1}return _===0?(this.remove(b),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,b,_)}},{key:"canAdd",value:function(b,_){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,b,_)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,b,parseInt(_))}},{key:"value",value:function(b){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,b))||void 0}}]),y}(s.default.Attributor.Class),g=new f("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=g},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(4),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function d(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var u=function(h){d(f,h);function f(){return s(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);u.blotName="blockquote",u.tagName="blockquote",r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function f(g,p){for(var y=0;y<p.length;y++){var m=p[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,p,y){return p&&f(g.prototype,p),y&&f(g,y),g}}(),o=i(4),l=s(o);function s(f){return f&&f.__esModule?f:{default:f}}function c(f,g){if(!(f instanceof g))throw new TypeError("Cannot call a class as a function")}function d(f,g){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:f}function u(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);f.prototype=Object.create(g&&g.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(f,g):f.__proto__=g)}var h=function(f){u(g,f);function g(){return c(this,g),d(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),g}(l.default);h.blotName="header",h.tagName=["H1","H2","H3","H4","H5","H6"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=function(){function v(E,k){for(var O=0;O<k.length;O++){var T=k[O];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}return function(E,k,O){return k&&v(E.prototype,k),O&&v(E,O),E}}(),o=function v(E,k,O){E===null&&(E=Function.prototype);var T=Object.getOwnPropertyDescriptor(E,k);if(T===void 0){var R=Object.getPrototypeOf(E);return R===null?void 0:v(R,k,O)}else{if("value"in T)return T.value;var x=T.get;return x===void 0?void 0:x.call(O)}},l=i(0),s=f(l),c=i(4),d=f(c),u=i(25),h=f(u);function f(v){return v&&v.__esModule?v:{default:v}}function g(v,E,k){return E in v?Object.defineProperty(v,E,{value:k,enumerable:!0,configurable:!0,writable:!0}):v[E]=k,v}function p(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function y(v,E){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:v}function m(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(v,E):v.__proto__=E)}var b=function(v){m(E,v);function E(){return p(this,E),y(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,[{key:"format",value:function(O,T){O===_.blotName&&!T?this.replaceWith(s.default.create(this.statics.scope)):o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,O,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,T){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,T),this):(this.parent.unwrap(),o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,O,T))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:o(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,O)}}]),E}(d.default);b.blotName="list-item",b.tagName="LI";var _=function(v){m(E,v),a(E,null,[{key:"create",value:function(O){var T=O==="ordered"?"OL":"UL",R=o(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,T);return(O==="checked"||O==="unchecked")&&R.setAttribute("data-checked",O==="checked"),R}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(k){p(this,E);var O=y(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,k)),T=function(x){if(x.target.parentNode===k){var w=O.statics.formats(k),S=s.default.find(x.target);w==="checked"?S.format("list","unchecked"):w==="unchecked"&&S.format("list","checked")}};return k.addEventListener("touchstart",T),k.addEventListener("mousedown",T),O}return a(E,[{key:"format",value:function(O,T){this.children.length>0&&this.children.tail.format(O,T)}},{key:"formats",value:function(){return g({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,T){if(O instanceof b)o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,O,T);else{var R=T==null?this.length():T.offset(this),x=this.split(R);x.parent.insertBefore(O,x)}}},{key:"optimize",value:function(O){o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,O);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var T=s.default.create(this.statics.defaultChild);O.moveChildren(T),this.appendChild(T)}o(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,O)}}]),E}(h.default);_.blotName="list",_.scope=s.default.Scope.BLOCK_BLOT,_.tagName=["OL","UL"],_.defaultChild="list-item",_.allowedChildren=[b],r.ListItem=b,r.default=_},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(56),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function d(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var u=function(h){d(f,h);function f(){return s(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);u.blotName="italic",u.tagName=["EM","I"],r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function g(p,y){for(var m=0;m<y.length;m++){var b=y[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,y,m){return y&&g(p.prototype,y),m&&g(p,m),p}}(),o=function g(p,y,m){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,y);if(b===void 0){var _=Object.getPrototypeOf(p);return _===null?void 0:g(_,y,m)}else{if("value"in b)return b.value;var v=b.get;return v===void 0?void 0:v.call(m)}},l=i(6),s=c(l);function c(g){return g&&g.__esModule?g:{default:g}}function d(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function h(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var f=function(g){h(p,g);function p(){return d(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):o(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),p}(s.default);f.blotName="script",f.tagName=["SUB","SUP"],r.default=f},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function d(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var u=function(h){d(f,h);function f(){return s(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);u.blotName="strike",u.tagName="S",r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=l(a);function l(h){return h&&h.__esModule?h:{default:h}}function s(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:h}function d(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);h.prototype=Object.create(f&&f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(h,f):h.__proto__=f)}var u=function(h){d(f,h);function f(){return s(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(o.default);u.blotName="underline",u.tagName="U",r.default=u},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(m,b){for(var _=0;_<b.length;_++){var v=b[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,b,_){return b&&y(m.prototype,b),_&&y(m,_),m}}(),o=function y(m,b,_){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,b);if(v===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:y(E,b,_)}else{if("value"in v)return v.value;var k=v.get;return k===void 0?void 0:k.call(_)}},l=i(0),s=d(l),c=i(27);function d(y){return y&&y.__esModule?y:{default:y}}function u(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function h(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function f(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var g=["alt","height","width"],p=function(y){f(m,y);function m(){return u(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"format",value:function(_,v){g.indexOf(_)>-1?v?this.domNode.setAttribute(_,v):this.domNode.removeAttribute(_):o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,v)}}],[{key:"create",value:function(_){var v=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return typeof _=="string"&&v.setAttribute("src",this.sanitize(_)),v}},{key:"formats",value:function(_){return g.reduce(function(v,E){return _.hasAttribute(E)&&(v[E]=_.getAttribute(E)),v},{})}},{key:"match",value:function(_){return/\.(jpe?g|gif|png)$/.test(_)||/^data:image\/.+;base64/.test(_)}},{key:"sanitize",value:function(_){return(0,c.sanitize)(_,["http","https","data"])?_:"//:0"}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(s.default.Embed);p.blotName="image",p.tagName="IMG",r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function y(m,b){for(var _=0;_<b.length;_++){var v=b[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(m,v.key,v)}}return function(m,b,_){return b&&y(m.prototype,b),_&&y(m,_),m}}(),o=function y(m,b,_){m===null&&(m=Function.prototype);var v=Object.getOwnPropertyDescriptor(m,b);if(v===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:y(E,b,_)}else{if("value"in v)return v.value;var k=v.get;return k===void 0?void 0:k.call(_)}},l=i(4),s=i(27),c=d(s);function d(y){return y&&y.__esModule?y:{default:y}}function u(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}function h(y,m){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:y}function f(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);y.prototype=Object.create(m&&m.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(y,m):y.__proto__=m)}var g=["height","width"],p=function(y){f(m,y);function m(){return u(this,m),h(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"format",value:function(_,v){g.indexOf(_)>-1?v?this.domNode.setAttribute(_,v):this.domNode.removeAttribute(_):o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,_,v)}}],[{key:"create",value:function(_){var v=o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,_);return v.setAttribute("frameborder","0"),v.setAttribute("allowfullscreen",!0),v.setAttribute("src",this.sanitize(_)),v}},{key:"formats",value:function(_){return g.reduce(function(v,E){return _.hasAttribute(E)&&(v[E]=_.getAttribute(E)),v},{})}},{key:"sanitize",value:function(_){return c.default.sanitize(_)}},{key:"value",value:function(_){return _.getAttribute("src")}}]),m}(l.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=function(){function _(v,E){for(var k=0;k<E.length;k++){var O=E[k];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,E,k){return E&&_(v.prototype,E),k&&_(v,k),v}}(),o=function _(v,E,k){v===null&&(v=Function.prototype);var O=Object.getOwnPropertyDescriptor(v,E);if(O===void 0){var T=Object.getPrototypeOf(v);return T===null?void 0:_(T,E,k)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(k)}},l=i(35),s=f(l),c=i(5),d=f(c),u=i(9),h=f(u);function f(_){return _&&_.__esModule?_:{default:_}}function g(_,v){if(!(_ instanceof v))throw new TypeError("Cannot call a class as a function")}function p(_,v){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:_}function y(_,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);_.prototype=Object.create(v&&v.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(_,v):_.__proto__=v)}var m=function(_){y(v,_);function v(){return g(this,v),p(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,null,[{key:"create",value:function(k){var O=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,k);return typeof k=="string"&&(window.katex.render(k,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",k)),O}},{key:"value",value:function(k){return k.getAttribute("data-value")}}]),v}(s.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var b=function(_){y(v,_),a(v,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function v(){g(this,v);var E=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return v}(h.default);r.FormulaBlot=m,r.default=b},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=function(){function k(O,T){for(var R=0;R<T.length;R++){var x=T[R];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(O,x.key,x)}}return function(O,T,R){return T&&k(O.prototype,T),R&&k(O,R),O}}(),o=function k(O,T,R){O===null&&(O=Function.prototype);var x=Object.getOwnPropertyDescriptor(O,T);if(x===void 0){var w=Object.getPrototypeOf(O);return w===null?void 0:k(w,T,R)}else{if("value"in x)return x.value;var S=x.get;return S===void 0?void 0:S.call(R)}},l=i(0),s=p(l),c=i(5),d=p(c),u=i(9),h=p(u),f=i(13),g=p(f);function p(k){return k&&k.__esModule?k:{default:k}}function y(k,O){if(!(k instanceof O))throw new TypeError("Cannot call a class as a function")}function m(k,O){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:k}function b(k,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);k.prototype=Object.create(O&&O.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(k,O):k.__proto__=O)}var _=function(k){b(O,k);function O(){return y(this,O),m(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return a(O,[{key:"replaceWith",value:function(R){this.domNode.textContent=this.domNode.textContent,this.attach(),o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,R)}},{key:"highlight",value:function(R){var x=this.domNode.textContent;this.cachedText!==x&&((x.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=R(x),this.domNode.normalize(),this.attach()),this.cachedText=x)}}]),O}(g.default);_.className="ql-syntax";var v=new s.default.Attributor.Class("token","hljs",{scope:s.default.Scope.INLINE}),E=function(k){b(O,k),a(O,null,[{key:"register",value:function(){d.default.register(v,!0),d.default.register(_,!0)}}]);function O(T,R){y(this,O);var x=m(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,T,R));if(typeof x.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var w=null;return x.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(w),w=setTimeout(function(){x.highlight(),w=null},x.options.interval)}),x.highlight(),x}return a(O,[{key:"highlight",value:function(){var R=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var x=this.quill.getSelection();this.quill.scroll.descendants(_).forEach(function(w){w.highlight(R.options.highlight)}),this.quill.update(d.default.sources.SILENT),x!=null&&this.quill.setSelection(x,d.default.sources.SILENT)}}}]),O}(h.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(k){var O=window.hljs.highlightAuto(k);return O.value}}(),interval:1e3},r.CodeBlock=_,r.CodeToken=v,r.default=E},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(n,r){n.exports='<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"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <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"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(n,r){n.exports='<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> <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></path> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(n,r){n.exports='<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></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <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></path> </svg>'},function(n,r){n.exports='<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>'},function(n,r){n.exports='<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>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <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> <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></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <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> <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> <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></path> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(n,r){n.exports='<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>'},function(n,r){n.exports='<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>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <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> <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></path> </svg>'},function(n,r){n.exports='<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></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function O(T,R,x){T===null&&(T=Function.prototype);var w=Object.getOwnPropertyDescriptor(T,R);if(w===void 0){var S=Object.getPrototypeOf(T);return S===null?void 0:O(S,R,x)}else{if("value"in w)return w.value;var I=w.get;return I===void 0?void 0:I.call(x)}},o=function(){function O(T,R){for(var x=0;x<R.length;x++){var w=R[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(T,w.key,w)}}return function(T,R,x){return R&&O(T.prototype,R),x&&O(T,x),T}}(),l=i(3),s=y(l),c=i(8),d=y(c),u=i(43),h=y(u),f=i(15),g=i(41),p=y(g);function y(O){return O&&O.__esModule?O:{default:O}}function m(O,T){if(!(O instanceof T))throw new TypeError("Cannot call a class as a function")}function b(O,T){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:O}function _(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);O.prototype=Object.create(T&&T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(O,T):O.__proto__=T)}var v=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(O){_(T,O);function T(R,x){m(this,T),x.modules.toolbar!=null&&x.modules.toolbar.container==null&&(x.modules.toolbar.container=v);var w=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,R,x));return w.quill.container.classList.add("ql-bubble"),w}return o(T,[{key:"extendToolbar",value:function(x){this.tooltip=new k(this.quill,this.options.bounds),this.tooltip.root.appendChild(x.container),this.buildButtons([].slice.call(x.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(x.container.querySelectorAll("select")),p.default)}}]),T}(h.default);E.DEFAULTS=(0,s.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var k=function(O){_(T,O);function T(R,x){m(this,T);var w=b(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,R,x));return w.quill.on(d.default.events.EDITOR_CHANGE,function(S,I,L,B){if(S===d.default.events.SELECTION_CHANGE)if(I!=null&&I.length>0&&B===d.default.sources.USER){w.show(),w.root.style.left="0px",w.root.style.width="",w.root.style.width=w.root.offsetWidth+"px";var M=w.quill.getLines(I.index,I.length);if(M.length===1)w.position(w.quill.getBounds(I));else{var F=M[M.length-1],G=w.quill.getIndex(F),U=Math.min(F.length()-1,I.index+I.length-G),A=w.quill.getBounds(new f.Range(G,U));w.position(A)}}else document.activeElement!==w.textbox&&w.quill.hasFocus()&&w.hide()}),w}return o(T,[{key:"listen",value:function(){var x=this;a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){x.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!x.root.classList.contains("ql-hidden")){var w=x.quill.getSelection();w!=null&&x.position(x.quill.getBounds(w))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(x){var w=a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,x),S=this.root.querySelector(".ql-tooltip-arrow");if(S.style.marginLeft="",w===0)return w;S.style.marginLeft=-1*w-S.offsetWidth/2+"px"}}]),T}(u.BaseTooltip);k.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(""),r.BubbleTooltip=k,r.default=E},function(n,r,i){n.exports=i(63)}]).default})})(Tc);var PS=Tc.exports,DS=Le&&Le.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kn=Le&&Le.__assign||function(){return Kn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Kn.apply(this,arguments)},BS=Le&&Le.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,l=a.length;o<l;o++,i++)r[i]=a[o];return r},pr=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xe=pr(ae),FS=pr(Pu),en=pr(MS),Ga=pr(PS),jS=function(e){DS(t,e);function t(n){var r=e.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(a,o,l,s){var c,d,u,h;a==="text-change"?(d=(c=r).onEditorChangeText)===null||d===void 0||d.call(c,r.editor.root.innerHTML,o,s,r.unprivilegedEditor):a==="selection-change"&&((h=(u=r).onEditorChangeSelection)===null||h===void 0||h.call(u,o,s,r.unprivilegedEditor))};var i=r.isControlled()?n.value:n.defaultValue;return r.value=i??"",r}return t.prototype.validateProps=function(n){var r;if(Xe.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(Xe.default.Children.count(n.children)){var i=Xe.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.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")},t.prototype.shouldComponentUpdate=function(n,r){var i=this,a;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var o=this.getEditorContents(),l=(a=n.value,a??"");this.isEqualValue(l,o)||this.setEditorContents(this.editor,l)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),BS(this.cleanProps,this.dirtyProps).some(function(s){return!en.default(n[s],i.props[s])})},t.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(i){return!en.default(n[i],r.props[i])})},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(n,r){var i=this;if(this.editor&&this.shouldComponentRegenerate(n)){var a=this.editor.getContents(),o=this.editor.getSelection();this.regenerationSnapshot={delta:a,selection:o},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var l=this.regenerationSnapshot,a=l.delta,s=l.selection;delete this.regenerationSnapshot,this.instantiateEditor();var c=this.editor;c.setContents(a),Ka(function(){return i.setEditorSelection(c,s)})}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(n,r){var i=new Ga.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(i,r.tabIndex),this.hookEditor(i),i},t.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(n){return n&&n.ops},t.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?en.default(n.ops,r.ops):en.default(n,r)},t.prototype.setEditorContents=function(n,r){var i=this;this.value=r;var a=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),Ka(function(){return i.setEditorSelection(n,a)})},t.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var i=n.getLength();r.index=Math.max(0,Math.min(r.index,i-1)),r.length=Math.max(0,Math.min(r.length,i-1-r.index)),n.setSelection(r)}},t.prototype.setEditorTabIndex=function(n,r){var i,a;!((a=(i=n)===null||i===void 0?void 0:i.scroll)===null||a===void 0)&&a.domNode&&(n.scroll.domNode.tabIndex=r)},t.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},t.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=FS.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},t.prototype.renderEditingArea=function(){var n=this,r=this.props,i=r.children,a=r.preserveWhitespace,o=this.state.generation,l={key:o,ref:function(s){n.editingArea=s}};return Xe.default.Children.count(i)?Xe.default.cloneElement(Xe.default.Children.only(i),l):a?Xe.default.createElement("pre",Kn({},l)):Xe.default.createElement("div",Kn({},l))},t.prototype.render=function(){var n;return Xe.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(n,r,i,a){var o,l;if(this.editor){var s=this.isDelta(this.value)?a.getContents():a.getHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=s,(l=(o=this.props).onChange)===null||l===void 0||l.call(o,n,r,i,a))}},t.prototype.onEditorChangeSelection=function(n,r,i){var a,o,l,s,c,d;if(this.editor){var u=this.getEditorSelection(),h=!u&&n,f=u&&!n;en.default(n,u)||(this.selection=n,(o=(a=this.props).onChangeSelection)===null||o===void 0||o.call(a,n,r,i),h?(s=(l=this.props).onFocus)===null||s===void 0||s.call(l,n,r,i):f&&((d=(c=this.props).onBlur)===null||d===void 0||d.call(c,u,r,i)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=Ga.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(Xe.default.Component);function Ka(e){Promise.resolve().then(e)}var US=jS;const zS=Yn(US);function Cc({value:e,onChange:t,placeholder:n="Write your content...",error:r}){const i=ae.useRef(null),a=ae.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=ae.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return j.jsx("div",{className:`rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:j.jsx(zS,{ref:i,theme:"snow",value:e,onChange:t,placeholder:n,modules:a,formats:o,className:"min-h-[400px]"})})}function qS({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:a=!1}){const[o,l]=ae.useState(""),[s,c]=ae.useState(""),[d,u]=ae.useState(Ie.Draft),[h,f]=ae.useState(null),[g,p]=ae.useState(""),[y,m]=ae.useState([]),[b,_]=ae.useState(""),[v,E]=ae.useState({});ae.useEffect(()=>{var R,x;e&&(l(e.title),c(e.content),u(e.status),f(e.categoryId||null),p(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),m(((R=e.tags)==null?void 0:R.map(w=>w.tagId).filter(w=>w!==void 0))||[]),_(((x=e.roles)==null?void 0:x.map(w=>w.slug).join(", "))||""))},[e]);const k=()=>{const R={};return o.trim()||(R.title="Title is required"),s.trim()||(R.content="Content is required"),E(R),Object.keys(R).length===0},O=async R=>{if(R.preventDefault(),!k())return;const x=b.split(",").map(S=>S.trim()).filter(S=>S.length>0),w={title:o.trim(),content:s.trim(),status:d,categoryId:h||void 0,dateAt:g||void 0,tagIds:y.length>0?y:void 0,roleIds:x.length>0?x:void 0};e?await r({articleId:e.articleId,...w}):await r(w)},T=R=>{m(x=>x.includes(R)?x.filter(w=>w!==R):[...x,R])};return j.jsxs("form",{onSubmit:O,className:"space-y-6",children:[j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),j.jsx("input",{id:"title",type:"text",value:o,onChange:R=>l(R.target.value),className:`w-full rounded-md border ${v.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"}),v.title&&j.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:v.title})]}),j.jsxs("div",{className:"mt-4 space-y-2",children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),j.jsx(Cc,{value:s,onChange:c,placeholder:"Write your article content...",error:v.content}),v.content&&j.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:v.content})]}),j.jsxs("div",{className:"mt-4 space-y-2",children:[j.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),j.jsx("input",{id:"dateAt",type:"datetime-local",value:g,onChange:R=>p(R.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"})]}),j.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),j.jsxs("select",{id:"status",value:d,onChange:R=>u(Number(R.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:[j.jsx("option",{value:Ie.Draft,children:"Draft"}),j.jsx("option",{value:Ie.Published,children:"Published"}),j.jsx("option",{value:Ie.Archived,children:"Archived"}),j.jsx("option",{value:Ie.Scheduled,children:"Scheduled"}),j.jsx("option",{value:Ie.Review,children:"Review"})]})]}),j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),j.jsxs("select",{id:"category",value:h||"",onChange:R=>f(R.target.value?Number(R.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:[j.jsx("option",{value:"",children:"No Category"}),t.map(R=>j.jsx("option",{value:R.categoryId,children:R.title},R.categoryId))]})]})]}),n.length>0&&j.jsxs("div",{className:"mt-4 space-y-2",children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),j.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(R=>j.jsxs("button",{type:"button",onClick:()=>T(R.tagId||0),className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${y.includes(R.tagId||0)?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:["#",R.title]},R.tagId))})]}),j.jsxs("div",{className:"mt-4 space-y-2",children:[j.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),j.jsx("input",{id:"roles",type:"text",value:b,onChange:R=>_(R.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 role slugs separated by commas (e.g., admin, editor)"}),j.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),j.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[j.jsx("button",{type:"button",onClick:i,disabled:a,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),j.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update Article":"Create Article"})]})]})}function $S({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:a="400px"}){const[o,l]=ae.useState("edit");return j.jsxs("div",{className:"space-y-2",children:[r&&j.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),j.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[j.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[j.jsx("button",{type:"button",onClick:()=>l("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),j.jsx("button",{type:"button",onClick:()=>l("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),j.jsx("div",{style:{minHeight:a},children:o==="edit"?j.jsx("textarea",{value:e,onChange:s=>t(s.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:a}}):j.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?j.jsx(ts,{remarkPlugins:[Rs],rehypePlugins:[pc],children:e}):j.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&j.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),j.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[j.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),j.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[j.jsxs("div",{children:[j.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"**bold text**"})," - Bold"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"*italic text*"})," - Italic"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"[link](url)"})," - Link"]}),j.jsxs("div",{children:[j.jsx("strong",{children:""})," - Image"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"- item"})," - Bullet list"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"1. item"})," - Numbered list"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"`code`"})," - Inline code"]}),j.jsxs("div",{children:[j.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
|
|
46
|
+
`);return t.insert(r,n.attributes)}return t.push(n)},new J)}function Ld(e,t){let{index:n,length:r}=e;return new Qn(n+t,r)}function hO(e){const t=[];return e.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
|
|
47
|
+
`).forEach((i,s)=>{s&&t.push({insert:`
|
|
48
|
+
`,attributes:n.attributes}),i&&t.push({insert:i,attributes:n.attributes})}):t.push(n)}),t}class Wt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}V(Wt,"DEFAULTS",{});const gs="\uFEFF";class mc extends wt{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(gs),this.rightGuard=document.createTextNode(gs),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const i=t.data.split(gs).join("");if(t===this.leftGuard)if(this.prev instanceof Gt){const s=this.prev.length();this.prev.insertAt(s,i),n={startNode:this.prev.domNode,startOffset:s+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof Gt?(this.next.insertAt(0,i),n={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:i.length}));return t.data=gs,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(n.range=i)}})}}class pO{constructor(t,n){V(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof mc)&&(this.emitter.emit(Y.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Y.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Y.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Y.events.COMPOSITION_END,t),this.isComposing=!1}}const yi=class yi{constructor(t,n){V(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};V(yi,"DEFAULTS",{modules:{}}),V(yi,"themes",{default:yi});let Br=yi;const gO=e=>e.parentElement||e.getRootNode().host||null,mO=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},ms=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Md=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,bO=(e,t)=>{var s,o,a;const n=e.ownerDocument;let r=t,i=e;for(;i;){const l=i===n.body,c=l?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??n.documentElement.clientHeight,left:0}:mO(i),u=getComputedStyle(i),d=Md(r.left,r.right,c.left,c.right,ms(u.scrollPaddingLeft),ms(u.scrollPaddingRight)),h=Md(r.top,r.bottom,c.top,c.bottom,ms(u.scrollPaddingTop),ms(u.scrollPaddingBottom));if(d||h)if(l)(a=n.defaultView)==null||a.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=i;h&&(i.scrollTop+=h),d&&(i.scrollLeft+=d);const m=i.scrollLeft-f,b=i.scrollTop-p;r={left:r.left-m,top:r.top-b,right:r.right-m,bottom:r.bottom-b}}i=l||u.position==="fixed"?null:gO(i)}},yO=100,EO=["block","break","cursor","inline","scroll","text"],xO=(e,t,n)=>{const r=new Dr;return EO.forEach(i=>{const s=t.query(i);s&&r.register(s)}),e.forEach(i=>{let s=t.query(i);s||n.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,o+=1,o>yO){n.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},Or=vn("quill"),bs=new Dr;Ht.uiClass="ql-ui";const Ut=class Ut{static debug(t){t===!0&&(t="log"),vn.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return bl.get(t)||bs.find(t,n)}static import(t){return this.imports[t]==null&&Or.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(i=>{this.register(i,t[i],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Or.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&bs.register(n),typeof n.register=="function"&&n.register(bs)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=wO(t,n),this.container=this.options.container,this.container==null){Or.error("Invalid Quill container",t);return}this.options.debug&&Ut.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",bl.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Y;const i=dc.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new dO(this.scroll),this.selection=new cO(this.scroll,this.emitter),this.composition=new pO(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Y.events.EDITOR_CHANGE,o=>{o===Y.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Y.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;Ft.call(this,()=>this.editor.update(null,a,u),o)}),this.emitter.on(Y.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;Ft.call(this,()=>{const d=new J().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(d,[],u)},Ut.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
49
|
+
`});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=mn(t,n,r),Ft.call(this,()=>this.editor.deleteText(t,n),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Y.sources.API;return Ft.call(this,()=>{const i=this.getSelection(!0);let s=new J;if(i==null)return s;if(this.scroll.query(t,ee.BLOCK))s=this.editor.formatLine(i.index,i.length,{[t]:n});else{if(i.length===0)return this.selection.format(t,n),s;s=this.editor.formatText(i.index,i.length,{[t]:n})}return this.setSelection(i,Y.sources.SILENT),s},r)}formatLine(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),Ft.call(this,()=>this.editor.formatLine(t,n,o),s,t,0)}formatText(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),Ft.call(this,()=>this.editor.formatText(t,n,o),s,t,0)}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,n):r=this.selection.getBounds(t.index,t.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,n]=mn(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ut.sources.API;return Ft.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(t,n,r,i,s){let o;return[t,,o,s]=mn(t,0,r,i,s),Ft.call(this,()=>this.editor.insertText(t,n,o),s,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=mn(t,n,r),Ft.call(this,()=>this.editor.removeFormat(t,n),r,t)}scrollRectIntoView(t){bO(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;return Ft.call(this,()=>{t=new J(t);const r=this.getLength(),i=this.editor.deleteText(0,r),s=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(o)},n)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||Ut.sources.API):([t,n,,r]=mn(t,n,r),this.selection.setRange(new Qn(Math.max(0,t),n),r),r!==Y.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;const r=new J().insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y.sources.API;return Ft.call(this,()=>(t=new J(t),this.editor.applyDelta(t)),n,!0)}};V(Ut,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:bs,theme:"default"}),V(Ut,"events",Y.events),V(Ut,"sources",Y.sources),V(Ut,"version","2.0.3"),V(Ut,"imports",{delta:J,parchment:GC,"core/module":Wt,"core/theme":Br});let D=Ut;function Dd(e){return typeof e=="string"?document.querySelector(e):e}function La(e){return Object.entries(e??{}).reduce((t,n)=>{let[r,i]=n;return{...t,[r]:i===!0?{}:i}},{})}function Pd(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function wO(e,t){const n=Dd(e);if(!n)throw new Error("Invalid Quill container");const i=!t.theme||t.theme===D.DEFAULTS.theme?Br:D.import(`themes/${t.theme}`);if(!i)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:s,...o}=D.DEFAULTS,{modules:a,...l}=i.DEFAULTS;let c=La(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=Mn({},La(s),La(a),c),d={...o,...Pd(l),...Pd(t)};let h=t.registry;return h?t.formats&&Or.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?xO(t.formats,d.registry,Or):d.registry,{...d,registry:h,container:n,theme:i,modules:Object.entries(u).reduce((f,p)=>{let[m,b]=p;if(!b)return f;const y=D.import(`modules/${m}`);return y==null?(Or.error(`Cannot load ${m} module. Are you sure you registered it?`),f):{...f,[m]:Mn({},y.DEFAULTS||{},b)}},{}),bounds:Dd(d.bounds)}}function Ft(e,t,n,r){if(!this.isEnabled()&&t===Y.sources.USER&&!this.allowReadOnlyEdits)return new J;let i=n==null?null:this.getSelection();const s=this.editor.delta,o=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=Bd(i,o,t):r!==0&&(i=Bd(i,n,r,t)),this.setSelection(i,Y.sources.SILENT)),o.length()>0){const a=[Y.events.TEXT_CHANGE,o,s,t];this.emitter.emit(Y.events.EDITOR_CHANGE,...a),t!==Y.sources.SILENT&&this.emitter.emit(...a)}return o}function mn(e,t,n,r,i){let s={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(i=r,r=n,n=t,t=0),typeof n=="object"?(s=n,i=r):typeof n=="string"&&(r!=null?s[n]=r:i=n),i=i||Y.sources.API,[e,t,s,i]}function Bd(e,t,n,r){const i=typeof n=="number"?n:0;if(e==null)return null;let s,o;return t&&typeof t.transformPosition=="function"?[s,o]=[e.index,e.index+e.length].map(a=>t.transformPosition(a,r!==Y.sources.USER)):[s,o]=[e.index,e.index+e.length].map(a=>a<t||a===t&&r===Y.sources.USER?a:i>=0?a+i:Math.max(t,a+i)),new Qn(s,o-s)}class or extends ao{}function Fd(e){return e instanceof ze||e instanceof Ct}function $d(e){return typeof e.updateContent=="function"}class Ar extends dc{constructor(t,n,r){let{emitter:i}=r;super(t,n),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Y.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Y.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(Y.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,i]=this.line(t),[s]=this.line(t+n);if(super.deleteAt(t,n),s!=null&&r!==s&&i>0){if(r instanceof Ct||s instanceof Ct){this.optimize();return}const o=s.children.head instanceof Vt?null:s.children.head;r.moveChildren(s,o),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(r==null||this.scroll.query(n,ee.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),r==null&&n.endsWith(`
|
|
50
|
+
`)?i.insertAt(0,n.slice(0,-1),r):i.insertAt(0,n,r)}else{const i=this.scroll.create(n,r);this.appendChild(i)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===ee.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat(new J().insert(`
|
|
51
|
+
`))),i=r.pop();if(i==null)return;this.batchStart();const s=r.shift();if(s){const l=s.type==="block"&&(s.delta.length()===0||!this.descendant(Ct,t)[0]&&t<this.length()),c=s.type==="block"?s.delta:new J().insert({[s.key]:s.value});Ma(this,t,c);const u=s.type==="block"?1:0,d=t+c.length()+u;l&&this.insertAt(d-1,`
|
|
52
|
+
`);const h=St(this.line(t)[0]),f=Rt.AttributeMap.diff(h,s.attributes)||{};Object.keys(f).forEach(p=>{this.formatAt(d-1,1,p,f[p])}),t=d}let[o,a]=this.children.find(t);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,o||void 0);Ma(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,o||void 0),Object.keys(l.attributes).forEach(u=>{c.format(u,l.attributes[u])})}})),i.type==="block"&&i.delta.length()){const l=o?o.offset(o.scroll)+a:this.length();Ma(this,l,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,i]=n;return r instanceof We?[r,i]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Fd,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(i,s,o)=>{let a=[],l=o;return i.children.forEachAt(s,o,(c,u,d)=>{Fd(c)?a.push(c):c instanceof ao&&(a=a.concat(r(c,u,l))),l-=d}),a};return r(this,t,n)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(Y.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let n=Y.sources.USER;typeof t=="string"&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:i}=r;const s=this.find(i,!0);return s&&!$d(s)}),t.length>0&&this.emitter.emit(Y.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Y.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[i]=this.descendant(s=>s instanceof Ct,t);i&&i.statics.blotName===n&&$d(i)&&i.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new J;return t.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const o=s.split(`
|
|
53
|
+
`);o.slice(0,-1).forEach(l=>{r.insert(l,i.attributes),n.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new J});const a=o[o.length-1];a&&r.insert(a,i.attributes)}else{const o=Object.keys(s)[0];if(!o)return;this.query(o,ee.INLINE)?r.push(i):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new J,n.push({type:"blockEmbed",key:o,value:s[o],attributes:i.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const i={};Object.entries(t).forEach(a=>{let[l,c]=a;this.query(l,ee.BLOCK&ee.BLOT)!=null?r=l:i[l]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const o=s.length();return Object.entries(i).forEach(a=>{let[l,c]=a;s.formatAt(0,o,l,c)}),s}}V(Ar,"blotName","scroll"),V(Ar,"className","ql-editor"),V(Ar,"tagName","DIV"),V(Ar,"defaultChild",ze),V(Ar,"allowedChildren",[ze,Ct,or]);function Ma(e,t,n){n.reduce((r,i)=>{const s=Rt.Op.length(i);let o=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;e.insertAt(r,a);const[l]=e.descendant(We,r),c=St(l);o=Rt.AttributeMap.diff(c,o)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(e.insertAt(r,a,i.insert[a]),e.scroll.query(a,ee.INLINE)!=null){const[c]=e.descendant(We,r),u=St(c);o=Rt.AttributeMap.diff(u,o)||{}}}}return Object.keys(o).forEach(a=>{e.formatAt(r,s,a,o[a])}),r+s},t)}const bc={scope:ee.BLOCK,whitelist:["right","center","justify"]},_O=new ln("align","align",bc),lg=new Kt("align","ql-align",bc),cg=new Fn("align","text-align",bc);class ug extends Fn{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):n}}const vO=new Kt("color","ql-color",{scope:ee.INLINE}),yc=new ug("color","color",{scope:ee.INLINE}),NO=new Kt("background","ql-bg",{scope:ee.INLINE}),Ec=new ug("background","background-color",{scope:ee.INLINE});class ar extends or{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
|
54
|
+
`).slice(t,t+n)}html(t,n){return`<pre>
|
|
55
|
+
${fo(this.code(t,n))}
|
|
56
|
+
</pre>`}}class Xe extends ze{static register(){D.register(ar)}}V(Xe,"TAB"," ");class xc extends cn{}xc.blotName="code";xc.tagName="CODE";Xe.blotName="code-block";Xe.className="ql-code-block";Xe.tagName="DIV";ar.blotName="code-block-container";ar.className="ql-code-block-container";ar.tagName="DIV";ar.allowedChildren=[Xe];Xe.allowedChildren=[Gt,Vt,Pr];Xe.requiredContainer=ar;const wc={scope:ee.BLOCK,whitelist:["rtl"]},dg=new ln("direction","dir",wc),fg=new Kt("direction","ql-direction",wc),hg=new Fn("direction","direction",wc),pg={scope:ee.INLINE,whitelist:["serif","monospace"]},gg=new Kt("font","ql-font",pg);class kO extends Fn{value(t){return super.value(t).replace(/["']/g,"")}}const mg=new kO("font","font-family",pg),bg=new Kt("size","ql-size",{scope:ee.INLINE,whitelist:["small","large","huge"]}),yg=new Fn("size","font-size",{scope:ee.INLINE,whitelist:["10px","18px","32px"]}),AO=vn("quill:keyboard"),SO=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class ho extends Wt{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=CO(t);if(i==null){AO.warn("Attempted to add invalid keyboard binding",i);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(o=>{const a={...i,key:o,...n,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(y=>ho.match(t,y));if(i.length===0)return;const s=D.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,l]=this.quill.getLine(o.index),[c,u]=this.quill.getLeaf(o.index),[d,h]=o.length===0?[c,u]:this.quill.getLeaf(o.index+o.length),f=c instanceof Us?c.value().slice(0,u):"",p=d instanceof Us?d.value().slice(h):"",m={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:f,suffix:p,event:t};i.some(y=>{if(y.collapsed!=null&&y.collapsed!==m.collapsed||y.empty!=null&&y.empty!==m.empty||y.offset!=null&&y.offset!==m.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(w=>m.format[w]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(w=>y.format[w]===!0?m.format[w]!=null:y.format[w]===!1?m.format[w]==null:On(y.format[w],m.format[w])))return!1;return y.prefix!=null&&!y.prefix.test(m.prefix)||y.suffix!=null&&!y.suffix.test(m.suffix)?!1:y.handler.call(this,o,m,y)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index-r).delete(r);if(n.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(i=Rt.AttributeMap.diff(c,u)||{},Object.keys(i).length>0){const d=new J().retain(t.index+s.length()-2).retain(1,i);o=o.compose(d)}}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const l=s.formats(),c=this.quill.getFormat(t.index,1);i=Rt.AttributeMap.diff(l,c)||{},Object.keys(i).length>0&&(o=o.retain(a.length()-1).retain(1,i))}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDeleteRange(t){_c({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,o)=>(this.quill.scroll.query(o,ee.BLOCK)&&!Array.isArray(n.format[o])&&(s[o]=n.format[o]),s),{}),i=new J().retain(t.index).delete(t.length).insert(`
|
|
57
|
+
`,r);this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(t.index+1,D.sources.SILENT),this.quill.focus()}}const TO={bindings:{bold:Da("bold"),italic:Da("italic"),underline:Da("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",D.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",D.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",D.sources.USER):t.format.list!=null&&this.quill.format("list",!1,D.sources.USER)}},"indent code-block":Ud(!0),"outdent code-block":Ud(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,D.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=new J().retain(e.index).delete(e.length).insert(" ");return this.quill.updateContents(n,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,D.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,D.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,D.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},i=new J().retain(e.index).insert(`
|
|
58
|
+
`,r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),i=new J().retain(e.index).insert(`
|
|
59
|
+
`,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,i,s]=t.getTable(e),o=OO(n,r,i,s);if(o==null)return;let a=n.offset();if(o<0){const l=new J().retain(a).insert(`
|
|
60
|
+
`);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(e.index+1,e.length,D.sources.SILENT)}else if(o>0){a+=n.length();const l=new J().retain(a).insert(`
|
|
61
|
+
`);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(a,D.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,D.sources.USER):this.quill.setSelection(i+r.length(),D.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",D.sources.USER),this.quill.history.cutoff();const o=new J().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,D.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const s=new J().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,D.sources.USER),this.quill.setSelection(e.index-1,D.sources.SILENT),!1}return!0}},"embed left":ys("ArrowLeft",!1),"embed left shift":ys("ArrowLeft",!0),"embed right":ys("ArrowRight",!1),"embed right shift":ys("ArrowRight",!0),"table down":qd(!1),"table up":qd(!0)}};ho.DEFAULTS=TO;function Ud(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,D.sources.USER),this.quill.setSelection(t.index+s.length,D.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:l}=t;o.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?a+=s.length:l+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?a-=s.length:l-=s.length)}),this.quill.update(D.sources.USER),this.quill.setSelection(a,l,D.sources.SILENT)}}}function ys(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;e==="ArrowRight"&&(i+=r.length+1);const[s]=this.quill.getLeaf(i);return s instanceof wt?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,D.sources.USER):this.quill.setSelection(r.index-1,D.sources.USER):t?this.quill.setSelection(r.index,r.length+1,D.sources.USER):this.quill.setSelection(r.index+r.length+1,D.sources.USER),!1):!0}}}function Da(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],D.sources.USER)}}}function qd(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let o=s.children.head,a=i;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(n.offset,o.length()-1);this.quill.setSelection(l,0,D.sources.USER)}}else{const o=i.table()[r];o!=null&&(e?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,D.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,D.sources.USER))}return!1}}}function CO(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=Tr(e);else return null;return e.shortKey&&(e[SO]=e.shortKey,delete e.shortKey),e}function _c(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const s=r[0].formats(),o=r[r.length-1].formats();i=Rt.AttributeMap.diff(o,s)||{}}t.deleteText(n,D.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,D.sources.USER),t.setSelection(n.index,D.sources.SILENT)}function OO(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const RO=/font-weight:\s*normal/,IO=["P","OL","UL"],zd=e=>e&&IO.includes(e.tagName),LO=e=>{Array.from(e.querySelectorAll("br")).filter(t=>zd(t.previousElementSibling)&&zd(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},MO=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(RO)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function DO(e){e.querySelector('[id^="docs-internal-guid-"]')&&(MO(e),LO(e))}const PO=/\bmso-list:[^;]*ignore/i,BO=/\bmso-list:[^;]*\bl(\d+)/i,FO=/\bmso-list:[^;]*\blevel(\d+)/i,$O=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(BO);if(!r)return null;const i=Number(r[1]),s=n==null?void 0:n.match(FO),o=s?Number(s[1]):1,a=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:i,indent:o,type:c,element:e}},UO=e=>{var o,a;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(l=>{(l.getAttribute("style")||"").match(PO)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const i=e.documentElement.innerHTML,s=r.map(l=>$O(l,i)).filter(l=>l);for(;s.length;){const l=[];let c=s.shift();for(;c;)l.push(c),c=s.length&&((o=s[0])==null?void 0:o.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(a=l[0])==null?void 0:a.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function qO(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&UO(e)}const zO=[qO,DO],jO=e=>{e.documentElement&&zO.forEach(t=>{t(e)})},HO=vn("quill:clipboard"),GO=[[Node.TEXT_NODE,rR],[Node.TEXT_NODE,Hd],["br",ZO],[Node.ELEMENT_NODE,Hd],[Node.ELEMENT_NODE,YO],[Node.ELEMENT_NODE,WO],[Node.ELEMENT_NODE,tR],["li",JO],["ol, ul",eR],["pre",XO],["tr",nR],["b",Pa("bold")],["i",Pa("italic")],["strike",Pa("strike")],["style",QO]],KO=[_O,dg].reduce((e,t)=>(e[t.keyName]=t,e),{}),jd=[cg,Ec,yc,hg,mg,yg].reduce((e,t)=>(e[t.keyName]=t,e),{});class Eg extends Wt{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],GO.concat(this.options.matchers??[]).forEach(r=>{let[i,s]=r;this.addMatcher(i,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[Xe.blotName])return new J().insert(r||"",{[Xe.blotName]:i[Xe.blotName]});if(!n)return new J().insert(r||"",i);const s=this.convertHTML(n);return Bi(s,`
|
|
62
|
+
`)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new J().retain(s.length()-1).delete(1)):s}normalizeHTML(t){jO(t)}convertHTML(t){const n=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,i=new WeakMap,[s,o]=this.prepareMatching(r,i);return vc(this.quill.scroll,r,s,o,i)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D.sources.API;if(typeof t=="string"){const i=this.convert({html:t,text:""});this.quill.setContents(i,n),this.quill.setSelection(0,D.sources.SILENT)}else{const i=this.convert({html:n,text:""});this.quill.updateContents(new J().retain(t).concat(i),r),this.quill.setSelection(t+i.length(),D.sources.SILENT)}}onCaptureCopy(t){var o,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:i,text:s}=this.onCopy(r,n);(o=t.clipboardData)==null||o.setData("text/plain",s),(a=t.clipboardData)==null||a.setData("text/html",i),n&&_c({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
|
|
63
|
+
`)}onCapturePaste(t){var o,a,l,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(o=t.clipboardData)==null?void 0:o.getData("text/html");let i=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const d=(l=t.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(i=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:i})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:i}=n;const s=this.quill.getFormat(t.index),o=this.convert({text:r,html:i},s);HO.log("onPaste",o,{text:r,html:i});const a=new J().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,D.sources.USER),this.quill.setSelection(a.length()-t.length,D.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],i=[];return this.matchers.forEach(s=>{const[o,a]=s;switch(o){case Node.TEXT_NODE:i.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(a)}else n.set(l,[a])});break}}),[r,i]}}V(Eg,"DEFAULTS",{matchers:[]});function lr(e,t,n,r){return r.query(t)?e.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[t])return i.push(s);const o=n?{[t]:n}:{};return i.insert(s.insert,{...o,...s.attributes})},new J):e}function Bi(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const i=e.ops[r];if(typeof i.insert!="string")break;n=i.insert+n}return n.slice(-1*t.length)===t}function In(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof wt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function VO(e,t){return e.previousElementSibling&&e.nextElementSibling&&!In(e.previousElementSibling,t)&&!In(e.nextElementSibling,t)}const Es=new WeakMap;function xg(e){return e==null?!1:(Es.has(e)||(e.tagName==="PRE"?Es.set(e,!0):Es.set(e,xg(e.parentNode))),Es.get(e))}function vc(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((s,o)=>o(t,s,e),new J):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,o)=>{let a=vc(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce((l,c)=>c(o,l,e),a),a=(i.get(o)||[]).reduce((l,c)=>c(o,l,e),a)),s.concat(a)},new J):new J}function Pa(e){return(t,n,r)=>lr(n,e,!0,r)}function WO(e,t,n){const r=ln.keys(e),i=Kt.keys(e),s=Fn.keys(e),o={};return r.concat(i).concat(s).forEach(a=>{let l=n.query(a,ee.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(e),o[l.attrName])||(l=KO[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(e)||void 0),l=jd[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=jd[a],o[l.attrName]=l.value(e)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,u]=l;return lr(a,c,u,n)},t)}function YO(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof wt){const i={},s=r.value(e);if(s!=null)return i[r.blotName]=s,new J().insert(i,r.formats(e,n))}else if(r.prototype instanceof Si&&!Bi(t,`
|
|
64
|
+
`)&&t.insert(`
|
|
65
|
+
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return lr(t,r.blotName,r.formats(e,n),n);return t}function ZO(e,t){return Bi(t,`
|
|
66
|
+
`)||t.insert(`
|
|
67
|
+
`),t}function XO(e,t,n){const r=n.query("code-block"),i=r&&"formats"in r&&typeof r.formats=="function"?r.formats(e,n):!0;return lr(t,"code-block",i,n)}function QO(){return new J}function JO(e,t,n){const r=n.query(e);if(r==null||r.blotName!=="list"||!Bi(t,`
|
|
68
|
+
`))return t;let i=-1,s=e.parentNode;for(;s!=null;)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:i,...a.attributes||{}}):o,new J)}function eR(e,t,n){const r=e;let i=r.tagName==="OL"?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(i=s==="true"?"checked":"unchecked"),lr(t,"list",i,n)}function Hd(e,t,n){if(!Bi(t,`
|
|
69
|
+
`)){if(In(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
|
|
70
|
+
`);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(In(r,n))return t.insert(`
|
|
71
|
+
`);const i=n.query(r);if(i&&i.prototype instanceof Ct)return t.insert(`
|
|
72
|
+
`);r=r.firstChild}}}return t}function tR(e,t,n){var s;const r={},i=e.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return lr(o,l,c,n)},t),parseFloat(i.textIndent||0)>0?new J().insert(" ").concat(t):t}function nR(e,t,n){var i,s;const r=((i=e.parentElement)==null?void 0:i.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return lr(t,"table",a,n)}return t}function rR(e,t,n){var i;let r=e.data;if(((i=e.parentElement)==null?void 0:i.tagName)==="O:P")return t.insert(r.trim());if(!xg(e)){if(r.trim().length===0&&r.includes(`
|
|
73
|
+
`)&&!VO(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&In(e.parentElement,n)||e.previousSibling instanceof Element&&In(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&In(e.parentElement,n)||e.nextSibling instanceof Element&&In(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class wg extends Wt{constructor(n,r){super(n,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(D.events.EDITOR_CHANGE,(i,s,o,a)=>{i===D.events.SELECTION_CHANGE?s&&a!==D.sources.SILENT&&(this.currentRange=s):i===D.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===D.sources.USER?this.record(s,o):this.transform(s)),this.currentRange=xl(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const i=this.stack[n].pop();if(!i)return;const s=this.quill.getContents(),o=i.delta.invert(s);this.stack[r].push({delta:o,range:xl(i.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,D.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let i=n.invert(r),s=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(i=i.compose(a.delta),s=a.range)}else this.lastRecorded=o;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Gd(this.stack.undo,n),Gd(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,D.sources.USER);else{const r=sR(this.quill.scroll,n.delta);this.quill.setSelection(r,D.sources.USER)}}}V(wg,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Gd(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const i=e[r];e[r]={delta:n.transform(i.delta,!0),range:i.range&&xl(i.range,n)},n=i.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function iR(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
|
|
74
|
+
`):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,ee.BLOCK)!=null):!1}function sR(e,t){const n=t.reduce((i,s)=>i+(s.delete||0),0);let r=t.length()-n;return iR(e,t)&&(r-=1),r}function xl(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class _g extends Wt{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var o;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const s=i&&t.selection.normalizeNative(i);if(s){const a=t.selection.normalizedToRange(s);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,t,r)}}_g.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const i=r.reduce((s,o)=>s.insert({image:o}),new J().retain(e.index).delete(e.length));this.quill.updateContents(i,Y.sources.USER),this.quill.setSelection(e.index+r.length,Y.sources.SILENT)})}};const oR=["insertText","insertReplacementText"];let aR=class extends Wt{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(D.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){_c({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new J().retain(t.index).insert(n,r),D.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,D.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!oR.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=lR(t);if(r==null)return;const i=this.quill.selection.normalizeNative(n),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}};function lR(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const cR=/Mac/i.test(navigator.platform),uR=100,dR=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||cR&&e.key==="a"&&e.ctrlKey===!0);class fR extends Wt{constructor(n,r){super(n,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:i,event:s}=r;if(!(i instanceof Ht)||!i.uiNode)return!0;const o=getComputedStyle(i.domNode).direction==="rtl";return o&&s.key!=="ArrowRight"||!o&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),D.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&dR(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+uR,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Ht)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),n.removeAllRanges(),n.addRange(s)}}D.register({"blots/block":ze,"blots/block/embed":Ct,"blots/break":Vt,"blots/container":or,"blots/cursor":Pr,"blots/embed":mc,"blots/inline":cn,"blots/scroll":Ar,"blots/text":Gt,"modules/clipboard":Eg,"modules/history":wg,"modules/keyboard":ho,"modules/uploader":_g,"modules/input":aR,"modules/uiNode":fR});class hR extends Kt{add(t,n){let r=0;if(n==="+1"||n==="-1"){const i=this.value(t)||0;r=n==="+1"?i+1:i-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,n){return super.canAdd(t,n)||super.canAdd(t,parseInt(n,10))}value(t){return parseInt(super.value(t),10)||void 0}}const pR=new hR("indent","ql-indent",{scope:ee.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class wl extends ze{}V(wl,"blotName","blockquote"),V(wl,"tagName","blockquote");class _l extends ze{static formats(t){return this.tagName.indexOf(t.tagName)+1}}V(_l,"blotName","header"),V(_l,"tagName",["H1","H2","H3","H4","H5","H6"]);class Fi extends or{}Fi.blotName="list-container";Fi.tagName="OL";class $i extends ze{static create(t){const n=super.create();return n.setAttribute("data-list",t),n}static formats(t){return t.getAttribute("data-list")||void 0}static register(){D.register(Fi)}constructor(t,n){super(t,n);const r=n.ownerDocument.createElement("span"),i=s=>{if(!t.isEnabled())return;const o=this.statics.formats(n,t);o==="checked"?(this.format("list","unchecked"),s.preventDefault()):o==="unchecked"&&(this.format("list","checked"),s.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(t,n)}}$i.blotName="list";$i.tagName="LI";Fi.allowedChildren=[$i];$i.requiredContainer=Fi;class Oi extends cn{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}V(Oi,"blotName","bold"),V(Oi,"tagName",["STRONG","B"]);class vl extends Oi{}V(vl,"blotName","italic"),V(vl,"tagName",["EM","I"]);class Ln extends cn{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return vg(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}V(Ln,"blotName","link"),V(Ln,"tagName","A"),V(Ln,"SANITIZED_URL","about:blank"),V(Ln,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function vg(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}class Nl extends cn{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}V(Nl,"blotName","script"),V(Nl,"tagName",["SUB","SUP"]);class kl extends Oi{}V(kl,"blotName","strike"),V(kl,"tagName",["S","STRIKE"]);class Al extends cn{}V(Al,"blotName","underline"),V(Al,"tagName","U");class ks extends mc{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(t);return typeof t=="string"&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}V(ks,"blotName","formula"),V(ks,"className","ql-formula"),V(ks,"tagName","SPAN");const Kd=["alt","height","width"];var ws;let gR=(ws=class extends wt{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Kd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return vg(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,n){Kd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}},V(ws,"blotName","image"),V(ws,"tagName","IMG"),ws);const Vd=["height","width"];class As extends Ct{static create(t){const n=super.create(t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Vd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static sanitize(t){return Ln.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,n){Vd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}V(As,"blotName","video"),V(As,"className","ql-video"),V(As,"tagName","IFRAME");const fi=new Kt("code-token","hljs",{scope:ee.INLINE});class En extends cn{static formats(t,n){for(;t!=null&&t!==n.domNode;){if(t.classList&&t.classList.contains(Xe.className))return super.formats(t,n);t=t.parentNode}}constructor(t,n,r){super(t,n,r),fi.add(this.domNode,r)}format(t,n){t!==En.blotName?super.format(t,n):n?fi.add(this.domNode,n):(fi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),fi.value(this.domNode)||this.unwrap()}}En.blotName="code-token";En.className="ql-token";class Tt extends Xe{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("data-language",t),n}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(t,n)}replaceWith(t,n){return this.formatAt(0,this.length(),En.blotName,!1),super.replaceWith(t,n)}}class bi extends ar{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,n){t===Tt.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,n)}))}formatAt(t,n,r,i){r===Tt.blotName&&(this.forceNext=!0),super.formatAt(t,n,r,i)}highlight(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
|
|
75
|
+
`)}
|
|
76
|
+
`,s=Tt.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const o=this.children.reduce((l,c)=>l.concat(sg(c,!1)),new J),a=t(i,s);o.diff(a).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[Tt.blotName,En.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=i,this.forceNext=!1}}html(t,n){const[r]=this.children.find(t);return`<pre data-language="${r?Tt.formats(r.domNode):"plain"}">
|
|
77
|
+
${fo(this.code(t,n))}
|
|
78
|
+
</pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=Tt.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}bi.allowedChildren=[Tt];Tt.requiredContainer=bi;Tt.allowedChildren=[En,Pr,Gt,Vt];const mR=(e,t,n)=>{if(typeof e.versionString=="string"){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value};class Ng extends Wt{static register(){D.register(En,!0),D.register(Tt,!0),D.register(bi,!0)}constructor(t,n){if(super(t,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:s}=i;return r[s]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(D.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof bi))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:s}=r;const o=n.ownerDocument.createElement("option");o.textContent=s,o.setAttribute("value",i),n.appendChild(o)}),n.addEventListener("change",()=>{t.format(Tt.blotName,n.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(n),t.children.head&&(n.value=Tt.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(D.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(D.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(bi):[t]).forEach(s=>{s.highlight(this.highlightBlot,n)}),this.quill.update(D.sources.SILENT),r!=null&&this.quill.setSelection(r,D.sources.SILENT)}highlightBlot(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return fo(t).split(`
|
|
79
|
+
`).reduce((i,s,o)=>(o!==0&&i.insert(`
|
|
80
|
+
`,{[Xe.blotName]:n}),i.insert(s)),new J);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Xe.className),r.innerHTML=mR(this.options.hljs,n,t),vc(this.quill.scroll,r,[(i,s)=>{const o=fi.value(i);return o?s.compose(new J().retain(s.length(),{[En.blotName]:o})):s}],[(i,s)=>i.data.split(`
|
|
81
|
+
`).reduce((o,a,l)=>(l!==0&&o.insert(`
|
|
82
|
+
`,{[Xe.blotName]:n}),o.insert(a)),s)],new WeakMap)}}Ng.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 ze{static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",Nc()),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 zt=Ei;class xn 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(xn,"blotName","table-row"),V(xn,"tagName","TR");class an extends or{}V(an,"blotName","table-body"),V(an,"tagName","TBODY");class Fr extends or{balanceCells(){const t=this.descendants(xn),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=zt.formats(r.children.head.domNode));const s=this.scroll.create(zt.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=zt.formats(r.children.head.domNode),o=this.scroll.create(zt.blotName,s);r.insertBefore(o,i)})}insertRow(t){const[n]=this.descendant(an);if(n==null||n.children.head==null)return;const r=Nc(),i=this.scroll.create(xn.blotName);n.children.head.children.forEach(()=>{const o=this.scroll.create(zt.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=[xn];xn.requiredContainer=an;xn.allowedChildren=[zt];zt.requiredContainer=xn;function Nc(){return`row-${Math.random().toString(36).slice(2,6)}`}class bR extends Wt{static register(){D.register(zt),D.register(xn),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!==zt.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:Nc()})},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 Wd=vn("quill:toolbar");class kc extends Wt{constructor(t,n){var r,i;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),yR(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)){Wd.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){Wd.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 wt){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())}})}}kc.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 yR(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)?ER(r,s,o):Yd(r,s,o)}}),e.appendChild(r)})}function ER(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)}kc.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 xR='<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>',wR='<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>',_R='<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>',vR='<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>',NR='<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>',kR='<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>',AR='<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>',SR='<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>',TR='<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>',CR='<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>',OR='<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>',RR='<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>',IR='<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>',LR='<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>',MR='<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>',DR='<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>',PR='<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>',BR='<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>',FR='<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>',$R='<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>',UR='<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>',qR='<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>',zR='<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>',jR='<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>',HR='<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>',GR='<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>',KR='<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>',VR='<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>',WR='<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>',YR='<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>',ZR='<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>',XR='<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:{"":xR,center:wR,right:_R,justify:vR},background:NR,blockquote:kR,bold:AR,clean:SR,code:Zd,"code-block":Zd,color:TR,direction:{"":CR,rtl:OR},formula:RR,header:{1:IR,2:LR,3:MR,4:DR,5:PR,6:BR},italic:FR,image:$R,indent:{"+1":UR,"-1":qR},link:zR,list:{bullet:jR,check:HR,ordered:GR},script:{sub:KR,super:VR},strike:WR,table:YR,underline:ZR,video:XR},QR='<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 po{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=QR,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 kg extends po{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 po{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 JR=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,JR(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 eI=[!1,"center","right","justify"],tI=["#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"],nI=[!1,"serif","monospace"],rI=["1","2","3",!1],iI=["small",!1,"large","huge"];class Ui 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&&li(i,eI),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&&li(i,tI,s==="background"?"#ffffff":"#000000"),new kg(i,n[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?li(i,nI):i.classList.contains("ql-header")?li(i,rI):i.classList.contains("ql-size")&&li(i,iI)),new po(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Y.events.EDITOR_CHANGE,r)}}Ui.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,Y.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Y.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=sI(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,Y.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Y.sources.USER),this.quill.setSelection(r+2,Y.sources.USER)}break}}this.textbox.value="",this.hide()}}function sI(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 li(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 oI=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Cg extends Tg{constructor(t,n){super(t,n),this.quill.on(Y.events.EDITOR_CHANGE,(r,i,s,o)=>{if(r===Y.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&o===Y.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(Y.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 Ui{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=oI),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({},Ui.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,D.sources.USER)}}}}});const aI=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Rg 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,Y.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(Y.events.SELECTION_CHANGE,(n,r,i)=>{if(n!=null){if(n.length===0&&i===Y.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(Rg,"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 Ig extends Ui{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=aI),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 Rg(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)}))}}Ig.DEFAULTS=Mn({},Ui.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":vO,"attributors/class/direction":fg,"attributors/class/font":gg,"attributors/class/size":bg,"attributors/style/align":cg,"attributors/style/background":Ec,"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":pR,"formats/background":Ec,"formats/color":yc,"formats/font":gg,"formats/size":bg,"formats/blockquote":wl,"formats/code-block":Xe,"formats/header":_l,"formats/list":$i,"formats/bold":Oi,"formats/code":xc,"formats/italic":vl,"formats/link":Ln,"formats/script":Nl,"formats/strike":kl,"formats/underline":Al,"formats/formula":ks,"formats/image":gR,"formats/video":As,"modules/syntax":Ng,"modules/table":bR,"modules/toolbar":kc,"themes/bubble":Og,"themes/snow":Ig,"ui/icons":Ri,"ui/picker":po,"ui/icon-picker":Ag,"ui/color-picker":kg,"ui/tooltip":Sg},!0);class go extends G.Component{constructor(t){super(t),this.editingAreaRef=G.createRef(),this.containerRef=G.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(G.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(G.Children.count(t.children)){const n=G.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 G.Children.count(t)?G.cloneElement(G.Children.only(t),i):n?G.createElement("pre",{...i}):G.createElement("div",{...i})}render(){return G.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())}}go.displayName="React Quill";go.Quill=D;go.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=G.useRef(null),s=G.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=G.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return _.jsx("div",{className:`rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:_.jsx(go,{ref:i,theme:"snow",value:e,onChange:t,placeholder:n,modules:s,formats:o,className:"min-h-[400px]"})})}function lI({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:s=!1}){const[o,a]=G.useState(""),[l,c]=G.useState(""),[u,d]=G.useState(Fe.Draft),[h,f]=G.useState(null),[p,m]=G.useState(""),[b,y]=G.useState([]),[w,v]=G.useState(""),[T,O]=G.useState({});G.useEffect(()=>{var B,C;e&&(a(e.title),c(e.content),d(e.status),f(e.categoryId||null),m(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),y(((B=e.tags)==null?void 0:B.map(U=>U.tagId).filter(U=>U!==void 0))||[]),v(((C=e.roles)==null?void 0:C.map(U=>U.slug).join(", "))||""))},[e]);const A=()=>{const B={};return o.trim()||(B.title="Title is required"),l.trim()||(B.content="Content is required"),O(B),Object.keys(B).length===0},F=async B=>{if(B.preventDefault(),!A())return;const C=w.split(",").map(P=>P.trim()).filter(P=>P.length>0),U={title:o.trim(),content:l.trim(),status:u,categoryId:h||void 0,dateAt:p||void 0,tagIds:b.length>0?b:void 0,roleIds:C.length>0?C:void 0};e?await r({articleId:e.articleId,...U}):await r(U)},$=B=>{y(C=>C.includes(B)?C.filter(U=>U!==B):[...C,B])};return _.jsxs("form",{onSubmit:F,className:"space-y-6",children:[_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),_.jsx("input",{id:"title",type:"text",value:o,onChange:B=>a(B.target.value),className:`w-full rounded-md border ${T.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"}),T.title&&_.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:T.title})]}),_.jsxs("div",{className:"mt-4 space-y-2",children:[_.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),_.jsx(Lg,{value:l,onChange:c,placeholder:"Write your article content...",error:T.content}),T.content&&_.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:T.content})]}),_.jsxs("div",{className:"mt-4 space-y-2",children:[_.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),_.jsx("input",{id:"dateAt",type:"datetime-local",value:p,onChange:B=>m(B.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"})]}),_.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),_.jsxs("select",{id:"status",value:u,onChange:B=>d(Number(B.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:[_.jsx("option",{value:Fe.Draft,children:"Draft"}),_.jsx("option",{value:Fe.Published,children:"Published"}),_.jsx("option",{value:Fe.Archived,children:"Archived"}),_.jsx("option",{value:Fe.Scheduled,children:"Scheduled"}),_.jsx("option",{value:Fe.Review,children:"Review"})]})]}),_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),_.jsxs("select",{id:"category",value:h||"",onChange:B=>f(B.target.value?Number(B.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:[_.jsx("option",{value:"",children:"No Category"}),t.map(B=>_.jsx("option",{value:B.categoryId,children:B.title},B.categoryId))]})]})]}),n.length>0&&_.jsxs("div",{className:"mt-4 space-y-2",children:[_.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),_.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(B=>_.jsxs("button",{type:"button",onClick:()=>$(B.tagId||0),className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${b.includes(B.tagId||0)?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}`,children:["#",B.title]},B.tagId))})]}),_.jsxs("div",{className:"mt-4 space-y-2",children:[_.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),_.jsx("input",{id:"roles",type:"text",value:w,onChange:B=>v(B.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 role slugs separated by commas (e.g., admin, editor)"}),_.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),_.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[_.jsx("button",{type:"button",onClick:i,disabled:s,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"}),_.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 Article":"Create Article"})]})]})}function cI({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=G.useState("edit");return _.jsxs("div",{className:"space-y-2",children:[r&&_.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),_.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[_.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[_.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"}),_.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"})]}),_.jsx("div",{style:{minHeight:s},children:o==="edit"?_.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}}):_.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?_.jsx(ch,{remarkPlugins:[$h],rehypePlugins:[_p],children:e}):_.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&_.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),_.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[_.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),_.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[_.jsxs("div",{children:[_.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"**bold text**"})," - Bold"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"*italic text*"})," - Italic"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"[link](url)"})," - Link"]}),_.jsxs("div",{children:[_.jsx("strong",{children:""})," - Image"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"- item"})," - Bullet list"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"1. item"})," - Numbered list"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"`code`"})," - Inline code"]}),_.jsxs("div",{children:[_.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
|
|
76
84
|
* @license lucide-react v0.462.0 - ISC
|
|
77
85
|
*
|
|
78
86
|
* This source code is licensed under the ISC license.
|
|
79
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const
|
|
88
|
+
*/const uI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
81
89
|
* @license lucide-react v0.462.0 - ISC
|
|
82
90
|
*
|
|
83
91
|
* This source code is licensed under the ISC license.
|
|
84
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/var
|
|
93
|
+
*/var dI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
86
94
|
* @license lucide-react v0.462.0 - ISC
|
|
87
95
|
*
|
|
88
96
|
* This source code is licensed under the ISC license.
|
|
89
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
98
|
+
*/const fI=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>G.createElement("svg",{ref:l,...dI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Mg("lucide",i),...a},[...o.map(([c,u])=>G.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
91
99
|
* @license lucide-react v0.462.0 - ISC
|
|
92
100
|
*
|
|
93
101
|
* This source code is licensed under the ISC license.
|
|
94
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
103
|
+
*/const Ac=(e,t)=>{const n=G.forwardRef(({className:r,...i},s)=>G.createElement(fI,{ref:s,iconNode:t,className:Mg(`lucide-${uI(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
96
104
|
* @license lucide-react v0.462.0 - ISC
|
|
97
105
|
*
|
|
98
106
|
* This source code is licensed under the ISC license.
|
|
99
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
108
|
+
*/const hI=Ac("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
101
109
|
* @license lucide-react v0.462.0 - ISC
|
|
102
110
|
*
|
|
103
111
|
* This source code is licensed under the ISC license.
|
|
104
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
113
|
+
*/const Dg=Ac("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
106
114
|
* @license lucide-react v0.462.0 - ISC
|
|
107
115
|
*
|
|
108
116
|
* This source code is licensed under the ISC license.
|
|
109
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const Lc=Wi("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 VS({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:a,showActions:o=!1,emptyMessage:l="No categories found"}){return t?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?j.jsx("div",{className:"rounded-md bg-red-50 p-4",children:j.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:l})}):j.jsx("div",{className:"w-full overflow-x-auto",children:j.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[j.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:j.jsxs("tr",{children:[j.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"}),j.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"}),j.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&&j.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"})]})}),j.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(s=>j.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[j.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:j.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(s),children:s.title})}),j.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:s.articleCount||0}),j.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:s.parentId?`Parent ID: ${s.parentId}`:"-"}),o&&j.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:j.jsxs("div",{className:"flex justify-end gap-2",children:[i&&j.jsx("button",{onClick:()=>i(s),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:j.jsx(Ic,{className:"h-4 w-4"})}),a&&j.jsx("button",{onClick:()=>a(s),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:j.jsx(Lc,{className:"h-4 w-4"})})]})})]},s.categoryId))})]})})}function YS({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:a=!1}){const[o,l]=ae.useState(""),[s,c]=ae.useState(null),[d,u]=ae.useState({});ae.useEffect(()=>{e?(l(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{l(""),c(null),u({})},f=()=>{const y={};return o.trim()||(y.title="Title is required"),u(y),Object.keys(y).length===0},g=async y=>{if(y.preventDefault(),!f())return;const m={title:o.trim(),parentId:s||void 0};try{e?await i({categoryId:e.categoryId,...m}):await i(m),r()}catch(b){console.error("Failed to save category:",b)}};if(!n)return null;const p=t.filter(y=>y.categoryId!==(e==null?void 0:e.categoryId));return j.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:j.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[j.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),j.jsxs("form",{onSubmit:g,className:"space-y-4",children:[j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),j.jsx("input",{id:"title",type:"text",value:o,onChange:y=>l(y.target.value),className:`w-full rounded-md border ${d.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),d.title&&j.jsx("p",{className:"text-sm text-red-600",children:d.title})]}),p.length>0&&j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),j.jsxs("select",{id:"parent",value:s||"",onChange:y=>c(y.target.value?Number(y.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[j.jsx("option",{value:"",children:"None (Top Level)"}),p.map(y=>j.jsx("option",{value:y.categoryId,children:y.title},y.categoryId))]})]}),j.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[j.jsx("button",{type:"button",onClick:r,disabled:a,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),j.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update":"Create"})]})]})]})})}function ZS({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:a,onMergeClick:o,showActions:l=!1,emptyMessage:s="No tags found"}){return t?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?j.jsx("div",{className:"rounded-md bg-red-50 p-4",children:j.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?j.jsx("div",{className:"flex items-center justify-center p-8",children:j.jsx("div",{className:"text-gray-500",children:s})}):j.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>j.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:[j.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&&j.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),l&&(i||a||o)&&j.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&j.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:j.jsx(Ic,{className:"h-4 w-4"})}),o&&j.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:j.jsx(WS,{className:"h-4 w-4"})}),a&&j.jsx("button",{onClick:()=>a(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:j.jsx(Lc,{className:"h-4 w-4"})})]})]},c.tagId))})}function XS({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[a,o]=ae.useState(""),[l,s]=ae.useState(""),[c,d]=ae.useState({});ae.useEffect(()=>{e?(o(e.title),s(e.slug||"")):u()},[e,t]);const u=()=>{o(""),s(""),d({})},h=()=>{const g={};return a.trim()||(g.title="Title is required"),d(g),Object.keys(g).length===0},f=async g=>{if(g.preventDefault(),!h())return;const p={title:a.trim(),slug:l.trim()||void 0};try{e?await r({tagId:e.tagId,...p}):await r(p),n()}catch(y){console.error("Failed to save tag:",y)}};return t?j.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:j.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[j.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),j.jsxs("form",{onSubmit:f,className:"space-y-4",children:[j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),j.jsx("input",{id:"title",type:"text",value:a,onChange:g=>o(g.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&&j.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),j.jsx("input",{id:"slug",type:"text",value:l,onChange:g=>s(g.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),j.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),j.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[j.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"}),j.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 QS({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:a=!1}){const[o,l]=ae.useState(null),[s,c]=ae.useState({}),d=t.filter(f=>f.tagId!==e.tagId);ae.useEffect(()=>{n||(l(null),c({}))},[n]);const u=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!u()||!o))try{await i(e.tagId||0,o),r()}catch(g){console.error("Failed to merge tags:",g)}};return n?j.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:j.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[j.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),j.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:j.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",j.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),j.jsxs("form",{onSubmit:h,className:"space-y-4",children:[j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),j.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[j.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&j.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),j.jsxs("div",{className:"space-y-2",children:[j.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),j.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>l(Number(f.target.value)),className:`w-full rounded-md border ${s.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:[j.jsx("option",{value:"",children:"Select target tag"}),d.map(f=>j.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),s.targetTag&&j.jsx("p",{className:"text-sm text-red-600",children:s.targetTag}),j.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),d.length===0&&j.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:j.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),j.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[j.jsx("button",{type:"button",onClick:r,disabled:a,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),j.jsx("button",{type:"submit",disabled:a||d.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:a?"Merging...":"Merge Tags"})]})]})]})}):null}function Mc(e,t){return function(){return e.apply(t,arguments)}}const{toString:JS}=Object.prototype,{getPrototypeOf:Vi}=Object,{iterator:gr,toStringTag:Pc}=Symbol,mr=(e=>t=>{const n=JS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=e=>(e=e.toLowerCase(),t=>mr(t)===e),yr=e=>t=>typeof t===e,{isArray:Gt}=Array,Dt=yr("undefined");function gn(e){return e!==null&&!Dt(e)&&e.constructor!==null&&!Dt(e.constructor)&&Ue(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dc=Ze("ArrayBuffer");function eA(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dc(e.buffer),t}const tA=yr("string"),Ue=yr("function"),Bc=yr("number"),mn=e=>e!==null&&typeof e=="object",nA=e=>e===!0||e===!1,Ln=e=>{if(mr(e)!=="object")return!1;const t=Vi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Pc in e)&&!(gr in e)},rA=e=>{if(!mn(e)||gn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},iA=Ze("Date"),oA=Ze("File"),aA=Ze("Blob"),lA=Ze("FileList"),sA=e=>mn(e)&&Ue(e.pipe),cA=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ue(e.append)&&((t=mr(e))==="formdata"||t==="object"&&Ue(e.toString)&&e.toString()==="[object FormData]"))},uA=Ze("URLSearchParams"),[fA,dA,hA,pA]=["ReadableStream","Request","Response","Headers"].map(Ze),gA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Gt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(gn(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(r=0;r<o;r++)l=a[r],t.call(null,e[l],l,e)}}function Fc(e,t){if(gn(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 yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jc=e=>!Dt(e)&&e!==yt;function hi(){const{caseless:e,skipUndefined:t}=jc(this)&&this||{},n={},r=(i,a)=>{const o=e&&Fc(n,a)||a;Ln(n[o])&&Ln(i)?n[o]=hi(n[o],i):Ln(i)?n[o]=hi({},i):Gt(i)?n[o]=i.slice():(!t||!Dt(i))&&(n[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&yn(arguments[i],r);return n}const mA=(e,t,n,{allOwnKeys:r}={})=>(yn(t,(i,a)=>{n&&Ue(i)?e[a]=Mc(i,n):e[a]=i},{allOwnKeys:r}),e),yA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bA=(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)},vA=(e,t,n,r)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&Vi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},_A=(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},EA=e=>{if(!e)return null;if(Gt(e))return e;let t=e.length;if(!Bc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vi(Uint8Array)),wA=(e,t)=>{const r=(e&&e[gr]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},kA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SA=Ze("HTMLFormElement"),AA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Wa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),NA=Ze("RegExp"),Uc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};yn(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},OA=e=>{Uc(e,(t,n)=>{if(Ue(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ue(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+"'")})}})},TA=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Gt(e)?r(e):r(String(e).split(t)),n},CA=()=>{},RA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function IA(e){return!!(e&&Ue(e.append)&&e[Pc]==="FormData"&&e[gr])}const LA=e=>{const t=new Array(10),n=(r,i)=>{if(mn(r)){if(t.indexOf(r)>=0)return;if(gn(r))return r;if(!("toJSON"in r)){t[i]=r;const a=Gt(r)?[]:{};return yn(r,(o,l)=>{const s=n(o,i+1);!Dt(s)&&(a[l]=s)}),t[i]=void 0,a}}return r};return n(e,0)},MA=Ze("AsyncFunction"),PA=e=>e&&(mn(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),zc=((e,t)=>e?setImmediate:t?((n,r)=>(yt.addEventListener("message",({source:i,data:a})=>{i===yt&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ue(yt.postMessage)),DA=typeof queueMicrotask<"u"?queueMicrotask.bind(yt):typeof process<"u"&&process.nextTick||zc,BA=e=>e!=null&&Ue(e[gr]),Z={isArray:Gt,isArrayBuffer:Dc,isBuffer:gn,isFormData:cA,isArrayBufferView:eA,isString:tA,isNumber:Bc,isBoolean:nA,isObject:mn,isPlainObject:Ln,isEmptyObject:rA,isReadableStream:fA,isRequest:dA,isResponse:hA,isHeaders:pA,isUndefined:Dt,isDate:iA,isFile:oA,isBlob:aA,isRegExp:NA,isFunction:Ue,isStream:sA,isURLSearchParams:uA,isTypedArray:xA,isFileList:lA,forEach:yn,merge:hi,extend:mA,trim:gA,stripBOM:yA,inherits:bA,toFlatObject:vA,kindOf:mr,kindOfTest:Ze,endsWith:_A,toArray:EA,forEachEntry:wA,matchAll:kA,isHTMLForm:SA,hasOwnProperty:Wa,hasOwnProp:Wa,reduceDescriptors:Uc,freezeMethods:OA,toObjectSet:TA,toCamelCase:AA,noop:CA,toFiniteNumber:RA,findKey:Fc,global:yt,isContextDefined:jc,isSpecCompliantForm:IA,toJSONObject:LA,isAsyncFn:MA,isThenable:PA,setImmediate:zc,asap:DA,isIterable:BA};function ye(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)}Z.inherits(ye,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:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const qc=ye.prototype,$c={};["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=>{$c[e]={value:e}});Object.defineProperties(ye,$c);Object.defineProperty(qc,"isAxiosError",{value:!0});ye.from=(e,t,n,r,i,a)=>{const o=Object.create(qc);Z.toFlatObject(e,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const l=e&&e.message?e.message:"Error",s=t==null&&e?e.code:t;return ye.call(o,l,s,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const FA=null;function pi(e){return Z.isPlainObject(e)||Z.isArray(e)}function Hc(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function Va(e,t,n){return e?e.concat(t).map(function(i,a){return i=Hc(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function jA(e){return Z.isArray(e)&&!e.some(pi)}const UA=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function br(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!Z.isUndefined(y[p])});const r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(Z.isDate(g))return g.toISOString();if(Z.isBoolean(g))return g.toString();if(!s&&Z.isBlob(g))throw new ye("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(g)||Z.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,p,y){let m=g;if(g&&!y&&typeof g=="object"){if(Z.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(Z.isArray(g)&&jA(g)||(Z.isFileList(g)||Z.endsWith(p,"[]"))&&(m=Z.toArray(g)))return p=Hc(p),m.forEach(function(_,v){!(Z.isUndefined(_)||_===null)&&t.append(o===!0?Va([p],v,a):o===null?p:p+"[]",c(_))}),!1}return pi(g)?!0:(t.append(Va(y,p,a),c(g)),!1)}const u=[],h=Object.assign(UA,{defaultVisitor:d,convertValue:c,isVisitable:pi});function f(g,p){if(!Z.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));u.push(g),Z.forEach(g,function(m,b){(!(Z.isUndefined(m)||m===null)&&i.call(t,m,Z.isString(b)?b.trim():b,p,h))===!0&&f(m,p?p.concat(b):[b])}),u.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Ya(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Yi(e,t){this._pairs=[],e&&br(e,this,t)}const Gc=Yi.prototype;Gc.append=function(t,n){this._pairs.push([t,n])};Gc.toString=function(t){const n=t?function(r){return t.call(this,r,Ya)}:Ya;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function zA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kc(e,t,n){if(!t)return e;const r=n&&n.encode||zA;Z.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=Z.isURLSearchParams(t)?t.toString():new Yi(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Za{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){Z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qA=typeof URLSearchParams<"u"?URLSearchParams:Yi,$A=typeof FormData<"u"?FormData:null,HA=typeof Blob<"u"?Blob:null,GA={isBrowser:!0,classes:{URLSearchParams:qA,FormData:$A,Blob:HA},protocols:["http","https","file","blob","url","data"]},Zi=typeof window<"u"&&typeof document<"u",gi=typeof navigator=="object"&&navigator||void 0,KA=Zi&&(!gi||["ReactNative","NativeScript","NS"].indexOf(gi.product)<0),WA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",VA=Zi&&window.location.href||"http://localhost",YA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zi,hasStandardBrowserEnv:KA,hasStandardBrowserWebWorkerEnv:WA,navigator:gi,origin:VA},Symbol.toStringTag,{value:"Module"})),Me={...YA,...GA};function ZA(e,t){return br(e,new Me.classes.URLSearchParams,{visitor:function(n,r,i,a){return Me.isNode&&Z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function XA(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QA(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Vc(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),s=a>=n.length;return o=!o&&Z.isArray(i)?i.length:o,s?(Z.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!l):((!i[o]||!Z.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&Z.isArray(i[o])&&(i[o]=QA(i[o])),!l)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(r,i)=>{t(XA(r),i,n,0)}),n}return null}function JA(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const bn={transitional:Wc,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=Z.isObject(t);if(a&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return i?JSON.stringify(Vc(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ZA(t,this.formSerializer).toString();if((l=Z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return br(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),JA(t)):t}],transformResponse:[function(t){const n=this.transitional||bn.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?ye.from(l,ye.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{bn.headers[e]={}});const eN=Z.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"]),tN=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
111
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
112
|
-
`)}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[Xa]=this[Xa]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=tn(o);r[l]||(oN(i,o),r[l]=!0)}return Z.isArray(t)?t.forEach(a):a(t),this}};ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(ze.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Z.freezeMethods(ze);function Hr(e,t){const n=this||bn,r=t||n,i=ze.from(r.headers);let a=r.data;return Z.forEach(e,function(l){a=l.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Yc(e){return!!(e&&e.__CANCEL__)}function Kt(e,t,n){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,n),this.name="CanceledError"}Z.inherits(Kt,ye,{__CANCEL__:!0});function Zc(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function aN(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lN(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(s){const c=Date.now(),d=r[a];o||(o=c),n[i]=s,r[i]=c;let u=a,h=0;for(;u!==i;)h+=n[u++],u=u%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const f=d&&c-d;return f?Math.round(h*1e3/f):void 0}}function sN(e,t){let n=0,r=1e3/t,i,a;const o=(c,d=Date.now())=>{n=d,i=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const d=Date.now(),u=d-n;u>=r?o(c,d):(i=c,a||(a=setTimeout(()=>{a=null,o(i)},r-u)))},()=>i&&o(i)]}const Wn=(e,t,n=3)=>{let r=0;const i=lN(50,250);return sN(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,s=o-r,c=i(s),d=o<=l;r=o;const u={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:c||void 0,estimated:c&&l&&d?(l-o)/c:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(u)},n)},Qa=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ja=e=>(...t)=>Z.asap(()=>e(...t)),cN=Me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Me.origin),Me.navigator&&/(msie|trident)/i.test(Me.navigator.userAgent)):()=>!0,uN=Me.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Z.isString(r)&&l.push(`path=${r}`),Z.isString(i)&&l.push(`domain=${i}`),a===!0&&l.push("secure"),Z.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.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 fN(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dN(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xc(e,t,n){let r=!fN(t);return e&&(r||n==!1)?dN(e,t):t}const el=e=>e instanceof ze?{...e}:e;function Et(e,t){t=t||{};const n={};function r(c,d,u,h){return Z.isPlainObject(c)&&Z.isPlainObject(d)?Z.merge.call({caseless:h},c,d):Z.isPlainObject(d)?Z.merge({},d):Z.isArray(d)?d.slice():d}function i(c,d,u,h){if(Z.isUndefined(d)){if(!Z.isUndefined(c))return r(void 0,c,u,h)}else return r(c,d,u,h)}function a(c,d){if(!Z.isUndefined(d))return r(void 0,d)}function o(c,d){if(Z.isUndefined(d)){if(!Z.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function l(c,d,u){if(u in t)return r(c,d);if(u in e)return r(void 0,c)}const s={url:a,method:a,data:a,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:l,headers:(c,d,u)=>i(el(c),el(d),u,!0)};return Z.forEach(Object.keys({...e,...t}),function(d){const u=s[d]||i,h=u(e[d],t[d],d);Z.isUndefined(h)&&u!==l||(n[d]=h)}),n}const Qc=e=>{const t=Et({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:l}=t;if(t.headers=o=ze.from(o),t.url=Kc(Xc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Z.isFormData(n)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Z.isFunction(n.getHeaders)){const s=n.getHeaders(),c=["content-type","content-length"];Object.entries(s).forEach(([d,u])=>{c.includes(d.toLowerCase())&&o.set(d,u)})}}if(Me.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(t)),r||r!==!1&&cN(t.url))){const s=i&&a&&uN.read(a);s&&o.set(i,s)}return t},hN=typeof XMLHttpRequest<"u",pN=hN&&function(e){return new Promise(function(n,r){const i=Qc(e);let a=i.data;const o=ze.from(i.headers).normalize();let{responseType:l,onUploadProgress:s,onDownloadProgress:c}=i,d,u,h,f,g;function p(){f&&f(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function m(){if(!y)return;const _=ze.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:e,request:y};Zc(function(O){n(O),p()},function(O){r(O),p()},E),y=null}"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(m)},y.onabort=function(){y&&(r(new ye("Request aborted",ye.ECONNABORTED,e,y)),y=null)},y.onerror=function(v){const E=v&&v.message?v.message:"Network Error",k=new ye(E,ye.ERR_NETWORK,e,y);k.event=v||null,r(k),y=null},y.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Wc;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ye(v,E.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,y)),y=null},a===void 0&&o.setContentType(null),"setRequestHeader"in y&&Z.forEach(o.toJSON(),function(v,E){y.setRequestHeader(E,v)}),Z.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),c&&([h,g]=Wn(c,!0),y.addEventListener("progress",h)),s&&y.upload&&([u,f]=Wn(s),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(d=_=>{y&&(r(!_||_.type?new Kt(null,e,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const b=aN(i.url);if(b&&Me.protocols.indexOf(b)===-1){r(new ye("Unsupported protocol "+b+":",ye.ERR_BAD_REQUEST,e));return}y.send(a||null)})},gN=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(c){if(!i){i=!0,l();const d=c instanceof Error?c:this.reason;r.abort(d instanceof ye?d:new Kt(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,a(new ye(`timeout ${t} of ms exceeded`,ye.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:s}=r;return s.unsubscribe=()=>Z.asap(l),s}},mN=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},yN=async function*(e,t){for await(const n of bN(e))yield*mN(n,t)},bN=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()}},tl=(e,t,n,r)=>{const i=yN(e,t);let a=0,o,l=s=>{o||(o=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:c,value:d}=await i.next();if(c){l(),s.close();return}let u=d.byteLength;if(n){let h=a+=u;n(h)}s.enqueue(new Uint8Array(d))}catch(c){throw l(c),c}},cancel(s){return l(s),i.return()}},{highWaterMark:2})},nl=64*1024,{isFunction:Cn}=Z,vN=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:rl,TextEncoder:il}=Z.global,ol=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_N=e=>{e=Z.merge.call({skipUndefined:!0},vN,e);const{fetch:t,Request:n,Response:r}=e,i=t?Cn(t):typeof fetch=="function",a=Cn(n),o=Cn(r);if(!i)return!1;const l=i&&Cn(rl),s=i&&(typeof il=="function"?(g=>p=>g.encode(p))(new il):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=a&&l&&ol(()=>{let g=!1;const p=new n(Me.origin,{body:new rl,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!p}),d=o&&l&&ol(()=>Z.isReadableStream(new r("").body)),u={stream:d&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!u[g]&&(u[g]=(p,y)=>{let m=p&&p[g];if(m)return m.call(p);throw new ye(`Response type '${g}' is not supported`,ye.ERR_NOT_SUPPORT,y)})});const h=async g=>{if(g==null)return 0;if(Z.isBlob(g))return g.size;if(Z.isSpecCompliantForm(g))return(await new n(Me.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(g)||Z.isArrayBuffer(g))return g.byteLength;if(Z.isURLSearchParams(g)&&(g=g+""),Z.isString(g))return(await s(g)).byteLength},f=async(g,p)=>{const y=Z.toFiniteNumber(g.getContentLength());return y??h(p)};return async g=>{let{url:p,method:y,data:m,signal:b,cancelToken:_,timeout:v,onDownloadProgress:E,onUploadProgress:k,responseType:O,headers:T,withCredentials:R="same-origin",fetchOptions:x}=Qc(g),w=t||fetch;O=O?(O+"").toLowerCase():"text";let S=gN([b,_&&_.toAbortSignal()],v),I=null;const L=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let B;try{if(k&&c&&y!=="get"&&y!=="head"&&(B=await f(T,m))!==0){let C=new n(p,{method:"POST",body:m,duplex:"half"}),P;if(Z.isFormData(m)&&(P=C.headers.get("content-type"))&&T.setContentType(P),C.body){const[N,H]=Qa(B,Wn(Ja(k)));m=tl(C.body,nl,N,H)}}Z.isString(R)||(R=R?"include":"omit");const M=a&&"credentials"in n.prototype,F={...x,signal:S,method:y.toUpperCase(),headers:T.normalize().toJSON(),body:m,duplex:"half",credentials:M?R:void 0};I=a&&new n(p,F);let G=await(a?w(I,x):w(p,F));const U=d&&(O==="stream"||O==="response");if(d&&(E||U&&L)){const C={};["status","statusText","headers"].forEach($=>{C[$]=G[$]});const P=Z.toFiniteNumber(G.headers.get("content-length")),[N,H]=E&&Qa(P,Wn(Ja(E),!0))||[];G=new r(tl(G.body,nl,N,()=>{H&&H(),L&&L()}),C)}O=O||"text";let A=await u[Z.findKey(u,O)||"text"](G,g);return!U&&L&&L(),await new Promise((C,P)=>{Zc(C,P,{data:A,headers:ze.from(G.headers),status:G.status,statusText:G.statusText,config:g,request:I})})}catch(M){throw L&&L(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,g,I),{cause:M.cause||M}):ye.from(M,M&&M.code,g,I)}}},EN=new Map,Jc=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,l=o,s,c,d=EN;for(;l--;)s=a[l],c=d.get(s),c===void 0&&d.set(s,c=l?new Map:_N(t)),d=c;return c};Jc();const Xi={http:FA,xhr:pN,fetch:{get:Jc}};Z.forEach(Xi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const al=e=>`- ${e}`,xN=e=>Z.isFunction(e)||e===null||e===!1;function wN(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let l;if(i=r,!xN(r)&&(i=Xi[(l=String(r)).toLowerCase()],i===void 0))throw new ye(`Unknown adapter '${l}'`);if(i&&(Z.isFunction(i)||(i=i.get(t))))break;a[l||"#"+o]=i}if(!i){const o=Object.entries(a).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since :
|
|
113
|
-
`+o.map(
|
|
114
|
-
`):" "+
|
|
115
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Et(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Pn.assertOptions(r,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:Pn.assertOptions(i,{encode:Qe.function,serialize:Qe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pn.assertOptions(n,{baseUrl:Qe.spelling("baseURL"),withXsrfToken:Qe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&Z.merge(a.common,a[n.method]);a&&Z.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=ze.concat(o,a);const l=[];let s=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(s=s&&p.synchronous,l.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let d,u=0,h;if(!s){const g=[ll.bind(this),void 0];for(g.unshift(...l),g.push(...c),h=g.length,d=Promise.resolve(n);u<h;)d=d.then(g[u++],g[u++]);return d}h=l.length;let f=n;for(;u<h;){const g=l[u++],p=l[u++];try{f=g(f)}catch(y){p.call(this,y);break}}try{d=ll.call(this,f)}catch(g){return Promise.reject(g)}for(u=0,h=c.length;u<h;)d=d.then(c[u++],c[u++]);return d}getUri(t){t=Et(this.defaults,t);const n=Xc(t.baseURL,t.url,t.allowAbsoluteUrls);return Kc(n,t.params,t.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(t){vt.prototype[t]=function(n,r){return this.request(Et(r||{},{method:t,url:n,data:(r||{}).data}))}});Z.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,l){return this.request(Et(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}vt.prototype[t]=n(),vt.prototype[t+"Form"]=n(!0)});let SN=class nu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{r.subscribe(l),a=l}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,l){r.reason||(r.reason=new Kt(a,o,l),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 nu(function(i){t=i}),cancel:t}}};function AN(e){return function(n){return e.apply(null,n)}}function NN(e){return Z.isObject(e)&&e.isAxiosError===!0}const mi={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(mi).forEach(([e,t])=>{mi[t]=e});function ru(e){const t=new vt(e),n=Mc(vt.prototype.request,t);return Z.extend(n,vt.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ru(Et(e,i))},n}const Ce=ru(bn);Ce.Axios=vt;Ce.CanceledError=Kt;Ce.CancelToken=SN;Ce.isCancel=Yc;Ce.VERSION=tu;Ce.toFormData=br;Ce.AxiosError=ye;Ce.Cancel=Ce.CanceledError;Ce.all=function(t){return Promise.all(t)};Ce.spread=AN;Ce.isAxiosError=NN;Ce.mergeConfig=Et;Ce.AxiosHeaders=ze;Ce.formToJSON=e=>Vc(Z.isHTMLForm(e)?new FormData(e):e);Ce.getAdapter=eu.getAdapter;Ce.HttpStatusCode=mi;Ce.default=Ce;const{Axios:KO,AxiosError:WO,CanceledError:VO,isCancel:YO,CancelToken:ZO,VERSION:XO,all:QO,Cancel:JO,isAxiosError:eT,spread:tT,toFormData:nT,AxiosHeaders:rT,HttpStatusCode:iT,formToJSON:oT,getAdapter:aT,mergeConfig:lT}=Ce,Je={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`};class iu{constructor(t){this.client=t}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:Je.ARTICLES,params:i});const a=await this.client.get(Je.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",a.data),this.transformArticleDates(a.data)}async filterArticles(t,n,r=1,i=10){const a={page:r,pageSize:i};t&&t.length>0&&(a.roles=t.join(",")),n!==void 0&&(a.parentId=n);const o=await this.client.get(Je.ARTICLES_FILTER,{params:a});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(Je.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:Je.ARTICLES,data:t});const n=await this.client.post(Je.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:Je.ARTICLES,data:t});const n=await this.client.put(Je.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:Je.ARTICLE_BY_ID(t)}),await this.client.delete(Je.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}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 et={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class ou{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:et.CATEGORIES});const t=await this.client.get(et.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(et.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(et.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:et.CATEGORIES,data:t});const n=await this.client.post(et.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:et.CATEGORIES,data:t});const n=await this.client.put(et.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:et.CATEGORY_BY_ID(t)}),await this.client.delete(et.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 Ve={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class au{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ve.TAGS});const t=await this.client.get(Ve.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ve.TAG_BY_ID(t)});const n=await this.client.get(Ve.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ve.TAGS,data:t});const n=await this.client.post(Ve.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ve.TAGS,data:t});const n=await this.client.put(Ve.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ve.TAG_BY_ID(t)}),await this.client.delete(Ve.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ve.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 lu=ae.createContext(void 0);function ON({config:e,children:t}){const n=ae.useMemo(()=>{const r=e.apiClient||Ce.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}}),i=new iu(r),a=new ou(r),o=new au(r);return{config:e,apiClient:r,articleApi:i,categoryApi:a,tagApi:o}},[e]);return j.jsx(lu.Provider,{value:n,children:t})}function _r(){const e=ae.useContext(lu);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function TN(){const{articleApi:e}=_r(),[t,n]=ae.useState(null),[r,i]=ae.useState(!1),[a,o]=ae.useState(null),[l,s]=ae.useState(),c=ae.useCallback(async p=>{i(!0),o(null),s(p);try{let y;p!=null&&p.roles&&p.roles.length>0?y=await e.filterArticles(p.roles,p.categoryId,p.page,p.pageSize):y=await e.listArticles(p==null?void 0:p.categoryId,p==null?void 0:p.page,p==null?void 0:p.pageSize),n(y)}catch(y){const m=y instanceof Error?y:new Error("Failed to fetch articles");throw o(m),m}finally{i(!1)}},[e]),d=ae.useCallback(async p=>{i(!0),o(null);try{return await e.getArticleById(p)}catch(y){const m=y instanceof Error?y:new Error("Failed to fetch article");throw o(m),m}finally{i(!1)}},[e]),u=ae.useCallback(async p=>{i(!0),o(null);try{const y=await e.createArticle(p);return l&&await c(l),y}catch(y){const m=y instanceof Error?y:new Error("Failed to create article");throw o(m),m}finally{i(!1)}},[e,l,c]),h=ae.useCallback(async p=>{i(!0),o(null);try{const y=await e.updateArticle(p);return l&&await c(l),y}catch(y){const m=y instanceof Error?y:new Error("Failed to update article");throw o(m),m}finally{i(!1)}},[e,l,c]),f=ae.useCallback(async p=>{i(!0),o(null);try{await e.deleteArticle(p),l&&await c(l)}catch(y){const m=y instanceof Error?y:new Error("Failed to delete article");throw o(m),m}finally{i(!1)}},[e,l,c]),g=ae.useCallback(async()=>{l&&await c(l)},[l,c]);return{articles:t,loading:r,error:a,fetchArticles:c,getArticleById:d,createArticle:u,updateArticle:h,deleteArticle:f,refresh:g}}function CN(){const{categoryApi:e}=_r(),[t,n]=ae.useState([]),[r,i]=ae.useState(!1),[a,o]=ae.useState(null),[l,s]=ae.useState(),c=ae.useCallback(async p=>{i(!0),o(null),s(p);try{let y;if(p!=null&&p.roles&&p.roles.length>0?y=await e.filterCategories(p.roles,p.parentId):(p==null?void 0:p.parentId)!==void 0?y=await e.filterCategories(void 0,p.parentId):y=await e.listCategories(),p!=null&&p.searchTerm){const m=p.searchTerm.toLowerCase();y=y.filter(b=>b.title.toLowerCase().includes(m))}n(y)}catch(y){const m=y instanceof Error?y:new Error("Failed to fetch categories");throw o(m),m}finally{i(!1)}},[e]),d=ae.useCallback(async p=>{i(!0),o(null);try{return await e.getCategoryById(p)}catch(y){const m=y instanceof Error?y:new Error("Failed to fetch category");throw o(m),m}finally{i(!1)}},[e]),u=ae.useCallback(async p=>{i(!0),o(null);try{const y=await e.createCategory(p);return l!==void 0?await c(l):await c(),y}catch(y){const m=y instanceof Error?y:new Error("Failed to create category");throw o(m),m}finally{i(!1)}},[e,l,c]),h=ae.useCallback(async p=>{i(!0),o(null);try{const y=await e.updateCategory(p);return l!==void 0?await c(l):await c(),y}catch(y){const m=y instanceof Error?y:new Error("Failed to update category");throw o(m),m}finally{i(!1)}},[e,l,c]),f=ae.useCallback(async p=>{i(!0),o(null);try{await e.deleteCategory(p),l!==void 0?await c(l):await c()}catch(y){const m=y instanceof Error?y:new Error("Failed to delete category");throw o(m),m}finally{i(!1)}},[e,l,c]),g=ae.useCallback(async()=>{l!==void 0?await c(l):await c()},[l,c]);return{categories:t,loading:r,error:a,fetchCategories:c,getCategoryById:d,createCategory:u,updateCategory:h,deleteCategory:f,refresh:g}}function RN(){const{tagApi:e}=_r(),[t,n]=ae.useState([]),[r,i]=ae.useState(!1),[a,o]=ae.useState(null),[l,s]=ae.useState(),c=ae.useCallback(async y=>{i(!0),o(null),s(y);try{let m=await e.listTags();if(y!=null&&y.searchTerm){const b=y.searchTerm.toLowerCase();m=m.filter(_=>_.title.toLowerCase().includes(b)||_.slug&&_.slug.toLowerCase().includes(b))}n(m)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch tags");throw o(b),b}finally{i(!1)}},[e]),d=ae.useCallback(async y=>{i(!0),o(null);try{return await e.getTagById(y)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch tag");throw o(b),b}finally{i(!1)}},[e]),u=ae.useCallback(async y=>{i(!0),o(null);try{const m=await e.createTag(y);return l!==void 0?await c(l):await c(),m}catch(m){const b=m instanceof Error?m:new Error("Failed to create tag");throw o(b),b}finally{i(!1)}},[e,l,c]),h=ae.useCallback(async y=>{i(!0),o(null);try{const m=await e.updateTag(y);return l!==void 0?await c(l):await c(),m}catch(m){const b=m instanceof Error?m:new Error("Failed to update tag");throw o(b),b}finally{i(!1)}},[e,l,c]),f=ae.useCallback(async y=>{i(!0),o(null);try{await e.deleteTag(y),l!==void 0?await c(l):await c()}catch(m){const b=m instanceof Error?m:new Error("Failed to delete tag");throw o(b),b}finally{i(!1)}},[e,l,c]),g=ae.useCallback(async(y,m)=>{i(!0),o(null);try{await e.mergeTags(y,m),l!==void 0?await c(l):await c()}catch(b){const _=b instanceof Error?b:new Error("Failed to merge tags");throw o(_),_}finally{i(!1)}},[e,l,c]),p=ae.useCallback(async()=>{l!==void 0?await c(l):await c()},[l,c]);return{tags:t,loading:r,error:a,fetchTags:c,getTagById:d,createTag:u,updateTag:h,deleteTag:f,mergeTags:g,refresh:p}}function cl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function IN(...e){return t=>{let n=!1;const r=e.map(i=>{const a=cl(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():cl(e[i],null)}}}}var LN=Symbol.for("react.lazy"),Vn=_e[" use ".trim().toString()];function MN(e){return typeof e=="object"&&e!==null&&"then"in e}function su(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===LN&&"_payload"in e&&MN(e._payload)}function cu(e){const t=DN(e),n=_e.forwardRef((r,i)=>{let{children:a,...o}=r;su(a)&&typeof Vn=="function"&&(a=Vn(a._payload));const l=_e.Children.toArray(a),s=l.find(FN);if(s){const c=s.props.children,d=l.map(u=>u===s?_e.Children.count(c)>1?_e.Children.only(null):_e.isValidElement(c)?c.props.children:null:u);return j.jsx(t,{...o,ref:i,children:_e.isValidElement(c)?_e.cloneElement(c,void 0,d):null})}return j.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var PN=cu("Slot");function DN(e){const t=_e.forwardRef((n,r)=>{let{children:i,...a}=n;if(su(i)&&typeof Vn=="function"&&(i=Vn(i._payload)),_e.isValidElement(i)){const o=UN(i),l=jN(a,i.props);return i.type!==_e.Fragment&&(l.ref=r?IN(r,o):o),_e.cloneElement(i,l)}return _e.Children.count(i)>1?_e.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BN=Symbol("radix.slottable");function FN(e){return _e.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BN}function jN(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const s=a(...l);return i(...l),s}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function UN(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 uu(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=uu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uu(e))&&(r&&(r+=" "),r+=t);return r}const ul=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fl=fu,du=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],u=a==null?void 0:a[c];if(d===null)return null;const h=ul(d)||ul(u);return i[c][h]}),l=n&&Object.entries(n).reduce((c,d)=>{let[u,h]=d;return h===void 0||(c[u]=h),c},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:h,...f}=d;return Object.entries(f).every(g=>{let[p,y]=g;return Array.isArray(y)?y.includes({...a,...l}[p]):{...a,...l}[p]===y})?[...c,u,h]:c},[]);return fl(e,o,s,n==null?void 0:n.class,n==null?void 0:n.className)},Qi="-",zN=e=>{const t=$N(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Qi);return l[0]===""&&l.length!==1&&l.shift(),hu(l,t)||qN(o)},getConflictingClassGroupIds:(o,l)=>{const s=n[o]||[];return l&&r[o]?[...s,...r[o]]:s}}},hu=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?hu(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Qi);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},dl=/^\[(.+)\]$/,qN=e=>{if(dl.test(e)){const t=dl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$N=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return GN(Object.entries(e.classGroups),n).forEach(([a,o])=>{yi(o,r,a,t)}),r},yi=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:hl(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(HN(i)){yi(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{yi(o,hl(t,a),n,r)})})},hl=(e,t)=>{let n=e;return t.split(Qi).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},HN=e=>e.isThemeGetter,GN=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[n,i]}):e,KN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},pu="!",WN=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=l=>{const s=[];let c=0,d=0,u;for(let y=0;y<l.length;y++){let m=l[y];if(c===0){if(m===i&&(r||l.slice(y,y+a)===t)){s.push(l.slice(d,y)),d=y+a;continue}if(m==="/"){u=y;continue}}m==="["?c++:m==="]"&&c--}const h=s.length===0?l:l.substring(d),f=h.startsWith(pu),g=f?h.substring(1):h,p=u&&u>d?u-d:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:p}};return n?l=>n({className:l,parseClassName:o}):o},VN=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},YN=e=>({cache:KN(e.cacheSize),parseClassName:WN(e),...zN(e)}),ZN=/\s+/,XN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(ZN);let l="";for(let s=o.length-1;s>=0;s-=1){const c=o[s],{modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let g=!!f,p=r(g?h.substring(0,f):h);if(!p){if(!g){l=c+(l.length>0?" "+l:l);continue}if(p=r(h),!p){l=c+(l.length>0?" "+l:l);continue}g=!1}const y=VN(d).join(":"),m=u?y+pu:y,b=m+p;if(a.includes(b))continue;a.push(b);const _=i(p,g);for(let v=0;v<_.length;++v){const E=_[v];a.push(m+E)}l=c+(l.length>0?" "+l:l)}return l};function QN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gu(t))&&(r&&(r+=" "),r+=n);return r}const gu=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gu(e[r]))&&(n&&(n+=" "),n+=t);return n};function JN(e,...t){let n,r,i,a=o;function o(s){const c=t.reduce((d,u)=>u(d),e());return n=YN(c),r=n.cache.get,i=n.cache.set,a=l,l(s)}function l(s){const c=r(s);if(c)return c;const d=XN(s,n);return i(s,d),d}return function(){return a(QN.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},mu=/^\[(?:([a-z-]+):)?(.+)\]$/i,eO=/^\d+\/\d+$/,tO=new Set(["px","full","screen"]),nO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rO=/\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$/,iO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>Lt(e)||tO.has(e)||eO.test(e),ut=e=>Wt(e,"length",pO),Lt=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>Wt(e,"number",Lt),nn=e=>!!e&&Number.isInteger(Number(e)),lO=e=>e.endsWith("%")&&Lt(e.slice(0,-1)),be=e=>mu.test(e),ft=e=>nO.test(e),sO=new Set(["length","size","percentage"]),cO=e=>Wt(e,sO,yu),uO=e=>Wt(e,"position",yu),fO=new Set(["image","url"]),dO=e=>Wt(e,fO,mO),hO=e=>Wt(e,"",gO),rn=()=>!0,Wt=(e,t,n)=>{const r=mu.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pO=e=>rO.test(e)&&!iO.test(e),yu=()=>!1,gO=e=>oO.test(e),mO=e=>aO.test(e),yO=()=>{const e=Oe("colors"),t=Oe("spacing"),n=Oe("blur"),r=Oe("brightness"),i=Oe("borderColor"),a=Oe("borderRadius"),o=Oe("borderSpacing"),l=Oe("borderWidth"),s=Oe("contrast"),c=Oe("grayscale"),d=Oe("hueRotate"),u=Oe("invert"),h=Oe("gap"),f=Oe("gradientColorStops"),g=Oe("gradientColorStopPositions"),p=Oe("inset"),y=Oe("margin"),m=Oe("opacity"),b=Oe("padding"),_=Oe("saturate"),v=Oe("scale"),E=Oe("sepia"),k=Oe("skew"),O=Oe("space"),T=Oe("translate"),R=()=>["auto","contain","none"],x=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto",be,t],S=()=>[be,t],I=()=>["",at,ut],L=()=>["auto",Lt,be],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",be],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[Lt,be];return{cacheSize:500,separator:":",theme:{colors:[rn],spacing:[at,ut],blur:["none","",ft,be],brightness:C(),borderColor:[e],borderRadius:["none","","full",ft,be],borderSpacing:S(),borderWidth:I(),contrast:C(),grayscale:U(),hueRotate:C(),invert:U(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[lO,ut],inset:w(),margin:w(),opacity:C(),padding:S(),saturate:C(),scale:C(),sepia:U(),skew:C(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[ft]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:[...B(),be]}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nn,be]}],basis:[{basis:w()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",nn,be]}],"grid-cols":[{"grid-cols":[rn]}],"col-start-end":[{col:["auto",{span:["full",nn,be]},be]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[rn]}],"row-start-end":[{row:["auto",{span:[nn,be]},be]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[ft]},ft]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ft,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kr]}],"font-family":[{font:[rn]}],"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",be]}],"line-clamp":[{"line-clamp":["none",Lt,Kr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",at,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",at,ut]}],"underline-offset":[{"underline-offset":["auto",at,be]}],"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:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),uO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:M()}],"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:["",...M()]}],"outline-offset":[{"outline-offset":[at,be]}],"outline-w":[{outline:[at,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[at,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ft,hO]}],"shadow-color":[{shadow:[rn]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",ft,be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"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",be]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[nn,be]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],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",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[at,ut,Kr]}],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"]}}},bO=JN(yO);function St(...e){return bO(fu(e))}const vO=du("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"}}),bu=_e.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?PN:"button";return j.jsx(o,{className:St(vO({variant:t,size:n,className:e})),ref:a,...i})});bu.displayName="Button";const vu=_e.forwardRef(({className:e,type:t,...n},r)=>j.jsx("input",{type:t,className:St("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}));vu.displayName="Input";var _O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Er=_O.reduce((e,t)=>{const n=cu(`Primitive.${t}`),r=_e.forwardRef((i,a)=>{const{asChild:o,...l}=i,s=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(s,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),EO="Label",_u=_e.forwardRef((e,t)=>j.jsx(Er.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())}}));_u.displayName=EO;var Eu=_u;const xO=du("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xu=_e.forwardRef(({className:e,...t},n)=>j.jsx(Eu,{ref:n,className:St(xO(),e),...t}));xu.displayName=Eu.displayName;function wO(e,t=[]){let n=[];function r(a,o){const l=_e.createContext(o);l.displayName=a+"Context";const s=n.length;n=[...n,o];const c=u=>{var m;const{scope:h,children:f,...g}=u,p=((m=h==null?void 0:h[e])==null?void 0:m[s])||l,y=_e.useMemo(()=>g,Object.values(g));return j.jsx(p.Provider,{value:y,children:f})};c.displayName=a+"Provider";function d(u,h){var p;const f=((p=h==null?void 0:h[e])==null?void 0:p[s])||l,g=_e.useContext(f);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=n.map(o=>_e.createContext(o));return function(l){const s=(l==null?void 0:l[e])||a;return _e.useMemo(()=>({[`__scope${e}`]:{...l,[e]:s}}),[l,s])}};return i.scopeName=e,[r,kO(i,...t)]}function kO(...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(a){const o=r.reduce((l,{useScope:s,scopeName:c})=>{const u=s(a)[`__scope${c}`];return{...l,...u}},{});return _e.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function SO(e){const t=_e.useRef(e);return _e.useEffect(()=>{t.current=e}),_e.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var bi=globalThis!=null&&globalThis.document?_e.useLayoutEffect:()=>{},vi={exports:{}},Wr={};/**
|
|
118
|
+
*/const Pg=Ac("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 pI({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?_.jsx("div",{className:"rounded-md bg-red-50 p-4",children:_.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:a})}):_.jsx("div",{className:"w-full overflow-x-auto",children:_.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[_.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:_.jsxs("tr",{children:[_.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"}),_.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"}),_.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&&_.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"})]})}),_.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>_.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[_.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:_.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})}),_.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),_.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&&_.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:_.jsxs("div",{className:"flex justify-end gap-2",children:[i&&_.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:_.jsx(Dg,{className:"h-4 w-4"})}),s&&_.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:_.jsx(Pg,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function gI({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=G.useState(""),[l,c]=G.useState(null),[u,d]=G.useState({});G.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(w){console.error("Failed to save category:",w)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return _.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:_.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[_.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),_.jsxs("form",{onSubmit:p,className:"space-y-4",children:[_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),_.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&&_.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),_.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:[_.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>_.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),_.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[_.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"}),_.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 mI({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?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?_.jsx("div",{className:"rounded-md bg-red-50 p-4",children:_.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?_.jsx("div",{className:"flex items-center justify-center p-8",children:_.jsx("div",{className:"text-gray-500",children:l})}):_.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>_.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:[_.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&&_.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)&&_.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&_.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:_.jsx(Dg,{className:"h-4 w-4"})}),o&&_.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:_.jsx(hI,{className:"h-4 w-4"})}),s&&_.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:_.jsx(Pg,{className:"h-4 w-4"})})]})]},c.tagId))})}function bI({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=G.useState(""),[a,l]=G.useState(""),[c,u]=G.useState({});G.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?_.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:_.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[_.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),_.jsxs("form",{onSubmit:f,className:"space-y-4",children:[_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),_.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&&_.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),_.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)"}),_.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),_.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[_.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"}),_.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 yI({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=G.useState(null),[l,c]=G.useState({}),u=t.filter(f=>f.tagId!==e.tagId);G.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?_.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:_.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[_.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),_.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:_.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",_.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),_.jsxs("form",{onSubmit:h,className:"space-y-4",children:[_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),_.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[_.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&_.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),_.jsxs("div",{className:"space-y-2",children:[_.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),_.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:[_.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>_.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&_.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),_.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&_.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:_.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),_.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[_.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"}),_.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 Bg(e,t){return function(){return e.apply(t,arguments)}}const{toString:EI}=Object.prototype,{getPrototypeOf:Sc}=Object,{iterator:mo,toStringTag:Fg}=Symbol,bo=(e=>t=>{const n=EI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Yt=e=>(e=e.toLowerCase(),t=>bo(t)===e),yo=e=>t=>typeof t===e,{isArray:jr}=Array,$r=yo("undefined");function qi(e){return e!==null&&!$r(e)&&e.constructor!==null&&!$r(e.constructor)&&ht(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $g=Yt("ArrayBuffer");function xI(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$g(e.buffer),t}const wI=yo("string"),ht=yo("function"),Ug=yo("number"),zi=e=>e!==null&&typeof e=="object",_I=e=>e===!0||e===!1,Ss=e=>{if(bo(e)!=="object")return!1;const t=Sc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Fg in e)&&!(mo in e)},vI=e=>{if(!zi(e)||qi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},NI=Yt("Date"),kI=Yt("File"),AI=Yt("Blob"),SI=Yt("FileList"),TI=e=>zi(e)&&ht(e.pipe),CI=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ht(e.append)&&((t=bo(e))==="formdata"||t==="object"&&ht(e.toString)&&e.toString()==="[object FormData]"))},OI=Yt("URLSearchParams"),[RI,II,LI,MI]=["ReadableStream","Request","Response","Headers"].map(Yt),DI=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ji(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(qi(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 qg(e,t){if(qi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zg=e=>!$r(e)&&e!==Kn;function Sl(){const{caseless:e,skipUndefined:t}=zg(this)&&this||{},n={},r=(i,s)=>{const o=e&&qg(n,s)||s;Ss(n[o])&&Ss(i)?n[o]=Sl(n[o],i):Ss(i)?n[o]=Sl({},i):jr(i)?n[o]=i.slice():(!t||!$r(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&ji(arguments[i],r);return n}const PI=(e,t,n,{allOwnKeys:r}={})=>(ji(t,(i,s)=>{n&&ht(i)?e[s]=Bg(i,n):e[s]=i},{allOwnKeys:r}),e),BI=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FI=(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)},$I=(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&&Sc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},UI=(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},qI=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Ug(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},zI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Sc(Uint8Array)),jI=(e,t)=>{const r=(e&&e[mo]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},HI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},GI=Yt("HTMLFormElement"),KI=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),VI=Yt("RegExp"),jg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ji(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},WI=e=>{jg(e,(t,n)=>{if(ht(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ht(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+"'")})}})},YI=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},ZI=()=>{},XI=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function QI(e){return!!(e&&ht(e.append)&&e[Fg]==="FormData"&&e[mo])}const JI=e=>{const t=new Array(10),n=(r,i)=>{if(zi(r)){if(t.indexOf(r)>=0)return;if(qi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=jr(r)?[]:{};return ji(r,(o,a)=>{const l=n(o,i+1);!$r(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},eL=Yt("AsyncFunction"),tL=e=>e&&(zi(e)||ht(e))&&ht(e.then)&&ht(e.catch),Hg=((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",ht(Kn.postMessage)),nL=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||Hg,rL=e=>e!=null&&ht(e[mo]),I={isArray:jr,isArrayBuffer:$g,isBuffer:qi,isFormData:CI,isArrayBufferView:xI,isString:wI,isNumber:Ug,isBoolean:_I,isObject:zi,isPlainObject:Ss,isEmptyObject:vI,isReadableStream:RI,isRequest:II,isResponse:LI,isHeaders:MI,isUndefined:$r,isDate:NI,isFile:kI,isBlob:AI,isRegExp:VI,isFunction:ht,isStream:TI,isURLSearchParams:OI,isTypedArray:zI,isFileList:SI,forEach:ji,merge:Sl,extend:PI,trim:DI,stripBOM:BI,inherits:FI,toFlatObject:$I,kindOf:bo,kindOfTest:Yt,endsWith:UI,toArray:qI,forEachEntry:jI,matchAll:HI,isHTMLForm:GI,hasOwnProperty:ef,hasOwnProp:ef,reduceDescriptors:jg,freezeMethods:WI,toObjectSet:YI,toCamelCase:KI,noop:ZI,toFiniteNumber:XI,findKey:qg,global:Kn,isContextDefined:zg,isSpecCompliantForm:QI,toJSONObject:JI,isAsyncFn:eL,isThenable:tL,setImmediate:Hg,asap:nL,isIterable:rL};function ce(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)}I.inherits(ce,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:I.toJSONObject(this.config),code:this.code,status:this.status}}});const Gg=ce.prototype,Kg={};["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=>{Kg[e]={value:e}});Object.defineProperties(ce,Kg);Object.defineProperty(Gg,"isAxiosError",{value:!0});ce.from=(e,t,n,r,i,s)=>{const o=Object.create(Gg);I.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 ce.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 iL=null;function Tl(e){return I.isPlainObject(e)||I.isArray(e)}function Vg(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function tf(e,t,n){return e?e.concat(t).map(function(i,s){return i=Vg(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function sL(e){return I.isArray(e)&&!e.some(Tl)}const oL=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function Eo(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!I.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(I.isDate(p))return p.toISOString();if(I.isBoolean(p))return p.toString();if(!l&&I.isBlob(p))throw new ce("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(p)||I.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(I.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(I.isArray(p)&&sL(p)||(I.isFileList(p)||I.endsWith(m,"[]"))&&(y=I.toArray(p)))return m=Vg(m),y.forEach(function(v,T){!(I.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(oL,{defaultVisitor:u,convertValue:c,isVisitable:Tl});function f(p,m){if(!I.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),I.forEach(p,function(y,w){(!(I.isUndefined(y)||y===null)&&i.call(t,y,I.isString(w)?w.trim():w,m,h))===!0&&f(y,m?m.concat(w):[w])}),d.pop()}}if(!I.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 Tc(e,t){this._pairs=[],e&&Eo(e,this,t)}const Wg=Tc.prototype;Wg.append=function(t,n){this._pairs.push([t,n])};Wg.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 aL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yg(e,t,n){if(!t)return e;const r=n&&n.encode||aL;I.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=I.isURLSearchParams(t)?t.toString():new Tc(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){I.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Zg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lL=typeof URLSearchParams<"u"?URLSearchParams:Tc,cL=typeof FormData<"u"?FormData:null,uL=typeof Blob<"u"?Blob:null,dL={isBrowser:!0,classes:{URLSearchParams:lL,FormData:cL,Blob:uL},protocols:["http","https","file","blob","url","data"]},Cc=typeof window<"u"&&typeof document<"u",Cl=typeof navigator=="object"&&navigator||void 0,fL=Cc&&(!Cl||["ReactNative","NativeScript","NS"].indexOf(Cl.product)<0),hL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pL=Cc&&window.location.href||"http://localhost",gL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Cc,hasStandardBrowserEnv:fL,hasStandardBrowserWebWorkerEnv:hL,navigator:Cl,origin:pL},Symbol.toStringTag,{value:"Module"})),Ye={...gL,...dL};function mL(e,t){return Eo(e,new Ye.classes.URLSearchParams,{visitor:function(n,r,i,s){return Ye.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function bL(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yL(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 Xg(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&&I.isArray(i)?i.length:o,l?(I.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!I.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&I.isArray(i[o])&&(i[o]=yL(i[o])),!a)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,(r,i)=>{t(bL(r),i,n,0)}),n}return null}function EL(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hi={transitional:Zg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=I.isObject(t);if(s&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return i?JSON.stringify(Xg(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.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 mL(t,this.formSerializer).toString();if((a=I.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),EL(t)):t}],transformResponse:[function(t){const n=this.transitional||Hi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.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"?ce.from(a,ce.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:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{Hi.headers[e]={}});const xL=I.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"]),wL=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
119
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&xL[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 ci(e){return e&&String(e).trim().toLowerCase()}function Ts(e){return e===!1||e==null?e:I.isArray(e)?e.map(Ts):String(e)}function _L(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 vL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ba(e,t,n,r,i){if(I.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function NL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kL(e,t){const n=I.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 pt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,c){const u=ci(l);if(!u)throw new Error("header name must be a non-empty string");const d=I.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Ts(a))}const o=(a,l)=>I.forEach(a,(c,u)=>s(c,u,l));if(I.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(I.isString(t)&&(t=t.trim())&&!vL(t))o(wL(t),n);else if(I.isObject(t)&&I.isIterable(t)){let a={},l,c;for(const u of t){if(!I.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?I.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=ci(t),t){const r=I.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return _L(i);if(I.isFunction(n))return n.call(this,i,r);if(I.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ci(t),t){const r=I.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=ci(o),o){const a=I.findKey(r,o);a&&(!n||Ba(r,r[a],a,n))&&(delete r[a],i=!0)}}return I.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 I.forEach(this,(i,s)=>{const o=I.findKey(r,s);if(o){n[o]=Ts(i),delete n[s];return}const a=t?NL(s):String(s).trim();a!==s&&delete n[s],n[a]=Ts(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return I.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&I.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(`
|
|
120
|
+
`)}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=ci(o);r[a]||(kL(i,o),r[a]=!0)}return I.isArray(t)?t.forEach(s):s(t),this}};pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(pt);function Fa(e,t){const n=this||Hi,r=t||n,i=pt.from(r.headers);let s=r.data;return I.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Qg(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}I.inherits(Hr,ce,{__CANCEL__:!0});function Jg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function AL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function SL(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 TL(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 js=(e,t,n=3)=>{let r=0;const i=SL(50,250);return TL(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)=>I.asap(()=>e(...t)),CL=Ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,OL=Ye.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];I.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),I.isString(r)&&a.push(`path=${r}`),I.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),I.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 RL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IL(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function em(e,t,n){let r=!RL(t);return e&&(r||n==!1)?IL(e,t):t}const lf=e=>e instanceof pt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(c,u,d,h){return I.isPlainObject(c)&&I.isPlainObject(u)?I.merge.call({caseless:h},c,u):I.isPlainObject(u)?I.merge({},u):I.isArray(u)?u.slice():u}function i(c,u,d,h){if(I.isUndefined(u)){if(!I.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!I.isUndefined(u))return r(void 0,u)}function o(c,u){if(I.isUndefined(u)){if(!I.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 I.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);I.isUndefined(h)&&d!==a||(n[u]=h)}),n}const tm=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=pt.from(o),t.url=Yg(em(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),I.isFormData(n)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(I.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(Ye.hasStandardBrowserEnv&&(r&&I.isFunction(r)&&(r=r(t)),r||r!==!1&&CL(t.url))){const l=i&&s&&OL.read(s);l&&o.set(i,l)}return t},LL=typeof XMLHttpRequest<"u",ML=LL&&function(e){return new Promise(function(n,r){const i=tm(e);let s=i.data;const o=pt.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=pt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Jg(function(F){n(F),m()},function(F){r(F),m()},O),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new ce("Request aborted",ce.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const O=T&&T.message?T.message:"Network Error",A=new ce(O,ce.ERR_NETWORK,e,b);A.event=T||null,r(A),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||Zg;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new ce(T,O.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&I.forEach(o.toJSON(),function(T,O){b.setRequestHeader(O,T)}),I.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),a&&a!=="json"&&(b.responseType=i.responseType),c&&([h,p]=js(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=js(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 w=AL(i.url);if(w&&Ye.protocols.indexOf(w)===-1){r(new ce("Unsupported protocol "+w+":",ce.ERR_BAD_REQUEST,e));return}b.send(s||null)})},DL=(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 ce?u:new Hr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new ce(`timeout ${t} of ms exceeded`,ce.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=()=>I.asap(a),l}},PL=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},BL=async function*(e,t){for await(const n of FL(e))yield*PL(n,t)},FL=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=BL(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:xs}=I,$L=(({Request:e,Response:t})=>({Request:e,Response:t}))(I.global),{ReadableStream:df,TextEncoder:ff}=I.global,hf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},UL=e=>{e=I.merge.call({skipUndefined:!0},$L,e);const{fetch:t,Request:n,Response:r}=e,i=t?xs(t):typeof fetch=="function",s=xs(n),o=xs(r);if(!i)return!1;const a=i&&xs(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(Ye.origin,{body:new df,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&hf(()=>I.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 ce(`Response type '${p}' is not supported`,ce.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(I.isBlob(p))return p.size;if(I.isSpecCompliantForm(p))return(await new n(Ye.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(I.isArrayBufferView(p)||I.isArrayBuffer(p))return p.byteLength;if(I.isURLSearchParams(p)&&(p=p+""),I.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=I.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:y,signal:w,cancelToken:v,timeout:T,onDownloadProgress:O,onUploadProgress:A,responseType:F,headers:$,withCredentials:B="same-origin",fetchOptions:C}=tm(p),U=t||fetch;F=F?(F+"").toLowerCase():"text";let P=DL([w,v&&v.toAbortSignal()],T),ie=null;const X=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let Z;try{if(A&&c&&b!=="get"&&b!=="head"&&(Z=await f($,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),ae;if(I.isFormData(y)&&(ae=Q.headers.get("content-type"))&&$.setContentType(ae),Q.body){const[N,he]=of(Z,js(af(A)));y=cf(Q.body,uf,N,he)}}I.isString(B)||(B=B?"include":"omit");const L=s&&"credentials"in n.prototype,j={...C,signal:P,method:b.toUpperCase(),headers:$.normalize().toJSON(),body:y,duplex:"half",credentials:L?B:void 0};ie=s&&new n(m,j);let q=await(s?U(ie,C):U(m,j));const W=u&&(F==="stream"||F==="response");if(u&&(O||W&&X)){const Q={};["status","statusText","headers"].forEach(se=>{Q[se]=q[se]});const ae=I.toFiniteNumber(q.headers.get("content-length")),[N,he]=O&&of(ae,js(af(O),!0))||[];q=new r(cf(q.body,uf,N,()=>{he&&he(),X&&X()}),Q)}F=F||"text";let x=await d[I.findKey(d,F)||"text"](q,p);return!W&&X&&X(),await new Promise((Q,ae)=>{Jg(Q,ae,{data:x,headers:pt.from(q.headers),status:q.status,statusText:q.statusText,config:p,request:ie})})}catch(L){throw X&&X(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,p,ie),{cause:L.cause||L}):ce.from(L,L&&L.code,p,ie)}}},qL=new Map,nm=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=qL;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:UL(t)),u=c;return c};nm();const Oc={http:iL,xhr:ML,fetch:{get:nm}};I.forEach(Oc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pf=e=>`- ${e}`,zL=e=>I.isFunction(e)||e===null||e===!1;function jL(e,t){e=I.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,!zL(r)&&(i=Oc[(a=String(r)).toLowerCase()],i===void 0))throw new ce(`Unknown adapter '${a}'`);if(i&&(I.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 :
|
|
121
|
+
`+o.map(pf).join(`
|
|
122
|
+
`):" "+pf(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const rm={getAdapter:jL,adapters:Oc};function $a(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hr(null,e)}function gf(e){return $a(e),e.headers=pt.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),rm.getAdapter(e.adapter||Hi.adapter,e)(e).then(function(r){return $a(e),r.data=Fa.call(e,e.transformResponse,r),r.headers=pt.from(r.headers),r},function(r){return Qg(r)||($a(e),r&&r.response&&(r.response.data=Fa.call(e,e.transformResponse,r.response),r.response.headers=pt.from(r.response.headers))),Promise.reject(r)})}const im="1.13.2",xo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const mf={};xo.transitional=function(t,n,r){function i(s,o){return"[Axios v"+im+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new ce(i(o," has been removed"+(n?" in "+n:"")),ce.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}};xo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function HL(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.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 ce("option "+s+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+s,ce.ERR_BAD_OPTION)}}const Cs={assertOptions:HL,validators:xo},Jt=Cs.validators;let Wn=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+=`
|
|
123
|
+
`+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&&Cs.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:Cs.assertOptions(i,{encode:Jt.function,serialize:Jt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Cs.assertOptions(n,{baseUrl:Jt.spelling("baseURL"),withXsrfToken:Jt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&I.merge(s.common,s[n.method]);s&&I.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=pt.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=em(t.baseURL,t.url,t.allowAbsoluteUrls);return Yg(n,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){Wn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});I.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}))}}Wn.prototype[t]=n(),Wn.prototype[t+"Form"]=n(!0)});let GL=class sm{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 sm(function(i){t=i}),cancel:t}}};function KL(e){return function(n){return e.apply(null,n)}}function VL(e){return I.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 om(e){const t=new Wn(e),n=Bg(Wn.prototype.request,t);return I.extend(n,Wn.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return om(Jn(e,i))},n}const Re=om(Hi);Re.Axios=Wn;Re.CanceledError=Hr;Re.CancelToken=GL;Re.isCancel=Qg;Re.VERSION=im;Re.toFormData=Eo;Re.AxiosError=ce;Re.Cancel=Re.CanceledError;Re.all=function(t){return Promise.all(t)};Re.spread=KL;Re.isAxiosError=VL;Re.mergeConfig=Jn;Re.AxiosHeaders=pt;Re.formToJSON=e=>Xg(I.isHTMLForm(e)?new FormData(e):e);Re.getAdapter=rm.getAdapter;Re.HttpStatusCode=Ol;Re.default=Re;const{Axios:x2,AxiosError:w2,CanceledError:_2,isCancel:v2,CancelToken:N2,VERSION:k2,all:A2,Cancel:S2,isAxiosError:T2,spread:C2,toFormData:O2,AxiosHeaders:R2,HttpStatusCode:I2,formToJSON:L2,getAdapter:M2,mergeConfig:D2}=Re,en={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`};class am{constructor(t){this.client=t}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:en.ARTICLES,params:i});const s=await this.client.get(en.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(en.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(en.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:en.ARTICLES,data:t});const n=await this.client.post(en.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:en.ARTICLES,data:t});const n=await this.client.put(en.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:en.ARTICLE_BY_ID(t)}),await this.client.delete(en.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}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:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class lm{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 $t={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class cm{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:$t.TAGS});const t=await this.client.get($t.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:$t.TAG_BY_ID(t)});const n=await this.client.get($t.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:$t.TAGS,data:t});const n=await this.client.post($t.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:$t.TAGS,data:t});const n=await this.client.put($t.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:$t.TAG_BY_ID(t)}),await this.client.delete($t.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=$t.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 um=G.createContext(void 0);function WL({config:e,children:t}){const n=G.useMemo(()=>{const r=e.apiClient||Re.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}}),i=new am(r),s=new lm(r),o=new cm(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return _.jsx(um.Provider,{value:n,children:t})}function wo(){const e=G.useContext(um);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function YL(){const{articleApi:e}=wo(),[t,n]=G.useState(null),[r,i]=G.useState(!1),[s,o]=G.useState(null),[a,l]=G.useState(),c=G.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=G.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=G.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=G.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=G.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=G.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 ZL(){const{categoryApi:e}=wo(),[t,n]=G.useState([]),[r,i]=G.useState(!1),[s,o]=G.useState(null),[a,l]=G.useState(),c=G.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(w=>w.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=G.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=G.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=G.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=G.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=G.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 XL(){const{tagApi:e}=wo(),[t,n]=G.useState([]),[r,i]=G.useState(!1),[s,o]=G.useState(null),[a,l]=G.useState(),c=G.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const w=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(w)||v.slug&&v.slug.toLowerCase().includes(w))}n(y)}catch(y){const w=y instanceof Error?y:new Error("Failed to fetch tags");throw o(w),w}finally{i(!1)}},[e]),u=G.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const w=y instanceof Error?y:new Error("Failed to fetch tag");throw o(w),w}finally{i(!1)}},[e]),d=G.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 w=y instanceof Error?y:new Error("Failed to create tag");throw o(w),w}finally{i(!1)}},[e,a,c]),h=G.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 w=y instanceof Error?y:new Error("Failed to update tag");throw o(w),w}finally{i(!1)}},[e,a,c]),f=G.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const w=y instanceof Error?y:new Error("Failed to delete tag");throw o(w),w}finally{i(!1)}},[e,a,c]),p=G.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(w){const v=w instanceof Error?w:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=G.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 QL(...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 JL=Symbol.for("react.lazy"),Hs=fe[" use ".trim().toString()];function eM(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JL&&"_payload"in e&&eM(e._payload)}function fm(e){const t=nM(e),n=fe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Hs=="function"&&(s=Hs(s._payload));const a=fe.Children.toArray(s),l=a.find(iM);if(l){const c=l.props.children,u=a.map(d=>d===l?fe.Children.count(c)>1?fe.Children.only(null):fe.isValidElement(c)?c.props.children:null:d);return _.jsx(t,{...o,ref:i,children:fe.isValidElement(c)?fe.cloneElement(c,void 0,u):null})}return _.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var tM=fm("Slot");function nM(e){const t=fe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Hs=="function"&&(i=Hs(i._payload)),fe.isValidElement(i)){const o=oM(i),a=sM(s,i.props);return i.type!==fe.Fragment&&(a.ref=r?QL(r,o):o),fe.cloneElement(i,a)}return fe.Children.count(i)>1?fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rM=Symbol("radix.slottable");function iM(e){return fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rM}function sM(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 oM(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,Ef=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ef(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 Ef(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Rc="-",aM=e=>{const t=cM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Rc);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||lM(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(Rc);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},xf=/^\[(.+)\]$/,lM=e=>{if(xf.test(e)){const t=xf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},cM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return dM(Object.entries(e.classGroups),n).forEach(([s,o])=>{Rl(o,r,s,t)}),r},Rl=(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(uM(i)){Rl(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Rl(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Rc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},uM=e=>e.isThemeGetter,dM=(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,fM=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="!",hM=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},pM=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},gM=e=>({cache:fM(e.cacheSize),parseClassName:hM(e),...aM(e)}),mM=/\s+/,bM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(mM);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=pM(u).join(":"),y=d?b+bm:b,w=y+m;if(s.includes(w))continue;s.push(w);const v=i(m,p);for(let T=0;T<v.length;++T){const O=v[T];s.push(y+O)}a=c+(a.length>0?" "+a:a)}return a};function yM(){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 EM(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=gM(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=bM(l,n);return i(l,u),u}return function(){return s(yM.apply(null,arguments))}}const Ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Em=/^\[(?:([a-z-]+):)?(.+)\]$/i,xM=/^\d+\/\d+$/,wM=new Set(["px","full","screen"]),_M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vM=/\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$/,NM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Rr(e)||wM.has(e)||xM.test(e),Sn=e=>Gr(e,"length",MM),Rr=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Gr(e,"number",Rr),ui=e=>!!e&&Number.isInteger(Number(e)),SM=e=>e.endsWith("%")&&Rr(e.slice(0,-1)),ue=e=>Em.test(e),Tn=e=>_M.test(e),TM=new Set(["length","size","percentage"]),CM=e=>Gr(e,TM,xm),OM=e=>Gr(e,"position",xm),RM=new Set(["image","url"]),IM=e=>Gr(e,RM,PM),LM=e=>Gr(e,"",DM),di=()=>!0,Gr=(e,t,n)=>{const r=Em.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},MM=e=>vM.test(e)&&!NM.test(e),xm=()=>!1,DM=e=>kM.test(e),PM=e=>AM.test(e),BM=()=>{const e=Ce("colors"),t=Ce("spacing"),n=Ce("blur"),r=Ce("brightness"),i=Ce("borderColor"),s=Ce("borderRadius"),o=Ce("borderSpacing"),a=Ce("borderWidth"),l=Ce("contrast"),c=Ce("grayscale"),u=Ce("hueRotate"),d=Ce("invert"),h=Ce("gap"),f=Ce("gradientColorStops"),p=Ce("gradientColorStopPositions"),m=Ce("inset"),b=Ce("margin"),y=Ce("opacity"),w=Ce("padding"),v=Ce("saturate"),T=Ce("scale"),O=Ce("sepia"),A=Ce("skew"),F=Ce("space"),$=Ce("translate"),B=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",ue,t],P=()=>[ue,t],ie=()=>["",bn,Sn],X=()=>["auto",Rr,ue],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",ue],x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Rr,ue];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[bn,Sn],blur:["none","",Tn,ue],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,ue],borderSpacing:P(),borderWidth:ie(),contrast:Q(),grayscale:W(),hueRotate:Q(),invert:W(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[SM,Sn],inset:U(),margin:U(),opacity:Q(),padding:P(),saturate:Q(),scale:Q(),sepia:W(),skew:Q(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),ue]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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",ui,ue]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",ui,ue]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",ui,ue]},ue]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[ui,ue]},ue]}],"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",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,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:[di]}],"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",ue]}],"line-clamp":[{"line-clamp":["none",Rr,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"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,ue]}],"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",ue]}],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",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),OM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",CM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IM]}],"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,ue]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"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,LM]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"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",ue]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ui,ue]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],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",ue]}],"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",ue]}],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"]}}},FM=EM(BM);function cr(...e){return FM(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=fe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?tM:"button";return _.jsx(o,{className:cr($M({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=fe.forwardRef(({className:e,type:t,...n},r)=>_.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 UM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=UM.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=fe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),qM="Label",vm=fe.forwardRef((e,t)=>_.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=qM;var Nm=vm;const zM=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),km=fe.forwardRef(({className:e,...t},n)=>_.jsx(Nm,{ref:n,className:cr(zM(),e),...t}));km.displayName=Nm.displayName;function jM(e,t=[]){let n=[];function r(s,o){const a=fe.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=fe.useMemo(()=>p,Object.values(p));return _.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=fe.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=>fe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return fe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,HM(i,...t)]}function HM(...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 fe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function GM(e){const t=fe.useRef(e);return fe.useEffect(()=>{t.current=e}),fe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Il=globalThis!=null&&globalThis.document?fe.useLayoutEffect:()=>{},Ll={exports:{}},qa={};/**
|
|
116
124
|
* @license React
|
|
117
125
|
* use-sync-external-store-shim.production.js
|
|
118
126
|
*
|
|
@@ -120,7 +128,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),A=M,U=F),G===void 0&&(
|
|
|
120
128
|
*
|
|
121
129
|
* This source code is licensed under the MIT license found in the
|
|
122
130
|
* LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/var
|
|
131
|
+
*/var _f;function KM(){if(_f)return qa;_f=1;var e=G;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 qa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qa}var za={};/**
|
|
124
132
|
* @license React
|
|
125
133
|
* use-sync-external-store-shim.development.js
|
|
126
134
|
*
|
|
@@ -128,5 +136,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),A=M,U=F),G===void 0&&(
|
|
|
128
136
|
*
|
|
129
137
|
* This source code is licensed under the MIT license found in the
|
|
130
138
|
* LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/var
|
|
139
|
+
*/var vf;function VM(){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,w=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&w({inst:y})},[f,m,p]),a(function(){return n(y)&&w({inst:y}),f(function(){n(y)&&w({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=G,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=KM():Ll.exports=VM();var WM=Ll.exports;function YM(){return WM.useSyncExternalStore(ZM,()=>!0,()=>!1)}function ZM(){return()=>{}}var Ic="Avatar",[XM]=jM(Ic),[QM,Am]=XM(Ic),Sm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=fe.useState("idle");return _.jsx(QM,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:_.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Ic;var Tm="AvatarImage",Cm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=JM(r,s),l=GM(c=>{i(c),o.onImageLoadingStatusChange(c)});return Il(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?_.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Rm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=fe.useState(r===void 0);return fe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?_.jsx(_o.span,{...i,ref:t}):null});Rm.displayName=Om;function Nf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function JM(e,{referrerPolicy:t,crossOrigin:n}){const r=YM(),i=fe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=fe.useState(()=>Nf(s,e));return Il(()=>{a(Nf(s,e))},[s,e]),Il(()=>{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 Im=Sm,Lm=Cm,Mm=Rm;const Dm=fe.forwardRef(({className:e,...t},n)=>_.jsx(Im,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Im.displayName;const Pm=fe.forwardRef(({className:e,...t},n)=>_.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=fe.forwardRef(({className:e,...t},n)=>_.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 e2(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 t2(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 n2(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function r2(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function i2(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 s2(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 o2(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function a2(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 l2(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function c2(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}exports.ArticleAPI=am;exports.ArticleEditor=lI;exports.ArticleList=qm;exports.ArticleStatus=Fe;exports.ArticleViewer=uk;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=lm;exports.CategoryList=pI;exports.CategoryModal=gI;exports.Input=_m;exports.Label=km;exports.MarkdownEditor=cI;exports.NNewsProvider=WL;exports.RichTextEditor=Lg;exports.TagAPI=cm;exports.TagList=mI;exports.TagMerge=yI;exports.TagModal=bI;exports.cn=cr;exports.debounce=l2;exports.formatDocument=s2;exports.formatPhone=i2;exports.formatZipCode=o2;exports.throttle=c2;exports.useArticles=YL;exports.useCategories=ZL;exports.useNNews=wo;exports.useTags=XL;exports.validateCNPJ=t2;exports.validateCPF=e2;exports.validateEmail=n2;exports.validatePasswordStrength=a2;exports.validatePhone=r2;
|
|
132
140
|
//# sourceMappingURL=index.cjs.map
|