nnews-react 0.0.7 → 0.0.9
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 +85 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14906 -6767
- package/dist/index.js.map +1 -1
- package/dist/style.css +7 -2
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,78 +1,118 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),$=require("react");require("react-dom");function dc(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 ee=dc($);var me=(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))(me||{});function fc({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:a,showActions:o=!1,emptyMessage:s="No articles found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:s})}):E.jsxs("div",{className:"space-y-4",children:[e.items.map(l=>E.jsx("div",{className:"rounded-lg border border-gray-200 bg-white p-6 shadow-sm hover:shadow-md transition-shadow",children:E.jsxs("div",{className:"flex items-start justify-between",children:[E.jsxs("div",{className:"flex-1",children:[E.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}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[l.dateAt&&E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(l.dateAt).toLocaleDateString()]}),l.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:l.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${l.status===me.Published?"bg-green-100 text-green-800":l.status===me.Draft?"bg-gray-100 text-gray-800":l.status===me.Review?"bg-yellow-100 text-yellow-800":l.status===me.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:me[l.status]})]}),l.tags&&l.tags.length>0&&E.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:l.tags.map(c=>E.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&&E.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:l.roles.map(c=>E.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)&&E.jsxs("div",{className:"ml-4 flex gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"rounded p-2 text-blue-600 hover:bg-blue-50",title:"Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),a&&E.jsx("button",{onClick:()=>a(l),className:"rounded p-2 text-red-600 hover:bg-red-50",title:"Delete",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 pt-4",children:E.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function pc(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mc={};function Ei(e,t){return(mc.jsx?hc:gc).test(e)}const bc=/[ \t\n\f\r]/g;function yc(e){return typeof e=="object"?e.type==="text"?xi(e.value):!1:xi(e)}function xi(e){return e.replace(bc,"")===""}class Qt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Qt.prototype.normal={};Qt.prototype.property={};Qt.prototype.space=void 0;function la(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qt(n,r,t)}function wr(e){return e.toLowerCase()}class Ae{constructor(t,n){this.attribute=n,this.property=t}}Ae.prototype.attribute="";Ae.prototype.booleanish=!1;Ae.prototype.boolean=!1;Ae.prototype.commaOrSpaceSeparated=!1;Ae.prototype.commaSeparated=!1;Ae.prototype.defined=!1;Ae.prototype.mustUseProperty=!1;Ae.prototype.number=!1;Ae.prototype.overloadedBoolean=!1;Ae.prototype.property="";Ae.prototype.spaceSeparated=!1;Ae.prototype.space=void 0;let Ec=0;const J=ft(),he=ft(),_r=ft(),M=ft(),le=ft(),St=ft(),Ce=ft();function ft(){return 2**++Ec}const kr=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:he,commaOrSpaceSeparated:Ce,commaSeparated:St,number:M,overloadedBoolean:_r,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Xn=Object.keys(kr);class $r extends Ae{constructor(t,n,r,i){let a=-1;if(super(t,n),wi(this,"space",i),typeof r=="number")for(;++a<Xn.length;){const o=Xn[a];wi(this,Xn[a],(r&kr[o])===kr[o])}}}$r.prototype.defined=!0;function wi(e,t,n){n&&(e[t]=n)}function Ct(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new $r(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[wr(r)]=r,n[wr(a.attribute)]=r}return new Qt(t,n,e.space)}const ca=Ct({properties:{ariaActiveDescendant:null,ariaAtomic:he,ariaAutoComplete:null,ariaBusy:he,ariaChecked:he,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:he,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:he,ariaFlowTo:le,ariaGrabbed:he,ariaHasPopup:null,ariaHidden:he,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:M,ariaLive:null,ariaModal:he,ariaMultiLine:he,ariaMultiSelectable:he,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:he,ariaReadOnly:he,ariaRelevant:null,ariaRequired:he,ariaRoleDescription:le,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:he,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ua(e,t){return t in e?e[t]:t}function da(e,t){return ua(e,t.toLowerCase())}const xc=Ct({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:St,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:le,autoFocus:J,autoPlay:J,blocking:le,capture:null,charSet:null,checked:J,cite:null,className:le,cols:M,colSpan:null,content:null,contentEditable:he,controls:J,controlsList:le,coords:M|St,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:_r,draggable:he,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:le,height:M,hidden:_r,high:M,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:le,itemRef:le,itemScope:J,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:M,pattern:null,ping:le,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:le,required:J,reversed:J,rows:M,rowSpan:M,sandbox:le,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:he,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:he,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:he,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:da}),wc=Ct({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:Ce,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:le,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:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,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:St,g2:St,glyphName:St,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Ce,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,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:M,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:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ce,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ce,rev:Ce,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ce,requiredFeatures:Ce,requiredFonts:Ce,requiredFormats:Ce,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:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Ce,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ce,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ce,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ua}),fa=Ct({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()}}),pa=Ct({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:da}),ga=Ct({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_c={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"},kc=/[A-Z]/g,_i=/-[a-z]/g,Sc=/^data[-\w.:]+$/i;function Nc(e,t){const n=wr(t);let r=t,i=Ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(_i,Ac);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!_i.test(a)){let o=a.replace(kc,vc);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=$r}return new i(r,t)}function vc(e){return"-"+e.toLowerCase()}function Ac(e){return e.charAt(1).toUpperCase()}const Tc=la([ca,xc,fa,pa,ga],"html"),jr=la([ca,wc,fa,pa,ga],"svg");function Cc(e){return e.join(" ").trim()}var _n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gr={},ki=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Rc=/\n/g,Ic=/^\s*/,Oc=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Mc=/^:\s*/,Lc=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Dc=/^[;\s]*/,Pc=/^\s+|\s+$/g,Fc=`
|
|
2
|
-
`,Si="/",Ni="*",at="",Bc="comment",zc="declaration";function Uc(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 h=g.match(Rc);h&&(n+=h.length);var m=g.lastIndexOf(Fc);r=~m?g.length-m:r+g.length}function a(){var g={line:n,column:r};return function(h){return h.position=new o(g),c(),h}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(g){var h=new Error(t.source+":"+n+":"+r+": "+g);if(h.reason=g,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(g){var h=g.exec(e);if(h){var m=h[0];return i(m),e=e.slice(m.length),h}}function c(){l(Ic)}function u(g){var h;for(g=g||[];h=d();)h!==!1&&g.push(h);return g}function d(){var g=a();if(!(Si!=e.charAt(0)||Ni!=e.charAt(1))){for(var h=2;at!=e.charAt(h)&&(Ni!=e.charAt(h)||Si!=e.charAt(h+1));)++h;if(h+=2,at===e.charAt(h-1))return s("End of comment missing");var m=e.slice(2,h-2);return r+=2,i(m),e=e.slice(h),r+=2,g({type:Bc,comment:m})}}function p(){var g=a(),h=l(Oc);if(h){if(d(),!l(Mc))return s("property missing ':'");var m=l(Lc),b=g({type:zc,property:vi(h[0].replace(ki,at)),value:m?vi(m[0].replace(ki,at)):at});return l(Dc),b}}function f(){var g=[];u(g);for(var h;h=p();)h!==!1&&(g.push(h),u(g));return g}return c(),f()}function vi(e){return e?e.replace(Pc,at):at}var $c=Uc,jc=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.default=Gc;const Hc=jc($c);function Gc(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Hc.default)(e),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:s}=a;i?t(o,s,a):s&&(n=n||{},n[o]=s)}),n}var On={};Object.defineProperty(On,"__esModule",{value:!0});On.camelCase=void 0;var qc=/^--[a-zA-Z0-9_-]+$/,Kc=/-([a-z])/g,Wc=/^[^-]+$/,Vc=/^-(webkit|moz|ms|o|khtml)-/,Yc=/^-(ms)-/,Zc=function(e){return!e||Wc.test(e)||qc.test(e)},Xc=function(e,t){return t.toUpperCase()},Ai=function(e,t){return"".concat(t,"-")},Qc=function(e,t){return t===void 0&&(t={}),Zc(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Yc,Ai):e=e.replace(Vc,Ai),e.replace(Kc,Xc))};On.camelCase=Qc;var Jc=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eu=Jc(Gr),tu=On;function Sr(e,t){var n={};return!e||typeof e!="string"||(0,eu.default)(e,function(r,i){r&&i&&(n[(0,tu.camelCase)(r,t)]=i)}),n}Sr.default=Sr;var nu=Sr;const ru=Hr(nu),ha=ma("end"),qr=ma("start");function ma(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 iu(e){const t=qr(e),n=ha(e);if(t&&n)return{start:t,end:n}}function qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ti(e.position):"start"in e||"end"in e?Ti(e):"line"in e||"column"in e?Nr(e):""}function Nr(e){return Ci(e&&e.line)+":"+Ci(e&&e.column)}function Ti(e){return Nr(e&&e.start)+"-"+Nr(e&&e.end)}function Ci(e){return e&&typeof e=="number"?e:1}class Ee 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 l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=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=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=qt(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}}Ee.prototype.file="";Ee.prototype.name="";Ee.prototype.reason="";Ee.prototype.message="";Ee.prototype.stack="";Ee.prototype.column=void 0;Ee.prototype.line=void 0;Ee.prototype.ancestors=void 0;Ee.prototype.cause=void 0;Ee.prototype.fatal=void 0;Ee.prototype.place=void 0;Ee.prototype.ruleId=void 0;Ee.prototype.source=void 0;const Kr={}.hasOwnProperty,ou=new Map,au=/[A-Z]/g,su=new Set(["table","tbody","thead","tfoot","tr"]),lu=new Set(["td","th"]),ba="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cu(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=bu(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=mu(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"?jr:Tc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ya(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ya(e,t,n){if(t.type==="element")return uu(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return du(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pu(e,t,n);if(t.type==="mdxjsEsm")return fu(e,t);if(t.type==="root")return gu(e,t,n);if(t.type==="text")return hu(e,t)}function uu(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jr,e.schema=i),e.ancestors.push(t);const a=xa(e,t.tagName,!1),o=yu(e,t);let s=Vr(e,t);return su.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!yc(l):!0})),Ea(e,o,a,t),Wr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function du(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)}Vt(e,t.position)}function fu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vt(e,t.position)}function pu(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jr,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:xa(e,t.name,!0),o=Eu(e,t),s=Vr(e,t);return Ea(e,o,a,t),Wr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function gu(e,t,n){const r={};return Wr(r,Vr(e,t)),e.create(t,e.Fragment,r,n)}function hu(e,t){return t.value}function Ea(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mu(e,t,n){return r;function r(i,a,o,s){const c=Array.isArray(o.children)?n:t;return s?c(a,o,s):c(a,o)}}function bu(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=qr(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function yu(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Kr.call(t.properties,i)){const a=xu(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&lu.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Eu(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 s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Vt(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 s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Vt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Vr(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ou;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const s=ya(e,a,o);s!==void 0&&n.push(s)}return n}function xu(e,t,n){const r=Nc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?pc(n):Cc(n)),r.property==="style"){let i=typeof n=="object"?n:wu(e,String(n));return e.stylePropertyNameCase==="css"&&(i=_u(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?_c[r.property]||r.property:r.attribute,n]}}function wu(e,t){try{return ru(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ee("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=ba+"#cannot-parse-style-attribute",i}}function xa(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 s=Ei(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=Ei(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Kr.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Vt(e)}function Vt(e,t){const n=new Ee("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=ba+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _u(e){const t={};let n;for(n in e)Kr.call(e,n)&&(t[ku(n)]=e[n]);return t}function ku(e){let t=e.replace(au,Su);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Su(e){return"-"+e.toLowerCase()}const Qn={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"]},Nu={};function vu(e,t){const n=Nu,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wa(e,r,i)}function wa(e,t,n){if(Au(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 Ri(e.children,t,n)}return Array.isArray(e)?Ri(e,t,n):""}function Ri(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=wa(e[i],t,n);return r.join("")}function Au(e){return!!(e&&typeof e=="object")}const Ii=document.createElement("i");function Yr(e){const t="&"+e+";";Ii.innerHTML=t;const n=Ii.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Re(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 Ie(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Oi={}.hasOwnProperty;function _a(e){const t={};let n=-1;for(;++n<e.length;)Tu(t,e[n]);return t}function Tu(e,t){let n;for(n in t){const i=(Oi.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Oi.call(i,o)||(i[o]=[]);const s=a[o];Cu(i[o],Array.isArray(s)?s:s?[s]:[])}}}function Cu(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Re(e,0,0,r)}function ka(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 De(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _e=rt(/[A-Za-z]/),ye=rt(/[\dA-Za-z]/),Ru=rt(/[#-'*+\--9=?A-Z^-~]/);function kn(e){return e!==null&&(e<32||e===127)}const vr=rt(/\d/),Iu=rt(/[\dA-Fa-f]/),Ou=rt(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function se(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}const Mn=rt(new RegExp("\\p{P}|\\p{S}","u")),ut=rt(/\s/);function rt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&ye(e.charCodeAt(n+1))&&ye(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 s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),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 ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return te(l)?(e.enter(n),s(l)):t(l)}function s(l){return te(l)&&a++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Mu={tokenize:Lu};function Lu(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return K(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const Du={tokenize:Pu},Mi={tokenize:Fu};function Pu(e){const t=this,n=[];let r=0,i,a,o;return s;function s(N){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,c)(N)}return c(N)}function l(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const C=t.events.length;let O=C,k;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){k=t.events[O][1].end;break}b(r);let B=C;for(;B<t.events.length;)t.events[B][1].end={...k},B++;return Re(t.events,O+1,0,t.events.slice(C)),t.events.length=B,c(N)}return s(N)}function c(N){if(r===n.length){if(!i)return p(N);if(i.currentConstruct&&i.currentConstruct.concrete)return g(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mi,u,d)(N)}function u(N){return i&&_(),b(r),p(N)}function d(N){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(N)}function p(N){return t.containerState={},e.attempt(Mi,f,g)(N)}function f(N){return r++,n.push([t.currentConstruct,t.containerState]),p(N)}function g(N){if(N===null){i&&_(),b(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),h(N)}function h(N){if(N===null){m(e.exit("chunkFlow"),!0),b(0),e.consume(N);return}return K(N)?(e.consume(N),m(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(N),h)}function m(N,C){const O=t.sliceStream(N);if(C&&O.push(null),N.previous=a,a&&(a.next=N),a=N,i.defineSkip(N.start),i.write(O),t.parser.lazy[N.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 B=t.events.length;let z=B,I,S;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(I){S=t.events[z][1].end;break}I=!0}for(b(r),k=B;k<t.events.length;)t.events[k][1].end={...S},k++;Re(t.events,z+1,0,t.events.slice(B)),t.events.length=k}}function b(N){let C=n.length;for(;C-- >N;){const O=n[C];t.containerState=O[1],O[0].exit.call(t,e)}n.length=N}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fu(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vt(e){if(e===null||se(e)||ut(e))return 1;if(Mn(e))return 2}function Ln(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 Ar={name:"attention",resolveAll:Bu,tokenize:zu};function Bu(e,t){let n=-1,r,i,a,o,s,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},p={...e[n][1].start};Li(d,-l),Li(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={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:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ie(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ie(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Ie(c,Ln(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ie(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Ie(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Re(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 zu(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vt(r);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const c=e.exit("attentionSequence"),u=vt(l),d=!u||u===2&&i||n.includes(l),p=!i||i===2&&u||n.includes(r);return c._open=!!(a===42?d:d&&(i||!p)),c._close=!!(a===42?p:p&&(u||!d)),t(l)}}function Li(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Uu={name:"autolink",tokenize:$u};function $u(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 _e(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||ye(f)?(r=1,s(f)):c(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||ye(f))&&r++<32?(e.consume(f),s):(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||kn(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):Ru(f)?(e.consume(f),c):n(f)}function u(f){return ye(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):p(f)}function p(f){if((f===45||ye(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const Jt={partial:!0,tokenize:ju};function ju(e,t,n){return r;function r(a){return te(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||K(a)?t(a):n(a)}}const Sa={continuation:{tokenize:Gu},exit:qu,name:"blockQuote",tokenize:Hu};function Hu(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return te(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Gu(e,t,n){const r=this;return i;function i(o){return te(o)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Sa,t,n)(o)}}function qu(e){e.exit("blockQuote")}const Na={name:"characterEscape",tokenize:Ku};function Ku(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 Ou(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const va={name:"characterReference",tokenize:Wu};function Wu(e,t,n){const r=this;let i=0,a,o;return s;function s(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"),a=31,o=ye,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Iu,u):(e.enter("characterReferenceValue"),a=7,o=vr,u(d))}function u(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return o===ye&&!Yr(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),u):n(d)}}const Di={partial:!0,tokenize:Yu},Pi={concrete:!0,name:"codeFenced",tokenize:Vu};function Vu(e,t,n){const r=this,i={partial:!0,tokenize:O};let a=0,o=0,s;return l;function l(k){return c(k)}function c(k){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,s=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===s?(o++,e.consume(k),u):o<3?n(k):(e.exit("codeFencedFenceSequence"),te(k)?ne(e,d,"whitespace")(k):d(k))}function d(k){return k===null||K(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Di,h,C)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||K(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):te(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,f,"whitespace")(k)):k===96&&k===s?n(k):(e.consume(k),p)}function f(k){return k===null||K(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||K(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===s?n(k):(e.consume(k),g)}function h(k){return e.attempt(i,C,m)(k)}function m(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),b}function b(k){return a>0&&te(k)?ne(e,_,"linePrefix",a+1)(k):_(k)}function _(k){return k===null||K(k)?e.check(Di,h,C)(k):(e.enter("codeFlowValue"),N(k))}function N(k){return k===null||K(k)?(e.exit("codeFlowValue"),_(k)):(e.consume(k),N)}function C(k){return e.exit("codeFenced"),t(k)}function O(k,B,z){let I=0;return S;function S(H){return k.enter("lineEnding"),k.consume(H),k.exit("lineEnding"),P}function P(H){return k.enter("codeFencedFence"),te(H)?ne(k,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):R(H)}function R(H){return H===s?(k.enter("codeFencedFenceSequence"),V(H)):z(H)}function V(H){return H===s?(I++,k.consume(H),V):I>=o?(k.exit("codeFencedFenceSequence"),te(H)?ne(k,G,"whitespace")(H):G(H)):z(H)}function G(H){return H===null||K(H)?(k.exit("codeFencedFence"),B(H)):z(H)}}}function Yu(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 Jn={name:"codeIndented",tokenize:Xu},Zu={partial:!0,tokenize:Qu};function Xu(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(c)}function a(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):K(c)?e.attempt(Zu,o,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||K(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Qu(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):K(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):K(o)?i(o):n(o)}}const Ju={name:"codeText",previous:td,resolve:ed,tokenize:nd};function ed(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 td(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nd(e,t,n){let r=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(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?(a=e.enter("codeTextSequence"),i=0,u(d)):K(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||K(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)):(a.type="codeTextData",c(d))}}class rd{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 Aa(e){const t={};let n=-1,r,i,a,o,s,l,c;const u=new rd(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,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,id(u,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.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={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Re(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function id(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 s=o.events,l=[],c={};let u,d,p=-1,f=n,g=0,h=0;const m=[h];for(;f;){for(;e.get(++i)[1]!==f;);a.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;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,m.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const b=s.slice(m[p],m[p+1]),_=a.pop();l.push([_,_+b.length-1]),e.splice(_,2,b)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const od={resolve:sd,tokenize:ld},ad={partial:!0,tokenize:cd};function sd(e){return Aa(e),e}function ld(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):K(s)?e.check(ad,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function cd(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(o){if(o===null||K(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Ta(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(b),e.exit(a),p):b===null||b===32||b===41||kn(b)?n(b):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function p(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(e.exit("chunkString"),e.exit(s),p(b)):b===null||b===60||K(b)?n(b):(e.consume(b),b===92?g:f)}function g(b){return b===60||b===62||b===92?(e.consume(b),f):f(b)}function h(b){return!u&&(b===null||b===41||se(b))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(b)):u<c&&b===40?(e.consume(b),u++,h):b===41?(e.consume(b),u--,h):b===null||b===32||b===40||kn(b)?n(b):(e.consume(b),b===92?m:h)}function m(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function Ca(e,t,n,r,i,a){const o=this;let s=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(a),u}function u(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_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):K(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||K(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!te(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function Ra(e,t,n,r,i,a){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,l):n(p)}function l(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),l(o)):p===null?n(p):K(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===o||p===null||K(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===o||p===92?(e.consume(p),u):u(p)}}function Kt(e,t){let n;return r;function r(i){return K(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):te(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ud={name:"definition",tokenize:fd},dd={partial:!0,tokenize:pd};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 Ca.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=De(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return se(f)?Kt(e,c)(f):c(f)}function c(f){return Ta(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(dd,d,d)(f)}function d(f){return te(f)?ne(e,p,"whitespace")(f):p(f)}function p(f){return f===null||K(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function pd(e,t,n){return r;function r(s){return se(s)?Kt(e,i)(s):n(s)}function i(s){return Ra(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return te(s)?ne(e,o,"whitespace")(s):o(s)}function o(s){return s===null||K(s)?t(s):n(s)}}const gd={name:"hardBreakEscape",tokenize:hd};function hd(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return K(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const md={name:"headingAtx",resolve:bd,tokenize:yd};function bd(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"},Re(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function yd(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||se(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||K(u)?(e.exit("atxHeading"),t(u)):te(u)?ne(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||se(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const Ed=["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"],Fi=["pre","script","style","textarea"],xd={concrete:!0,name:"htmlFlow",resolveTo:kd,tokenize:Sd},wd={partial:!0,tokenize:vd},_d={partial:!0,tokenize:Nd};function kd(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 Sd(e,t,n){const r=this;let i,a,o,s,l;return c;function c(x){return u(x)}function u(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),d}function d(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),a=!0,h):x===63?(e.consume(x),i=3,r.interrupt?t:y):_e(x)?(e.consume(x),o=String.fromCharCode(x),m):n(x)}function p(x){return x===45?(e.consume(x),i=2,f):x===91?(e.consume(x),i=5,s=0,g):_e(x)?(e.consume(x),i=4,r.interrupt?t:y):n(x)}function f(x){return x===45?(e.consume(x),r.interrupt?t:y):n(x)}function g(x){const re="CDATA[";return x===re.charCodeAt(s++)?(e.consume(x),s===re.length?r.interrupt?t:R:g):n(x)}function h(x){return _e(x)?(e.consume(x),o=String.fromCharCode(x),m):n(x)}function m(x){if(x===null||x===47||x===62||se(x)){const re=x===47,ue=o.toLowerCase();return!re&&!a&&Fi.includes(ue)?(i=1,r.interrupt?t(x):R(x)):Ed.includes(o.toLowerCase())?(i=6,re?(e.consume(x),b):r.interrupt?t(x):R(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):a?_(x):N(x))}return x===45||ye(x)?(e.consume(x),o+=String.fromCharCode(x),m):n(x)}function b(x){return x===62?(e.consume(x),r.interrupt?t:R):n(x)}function _(x){return te(x)?(e.consume(x),_):S(x)}function N(x){return x===47?(e.consume(x),S):x===58||x===95||_e(x)?(e.consume(x),C):te(x)?(e.consume(x),N):S(x)}function C(x){return x===45||x===46||x===58||x===95||ye(x)?(e.consume(x),C):O(x)}function O(x){return x===61?(e.consume(x),k):te(x)?(e.consume(x),O):N(x)}function k(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,B):te(x)?(e.consume(x),k):z(x)}function B(x){return x===l?(e.consume(x),l=null,I):x===null||K(x)?n(x):(e.consume(x),B)}function z(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||se(x)?O(x):(e.consume(x),z)}function I(x){return x===47||x===62||te(x)?N(x):n(x)}function S(x){return x===62?(e.consume(x),P):n(x)}function P(x){return x===null||K(x)?R(x):te(x)?(e.consume(x),P):n(x)}function R(x){return x===45&&i===2?(e.consume(x),T):x===60&&i===1?(e.consume(x),D):x===62&&i===4?(e.consume(x),q):x===63&&i===3?(e.consume(x),y):x===93&&i===5?(e.consume(x),j):K(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(wd,X,V)(x)):x===null||K(x)?(e.exit("htmlFlowData"),V(x)):(e.consume(x),R)}function V(x){return e.check(_d,G,X)(x)}function G(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),H}function H(x){return x===null||K(x)?V(x):(e.enter("htmlFlowData"),R(x))}function T(x){return x===45?(e.consume(x),y):R(x)}function D(x){return x===47?(e.consume(x),o="",L):R(x)}function L(x){if(x===62){const re=o.toLowerCase();return Fi.includes(re)?(e.consume(x),q):R(x)}return _e(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),L):R(x)}function j(x){return x===93?(e.consume(x),y):R(x)}function y(x){return x===62?(e.consume(x),q):x===45&&i===2?(e.consume(x),y):R(x)}function q(x){return x===null||K(x)?(e.exit("htmlFlowData"),X(x)):(e.consume(x),q)}function X(x){return e.exit("htmlFlow"),t(x)}}function Nd(e,t,n){const r=this;return i;function i(o){return K(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 vd(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jt,t,n)}}const Ad={name:"htmlText",tokenize:Td};function Td(e,t,n){const r=this;let i,a,o;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),O):y===63?(e.consume(y),N):_e(y)?(e.consume(y),z):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),a=0,g):_e(y)?(e.consume(y),_):n(y)}function u(y){return y===45?(e.consume(y),f):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),p):K(y)?(o=d,D(y)):(e.consume(y),d)}function p(y){return y===45?(e.consume(y),f):d(y)}function f(y){return y===62?T(y):y===45?p(y):d(y)}function g(y){const q="CDATA[";return y===q.charCodeAt(a++)?(e.consume(y),a===q.length?h:g):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),m):K(y)?(o=h,D(y)):(e.consume(y),h)}function m(y){return y===93?(e.consume(y),b):h(y)}function b(y){return y===62?T(y):y===93?(e.consume(y),b):h(y)}function _(y){return y===null||y===62?T(y):K(y)?(o=_,D(y)):(e.consume(y),_)}function N(y){return y===null?n(y):y===63?(e.consume(y),C):K(y)?(o=N,D(y)):(e.consume(y),N)}function C(y){return y===62?T(y):N(y)}function O(y){return _e(y)?(e.consume(y),k):n(y)}function k(y){return y===45||ye(y)?(e.consume(y),k):B(y)}function B(y){return K(y)?(o=B,D(y)):te(y)?(e.consume(y),B):T(y)}function z(y){return y===45||ye(y)?(e.consume(y),z):y===47||y===62||se(y)?I(y):n(y)}function I(y){return y===47?(e.consume(y),T):y===58||y===95||_e(y)?(e.consume(y),S):K(y)?(o=I,D(y)):te(y)?(e.consume(y),I):T(y)}function S(y){return y===45||y===46||y===58||y===95||ye(y)?(e.consume(y),S):P(y)}function P(y){return y===61?(e.consume(y),R):K(y)?(o=P,D(y)):te(y)?(e.consume(y),P):I(y)}function R(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,V):K(y)?(o=R,D(y)):te(y)?(e.consume(y),R):(e.consume(y),G)}function V(y){return y===i?(e.consume(y),i=void 0,H):y===null?n(y):K(y)?(o=V,D(y)):(e.consume(y),V)}function G(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||se(y)?I(y):(e.consume(y),G)}function H(y){return y===47||y===62||se(y)?I(y):n(y)}function T(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function D(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),L}function L(y){return te(y)?ne(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):j(y)}function j(y){return e.enter("htmlTextData"),o(y)}}const Zr={name:"labelEnd",resolveAll:Od,resolveTo:Md,tokenize:Ld},Cd={tokenize:Dd},Rd={tokenize:Pd},Id={tokenize:Fd};function Od(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&&Re(e,0,e.length,n),e}function Md(e,t){let n=e.length,r=0,i,a,o,s;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 l={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}},u={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=Ie(s,e.slice(a+1,a+r+3)),s=Ie(s,[["enter",u,t]]),s=Ie(s,Ln(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Ie(s,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),s=Ie(s,e.slice(o+1)),s=Ie(s,[["exit",l,t]]),Re(e,a,e.length,s),e}function Ld(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 s;function s(p){return a?a._inactive?d(p):(o=r.parser.defined.includes(De(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(Cd,u,o?u:d)(p):p===91?e.attempt(Rd,u,o?c:d)(p):o?u(p):d(p)}function c(p){return e.attempt(Id,u,d)(p)}function u(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function Dd(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return se(d)?Kt(e,a)(d):a(d)}function a(d){return d===41?u(d):Ta(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return se(d)?Kt(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Ra(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return se(d)?Kt(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 Pd(e,t,n){const r=this;return i;function i(s){return Ca.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(De(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function Fd(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 Bd={name:"labelStartImage",resolveAll:Zr.resolveAll,tokenize:zd};function zd(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ud={name:"labelStartLink",resolveAll:Zr.resolveAll,tokenize:$d};function $d(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 er={name:"lineEnding",tokenize:jd};function jd(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const bn={name:"thematicBreak",tokenize:Hd};function Hd(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||K(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),te(c)?ne(e,s,"whitespace")(c):s(c))}}const Se={continuation:{tokenize:Wd},exit:Yd,name:"list",tokenize:Kd},Gd={partial:!0,tokenize:Zd},qd={partial:!0,tokenize:Vd};function Kd(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 s;function s(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:vr(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(bn,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 vr(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(Jt,r.interrupt?n:u,e.attempt(Gd,p,d))}function u(f){return r.containerState.initialBlankLine=!0,a++,p(f)}function d(f){return te(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Wd(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jt,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!te(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(qd,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Se,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Vd(e,t,n){const r=this;return ne(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 Yd(e){e.exit(this.containerState.type)}function Zd(e,t,n){const r=this;return ne(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!te(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Bi={name:"setextUnderline",resolveTo:Xd,tokenize:Qd};function Xd(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 Qd(e,t,n){const r=this;let i;return a;function a(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"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),te(c)?ne(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||K(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Jd={tokenize:ef};function ef(e){const t=this,n=e.attempt(Jt,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(od,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 tf={resolveAll:Oa()},nf=Ia("string"),rf=Ia("text");function Ia(e){return{resolveAll:Oa(e==="text"?of:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(u){return c(u)?a(u):s(u)}function s(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"),a(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Oa(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 of(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,s=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(c===-2)l=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},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 af={42:Se,43:Se,45:Se,48:Se,49:Se,50:Se,51:Se,52:Se,53:Se,54:Se,55:Se,56:Se,57:Se,62:Sa},sf={91:ud},lf={[-2]:Jn,[-1]:Jn,32:Jn},cf={35:md,42:bn,45:[Bi,bn],60:xd,61:Bi,95:bn,96:Pi,126:Pi},uf={38:va,92:Na},df={[-5]:er,[-4]:er,[-3]:er,33:Bd,38:va,42:Ar,60:[Uu,Ad],91:Ud,92:[gd,Na],93:Zr,95:Ar,96:Ju},ff={null:[Ar,tf]},pf={null:[42,95]},gf={null:[]},hf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:pf,contentInitial:sf,disable:gf,document:af,flow:cf,flowInitial:lf,insideSpan:ff,string:uf,text:df},Symbol.toStringTag,{value:"Module"}));function mf(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=[],s=[];const l={attempt:B(O),check:B(k),consume:_,enter:N,exit:C,interrupt:B(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:h,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(P){return o=Ie(o,P),m(),o[o.length-1]!==null?[]:(z(t,0),c.events=Ln(a,c.events,c),c.events)}function p(P,R){return yf(f(P),R)}function f(P){return bf(o,P)}function g(){const{_bufferIndex:P,_index:R,line:V,column:G,offset:H}=r;return{_bufferIndex:P,_index:R,line:V,column:G,offset:H}}function h(P){i[P.line]=P.column,S()}function m(){let P;for(;r._index<o.length;){const R=o[r._index];if(typeof R=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<R.length;)b(R.charCodeAt(r._bufferIndex));else b(R)}}function b(P){u=u(P)}function _(P){K(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,S()):P!==-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=P}function N(P,R){const V=R||{};return V.type=P,V.start=g(),c.events.push(["enter",V,c]),s.push(V),V}function C(P){const R=s.pop();return R.end=g(),c.events.push(["exit",R,c]),R}function O(P,R){z(P,R.from)}function k(P,R){R.restore()}function B(P,R){return V;function V(G,H,T){let D,L,j,y;return Array.isArray(G)?X(G):"tokenize"in G?X([G]):q(G);function q(de){return Fe;function Fe(ke){const Be=ke!==null&&de[ke],ze=ke!==null&&de.null,Xe=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return X(Xe)(ke)}}function X(de){return D=de,L=0,de.length===0?T:x(de[L])}function x(de){return Fe;function Fe(ke){return y=I(),j=de,de.partial||(c.currentConstruct=de),de.name&&c.parser.constructs.disable.null.includes(de.name)?ue():de.tokenize.call(R?Object.assign(Object.create(c),R):c,l,re,ue)(ke)}}function re(de){return P(j,y),H}function ue(de){return y.restore(),++L<D.length?x(D[L]):T}}}function z(P,R){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&Re(c.events,R,c.events.length-R,P.resolve(c.events.slice(R),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function I(){const P=g(),R=c.previous,V=c.currentConstruct,G=c.events.length,H=Array.from(s);return{from:G,restore:T};function T(){r=P,c.previous=R,c.currentConstruct=V,c.events.length=G,s=H,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function bf(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 s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function yf(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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime"),le=require("react"),Mu=require("react-dom");function Pu(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=Pu(le);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 Du({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 Bu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fu=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ju=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uu={};function eo(e,t){return(Uu.jsx?ju:Fu).test(e)}const zu=/[ \t\n\f\r]/g;function qu(e){return typeof e=="object"?e.type==="text"?to(e.value):!1:to(e)}function to(e){return e.replace(zu,"")===""}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 $u=0;const ve=xt(),Re=xt(),Zr=xt(),re=xt(),Ne=xt(),It=xt(),He=xt();function xt(){return 2**++$u}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 Hu=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}),Gu=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()}}),Ku={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"},Wu=/[A-Z]/g,ro=/-[a-z]/g,Vu=/^data[-\w.:]+$/i;function Yu(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"&&Vu.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ro,Xu);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ro.test(a)){let o=a.replace(Wu,Zu);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=_i}return new i(r,t)}function Zu(e){return"-"+e.toLowerCase()}function Xu(e){return e.charAt(1).toUpperCase()}const Qu=yl([bl,Hu,El,xl,wl],"html"),Ei=yl([bl,Gu,El,xl,wl],"svg");function Ju(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,ef=/\n/g,tf=/^\s*/,nf=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rf=/^:\s*/,of=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,af=/^[;\s]*/,lf=/^\s+|\s+$/g,sf=`
|
|
2
|
+
`,oo="/",ao="*",mt="",cf="comment",uf="declaration";function ff(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(ef);p&&(n+=p.length);var y=g.lastIndexOf(sf);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(tf)}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:cf,comment:y})}}function h(){var g=a(),p=s(nf);if(p){if(u(),!s(rf))return l("property missing ':'");var y=s(of),m=g({type:uf,property:lo(p[0].replace(io,mt)),value:y?lo(y[0].replace(io,mt)):mt});return s(af),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(lf,mt):mt}var df=ff,hf=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xi,"__esModule",{value:!0});xi.default=gf;const pf=hf(df);function gf(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,pf.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 mf=/^--[a-zA-Z0-9_-]+$/,yf=/-([a-z])/g,bf=/^[^-]+$/,vf=/^-(webkit|moz|ms|o|khtml)-/,_f=/^-(ms)-/,Ef=function(e){return!e||bf.test(e)||mf.test(e)},xf=function(e,t){return t.toUpperCase()},so=function(e,t){return"".concat(t,"-")},wf=function(e,t){return t===void 0&&(t={}),Ef(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(_f,so):e=e.replace(vf,so),e.replace(yf,xf))};Zn.camelCase=wf;var kf=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sf=kf(xi),Af=Zn;function Qr(e,t){var n={};return!e||typeof e!="string"||(0,Sf.default)(e,function(r,i){r&&i&&(n[(0,Af.camelCase)(r,t)]=i)}),n}Qr.default=Qr;var Nf=Qr;const Of=Yn(Nf),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 Tf(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,Cf=new Map,Rf=/[A-Z]/g,If=new Set(["table","tbody","thead","tfoot","tr"]),Lf=new Set(["td","th"]),Al="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mf(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=qf(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=zf(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:Qu,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 Pf(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Df(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ff(e,t,n);if(t.type==="mdxjsEsm")return Bf(e,t);if(t.type==="root")return jf(e,t,n);if(t.type==="text")return Uf(e,t)}function Pf(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=$f(e,t);let l=Ai(e,t);return If.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!qu(s):!0})),Ol(e,o,a,t),Si(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Df(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 Bf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sn(e,t.position)}function Ff(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=Hf(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 jf(e,t,n){const r={};return Si(r,Ai(e,t)),e.create(t,e.Fragment,r,n)}function Uf(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 zf(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 qf(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 $f(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ki.call(t.properties,i)){const a=Gf(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Lf.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 Hf(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:Cf;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 Gf(e,t,n){const r=Yu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Bu(n):Ju(n)),r.property==="style"){let i=typeof n=="object"?n:Kf(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wf(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ku[r.property]||r.property:r.attribute,n]}}function Kf(e,t){try{return Of(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 Wf(e){const t={};let n;for(n in e)ki.call(e,n)&&(t[Vf(n)]=e[n]);return t}function Vf(e){let t=e.replace(Rf,Yf);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yf(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"]},Zf={};function Xf(e,t){const n=Zf,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(Qf(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 Qf(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;)Jf(t,e[n]);return t}function Jf(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];ed(i[o],Array.isArray(l)?l:l?[l]:[])}}}function ed(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]/),td=ht(/[#-'*+\--9=?A-Z^-~]/);function Dn(e){return e!==null&&(e<32||e===127)}const ei=ht(/\d/),nd=ht(/[\dA-Fa-f]/),rd=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 id={tokenize:od};function od(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 ad={tokenize:ld},go={tokenize:sd};function ld(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 sd(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:cd,tokenize:ud};function cd(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 ud(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 fd={name:"autolink",tokenize:dd};function dd(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):td(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:hd};function hd(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:gd},exit:md,name:"blockQuote",tokenize:pd};function pd(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 gd(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 md(e){e.exit("blockQuote")}const Ml={name:"characterEscape",tokenize:yd};function yd(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 rd(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Pl={name:"characterReference",tokenize:bd};function bd(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=nd,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:_d},bo={concrete:!0,name:"codeFenced",tokenize:vd};function vd(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 _d(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:xd},Ed={partial:!0,tokenize:wd};function xd(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(Ed,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 wd(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 kd={name:"codeText",previous:Ad,resolve:Sd,tokenize:Nd};function Sd(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 Ad(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Nd(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 Od{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 Od(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,Td(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 Td(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 Cd={resolve:Id,tokenize:Ld},Rd={partial:!0,tokenize:Md};function Id(e){return Dl(e),e}function Ld(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(Rd,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 Md(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 Pd={name:"definition",tokenize:Bd},Dd={partial:!0,tokenize:Fd};function Bd(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(Dd,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 Fd(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 jd={name:"hardBreakEscape",tokenize:Ud};function Ud(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 zd={name:"headingAtx",resolve:qd,tokenize:$d};function qd(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 $d(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 Hd=["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"],Gd={concrete:!0,name:"htmlFlow",resolveTo:Vd,tokenize:Yd},Kd={partial:!0,tokenize:Xd},Wd={partial:!0,tokenize:Zd};function Vd(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 Yd(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)):Hd.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(Kd,P,I)(N)):N===null||se(N)?(e.exit("htmlFlowData"),I(N)):(e.consume(N),S)}function I(N){return e.check(Wd,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 Zd(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 Xd(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(hn,t,n)}}const Qd={name:"htmlText",tokenize:Jd};function Jd(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:rh,resolveTo:ih,tokenize:oh},eh={tokenize:ah},th={tokenize:lh},nh={tokenize:sh};function rh(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 ih(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 oh(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(eh,d,o?d:u)(h):h===91?e.attempt(th,d,o?c:u)(h):o?d(h):u(h)}function c(h){return e.attempt(nh,d,u)(h)}function d(h){return t(h)}function u(h){return a._balanced=!0,n(h)}}function ah(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 lh(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 sh(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 ch={name:"labelStartImage",resolveAll:Oi.resolveAll,tokenize:uh};function uh(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 fh={name:"labelStartLink",resolveAll:Oi.resolveAll,tokenize:dh};function dh(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:hh};function hh(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:ph};function ph(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:bh},exit:_h,name:"list",tokenize:yh},gh={partial:!0,tokenize:Eh},mh={partial:!0,tokenize:vh};function yh(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(gh,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 bh(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(mh,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 vh(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 _h(e){e.exit(this.containerState.type)}function Eh(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:xh,tokenize:wh};function xh(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 wh(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 kh={tokenize:Sh};function Sh(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(Cd,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 Ah={resolveAll:zl()},Nh=Ul("string"),Oh=Ul("text");function Ul(e){return{resolveAll:zl(e==="text"?Th: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 Th(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 Ch={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},Rh={91:Pd},Ih={[-2]:kr,[-1]:kr,32:kr},Lh={35:zd,42:Rn,45:[_o,Rn],60:Gd,61:_o,95:Rn,96:bo,126:bo},Mh={38:Pl,92:Ml},Ph={[-5]:Sr,[-4]:Sr,[-3]:Sr,33:ch,38:Pl,42:ti,60:[fd,Qd],91:fh,92:[jd,Ml],93:Oi,95:ti,96:kd},Dh={null:[ti,Ah]},Bh={null:[42,95]},Fh={null:[]},jh=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bh,contentInitial:Rh,disable:Fh,document:Ch,flow:Lh,flowInitial:Ih,insideSpan:Dh,string:Mh,text:Ph},Symbol.toStringTag,{value:"Module"}));function Uh(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 qh(f(w),S)}function f(w){return zh(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 zh(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 qh(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=`
|
|
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 Ef(e){const r={constructs:_a([hf,...(e||{}).extensions||[]]),content:i(Mu),defined:[],document:i(Du),flow:i(Jd),lazy:{},string:i(nf),text:i(rf)};return r;function i(a){return o;function o(s){return mf(r,a,s)}}}function xf(e){for(;!Aa(e););return e}const zi=/[\0\t\n\r]/g;function wf(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const l=[];let c,u,d,p,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(zi.lastIndex=d,c=zi.exec(a),p=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(p),!c){t=a.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(a.slice(d,p)),e+=p-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=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const _f=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kf(e){return e.replace(_f,Sf)}function Sf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return ka(n.slice(a?2:1),a?16:10)}return Yr(n)||e}const Ma={}.hasOwnProperty;function Nf(e,t,n){return typeof t!="string"&&(n=t,t=void 0),vf(n)(xf(Ef(n).document().write(wf()(e,t,!0))))}function vf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(it),autolinkProtocol:I,autolinkEmail:I,atxHeading:a(xe),blockQuote:a(ze),characterEscape:I,characterReference:I,codeFenced:a(Xe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Xe,o),codeText:a(Lt,o),codeTextData:I,data:I,codeFlowValue:I,definition:a(Qe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(mt),hardBreakEscape:a(ie),hardBreakTrailing:a(ie),htmlFlow:a(Oe,o),htmlFlowData:I,htmlText:a(Oe,o),htmlTextData:I,image:a(W),label:o,link:a(it),listItem:a(oe),listItemValue:p,listOrdered:a(ge,d),listUnordered:a(ge),paragraph:a(bt),reference:x,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(Ke),thematicBreak:a(Pt)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:Be,autolinkProtocol:ke,blockQuote:l(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:Fe,codeFenced:l(m),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:S,codeIndented:l(b),codeText:l(H),codeTextData:S,data:S,definition:l(),definitionDestinationString:C,definitionLabelString:_,definitionTitleString:N,emphasis:l(),hardBreakEscape:l(R),hardBreakTrailing:l(R),htmlFlow:l(V),htmlFlowData:S,htmlText:l(G),htmlTextData:S,image:l(D),label:j,labelText:L,lineEnding:P,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:y,resourceTitleString:q,resource:X,setextHeading:l(z),setextHeadingLineSequence:B,setextHeadingText:k,strong:l(),thematicBreak:l()}};La(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let A={type:"root",children:[]};const F={stack:[A],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},U=[];let Y=-1;for(;++Y<w.length;)if(w[Y][1].type==="listOrdered"||w[Y][1].type==="listUnordered")if(w[Y][0]==="enter")U.push(Y);else{const fe=U.pop();Y=i(w,fe,Y)}for(Y=-1;++Y<w.length;){const fe=t[w[Y][0]];Ma.call(fe,w[Y][1].type)&&fe[w[Y][1].type].call(Object.assign({sliceSerialize:w[Y][2].sliceSerialize},F),w[Y][1])}if(F.tokenStack.length>0){const fe=F.tokenStack[F.tokenStack.length-1];(fe[1]||Ui).call(F,void 0,fe[0])}for(A.position={start:Je(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Je(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<t.transforms.length;)A=t.transforms[Y](A)||A;return A}function i(w,A,F){let U=A-1,Y=-1,fe=!1,We,Me,Ft,Bt;for(;++U<=F;){const Te=w[U];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?Y++:Y--,Bt=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(We&&!Bt&&!Y&&!Ft&&(Ft=U),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Y&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Y===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(We){let yt=U;for(Me=void 0;yt--;){const Ve=w[yt];if(Ve[1].type==="lineEnding"||Ve[1].type==="lineEndingBlank"){if(Ve[0]==="exit")continue;Me&&(w[Me][1].type="lineEndingBlank",fe=!0),Ve[1].type="lineEnding",Me=yt}else if(!(Ve[1].type==="linePrefix"||Ve[1].type==="blockQuotePrefix"||Ve[1].type==="blockQuotePrefixWhitespace"||Ve[1].type==="blockQuoteMarker"||Ve[1].type==="listItemIndent"))break}Ft&&(!Me||Ft<Me)&&(We._spread=!0),We.end=Object.assign({},Me?w[Me][1].start:Te[1].end),w.splice(Me||U,0,["exit",We,Te[2]]),U++,F++}if(Te[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};We=yt,w.splice(U,0,["enter",yt,Te[2]]),U++,F++,Ft=void 0,Bt=!0}}}return w[A][1]._spread=fe,F}function a(w,A){return F;function F(U){s.call(this,w(U),U),A&&A.call(this,U)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(w,A,F){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([A,F||void 0]),w.position={start:Je(A.start),end:void 0}}function l(w){return A;function A(F){w&&w.call(this,F),c.call(this,F)}}function c(w,A){const F=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==w.type&&(A?A.call(this,w,U[0]):(U[1]||Ui).call(this,w,U[0]));else throw new Error("Cannot close `"+w.type+"` ("+qt({start:w.start,end:w.end})+"): it’s not open");F.position.end=Je(w.end)}function u(){return vu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function f(){const w=this.resume(),A=this.stack[this.stack.length-1];A.lang=w}function g(){const w=this.resume(),A=this.stack[this.stack.length-1];A.meta=w}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/(\r?\n|\r)$/g,"")}function _(w){const A=this.resume(),F=this.stack[this.stack.length-1];F.label=A,F.identifier=De(this.sliceSerialize(w)).toLowerCase()}function N(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function C(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function O(w){const A=this.stack[this.stack.length-1];if(!A.depth){const F=this.sliceSerialize(w).length;A.depth=F}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function B(w){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function I(w){const F=this.stack[this.stack.length-1].children;let U=F[F.length-1];(!U||U.type!=="text")&&(U=Dt(),U.position={start:Je(w.start),end:void 0},F.push(U)),this.stack.push(U)}function S(w){const A=this.stack.pop();A.value+=this.sliceSerialize(w),A.position.end=Je(w.end)}function P(w){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=A.children[A.children.length-1];F.position.end=Je(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(I.call(this,w),S.call(this,w))}function R(){this.data.atHardBreak=!0}function V(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function G(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function H(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function T(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function D(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function L(w){const A=this.sliceSerialize(w),F=this.stack[this.stack.length-2];F.label=kf(A),F.identifier=De(A).toLowerCase()}function j(){const w=this.stack[this.stack.length-1],A=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const U=w.children;F.children=U}else F.alt=A}function y(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function q(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function X(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function re(w){const A=this.resume(),F=this.stack[this.stack.length-1];F.label=A,F.identifier=De(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function ue(w){this.data.characterReferenceType=w.type}function de(w){const A=this.sliceSerialize(w),F=this.data.characterReferenceType;let U;F?(U=ka(A,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=Yr(A);const Y=this.stack[this.stack.length-1];Y.value+=U}function Fe(w){const A=this.stack.pop();A.position.end=Je(w.end)}function ke(w){S.call(this,w);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(w)}function Be(w){S.call(this,w);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(w)}function ze(){return{type:"blockquote",children:[]}}function Xe(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function ie(){return{type:"break"}}function Oe(){return{type:"html",value:""}}function W(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function ge(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function oe(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function bt(){return{type:"paragraph",children:[]}}function Ke(){return{type:"strong",children:[]}}function Dt(){return{type:"text",value:""}}function Pt(){return{type:"thematicBreak"}}}function Je(e){return{line:e.line,column:e.column,offset:e.offset}}function La(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?La(e,r):Af(e,r)}}function Af(e,t){let n;for(n in t)if(Ma.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 Ui(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qt({start:t.start,end:t.end})+") is still open")}function Tf(e){const t=this;t.parser=n;function n(r){return Nf(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cf(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 Rf(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 a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function
|
|
7
|
-
`}),
|
|
8
|
-
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function
|
|
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(a)}i=a===-2,r.push(o)}return r.join("")}function $h(e){const r={constructs:Rl([jh,...(e||{}).extensions||[]]),content:i(id),defined:[],document:i(ad),flow:i(kh),lazy:{},string:i(Nh),text:i(Oh)};return r;function i(a){return o;function o(l){return Uh(r,a,l)}}}function Hh(e){for(;!Dl(e););return e}const Eo=/[\0\t\n\r]/g;function Gh(){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 Kh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wh(e){return e.replace(Kh,Vh)}function Vh(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 Yh(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Zh(n)(Hh($h(n).document().write(Gh()(e,t,!0))))}function Zh(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 ae=-1;for(;++ae<z.length;)if(z[ae][1].type==="listOrdered"||z[ae][1].type==="listUnordered")if(z[ae][0]==="enter")oe.push(ae);else{const ke=oe.pop();ae=i(z,ke,ae)}for(ae=-1;++ae<z.length;){const ke=t[z[ae][0]];ql.call(ke,z[ae][1].type)&&ke[z[ae][1].type].call(Object.assign({sliceSerialize:z[ae][2].sliceSerialize},J),z[ae][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})},ae=-1;++ae<t.transforms.length;)Y=t.transforms[ae](Y)||Y;return Y}function i(z,Y,J){let oe=Y-1,ae=-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"?ae++:ae--,Yt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(it&&!Yt&&!ae&&!Vt&&(Vt=oe),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!ae&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||ae===-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 Xf(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=Wh(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 ae=this.stack[this.stack.length-1];ae.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):Xh(e,r)}}function Xh(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 Qh(e){const t=this;t.parser=n;function n(r){return Yh(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Jh(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 ep(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function tp(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 a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function np(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rp(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ip(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ft(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)}function op(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 ap(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Hl(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),a=i[0];a&&a.type==="text"?a.value="["+a.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 lp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hl(e,t);const i={src:Ft(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function sp(e,t){const n={src:Ft(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 cp(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 up(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hl(e,t);const i={href:Ft(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function fp(e,t){const n={href:Ft(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 dp(e,t,n){const r=e.all(t),i=n?hp(n):Gl(t),a={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?o.push(...d.children):o.push(d)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function hp(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=Gl(n[r])}return t}function Gl(e){const t=e.spread;return t??e.children.length>1}function pp(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 a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function gp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function yp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bp(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)},l=wi(t.children[1]),s=kl(t.children[t.children.length-1]);l&&s&&(o.position={start:l,end:s}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function vp(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let s=-1;const c=[];for(;++s<l;){const u=t.children[s],h={},f=o?o[s]:void 0;f&&(h.align=f);let g={type:"element",tagName:a,properties:h,children:[]};u&&(g.children=e.all(u),e.patch(u,g),g=e.applyData(u,g)),c.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function _p(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wo=9,ko=32;function Ep(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(So(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(So(t.slice(i),i>0,!1)),a.join("")}function So(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===wo||a===ko;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===wo||a===ko;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xp(e,t){const n={type:"text",value:Ep(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wp(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const kp={blockquote:Jh,break:ep,code:tp,delete:np,emphasis:rp,footnoteReference:ip,heading:op,html:ap,imageReference:lp,image:sp,inlineCode:cp,linkReference:up,link:fp,listItem:dp,list:pp,paragraph:gp,root:mp,strong:yp,table:bp,tableCell:_p,tableRow:vp,text:xp,thematicBreak:wp,toml:vn,yaml:vn,definition:vn,footnoteDefinition:vn};function vn(){}const Kl=-1,Jn=0,ln=1,Bn=2,Ti=3,Ci=4,Ri=5,Ii=6,Wl=7,Vl=8,Ao=typeof self=="object"?self:globalThis,Sp=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Jn:case Kl:return n(o,i);case ln:{const l=n([],i);for(const s of o)l.push(r(s));return l}case Bn:{const l=n({},i);for(const[s,c]of o)l[r(s)]=r(c);return l}case Ti:return n(new Date(o),i);case Ci:{const{source:l,flags:s}=o;return n(new RegExp(l,s),i)}case Ri:{const l=n(new Map,i);for(const[s,c]of o)l.set(r(s),r(c));return l}case Ii:{const l=n(new Set,i);for(const s of o)l.add(r(s));return l}case Wl:{const{name:l,message:s}=o;return n(new Ao[l](s),i)}case Vl: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:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new Ao[a](o),i)};return r},No=e=>Sp(new Map,e)(0),Nt="",{toString:Ap}={},{keys:Np}=Object,Xt=e=>{const t=typeof e;if(t!=="object"||!e)return[Jn,t];const n=Ap.call(e).slice(8,-1);switch(n){case"Array":return[ln,Nt];case"Object":return[Bn,Nt];case"Date":return[Ti,Nt];case"RegExp":return[Ci,Nt];case"Map":return[Ri,Nt];case"Set":return[Ii,Nt];case"DataView":return[ln,n]}return n.includes("Array")?[ln,n]:n.includes("Error")?[Wl,n]:[Bn,n]},_n=([e,t])=>e===Jn&&(t==="function"||t==="symbol"),Op=(e,t,n,r)=>{const i=(o,l)=>{const s=r.push(o)-1;return n.set(l,s),s},a=o=>{if(n.has(o))return n.get(o);let[l,s]=Xt(o);switch(l){case Jn:{let d=o;switch(s){case"bigint":l=Vl,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);d=null;break;case"undefined":return i([Kl],o)}return i([l,d],o)}case ln:{if(s){let h=o;return s==="DataView"?h=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(o)),i([s,[...h]],o)}const d=[],u=i([l,d],o);for(const h of o)d.push(a(h));return u}case Bn:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const d=[],u=i([l,d],o);for(const h of Np(o))(e||!_n(Xt(o[h])))&&d.push([a(h),a(o[h])]);return u}case Ti:return i([l,o.toISOString()],o);case Ci:{const{source:d,flags:u}=o;return i([l,{source:d,flags:u}],o)}case Ri:{const d=[],u=i([l,d],o);for(const[h,f]of o)(e||!(_n(Xt(h))||_n(Xt(f))))&&d.push([a(h),a(f)]);return u}case Ii:{const d=[],u=i([l,d],o);for(const h of o)(e||!_n(Xt(h)))&&d.push(a(h));return u}}const{message:c}=o;return i([l,{name:s,message:c}],o)};return a},Oo=(e,{json:t,lossy:n}={})=>{const r=[];return Op(!(t||n),!!t,new Map,r)(e),r},Fn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?No(Oo(e,t)):structuredClone(e):(e,t)=>No(Oo(e,t));function Tp(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 Cp(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Tp,r=e.options.footnoteBackLabel||Cp,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[s]);if(!c)continue;const d=e.all(c),u=String(c.identifier).toUpperCase(),h=Ft(u.toLowerCase());let f=0;const g=[],p=e.footnoteCounts.get(u);for(;p!==void 0&&++f<=p;){g.length>0&&g.push({type:"text",value:" "});let b=typeof n=="string"?n:n(s,f);typeof b=="string"&&(b={type:"text",value:b}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,f),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const b=y.children[y.children.length-1];b&&b.type==="text"?b.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...g)}else d.push(...g);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,m),l.push(m)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Fn(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
10
|
+
`}]}}const Yl=function(e){if(e==null)return Pp;if(typeof e=="function")return er(e);if(typeof e=="object")return Array.isArray(e)?Ip(e):Lp(e);if(typeof e=="string")return Mp(e);throw new Error("Expected function, string, or object as test")};function Ip(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yl(e[n]);return er(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Lp(e){const t=e;return er(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Mp(e){return er(t);function t(n){return n&&n.type===e}}function er(e){return t;function t(n,r,i){return!!(Dp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Pp(){return!0}function Dp(e){return e!==null&&typeof e=="object"&&"type"in e}const Zl=[],Bp=!0,To=!1,Fp="skip";function jp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Yl(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=Zl,g,p,y;if((!t||a(s,c,d[d.length-1]||void 0))&&(f=Up(n(s,d)),f[0]===To))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==Fp)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]===To)return g;p=typeof g[1]=="number"?g[1]:p+o}}return f}}}function Up(e){return Array.isArray(e)?e:typeof e=="number"?[Bp,e]:e==null?Zl:[e]}function zp(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),jp(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 ni={}.hasOwnProperty,qp={};function $p(e,t){const n=t||qp,r=new Map,i=new Map,a=new Map,o={...kp,...n.handlers},l={all:c,applyData:Gp,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:s,options:n,patch:Hp,wrap:Wp};return zp(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const u=d.type==="definition"?r:i,h=String(d.identifier).toUpperCase();u.has(h)||u.set(h,d)}}),l;function s(d,u){const h=d.type,f=l.handlers[h];if(ni.call(l.handlers,h)&&f)return f(l,d,u);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in d){const{children:p,...y}=d,m=Fn(y);return m.children=l.all(d),m}return Fn(d)}return(l.options.unknownHandler||Kp)(l,d,u)}function c(d){const u=[];if("children"in d){const h=d.children;let f=-1;for(;++f<h.length;){const g=l.one(h[f],d);if(g){if(f&&h[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Co(g.value)),!Array.isArray(g)&&g.type==="element")){const p=g.children[0];p&&p.type==="text"&&(p.value=Co(p.value))}Array.isArray(g)?u.push(...g):u.push(g)}}}return u}}function Hp(e,t){e.position&&(t.position=Tf(e))}function Gp(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=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"&&a&&Object.assign(n.properties,Fn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Kp(e,t){const n=t.data||{},r="value"in t&&!(ni.call(n,"hProperties")||ni.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 Wp(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 Sp(e,t){return e&&"run"in e?async function(n,r){const i=Yi(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Yi(n,{file:r,...e||t})}}function Zi(e){if(e)throw e}var yn=Object.prototype.hasOwnProperty,ja=Object.prototype.toString,Xi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Ji=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ja.call(t)==="[object Array]"},eo=function(t){if(!t||ja.call(t)!=="[object Object]")return!1;var n=yn.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&yn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||yn.call(t,i)},to=function(t,n){Xi&&n.name==="__proto__"?Xi(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},no=function(t,n){if(n==="__proto__")if(yn.call(t,n)){if(Qi)return Qi(t,n).value}else return;return t[n]},Np=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=no(s,n),i=no(t,n),s!==i&&(u&&i&&(eo(i)||(a=Ji(i)))?(a?(a=!1,o=r&&Ji(r)?r:[]):o=r&&eo(r)?r:{},to(s,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&to(s,{name:n,newValue:i}));return s};const tr=Hr(Np);function Cr(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 vp(){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);s(null,...i);function s(l,...c){const u=e[++a];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?Ap(u,s)(...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 Ap(e,t){let n;return r;function r(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const Ge={basename:Tp,dirname:Cp,extname:Rp,join:Ip,sep:"/"};function Tp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');en(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,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Cp(e){if(en(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 Rp(e){en(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===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 Ip(...e){let t=-1,n;for(;++t<e.length;)en(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Op(n)}function Op(e){en(e);const t=e.codePointAt(0)===47;let n=Mp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Mp(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===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(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,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 s===46&&a>-1?a++:a=-1}return n}function en(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Lp={cwd:Dp};function Dp(){return"/"}function Rr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Pp(e){if(typeof e=="string")e=new URL(e);else if(!Rr(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 Fp(e)}function Fp(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 Ha{constructor(t){let n;t?Rr(t)?n={path:t}:typeof t=="string"||Bp(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Lp.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"?Ge.basename(this.path):void 0}set basename(t){ir(t,"basename"),rr(t,"basename"),this.path=Ge.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ge.dirname(this.path):void 0}set dirname(t){ro(this.basename,"dirname"),this.path=Ge.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ge.extname(this.path):void 0}set extname(t){if(rr(t,"extname"),ro(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=Ge.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Rr(t)&&(t=Pp(t)),ir(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ge.basename(this.path,this.extname):void 0}set stem(t){ir(t,"stem"),rr(t,"stem"),this.path=Ge.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 Ee(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 rr(e,t){if(e&&e.includes(Ge.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ge.sep+"`")}function ir(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ro(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Bp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zp=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},Up={}.hasOwnProperty;class ti extends zp{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=vp()}copy(){const t=new ti;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(tr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sr("data",this.frozen),this.namespace[t]=n,this):Up.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sr("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=ln(t),r=this.parser||this.Parser;return or("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),or("process",this.parser||this.Parser),ar("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=ln(t),l=r.parse(s);r.run(l,s,function(u,d,p){if(u||!d||!p)return c(u);const f=d,g=r.stringify(f,p);Hp(g)?p.value=g:p.result=g,c(u,p)});function c(u,d){u||!d?o(u):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),or("processSync",this.parser||this.Parser),ar("processSync",this.compiler||this.Compiler),this.process(t,i),oo("processSync","process",n),r;function i(a,o){n=!0,Zi(a),r=o}}run(t,n,r){io(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,s){const l=ln(n);i.run(t,l,c);function c(u,d,p){const f=d||t;u?s(u):o?o(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),oo("runSync","run",r),i;function a(o,s){Zi(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=ln(n),i=this.compiler||this.Compiler;return ar("stringify",i),io(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(sr("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(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");s(c.plugins),c.settings&&(i.settings=tr(!0,i.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[f,...g]=u;const h=r[p][1];Cr(h)&&Cr(f)&&(f=tr(!0,h,f)),r[p]=[c,f,...g]}}}}const $p=new ti().freeze();function or(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ar(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sr(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 io(e){if(!Cr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ln(e){return jp(e)?e:new Ha(e)}function jp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hp(e){return typeof e=="string"||Gp(e)}function Gp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ga=function(e){if(e==null)return Vp;if(typeof e=="function")return Fn(e);if(typeof e=="object")return Array.isArray(e)?qp(e):Kp(e);if(typeof e=="string")return Wp(e);throw new Error("Expected function, string, or object as test")};function qp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ga(e[n]);return Fn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Kp(e){const t=e;return Fn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Wp(e){return Fn(t);function t(n){return n&&n.type===e}}function Fn(e){return t;function t(n,r,i){return!!(Yp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Vp(){return!0}function Yp(e){return e!==null&&typeof e=="object"&&"type"in e}const qa=[],Zp=!0,ao=!1,Xp="skip";function Qp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ga(i),o=r?-1:1;s(e,void 0,[])();function s(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(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=qa,g,h,m;if((!t||a(l,c,u[u.length-1]||void 0))&&(f=Jp(n(l,u)),f[0]===ao))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==Xp)for(h=(r?b.children.length:-1)+o,m=u.concat(b);h>-1&&h<b.children.length;){const _=b.children[h];if(g=s(_,h,m)(),g[0]===ao)return g;h=typeof g[1]=="number"?g[1]:h+o}}return f}}}function Jp(e){return Array.isArray(e)?e:typeof e=="number"?[Zp,e]:e==null?qa:[e]}function eg(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),Qp(e,a,s,i);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const tg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",so=[],lo={allowDangerousHtml:!0},ng=/^(https?|ircs?|mailto|xmpp)$/i,rg=[{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 Ka(e){const t=ig(e),n=og(e);return ag(t.runSync(t.parse(n),n),e)}function ig(e){const t=e.rehypePlugins||so,n=e.remarkPlugins||so,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lo}:lo;return $p().use(Tf).use(n).use(Sp,r).use(t)}function og(e){const t=e.children||"",n=new Ha;return typeof t=="string"&&(n.value=t),n}function ag(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||sg;for(const u of rg)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+tg+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),eg(e,c),cu(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,p){if(u.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in Qn)if(Object.hasOwn(Qn,f)&&Object.hasOwn(u.properties,f)){const g=u.properties[f],h=Qn[f];(h===null||h.includes(u.tagName))&&(u.properties[f]=l(String(g||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):a?a.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,p)),f&&p&&typeof d=="number")return s&&u.children?p.children.splice(d,1,...u.children):p.children.splice(d,1),d}}}function sg(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 co(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 ni=function(e){if(e==null)return fg;if(typeof e=="function")return Bn(e);if(typeof e=="object")return Array.isArray(e)?cg(e):ug(e);if(typeof e=="string")return dg(e);throw new Error("Expected function, string, or object as test")};function cg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ni(e[n]);return Bn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function ug(e){const t=e;return Bn(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 Bn(t);function t(n){return n&&n.type===e}}function Bn(e){return t;function t(n,r,i){return!!(pg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function fg(){return!0}function pg(e){return e!==null&&typeof e=="object"&&"type"in e}const Wa=[],gg=!0,uo=!1,hg="skip";function mg(e,t,n,r){let i;i=t;const a=ni(i),o=1;s(e,void 0,[])();function s(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(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Wa,g,h,m;if(a(l,c,u[u.length-1]||void 0)&&(f=bg(n(l,u)),f[0]===uo))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==hg)for(h=-1+o,m=u.concat(b);h>-1&&h<b.children.length;){const _=b.children[h];if(g=s(_,h,m)(),g[0]===uo)return g;h=typeof g[1]=="number"?g[1]:h+o}}return f}}}function bg(e){return Array.isArray(e)?e:typeof e=="number"?[gg,e]:e==null?Wa:[e]}function yg(e,t,n){const i=ni((n||{}).ignore||[]),a=Eg(t);let o=-1;for(;++o<a.length;)mg(e,"text",s);function s(c,u){let d=-1,p;for(;++d<u.length;){const f=u[d],g=p?p.children:void 0;if(i(f,g?g.indexOf(f):void 0,p))return;p=f}if(p)return l(c,u)}function l(c,u){const d=u[u.length-1],p=a[o][0],f=a[o][1];let g=0;const m=d.children.indexOf(c);let b=!1,_=[];p.lastIndex=0;let N=p.exec(c.value);for(;N;){const C=N.index,O={index:N.index,input:N.input,stack:[...u,c]};let k=f(...N,O);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=C+1:(g!==C&&_.push({type:"text",value:c.value.slice(g,C)}),Array.isArray(k)?_.push(...k):k&&_.push(k),g=C+N[0].length,b=!0),!p.global)break;N=p.exec(c.value)}return b?(g<c.value.length&&_.push({type:"text",value:c.value.slice(g)}),d.children.splice(m,1,..._)):_=[c],m+_.length}}function Eg(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([xg(i[0]),wg(i[1])])}return t}function xg(e){return typeof e=="string"?new RegExp(lg(e),"g"):e}function wg(e){return typeof e=="function"?e:function(){return e}}const lr="phrasing",cr=["autolink","link","image","label"];function _g(){return{transforms:[Cg],enter:{literalAutolink:Sg,literalAutolinkEmail:ur,literalAutolinkHttp:ur,literalAutolinkWww:ur},exit:{literalAutolink:Tg,literalAutolinkEmail:Ag,literalAutolinkHttp:Ng,literalAutolinkWww:vg}}}function kg(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lr,notInConstruct:cr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lr,notInConstruct:cr},{character:":",before:"[ps]",after:"\\/",inConstruct:lr,notInConstruct:cr}]}}function Sg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ur(e){this.config.enter.autolinkProtocol.call(this,e)}function Ng(e){this.config.exit.autolinkProtocol.call(this,e)}function vg(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 Ag(e){this.config.exit.autolinkEmail.call(this,e)}function Tg(e){this.exit(e)}function Cg(e){yg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Rg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ig]],{ignore:["link","linkReference"]})}function Rg(e,t,n,r,i){let a="";if(!Va(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Og(n)))return!1;const o=Mg(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function Ig(e,t,n,r){return!Va(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Og(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 Mg(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=co(e,"(");let a=co(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 Va(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ut(n)||Mn(n))&&(!t||n!==47)}Ya.peek=jg;function Lg(){this.buffer()}function Dg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Pg(){this.buffer()}function Fg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Bg(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=De(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zg(e){this.exit(e)}function Ug(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=De(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $g(e){this.exit(e)}function jg(){return"["}function Ya(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function Hg(){return{enter:{gfmFootnoteCallString:Lg,gfmFootnoteCall:Dg,gfmFootnoteDefinitionLabelString:Pg,gfmFootnoteDefinition:Fg},exit:{gfmFootnoteCallString:Bg,gfmFootnoteCall:zg,gfmFootnoteDefinitionLabelString:Ug,gfmFootnoteDefinition:$g}}}function Gg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ya},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const s=a.createTracker(o);let l=s.move("[^");const c=a.enter("footnoteDefinition"),u=a.enter("label");return l+=s.move(a.safe(a.associationId(r),{before:l,after:"]"})),u(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
15
|
-
`:" ")+a.indentLines(a.containerFlow(r,
|
|
16
|
-
`)}function
|
|
17
|
-
`&&
|
|
18
|
-
`}function
|
|
19
|
-
`,encode:["`"],...
|
|
20
|
-
`),a&&(
|
|
21
|
-
`)),
|
|
22
|
-
`,...
|
|
13
|
+
`}),n}function Co(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ro(e,t){const n=$p(e,t),r=n.one(e,void 0),i=Rp(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
14
|
+
`},i),a}function Vp(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]},Yp=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(Yp);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 Zp(){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?Xp(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 Xp(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:Qp,dirname:Jp,extname:eg,join:tg,sep:"/"};function Qp(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 Jp(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 eg(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 tg(...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?".":ng(n)}function ng(e){pn(e);const t=e.codePointAt(0)===47;let n=rg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rg(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 ig={cwd:og};function og(){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 ag(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 lg(e)}function lg(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"||sg(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ig.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=ag(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 sg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cg=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},ug={}.hasOwnProperty;class Li extends cg{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=Zp()}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):ug.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);hg(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 fg=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 dg(e)?e:new Ql(e)}function dg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hg(e){return typeof e=="string"||pg(e)}function pg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jl=function(e){if(e==null)return bg;if(typeof e=="function")return tr(e);if(typeof e=="object")return Array.isArray(e)?gg(e):mg(e);if(typeof e=="string")return yg(e);throw new Error("Expected function, string, or object as test")};function gg(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 mg(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 yg(e){return tr(t);function t(n){return n&&n.type===e}}function tr(e){return t;function t(n,r,i){return!!(vg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function bg(){return!0}function vg(e){return e!==null&&typeof e=="object"&&"type"in e}const es=[],_g=!0,qo=!1,Eg="skip";function xg(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=wg(n(s,d)),f[0]===qo))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==Eg)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 wg(e){return Array.isArray(e)?e:typeof e=="number"?[_g,e]:e==null?es:[e]}function kg(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),xg(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 Sg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$o=[],Ho={allowDangerousHtml:!0},Ag=/^(https?|ircs?|mailto|xmpp)$/i,Ng=[{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=Og(e),n=Tg(e);return Cg(t.runSync(t.parse(n),n),e)}function Og(e){const t=e.rehypePlugins||$o,n=e.remarkPlugins||$o,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ho}:Ho;return fg().use(Qh).use(n).use(Vp,r).use(t)}function Tg(e){const t=e.children||"",n=new Ql;return typeof t=="string"&&(n.value=t),n}function Cg(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||Rg;for(const d of Ng)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Sg+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),kg(e,c),Mf(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 Rg(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||Ag.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 Ig(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 Dg;if(typeof e=="function")return nr(e);if(typeof e=="object")return Array.isArray(e)?Lg(e):Mg(e);if(typeof e=="string")return Pg(e);throw new Error("Expected function, string, or object as test")};function Lg(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 Mg(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 Pg(e){return nr(t);function t(n){return n&&n.type===e}}function nr(e){return t;function t(n,r,i){return!!(Bg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Dg(){return!0}function Bg(e){return e!==null&&typeof e=="object"&&"type"in e}const ns=[],Fg=!0,Ko=!1,jg="skip";function Ug(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=zg(n(s,d)),f[0]===Ko))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==jg)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 zg(e){return Array.isArray(e)?e:typeof e=="number"?[Fg,e]:e==null?ns:[e]}function qg(e,t,n){const i=Mi((n||{}).ignore||[]),a=$g(t);let o=-1;for(;++o<a.length;)Ug(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 $g(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([Hg(i[0]),Gg(i[1])])}return t}function Hg(e){return typeof e=="string"?new RegExp(Ig(e),"g"):e}function Gg(e){return typeof e=="function"?e:function(){return e}}const Lr="phrasing",Mr=["autolink","link","image","label"];function Kg(){return{transforms:[Jg],enter:{literalAutolink:Vg,literalAutolinkEmail:Pr,literalAutolinkHttp:Pr,literalAutolinkWww:Pr},exit:{literalAutolink:Qg,literalAutolinkEmail:Xg,literalAutolinkHttp:Yg,literalAutolinkWww:Zg}}}function Wg(){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 Vg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pr(e){this.config.enter.autolinkProtocol.call(this,e)}function Yg(e){this.config.exit.autolinkProtocol.call(this,e)}function Zg(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 Xg(e){this.config.exit.autolinkEmail.call(this,e)}function Qg(e){this.exit(e)}function Jg(e){qg(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,em],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),tm]],{ignore:["link","linkReference"]})}function em(e,t,n,r,i){let a="";if(!rs(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!nm(n)))return!1;const o=rm(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 tm(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 nm(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 rm(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=dm;function im(){this.buffer()}function om(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function am(){this.buffer()}function lm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sm(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 cm(e){this.exit(e)}function um(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 fm(e){this.exit(e)}function dm(){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 hm(){return{enter:{gfmFootnoteCallString:im,gfmFootnoteCall:om,gfmFootnoteDefinitionLabelString:am,gfmFootnoteDefinition:lm},exit:{gfmFootnoteCallString:sm,gfmFootnoteCall:cm,gfmFootnoteDefinitionLabelString:um,gfmFootnoteDefinition:fm}}}function pm(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
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?os:gm))),c(),s}}function gm(e,t,n){return t===0?e:os(e,t,n)}function os(e,t,n){return(n?"":" ")+e}const mm=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];as.peek=Em;function ym(){return{canContainEols:["delete"],enter:{strikethrough:vm},exit:{strikethrough:_m}}}function bm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:mm}],handlers:{delete:as}}}function vm(e){this.enter({type:"delete",children:[]},e)}function _m(e){this.exit(e)}function as(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function Em(){return"~"}function xm(e){return e.length}function wm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||xm,a=[],o=[],l=[],s=[];let c=0,d=-1;for(;++d<e.length;){const p=[],y=[];let m=-1;for(e[d].length>c&&(c=e[d].length);++m<e[d].length;){const b=km(e[d][m]);if(n.alignDelimiters!==!1){const _=i(b);y[m]=_,(s[m]===void 0||_>s[m])&&(s[m]=_)}p.push(b)}o[d]=p,l[d]=y}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)a[u]=Wo(r[u]);else{const p=Wo(r);for(;++u<c;)a[u]=p}u=-1;const h=[],f=[];for(;++u<c;){const p=a[u];let y="",m="";p===99?(y=":",m=":"):p===108?y=":":p===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,s[u]-y.length-m.length);const _=y+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=y.length+b+m.length,b>s[u]&&(s[u]=b),f[u]=b),h[u]=_}o.splice(1,0,h),l.splice(1,0,f),d=-1;const g=[];for(;++d<o.length;){const p=o[d],y=l[d];u=-1;const m=[];for(;++u<c;){const b=p[u]||"";let _="",v="";if(n.alignDelimiters!==!1){const E=s[u]-(y[u]||0),k=a[u];k===114?_=" ".repeat(E):k===99?E%2?(_=" ".repeat(E/2+.5),v=" ".repeat(E/2-.5)):(_=" ".repeat(E/2),v=_):v=" ".repeat(E)}n.delimiterStart!==!1&&!u&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||u)&&m.push(" "),n.alignDelimiters!==!1&&m.push(_),m.push(b),n.alignDelimiters!==!1&&m.push(v),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&m.push("|")}g.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return g.join(`
|
|
16
|
+
`)}function km(e){return e==null?"":String(e)}function Wo(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 Sm(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Am);return i(),o}function Am(e,t,n){return">"+(n?"":" ")+e}function Nm(e,t){return Vo(e,t.inConstruct,!0)&&!Vo(e,t.notInConstruct,!1)}function Vo(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 Yo(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
17
|
+
`&&Nm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
18
|
+
`}function Om(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Tm(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 Cm(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 Rm(e,t,n,r){const i=Cm(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Tm(e,n)){const u=n.enter("codeIndented"),h=n.indentLines(a,Im);return u(),h}const l=n.createTracker(r),s=i.repeat(Math.max(Om(a,i)+1,3)),c=n.enter("codeFenced");let d=l.move(s);if(e.lang){const u=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
|
|
19
|
+
`,encode:["`"],...l.current()})),u()}return d+=l.move(`
|
|
20
|
+
`),a&&(d+=l.move(a+`
|
|
21
|
+
`)),d+=l.move(s),c(),d}function Im(e,t,n){return(n?"":" ")+e}function Pi(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 Lm(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");return c+=s.move(n.safe(n.associationId(e),{before:c,after:"]",...s.current()})),c+=s.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
22
|
+
`,...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),o(),c}function Mm(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 cn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jn(e,t,n){const r=Mt(e),i=Mt(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}}ls.peek=Pm;function ls(e,t,n,r){const i=Mm(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let s=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=s.charCodeAt(0),d=jn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(s=cn(c)+s.slice(1));const u=s.charCodeAt(s.length-1),h=jn(r.after.charCodeAt(0),u,i);h.inside&&(s=s.slice(0,-1)+cn(u));const f=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+s+f}function Pm(e,t,n){return n.options.emphasis||"*"}const ss=function(e){if(e==null)return jm;if(typeof e=="function")return rr(e);if(typeof e=="object")return Array.isArray(e)?Dm(e):Bm(e);if(typeof e=="string")return Fm(e);throw new Error("Expected function, string, or object as test")};function Dm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ss(e[n]);return rr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Bm(e){const t=e;return rr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Fm(e){return rr(t);function t(n){return n&&n.type===e}}function rr(e){return t;function t(n,r,i){return!!(Um(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jm(){return!0}function Um(e){return e!==null&&typeof e=="object"&&"type"in e}const cs=[],zm=!0,oi=!1,qm="skip";function $m(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ss(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=cs,g,p,y;if((!t||a(s,c,d[d.length-1]||void 0))&&(f=Hm(n(s,d)),f[0]===oi))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==qm)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]===oi)return g;p=typeof g[1]=="number"?g[1]:p+o}}return f}}}function Hm(e){return Array.isArray(e)?e:typeof e=="number"?[zm,e]:e==null?cs:[e]}function Gm(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),$m(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 Km={};function us(e,t){const n=Km,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fs(e,r,i)}function fs(e,t,n){if(Wm(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 Zo(e.children,t,n)}return Array.isArray(e)?Zo(e,t,n):""}function Zo(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=fs(e[i],t,n);return r.join("")}function Wm(e){return!!(e&&typeof e=="object")}function Vm(e,t){let n=!1;return Gm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,oi}),!!((!e.depth||e.depth<3)&&us(e)&&(t.options.setext||n))}function Ym(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Vm(e,n)){const d=n.enter("headingSetext"),u=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
|
|
23
23
|
`,after:`
|
|
24
|
-
`});return
|
|
25
|
-
`+(i===1?"=":"-").repeat(
|
|
26
|
-
`))+1))}const o="#".repeat(i),
|
|
27
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c=
|
|
28
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
29
|
-
`))}function l(f,g,h,m){const b=h.enter("tableCell"),_=h.enter("phrasing"),N=h.containerPhrasing(f,{...m,before:a,after:a});return _(),b(),N}function c(f,g){return Jg(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function u(f,g,h){const m=f.children;let b=-1;const _=[],N=g.enter("table");for(;++b<m.length;)_[b]=d(m[b],g,h);return N(),_}function d(f,g,h){const m=f.children;let b=-1;const _=[],N=g.enter("tableRow");for(;++b<m.length;)_[b]=l(m[b],f,g,h);return N(),_}function p(f,g,h){let m=ps.inlineCode(f,g,h);return h.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function rm(){return{exit:{taskListCheckValueChecked:bo,taskListCheckValueUnchecked:bo,paragraph:om}}}function im(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:am}}}function bo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function om(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 s=i[a];if(s.type==="paragraph"){o=s;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 am(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=ps.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function sm(){return[_g(),Hg(),Wg(),Zh(),rm()]}function lm(e){return{extensions:[kg(),Gg(e),Vg(),nm(e),im()]}}const cm={tokenize:hm,partial:!0},gs={tokenize:mm,partial:!0},hs={tokenize:bm,partial:!0},ms={tokenize:ym,partial:!0},um={tokenize:Em,partial:!0},bs={name:"wwwAutolink",tokenize:pm,previous:Es},ys={name:"protocolAutolink",tokenize:gm,previous:xs},Ze={name:"emailAutolink",tokenize:fm,previous:ws},qe={};function dm(){return{text:qe}}let ot=48;for(;ot<123;)qe[ot]=Ze,ot++,ot===58?ot=65:ot===91&&(ot=97);qe[43]=Ze;qe[45]=Ze;qe[46]=Ze;qe[95]=Ze;qe[72]=[Ze,ys];qe[104]=[Ze,ys];qe[87]=[Ze,bs];qe[119]=[Ze,bs];function fm(e,t,n){const r=this;let i,a;return o;function o(d){return!Or(d)||!ws.call(r,r.previous)||oi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Or(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(um,u,c)(d):d===45||d===95||ye(d)?(a=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return a&&i&&_e(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function pm(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Es.call(r,r.previous)||oi(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(cm,e.attempt(gs,e.attempt(hs,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function gm(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&xs.call(r,r.previous)&&!oi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(_e(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),a?c:(a=!0,l)):n(d)}function c(d){return d===null||kn(d)||se(d)||ut(d)||Mn(d)?n(d):e.attempt(gs,e.attempt(hs,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function hm(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 mm(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(ms,l,s)(c):c===null||se(c)||ut(c)||c!==45&&Mn(c)?l(c):(a=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!a?n(c):t(c)}}function bm(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(ms,t,a)(o):o===null||se(o)||ut(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function ym(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||se(s)||ut(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||se(s)||ut(s)?t(s):r(s)}function a(s){return _e(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):_e(s)?(e.consume(s),o):n(s)}}function Em(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ye(a)?n(a):t(a)}}function Es(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||se(e)}function xs(e){return!_e(e)}function ws(e){return!(e===47||Or(e))}function Or(e){return e===43||e===45||e===46||e===95||ye(e)}function oi(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 xm={tokenize:Tm,partial:!0};function wm(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Nm,continuation:{tokenize:vm},exit:Am}},text:{91:{name:"gfmFootnoteCall",tokenize:Sm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_m,resolveTo:km}}}}function _m(e,t,n){const r=this;let i=r.events.length;const a=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 s;function s(l){if(!o||!o._balanced)return n(l);const c=De(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function km(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)},s=[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,...s),e}function Sm(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(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(a>999||d===93&&!o||d===null||d===91||se(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(De(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return se(d)||(o=!0),a++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function Nm(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(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",u):n(g)}function u(g){if(o>999||g===93&&!s||g===null||g===91||se(g))return n(g);if(g===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=De(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return se(g)||(s=!0),o++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,u):u(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function vm(e,t,n){return e.check(Jt,t,e.attempt(xm,t,n))}function Am(e){e.exit("gfmFootnoteDefinition")}function Tm(e,t,n){const r=this;return ne(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 Cm(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,s){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)},p=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&Re(p,p.length,0,Ln(f,o.slice(c+1,l),s)),Re(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),Re(o,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const c=this.previous,u=this.events;let d=0;return p;function p(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const h=vt(c);if(g===126)return d>1?l(g):(o.consume(g),d++,f);if(d<2&&!n)return l(g);const m=o.exit("strikethroughSequenceTemporary"),b=vt(g);return m._open=!b||b===2&&!!h,m._close=!h||h===2&&!!b,s(g)}}}class Rm{constructor(){this.map=[]}add(t,n,r){Im(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 Im(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 Om(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 Mm(){return{flow:{null:{name:"table",tokenize:Lm,resolveAll:Dm}}}}function Lm(e,t,n){const r=this;let i=0,a=0,o;return s;function s(S){let P=r.events.length-1;for(;P>-1;){const G=r.events[P][1].type;if(G==="lineEnding"||G==="linePrefix")P--;else break}const R=P>-1?r.events[P][1].type:null,V=R==="tableHead"||R==="tableRow"?k:l;return V===k&&r.parser.lazy[r.now().line]?n(S):V(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(o=!0,a+=1),u(S)}function u(S){return S===null?n(S):K(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),f):n(S):te(S)?ne(e,u,"whitespace")(S):(a+=1,o&&(o=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||se(S)?(e.exit("data"),u(S)):(e.consume(S),S===92?p:d)}function p(S){return S===92||S===124?(e.consume(S),d):d(S)}function f(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,te(S)?ne(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?m(S):S===124?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),h):O(S)}function h(S){return te(S)?ne(e,m,"whitespace")(S):m(S)}function m(S){return S===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),b):S===45?(a+=1,b(S)):S===null||K(S)?C(S):O(S)}function b(S){return S===45?(e.enter("tableDelimiterFiller"),_(S)):O(S)}function _(S){return S===45?(e.consume(S),_):S===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(S))}function N(S){return te(S)?ne(e,C,"whitespace")(S):C(S)}function C(S){return S===124?g(S):S===null||K(S)?!o||i!==a?O(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):O(S)}function O(S){return n(S)}function k(S){return e.enter("tableRow"),B(S)}function B(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),B):S===null||K(S)?(e.exit("tableRow"),t(S)):te(S)?ne(e,B,"whitespace")(S):(e.enter("data"),z(S))}function z(S){return S===null||S===124||se(S)?(e.exit("data"),B(S)):(e.consume(S),S===92?I:z)}function I(S){return S===92||S===124?(e.consume(S),z):z(S)}}function Dm(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,d;const p=new Rm;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(yo(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])),i=g.type==="tableDelimiterRow"?2:u?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=cn(p,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=cn(p,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,a[1]!==0?(o[0]=o[1],d=cn(p,t,a,i,n,d)):o[1]!==0&&(d=cn(p,t,o,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&yo(p,t,l,c,u),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Om(t.events,n))}return e}function cn(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},wt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=wt(t.events,n[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=wt(t.events,n[2]),u=wt(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,h=n[3]-n[2]-1;e.add(g,h,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},wt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function yo(e,t,n,r,i){const a=[],o=wt(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 wt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Pm={name:"tasklistCheck",tokenize:Bm};function Fm(){return{text:{91:Pm}}}function Bm(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"),a)}function a(l){return se(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return K(l)?t(l):te(l)?e.check({tokenize:zm},t,n)(l):n(l)}}function zm(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Um(e){return _a([dm(),wm(),Cm(e),Mm(),Fm()])}const $m={};function _s(e){const t=this,n=e||$m,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Um(n)),a.push(sm()),o.push(lm(n))}const ks=function(e){if(e==null)return qm;if(typeof e=="function")return $n(e);if(typeof e=="object")return Array.isArray(e)?jm(e):Hm(e);if(typeof e=="string")return Gm(e);throw new Error("Expected function, string, or object as test")};function jm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ks(e[n]);return $n(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Hm(e){const t=e;return $n(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Gm(e){return $n(t);function t(n){return n&&n.type===e}}function $n(e){return t;function t(n,r,i){return!!(Km(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function qm(){return!0}function Km(e){return e!==null&&typeof e=="object"&&"type"in e}const Eo=function(e,t,n){const r=ks(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]},pt=function(e){if(e==null)return Ym;if(typeof e=="string")return Vm(e);if(typeof e=="object")return Wm(e);if(typeof e=="function")return ai(e);throw new Error("Expected function, string, or array as `test`")};function Wm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pt(e[n]);return ai(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Vm(e){return ai(t);function t(n){return n.tagName===e}}function ai(e){return t;function t(n,r,i){return!!(Zm(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ym(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Zm(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const xo=/\n/g,wo=/[\t ]+/g,Mr=pt("br"),_o=pt(ib),Xm=pt("p"),ko=pt("tr"),Qm=pt(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",rb,ob]),Ss=pt(["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 Jm(e,t){const n=t||{},r="children"in e?e.children:[],i=Ss(e),a=As(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...vs(e,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...Ns(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Mr(r[s+1]):i}));const l=[];let c;for(s=-1;++s<o.length;){const u=o[s];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
|
|
30
|
-
`.repeat(c)||" "),c=-1,
|
|
31
|
-
`:Xm(e)?(s=2,l=2):Ss(e)&&(s=1,l=1);++a<i.length;)o=o.concat(Ns(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Mr(i[a+1]):l}));return _o(e)&&Eo(t,e,_o)&&o.push(" "),s&&o.unshift(s),l&&o.push(l),o}function vs(e,t){const n=String(e.value),r=[],i=[];let a=0;for(;a<=n.length;){xo.lastIndex=a;const l=xo.exec(n),c=l&&"index"in l?l.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,s;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]),s=void 0):r[o]?(typeof s=="number"&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function tb(e){return[String(e.value)]}function nb(e,t,n){const r=[];let i=0,a;for(;i<e.length;){wo.lastIndex=i;const o=wo.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 As(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 rb(e){return!!(e.properties||{}).hidden}function ib(e){return e.tagName==="td"||e.tagName==="th"}function ob(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function ab(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("<[^<>]+>")+")",s={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]},p={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"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],b=["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"],C={type:h,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},O={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[O,d,s,n,e.C_BLOCK_COMMENT_MODE,u,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:k.concat([{begin:/\(/,end:/\)/,keywords:C,contains:k.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:f,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,s,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(B,z,O,k,[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:C,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function sb(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=ab(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"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);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]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${p.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},h=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],m=["true","false"],b={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],N=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],C=["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:h,literal:m,built_in:[..._,...N,"set","shopt",...C,...O]},contains:[f,e.SHEBANG(),g,d,a,o,b,s,l,c,u,n]}}function cb(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("<[^<>]+>")+")",s={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]},p={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",m={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"},b=[d,s,n,e.C_BLOCK_COMMENT_MODE,u,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:b.concat([{begin:/\(/,end:/\)/,keywords:m,contains:b.concat(["self"]),relevance:0}]),relevance:0},N={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(p,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,s,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(_,N,b,[d,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:m}}}function ub(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("<[^<>]+>")+")",s={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]},p={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"],h=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],m=["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"],b=["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"],C={type:h,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:m},O={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[O,d,s,n,e.C_BLOCK_COMMENT_MODE,u,c],B={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:k.concat([{begin:/\(/,end:/\)/,keywords:C,contains:k.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:f,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,s,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(B,z,O,k,[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:C,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:C},{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},s=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/}),p={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(p,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},h={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]},m=e.inherit(h,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});p.contains=[h,g,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[m,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[c,h,g,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},s]},N=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",C={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"}},b,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},s,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[s,_,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:"("+N+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[b,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},C]}}const fb=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_-]*/}}),pb=["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"],gb=["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"],hb=[...pb,...gb],mb=["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(),bb=["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(),yb=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Eb=["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 xb(e){const t=e.regex,n=fb(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_-]*",s=[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:":("+bb.join("|")+")"},{begin:":(:)?("+yb.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Eb.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...s,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...s,{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:mb.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...s,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+hb.join("|")+")\\b"}]}}function wb(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 _b(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 kb(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 Sb(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:"'"}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),p=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:p,className:"attr",starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var _t="[0-9](_*[0-9])*",un=`\\.(${_t})`,dn="[0-9a-fA-F](_*[0-9a-fA-F])*",So={className:"number",variants:[{begin:`(\\b(${_t})((${un})|\\.)?|(${un}))[eE][+-]?(${_t})[fFdD]?\\b`},{begin:`\\b(${_t})((${un})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${un})[fFdD]?\\b`},{begin:`\\b(${_t})[fFdD]\\b`},{begin:`\\b0[xX]((${dn})\\.?|(${dn})?\\.(${dn}))[pP][+-]?(${_t})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${dn})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ts(e,t,n){return n===-1?"":e.replace(t,r=>Ts(e,t,n-1))}function Nb(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Ts("(?:<"+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,So,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},So,c]}}const No="[A-Za-z$_][0-9A-Za-z$_]*",vb=["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"],Ab=["true","false","null","undefined","NaN","Infinity"],Cs=["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"],Rs=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Is=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Tb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Cb=[].concat(Is,Cs,Rs);function Rb(e){const t=e.regex,n=(L,{after:j})=>{const y="</"+L[0].slice(1);return L.input.indexOf(y,j)!==-1},r=No,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,j)=>{const y=L[0].length+L.index,q=L.input[y];if(q==="<"||q===","){j.ignoreMatch();return}q===">"&&(n(L,{after:y})||j.ignoreMatch());let X;const x=L.input.substring(y);if(X=x.match(/^\s*=/)){j.ignoreMatch();return}if((X=x.match(/^\s+extends\s+/))&&X.index===0){j.ignoreMatch();return}}},s={$pattern:No,keyword:vb,literal:Ab,built_in:Cb,"variable.language":Tb},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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={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]},N=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,{match:/\$\d+/},d];p.contains=N.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(N)});const C=[].concat(_,p.contains),O=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(C)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:O},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},z={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:{_:[...Cs,...Rs]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},S={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function R(L){return t.concat("(?!",L.join("|"),")")}const V={match:t.concat(/\b/,R([...Is,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,_,{match:/\$\d+/},d,z,{scope:"attr",match:r+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:T,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:s,contains:O}]}]},{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"]}]}]},S,{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},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},V,P,B,H,{match:/\$[(.]/}]}}function Ib(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 kt="[0-9](_*[0-9])*",fn=`\\.(${kt})`,pn="[0-9a-fA-F](_*[0-9a-fA-F])*",Ob={className:"number",variants:[{begin:`(\\b(${kt})((${fn})|\\.)?|(${fn}))[eE][+-]?(${kt})[fFdD]?\\b`},{begin:`\\b(${kt})((${fn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${fn})[fFdD]?\\b`},{begin:`\\b(${kt})[fFdD]\\b`},{begin:`\\b0[xX]((${pn})\\.?|(${pn})?\\.(${pn}))[pP][+-]?(${kt})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${pn})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Mb(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 s={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=Ob,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=d;return p.variants[1].contains=[d],d.variants[1].contains=[p],{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,s,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,s,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},s,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
32
|
-
`},c]}}const Lb=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_-]*/}}),Db=["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"],Pb=["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"],Fb=[...Db,...Pb],Bb=["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(),Os=["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(),Ms=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),zb=["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(),Ub=Os.concat(Ms).sort().reverse();function $b(e){const t=Lb(e),n=Ub,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",o=[],s=[],l=function(N){return{className:"string",begin:"~?"+N+".*?"+N}},c=function(N,C,O){return{className:N,begin:C,relevance:O}},u={$pattern:/[a-z-]+/,keyword:r,attribute:Bb.join(" ")},d={begin:"\\(",end:"\\)",contains:s,keywords:u,relevance:0};s.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 p=s.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},g={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zb.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},h={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:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:p}},b={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("+Fb.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:":("+Os.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Ms.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[b]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,m,_,g,b,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function jb(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 Hb(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 Gb(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}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),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:[]}),p=e.inherit(u,{contains:[]});c.contains.push(p),u.contains.push(d);let f=[n,l];return[c,u,d,p].forEach(b=>{b.contains=b.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,a,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 qb(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_]*/,s={"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:s,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 Kb(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:/\}/},s={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:[s]},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,a,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],p=(h,m,b="\\1")=>{const _=b==="\\1"?b:t.concat(b,m);return t.concat(t.concat("(?:",h,")"),m,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,b,r)},f=(h,m,b)=>t.concat(t.concat("(?:",h,")"),m,/(?:\\.|[^\\\/])*?/,b,r),g=[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:p("s|tr|y",t.either(...d,{capture:!0}))},{begin:p("s|tr|y","\\(","\\)")},{begin:p("s|tr|y","\\[","\\]")},{begin:p("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,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,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 Wb(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},s={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":(G,H)=>{H.data._beginMatch=G[1]||G[2]},"on:end":(G,H)=>{H.data._beginMatch!==G[1]&&H.ignoreMatch()}},p=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
|
|
33
|
-
]`,g={scope:"string",variants:[u,c,d,p]},h={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},m=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(G=>{const H=[];return G.forEach(T=>{H.push(T),T.toLowerCase()===T?H.push(T.toUpperCase()):H.push(T.toLowerCase())}),H})(m),built_in:_},O=G=>G.map(H=>H.replace(/\|\d+$/,"")),k={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},B=t.concat(r,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),B],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},S={relevance:0,begin:/\(/,end:/\)/,keywords:C,contains:[I,o,z,e.C_BLOCK_COMMENT_MODE,g,h,k]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(b).join("\\b|"),"|",O(_).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[S]};S.contains.push(P);const R=[I,z,e.C_BLOCK_COMMENT_MODE,g,h,k],V={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:m,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:m,keyword:["new","array"]},contains:["self",...R]},...R,{scope:"meta",variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:C,contains:[V,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,P,z,{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:C,contains:["self",V,o,z,e.C_BLOCK_COMMENT_MODE,g,h]}]},{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,h]}}function Vb(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 Yb(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Zb(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"],s={$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:s,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]},p="[0-9](_?[0-9])*",f=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,g=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${f}))[eE][+-]?(${p})[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(${p})[jJ](?=${g})`}]},m={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,h,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,h,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{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:[h,b,d]}]}}function Xb(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Qb(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 Jb(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"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],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]})]}]},p="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${p})(\\.(${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"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},k=[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:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{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,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=k,h.contains=k;const S=[{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(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(S).concat(c).concat(k)}}function ey(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))?",s=["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:s,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:"->"},a]}}const ty=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_-]*/}}),ny=["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"],ry=["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"],iy=[...ny,...ry],oy=["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(),ay=["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(),sy=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ly=["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 cy(e){const t=ty(e),n=sy,r=ay,i="@[a-z-]+",a="and or not only",s={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("+iy.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ly.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,s,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:oy.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function uy(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function dy(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"],s=["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"],p=["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,g=[...c,...l].filter(O=>!u.includes(O)),h={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},m={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function _(O){return t.concat(/\b/,t.either(...O.map(k=>k.replace(/\s+/,"\\s+"))),/\b/)}const N={scope:"keyword",match:_(p),relevance:0};function C(O,{exceptions:k,when:B}={}){const z=B;return k=k||[],O.map(I=>I.match(/\|\d+$/)||k.includes(I)?I:z(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(g,{when:O=>O.length<3}),literal:a,type:s,built_in:d},contains:[{scope:"type",match:_(o)},N,b,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,m]}}function Ls(e){return e?typeof e=="string"?e:e.source:null}function $t(e){return ae("(?=",e,")")}function ae(...e){return e.map(n=>Ls(n)).join("")}function fy(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function we(...e){return"("+(fy(e).capture?"":"?:")+e.map(r=>Ls(r)).join("|")+")"}const si=e=>ae(/\b/,e,/\w$/.test(e)?/\b/:/\B/),py=["Protocol","Type"].map(si),vo=["init","self"].map(si),gy=["Any","Self"],fr=["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"],Ao=["false","nil","true"],hy=["assignment","associativity","higherThan","left","lowerThan","none","right"],my=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],To=["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"],Ds=we(/[/=\-+!*%<>&|^~?]/,/[\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]/),Ps=we(Ds,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),pr=ae(Ds,Ps,"*"),Fs=we(/[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]/),An=we(Fs,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),He=ae(Fs,An,"*"),gn=ae(/[A-Z]/,An,"*"),by=["attached","autoclosure",ae(/convention\(/,we("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",ae(/objc\(/,He,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],yy=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ey(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,we(...py,...vo)],className:{2:"keyword"}},a={match:ae(/\./,we(...fr)),relevance:0},o=fr.filter(ie=>typeof ie=="string").concat(["_|0"]),s=fr.filter(ie=>typeof ie!="string").concat(gy).map(si),l={variants:[{className:"keyword",match:we(...s,...vo)}]},c={$pattern:we(/\b\w+/,/#\w+/),keyword:o.concat(my),literal:Ao},u=[i,a,l],d={match:ae(/\./,we(...To)),relevance:0},p={className:"built_in",match:ae(/\b/,we(...To),/(?=\()/)},f=[d,p],g={match:/->/,relevance:0},h={className:"operator",relevance:0,variants:[{match:pr},{match:`\\.(\\.|${Ps})+`}]},m=[g,h],b="([0-9]_*)+",_="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${_})(\\.(${_}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},C=(ie="")=>({className:"subst",variants:[{match:ae(/\\/,ie,/[0\\tnr"']/)},{match:ae(/\\/,ie,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(ie="")=>({className:"subst",match:ae(/\\/,ie,/[\t ]*(?:[\r\n]|\r\n)/)}),k=(ie="")=>({className:"subst",label:"interpol",begin:ae(/\\/,ie,/\(/),end:/\)/}),B=(ie="")=>({begin:ae(ie,/"""/),end:ae(/"""/,ie),contains:[C(ie),O(ie),k(ie)]}),z=(ie="")=>({begin:ae(ie,/"/),end:ae(/"/,ie),contains:[C(ie),k(ie)]}),I={className:"string",variants:[B(),B("#"),B("##"),B("###"),z(),z("#"),z("##"),z("###")]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},R=ie=>{const Oe=ae(ie,/\//),W=ae(/\//,ie);return{begin:Oe,end:W,contains:[...S,{scope:"comment",begin:`#(?!.*${W})`,end:/$/}]}},V={scope:"regexp",variants:[R("###"),R("##"),R("#"),P]},G={match:ae(/`/,He,/`/)},H={className:"variable",match:/\$\d+/},T={className:"variable",match:`\\$${An}+`},D=[G,H,T],L={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:yy,contains:[...m,N,I]}]}},j={scope:"keyword",match:ae(/@/,we(...by),$t(we(/\(/,/\s+/)))},y={scope:"meta",match:ae(/@/,He)},q=[L,j,y],X={match:$t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:ae(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,An,"+")},{className:"type",match:gn,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:ae(/\s+&\s+/,$t(gn)),relevance:0}]},x={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...q,g,X]};X.contains.push(x);const re={match:ae(He,/\s*:/),keywords:"_|0",relevance:0},ue={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",re,...r,V,...u,...f,...m,N,I,...D,...q,X]},de={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,X]},Fe={begin:we($t(ae(He,/\s*:/)),$t(ae(He,/\s+/,He,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:He}]},ke={begin:/\(/,end:/\)/,keywords:c,contains:[Fe,...r,...u,...m,N,I,...q,X,ue],endsParent:!0,illegal:/["']/},Be={match:[/(func|macro)/,/\s+/,we(G.match,He,pr)],className:{1:"keyword",3:"title.function"},contains:[de,ke,t],illegal:[/\[/,/%/]},ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[de,ke,t],illegal:/\[|%/},Xe={match:[/operator/,/\s+/,pr],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,gn],className:{1:"keyword",3:"title"},contains:[X],keywords:[...hy,...Ao],end:/}/},Qe={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},mt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},xe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,He,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[de,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:gn},...u],relevance:0}]};for(const ie of I.variants){const Oe=ie.contains.find(it=>it.label==="interpol");Oe.keywords=c;const W=[...u,...f,...m,N,I,...D];Oe.contains=[...W,{begin:/\(/,end:/\)/,contains:["self",...W]}]}return{name:"Swift",keywords:c,contains:[...r,Be,ze,Qe,mt,xe,Xe,Lt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},V,...u,...f,...m,N,I,...D,...q,X,ue]}}const Tn="[A-Za-z$_][0-9A-Za-z$_]*",Bs=["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"],zs=["true","false","null","undefined","NaN","Infinity"],Us=["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"],$s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],js=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Hs=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Gs=[].concat(js,Us,$s);function xy(e){const t=e.regex,n=(L,{after:j})=>{const y="</"+L[0].slice(1);return L.input.indexOf(y,j)!==-1},r=Tn,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,j)=>{const y=L[0].length+L.index,q=L.input[y];if(q==="<"||q===","){j.ignoreMatch();return}q===">"&&(n(L,{after:y})||j.ignoreMatch());let X;const x=L.input.substring(y);if(X=x.match(/^\s*=/)){j.ignoreMatch();return}if((X=x.match(/^\s+extends\s+/))&&X.index===0){j.ignoreMatch();return}}},s={$pattern:Tn,keyword:Bs,literal:zs,built_in:Gs,"variable.language":Hs},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},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},_={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]},N=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,{match:/\$\d+/},d];p.contains=N.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(N)});const C=[].concat(_,p.contains),O=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(C)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:O},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},z={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:{_:[...Us,...$s]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},S={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function R(L){return t.concat("(?!",L.join("|"),")")}const V={match:t.concat(/\b/,R([...js,"super","import"].map(L=>`${L}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},T="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(T)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,g,h,m,_,{match:/\$\d+/},d,z,{scope:"attr",match:r+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:T,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:s,contains:O}]}]},{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"]}]}]},S,{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},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},V,P,B,H,{match:/\$[(.]/}]}}function wy(e){const t=e.regex,n=xy(e),r=Tn,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]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Tn,keyword:Bs.concat(l),literal:zs,built_in:Gs.concat(i),"variable.language":Hs},u={className:"meta",begin:"@"+r},d=(h,m,b)=>{const _=h.contains.findIndex(N=>N.label===m);if(_===-1)throw new Error("can not find mode to replace");h.contains.splice(_,1,b)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const p=n.contains.find(h=>h.scope==="attr"),f=Object.assign({},p,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,p,f]),n.contains=n.contains.concat([u,a,o,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",s);const g=n.contains.find(h=>h.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function _y(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)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},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:/>/}]}),p=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,p,{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:[p]}]}}function ky(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},s={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"}},a,o,i,e.QUOTE_STRING_MODE,l,c,s]}}function Sy(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:/\)/}),s=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:[a,l,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,l,s]}]}]},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 Ny(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]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),p={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},h={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},m=[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}},p,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,h,a,o],b=[...m];return b.pop(),b.push(s),f.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:m}}const vy={arduino:sb,bash:lb,c:cb,cpp:ub,csharp:db,css:xb,diff:wb,go:_b,graphql:kb,ini:Sb,java:Nb,javascript:Rb,json:Ib,kotlin:Mb,less:$b,lua:jb,makefile:Hb,markdown:Gb,objectivec:qb,perl:Kb,php:Wb,"php-template":Vb,plaintext:Yb,python:Zb,"python-repl":Xb,r:Qb,ruby:Jb,rust:ey,scss:cy,shell:uy,sql:dy,swift:Ey,typescript:wy,vbnet:_y,wasm:ky,xml:Sy,yaml:Ny};function qs(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)&&qs(n)}),e}class Co{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Ks(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function nt(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 Ay="</span>",Ro=e=>!!e.scope,Ty=(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 Cy{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Ks(t)}openNode(t){if(!Ro(t))return;const n=Ty(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Ro(t)&&(this.buffer+=Ay)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Io=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class li{constructor(){this.rootNode=Io(),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=Io({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=>{li._collapse(n)}))}}class Ry extends li{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 Cy(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Zt(e){return e?typeof e=="string"?e:e.source:null}function Ws(e){return gt("(?=",e,")")}function Iy(e){return gt("(?:",e,")*")}function Oy(e){return gt("(?:",e,")?")}function gt(...e){return e.map(n=>Zt(n)).join("")}function My(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ci(...e){return"("+(My(e).capture?"":"?:")+e.map(r=>Zt(r)).join("|")+")"}function Vs(e){return new RegExp(e.toString()+"|").exec("").length-1}function Ly(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Dy=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ui(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let a=Zt(r),o="";for(;a.length>0;){const s=Dy.exec(a);if(!s){o+=a;break}o+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?o+="\\"+String(Number(s[1])+i):(o+=s[0],s[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const Py=/\b\B/,Ys="[a-zA-Z]\\w*",di="[a-zA-Z_]\\w*",Zs="\\b\\d+(\\.\\d+)?",Xs="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Qs="\\b(0b[01]+)",Fy="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",By=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=gt(t,/.*\b/,e.binary,/\b.*/)),nt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Xt={begin:"\\\\[\\s\\S]",relevance:0},zy={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Xt]},Uy={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Xt]},$y={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/},jn=function(e,t,n={}){const r=nt({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=ci("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:gt(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},jy=jn("//","$"),Hy=jn("/\\*","\\*/"),Gy=jn("#","$"),qy={scope:"number",begin:Zs,relevance:0},Ky={scope:"number",begin:Xs,relevance:0},Wy={scope:"number",begin:Qs,relevance:0},Vy={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Xt,{begin:/\[/,end:/\]/,relevance:0,contains:[Xt]}]},Yy={scope:"title",begin:Ys,relevance:0},Zy={scope:"title",begin:di,relevance:0},Xy={begin:"\\.\\s*"+di,relevance:0},Qy=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 hn=Object.freeze({__proto__:null,APOS_STRING_MODE:zy,BACKSLASH_ESCAPE:Xt,BINARY_NUMBER_MODE:Wy,BINARY_NUMBER_RE:Qs,COMMENT:jn,C_BLOCK_COMMENT_MODE:Hy,C_LINE_COMMENT_MODE:jy,C_NUMBER_MODE:Ky,C_NUMBER_RE:Xs,END_SAME_AS_BEGIN:Qy,HASH_COMMENT_MODE:Gy,IDENT_RE:Ys,MATCH_NOTHING_RE:Py,METHOD_GUARD:Xy,NUMBER_MODE:qy,NUMBER_RE:Zs,PHRASAL_WORDS_MODE:$y,QUOTE_STRING_MODE:Uy,REGEXP_MODE:Vy,RE_STARTERS_RE:Fy,SHEBANG:By,TITLE_MODE:Yy,UNDERSCORE_IDENT_RE:di,UNDERSCORE_TITLE_MODE:Zy});function Jy(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function eE(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function tE(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Jy,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function nE(e,t){Array.isArray(e.illegal)&&(e.illegal=ci(...e.illegal))}function rE(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 iE(e,t){e.relevance===void 0&&(e.relevance=1)}const oE=(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=gt(n.beforeMatch,Ws(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},aE=["of","and","for","in","not","or","if","then","parent","list","value"],sE="keyword";function Js(e,t,n=sE){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,Js(e[a],t,a))}),r;function i(a,o){t&&(o=o.map(s=>s.toLowerCase())),o.forEach(function(s){const l=s.split("|");r[l[0]]=[a,lE(l[0],l[1])]})}}function lE(e,t){return t?Number(t):cE(e)?0:1}function cE(e){return aE.includes(e.toLowerCase())}const Oo={},lt=e=>{console.error(e)},Mo=(e,...t)=>{console.log(`WARN: ${e}`,...t)},xt=(e,t)=>{Oo[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Oo[`${e}/${t}`]=!0)},Cn=new Error;function el(e,t,{key:n}){let r=0;const i=e[n],a={},o={};for(let s=1;s<=t.length;s++)o[s+r]=i[s],a[s+r]=!0,r+=Vs(t[s-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function uE(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Cn;if(typeof e.beginScope!="object"||e.beginScope===null)throw lt("beginScope must be object"),Cn;el(e,e.begin,{key:"beginScope"}),e.begin=ui(e.begin,{joinWith:""})}}function dE(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Cn;if(typeof e.endScope!="object"||e.endScope===null)throw lt("endScope must be object"),Cn;el(e,e.end,{key:"endScope"}),e.end=ui(e.end,{joinWith:""})}}function fE(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pE(e){fE(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),uE(e),dE(e)}function gE(e){function t(o,s){return new RegExp(Zt(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(s?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=Vs(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(l=>l[1]);this.matcherRe=t(ui(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(s);if(!l)return null;const c=l.findIndex((d,p)=>p>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(s){if(this.multiRegexes[s])return this.multiRegexes[s];const l=new n;return this.rules.slice(s).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(s);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(s)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const s=new r;return o.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&s.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&s.addRule(o.illegal,{type:"illegal"}),s}function a(o,s){const l=o;if(o.isCompiled)return l;[eE,rE,pE,oE].forEach(u=>u(o,s)),e.compilerExtensions.forEach(u=>u(o,s)),o.__beforeBegin=null,[tE,nE,iE].forEach(u=>u(o,s)),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=Js(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),s&&(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=Zt(l.end)||"",o.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return hE(u==="self"?o:u)})),o.contains.forEach(function(u){a(u,l)}),o.starts&&a(o.starts,s),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=nt(e.classNameAliases||{}),a(e)}function tl(e){return e?e.endsWithParent||tl(e.starts):!1}function hE(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return nt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:tl(e)?nt(e,{starts:e.starts?nt(e.starts):null}):Object.isFrozen(e)?nt(e):e}var mE="11.11.1";class bE extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const gr=Ks,Lo=nt,Do=Symbol("nomatch"),yE=7,nl=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 s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Ry};function l(T){return s.noHighlightRe.test(T)}function c(T){let D=T.className+" ";D+=T.parentNode?T.parentNode.className:"";const L=s.languageDetectRe.exec(D);if(L){const j=z(L[1]);return j||(Mo(a.replace("{}",L[1])),Mo("Falling back to no-highlight mode for this block.",T)),j?L[1]:"no-highlight"}return D.split(/\s+/).find(j=>l(j)||z(j))}function u(T,D,L){let j="",y="";typeof D=="object"?(j=T,L=D.ignoreIllegals,y=D.language):(xt("10.7.0","highlight(lang, code, ...args) has been deprecated."),xt("10.7.0",`Please use highlight(code, options) instead.
|
|
34
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
35
|
-
`,1;if(Dt>1e5&&Dt>A.index*3)throw new Error("potential infinite loop, way more iterations than matches");return oe+=F,F.length}const xe=z(T);if(!xe)throw lt(a.replace("{}",T)),new Error('Unknown language: "'+T+'"');const ie=gE(xe);let Oe="",W=j||ie;const it={},ge=new s.__emitter(s);Lt();let oe="",bt=0,Ke=0,Dt=0,Pt=!1;try{if(xe.__emitTokens)xe.__emitTokens(D,ge);else{for(W.matcher.considerAll();;){Dt++,Pt?Pt=!1:W.matcher.considerAll(),W.matcher.lastIndex=Ke;const w=W.matcher.exec(D);if(!w)break;const A=D.substring(Ke,w.index),F=mt(A,w);Ke=w.index+F}mt(D.substring(Ke))}return ge.finalize(),Oe=ge.toHTML(),{language:T,value:Oe,relevance:bt,illegal:!1,_emitter:ge,_top:W}}catch(w){if(w.message&&w.message.includes("Illegal"))return{language:T,value:gr(D),illegal:!0,relevance:0,_illegalBy:{message:w.message,index:Ke,context:D.slice(Ke-100,Ke+100),mode:w.mode,resultSoFar:Oe},_emitter:ge};if(i)return{language:T,value:gr(D),illegal:!1,relevance:0,errorRaised:w,_emitter:ge,_top:W};throw w}}function p(T){const D={value:gr(T),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return D._emitter.addText(T),D}function f(T,D){D=D||s.languages||Object.keys(t);const L=p(T),j=D.filter(z).filter(S).map(re=>d(re,T,!1));j.unshift(L);const y=j.sort((re,ue)=>{if(re.relevance!==ue.relevance)return ue.relevance-re.relevance;if(re.language&&ue.language){if(z(re.language).supersetOf===ue.language)return 1;if(z(ue.language).supersetOf===re.language)return-1}return 0}),[q,X]=y,x=q;return x.secondBest=X,x}function g(T,D,L){const j=D&&n[D]||L;T.classList.add("hljs"),T.classList.add(`language-${j}`)}function h(T){let D=null;const L=c(T);if(l(L))return;if(G("before:highlightElement",{el:T,language:L}),T.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",T);return}if(T.children.length>0&&(s.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(T)),s.throwUnescapedHTML))throw new bE("One of your code blocks includes unescaped HTML.",T.innerHTML);D=T;const j=D.textContent,y=L?u(j,{language:L,ignoreIllegals:!0}):f(j);T.innerHTML=y.value,T.dataset.highlighted="yes",g(T,L,y.language),T.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(T.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),G("after:highlightElement",{el:T,result:y,text:j})}function m(T){s=Lo(s,T)}const b=()=>{C(),xt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){C(),xt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let N=!1;function C(){function T(){C()}if(document.readyState==="loading"){N||window.addEventListener("DOMContentLoaded",T,!1),N=!0;return}document.querySelectorAll(s.cssSelector).forEach(h)}function O(T,D){let L=null;try{L=D(e)}catch(j){if(lt("Language definition for '{}' could not be registered.".replace("{}",T)),i)lt(j);else throw j;L=o}L.name||(L.name=T),t[T]=L,L.rawDefinition=D.bind(null,e),L.aliases&&I(L.aliases,{languageName:T})}function k(T){delete t[T];for(const D of Object.keys(n))n[D]===T&&delete n[D]}function B(){return Object.keys(t)}function z(T){return T=(T||"").toLowerCase(),t[T]||t[n[T]]}function I(T,{languageName:D}){typeof T=="string"&&(T=[T]),T.forEach(L=>{n[L.toLowerCase()]=D})}function S(T){const D=z(T);return D&&!D.disableAutodetect}function P(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=D=>{T["before:highlightBlock"](Object.assign({block:D.el},D))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=D=>{T["after:highlightBlock"](Object.assign({block:D.el},D))})}function R(T){P(T),r.push(T)}function V(T){const D=r.indexOf(T);D!==-1&&r.splice(D,1)}function G(T,D){const L=T;r.forEach(function(j){j[L]&&j[L](D)})}function H(T){return xt("10.7.0","highlightBlock will be removed entirely in v12.0"),xt("10.7.0","Please use highlightElement now."),h(T)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:C,highlightElement:h,highlightBlock:H,configure:m,initHighlighting:b,initHighlightingOnLoad:_,registerLanguage:O,unregisterLanguage:k,listLanguages:B,getLanguage:z,registerAliases:I,autoDetection:S,inherit:Lo,addPlugin:R,removePlugin:V}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=mE,e.regex={concat:gt,lookahead:Ws,either:ci,optional:Oy,anyNumberOfTimes:Iy};for(const T in hn)typeof hn[T]=="object"&&qs(hn[T]);return Object.assign(e,hn),e},At=nl({});At.newInstance=()=>nl({});var EE=At;At.HighlightJS=At;At.default=At;const xE=Hr(EE),Po={},wE="hljs-";function _E(e){const t=xE.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(l,c,u){const d=u||Po,p=typeof d.prefix=="string"?d.prefix:wE;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:kE,classPrefix:p});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 g=f._emitter.root,h=g.data;return h.language=f.language,h.relevance=f.relevance,g}function r(l,c){const d=(c||Po).subset||i();let p=-1,f=0,g;for(;++p<d.length;){const h=d[p];if(!t.getLanguage(h))continue;const m=n(h,l,c);m.data&&m.data.relevance!==void 0&&m.data.relevance>f&&(f=m.data.relevance,g=m)}return g||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function a(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 s(l){return!!t.getLanguage(l)}}class kE{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,s){return s?o+"_".repeat(s):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 rl=function(e){if(e==null)return AE;if(typeof e=="function")return Hn(e);if(typeof e=="object")return Array.isArray(e)?SE(e):NE(e);if(typeof e=="string")return vE(e);throw new Error("Expected function, string, or object as test")};function SE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return Hn(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function NE(e){const t=e;return Hn(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function vE(e){return Hn(t);function t(n){return n&&n.type===e}}function Hn(e){return t;function t(n,r,i){return!!(TE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function AE(){return!0}function TE(e){return e!==null&&typeof e=="object"&&"type"in e}const il=[],CE=!0,Fo=!1,RE="skip";function IE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rl(i),o=r?-1:1;s(e,void 0,[])();function s(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(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=il,g,h,m;if((!t||a(l,c,u[u.length-1]||void 0))&&(f=OE(n(l,u)),f[0]===Fo))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==RE)for(h=(r?b.children.length:-1)+o,m=u.concat(b);h>-1&&h<b.children.length;){const _=b.children[h];if(g=s(_,h,m)(),g[0]===Fo)return g;h=typeof g[1]=="number"?g[1]:h+o}}return f}}}function OE(e){return Array.isArray(e)?e:typeof e=="number"?[CE,e]:e==null?il:[e]}function ME(e,t,n,r){let i,a,o;a=t,o=n,i=r,IE(e,a,s,i);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const LE={};function ol(e){const t=e||LE,n=t.aliases,r=t.detect||!1,i=t.languages||vy,a=t.plainText,o=t.prefix,s=t.subset;let l="hljs";const c=_E(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){ME(u,"element",function(p,f,g){if(p.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const h=DE(p);if(h===!1||!h&&!r||h&&a&&a.includes(h))return;Array.isArray(p.properties.className)||(p.properties.className=[]),p.properties.className.includes(l)||p.properties.className.unshift(l);const m=Jm(p,{whitespace:"pre"});let b;try{b=h?c.highlight(h,m,{prefix:o}):c.highlightAuto(m,{prefix:o,subset:s})}catch(_){const N=_;if(h&&/Unknown language/.test(N.message)){d.message("Cannot highlight as `"+h+"`, it’s not registered",{ancestors:[g,p],cause:N,place:p.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw N}!h&&b.data&&b.data.language&&p.properties.className.push("language-"+b.data.language),b.children.length>0&&(p.children=b.children)})}}function DE(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 PE({article:e,onBack:t,onEdit:n,showActions:r=!1}){return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===me.Published?"bg-green-100 text-green-800":e.status===me.Draft?"bg-gray-100 text-gray-800":e.status===me.Review?"bg-yellow-100 text-yellow-800":e.status===me.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:me[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e.content})})]})]})}function al({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:a="400px"}){const[o,s]=$.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 bg-white",children:[E.jsxs("div",{className:"flex border-b border-gray-300 bg-gray-50",children:[E.jsx("button",{type:"button",onClick:()=>s("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white text-blue-600":"text-gray-600 hover:text-gray-900"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>s("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white text-blue-600":"text-gray-600 hover:text-gray-900"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:a},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm focus:outline-none focus:ring-0",style:{minHeight:a}}):E.jsx("div",{className:"prose max-w-none p-4",children:e?E.jsx(Ka,{remarkPlugins:[_s],rehypePlugins:[ol],children:e}):E.jsx("div",{className:"text-gray-400",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 p-3 text-xs text-gray-600",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:""})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}function FE({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:a=!1}){const[o,s]=$.useState(""),[l,c]=$.useState(""),[u,d]=$.useState(me.Draft),[p,f]=$.useState(null),[g,h]=$.useState(""),[m,b]=$.useState([]),[_,N]=$.useState(""),[C,O]=$.useState({});$.useEffect(()=>{var I,S;e&&(s(e.title),c(e.content),d(e.status),f(e.categoryId||null),h(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),b(((I=e.tags)==null?void 0:I.map(P=>P.tagId).filter(P=>P!==void 0))||[]),N(((S=e.roles)==null?void 0:S.map(P=>P.slug).join(", "))||""))},[e]);const k=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),O(I),Object.keys(I).length===0},B=async I=>{if(I.preventDefault(),!k())return;const S=_.split(",").map(R=>R.trim()).filter(R=>R.length>0),P={title:o.trim(),content:l.trim(),status:u,categoryId:p||void 0,dateAt:g||void 0,tagIds:m.length>0?m:void 0,roleIds:S.length>0?S:void 0};e?await r({articleId:e.articleId,...P}):await r(P)},z=I=>{b(S=>S.includes(I)?S.filter(P=>P!==I):[...S,I])};return E.jsx("form",{onSubmit:B,className:"space-y-6",children:E.jsxs("div",{className:"rounded-lg p-6",children:[E.jsx("h2",{className:"mb-6 text-2xl font-bold text-gray-900 dark:text-gray-100",children:e?"Edit Article":"Create New Article"}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>s(I.target.value),className:`w-full rounded-md border ${C.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"}),C.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:C.title})]}),E.jsx("div",{className:"mt-4",children:E.jsx(al,{label:"Content *",value:l,onChange:c,error:C.content,placeholder:"Write your article content in Markdown..."})}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:g,onChange:I=>h(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 md:grid-cols-2",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),E.jsxs("select",{id:"status",value:u,onChange:I=>d(Number(I.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:me.Draft,children:"Draft"}),E.jsx("option",{value:me.Published,children:"Published"}),E.jsx("option",{value:me.Archived,children:"Archived"}),E.jsx("option",{value:me.Scheduled,children:"Scheduled"}),E.jsx("option",{value:me.Review,children:"Review"})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),E.jsxs("select",{id:"category",value:p||"",onChange:I=>f(I.target.value?Number(I.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"No Category"}),t.map(I=>E.jsx("option",{value:I.categoryId,children:I.title},I.categoryId))]})]})]}),n.length>0&&E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(I=>E.jsxs("button",{type:"button",onClick:()=>z(I.tagId||0),className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${m.includes(I.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:["#",I.title]},I.tagId))})]}),E.jsxs("div",{className:"mt-4 space-y-2",children:[E.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),E.jsx("input",{id:"roles",type:"text",value:_,onChange:I=>N(I.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)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.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"}),E.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update Article":"Create Article"})]})]})})}/**
|
|
24
|
+
`});return u(),d(),h+`
|
|
25
|
+
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
26
|
+
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),s=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
27
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=cn(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),s(),l(),c}ds.peek=Zm;function ds(e){return e.value||""}function Zm(){return"<"}hs.peek=Xm;function hs(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");return c+=s.move(n.safe(e.alt,{before:c,after:"]",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),o(),c}function Xm(){return"!"}ps.peek=Qm;function ps(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("![");const c=n.safe(e.alt,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!c||c!==u?s+=l.move(u+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function Qm(){return"!"}gs.peek=Jm;function gs(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let s;if(o.atBreak)for(;s=l.exec(r);){let c=s.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(s.index+1)}}return i+r+i}function Jm(){return"`"}function ms(e,t){const n=us(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))}ys.peek=ey;function ys(e,t,n,r){const i=Pi(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,s;if(ms(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let u=o.move("<");return u+=o.move(n.containerPhrasing(e,{before:u,after:">",...o.current()})),u+=o.move(">"),l(),n.stack=d,u}l=n.enter("link"),s=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(s=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),s()),c+=o.move(")"),l(),c}function ey(e,t,n){return ms(e,n)?"<":"["}bs.peek=ty;function bs(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let s=l.move("[");const c=n.containerPhrasing(e,{before:s,after:"]",...l.current()});s+=l.move(c+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!c||c!==u?s+=l.move(u+"]"):i==="shortcut"?s=s.slice(0,-1):s+=l.move("]"),s}function ty(){return"["}function Di(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 ny(e){const t=Di(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 ry(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 vs(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 iy(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?ry(n):Di(n);const l=e.ordered?o==="."?")":".":ny(n);let s=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.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&&(s=!0),vs(n)===o&&d){let u=-1;for(;++u<e.children.length;){const h=e.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(o=l),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c}function oy(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 ay(e,t,n,r){const i=oy(n);let a=n.bulletCurrent||Di(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),d);return s(),c;function d(u,h,f){return h?(f?"":" ".repeat(o))+u:(f?a:a+" ".repeat(o-a.length))+u}}function ly(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const _s=function(e){if(e==null)return fy;if(typeof e=="function")return ir(e);if(typeof e=="object")return Array.isArray(e)?sy(e):cy(e);if(typeof e=="string")return uy(e);throw new Error("Expected function, string, or object as test")};function sy(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_s(e[n]);return ir(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function cy(e){const t=e;return ir(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function uy(e){return ir(t);function t(n){return n&&n.type===e}}function ir(e){return t;function t(n,r,i){return!!(dy(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function fy(){return!0}function dy(e){return e!==null&&typeof e=="object"&&"type"in e}const hy=_s(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function py(e,t,n,r){return(e.children.some(function(o){return hy(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gy(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Es.peek=my;function Es(e,t,n,r){const i=gy(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let s=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const c=s.charCodeAt(0),d=jn(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(s=cn(c)+s.slice(1));const u=s.charCodeAt(s.length-1),h=jn(r.after.charCodeAt(0),u,i);h.inside&&(s=s.slice(0,-1)+cn(u));const f=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+s+f}function my(e,t,n){return n.options.strong||"*"}function yy(e,t,n,r){return n.safe(e.value,r)}function by(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 vy(e,t,n){const r=(vs(n)+(n.options.ruleSpaces?" ":"")).repeat(by(n));return n.options.ruleSpaces?r.slice(0,-1):r}const xs={blockquote:Sm,break:Yo,code:Rm,definition:Lm,emphasis:ls,hardBreak:Yo,heading:Ym,html:ds,image:hs,imageReference:ps,inlineCode:gs,link:ys,linkReference:bs,list:iy,listItem:ay,paragraph:ly,root:py,strong:Es,text:yy,thematicBreak:vy};function _y(){return{enter:{table:Ey,tableData:Xo,tableHeader:Xo,tableRow:wy},exit:{codeText:ky,table:xy,tableData:Dr,tableHeader:Dr,tableRow:Dr}}}function Ey(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 xy(e){this.exit(e),this.data.inTable=void 0}function wy(e){this.enter({type:"tableRow",children:[]},e)}function Dr(e){this.exit(e)}function Xo(e){this.enter({type:"tableCell",children:[]},e)}function ky(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Sy));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Sy(e,t){return t==="|"?t:e}function Ay(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=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:s,tableRow:l}};function o(f,g,p,y){return c(d(f,p,y),f.align)}function l(f,g,p,y){const m=u(f,p,y),b=c([m]);return b.slice(0,b.indexOf(`
|
|
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 wm(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 Ny(){return{exit:{taskListCheckValueChecked:Qo,taskListCheckValueUnchecked:Qo,paragraph:Ty}}}function Oy(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Cy}}}function Qo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ty(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 Cy(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 Ry(){return[Kg(),hm(),ym(),_y(),Ny()]}function Iy(e){return{extensions:[Wg(),pm(e),bm(),Ay(e),Oy()]}}const Ly={tokenize:jy,partial:!0},ws={tokenize:Uy,partial:!0},ks={tokenize:zy,partial:!0},Ss={tokenize:qy,partial:!0},My={tokenize:$y,partial:!0},As={name:"wwwAutolink",tokenize:By,previous:Os},Ns={name:"protocolAutolink",tokenize:Fy,previous:Ts},lt={name:"emailAutolink",tokenize:Dy,previous:Cs},rt={};function Py(){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 Dy(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(My,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 By(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(Ly,e.attempt(ws,e.attempt(ks,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Fy(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 jy(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 Uy(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 zy(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 qy(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 $y(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 Hy={tokenize:Qy,partial:!0};function Gy(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Yy,continuation:{tokenize:Zy},exit:Xy}},text:{91:{name:"gfmFootnoteCall",tokenize:Vy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ky,resolveTo:Wy}}}}function Ky(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 Wy(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 Vy(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 Yy(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 Zy(e,t,n){return e.check(hn,t,e.attempt(Hy,t,n))}function Xy(e){e.exit("gfmFootnoteDefinition")}function Qy(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 Jy(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 eb{constructor(){this.map=[]}add(t,n,r){tb(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 tb(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 nb(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 rb(){return{flow:{null:{name:"table",tokenize:ib,resolveAll:ob}}}}function ib(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 ob(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 eb;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=nb(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 ab={name:"tasklistCheck",tokenize:sb};function lb(){return{text:{91:ab}}}function sb(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:cb},t,n)(s):n(s)}}function cb(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ub(e){return Rl([Py(),Gy(),Jy(e),rb(),lb()])}const fb={};function Rs(e){const t=this,n=e||fb,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ub(n)),a.push(Ry()),o.push(Iy(n))}const Is=function(e){if(e==null)return gb;if(typeof e=="function")return or(e);if(typeof e=="object")return Array.isArray(e)?db(e):hb(e);if(typeof e=="string")return pb(e);throw new Error("Expected function, string, or object as test")};function db(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 hb(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 pb(e){return or(t);function t(n){return n&&n.type===e}}function or(e){return t;function t(n,r,i){return!!(mb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function gb(){return!0}function mb(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 vb;if(typeof e=="string")return bb(e);if(typeof e=="object")return yb(e);if(typeof e=="function")return Fi(e);throw new Error("Expected function, string, or array as `test`")};function yb(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 bb(e){return Fi(t);function t(n){return n.tagName===e}}function Fi(e){return t;function t(n,r,i){return!!(_b(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vb(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function _b(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(Ob),Eb=wt("p"),ia=wt("tr"),xb=wt(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Nb,Tb]),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 wb(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,s.push(d))}return s.join("")}function Ms(e,t,n){return e.type==="element"?kb(e,t,n):e.type==="text"?n.whitespace==="normal"?Ps(e,n):Sb(e):[]}function kb(e,t,n){const r=Ds(e,n),i=e.children||[];let a=-1,o=[];if(xb(e))return o;let l,s;for(li(e)||ia(e)&&ea(t,e,ia)?s=`
|
|
31
|
+
`:Eb(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(Ab(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 Sb(e){return[String(e.value)]}function Ab(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 Nb(e){return!!(e.properties||{}).hidden}function Ob(e){return e.tagName==="td"||e.tagName==="th"}function Tb(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Cb(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 Rb(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=Cb(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 Ib(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 Lb(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 Mb(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 Pb(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 Db=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_-]*/}}),Bb=["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"],Fb=["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"],jb=[...Bb,...Fb],Ub=["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(),zb=["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(),qb=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),$b=["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 Hb(e){const t=e.regex,n=Db(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:":("+zb.join("|")+")"},{begin:":(:)?("+qb.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+$b.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:Ub.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+jb.join("|")+")\\b"}]}}function Gb(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 Kb(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 Wb(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 Vb(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 Yb(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$_]*",Zb=["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"],Xb=["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"],Qb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Jb=[].concat(Us,Fs,js);function ev(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:Zb,literal:Xb,built_in:Jb,"variable.language":Qb},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 tv(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])*",nv={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 rv(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=nv,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 iv=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"],av=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],lv=[...ov,...av],sv=["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(),cv=["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(),uv=zs.concat(qs).sort().reverse();function fv(e){const t=iv(e),n=uv,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:sv.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("+cv.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("+lv.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 dv(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 hv(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 pv(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 gv(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 mv(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 yv(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 bv(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 _v(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 Ev(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function xv(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 wv(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 kv(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 Sv=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"],Nv=["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"],Ov=[...Av,...Nv],Tv=["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(),Cv=["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(),Rv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Iv=["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 Lv(e){const t=Sv(e),n=Rv,r=Cv,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("+Ov.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("+Iv.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:Tv.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 Mv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Pv(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 Dv(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"("+(Dv(e).capture?"":"?:")+e.map(r=>$s(r)).join("|")+")"}const ji=e=>Se(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Bv=["Protocol","Type"].map(ji),la=["init","self"].map(ji),Fv=["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"],jv=["assignment","associativity","higherThan","left","lowerThan","none","right"],Uv=["#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,"*"),zv=["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"],qv=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function $v(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Be(...Bv,...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(Fv).map(ji),s={variants:[{className:"keyword",match:Be(...l,...la)}]},c={$pattern:Be(/\b\w+/,/#\w+/),keyword:o.concat(Uv),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:qv,contains:[...y,_,R]}]}},U={scope:"keyword",match:Se(/@/,Be(...zv),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:[...jv,...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 Hv(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 Gv(e){const t=e.regex,n=Hv(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 Kv(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 Wv(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 Vv(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 Yv(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 Zv={arduino:Rb,bash:Ib,c:Lb,cpp:Mb,csharp:Pb,css:Hb,diff:Gb,go:Kb,graphql:Wb,ini:Vb,java:Yb,javascript:ev,json:tv,kotlin:rv,less:fv,lua:dv,makefile:hv,markdown:pv,objectivec:gv,perl:mv,php:yv,"php-template":bv,plaintext:vv,python:_v,"python-repl":Ev,r:xv,ruby:wv,rust:kv,scss:Lv,shell:Mv,sql:Pv,swift:$v,typescript:Gv,vbnet:Kv,wasm:Wv,xml:Vv,yaml:Yv};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 Xv="</span>",fa=e=>!!e.scope,Qv=(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 Jv{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=Qv(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){fa(t)&&(this.buffer+=Xv)}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 e0 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 Jv(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 t0(e){return kt("(?:",e,")*")}function n0(e){return kt("(?:",e,")?")}function kt(...e){return e.map(n=>un(n)).join("")}function r0(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"("+(r0(e).capture?"":"?:")+e.map(r=>un(r)).join("|")+")"}function rc(e){return new RegExp(e.toString()+"|").exec("").length-1}function i0(e,t){const n=e&&e.exec(t);return n&&n.index===0}const o0=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([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=o0.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 a0=/\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]+)",l0="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",s0=(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},c0={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[fn]},u0={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[fn]},f0={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},d0=ar("//","$"),h0=ar("/\\*","\\*/"),p0=ar("#","$"),g0={scope:"number",begin:oc,relevance:0},m0={scope:"number",begin:ac,relevance:0},y0={scope:"number",begin:lc,relevance:0},b0={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[fn,{begin:/\[/,end:/\]/,relevance:0,contains:[fn]}]},v0={scope:"title",begin:ic,relevance:0},_0={scope:"title",begin:$i,relevance:0},E0={begin:"\\.\\s*"+$i,relevance:0},x0=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:c0,BACKSLASH_ESCAPE:fn,BINARY_NUMBER_MODE:y0,BINARY_NUMBER_RE:lc,COMMENT:ar,C_BLOCK_COMMENT_MODE:h0,C_LINE_COMMENT_MODE:d0,C_NUMBER_MODE:m0,C_NUMBER_RE:ac,END_SAME_AS_BEGIN:x0,HASH_COMMENT_MODE:p0,IDENT_RE:ic,MATCH_NOTHING_RE:a0,METHOD_GUARD:E0,NUMBER_MODE:g0,NUMBER_RE:oc,PHRASAL_WORDS_MODE:f0,QUOTE_STRING_MODE:u0,REGEXP_MODE:b0,RE_STARTERS_RE:l0,SHEBANG:s0,TITLE_MODE:v0,UNDERSCORE_IDENT_RE:$i,UNDERSCORE_TITLE_MODE:_0});function w0(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function k0(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function S0(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=w0,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function A0(e,t){Array.isArray(e.illegal)&&(e.illegal=zi(...e.illegal))}function N0(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 O0(e,t){e.relevance===void 0&&(e.relevance=1)}const T0=(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},C0=["of","and","for","in","not","or","if","then","parent","list","value"],R0="keyword";function sc(e,t,n=R0){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,I0(s[0],s[1])]})}}function I0(e,t){return t?Number(t):L0(e)?0:1}function L0(e){return C0.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 M0(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 P0(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 D0(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function B0(e){D0(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),M0(e),P0(e)}function F0(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;[k0,N0,B0,T0].forEach(d=>d(o,l)),e.compilerExtensions.forEach(d=>d(o,l)),o.__beforeBegin=null,[S0,A0,O0].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 j0(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 j0(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 U0="11.11.1";class z0 extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const jr=tc,ga=dt,ma=Symbol("nomatch"),q0=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:e0};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`),A=M,U=F),G===void 0&&(G=!0);const C={code:U,language:A};L("before:highlight",C);const P=C.result?C.result:u(C.language,C.code,G);return P.code=C.code,L("after:highlight",P),P}function u(M,F,G,U){const A=Object.create(null);function C(z,Y){return z.keywords[Y]}function P(){if(!K.keywords){ne.addText(te);return}let z=0;K.keywordPatternRe.lastIndex=0;let Y=K.keywordPatternRe.exec(te),J="";for(;Y;){J+=te.substring(z,Y.index);const oe=he.case_insensitive?Y[0].toLowerCase():Y[0],ae=C(K,oe);if(ae){const[ke,it]=ae;if(ne.addText(J),J="",A[oe]=(A[oe]||0)+1,A[oe]<=q0&&(ee+=it),ke.startsWith("_"))J+=Y[0];else{const We=he.classNameAliases[ke]||ke;$(Y[0],We)}}else J+=Y[0];z=K.keywordPatternRe.lastIndex,Y=K.keywordPatternRe.exec(te)}J+=te.substring(z),ne.addText(J)}function N(){if(te==="")return;let z=null;if(typeof K.subLanguage=="string"){if(!t[K.subLanguage]){ne.addText(te);return}z=u(K.subLanguage,te,!0,X[K.subLanguage]),X[K.subLanguage]=z._top}else z=f(te,K.subLanguage.length?K.subLanguage:null);K.relevance>0&&(ee+=z.relevance),ne.__addSublanguage(z._emitter,z.language)}function H(){K.subLanguage!=null?N():P(),te=""}function $(z,Y){z!==""&&(ne.startScope(Y),ne.addText(z),ne.endScope())}function D(z,Y){let J=1;const oe=Y.length-1;for(;J<=oe;){if(!z._emit[J]){J++;continue}const ae=he.classNameAliases[z[J]]||z[J],ke=Y[J];ae?$(ke,ae):(te=ke,P(),te=""),J++}}function q(z,Y){return z.scope&&typeof z.scope=="string"&&ne.openNode(he.classNameAliases[z.scope]||z.scope),z.beginScope&&(z.beginScope._wrap?($(te,he.classNameAliases[z.beginScope._wrap]||z.beginScope._wrap),te=""):z.beginScope._multi&&(D(z.beginScope,Y),te="")),K=Object.create(z,{parent:{value:K}}),K}function W(z,Y,J){let oe=i0(z.endRe,J);if(oe){if(z["on:end"]){const ae=new ua(z);z["on:end"](Y,ae),ae.isMatchIgnored&&(oe=!1)}if(oe){for(;z.endsParent&&z.parent;)z=z.parent;return z}}if(z.endsWithParent)return W(z.parent,Y,J)}function V(z){return K.matcher.regexIndex===0?(te+=z[0],1):(ge=!0,0)}function Q(z){const Y=z[0],J=z.rule,oe=new ua(J),ae=[J.__beforeBegin,J["on:begin"]];for(const ke of ae)if(ke&&(ke(z,oe),oe.isMatchIgnored))return V(Y);return J.skip?te+=Y:(J.excludeBegin&&(te+=Y),H(),!J.returnBegin&&!J.excludeBegin&&(te=Y)),q(J,z),J.returnBegin?0:Y.length}function ie(z){const Y=z[0],J=F.substring(z.index),oe=W(K,z,J);if(!oe)return ma;const ae=K;K.endScope&&K.endScope._wrap?(H(),$(Y,K.endScope._wrap)):K.endScope&&K.endScope._multi?(H(),D(K.endScope,z)):ae.skip?te+=Y:(ae.returnEnd||ae.excludeEnd||(te+=Y),H(),ae.excludeEnd&&(te=Y));do K.scope&&ne.closeNode(),!K.skip&&!K.subLanguage&&(ee+=K.relevance),K=K.parent;while(K!==oe.parent);return oe.starts&&q(oe.starts,z),ae.returnEnd?0:Y.length}function ce(){const z=[];for(let Y=K;Y!==he;Y=Y.parent)Y.scope&&z.unshift(Y.scope);z.forEach(Y=>ne.openNode(Y))}let ue={};function me(z,Y){const J=Y&&Y[0];if(te+=z,J==null)return H(),0;if(ue.type==="begin"&&Y.type==="end"&&ue.index===Y.index&&J===""){if(te+=F.slice(Y.index,Y.index+1),!i){const oe=new Error(`0 width match regex (${M})`);throw oe.languageName=M,oe.badRule=ue.rule,oe}return 1}if(ue=Y,Y.type==="begin")return Q(Y);if(Y.type==="illegal"&&!G){const oe=new Error('Illegal lexeme "'+J+'" for mode "'+(K.scope||"<unnamed>")+'"');throw oe.mode=K,oe}else if(Y.type==="end"){const oe=ie(Y);if(oe!==ma)return oe}if(Y.type==="illegal"&&J==="")return te+=`
|
|
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=F0(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 z0("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=U0,e.regex={concat:kt,lookahead:nc,either:zi,optional:n0,anyNumberOfTimes:t0};for(const M in On)typeof On[M]=="object"&&ec(On[M]);return Object.assign(e,On),e},Pt=fc({});Pt.newInstance=()=>fc({});var $0=Pt;Pt.HighlightJS=Pt;Pt.default=Pt;const H0=Yn($0),ya={},G0="hljs-";function K0(e){const t=H0.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:G0;if(!t.getLanguage(s))throw new Error("Unknown language: `"+s+"` is not registered");t.configure({__emitter:W0,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 W0{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 X0;if(typeof e=="function")return lr(e);if(typeof e=="object")return Array.isArray(e)?V0(e):Y0(e);if(typeof e=="string")return Z0(e);throw new Error("Expected function, string, or object as test")};function V0(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 Y0(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 Z0(e){return lr(t);function t(n){return n&&n.type===e}}function lr(e){return t;function t(n,r,i){return!!(Q0(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function X0(){return!0}function Q0(e){return e!==null&&typeof e=="object"&&"type"in e}const hc=[],J0=!0,ba=!1,e_="skip";function t_(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=n_(n(s,d)),f[0]===ba))return f;if("children"in s&&s.children){const m=s;if(m.children&&f[0]!==e_)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 n_(e){return Array.isArray(e)?e:typeof e=="number"?[J0,e]:e==null?hc:[e]}function r_(e,t,n,r){let i,a,o;a=t,o=n,i=r,t_(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 i_={};function pc(e){const t=e||i_,n=t.aliases,r=t.detect||!1,i=t.languages||Zv,a=t.plainText,o=t.prefix,l=t.subset;let s="hljs";const c=K0(i);if(n&&c.registerAlias(n),o){const d=o.indexOf("-");s=d===-1?o:o.slice(0,d)}return function(d,u){r_(d,"element",function(h,f,g){if(h.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const p=o_(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=wb(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 o_(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 a_({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 l_(){this.__data__=[],this.size=0}var s_=l_;function c_(e,t){return e===t||e!==e&&t!==t}var gc=c_,u_=gc;function f_(e,t){for(var n=e.length;n--;)if(u_(e[n][0],t))return n;return-1}var sr=f_,d_=sr,h_=Array.prototype,p_=h_.splice;function g_(e){var t=this.__data__,n=d_(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():p_.call(t,n,1),--this.size,!0}var m_=g_,y_=sr;function b_(e){var t=this.__data__,n=y_(t,e);return n<0?void 0:t[n][1]}var v_=b_,__=sr;function E_(e){return __(this.__data__,e)>-1}var x_=E_,w_=sr;function k_(e,t){var n=this.__data__,r=w_(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var S_=k_,A_=s_,N_=m_,O_=v_,T_=x_,C_=S_;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=A_;jt.prototype.delete=N_;jt.prototype.get=O_;jt.prototype.has=T_;jt.prototype.set=C_;var cr=jt,R_=cr;function I_(){this.__data__=new R_,this.size=0}var L_=I_;function M_(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var P_=M_;function D_(e){return this.__data__.get(e)}var B_=D_;function F_(e){return this.__data__.has(e)}var j_=F_,U_=typeof Le=="object"&&Le&&Le.Object===Object&&Le,mc=U_,z_=mc,q_=typeof self=="object"&&self&&self.Object===Object&&self,$_=z_||q_||Function("return this")(),st=$_,H_=st,G_=H_.Symbol,Hi=G_,va=Hi,yc=Object.prototype,K_=yc.hasOwnProperty,W_=yc.toString,Jt=va?va.toStringTag:void 0;function V_(e){var t=K_.call(e,Jt),n=e[Jt];try{e[Jt]=void 0;var r=!0}catch{}var i=W_.call(e);return r&&(t?e[Jt]=n:delete e[Jt]),i}var Y_=V_,Z_=Object.prototype,X_=Z_.toString;function Q_(e){return X_.call(e)}var J_=Q_,_a=Hi,eE=Y_,tE=J_,nE="[object Null]",rE="[object Undefined]",Ea=_a?_a.toStringTag:void 0;function iE(e){return e==null?e===void 0?rE:nE:Ea&&Ea in Object(e)?eE(e):tE(e)}var ur=iE;function oE(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bc=oE,aE=ur,lE=bc,sE="[object AsyncFunction]",cE="[object Function]",uE="[object GeneratorFunction]",fE="[object Proxy]";function dE(e){if(!lE(e))return!1;var t=aE(e);return t==cE||t==uE||t==sE||t==fE}var vc=dE,hE=st,pE=hE["__core-js_shared__"],gE=pE,Ur=gE,xa=function(){var e=/[^.]+$/.exec(Ur&&Ur.keys&&Ur.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mE(e){return!!xa&&xa in e}var yE=mE,bE=Function.prototype,vE=bE.toString;function _E(e){if(e!=null){try{return vE.call(e)}catch{}try{return e+""}catch{}}return""}var _c=_E,EE=vc,xE=yE,wE=bc,kE=_c,SE=/[\\^$.*+?()[\]{}|]/g,AE=/^\[object .+?Constructor\]$/,NE=Function.prototype,OE=Object.prototype,TE=NE.toString,CE=OE.hasOwnProperty,RE=RegExp("^"+TE.call(CE).replace(SE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function IE(e){if(!wE(e)||xE(e))return!1;var t=EE(e)?RE:AE;return t.test(kE(e))}var LE=IE;function ME(e,t){return e==null?void 0:e[t]}var PE=ME,DE=LE,BE=PE;function FE(e,t){var n=BE(e,t);return DE(n)?n:void 0}var Ut=FE,jE=Ut,UE=st,zE=jE(UE,"Map"),Gi=zE,qE=Ut,$E=qE(Object,"create"),fr=$E,wa=fr;function HE(){this.__data__=wa?wa(null):{},this.size=0}var GE=HE;function KE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var WE=KE,VE=fr,YE="__lodash_hash_undefined__",ZE=Object.prototype,XE=ZE.hasOwnProperty;function QE(e){var t=this.__data__;if(VE){var n=t[e];return n===YE?void 0:n}return XE.call(t,e)?t[e]:void 0}var JE=QE,ex=fr,tx=Object.prototype,nx=tx.hasOwnProperty;function rx(e){var t=this.__data__;return ex?t[e]!==void 0:nx.call(t,e)}var ix=rx,ox=fr,ax="__lodash_hash_undefined__";function lx(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ox&&t===void 0?ax:t,this}var sx=lx,cx=GE,ux=WE,fx=JE,dx=ix,hx=sx;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=cx;zt.prototype.delete=ux;zt.prototype.get=fx;zt.prototype.has=dx;zt.prototype.set=hx;var px=zt,ka=px,gx=cr,mx=Gi;function yx(){this.size=0,this.__data__={hash:new ka,map:new(mx||gx),string:new ka}}var bx=yx;function vx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var _x=vx,Ex=_x;function xx(e,t){var n=e.__data__;return Ex(t)?n[typeof t=="string"?"string":"hash"]:n.map}var dr=xx,wx=dr;function kx(e){var t=wx(this,e).delete(e);return this.size-=t?1:0,t}var Sx=kx,Ax=dr;function Nx(e){return Ax(this,e).get(e)}var Ox=Nx,Tx=dr;function Cx(e){return Tx(this,e).has(e)}var Rx=Cx,Ix=dr;function Lx(e,t){var n=Ix(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Mx=Lx,Px=bx,Dx=Sx,Bx=Ox,Fx=Rx,jx=Mx;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=Px;qt.prototype.delete=Dx;qt.prototype.get=Bx;qt.prototype.has=Fx;qt.prototype.set=jx;var Ec=qt,Ux=cr,zx=Gi,qx=Ec,$x=200;function Hx(e,t){var n=this.__data__;if(n instanceof Ux){var r=n.__data__;if(!zx||r.length<$x-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qx(r)}return n.set(e,t),this.size=n.size,this}var Gx=Hx,Kx=cr,Wx=L_,Vx=P_,Yx=B_,Zx=j_,Xx=Gx;function $t(e){var t=this.__data__=new Kx(e);this.size=t.size}$t.prototype.clear=Wx;$t.prototype.delete=Vx;$t.prototype.get=Yx;$t.prototype.has=Zx;$t.prototype.set=Xx;var Qx=$t,Jx="__lodash_hash_undefined__";function e1(e){return this.__data__.set(e,Jx),this}var t1=e1;function n1(e){return this.__data__.has(e)}var r1=n1,i1=Ec,o1=t1,a1=r1;function $n(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new i1;++t<n;)this.add(e[t])}$n.prototype.add=$n.prototype.push=o1;$n.prototype.has=a1;var l1=$n;function s1(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 c1=s1;function u1(e,t){return e.has(t)}var f1=u1,d1=l1,h1=c1,p1=f1,g1=1,m1=2;function y1(e,t,n,r,i,a){var o=n&g1,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&m1?new d1: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(!h1(t,function(m,b){if(!p1(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=y1,b1=st,v1=b1.Uint8Array,_1=v1;function E1(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var x1=E1;function w1(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var k1=w1,Sa=Hi,Aa=_1,S1=gc,A1=xc,N1=x1,O1=k1,T1=1,C1=2,R1="[object Boolean]",I1="[object Date]",L1="[object Error]",M1="[object Map]",P1="[object Number]",D1="[object RegExp]",B1="[object Set]",F1="[object String]",j1="[object Symbol]",U1="[object ArrayBuffer]",z1="[object DataView]",Na=Sa?Sa.prototype:void 0,zr=Na?Na.valueOf:void 0;function q1(e,t,n,r,i,a,o){switch(n){case z1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case U1:return!(e.byteLength!=t.byteLength||!a(new Aa(e),new Aa(t)));case R1:case I1:case P1:return S1(+e,+t);case L1:return e.name==t.name&&e.message==t.message;case D1:case F1:return e==t+"";case M1:var l=N1;case B1:var s=r&T1;if(l||(l=O1),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=C1,o.set(e,t);var d=A1(l(e),l(t),r,i,a,o);return o.delete(e),d;case j1:if(zr)return zr.call(e)==zr.call(t)}return!1}var $1=q1;function H1(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var G1=H1,K1=Array.isArray,Ki=K1,W1=G1,V1=Ki;function Y1(e,t,n){var r=t(e);return V1(e)?r:W1(r,n(e))}var Z1=Y1;function X1(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 Q1=X1;function J1(){return[]}var ew=J1,tw=Q1,nw=ew,rw=Object.prototype,iw=rw.propertyIsEnumerable,Oa=Object.getOwnPropertySymbols,ow=Oa?function(e){return e==null?[]:(e=Object(e),tw(Oa(e),function(t){return iw.call(e,t)}))}:nw,aw=ow;function lw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var sw=lw;function cw(e){return e!=null&&typeof e=="object"}var hr=cw,uw=ur,fw=hr,dw="[object Arguments]";function hw(e){return fw(e)&&uw(e)==dw}var pw=hw,Ta=pw,gw=hr,wc=Object.prototype,mw=wc.hasOwnProperty,yw=wc.propertyIsEnumerable,bw=Ta(function(){return arguments}())?Ta:function(e){return gw(e)&&mw.call(e,"callee")&&!yw.call(e,"callee")},vw=bw,Hn={exports:{}};function _w(){return!1}var Ew=_w;Hn.exports;(function(e,t){var n=st,r=Ew,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,xw=9007199254740991,ww=/^(?:0|[1-9]\d*)$/;function kw(e,t){var n=typeof e;return t=t??xw,!!t&&(n=="number"||n!="symbol"&&ww.test(e))&&e>-1&&e%1==0&&e<t}var Sw=kw,Aw=9007199254740991;function Nw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Aw}var Sc=Nw,Ow=ur,Tw=Sc,Cw=hr,Rw="[object Arguments]",Iw="[object Array]",Lw="[object Boolean]",Mw="[object Date]",Pw="[object Error]",Dw="[object Function]",Bw="[object Map]",Fw="[object Number]",jw="[object Object]",Uw="[object RegExp]",zw="[object Set]",qw="[object String]",$w="[object WeakMap]",Hw="[object ArrayBuffer]",Gw="[object DataView]",Kw="[object Float32Array]",Ww="[object Float64Array]",Vw="[object Int8Array]",Yw="[object Int16Array]",Zw="[object Int32Array]",Xw="[object Uint8Array]",Qw="[object Uint8ClampedArray]",Jw="[object Uint16Array]",ek="[object Uint32Array]",Te={};Te[Kw]=Te[Ww]=Te[Vw]=Te[Yw]=Te[Zw]=Te[Xw]=Te[Qw]=Te[Jw]=Te[ek]=!0;Te[Rw]=Te[Iw]=Te[Hw]=Te[Lw]=Te[Gw]=Te[Mw]=Te[Pw]=Te[Dw]=Te[Bw]=Te[Fw]=Te[jw]=Te[Uw]=Te[zw]=Te[qw]=Te[$w]=!1;function tk(e){return Cw(e)&&Tw(e.length)&&!!Te[Ow(e)]}var nk=tk;function rk(e){return function(t){return e(t)}}var ik=rk,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 ok=Gn.exports,ak=nk,lk=ik,Ca=ok,Ra=Ca&&Ca.isTypedArray,sk=Ra?lk(Ra):ak,Ac=sk,ck=sw,uk=vw,fk=Ki,dk=kc,hk=Sw,pk=Ac,gk=Object.prototype,mk=gk.hasOwnProperty;function yk(e,t){var n=fk(e),r=!n&&uk(e),i=!n&&!r&&dk(e),a=!n&&!r&&!i&&pk(e),o=n||r||i||a,l=o?ck(e.length,String):[],s=l.length;for(var c in e)(t||mk.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||hk(c,s)))&&l.push(c);return l}var bk=yk,vk=Object.prototype;function _k(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vk;return e===n}var Ek=_k;function xk(e,t){return function(n){return e(t(n))}}var wk=xk,kk=wk,Sk=kk(Object.keys,Object),Ak=Sk,Nk=Ek,Ok=Ak,Tk=Object.prototype,Ck=Tk.hasOwnProperty;function Rk(e){if(!Nk(e))return Ok(e);var t=[];for(var n in Object(e))Ck.call(e,n)&&n!="constructor"&&t.push(n);return t}var Ik=Rk,Lk=vc,Mk=Sc;function Pk(e){return e!=null&&Mk(e.length)&&!Lk(e)}var Dk=Pk,Bk=bk,Fk=Ik,jk=Dk;function Uk(e){return jk(e)?Bk(e):Fk(e)}var zk=Uk,qk=Z1,$k=aw,Hk=zk;function Gk(e){return qk(e,Hk,$k)}var Kk=Gk,Ia=Kk,Wk=1,Vk=Object.prototype,Yk=Vk.hasOwnProperty;function Zk(e,t,n,r,i,a){var o=n&Wk,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:Yk.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 Xk=Zk,Qk=Ut,Jk=st,eS=Qk(Jk,"DataView"),tS=eS,nS=Ut,rS=st,iS=nS(rS,"Promise"),oS=iS,aS=Ut,lS=st,sS=aS(lS,"Set"),cS=sS,uS=Ut,fS=st,dS=uS(fS,"WeakMap"),hS=dS,si=tS,ci=Gi,ui=oS,fi=cS,di=hS,Nc=ur,Ht=_c,La="[object Map]",pS="[object Object]",Ma="[object Promise]",Pa="[object Set]",Da="[object WeakMap]",Ba="[object DataView]",gS=Ht(si),mS=Ht(ci),yS=Ht(ui),bS=Ht(fi),vS=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==pS?e.constructor:void 0,r=n?Ht(n):"";if(r)switch(r){case gS:return Ba;case mS:return La;case yS:return Ma;case bS:return Pa;case vS:return Da}return t});var _S=gt,qr=Qx,ES=xc,xS=$1,wS=Xk,Fa=_S,ja=Ki,Ua=kc,kS=Ac,SS=1,za="[object Arguments]",qa="[object Array]",Tn="[object Object]",AS=Object.prototype,$a=AS.hasOwnProperty;function NS(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||kS(e)?ES(e,t,n,r,i,a):xS(e,t,s,n,r,i,a);if(!(n&SS)){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),wS(e,t,n,r,i,a)):!1}var OS=NS,TS=OS,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:TS(e,t,n,r,Oc,i)}var CS=Oc,RS=CS;function IS(e,t){return RS(e,t)}var LS=IS,Tc={exports:{}};/*!
|
|
36
|
+
* Quill Editor v1.3.7
|
|
37
|
+
* https://quilljs.com/
|
|
38
|
+
* Copyright (c) 2014, Jason Chen
|
|
39
|
+
* Copyright (c) 2013, salesforce.com
|
|
40
|
+
*/(function(e,t){(function(r,i){e.exports=i()})(typeof self<"u"?self:Le,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(a,o,l){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=109)}([function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(17),o=i(18),l=i(19),s=i(45),c=i(46),d=i(47),u=i(48),h=i(49),f=i(12),g=i(32),p=i(33),y=i(31),m=i(1),b={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:a.default,Format:o.default,Leaf:l.default,Embed:u.default,Scroll:s.default,Block:d.default,Inline:c.default,Text:h.default,Attributor:{Attribute:f.default,Class:g.default,Style:p.default,Store:y.default}};r.default=b},function(n,r,i){var a=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var _ in b)b.hasOwnProperty(_)&&(m[_]=b[_])};return function(m,b){y(m,b);function _(){this.constructor=m}m.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(y){a(m,y);function m(b){var _=this;return b="[Parchment] "+b,_=y.call(this,b)||this,_.message=b,_.name=_.constructor.name,_}return m}(Error);r.ParchmentError=o;var l={},s={},c={},d={};r.DATA_KEY="__blot";var u;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(u=r.Scope||(r.Scope={}));function h(y,m){var b=g(y);if(b==null)throw new o("Unable to create "+y+" blot");var _=b,v=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:_.create(m);return new _(v,m)}r.create=h;function f(y,m){return m===void 0&&(m=!1),y==null?null:y[r.DATA_KEY]!=null?y[r.DATA_KEY].blot:m?f(y.parentNode,m):null}r.find=f;function g(y,m){m===void 0&&(m=u.ANY);var b;if(typeof y=="string")b=d[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)b=d.text;else if(typeof y=="number")y&u.LEVEL&u.BLOCK?b=d.block:y&u.LEVEL&u.INLINE&&(b=d.inline);else if(y instanceof HTMLElement){var _=(y.getAttribute("class")||"").split(/\s+/);for(var v in _)if(b=s[_[v]],b)break;b=b||c[y.tagName]}return b==null?null:m&u.LEVEL&b.scope&&m&u.TYPE&b.scope?b:null}r.query=g;function p(){for(var y=[],m=0;m<arguments.length;m++)y[m]=arguments[m];if(y.length>1)return y.map(function(v){return p(v)});var b=y[0];if(typeof b.blotName!="string"&&typeof b.attrName!="string")throw new o("Invalid definition");if(b.blotName==="abstract")throw new o("Cannot register abstract class");if(d[b.blotName||b.attrName]=b,typeof b.keyName=="string")l[b.keyName]=b;else if(b.className!=null&&(s[b.className]=b),b.tagName!=null){Array.isArray(b.tagName)?b.tagName=b.tagName.map(function(v){return v.toUpperCase()}):b.tagName=b.tagName.toUpperCase();var _=Array.isArray(b.tagName)?b.tagName:[b.tagName];_.forEach(function(v){(c[v]==null||b.className==null)&&(c[v]=b)})}return b}r.register=p},function(n,r,i){var a=i(51),o=i(11),l=i(3),s=i(20),c="\0",d=function(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]};d.prototype.insert=function(u,h){var f={};return u.length===0?this:(f.insert=u,h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(f.attributes=h),this.push(f))},d.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},d.prototype.retain=function(u,h){if(u<=0)return this;var f={retain:u};return h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(f.attributes=h),this.push(f)},d.prototype.push=function(u){var h=this.ops.length,f=this.ops[h-1];if(u=l(!0,{},u),typeof f=="object"){if(typeof u.delete=="number"&&typeof f.delete=="number")return this.ops[h-1]={delete:f.delete+u.delete},this;if(typeof f.delete=="number"&&u.insert!=null&&(h-=1,f=this.ops[h-1],typeof f!="object"))return this.ops.unshift(u),this;if(o(u.attributes,f.attributes)){if(typeof u.insert=="string"&&typeof f.insert=="string")return this.ops[h-1]={insert:f.insert+u.insert},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof f.retain=="number")return this.ops[h-1]={retain:f.retain+u.retain},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this}}return h===this.ops.length?this.ops.push(u):this.ops.splice(h,0,u),this},d.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},d.prototype.filter=function(u){return this.ops.filter(u)},d.prototype.forEach=function(u){this.ops.forEach(u)},d.prototype.map=function(u){return this.ops.map(u)},d.prototype.partition=function(u){var h=[],f=[];return this.forEach(function(g){var p=u(g)?h:f;p.push(g)}),[h,f]},d.prototype.reduce=function(u,h){return this.ops.reduce(u,h)},d.prototype.changeLength=function(){return this.reduce(function(u,h){return h.insert?u+s.length(h):h.delete?u-h.delete:u},0)},d.prototype.length=function(){return this.reduce(function(u,h){return u+s.length(h)},0)},d.prototype.slice=function(u,h){u=u||0,typeof h!="number"&&(h=1/0);for(var f=[],g=s.iterator(this.ops),p=0;p<h&&g.hasNext();){var y;p<u?y=g.next(u-p):(y=g.next(h-p),f.push(y)),p+=s.length(y)}return new d(f)},d.prototype.compose=function(u){var h=s.iterator(this.ops),f=s.iterator(u.ops),g=[],p=f.peek();if(p!=null&&typeof p.retain=="number"&&p.attributes==null){for(var y=p.retain;h.peekType()==="insert"&&h.peekLength()<=y;)y-=h.peekLength(),g.push(h.next());p.retain-y>0&&f.next(p.retain-y)}for(var m=new d(g);h.hasNext()||f.hasNext();)if(f.peekType()==="insert")m.push(f.next());else if(h.peekType()==="delete")m.push(h.next());else{var b=Math.min(h.peekLength(),f.peekLength()),_=h.next(b),v=f.next(b);if(typeof v.retain=="number"){var E={};typeof _.retain=="number"?E.retain=b:E.insert=_.insert;var k=s.attributes.compose(_.attributes,v.attributes,typeof _.retain=="number");if(k&&(E.attributes=k),m.push(E),!f.hasNext()&&o(m.ops[m.ops.length-1],E)){var O=new d(h.rest());return m.concat(O).chop()}}else typeof v.delete=="number"&&typeof _.retain=="number"&&m.push(v)}return m.chop()},d.prototype.concat=function(u){var h=new d(this.ops.slice());return u.ops.length>0&&(h.push(u.ops[0]),h.ops=h.ops.concat(u.ops.slice(1))),h},d.prototype.diff=function(u,h){if(this.ops===u.ops)return new d;var f=[this,u].map(function(b){return b.map(function(_){if(_.insert!=null)return typeof _.insert=="string"?_.insert:c;var v=b===u?"on":"with";throw new Error("diff() called "+v+" non-document")}).join("")}),g=new d,p=a(f[0],f[1],h),y=s.iterator(this.ops),m=s.iterator(u.ops);return p.forEach(function(b){for(var _=b[1].length;_>0;){var v=0;switch(b[0]){case a.INSERT:v=Math.min(m.peekLength(),_),g.push(m.next(v));break;case a.DELETE:v=Math.min(_,y.peekLength()),y.next(v),g.delete(v);break;case a.EQUAL:v=Math.min(y.peekLength(),m.peekLength(),_);var E=y.next(v),k=m.next(v);o(E.insert,k.insert)?g.retain(v,s.attributes.diff(E.attributes,k.attributes)):g.push(k).delete(v);break}_-=v}}),g.chop()},d.prototype.eachLine=function(u,h){h=h||`
|
|
41
|
+
`;for(var f=s.iterator(this.ops),g=new d,p=0;f.hasNext();){if(f.peekType()!=="insert")return;var y=f.peek(),m=s.length(y)-f.peekLength(),b=typeof y.insert=="string"?y.insert.indexOf(h,m)-m:-1;if(b<0)g.push(f.next());else if(b>0)g.push(f.next(b));else{if(u(g,f.next(1).attributes||{},p)===!1)return;p+=1,g=new d}}g.length()>0&&u(g,{},p)},d.prototype.transform=function(u,h){if(h=!!h,typeof u=="number")return this.transformPosition(u,h);for(var f=s.iterator(this.ops),g=s.iterator(u.ops),p=new d;f.hasNext()||g.hasNext();)if(f.peekType()==="insert"&&(h||g.peekType()!=="insert"))p.retain(s.length(f.next()));else if(g.peekType()==="insert")p.push(g.next());else{var y=Math.min(f.peekLength(),g.peekLength()),m=f.next(y),b=g.next(y);if(m.delete)continue;b.delete?p.push(b):p.retain(y,s.attributes.transform(m.attributes,b.attributes,h))}return p.chop()},d.prototype.transformPosition=function(u,h){h=!!h;for(var f=s.iterator(this.ops),g=0;f.hasNext()&&g<=u;){var p=f.peekLength(),y=f.peekType();if(f.next(),y==="delete"){u-=Math.min(p,u-g);continue}else y==="insert"&&(g<u||!h)&&(u+=p);g+=p}return u},n.exports=d},function(n,r){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):a.call(f)==="[object Array]"},c=function(f){if(!f||a.call(f)!=="[object Object]")return!1;var g=i.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&i.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!g&&!p)return!1;var y;for(y in f);return typeof y>"u"||i.call(f,y)},d=function(f,g){o&&g.name==="__proto__"?o(f,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):f[g.name]=g.newValue},u=function(f,g){if(g==="__proto__")if(i.call(f,g)){if(l)return l(f,g).value}else return;return f[g]};n.exports=function h(){var f,g,p,y,m,b,_=arguments[0],v=1,E=arguments.length,k=!1;for(typeof _=="boolean"&&(k=_,_=arguments[1]||{},v=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});v<E;++v)if(f=arguments[v],f!=null)for(g in f)p=u(_,g),y=u(f,g),_!==y&&(k&&y&&(c(y)||(m=s(y)))?(m?(m=!1,b=p&&s(p)?p:[]):b=p&&c(p)?p:{},d(_,{name:g,newValue:h(k,b,y)})):typeof y<"u"&&d(_,{name:g,newValue:y}));return _}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var a=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}}(),o=function w(S,I,L){S===null&&(S=Function.prototype);var B=Object.getOwnPropertyDescriptor(S,I);if(B===void 0){var M=Object.getPrototypeOf(S);return M===null?void 0:w(M,I,L)}else{if("value"in B)return B.value;var F=B.get;return F===void 0?void 0:F.call(L)}},l=i(3),s=_(l),c=i(2),d=_(c),u=i(0),h=_(u),f=i(16),g=_(f),p=i(6),y=_(p),m=i(7),b=_(m);function _(w){return w&&w.__esModule?w:{default:w}}function v(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")}function E(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 k(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 O=1,T=function(w){k(S,w);function S(){return v(this,S),E(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return a(S,[{key:"attach",value:function(){o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"attach",this).call(this),this.attributes=new h.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,s.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(L,B){var M=h.default.query(L,h.default.Scope.BLOCK_ATTRIBUTE);M!=null&&this.attributes.attribute(M,B)}},{key:"formatAt",value:function(L,B,M,F){this.format(M,F)}},{key:"insertAt",value:function(L,B,M){if(typeof B=="string"&&B.endsWith(`
|
|
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,`
|
|
56
|
+
`).replace(/\r/g,`
|
|
57
|
+
`),this.scroll.insertAt(C,P),Object.keys(H).forEach(function($){N.scroll.formatAt(C,P.length,$,H[$])}),this.update(new c.default().retain(C).insert(P,(0,O.default)(H)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var C=this.scroll.children.head;return C.statics.blotName!==_.default.blotName||C.children.length>1?!1:C.children.head instanceof E.default}},{key:"removeFormat",value:function(C,P){var N=this.getText(C,P),H=this.scroll.line(C+P),$=o(H,2),D=$[0],q=$[1],W=0,V=new c.default;D!=null&&(D instanceof p.default?W=D.newlineIndex(q)-q+1:W=D.length()-q,V=D.delta().slice(q,q+W-1).insert(`
|
|
58
|
+
`));var Q=this.getContents(C,P+W),ie=Q.diff(new c.default().insert(N).concat(V)),ce=new c.default().retain(C).concat(ie);return this.applyDelta(ce)}},{key:"update",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,H=this.delta;if(P.length===1&&P[0].type==="characterData"&&P[0].target.data.match(B)&&f.default.find(P[0].target)){var $=f.default.find(P[0].target),D=(0,b.bubbleFormats)($),q=$.offset(this.scroll),W=P[0].oldValue.replace(m.default.CONTENTS,""),V=new c.default().insert(W),Q=new c.default().insert($.value()),ie=new c.default().retain(q).concat(V.diff(Q,N));C=ie.reduce(function(ce,ue){return ue.insert?ce.insert(ue.insert,D):ce.push(ue)},new c.default),this.delta=H.compose(C)}else this.delta=this.getDelta(),(!C||!(0,R.default)(H.compose(C),this.delta))&&(C=H.diff(this.delta,N));return C}}]),U}();function F(U,A){return Object.keys(A).reduce(function(C,P){return U[P]==null||(A[P]===U[P]?C[P]=A[P]:Array.isArray(A[P])?A[P].indexOf(U[P])<0&&(C[P]=A[P].concat([U[P]])):C[P]=[A[P],U[P]]),C},{})}function G(U){return U.reduce(function(A,C){if(C.insert===1){var P=(0,O.default)(C.attributes);return delete P.image,A.insert({image:C.attributes.image},P)}if(C.attributes!=null&&(C.attributes.list===!0||C.attributes.bullet===!0)&&(C=(0,O.default)(C),C.attributes.list?C.attributes.list="ordered":(C.attributes.list="bullet",delete C.attributes.bullet)),typeof C.insert=="string"){var N=C.insert.replace(/\r\n/g,`
|
|
59
|
+
`).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
|
+
`)&&(L=L.slice(0,-1)),M.insertAt(0,L,B)}else{var F=c.default.create(L,B);this.appendChild(F)}else l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertAt",this).call(this,I,L,B);this.optimize()}}},{key:"insertBefore",value:function(I,L){if(I.statics.scope===c.default.Scope.INLINE_BLOT){var B=c.default.create(this.statics.defaultChild);B.appendChild(I),I=B}l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,I,L)}},{key:"leaf",value:function(I){return this.path(I).pop()||[null,-1]}},{key:"line",value:function(I){return I===this.length()?this.line(I-1):this.descendant(T,I)}},{key:"lines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,B=function M(F,G,U){var A=[],C=U;return F.children.forEachAt(G,U,function(P,N,H){T(P)?A.push(P):P instanceof c.default.Container&&(A=A.concat(M(P,N,C))),C-=H}),A};return B(this,I,L)}},{key:"optimize",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,I,L),I.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,I,L))}},{key:"path",value:function(I){return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"path",this).call(this,I).slice(1)}},{key:"update",value:function(I){if(this.batch!==!0){var L=u.default.sources.USER;typeof I=="string"&&(L=I),Array.isArray(I)||(I=this.observer.takeRecords()),I.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,L,I),l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"update",this).call(this,I.concat([])),I.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,L,I)}}}]),w}(c.default.Scroll);R.blotName="scroll",R.className="ql-editor",R.tagName="DIV",R.defaultChild="block",R.allowedChildren=[f.default,h.BlockEmbed,_.default],r.default=R},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},o=function(){function D(q,W){var V=[],Q=!0,ie=!1,ce=void 0;try{for(var ue=q[Symbol.iterator](),me;!(Q=(me=ue.next()).done)&&(V.push(me.value),!(W&&V.length===W));Q=!0);}catch(he){ie=!0,ce=he}finally{try{!Q&&ue.return&&ue.return()}finally{if(ie)throw ce}}return V}return function(q,W){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return D(q,W);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function D(q,W){for(var V=0;V<W.length;V++){var Q=W[V];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(q,Q.key,Q)}}return function(q,W,V){return W&&D(q.prototype,W),V&&D(q,V),q}}(),s=i(21),c=x(s),d=i(11),u=x(d),h=i(3),f=x(h),g=i(2),p=x(g),y=i(20),m=x(y),b=i(0),_=x(b),v=i(5),E=x(v),k=i(10),O=x(k),T=i(9),R=x(T);function x(D){return D&&D.__esModule?D:{default:D}}function w(D,q,W){return q in D?Object.defineProperty(D,q,{value:W,enumerable:!0,configurable:!0,writable:!0}):D[q]=W,D}function S(D,q){if(!(D instanceof q))throw new TypeError("Cannot call a class as a function")}function I(D,q){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:D}function L(D,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);D.prototype=Object.create(q&&q.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(D,q):D.__proto__=q)}var B=(0,O.default)("quill:keyboard"),M=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",F=function(D){L(q,D),l(q,null,[{key:"match",value:function(V,Q){return Q=$(Q),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ie){return!!Q[ie]!==V[ie]&&Q[ie]!==null})?!1:Q.key===(V.which||V.keyCode)}}]);function q(W,V){S(this,q);var Q=I(this,(q.__proto__||Object.getPrototypeOf(q)).call(this,W,V));return Q.bindings={},Object.keys(Q.options.bindings).forEach(function(ie){ie==="list autofill"&&W.scroll.whitelist!=null&&!W.scroll.whitelist.list||Q.options.bindings[ie]&&Q.addBinding(Q.options.bindings[ie])}),Q.addBinding({key:q.keys.ENTER,shiftKey:null},P),Q.addBinding({key:q.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Q.addBinding({key:q.keys.BACKSPACE},{collapsed:!0},U),Q.addBinding({key:q.keys.DELETE},{collapsed:!0},A)):(Q.addBinding({key:q.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},U),Q.addBinding({key:q.keys.DELETE},{collapsed:!0,suffix:/^.?$/},A)),Q.addBinding({key:q.keys.BACKSPACE},{collapsed:!1},C),Q.addBinding({key:q.keys.DELETE},{collapsed:!1},C),Q.addBinding({key:q.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},U),Q.listen(),Q}return l(q,[{key:"addBinding",value:function(V){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ce=$(V);if(ce==null||ce.key==null)return B.warn("Attempted to add invalid keyboard binding",ce);typeof Q=="function"&&(Q={handler:Q}),typeof ie=="function"&&(ie={handler:ie}),ce=(0,f.default)(ce,Q,ie),this.bindings[ce.key]=this.bindings[ce.key]||[],this.bindings[ce.key].push(ce)}},{key:"listen",value:function(){var V=this;this.quill.root.addEventListener("keydown",function(Q){if(!Q.defaultPrevented){var ie=Q.which||Q.keyCode,ce=(V.bindings[ie]||[]).filter(function(ae){return q.match(Q,ae)});if(ce.length!==0){var ue=V.quill.getSelection();if(!(ue==null||!V.quill.hasFocus())){var me=V.quill.getLine(ue.index),he=o(me,2),de=he[0],we=he[1],K=V.quill.getLeaf(ue.index),X=o(K,2),ne=X[0],te=X[1],ee=ue.length===0?[ne,te]:V.quill.getLeaf(ue.index+ue.length),fe=o(ee,2),pe=fe[0],ge=fe[1],z=ne instanceof _.default.Text?ne.value().slice(0,te):"",Y=pe instanceof _.default.Text?pe.value().slice(ge):"",J={collapsed:ue.length===0,empty:ue.length===0&&de.length()<=1,format:V.quill.getFormat(ue),offset:we,prefix:z,suffix:Y},oe=ce.some(function(ae){if(ae.collapsed!=null&&ae.collapsed!==J.collapsed||ae.empty!=null&&ae.empty!==J.empty||ae.offset!=null&&ae.offset!==J.offset)return!1;if(Array.isArray(ae.format)){if(ae.format.every(function(ke){return J.format[ke]==null}))return!1}else if(a(ae.format)==="object"&&!Object.keys(ae.format).every(function(ke){return ae.format[ke]===!0?J.format[ke]!=null:ae.format[ke]===!1?J.format[ke]==null:(0,u.default)(ae.format[ke],J.format[ke])}))return!1;return ae.prefix!=null&&!ae.prefix.test(J.prefix)||ae.suffix!=null&&!ae.suffix.test(J.suffix)?!1:ae.handler.call(V,ue,J)!==!0});oe&&Q.preventDefault()}}}})}}]),q}(R.default);F.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},F.DEFAULTS={bindings:{bold:H("bold"),italic:H("italic"),underline:H("underline"),indent:{key:F.keys.TAB,format:["blockquote","indent","list"],handler:function(q,W){if(W.collapsed&&W.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:F.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(q,W){if(W.collapsed&&W.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:F.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(q,W){W.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):W.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":N(!0),"outdent code-block":N(!1),"remove tab":{key:F.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(q){this.quill.deleteText(q.index-1,1,E.default.sources.USER)}},tab:{key:F.keys.TAB,handler:function(q){this.quill.history.cutoff();var W=new p.default().retain(q.index).delete(q.length).insert(" ");this.quill.updateContents(W,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(q.index+1,E.default.sources.SILENT)}},"list empty enter":{key:F.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(q,W){this.quill.format("list",!1,E.default.sources.USER),W.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:F.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(q){var W=this.quill.getLine(q.index),V=o(W,2),Q=V[0],ie=V[1],ce=(0,f.default)({},Q.formats(),{list:"checked"}),ue=new p.default().retain(q.index).insert(`
|
|
62
|
+
`,ce).retain(Q.length()-ie-1).retain(1,{list:"unchecked"});this.quill.updateContents(ue,E.default.sources.USER),this.quill.setSelection(q.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:F.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(q,W){var V=this.quill.getLine(q.index),Q=o(V,2),ie=Q[0],ce=Q[1],ue=new p.default().retain(q.index).insert(`
|
|
63
|
+
`,W.format).retain(ie.length()-ce-1).retain(1,{header:null});this.quill.updateContents(ue,E.default.sources.USER),this.quill.setSelection(q.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(q,W){var V=W.prefix.length,Q=this.quill.getLine(q.index),ie=o(Q,2),ce=ie[0],ue=ie[1];if(ue>V)return!0;var me=void 0;switch(W.prefix.trim()){case"[]":case"[ ]":me="unchecked";break;case"[x]":me="checked";break;case"-":case"*":me="bullet";break;default:me="ordered"}this.quill.insertText(q.index," ",E.default.sources.USER),this.quill.history.cutoff();var he=new p.default().retain(q.index-ue).delete(V+1).retain(ce.length()-2-ue).retain(1,{list:me});this.quill.updateContents(he,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(q.index-V,E.default.sources.SILENT)}},"code exit":{key:F.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(q){var W=this.quill.getLine(q.index),V=o(W,2),Q=V[0],ie=V[1],ce=new p.default().retain(q.index+Q.length()-ie-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ce,E.default.sources.USER)}},"embed left":G(F.keys.LEFT,!1),"embed left shift":G(F.keys.LEFT,!0),"embed right":G(F.keys.RIGHT,!1),"embed right shift":G(F.keys.RIGHT,!0)}};function G(D,q){var W,V=D===F.keys.LEFT?"prefix":"suffix";return W={key:D,shiftKey:q,altKey:null},w(W,V,/^$/),w(W,"handler",function(ie){var ce=ie.index;D===F.keys.RIGHT&&(ce+=ie.length+1);var ue=this.quill.getLeaf(ce),me=o(ue,1),he=me[0];return he instanceof _.default.Embed?(D===F.keys.LEFT?q?this.quill.setSelection(ie.index-1,ie.length+1,E.default.sources.USER):this.quill.setSelection(ie.index-1,E.default.sources.USER):q?this.quill.setSelection(ie.index,ie.length+1,E.default.sources.USER):this.quill.setSelection(ie.index+ie.length+1,E.default.sources.USER),!1):!0}),W}function U(D,q){if(!(D.index===0||this.quill.getLength()<=1)){var W=this.quill.getLine(D.index),V=o(W,1),Q=V[0],ie={};if(q.offset===0){var ce=this.quill.getLine(D.index-1),ue=o(ce,1),me=ue[0];if(me!=null&&me.length()>1){var he=Q.formats(),de=this.quill.getFormat(D.index-1,1);ie=m.default.attributes.diff(he,de)||{}}}var we=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(q.prefix)?2:1;this.quill.deleteText(D.index-we,we,E.default.sources.USER),Object.keys(ie).length>0&&this.quill.formatLine(D.index-we,we,ie,E.default.sources.USER),this.quill.focus()}}function A(D,q){var W=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(q.suffix)?2:1;if(!(D.index>=this.quill.getLength()-W)){var V={},Q=0,ie=this.quill.getLine(D.index),ce=o(ie,1),ue=ce[0];if(q.offset>=ue.length()-1){var me=this.quill.getLine(D.index+1),he=o(me,1),de=he[0];if(de){var we=ue.formats(),K=this.quill.getFormat(D.index,1);V=m.default.attributes.diff(we,K)||{},Q=de.length()}}this.quill.deleteText(D.index,W,E.default.sources.USER),Object.keys(V).length>0&&this.quill.formatLine(D.index+Q-1,W,V,E.default.sources.USER)}}function C(D){var q=this.quill.getLines(D),W={};if(q.length>1){var V=q[0].formats(),Q=q[q.length-1].formats();W=m.default.attributes.diff(Q,V)||{}}this.quill.deleteText(D,E.default.sources.USER),Object.keys(W).length>0&&this.quill.formatLine(D.index,1,W,E.default.sources.USER),this.quill.setSelection(D.index,E.default.sources.SILENT),this.quill.focus()}function P(D,q){var W=this;D.length>0&&this.quill.scroll.deleteAt(D.index,D.length);var V=Object.keys(q.format).reduce(function(Q,ie){return _.default.query(ie,_.default.Scope.BLOCK)&&!Array.isArray(q.format[ie])&&(Q[ie]=q.format[ie]),Q},{});this.quill.insertText(D.index,`
|
|
64
|
+
`,V,E.default.sources.USER),this.quill.setSelection(D.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(q.format).forEach(function(Q){V[Q]==null&&(Array.isArray(q.format[Q])||Q!=="link"&&W.quill.format(Q,q.format[Q],E.default.sources.USER))})}function N(D){return{key:F.keys.TAB,shiftKey:!D,format:{"code-block":!0},handler:function(W){var V=_.default.query("code-block"),Q=W.index,ie=W.length,ce=this.quill.scroll.descendant(V,Q),ue=o(ce,2),me=ue[0],he=ue[1];if(me!=null){var de=this.quill.getIndex(me),we=me.newlineIndex(he,!0)+1,K=me.newlineIndex(de+he+ie),X=me.domNode.textContent.slice(we,K).split(`
|
|
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
|
+
`)&&J.ops[J.ops.length-1].attributes==null&&(J=J.compose(new u.default().retain(J.length()-1).delete(1))),F.log("convert",this.container.innerHTML,J),this.container.innerHTML="",J}},{key:"dangerouslyPasteHTML",value:function(te,ee){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof te=="string")this.quill.setContents(this.convert(te),ee),this.quill.setSelection(0,p.default.sources.SILENT);else{var pe=this.convert(ee);this.quill.updateContents(new u.default().retain(te).concat(pe),fe),this.quill.setSelection(te+pe.length(),p.default.sources.SILENT)}}},{key:"onPaste",value:function(te){var ee=this;if(!(te.defaultPrevented||!this.quill.isEnabled())){var fe=this.quill.getSelection(),pe=new u.default().retain(fe.index),ge=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(p.default.sources.SILENT),setTimeout(function(){pe=pe.concat(ee.convert()).delete(fe.length),ee.quill.updateContents(pe,p.default.sources.USER),ee.quill.setSelection(pe.length()-fe.length,p.default.sources.SILENT),ee.quill.scrollingContainer.scrollTop=ge,ee.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var te=this,ee=[],fe=[];return this.matchers.forEach(function(pe){var ge=o(pe,2),z=ge[0],Y=ge[1];switch(z){case Node.TEXT_NODE:fe.push(Y);break;case Node.ELEMENT_NODE:ee.push(Y);break;default:[].forEach.call(te.container.querySelectorAll(z),function(J){J[G]=J[G]||[],J[G].push(Y)});break}}),[ee,fe]}}]),X}(_.default);P.DEFAULTS={matchers:[],matchVisual:!0};function N(K,X,ne){return(typeof X>"u"?"undefined":a(X))==="object"?Object.keys(X).reduce(function(te,ee){return N(te,ee,X[ee])},K):K.reduce(function(te,ee){return ee.attributes&&ee.attributes[X]?te.push(ee):te.insert(ee.insert,(0,c.default)({},I({},X,ne),ee.attributes))},new u.default)}function H(K){if(K.nodeType!==Node.ELEMENT_NODE)return{};var X="__ql-computed-style";return K[X]||(K[X]=window.getComputedStyle(K))}function $(K,X){for(var ne="",te=K.ops.length-1;te>=0&&ne.length<X.length;--te){var ee=K.ops[te];if(typeof ee.insert!="string")break;ne=ee.insert+ne}return ne.slice(-1*X.length)===X}function D(K){if(K.childNodes.length===0)return!1;var X=H(K);return["block","list-item"].indexOf(X.display)>-1}function q(K,X,ne){return K.nodeType===K.TEXT_NODE?ne.reduce(function(te,ee){return ee(K,te)},new u.default):K.nodeType===K.ELEMENT_NODE?[].reduce.call(K.childNodes||[],function(te,ee){var fe=q(ee,X,ne);return ee.nodeType===K.ELEMENT_NODE&&(fe=X.reduce(function(pe,ge){return ge(ee,pe)},fe),fe=(ee[G]||[]).reduce(function(pe,ge){return ge(ee,pe)},fe)),te.concat(fe)},new u.default):new u.default}function W(K,X,ne){return N(ne,K,!0)}function V(K,X){var ne=f.default.Attributor.Attribute.keys(K),te=f.default.Attributor.Class.keys(K),ee=f.default.Attributor.Style.keys(K),fe={};return ne.concat(te).concat(ee).forEach(function(pe){var ge=f.default.query(pe,f.default.Scope.ATTRIBUTE);ge!=null&&(fe[ge.attrName]=ge.value(K),fe[ge.attrName])||(ge=A[pe],ge!=null&&(ge.attrName===pe||ge.keyName===pe)&&(fe[ge.attrName]=ge.value(K)||void 0),ge=C[pe],ge!=null&&(ge.attrName===pe||ge.keyName===pe)&&(ge=C[pe],fe[ge.attrName]=ge.value(K)||void 0))}),Object.keys(fe).length>0&&(X=N(X,fe)),X}function Q(K,X){var ne=f.default.query(K);if(ne==null)return X;if(ne.prototype instanceof f.default.Embed){var te={},ee=ne.value(K);ee!=null&&(te[ne.blotName]=ee,X=new u.default().insert(te,ne.formats(K)))}else typeof ne.formats=="function"&&(X=N(X,ne.blotName,ne.formats(K)));return X}function ie(K,X){return $(X,`
|
|
68
|
+
`)||X.insert(`
|
|
69
|
+
`),X}function ce(){return new u.default}function ue(K,X){var ne=f.default.query(K);if(ne==null||ne.blotName!=="list-item"||!$(X,`
|
|
70
|
+
`))return X;for(var te=-1,ee=K.parentNode;!ee.classList.contains("ql-clipboard");)(f.default.query(ee)||{}).blotName==="list"&&(te+=1),ee=ee.parentNode;return te<=0?X:X.compose(new u.default().retain(X.length()-1).retain(1,{indent:te}))}function me(K,X){return $(X,`
|
|
71
|
+
`)||(D(K)||X.length()>0&&K.nextSibling&&D(K.nextSibling))&&X.insert(`
|
|
72
|
+
`),X}function he(K,X){if(D(K)&&K.nextElementSibling!=null&&!$(X,`
|
|
73
|
+
|
|
74
|
+
`)){var ne=K.offsetHeight+parseFloat(H(K).marginTop)+parseFloat(H(K).marginBottom);K.nextElementSibling.offsetTop>K.offsetTop+ne*1.5&&X.insert(`
|
|
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 MS=Tc.exports,PS=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)},DS=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(le),BS=pr(Mu),en=pr(LS),Ga=pr(MS),FS=function(e){PS(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),DS(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=BS.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 jS=FS;const US=Yn(jS);function zS({article:e,categories:t=[],tags:n=[],onSave:r,onCancel:i,loading:a=!1}){const[o,l]=le.useState(""),[s,c]=le.useState(""),[d,u]=le.useState(Ie.Draft),[h,f]=le.useState(null),[g,p]=le.useState(""),[y,m]=le.useState([]),[b,_]=le.useState(""),[v,E]=le.useState({});le.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("div",{className:`rounded-md border ${v.content?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:j.jsx(US,{theme:"snow",value:s,onChange:c,placeholder:"Write your article content...",modules:{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"]]},formats:["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],style:{minHeight:"400px"}})}),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 qS({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:a="400px"}){const[o,l]=le.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"]})]})]})]})}/**
|
|
36
76
|
* @license lucide-react v0.462.0 - ISC
|
|
37
77
|
*
|
|
38
78
|
* This source code is licensed under the ISC license.
|
|
39
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
80
|
+
*/const $S=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
41
81
|
* @license lucide-react v0.462.0 - ISC
|
|
42
82
|
*
|
|
43
83
|
* This source code is licensed under the ISC license.
|
|
44
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var
|
|
85
|
+
*/var HS={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"};/**
|
|
46
86
|
* @license lucide-react v0.462.0 - ISC
|
|
47
87
|
*
|
|
48
88
|
* This source code is licensed under the ISC license.
|
|
49
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
90
|
+
*/const GS=le.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},s)=>le.createElement("svg",{ref:s,...HS,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Cc("lucide",i),...l},[...o.map(([c,d])=>le.createElement(c,d)),...Array.isArray(a)?a:[a]]));/**
|
|
51
91
|
* @license lucide-react v0.462.0 - ISC
|
|
52
92
|
*
|
|
53
93
|
* This source code is licensed under the ISC license.
|
|
54
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const
|
|
95
|
+
*/const Wi=(e,t)=>{const n=le.forwardRef(({className:r,...i},a)=>le.createElement(GS,{ref:a,iconNode:t,className:Cc(`lucide-${$S(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
56
96
|
* @license lucide-react v0.462.0 - ISC
|
|
57
97
|
*
|
|
58
98
|
* This source code is licensed under the ISC license.
|
|
59
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const
|
|
100
|
+
*/const KS=Wi("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"}]]);/**
|
|
61
101
|
* @license lucide-react v0.462.0 - ISC
|
|
62
102
|
*
|
|
63
103
|
* This source code is licensed under the ISC license.
|
|
64
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
105
|
+
*/const Rc=Wi("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"}]]);/**
|
|
66
106
|
* @license lucide-react v0.462.0 - ISC
|
|
67
107
|
*
|
|
68
108
|
* This source code is licensed under the ISC license.
|
|
69
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const cl=fi("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 jE({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:a,showActions:o=!1,emptyMessage:s="No categories found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:s})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:E.jsx(ll,{className:"h-4 w-4"})}),a&&E.jsx("button",{onClick:()=>a(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:E.jsx(cl,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function HE({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:a=!1}){const[o,s]=$.useState(""),[l,c]=$.useState(null),[u,d]=$.useState({});$.useEffect(()=>{e?(s(e.title),c(e.parentId||null)):p()},[e,n]);const p=()=>{s(""),c(null),d({})},f=()=>{const m={};return o.trim()||(m.title="Title is required"),d(m),Object.keys(m).length===0},g=async m=>{if(m.preventDefault(),!f())return;const b={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...b}):await i(b),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const h=t.filter(m=>m.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),E.jsxs("form",{onSubmit:g,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:m=>s(m.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),h.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),E.jsxs("select",{id:"parent",value:l||"",onChange:m=>c(m.target.value?Number(m.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"None (Top Level)"}),h.map(m=>E.jsx("option",{value:m.categoryId,children:m.title},m.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.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"}),E.jsx("button",{type:"submit",disabled:a,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:a?"Saving...":e?"Update":"Create"})]})]})]})})}function GE({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:a,onMergeClick:o,showActions:s=!1,emptyMessage:l="No tags found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),s&&(i||a||o)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:E.jsx(ll,{className:"h-4 w-4"})}),o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:E.jsx($E,{className:"h-4 w-4"})}),a&&E.jsx("button",{onClick:()=>a(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:E.jsx(cl,{className:"h-4 w-4"})})]})]},c.tagId))})}function qE({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[a,o]=$.useState(""),[s,l]=$.useState(""),[c,u]=$.useState({});$.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},p=()=>{const g={};return a.trim()||(g.title="Title is required"),u(g),Object.keys(g).length===0},f=async g=>{if(g.preventDefault(),!p())return;const h={title:a.trim(),slug:s.trim()||void 0};try{e?await r({tagId:e.tagId,...h}):await r(h),n()}catch(m){console.error("Failed to save tag:",m)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value: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&&E.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),E.jsx("input",{id:"slug",type:"text",value:s,onChange:g=>l(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)"}),E.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function KE({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:a=!1}){const[o,s]=$.useState(null),[l,c]=$.useState({}),u=t.filter(f=>f.tagId!==e.tagId);$.useEffect(()=>{n||(s(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},p=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(g){console.error("Failed to merge tags:",g)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",E.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>s(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>E.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:a,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:a||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:a?"Merging...":"Merge Tags"})]})]})]})}):null}function ul(e,t){return function(){return e.apply(t,arguments)}}const{toString:WE}=Object.prototype,{getPrototypeOf:pi}=Object,{iterator:Gn,toStringTag:dl}=Symbol,qn=(e=>t=>{const n=WE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pe=e=>(e=e.toLowerCase(),t=>qn(t)===e),Kn=e=>t=>typeof t===e,{isArray:It}=Array,Tt=Kn("undefined");function tn(e){return e!==null&&!Tt(e)&&e.constructor!==null&&!Tt(e.constructor)&&Ne(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fl=Pe("ArrayBuffer");function VE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fl(e.buffer),t}const YE=Kn("string"),Ne=Kn("function"),pl=Kn("number"),nn=e=>e!==null&&typeof e=="object",ZE=e=>e===!0||e===!1,En=e=>{if(qn(e)!=="object")return!1;const t=pi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dl in e)&&!(Gn in e)},XE=e=>{if(!nn(e)||tn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},QE=Pe("Date"),JE=Pe("File"),ex=Pe("Blob"),tx=Pe("FileList"),nx=e=>nn(e)&&Ne(e.pipe),rx=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ne(e.append)&&((t=qn(e))==="formdata"||t==="object"&&Ne(e.toString)&&e.toString()==="[object FormData]"))},ix=Pe("URLSearchParams"),[ox,ax,sx,lx]=["ReadableStream","Request","Response","Headers"].map(Pe),cx=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),It(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(tn(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function gl(e,t){if(tn(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 st=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hl=e=>!Tt(e)&&e!==st;function Lr(){const{caseless:e,skipUndefined:t}=hl(this)&&this||{},n={},r=(i,a)=>{const o=e&&gl(n,a)||a;En(n[o])&&En(i)?n[o]=Lr(n[o],i):En(i)?n[o]=Lr({},i):It(i)?n[o]=i.slice():(!t||!Tt(i))&&(n[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&rn(arguments[i],r);return n}const ux=(e,t,n,{allOwnKeys:r}={})=>(rn(t,(i,a)=>{n&&Ne(i)?e[a]=ul(i,n):e[a]=i},{allOwnKeys:r}),e),dx=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fx=(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)},px=(e,t,n,r)=>{let i,a,o;const s={};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))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&pi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gx=(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},hx=e=>{if(!e)return null;if(It(e))return e;let t=e.length;if(!pl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mx=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pi(Uint8Array)),bx=(e,t)=>{const r=(e&&e[Gn]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},yx=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ex=Pe("HTMLFormElement"),xx=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Bo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wx=Pe("RegExp"),ml=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};rn(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},_x=e=>{ml(e,(t,n)=>{if(Ne(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ne(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+"'")})}})},kx=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return It(e)?r(e):r(String(e).split(t)),n},Sx=()=>{},Nx=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vx(e){return!!(e&&Ne(e.append)&&e[dl]==="FormData"&&e[Gn])}const Ax=e=>{const t=new Array(10),n=(r,i)=>{if(nn(r)){if(t.indexOf(r)>=0)return;if(tn(r))return r;if(!("toJSON"in r)){t[i]=r;const a=It(r)?[]:{};return rn(r,(o,s)=>{const l=n(o,i+1);!Tt(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)},Tx=Pe("AsyncFunction"),Cx=e=>e&&(nn(e)||Ne(e))&&Ne(e.then)&&Ne(e.catch),bl=((e,t)=>e?setImmediate:t?((n,r)=>(st.addEventListener("message",({source:i,data:a})=>{i===st&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),st.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ne(st.postMessage)),Rx=typeof queueMicrotask<"u"?queueMicrotask.bind(st):typeof process<"u"&&process.nextTick||bl,Ix=e=>e!=null&&Ne(e[Gn]),v={isArray:It,isArrayBuffer:fl,isBuffer:tn,isFormData:rx,isArrayBufferView:VE,isString:YE,isNumber:pl,isBoolean:ZE,isObject:nn,isPlainObject:En,isEmptyObject:XE,isReadableStream:ox,isRequest:ax,isResponse:sx,isHeaders:lx,isUndefined:Tt,isDate:QE,isFile:JE,isBlob:ex,isRegExp:wx,isFunction:Ne,isStream:nx,isURLSearchParams:ix,isTypedArray:mx,isFileList:tx,forEach:rn,merge:Lr,extend:ux,trim:cx,stripBOM:dx,inherits:fx,toFlatObject:px,kindOf:qn,kindOfTest:Pe,endsWith:gx,toArray:hx,forEachEntry:bx,matchAll:yx,isHTMLForm:Ex,hasOwnProperty:Bo,hasOwnProp:Bo,reduceDescriptors:ml,freezeMethods:_x,toObjectSet:kx,toCamelCase:xx,noop:Sx,toFiniteNumber:Nx,findKey:gl,global:st,isContextDefined:hl,isSpecCompliantForm:vx,toJSONObject:Ax,isAsyncFn:Tx,isThenable:Cx,setImmediate:bl,asap:Rx,isIterable:Ix};function Z(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)}v.inherits(Z,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:v.toJSONObject(this.config),code:this.code,status:this.status}}});const yl=Z.prototype,El={};["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=>{El[e]={value:e}});Object.defineProperties(Z,El);Object.defineProperty(yl,"isAxiosError",{value:!0});Z.from=(e,t,n,r,i,a)=>{const o=Object.create(yl);v.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Z.call(o,s,l,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 Ox=null;function Dr(e){return v.isPlainObject(e)||v.isArray(e)}function xl(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function zo(e,t,n){return e?e.concat(t).map(function(i,a){return i=xl(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Mx(e){return v.isArray(e)&&!e.some(Dr)}const Lx=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function Wn(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,m){return!v.isUndefined(m[h])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(v.isDate(g))return g.toISOString();if(v.isBoolean(g))return g.toString();if(!l&&v.isBlob(g))throw new Z("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(g)||v.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,h,m){let b=g;if(g&&!m&&typeof g=="object"){if(v.endsWith(h,"{}"))h=r?h:h.slice(0,-2),g=JSON.stringify(g);else if(v.isArray(g)&&Mx(g)||(v.isFileList(g)||v.endsWith(h,"[]"))&&(b=v.toArray(g)))return h=xl(h),b.forEach(function(N,C){!(v.isUndefined(N)||N===null)&&t.append(o===!0?zo([h],C,a):o===null?h:h+"[]",c(N))}),!1}return Dr(g)?!0:(t.append(zo(m,h,a),c(g)),!1)}const d=[],p=Object.assign(Lx,{defaultVisitor:u,convertValue:c,isVisitable:Dr});function f(g,h){if(!v.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(g),v.forEach(g,function(b,_){(!(v.isUndefined(b)||b===null)&&i.call(t,b,v.isString(_)?_.trim():_,h,p))===!0&&f(b,h?h.concat(_):[_])}),d.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Uo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function gi(e,t){this._pairs=[],e&&Wn(e,this,t)}const wl=gi.prototype;wl.append=function(t,n){this._pairs.push([t,n])};wl.toString=function(t){const n=t?function(r){return t.call(this,r,Uo)}:Uo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Dx(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _l(e,t,n){if(!t)return e;const r=n&&n.encode||Dx;v.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=v.isURLSearchParams(t)?t.toString():new gi(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class $o{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){v.forEach(this.handlers,function(r){r!==null&&t(r)})}}const kl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Px=typeof URLSearchParams<"u"?URLSearchParams:gi,Fx=typeof FormData<"u"?FormData:null,Bx=typeof Blob<"u"?Blob:null,zx={isBrowser:!0,classes:{URLSearchParams:Px,FormData:Fx,Blob:Bx},protocols:["http","https","file","blob","url","data"]},hi=typeof window<"u"&&typeof document<"u",Pr=typeof navigator=="object"&&navigator||void 0,Ux=hi&&(!Pr||["ReactNative","NativeScript","NS"].indexOf(Pr.product)<0),$x=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jx=hi&&window.location.href||"http://localhost",Hx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hi,hasStandardBrowserEnv:Ux,hasStandardBrowserWebWorkerEnv:$x,navigator:Pr,origin:jx},Symbol.toStringTag,{value:"Module"})),be={...Hx,...zx};function Gx(e,t){return Wn(e,new be.classes.URLSearchParams,{visitor:function(n,r,i,a){return be.isNode&&v.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function qx(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kx(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 Sl(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&v.isArray(i)?i.length:o,l?(v.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!v.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&v.isArray(i[o])&&(i[o]=Kx(i[o])),!s)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(r,i)=>{t(qx(r),i,n,0)}),n}return null}function Wx(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const on={transitional:kl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=v.isObject(t);if(a&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return i?JSON.stringify(Sl(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gx(t,this.formSerializer).toString();if((s=v.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Wn(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Wx(t)):t}],transformResponse:[function(t){const n=this.transitional||on.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?Z.from(s,Z.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:be.classes.FormData,Blob:be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{on.headers[e]={}});const Vx=v.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"]),Yx=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
71
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
72
|
-
`)}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[jo]=this[jo]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=jt(o);r[s]||(Jx(i,o),r[s]=!0)}return v.isArray(t)?t.forEach(a):a(t),this}};ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(ve.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});v.freezeMethods(ve);function mr(e,t){const n=this||on,r=t||n,i=ve.from(r.headers);let a=r.data;return v.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Nl(e){return!!(e&&e.__CANCEL__)}function Ot(e,t,n){Z.call(this,e??"canceled",Z.ERR_CANCELED,t,n),this.name="CanceledError"}v.inherits(Ot,Z,{__CANCEL__:!0});function vl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ew(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tw(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(l){const c=Date.now(),u=r[a];o||(o=c),n[i]=l,r[i]=c;let d=a,p=0;for(;d!==i;)p+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(p*1e3/f):void 0}}function nw(e,t){let n=0,r=1e3/t,i,a;const o=(c,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const Rn=(e,t,n=3)=>{let r=0;const i=tw(50,250);return nw(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-r,c=i(l),u=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-o)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},Ho=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Go=e=>(...t)=>v.asap(()=>e(...t)),rw=be.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,be.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(be.origin),be.navigator&&/(msie|trident)/i.test(be.navigator.userAgent)):()=>!0,iw=be.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];v.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),v.isString(r)&&s.push(`path=${r}`),v.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),v.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.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 ow(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aw(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Al(e,t,n){let r=!ow(t);return e&&(r||n==!1)?aw(e,t):t}const qo=e=>e instanceof ve?{...e}:e;function dt(e,t){t=t||{};const n={};function r(c,u,d,p){return v.isPlainObject(c)&&v.isPlainObject(u)?v.merge.call({caseless:p},c,u):v.isPlainObject(u)?v.merge({},u):v.isArray(u)?u.slice():u}function i(c,u,d,p){if(v.isUndefined(u)){if(!v.isUndefined(c))return r(void 0,c,d,p)}else return r(c,u,d,p)}function a(c,u){if(!v.isUndefined(u))return r(void 0,u)}function o(c,u){if(v.isUndefined(u)){if(!v.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={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:s,headers:(c,u,d)=>i(qo(c),qo(u),d,!0)};return v.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,p=d(e[u],t[u],u);v.isUndefined(p)&&d!==s||(n[u]=p)}),n}const Tl=e=>{const t=dt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ve.from(o),t.url=_l(Al(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),v.isFormData(n)){if(be.hasStandardBrowserEnv||be.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(v.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(be.hasStandardBrowserEnv&&(r&&v.isFunction(r)&&(r=r(t)),r||r!==!1&&rw(t.url))){const l=i&&a&&iw.read(a);l&&o.set(i,l)}return t},sw=typeof XMLHttpRequest<"u",lw=sw&&function(e){return new Promise(function(n,r){const i=Tl(e);let a=i.data;const o=ve.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=i,u,d,p,f,g;function h(){f&&f(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function b(){if(!m)return;const N=ve.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),O={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:N,config:e,request:m};vl(function(B){n(B),h()},function(B){r(B),h()},O),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(r(new Z("Request aborted",Z.ECONNABORTED,e,m)),m=null)},m.onerror=function(C){const O=C&&C.message?C.message:"Network Error",k=new Z(O,Z.ERR_NETWORK,e,m);k.event=C||null,r(k),m=null},m.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||kl;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Z(C,O.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&v.forEach(o.toJSON(),function(C,O){m.setRequestHeader(O,C)}),v.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),s&&s!=="json"&&(m.responseType=i.responseType),c&&([p,g]=Rn(c,!0),m.addEventListener("progress",p)),l&&m.upload&&([d,f]=Rn(l),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=N=>{m&&(r(!N||N.type?new Ot(null,e,m):N),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=ew(i.url);if(_&&be.protocols.indexOf(_)===-1){r(new Z("Unsupported protocol "+_+":",Z.ERR_BAD_REQUEST,e));return}m.send(a||null)})},cw=(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,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Z?u:new Ot(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,a(new Z(`timeout ${t} of ms exceeded`,Z.ETIMEDOUT))},t);const s=()=>{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:l}=r;return l.unsubscribe=()=>v.asap(s),l}},uw=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},dw=async function*(e,t){for await(const n of fw(e))yield*uw(n,t)},fw=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()}},Ko=(e,t,n,r)=>{const i=dw(e,t);let a=0,o,s=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let p=a+=d;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},Wo=64*1024,{isFunction:mn}=v,pw=(({Request:e,Response:t})=>({Request:e,Response:t}))(v.global),{ReadableStream:Vo,TextEncoder:Yo}=v.global,Zo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gw=e=>{e=v.merge.call({skipUndefined:!0},pw,e);const{fetch:t,Request:n,Response:r}=e,i=t?mn(t):typeof fetch=="function",a=mn(n),o=mn(r);if(!i)return!1;const s=i&&mn(Vo),l=i&&(typeof Yo=="function"?(g=>h=>g.encode(h))(new Yo):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=a&&s&&Zo(()=>{let g=!1;const h=new n(be.origin,{body:new Vo,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!h}),u=o&&s&&Zo(()=>v.isReadableStream(new r("").body)),d={stream:u&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(h,m)=>{let b=h&&h[g];if(b)return b.call(h);throw new Z(`Response type '${g}' is not supported`,Z.ERR_NOT_SUPPORT,m)})});const p=async g=>{if(g==null)return 0;if(v.isBlob(g))return g.size;if(v.isSpecCompliantForm(g))return(await new n(be.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(v.isArrayBufferView(g)||v.isArrayBuffer(g))return g.byteLength;if(v.isURLSearchParams(g)&&(g=g+""),v.isString(g))return(await l(g)).byteLength},f=async(g,h)=>{const m=v.toFiniteNumber(g.getContentLength());return m??p(h)};return async g=>{let{url:h,method:m,data:b,signal:_,cancelToken:N,timeout:C,onDownloadProgress:O,onUploadProgress:k,responseType:B,headers:z,withCredentials:I="same-origin",fetchOptions:S}=Tl(g),P=t||fetch;B=B?(B+"").toLowerCase():"text";let R=cw([_,N&&N.toAbortSignal()],C),V=null;const G=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let H;try{if(k&&c&&m!=="get"&&m!=="head"&&(H=await f(z,b))!==0){let q=new n(h,{method:"POST",body:b,duplex:"half"}),X;if(v.isFormData(b)&&(X=q.headers.get("content-type"))&&z.setContentType(X),q.body){const[x,re]=Ho(H,Rn(Go(k)));b=Ko(q.body,Wo,x,re)}}v.isString(I)||(I=I?"include":"omit");const T=a&&"credentials"in n.prototype,D={...S,signal:R,method:m.toUpperCase(),headers:z.normalize().toJSON(),body:b,duplex:"half",credentials:T?I:void 0};V=a&&new n(h,D);let L=await(a?P(V,S):P(h,D));const j=u&&(B==="stream"||B==="response");if(u&&(O||j&&G)){const q={};["status","statusText","headers"].forEach(ue=>{q[ue]=L[ue]});const X=v.toFiniteNumber(L.headers.get("content-length")),[x,re]=O&&Ho(X,Rn(Go(O),!0))||[];L=new r(Ko(L.body,Wo,x,()=>{re&&re(),G&&G()}),q)}B=B||"text";let y=await d[v.findKey(d,B)||"text"](L,g);return!j&&G&&G(),await new Promise((q,X)=>{vl(q,X,{data:y,headers:ve.from(L.headers),status:L.status,statusText:L.statusText,config:g,request:V})})}catch(T){throw G&&G(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new Z("Network Error",Z.ERR_NETWORK,g,V),{cause:T.cause||T}):Z.from(T,T&&T.code,g,V)}}},hw=new Map,Cl=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,s=o,l,c,u=hw;for(;s--;)l=a[s],c=u.get(l),c===void 0&&u.set(l,c=s?new Map:gw(t)),u=c;return c};Cl();const mi={http:Ox,xhr:lw,fetch:{get:Cl}};v.forEach(mi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xo=e=>`- ${e}`,mw=e=>v.isFunction(e)||e===null||e===!1;function bw(e,t){e=v.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let s;if(i=r,!mw(r)&&(i=mi[(s=String(r)).toLowerCase()],i===void 0))throw new Z(`Unknown adapter '${s}'`);if(i&&(v.isFunction(i)||(i=i.get(t))))break;a[s||"#"+o]=i}if(!i){const o=Object.entries(a).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=n?o.length>1?`since :
|
|
73
|
-
`+o.map(
|
|
74
|
-
`):" "+
|
|
75
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=dt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&wn.assertOptions(r,{silentJSONParsing:Ue.transitional(Ue.boolean),forcedJSONParsing:Ue.transitional(Ue.boolean),clarifyTimeoutError:Ue.transitional(Ue.boolean)},!1),i!=null&&(v.isFunction(i)?n.paramsSerializer={serialize:i}:wn.assertOptions(i,{encode:Ue.function,serialize:Ue.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),wn.assertOptions(n,{baseUrl:Ue.spelling("baseURL"),withXsrfToken:Ue.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&v.merge(a.common,a[n.method]);a&&v.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=ve.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,d=0,p;if(!l){const g=[Qo.bind(this),void 0];for(g.unshift(...s),g.push(...c),p=g.length,u=Promise.resolve(n);d<p;)u=u.then(g[d++],g[d++]);return u}p=s.length;let f=n;for(;d<p;){const g=s[d++],h=s[d++];try{f=g(f)}catch(m){h.call(this,m);break}}try{u=Qo.call(this,f)}catch(g){return Promise.reject(g)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=dt(this.defaults,t);const n=Al(t.baseURL,t.url,t.allowAbsoluteUrls);return _l(n,t.params,t.paramsSerializer)}};v.forEach(["delete","get","head","options"],function(t){ct.prototype[t]=function(n,r){return this.request(dt(r||{},{method:t,url:n,data:(r||{}).data}))}});v.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(dt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}ct.prototype[t]=n(),ct.prototype[t+"Form"]=n(!0)});let Ew=class Ol{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(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ot(a,o,s),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 Ol(function(i){t=i}),cancel:t}}};function xw(e){return function(n){return e.apply(null,n)}}function ww(e){return v.isObject(e)&&e.isAxiosError===!0}const Fr={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(Fr).forEach(([e,t])=>{Fr[t]=e});function Ml(e){const t=new ct(e),n=ul(ct.prototype.request,t);return v.extend(n,ct.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Ml(dt(e,i))},n}const pe=Ml(on);pe.Axios=ct;pe.CanceledError=Ot;pe.CancelToken=Ew;pe.isCancel=Nl;pe.VERSION=Il;pe.toFormData=Wn;pe.AxiosError=Z;pe.Cancel=pe.CanceledError;pe.all=function(t){return Promise.all(t)};pe.spread=xw;pe.isAxiosError=ww;pe.mergeConfig=dt;pe.AxiosHeaders=ve;pe.formToJSON=e=>Sl(v.isHTMLForm(e)?new FormData(e):e);pe.getAdapter=Rl.getAdapter;pe.HttpStatusCode=Fr;pe.default=pe;const{Axios:U_,AxiosError:$_,CanceledError:j_,isCancel:H_,CancelToken:G_,VERSION:q_,all:K_,Cancel:W_,isAxiosError:V_,spread:Y_,toFormData:Z_,AxiosHeaders:X_,HttpStatusCode:Q_,formToJSON:J_,getAdapter:e0,mergeConfig:t0}=pe,$e={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`};class Ll{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:$e.ARTICLES,params:i});const a=await this.client.get($e.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($e.ARTICLES_FILTER,{params:a});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get($e.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:$e.ARTICLES,data:t});const n=await this.client.post($e.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:$e.ARTICLES,data:t});const n=await this.client.put($e.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:$e.ARTICLE_BY_ID(t)}),await this.client.delete($e.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 je={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class Dl{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:je.CATEGORIES});const t=await this.client.get(je.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(je.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(je.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:je.CATEGORIES,data:t});const n=await this.client.post(je.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:je.CATEGORIES,data:t});const n=await this.client.put(je.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:je.CATEGORY_BY_ID(t)}),await this.client.delete(je.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 Le={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class Pl{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Le.TAGS});const t=await this.client.get(Le.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Le.TAG_BY_ID(t)});const n=await this.client.get(Le.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Le.TAGS,data:t});const n=await this.client.post(Le.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Le.TAGS,data:t});const n=await this.client.put(Le.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Le.TAG_BY_ID(t)}),await this.client.delete(Le.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Le.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 Fl=$.createContext(void 0);function _w({config:e,children:t}){const n=$.useMemo(()=>{const r=e.apiClient||pe.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}}),i=new Ll(r),a=new Dl(r),o=new Pl(r);return{config:e,apiClient:r,articleApi:i,categoryApi:a,tagApi:o}},[e]);return E.jsx(Fl.Provider,{value:n,children:t})}function Yn(){const e=$.useContext(Fl);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function kw(){const{articleApi:e}=Yn(),[t,n]=$.useState(null),[r,i]=$.useState(!1),[a,o]=$.useState(null),[s,l]=$.useState(),c=$.useCallback(async h=>{i(!0),o(null),l(h);try{let m;h!=null&&h.roles&&h.roles.length>0?m=await e.filterArticles(h.roles,h.categoryId,h.page,h.pageSize):m=await e.listArticles(h==null?void 0:h.categoryId,h==null?void 0:h.page,h==null?void 0:h.pageSize),n(m)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch articles");throw o(b),b}finally{i(!1)}},[e]),u=$.useCallback(async h=>{i(!0),o(null);try{return await e.getArticleById(h)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch article");throw o(b),b}finally{i(!1)}},[e]),d=$.useCallback(async h=>{i(!0),o(null);try{const m=await e.createArticle(h);return s&&await c(s),m}catch(m){const b=m instanceof Error?m:new Error("Failed to create article");throw o(b),b}finally{i(!1)}},[e,s,c]),p=$.useCallback(async h=>{i(!0),o(null);try{const m=await e.updateArticle(h);return s&&await c(s),m}catch(m){const b=m instanceof Error?m:new Error("Failed to update article");throw o(b),b}finally{i(!1)}},[e,s,c]),f=$.useCallback(async h=>{i(!0),o(null);try{await e.deleteArticle(h),s&&await c(s)}catch(m){const b=m instanceof Error?m:new Error("Failed to delete article");throw o(b),b}finally{i(!1)}},[e,s,c]),g=$.useCallback(async()=>{s&&await c(s)},[s,c]);return{articles:t,loading:r,error:a,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:p,deleteArticle:f,refresh:g}}function Sw(){const{categoryApi:e}=Yn(),[t,n]=$.useState([]),[r,i]=$.useState(!1),[a,o]=$.useState(null),[s,l]=$.useState(),c=$.useCallback(async h=>{i(!0),o(null),l(h);try{let m;if(h!=null&&h.roles&&h.roles.length>0?m=await e.filterCategories(h.roles,h.parentId):(h==null?void 0:h.parentId)!==void 0?m=await e.filterCategories(void 0,h.parentId):m=await e.listCategories(),h!=null&&h.searchTerm){const b=h.searchTerm.toLowerCase();m=m.filter(_=>_.title.toLowerCase().includes(b))}n(m)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch categories");throw o(b),b}finally{i(!1)}},[e]),u=$.useCallback(async h=>{i(!0),o(null);try{return await e.getCategoryById(h)}catch(m){const b=m instanceof Error?m:new Error("Failed to fetch category");throw o(b),b}finally{i(!1)}},[e]),d=$.useCallback(async h=>{i(!0),o(null);try{const m=await e.createCategory(h);return s!==void 0?await c(s):await c(),m}catch(m){const b=m instanceof Error?m:new Error("Failed to create category");throw o(b),b}finally{i(!1)}},[e,s,c]),p=$.useCallback(async h=>{i(!0),o(null);try{const m=await e.updateCategory(h);return s!==void 0?await c(s):await c(),m}catch(m){const b=m instanceof Error?m:new Error("Failed to update category");throw o(b),b}finally{i(!1)}},[e,s,c]),f=$.useCallback(async h=>{i(!0),o(null);try{await e.deleteCategory(h),s!==void 0?await c(s):await c()}catch(m){const b=m instanceof Error?m:new Error("Failed to delete category");throw o(b),b}finally{i(!1)}},[e,s,c]),g=$.useCallback(async()=>{s!==void 0?await c(s):await c()},[s,c]);return{categories:t,loading:r,error:a,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:p,deleteCategory:f,refresh:g}}function Nw(){const{tagApi:e}=Yn(),[t,n]=$.useState([]),[r,i]=$.useState(!1),[a,o]=$.useState(null),[s,l]=$.useState(),c=$.useCallback(async m=>{i(!0),o(null),l(m);try{let b=await e.listTags();if(m!=null&&m.searchTerm){const _=m.searchTerm.toLowerCase();b=b.filter(N=>N.title.toLowerCase().includes(_)||N.slug&&N.slug.toLowerCase().includes(_))}n(b)}catch(b){const _=b instanceof Error?b:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=$.useCallback(async m=>{i(!0),o(null);try{return await e.getTagById(m)}catch(b){const _=b instanceof Error?b:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=$.useCallback(async m=>{i(!0),o(null);try{const b=await e.createTag(m);return s!==void 0?await c(s):await c(),b}catch(b){const _=b instanceof Error?b:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,s,c]),p=$.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateTag(m);return s!==void 0?await c(s):await c(),b}catch(b){const _=b instanceof Error?b:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,s,c]),f=$.useCallback(async m=>{i(!0),o(null);try{await e.deleteTag(m),s!==void 0?await c(s):await c()}catch(b){const _=b instanceof Error?b:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,s,c]),g=$.useCallback(async(m,b)=>{i(!0),o(null);try{await e.mergeTags(m,b),s!==void 0?await c(s):await c()}catch(_){const N=_ instanceof Error?_:new Error("Failed to merge tags");throw o(N),N}finally{i(!1)}},[e,s,c]),h=$.useCallback(async()=>{s!==void 0?await c(s):await c()},[s,c]);return{tags:t,loading:r,error:a,fetchTags:c,getTagById:u,createTag:d,updateTag:p,deleteTag:f,mergeTags:g,refresh:h}}function ea(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vw(...e){return t=>{let n=!1;const r=e.map(i=>{const a=ea(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():ea(e[i],null)}}}}var Aw=Symbol.for("react.lazy"),In=ee[" use ".trim().toString()];function Tw(e){return typeof e=="object"&&e!==null&&"then"in e}function Bl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Aw&&"_payload"in e&&Tw(e._payload)}function zl(e){const t=Rw(e),n=ee.forwardRef((r,i)=>{let{children:a,...o}=r;Bl(a)&&typeof In=="function"&&(a=In(a._payload));const s=ee.Children.toArray(a),l=s.find(Ow);if(l){const c=l.props.children,u=s.map(d=>d===l?ee.Children.count(c)>1?ee.Children.only(null):ee.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...o,ref:i,children:ee.isValidElement(c)?ee.cloneElement(c,void 0,u):null})}return E.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Cw=zl("Slot");function Rw(e){const t=ee.forwardRef((n,r)=>{let{children:i,...a}=n;if(Bl(i)&&typeof In=="function"&&(i=In(i._payload)),ee.isValidElement(i)){const o=Lw(i),s=Mw(a,i.props);return i.type!==ee.Fragment&&(s.ref=r?vw(r,o):o),ee.cloneElement(i,s)}return ee.Children.count(i)>1?ee.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Iw=Symbol("radix.slottable");function Ow(e){return ee.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Iw}function Mw(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]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Lw(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 Ul(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=Ul(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $l(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ul(e))&&(r&&(r+=" "),r+=t);return r}const ta=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,na=$l,jl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return na(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 u=n==null?void 0:n[c],d=a==null?void 0:a[c];if(u===null)return null;const p=ta(u)||ta(d);return i[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(g=>{let[h,m]=g;return Array.isArray(m)?m.includes({...a,...s}[h]):{...a,...s}[h]===m})?[...c,d,p]:c},[]);return na(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},bi="-",Dw=e=>{const t=Fw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(bi);return s[0]===""&&s.length!==1&&s.shift(),Hl(s,t)||Pw(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Hl=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Hl(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(bi);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},ra=/^\[(.+)\]$/,Pw=e=>{if(ra.test(e)){const t=ra.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Fw=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zw(Object.entries(e.classGroups),n).forEach(([a,o])=>{Br(o,r,a,t)}),r},Br=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:ia(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Bw(i)){Br(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{Br(o,ia(t,a),n,r)})})},ia=(e,t)=>{let n=e;return t.split(bi).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Bw=e=>e.isThemeGetter,zw=(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,s])=>[t+o,s])):a);return[n,i]}):e,Uw=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)}}},Gl="!",$w=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let c=0,u=0,d;for(let m=0;m<s.length;m++){let b=s[m];if(c===0){if(b===i&&(r||s.slice(m,m+a)===t)){l.push(s.slice(u,m)),u=m+a;continue}if(b==="/"){d=m;continue}}b==="["?c++:b==="]"&&c--}const p=l.length===0?s:s.substring(u),f=p.startsWith(Gl),g=f?p.substring(1):p,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:h}};return n?s=>n({className:s,parseClassName:o}):o},jw=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},Hw=e=>({cache:Uw(e.cacheSize),parseClassName:$w(e),...Dw(e)}),Gw=/\s+/,qw=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Gw);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:f}=n(c);let g=!!f,h=r(g?p.substring(0,f):p);if(!h){if(!g){s=c+(s.length>0?" "+s:s);continue}if(h=r(p),!h){s=c+(s.length>0?" "+s:s);continue}g=!1}const m=jw(u).join(":"),b=d?m+Gl:m,_=b+h;if(a.includes(_))continue;a.push(_);const N=i(h,g);for(let C=0;C<N.length;++C){const O=N[C];a.push(b+O)}s=c+(s.length>0?" "+s:s)}return s};function Kw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ql(t))&&(r&&(r+=" "),r+=n);return r}const ql=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ql(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ww(e,...t){let n,r,i,a=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=Hw(c),r=n.cache.get,i=n.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const u=qw(l,n);return i(l,u),u}return function(){return a(Kw.apply(null,arguments))}}const ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Kl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vw=/^\d+\/\d+$/,Yw=new Set(["px","full","screen"]),Zw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xw=/\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$/,Qw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=e=>Nt(e)||Yw.has(e)||Vw.test(e),et=e=>Mt(e,"length",l_),Nt=e=>!!e&&!Number.isNaN(Number(e)),yr=e=>Mt(e,"number",Nt),Ht=e=>!!e&&Number.isInteger(Number(e)),t_=e=>e.endsWith("%")&&Nt(e.slice(0,-1)),Q=e=>Kl.test(e),tt=e=>Zw.test(e),n_=new Set(["length","size","percentage"]),r_=e=>Mt(e,n_,Wl),i_=e=>Mt(e,"position",Wl),o_=new Set(["image","url"]),a_=e=>Mt(e,o_,u_),s_=e=>Mt(e,"",c_),Gt=()=>!0,Mt=(e,t,n)=>{const r=Kl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},l_=e=>Xw.test(e)&&!Qw.test(e),Wl=()=>!1,c_=e=>Jw.test(e),u_=e=>e_.test(e),d_=()=>{const e=ce("colors"),t=ce("spacing"),n=ce("blur"),r=ce("brightness"),i=ce("borderColor"),a=ce("borderRadius"),o=ce("borderSpacing"),s=ce("borderWidth"),l=ce("contrast"),c=ce("grayscale"),u=ce("hueRotate"),d=ce("invert"),p=ce("gap"),f=ce("gradientColorStops"),g=ce("gradientColorStopPositions"),h=ce("inset"),m=ce("margin"),b=ce("opacity"),_=ce("padding"),N=ce("saturate"),C=ce("scale"),O=ce("sepia"),k=ce("skew"),B=ce("space"),z=ce("translate"),I=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",Q,t],R=()=>[Q,t],V=()=>["",Ye,et],G=()=>["auto",Nt,Q],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Q],y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Nt,Q];return{cacheSize:500,separator:":",theme:{colors:[Gt],spacing:[Ye,et],blur:["none","",tt,Q],brightness:q(),borderColor:[e],borderRadius:["none","","full",tt,Q],borderSpacing:R(),borderWidth:V(),contrast:q(),grayscale:j(),hueRotate:q(),invert:j(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[t_,et],inset:P(),margin:P(),opacity:q(),padding:R(),saturate:q(),scale:q(),sepia:j(),skew:q(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[tt]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:[...H(),Q]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ht,Q]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Ht,Q]}],"grid-cols":[{"grid-cols":[Gt]}],"col-start-end":[{col:["auto",{span:["full",Ht,Q]},Q]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Gt]}],"row-start-end":[{row:["auto",{span:[Ht,Q]},Q]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[tt]},tt]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yr]}],"font-family":[{font:[Gt]}],"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",Q]}],"line-clamp":[{"line-clamp":["none",Nt,yr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ye,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ye,et]}],"underline-offset":[{"underline-offset":["auto",Ye,Q]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),i_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",r_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},a_]}],"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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...T(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:T()}],"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:["",...T()]}],"outline-offset":[{"outline-offset":[Ye,Q]}],"outline-w":[{outline:[Ye,et]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ye,et]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tt,s_]}],"shadow-color":[{shadow:[Gt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",tt,Q]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[N]}],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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"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",Q]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Ht,Q]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"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",Q]}],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",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ye,et,yr]}],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"]}}},f_=Ww(d_);function ht(...e){return f_($l(e))}const p_=jl("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"}}),Vl=ee.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Cw:"button";return E.jsx(o,{className:ht(p_({variant:t,size:n,className:e})),ref:a,...i})});Vl.displayName="Button";const Yl=ee.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:ht("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}));Yl.displayName="Input";var g_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zn=g_.reduce((e,t)=>{const n=zl(`Primitive.${t}`),r=ee.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),h_="Label",Zl=ee.forwardRef((e,t)=>E.jsx(Zn.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())}}));Zl.displayName=h_;var Xl=Zl;const m_=jl("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ql=ee.forwardRef(({className:e,...t},n)=>E.jsx(Xl,{ref:n,className:ht(m_(),e),...t}));Ql.displayName=Xl.displayName;function b_(e,t=[]){let n=[];function r(a,o){const s=ee.createContext(o);s.displayName=a+"Context";const l=n.length;n=[...n,o];const c=d=>{var b;const{scope:p,children:f,...g}=d,h=((b=p==null?void 0:p[e])==null?void 0:b[l])||s,m=ee.useMemo(()=>g,Object.values(g));return E.jsx(h.Provider,{value:m,children:f})};c.displayName=a+"Provider";function u(d,p){var h;const f=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,g=ee.useContext(f);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>ee.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return ee.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,y_(i,...t)]}function y_(...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((s,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...s,...d}},{});return ee.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function E_(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var zr=globalThis!=null&&globalThis.document?ee.useLayoutEffect:()=>{},Ur={exports:{}},Er={};/**
|
|
110
|
+
*/const Ic=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 WS({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(Rc,{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(Ic,{className:"h-4 w-4"})})]})})]},s.categoryId))})]})})}function VS({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:a=!1}){const[o,l]=le.useState(""),[s,c]=le.useState(null),[d,u]=le.useState({});le.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 YS({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(Rc,{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(KS,{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(Ic,{className:"h-4 w-4"})})]})]},c.tagId))})}function ZS({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[a,o]=le.useState(""),[l,s]=le.useState(""),[c,d]=le.useState({});le.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 XS({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:a=!1}){const[o,l]=le.useState(null),[s,c]=le.useState({}),d=t.filter(f=>f.tagId!==e.tagId);le.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 Lc(e,t){return function(){return e.apply(t,arguments)}}const{toString:QS}=Object.prototype,{getPrototypeOf:Vi}=Object,{iterator:gr,toStringTag:Mc}=Symbol,mr=(e=>t=>{const n=QS.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 Pc=Ze("ArrayBuffer");function JS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pc(e.buffer),t}const eA=yr("string"),Ue=yr("function"),Dc=yr("number"),mn=e=>e!==null&&typeof e=="object",tA=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)&&!(Mc in e)&&!(gr in e)},nA=e=>{if(!mn(e)||gn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},rA=Ze("Date"),iA=Ze("File"),oA=Ze("Blob"),aA=Ze("FileList"),lA=e=>mn(e)&&Ue(e.pipe),sA=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]"))},cA=Ze("URLSearchParams"),[uA,fA,dA,hA]=["ReadableStream","Request","Response","Headers"].map(Ze),pA=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 Bc(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,Fc=e=>!Dt(e)&&e!==yt;function hi(){const{caseless:e,skipUndefined:t}=Fc(this)&&this||{},n={},r=(i,a)=>{const o=e&&Bc(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 gA=(e,t,n,{allOwnKeys:r}={})=>(yn(t,(i,a)=>{n&&Ue(i)?e[a]=Lc(i,n):e[a]=i},{allOwnKeys:r}),e),mA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yA=(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)},bA=(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},vA=(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},_A=e=>{if(!e)return null;if(Gt(e))return e;let t=e.length;if(!Dc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},EA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vi(Uint8Array)),xA=(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])}},wA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kA=Ze("HTMLFormElement"),SA=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),AA=Ze("RegExp"),jc=(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)},NA=e=>{jc(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+"'")})}})},OA=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Gt(e)?r(e):r(String(e).split(t)),n},TA=()=>{},CA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function RA(e){return!!(e&&Ue(e.append)&&e[Mc]==="FormData"&&e[gr])}const IA=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)},LA=Ze("AsyncFunction"),MA=e=>e&&(mn(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),Uc=((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)),PA=typeof queueMicrotask<"u"?queueMicrotask.bind(yt):typeof process<"u"&&process.nextTick||Uc,DA=e=>e!=null&&Ue(e[gr]),Z={isArray:Gt,isArrayBuffer:Pc,isBuffer:gn,isFormData:sA,isArrayBufferView:JS,isString:eA,isNumber:Dc,isBoolean:tA,isObject:mn,isPlainObject:Ln,isEmptyObject:nA,isReadableStream:uA,isRequest:fA,isResponse:dA,isHeaders:hA,isUndefined:Dt,isDate:rA,isFile:iA,isBlob:oA,isRegExp:AA,isFunction:Ue,isStream:lA,isURLSearchParams:cA,isTypedArray:EA,isFileList:aA,forEach:yn,merge:hi,extend:gA,trim:pA,stripBOM:mA,inherits:yA,toFlatObject:bA,kindOf:mr,kindOfTest:Ze,endsWith:vA,toArray:_A,forEachEntry:xA,matchAll:wA,isHTMLForm:kA,hasOwnProperty:Wa,hasOwnProp:Wa,reduceDescriptors:jc,freezeMethods:NA,toObjectSet:OA,toCamelCase:SA,noop:TA,toFiniteNumber:CA,findKey:Bc,global:yt,isContextDefined:Fc,isSpecCompliantForm:RA,toJSONObject:IA,isAsyncFn:LA,isThenable:MA,setImmediate:Uc,asap:PA,isIterable:DA};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 zc=ye.prototype,qc={};["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=>{qc[e]={value:e}});Object.defineProperties(ye,qc);Object.defineProperty(zc,"isAxiosError",{value:!0});ye.from=(e,t,n,r,i,a)=>{const o=Object.create(zc);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 BA=null;function pi(e){return Z.isPlainObject(e)||Z.isArray(e)}function $c(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=$c(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function FA(e){return Z.isArray(e)&&!e.some(pi)}const jA=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)&&FA(g)||(Z.isFileList(g)||Z.endsWith(p,"[]"))&&(m=Z.toArray(g)))return p=$c(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(jA,{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 Hc=Yi.prototype;Hc.append=function(t,n){this._pairs.push([t,n])};Hc.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 UA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gc(e,t,n){if(!t)return e;const r=n&&n.encode||UA;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 Kc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zA=typeof URLSearchParams<"u"?URLSearchParams:Yi,qA=typeof FormData<"u"?FormData:null,$A=typeof Blob<"u"?Blob:null,HA={isBrowser:!0,classes:{URLSearchParams:zA,FormData:qA,Blob:$A},protocols:["http","https","file","blob","url","data"]},Zi=typeof window<"u"&&typeof document<"u",gi=typeof navigator=="object"&&navigator||void 0,GA=Zi&&(!gi||["ReactNative","NativeScript","NS"].indexOf(gi.product)<0),KA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",WA=Zi&&window.location.href||"http://localhost",VA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zi,hasStandardBrowserEnv:GA,hasStandardBrowserWebWorkerEnv:KA,navigator:gi,origin:WA},Symbol.toStringTag,{value:"Module"})),Me={...VA,...HA};function YA(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 ZA(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function XA(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 Wc(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]=XA(i[o])),!l)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(r,i)=>{t(ZA(r),i,n,0)}),n}return null}function QA(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:Kc,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(Wc(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 YA(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),QA(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 JA=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"]),eN=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]&&JA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Xa=Symbol("internals");function tn(e){return e&&String(e).trim().toLowerCase()}function Mn(e){return e===!1||e==null?e:Z.isArray(e)?e.map(Mn):String(e)}function tN(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 nN=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $r(e,t,n,r,i){if(Z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Z.isString(t)){if(Z.isString(r))return t.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(t)}}function rN(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iN(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}let ze=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(l,s,c){const d=tn(s);if(!d)throw new Error("header name must be a non-empty string");const u=Z.findKey(i,d);(!u||i[u]===void 0||c===!0||c===void 0&&i[u]!==!1)&&(i[u||s]=Mn(l))}const o=(l,s)=>Z.forEach(l,(c,d)=>a(c,d,s));if(Z.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Z.isString(t)&&(t=t.trim())&&!nN(t))o(eN(t),n);else if(Z.isObject(t)&&Z.isIterable(t)){let l={},s,c;for(const d of t){if(!Z.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[c=d[0]]=(s=l[c])?Z.isArray(s)?[...s,d[1]]:[s,d[1]]:d[1]}o(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=tn(t),t){const r=Z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return tN(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=tn(t),t){const r=Z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$r(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=tn(o),o){const l=Z.findKey(r,o);l&&(!n||$r(r,r[l],l,n))&&(delete r[l],i=!0)}}return Z.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||$r(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return Z.forEach(this,(i,a)=>{const o=Z.findKey(r,a);if(o){n[o]=Mn(i),delete n[a];return}const l=t?rN(a):String(a).trim();l!==a&&delete n[a],n[l]=Mn(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Z.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(`
|
|
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]||(iN(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 Vc(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 Yc(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 oN(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aN(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 lN(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=aN(50,250);return lN(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)),sN=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,cN=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 uN(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fN(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Zc(e,t,n){let r=!uN(t);return e&&(r||n==!1)?fN(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 Xc=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=Gc(Zc(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&&sN(t.url))){const s=i&&a&&cN.read(a);s&&o.set(i,s)}return t},dN=typeof XMLHttpRequest<"u",hN=dN&&function(e){return new Promise(function(n,r){const i=Xc(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};Yc(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||Kc;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=oN(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)})},pN=(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}},gN=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},mN=async function*(e,t){for await(const n of yN(e))yield*gN(n,t)},yN=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=mN(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,bN=(({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}},vN=e=>{e=Z.merge.call({skipUndefined:!0},bN,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}=Xc(g),w=t||fetch;O=O?(O+"").toLowerCase():"text";let S=pN([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)=>{Yc(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)}}},_N=new Map,Qc=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=_N;for(;l--;)s=a[l],c=d.get(s),c===void 0&&d.set(s,c=l?new Map:vN(t)),d=c;return c};Qc();const Xi={http:BA,xhr:hN,fetch:{get:Qc}};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}`,EN=e=>Z.isFunction(e)||e===null||e===!1;function xN(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,!EN(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(al).join(`
|
|
114
|
+
`):" "+al(o[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i}const Jc={getAdapter:xN,adapters:Xi};function Gr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kt(null,e)}function ll(e){return Gr(e),e.headers=ze.from(e.headers),e.data=Hr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jc.getAdapter(e.adapter||bn.adapter,e)(e).then(function(r){return Gr(e),r.data=Hr.call(e,e.transformResponse,r),r.headers=ze.from(r.headers),r},function(r){return Vc(r)||(Gr(e),r&&r.response&&(r.response.data=Hr.call(e,e.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)})}const eu="1.13.2",vr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sl={};vr.transitional=function(t,n,r){function i(a,o){return"[Axios v"+eu+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,l)=>{if(t===!1)throw new ye(i(o," has been removed"+(n?" in "+n:"")),ye.ERR_DEPRECATED);return n&&!sl[o]&&(sl[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,l):!0}};vr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function wN(e,t,n){if(typeof e!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const l=e[a],s=l===void 0||o(l,a,e);if(s!==!0)throw new ye("option "+a+" must be "+s,ye.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ye("Unknown option "+a,ye.ERR_BAD_OPTION)}}const Pn={assertOptions:wN,validators:vr},Qe=Pn.validators;let vt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Za,response:new Za}}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 a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
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=Zc(t.baseURL,t.url,t.allowAbsoluteUrls);return Gc(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 kN=class tu{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 tu(function(i){t=i}),cancel:t}}};function SN(e){return function(n){return e.apply(null,n)}}function AN(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 nu(e){const t=new vt(e),n=Lc(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 nu(Et(e,i))},n}const Ce=nu(bn);Ce.Axios=vt;Ce.CanceledError=Kt;Ce.CancelToken=kN;Ce.isCancel=Vc;Ce.VERSION=eu;Ce.toFormData=br;Ce.AxiosError=ye;Ce.Cancel=Ce.CanceledError;Ce.all=function(t){return Promise.all(t)};Ce.spread=SN;Ce.isAxiosError=AN;Ce.mergeConfig=Et;Ce.AxiosHeaders=ze;Ce.formToJSON=e=>Wc(Z.isHTMLForm(e)?new FormData(e):e);Ce.getAdapter=Jc.getAdapter;Ce.HttpStatusCode=mi;Ce.default=Ce;const{Axios:GO,AxiosError:KO,CanceledError:WO,isCancel:VO,CancelToken:YO,VERSION:ZO,all:XO,Cancel:QO,isAxiosError:JO,spread:eT,toFormData:tT,AxiosHeaders:nT,HttpStatusCode:rT,formToJSON:iT,getAdapter:oT,mergeConfig:aT}=Ce,Je={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`};class ru{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 iu{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 ou{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 au=le.createContext(void 0);function NN({config:e,children:t}){const n=le.useMemo(()=>{const r=e.apiClient||Ce.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json"}}),i=new ru(r),a=new iu(r),o=new ou(r);return{config:e,apiClient:r,articleApi:i,categoryApi:a,tagApi:o}},[e]);return j.jsx(au.Provider,{value:n,children:t})}function _r(){const e=le.useContext(au);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function ON(){const{articleApi:e}=_r(),[t,n]=le.useState(null),[r,i]=le.useState(!1),[a,o]=le.useState(null),[l,s]=le.useState(),c=le.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=le.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=le.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=le.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=le.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=le.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 TN(){const{categoryApi:e}=_r(),[t,n]=le.useState([]),[r,i]=le.useState(!1),[a,o]=le.useState(null),[l,s]=le.useState(),c=le.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=le.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=le.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=le.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=le.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=le.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 CN(){const{tagApi:e}=_r(),[t,n]=le.useState([]),[r,i]=le.useState(!1),[a,o]=le.useState(null),[l,s]=le.useState(),c=le.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=le.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=le.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=le.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=le.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=le.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=le.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 RN(...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 IN=Symbol.for("react.lazy"),Vn=_e[" use ".trim().toString()];function LN(e){return typeof e=="object"&&e!==null&&"then"in e}function lu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===IN&&"_payload"in e&&LN(e._payload)}function su(e){const t=PN(e),n=_e.forwardRef((r,i)=>{let{children:a,...o}=r;lu(a)&&typeof Vn=="function"&&(a=Vn(a._payload));const l=_e.Children.toArray(a),s=l.find(BN);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 MN=su("Slot");function PN(e){const t=_e.forwardRef((n,r)=>{let{children:i,...a}=n;if(lu(i)&&typeof Vn=="function"&&(i=Vn(i._payload)),_e.isValidElement(i)){const o=jN(i),l=FN(a,i.props);return i.type!==_e.Fragment&&(l.ref=r?RN(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 DN=Symbol("radix.slottable");function BN(e){return _e.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DN}function FN(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 jN(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 cu(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=cu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function uu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cu(e))&&(r&&(r+=" "),r+=t);return r}const ul=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fl=uu,fu=(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="-",UN=e=>{const t=qN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Qi);return l[0]===""&&l.length!==1&&l.shift(),du(l,t)||zN(o)},getConflictingClassGroupIds:(o,l)=>{const s=n[o]||[];return l&&r[o]?[...s,...r[o]]:s}}},du=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?du(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=/^\[(.+)\]$/,zN=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}},qN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return HN(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($N(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},$N=e=>e.isThemeGetter,HN=(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,GN=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)}}},hu="!",KN=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(hu),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},WN=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},VN=e=>({cache:GN(e.cacheSize),parseClassName:KN(e),...UN(e)}),YN=/\s+/,ZN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(YN);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=WN(d).join(":"),m=u?y+hu: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 XN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pu(t))&&(r&&(r+=" "),r+=n);return r}const pu=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pu(e[r]))&&(n&&(n+=" "),n+=t);return n};function QN(e,...t){let n,r,i,a=o;function o(s){const c=t.reduce((d,u)=>u(d),e());return n=VN(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=ZN(s,n);return i(s,d),d}return function(){return a(XN.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gu=/^\[(?:([a-z-]+):)?(.+)\]$/i,JN=/^\d+\/\d+$/,eO=new Set(["px","full","screen"]),tO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nO=/\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$/,rO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>Lt(e)||eO.has(e)||JN.test(e),ut=e=>Wt(e,"length",hO),Lt=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>Wt(e,"number",Lt),nn=e=>!!e&&Number.isInteger(Number(e)),aO=e=>e.endsWith("%")&&Lt(e.slice(0,-1)),be=e=>gu.test(e),ft=e=>tO.test(e),lO=new Set(["length","size","percentage"]),sO=e=>Wt(e,lO,mu),cO=e=>Wt(e,"position",mu),uO=new Set(["image","url"]),fO=e=>Wt(e,uO,gO),dO=e=>Wt(e,"",pO),rn=()=>!0,Wt=(e,t,n)=>{const r=gu.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hO=e=>nO.test(e)&&!rO.test(e),mu=()=>!1,pO=e=>iO.test(e),gO=e=>oO.test(e),mO=()=>{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:[aO,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(),cO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fO]}],"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,dO]}],"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"]}}},yO=QN(mO);function St(...e){return yO(uu(e))}const bO=fu("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"}}),yu=_e.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?MN:"button";return j.jsx(o,{className:St(bO({variant:t,size:n,className:e})),ref:a,...i})});yu.displayName="Button";const bu=_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}));bu.displayName="Input";var vO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Er=vO.reduce((e,t)=>{const n=su(`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}},{}),_O="Label",vu=_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())}}));vu.displayName=_O;var _u=vu;const EO=fu("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Eu=_e.forwardRef(({className:e,...t},n)=>j.jsx(_u,{ref:n,className:St(EO(),e),...t}));Eu.displayName=_u.displayName;function xO(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,wO(i,...t)]}function wO(...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 kO(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={};/**
|
|
76
116
|
* @license React
|
|
77
117
|
* use-sync-external-store-shim.production.js
|
|
78
118
|
*
|
|
@@ -80,7 +120,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),y=T,j=D),L===void 0&&(
|
|
|
80
120
|
*
|
|
81
121
|
* This source code is licensed under the MIT license found in the
|
|
82
122
|
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/var
|
|
123
|
+
*/var pl;function SO(){if(pl)return Wr;pl=1;var e=le;function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(u,h){var f=h(),g=r({inst:{value:f,getSnapshot:h}}),p=g[0].inst,y=g[1];return a(function(){p.value=f,p.getSnapshot=h,s(p)&&y({inst:p})},[u,f,h]),i(function(){return s(p)&&y({inst:p}),u(function(){s(p)&&y({inst:p})})},[u]),o(f),f}function s(u){var h=u.getSnapshot;u=u.value;try{var f=h();return!n(u,f)}catch{return!0}}function c(u,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:l;return Wr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Wr}var Vr={};/**
|
|
84
124
|
* @license React
|
|
85
125
|
* use-sync-external-store-shim.development.js
|
|
86
126
|
*
|
|
@@ -88,5 +128,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),y=T,j=D),L===void 0&&(
|
|
|
88
128
|
*
|
|
89
129
|
* This source code is licensed under the MIT license found in the
|
|
90
130
|
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var
|
|
131
|
+
*/var gl;function AO(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&function(){function e(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}function t(f,g){d||i.startTransition===void 0||(d=!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 p=g();if(!u){var y=g();a(p,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}y=o({inst:{value:p,getSnapshot:g}});var m=y[0].inst,b=y[1];return s(function(){m.value=p,m.getSnapshot=g,n(m)&&b({inst:m})},[f,p,g]),l(function(){return n(m)&&b({inst:m}),f(function(){n(m)&&b({inst:m})})},[f]),c(p),p}function n(f){var g=f.getSnapshot;f=f.value;try{var p=g();return!a(f,p)}catch{return!0}}function r(f,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=le,a=typeof Object.is=="function"?Object.is:e,o=i.useState,l=i.useEffect,s=i.useLayoutEffect,c=i.useDebugValue,d=!1,u=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Vr.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())}()),Vr}process.env.NODE_ENV==="production"?vi.exports=SO():vi.exports=AO();var NO=vi.exports;function OO(){return NO.useSyncExternalStore(TO,()=>!0,()=>!1)}function TO(){return()=>{}}var Ji="Avatar",[CO]=xO(Ji),[RO,xu]=CO(Ji),wu=_e.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=_e.useState("idle");return j.jsx(RO,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:j.jsx(Er.span,{...r,ref:t})})});wu.displayName=Ji;var ku="AvatarImage",Su=_e.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=xu(ku,n),l=IO(r,a),s=kO(c=>{i(c),o.onImageLoadingStatusChange(c)});return bi(()=>{l!=="idle"&&s(l)},[l,s]),l==="loaded"?j.jsx(Er.img,{...a,ref:t,src:r}):null});Su.displayName=ku;var Au="AvatarFallback",Nu=_e.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=xu(Au,n),[o,l]=_e.useState(r===void 0);return _e.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(s)}},[r]),o&&a.imageLoadingStatus!=="loaded"?j.jsx(Er.span,{...i,ref:t}):null});Nu.displayName=Au;function ml(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function IO(e,{referrerPolicy:t,crossOrigin:n}){const r=OO(),i=_e.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[o,l]=_e.useState(()=>ml(a,e));return bi(()=>{l(ml(a,e))},[a,e]),bi(()=>{const s=u=>()=>{l(u)};if(!a)return;const c=s("loaded"),d=s("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,n,t]),o}var Ou=wu,Tu=Su,Cu=Nu;const Ru=_e.forwardRef(({className:e,...t},n)=>j.jsx(Ou,{ref:n,className:St("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ru.displayName=Ou.displayName;const Iu=_e.forwardRef(({className:e,...t},n)=>j.jsx(Tu,{ref:n,className:St("aspect-square h-full w-full",e),...t}));Iu.displayName=Tu.displayName;const Lu=_e.forwardRef(({className:e,...t},n)=>j.jsx(Cu,{ref:n,className:St("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Lu.displayName=Cu.displayName;function LO(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 MO(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,a=t-7;for(let l=t;l>=1;l--)i+=parseInt(n.charAt(t-l))*a--,a<2&&(a=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,a=t-7;for(let l=t;l>=1;l--)i+=parseInt(n.charAt(t-l))*a--,a<2&&(a=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function PO(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function DO(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function BO(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 FO(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 jO(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function UO(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:a=!0,requireSpecialChars:o=!0}=t,l=[];let s=0;e.length<n?l.push(`Password must be at least ${n} characters long`):(s++,e.length>=12&&s++),r&&!/[A-Z]/.test(e)?l.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&s++,i&&!/[a-z]/.test(e)?l.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&s++,a&&!/\d/.test(e)?l.push("Password must contain at least one number"):/\d/.test(e)&&s++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?l.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&s++;const c=l.length===0;return{score:Math.min(s,4),feedback:l,isValid:c}}function zO(e,t){let n=null;return function(...i){const a=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(a,t)}}function qO(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}exports.ArticleAPI=ru;exports.ArticleEditor=zS;exports.ArticleList=Du;exports.ArticleStatus=Ie;exports.ArticleViewer=a_;exports.Avatar=Ru;exports.AvatarFallback=Lu;exports.AvatarImage=Iu;exports.Button=yu;exports.CategoryAPI=iu;exports.CategoryList=WS;exports.CategoryModal=VS;exports.Input=bu;exports.Label=Eu;exports.MarkdownEditor=qS;exports.NNewsProvider=NN;exports.TagAPI=ou;exports.TagList=YS;exports.TagMerge=XS;exports.TagModal=ZS;exports.cn=St;exports.debounce=zO;exports.formatDocument=FO;exports.formatPhone=BO;exports.formatZipCode=jO;exports.throttle=qO;exports.useArticles=ON;exports.useCategories=TN;exports.useNNews=_r;exports.useTags=CN;exports.validateCNPJ=MO;exports.validateCPF=LO;exports.validateEmail=PO;exports.validatePasswordStrength=UO;exports.validatePhone=DO;
|
|
92
132
|
//# sourceMappingURL=index.cjs.map
|