nnews-react 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var qm=Object.defineProperty;var Um=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Um(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),H=require("react");require("react-dom");function $m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const fe=$m(H);var Fe=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(Fe||{});function zm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:s,onAIClick:o,showActions:a=!1,emptyMessage:l="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:l})}):E.jsxs("div",{className:"space-y-6",children:[E.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(c=>E.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[c.imageName&&E.jsx("div",{className:`w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r?"cursor-pointer":""}`,onClick:()=>r==null?void 0:r(c),children:E.jsx("img",{src:c.imageName,alt:c.title,className:"w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",style:{height:"250px"}})}),E.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(c),children:c.title}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[c.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(c.dateAt).toLocaleDateString()]}),c.category&&E.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:c.category.title})]}),E.jsx("div",{className:"mt-3",children:E.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${c.status===Fe.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":c.status===Fe.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":c.status===Fe.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":c.status===Fe.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:Fe[c.status]})}),c.tags&&c.tags.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[c.tags.slice(0,3).map(u=>E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",u.title]},u.tagId)),c.tags.length>3&&E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",c.tags.length-3]})]}),c.roles&&c.roles.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[c.roles.slice(0,2).map(u=>E.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:u.name},u.slug)),c.roles.length>2&&E.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",c.roles.length-2]})]})]}),a&&(i||s||o)&&E.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",title:"AI Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:"Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-2 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20",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"})})})]})]})]},c.articleId))}),e.totalPages>1&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:E.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function jm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Km={};function Mc(e,t){return(Km.jsx?Gm:Hm).test(e)}const Wm=/[ \t\n\f\r]/g;function Vm(e){return typeof e=="object"?e.type==="text"?Dc(e.value):!1:Dc(e)}function Dc(e){return e.replace(Wm,"")===""}class Li{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Li(n,r,t)}function ja(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let Ym=0;const de=er(),Me=er(),Ha=er(),$=er(),Te=er(),Sr=er(),xt=er();function er(){return 2**++Ym}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:xt,commaSeparated:Sr,number:$,overloadedBoolean:Ha,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends mt{constructor(t,n,r,i){let s=-1;if(super(t,n),Pc(this,"space",i),typeof r=="number")for(;++s<oa.length;){const o=oa[s];Pc(this,oa[s],(r&Ga[o])===Ga[o])}}}Ml.prototype.defined=!0;function Pc(e,t,n){n&&(e[t]=n)}function Ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ml(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ja(r)]=r,n[ja(s.attribute)]=r}return new Li(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Te,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:$,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Te,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Me,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Tf(e,t){return Sf(e,t.toLowerCase())}const Zm=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Te,autoFocus:de,autoPlay:de,blocking:Te,capture:null,charSet:null,checked:de,cite:null,className:Te,cols:$,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:Te,coords:$|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ha,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Te,height:$,hidden:Ha,high:$,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Te,itemRef:Te,itemScope:de,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:de,optimum:$,pattern:null,ping:Te,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Te,required:de,reversed:de,rows:$,rowSpan:$,sandbox:Te,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Me,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Tf}),Xm=Ur({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Sr,g2:Sr,glyphName:Sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),Cf=Ur({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Of=Ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),If=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qm={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Jm=/[A-Z]/g,Bc=/-[a-z]/g,eb=/^data[-\w.:]+$/i;function tb(e,t){const n=ja(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,rb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Jm,nb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function nb(e){return"-"+e.toLowerCase()}function rb(e){return e.charAt(1).toUpperCase()}const ib=Nf([Af,Zm,Cf,Of,If],"html"),Dl=Nf([Af,Xm,Cf,Of,If],"svg");function sb(e){return e.join(" ").trim()}var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ob=/\n/g,ab=/^\s*/,lb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,cb=/^:\s*/,ub=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,db=/^[;\s]*/,fb=/^\s+|\s+$/g,hb=`
1
+ "use strict";var qm=Object.defineProperty;var Um=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Um(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),H=require("react");require("react-dom");function $m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const fe=$m(H);var Fe=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(Fe||{});function zm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onAIClick:s,showActions:o=!1,emptyMessage:a="No articles found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsxs("div",{className:"space-y-6",children:[E.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(l=>E.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[l.imageName&&E.jsx("div",{className:`w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r?"cursor-pointer":""}`,onClick:()=>r==null?void 0:r(l),children:E.jsx("img",{src:l.imageName,alt:l.title,className:"w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",style:{height:"250px"}})}),E.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(l),children:l.title}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[l.dateAt&&E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(l.dateAt).toLocaleDateString()]}),l.category&&E.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:l.category.title})]}),E.jsx("div",{className:"mt-3",children:E.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${l.status===Fe.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":l.status===Fe.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":l.status===Fe.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":l.status===Fe.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:Fe[l.status]})}),l.tags&&l.tags.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.tags.slice(0,3).map(c=>E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",c.title]},c.tagId)),l.tags.length>3&&E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",l.tags.length-3]})]}),l.roles&&l.roles.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.roles.slice(0,2).map(c=>E.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:c.name},c.slug)),l.roles.length>2&&E.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",l.roles.length-2]})]})]}),o&&(i||s)&&E.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[s&&E.jsx("button",{onClick:()=>s(l),className:"rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",title:"AI Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),i&&E.jsx("button",{onClick:()=>i(l),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:"Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]})]})]},l.articleId))}),e.totalPages>1&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:E.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function jm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Km={};function Mc(e,t){return(Km.jsx?Gm:Hm).test(e)}const Wm=/[ \t\n\f\r]/g;function Vm(e){return typeof e=="object"?e.type==="text"?Dc(e.value):!1:Dc(e)}function Dc(e){return e.replace(Wm,"")===""}class Li{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Li(n,r,t)}function ja(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let Ym=0;const de=er(),Me=er(),Ha=er(),$=er(),Te=er(),Sr=er(),xt=er();function er(){return 2**++Ym}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:xt,commaSeparated:Sr,number:$,overloadedBoolean:Ha,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends mt{constructor(t,n,r,i){let s=-1;if(super(t,n),Pc(this,"space",i),typeof r=="number")for(;++s<oa.length;){const o=oa[s];Pc(this,oa[s],(r&Ga[o])===Ga[o])}}}Ml.prototype.defined=!0;function Pc(e,t,n){n&&(e[t]=n)}function Ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ml(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ja(r)]=r,n[ja(s.attribute)]=r}return new Li(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Te,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:$,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Te,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Me,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Tf(e,t){return Sf(e,t.toLowerCase())}const Zm=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Te,autoFocus:de,autoPlay:de,blocking:Te,capture:null,charSet:null,checked:de,cite:null,className:Te,cols:$,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:Te,coords:$|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ha,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Te,height:$,hidden:Ha,high:$,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Te,itemRef:Te,itemScope:de,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:de,optimum:$,pattern:null,ping:Te,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Te,required:de,reversed:de,rows:$,rowSpan:$,sandbox:Te,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Me,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Tf}),Xm=Ur({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Sr,g2:Sr,glyphName:Sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),Cf=Ur({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Of=Ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),If=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qm={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Jm=/[A-Z]/g,Bc=/-[a-z]/g,eb=/^data[-\w.:]+$/i;function tb(e,t){const n=ja(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,rb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Jm,nb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function nb(e){return"-"+e.toLowerCase()}function rb(e){return e.charAt(1).toUpperCase()}const ib=Nf([Af,Zm,Cf,Of,If],"html"),Dl=Nf([Af,Xm,Cf,Of,If],"svg");function sb(e){return e.join(" ").trim()}var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ob=/\n/g,ab=/^\s*/,lb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,cb=/^:\s*/,ub=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,db=/^[;\s]*/,fb=/^\s+|\s+$/g,hb=`
2
2
  `,qc="/",Uc="*",Gn="",pb="comment",gb="declaration";function mb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var m=p.match(ob);m&&(n+=m.length);var b=p.lastIndexOf(hb);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new o(p),c(),m}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var b=m[0];return i(b),e=e.slice(b.length),m}}function c(){l(ab)}function u(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!(qc!=e.charAt(0)||Uc!=e.charAt(1))){for(var m=2;Gn!=e.charAt(m)&&(Uc!=e.charAt(m)||qc!=e.charAt(m+1));)++m;if(m+=2,Gn===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,i(b),e=e.slice(m),r+=2,p({type:pb,comment:b})}}function h(){var p=s(),m=l(lb);if(m){if(d(),!l(cb))return a("property missing ':'");var b=l(ub),y=p({type:gb,property:$c(m[0].replace(Fc,Gn)),value:b?$c(b[0].replace(Fc,Gn)):Gn});return l(db),y}}function f(){var p=[];u(p);for(var m;m=h();)m!==!1&&(p.push(m),u(p));return p}return c(),f()}function $c(e){return e?e.replace(fb,Gn):Gn}var bb=mb,yb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=Eb;const xb=yb(bb);function Eb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,xb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.camelCase=void 0;var wb=/^--[a-zA-Z0-9_-]+$/,_b=/-([a-z])/g,vb=/^[^-]+$/,kb=/^-(webkit|moz|ms|o|khtml)-/,Nb=/^-(ms)-/,Ab=function(e){return!e||vb.test(e)||wb.test(e)},Sb=function(e,t){return t.toUpperCase()},zc=function(e,t){return"".concat(t,"-")},Tb=function(e,t){return t===void 0&&(t={}),Ab(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Nb,zc):e=e.replace(kb,zc),e.replace(_b,Sb))};Ks.camelCase=Tb;var Cb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=Cb(Pl),Ib=Ks;function Ka(e,t){var n={};return!e||typeof e!="string"||(0,Ob.default)(e,function(r,i){r&&i&&(n[(0,Ib.camelCase)(r,t)]=i)}),n}Ka.default=Ka;var Rb=Ka;const Lb=Mi(Rb),Rf=Lf("end"),Bl=Lf("start");function Lf(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Mb(e){const t=Bl(e),n=Rf(e);if(t&&n)return{start:t,end:n}}function pi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jc(e.position):"start"in e||"end"in e?jc(e):"line"in e||"column"in e?Wa(e):""}function Wa(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function jc(e){return Wa(e&&e.start)+"-"+Wa(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class Qe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=pi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const Fl={}.hasOwnProperty,Db=new Map,Pb=/[A-Z]/g,Bb=new Set(["table","tbody","thead","tfoot","tr"]),Fb=new Set(["td","th"]),Mf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Wb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Kb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Dl:ib,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Df(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Df(e,t,n){if(t.type==="element")return Ub(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $b(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jb(e,t,n);if(t.type==="mdxjsEsm")return zb(e,t);if(t.type==="root")return Hb(e,t,n);if(t.type==="text")return Gb(e,t)}function Ub(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=Bf(e,t.tagName,!1),o=Vb(e,t);let a=Ul(e,t);return Bb.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Vm(l):!0})),Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function $b(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wi(e,t.position)}function zb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wi(e,t.position)}function jb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bf(e,t.name,!0),o=Yb(e,t),a=Ul(e,t);return Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Hb(e,t,n){const r={};return ql(r,Ul(e,t)),e.create(t,e.Fragment,r,n)}function Gb(e,t){return t.value}function Pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ql(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kb(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function Wb(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Bl(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Vb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Fl.call(t.properties,i)){const s=Zb(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Fb.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Yb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wi(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else wi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ul(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Db;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Df(e,s,o);a!==void 0&&n.push(a)}return n}function Zb(e,t,n){const r=tb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jm(n):sb(n)),r.property==="style"){let i=typeof n=="object"?n:Xb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Qb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qm[r.property]||r.property:r.attribute,n]}}function Xb(e,t){try{return Lb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Qe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Mf+"#cannot-parse-style-attribute",i}}function Bf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=Mc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=Mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Fl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wi(e)}function wi(e,t){const n=new Qe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qb(e){const t={};let n;for(n in e)Fl.call(e,n)&&(t[Jb(n)]=e[n]);return t}function Jb(e){let t=e.replace(Pb,ey);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ey(e){return"-"+e.toLowerCase()}const aa={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ty={};function ny(e,t){const n=ty,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ff(e,r,i)}function Ff(e,t,n){if(ry(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ff(e[i],t,n);return r.join("")}function ry(e){return!!(e&&typeof e=="object")}const Kc=document.createElement("i");function $l(e){const t="&"+e+";";Kc.innerHTML=t;const n=Kc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function St(e,t){return e.length>0?(wt(e,e.length,0,t),e):t}const Wc={}.hasOwnProperty;function qf(e){const t={};let n=-1;for(;++n<e.length;)iy(t,e[n]);return t}function iy(e,t){let n;for(n in t){const i=(Wc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Wc.call(i,o)||(i[o]=[]);const a=s[o];sy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wt(e,0,0,r)}function Uf(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=Pn(/[A-Za-z]/),Ze=Pn(/[\dA-Za-z]/),oy=Pn(/[#-'*+\--9=?A-Z^-~]/);function Is(e){return e!==null&&(e<32||e===127)}const Va=Pn(/\d/),ay=Pn(/[\dA-Fa-f]/),ly=Pn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function ke(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Ws=Pn(new RegExp("\\p{P}|\\p{S}","u")),Yn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Ze(e.charCodeAt(n+1))&&Ze(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return ge(l)?(e.enter(n),a(l)):t(l)}function a(l){return ge(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const cy={tokenize:uy};function uy(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return oe(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const dy={tokenize:fy},Vc={tokenize:hy};function fy(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let C=T,N;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){N=t.events[C][1].end;break}y(r);let P=T;for(;P<t.events.length;)t.events[P][1].end={...N},P++;return wt(t.events,C+1,0,t.events.slice(T)),t.events.length=P,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vc,u,d)(v)}function u(v){return i&&_(),y(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(Vc,f,p)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&_(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(v)}function m(v){if(v===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return oe(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function b(v,T){const C=t.sliceStream(v);if(T&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<o&&(!i.events[N][1].end||i.events[N][1].end.offset>o))return;const P=t.events.length;let U=P,G,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(G){O=t.events[U][1].end;break}G=!0}for(y(r),N=P;N<t.events.length;)t.events[N][1].end={...O},N++;wt(t.events,U+1,0,t.events.slice(P)),t.events.length=N}}function y(v){let T=n.length;for(;T-- >v;){const C=n[T];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function _(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||ke(e)||Yn(e))return 1;if(Ws(e))return 2}function Vs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ya={name:"attention",resolveAll:py,tokenize:gy};function py(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Yc(d,-l),Yc(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=St(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=St(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=St(c,Vs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=St(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=St(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=Rr(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Yc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const my={name:"autolink",tokenize:by};function by(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return st(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Ze(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Ze(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Is(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):oy(f)?(e.consume(f),c):n(f)}function u(f){return Ze(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||Ze(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Di={partial:!0,tokenize:yy};function yy(e,t,n){return r;function r(s){return ge(s)?be(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const $f={continuation:{tokenize:Ey},exit:wy,name:"blockQuote",tokenize:xy};function xy(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return ge(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ey(e,t,n){const r=this;return i;function i(o){return ge(o)?be(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt($f,t,n)(o)}}function wy(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:_y};function _y(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ly(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jf={name:"characterReference",tokenize:vy};function vy(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=Ze,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=ay,u):(e.enter("characterReferenceValue"),s=7,o=Va,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Ze&&!$l(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const Zc={partial:!0,tokenize:Ny},Xc={concrete:!0,name:"codeFenced",tokenize:ky};function ky(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(N){return c(N)}function c(N){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===a?(o++,e.consume(N),u):o<3?n(N):(e.exit("codeFencedFenceSequence"),ge(N)?be(e,d,"whitespace")(N):d(N))}function d(N){return N===null||oe(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Zc,m,T)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ge(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,f,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),h)}function f(N){return N===null||oe(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===a?n(N):(e.consume(N),p)}function m(N){return e.attempt(i,T,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return s>0&&ge(N)?be(e,_,"linePrefix",s+1)(N):_(N)}function _(N){return N===null||oe(N)?e.check(Zc,m,T)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||oe(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),v)}function T(N){return e.exit("codeFenced"),t(N)}function C(N,P,U){let G=0;return O;function O(Y){return N.enter("lineEnding"),N.consume(Y),N.exit("lineEnding"),j}function j(Y){return N.enter("codeFencedFence"),ge(Y)?be(N,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):B(Y)}function B(Y){return Y===a?(N.enter("codeFencedFenceSequence"),re(Y)):U(Y)}function re(Y){return Y===a?(G++,N.consume(Y),re):G>=o?(N.exit("codeFencedFenceSequence"),ge(Y)?be(N,X,"whitespace")(Y):X(Y)):U(Y)}function X(Y){return Y===null||oe(Y)?(N.exit("codeFencedFence"),P(Y)):U(Y)}}}function Ny(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const la={name:"codeIndented",tokenize:Sy},Ay={partial:!0,tokenize:Ty};function Sy(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),be(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):oe(c)?e.attempt(Ay,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||oe(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function Ty(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):be(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):oe(o)?i(o):n(o)}}const Cy={name:"codeText",previous:Iy,resolve:Oy,tokenize:Ry};function Oy(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Iy(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ry(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||oe(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class Ly{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&si(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),si(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);si(this.left,n.reverse())}}}function si(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Hf(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new Ly(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,My(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return wt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function My(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const y=a.slice(b[h],b[h+1]),_=s.pop();l.push([_,_+y.length-1]),e.splice(_,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const Dy={resolve:By,tokenize:Fy},Py={partial:!0,tokenize:qy};function By(e){return Hf(e),e}function Fy(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):oe(a)?e.check(Py,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qy(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),be(e,s,"linePrefix")}function s(o){if(o===null||oe(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gf(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||Is(y)?n(y):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||oe(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||ke(y))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Is(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Kf(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):oe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||oe(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Wf(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||oe(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function gi(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Uy={name:"definition",tokenize:zy},$y={partial:!0,tokenize:jy};function zy(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return Kf.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return ke(f)?gi(e,c)(f):c(f)}function c(f){return Gf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt($y,d,d)(f)}function d(f){return ge(f)?be(e,h,"whitespace")(f):h(f)}function h(f){return f===null||oe(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function jy(e,t,n){return r;function r(a){return ke(a)?gi(e,i)(a):n(a)}function i(a){return Wf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ge(a)?be(e,o,"whitespace")(a):o(a)}function o(a){return a===null||oe(a)?t(a):n(a)}}const Hy={name:"hardBreakEscape",tokenize:Gy};function Gy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ky={name:"headingAtx",resolve:Wy,tokenize:Vy};function Wy(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Vy(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||ke(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||oe(u)?(e.exit("atxHeading"),t(u)):ge(u)?be(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||ke(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Yy=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qc=["pre","script","style","textarea"],Zy={concrete:!0,name:"htmlFlow",resolveTo:Jy,tokenize:e0},Xy={partial:!0,tokenize:n0},Qy={partial:!0,tokenize:t0};function Jy(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function e0(e,t,n){const r=this;let i,s,o,a,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),s=!0,m):k===63?(e.consume(k),i=3,r.interrupt?t:w):st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function h(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,a=0,p):st(k)?(e.consume(k),i=4,r.interrupt?t:w):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:w):n(k)}function p(k){const he="CDATA[";return k===he.charCodeAt(a++)?(e.consume(k),a===he.length?r.interrupt?t:B:p):n(k)}function m(k){return st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function b(k){if(k===null||k===47||k===62||ke(k)){const he=k===47,se=o.toLowerCase();return!he&&!s&&Qc.includes(se)?(i=1,r.interrupt?t(k):B(k)):Yy.includes(o.toLowerCase())?(i=6,he?(e.consume(k),y):r.interrupt?t(k):B(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?_(k):v(k))}return k===45||Ze(k)?(e.consume(k),o+=String.fromCharCode(k),b):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:B):n(k)}function _(k){return ge(k)?(e.consume(k),_):O(k)}function v(k){return k===47?(e.consume(k),O):k===58||k===95||st(k)?(e.consume(k),T):ge(k)?(e.consume(k),v):O(k)}function T(k){return k===45||k===46||k===58||k===95||Ze(k)?(e.consume(k),T):C(k)}function C(k){return k===61?(e.consume(k),N):ge(k)?(e.consume(k),C):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,P):ge(k)?(e.consume(k),N):U(k)}function P(k){return k===l?(e.consume(k),l=null,G):k===null||oe(k)?n(k):(e.consume(k),P)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ke(k)?C(k):(e.consume(k),U)}function G(k){return k===47||k===62||ge(k)?v(k):n(k)}function O(k){return k===62?(e.consume(k),j):n(k)}function j(k){return k===null||oe(k)?B(k):ge(k)?(e.consume(k),j):n(k)}function B(k){return k===45&&i===2?(e.consume(k),I):k===60&&i===1?(e.consume(k),q):k===62&&i===4?(e.consume(k),Q):k===63&&i===3?(e.consume(k),w):k===93&&i===5?(e.consume(k),K):oe(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Xy,ae,re)(k)):k===null||oe(k)?(e.exit("htmlFlowData"),re(k)):(e.consume(k),B)}function re(k){return e.check(Qy,X,ae)(k)}function X(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Y}function Y(k){return k===null||oe(k)?re(k):(e.enter("htmlFlowData"),B(k))}function I(k){return k===45?(e.consume(k),w):B(k)}function q(k){return k===47?(e.consume(k),o="",F):B(k)}function F(k){if(k===62){const he=o.toLowerCase();return Qc.includes(he)?(e.consume(k),Q):B(k)}return st(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),F):B(k)}function K(k){return k===93?(e.consume(k),w):B(k)}function w(k){return k===62?(e.consume(k),Q):k===45&&i===2?(e.consume(k),w):B(k)}function Q(k){return k===null||oe(k)?(e.exit("htmlFlowData"),ae(k)):(e.consume(k),Q)}function ae(k){return e.exit("htmlFlow"),t(k)}}function t0(e,t,n){const r=this;return i;function i(o){return oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function n0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Di,t,n)}}const r0={name:"htmlText",tokenize:i0};function i0(e,t,n){const r=this;let i,s,o;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),C):w===63?(e.consume(w),v):st(w)?(e.consume(w),U):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),s=0,p):st(w)?(e.consume(w),_):n(w)}function u(w){return w===45?(e.consume(w),f):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):oe(w)?(o=d,q(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),f):d(w)}function f(w){return w===62?I(w):w===45?h(w):d(w)}function p(w){const Q="CDATA[";return w===Q.charCodeAt(s++)?(e.consume(w),s===Q.length?m:p):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),b):oe(w)?(o=m,q(w)):(e.consume(w),m)}function b(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?I(w):w===93?(e.consume(w),y):m(w)}function _(w){return w===null||w===62?I(w):oe(w)?(o=_,q(w)):(e.consume(w),_)}function v(w){return w===null?n(w):w===63?(e.consume(w),T):oe(w)?(o=v,q(w)):(e.consume(w),v)}function T(w){return w===62?I(w):v(w)}function C(w){return st(w)?(e.consume(w),N):n(w)}function N(w){return w===45||Ze(w)?(e.consume(w),N):P(w)}function P(w){return oe(w)?(o=P,q(w)):ge(w)?(e.consume(w),P):I(w)}function U(w){return w===45||Ze(w)?(e.consume(w),U):w===47||w===62||ke(w)?G(w):n(w)}function G(w){return w===47?(e.consume(w),I):w===58||w===95||st(w)?(e.consume(w),O):oe(w)?(o=G,q(w)):ge(w)?(e.consume(w),G):I(w)}function O(w){return w===45||w===46||w===58||w===95||Ze(w)?(e.consume(w),O):j(w)}function j(w){return w===61?(e.consume(w),B):oe(w)?(o=j,q(w)):ge(w)?(e.consume(w),j):G(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,re):oe(w)?(o=B,q(w)):ge(w)?(e.consume(w),B):(e.consume(w),X)}function re(w){return w===i?(e.consume(w),i=void 0,Y):w===null?n(w):oe(w)?(o=re,q(w)):(e.consume(w),re)}function X(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ke(w)?G(w):(e.consume(w),X)}function Y(w){return w===47||w===62||ke(w)?G(w):n(w)}function I(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),F}function F(w){return ge(w)?be(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return e.enter("htmlTextData"),o(w)}}const zl={name:"labelEnd",resolveAll:l0,resolveTo:c0,tokenize:u0},s0={tokenize:d0},o0={tokenize:f0},a0={tokenize:h0};function l0(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&wt(e,0,e.length,n),e}function c0(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=St(a,e.slice(s+1,s+r+3)),a=St(a,[["enter",u,t]]),a=St(a,Vs(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=St(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=St(a,e.slice(o+1)),a=St(a,[["exit",l,t]]),wt(e,s,e.length,a),e}function u0(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Ht(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(s0,u,o?u:d)(h):h===91?e.attempt(o0,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(a0,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function d0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ke(d)?gi(e,s)(d):s(d)}function s(d){return d===41?u(d):Gf(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return ke(d)?gi(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Wf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ke(d)?gi(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function f0(e,t,n){const r=this;return i;function i(a){return Kf.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function h0(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const p0={name:"labelStartImage",resolveAll:zl.resolveAll,tokenize:g0};function g0(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const m0={name:"labelStartLink",resolveAll:zl.resolveAll,tokenize:b0};function b0(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ca={name:"lineEnding",tokenize:y0};function y0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const vs={name:"thematicBreak",tokenize:x0};function x0(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||oe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?be(e,a,"whitespace")(c):a(c))}}const ht={continuation:{tokenize:v0},exit:N0,name:"list",tokenize:_0},E0={partial:!0,tokenize:A0},w0={partial:!0,tokenize:k0};function _0(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Va(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(vs,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Va(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Di,r.interrupt?n:u,e.attempt(E0,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return ge(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function v0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Di,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ge(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(w0,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(ht,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function k0(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function N0(e){e.exit(this.containerState.type)}function A0(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Jc={name:"setextUnderline",resolveTo:S0,tokenize:T0};function S0(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function T0(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),ge(c)?be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||oe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C0={tokenize:O0};function O0(e){const t=this,n=e.attempt(Di,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dy,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const I0={resolveAll:Yf()},R0=Vf("string"),L0=Vf("text");function Vf(e){return{resolveAll:Yf(e==="text"?M0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Yf(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function M0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const D0={42:ht,43:ht,45:ht,48:ht,49:ht,50:ht,51:ht,52:ht,53:ht,54:ht,55:ht,56:ht,57:ht,62:$f},P0={91:Uy},B0={[-2]:la,[-1]:la,32:la},F0={35:Ky,42:vs,45:[Jc,vs],60:Zy,61:Jc,95:vs,96:Xc,126:Xc},q0={38:jf,92:zf},U0={[-5]:ca,[-4]:ca,[-3]:ca,33:p0,38:jf,42:Ya,60:[my,r0],91:m0,92:[Hy,zf],93:zl,95:Ya,96:Cy},$0={null:[Ya,I0]},z0={null:[42,95]},j0={null:[]},H0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z0,contentInitial:P0,disable:j0,document:D0,flow:F0,flowInitial:B0,insideSpan:$0,string:q0,text:U0},Symbol.toStringTag,{value:"Module"}));function G0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:P(C),check:P(N),consume:_,enter:v,exit:T,interrupt:P(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(j){return o=St(o,j),b(),o[o.length-1]!==null?[]:(U(t,0),c.events=Vs(s,c.events,c),c.events)}function h(j,B){return W0(f(j),B)}function f(j){return K0(o,j)}function p(){const{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}=r;return{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}}function m(j){i[j.line]=j.column,O()}function b(){let j;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<B.length;)y(B.charCodeAt(r._bufferIndex));else y(B)}}function y(j){u=u(j)}function _(j){oe(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,O()):j!==-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=j}function v(j,B){const re=B||{};return re.type=j,re.start=p(),c.events.push(["enter",re,c]),a.push(re),re}function T(j){const B=a.pop();return B.end=p(),c.events.push(["exit",B,c]),B}function C(j,B){U(j,B.from)}function N(j,B){B.restore()}function P(j,B){return re;function re(X,Y,I){let q,F,K,w;return Array.isArray(X)?ae(X):"tokenize"in X?ae([X]):Q(X);function Q(we){return at;function at(Ne){const Je=Ne!==null&&we[Ne],et=Ne!==null&&we.null,lt=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(et)?et:et?[et]:[]];return ae(lt)(Ne)}}function ae(we){return q=we,F=0,we.length===0?I:k(we[F])}function k(we){return at;function at(Ne){return w=G(),K=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?se():we.tokenize.call(B?Object.assign(Object.create(c),B):c,l,he,se)(Ne)}}function he(we){return j(K,w),Y}function se(we){return w.restore(),++F<q.length?k(q[F]):I}}}function U(j,B){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&wt(c.events,B,c.events.length-B,j.resolve(c.events.slice(B),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function G(){const j=p(),B=c.previous,re=c.currentConstruct,X=c.events.length,Y=Array.from(a);return{from:X,restore:I};function I(){r=j,c.previous=B,c.currentConstruct=re,c.events.length=X,a=Y,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function K0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function W0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
3
3
  `;break}case-3:{o=`\r
4
4
  `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function V0(e){const r={constructs:qf([H0,...(e||{}).extensions||[]]),content:i(cy),defined:[],document:i(dy),flow:i(C0),lazy:{},string:i(R0),text:i(L0)};return r;function i(s){return o;function o(a){return G0(r,s,a)}}}function Y0(e){for(;!Hf(e););return e}const eu=/[\0\t\n\r]/g;function Z0(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(eu.lastIndex=d,c=eu.exec(s),h=c&&c.index!==void 0?c.index:s.length,f=s.charCodeAt(h),!c){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const X0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Q0(e){return e.replace(X0,J0)}function J0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Uf(n.slice(s?2:1),s?16:10)}return $l(n)||e}const Zf={}.hasOwnProperty;function ex(e,t,n){return typeof t!="string"&&(n=t,t=void 0),tx(n)(Y0(V0(n).document().write(Z0()(e,t,!0))))}function tx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Mt),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Re),blockQuote:s(et),characterEscape:G,characterReference:G,codeFenced:s(lt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(lt,o),codeText:s(Lt,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(bt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(vt),hardBreakEscape:s(pe),hardBreakTrailing:s(pe),htmlFlow:s(je,o),htmlFlowData:G,htmlText:s(je,o),htmlTextData:G,image:s(ie),label:o,link:s(Mt),listItem:s(me),listItemValue:h,listOrdered:s(ve,d),listUnordered:s(ve),paragraph:s(Dt),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Re),strong:s(ct),thematicBreak:s(kt)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Je,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:we,characterReference:at,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:l(y),codeText:l(Y),codeTextData:O,data:O,definition:l(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(re),htmlFlowData:O,htmlText:l(X),htmlTextData:O,image:l(q),label:K,labelText:F,lineEnding:j,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:w,resourceTitleString:Q,resource:ae,setextHeading:l(U),setextHeadingLineSequence:P,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let R={type:"root",children:[]};const z={stack:[R],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},W=[];let te=-1;for(;++te<S.length;)if(S[te][1].type==="listOrdered"||S[te][1].type==="listUnordered")if(S[te][0]==="enter")W.push(te);else{const Ae=W.pop();te=i(S,Ae,te)}for(te=-1;++te<S.length;){const Ae=t[S[te][0]];Zf.call(Ae,S[te][1].type)&&Ae[S[te][1].type].call(Object.assign({sliceSerialize:S[te][2].sliceSerialize},z),S[te][1])}if(z.tokenStack.length>0){const Ae=z.tokenStack[z.tokenStack.length-1];(Ae[1]||tu).call(z,void 0,Ae[0])}for(R.position={start:An(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:An(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)R=t.transforms[te](R)||R;return R}function i(S,R,z){let W=R-1,te=-1,Ae=!1,ut,tt,Pt,Nt;for(;++W<=z;){const Be=S[W];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?te++:te--,Nt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(ut&&!Nt&&!te&&!Pt&&(Pt=W),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!te&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||te===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(ut){let yt=W;for(tt=void 0;yt--;){const qe=S[yt];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;tt&&(S[tt][1].type="lineEndingBlank",Ae=!0),qe[1].type="lineEnding",tt=yt}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}Pt&&(!tt||Pt<tt)&&(ut._spread=!0),ut.end=Object.assign({},tt?S[tt][1].start:Be[1].end),S.splice(tt||W,0,["exit",ut,Be[2]]),W++,z++}if(Be[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};ut=yt,S.splice(W,0,["enter",yt,Be[2]]),W++,z++,Pt=void 0,Nt=!0}}}return S[R][1]._spread=Ae,z}function s(S,R){return z;function z(W){a.call(this,S(W),W),R&&R.call(this,W)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(S,R,z){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([R,z||void 0]),S.position={start:An(R.start),end:void 0}}function l(S){return R;function R(z){S&&S.call(this,z),c.call(this,z)}}function c(S,R){const z=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(R?R.call(this,S,W[0]):(W[1]||tu).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+pi({start:S.start,end:S.end})+"): it’s not open");z.position.end=An(S.end)}function u(){return ny(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function f(){const S=this.resume(),R=this.stack[this.stack.length-1];R.lang=S}function p(){const S=this.resume(),R=this.stack[this.stack.length-1];R.meta=S}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/(\r?\n|\r)$/g,"")}function _(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function T(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function C(S){const R=this.stack[this.stack.length-1];if(!R.depth){const z=this.sliceSerialize(S).length;R.depth=z}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function P(S){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function G(S){const z=this.stack[this.stack.length-1].children;let W=z[z.length-1];(!W||W.type!=="text")&&(W=He(),W.position={start:An(S.start),end:void 0},z.push(W)),this.stack.push(W)}function O(S){const R=this.stack.pop();R.value+=this.sliceSerialize(S),R.position.end=An(S.end)}function j(S){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=R.children[R.children.length-1];z.position.end=An(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(G.call(this,S),O.call(this,S))}function B(){this.data.atHardBreak=!0}function re(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function X(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function Y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function I(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function F(S){const R=this.sliceSerialize(S),z=this.stack[this.stack.length-2];z.label=Q0(R),z.identifier=Ht(R).toLowerCase()}function K(){const S=this.stack[this.stack.length-1],R=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const W=S.children;z.children=W}else z.alt=R}function w(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function Q(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function ae(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function he(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function se(S){this.data.characterReferenceType=S.type}function we(S){const R=this.sliceSerialize(S),z=this.data.characterReferenceType;let W;z?(W=Uf(R,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=$l(R);const te=this.stack[this.stack.length-1];te.value+=W}function at(S){const R=this.stack.pop();R.position.end=An(S.end)}function Ne(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(S)}function Je(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(S)}function et(){return{type:"blockquote",children:[]}}function lt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function je(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function Mt(){return{type:"link",title:null,url:"",children:[]}}function ve(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function me(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Xf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xf(e,r):nx(e,r)}}function nx(e,t){let n;for(n in t)if(Zf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is still open")}function rx(e){const t=this;t.parser=n;function n(r){return ex(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ix(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sx(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -11,22 +11,22 @@
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
13
  `}),n}function cu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=Vx(e,t),r=n.one(e,void 0),i=Px(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
14
- `},i),s}function Jx(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var ks=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=ks.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ks.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ks.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(ks.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},e1=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Mi(e1);function Xa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function t1(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?n1(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function n1(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:r1,dirname:i1,extname:s1,join:o1,sep:"/"};function r1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function i1(e){if(Pi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function s1(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function o1(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":a1(n)}function a1(e){Pi(e);const t=e.codePointAt(0)===47;let n=l1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function l1(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c1={cwd:u1};function u1(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d1(e){if(typeof e=="string")e=new URL(e);else if(!Qa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return f1(e)}function f1(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||h1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":c1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=d1(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Qe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p1=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},g1={}.hasOwnProperty;class Wl extends p1{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=t1()}copy(){const t=new Wl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):g1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=as(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=as(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);y1(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),Eu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){xu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=as(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Eu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return ga("stringify",i),xu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const m1=new Wl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return b1(e)?e:new oh(e)}function b1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y1(e){return typeof e=="string"||x1(e)}function x1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return v1;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?E1(e):w1(e);if(typeof e=="string")return _1(e);throw new Error("Expected function, string, or object as test")};function E1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function w1(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _1(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(k1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function v1(){return!0}function k1(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],N1=!0,wu=!1,A1="skip";function S1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=T1(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==A1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function T1(e){return Array.isArray(e)?e:typeof e=="number"?[N1,e]:e==null?lh:[e]}function C1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),S1(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const O1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},I1=/^(https?|ircs?|mailto|xmpp)$/i,R1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=L1(e),n=M1(e);return D1(t.runSync(t.parse(n),n),e)}function L1(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return m1().use(rx).use(n).use(Jx,r).use(t)}function M1(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function D1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||P1;for(const u of R1)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+O1+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),C1(e,c),qb(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function P1(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||I1.test(e.slice(0,t))?e:""}function ku(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function B1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Vl=function(e){if(e==null)return $1;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?F1(e):q1(e);if(typeof e=="string")return U1(e);throw new Error("Expected function, string, or object as test")};function F1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function q1(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function U1(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(z1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $1(){return!0}function z1(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],j1=!0,Nu=!1,H1="skip";function G1(e,t,n,r){let i;i=t;const s=Vl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=K1(n(l,u)),f[0]===Nu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==H1)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Nu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function K1(e){return Array.isArray(e)?e:typeof e=="number"?[j1,e]:e==null?uh:[e]}function W1(e,t,n){const i=Vl((n||{}).ignore||[]),s=V1(t);let o=-1;for(;++o<s.length;)G1(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,C={index:v.index,input:v.input,stack:[...u,c]};let N=f(...v,C);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(N)?_.push(...N):N&&_.push(N),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,..._)):_=[c],b+_.length}}function V1(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Y1(i[0]),Z1(i[1])])}return t}function Y1(e){return typeof e=="string"?new RegExp(B1(e),"g"):e}function Z1(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function X1(){return{transforms:[iE],enter:{literalAutolink:J1,literalAutolinkEmail:xa,literalAutolinkHttp:xa,literalAutolinkWww:xa},exit:{literalAutolink:rE,literalAutolinkEmail:nE,literalAutolinkHttp:eE,literalAutolinkWww:tE}}}function Q1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function J1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xa(e){this.config.enter.autolinkProtocol.call(this,e)}function eE(e){this.config.exit.autolinkProtocol.call(this,e)}function tE(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 nE(e){this.config.exit.autolinkEmail.call(this,e)}function rE(e){this.exit(e)}function iE(e){W1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oE]],{ignore:["link","linkReference"]})}function sE(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!aE(n)))return!1;const o=lE(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function oE(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function aE(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 lE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ku(e,"(");let s=ku(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ws(n))&&(!t||n!==47)}fh.peek=bE;function cE(){this.buffer()}function uE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dE(){this.buffer()}function fE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pE(e){this.exit(e)}function gE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mE(e){this.exit(e)}function bE(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function yE(){return{enter:{gfmFootnoteCallString:cE,gfmFootnoteCall:uE,gfmFootnoteDefinitionLabelString:dE,gfmFootnoteDefinition:fE},exit:{gfmFootnoteCallString:hE,gfmFootnoteCall:pE,gfmFootnoteDefinitionLabelString:gE,gfmFootnoteDefinition:mE}}}function xE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
- `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:EE))),c(),l}}function EE(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const wE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=AE;function _E(){return{canContainEols:["delete"],enter:{strikethrough:kE},exit:{strikethrough:NE}}}function vE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wE}],handlers:{delete:ph}}}function kE(e){this.enter({type:"delete",children:[]},e)}function NE(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function AE(){return"~"}function SE(e){return e.length}function TE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||SE,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const _=CE(e[u][y]);if(n.alignDelimiters!==!1){const v=i(_);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(_)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=b.length+_+y.length,_>l[d]&&(l[d]=_),f[d]=_),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const _=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const C=l[d]-(b[d]||0),N=s[d];N===114?v=" ".repeat(C):N===99?C%2?(v=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),T=v):T=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(_),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
16
- `)}function CE(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function OE(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),IE);return i(),o}function IE(e,t,n){return">"+(n?"":" ")+e}function RE(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&RE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function LE(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function ME(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 DE(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 PE(e,t,n,r){const i=DE(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(ME(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,BE);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(LE(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
14
+ `},i),s}function Jx(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var ks=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=ks.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ks.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ks.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(ks.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},eE=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Mi(eE);function Xa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tE(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?nE(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function nE(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:rE,dirname:iE,extname:sE,join:oE,sep:"/"};function rE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function iE(e){if(Pi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function sE(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function oE(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aE(n)}function aE(e){Pi(e);const t=e.codePointAt(0)===47;let n=lE(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function lE(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cE={cwd:uE};function uE(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dE(e){if(typeof e=="string")e=new URL(e);else if(!Qa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fE(e)}function fE(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||hE(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":cE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=dE(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Qe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function hE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pE=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},gE={}.hasOwnProperty;class Wl extends pE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=tE()}copy(){const t=new Wl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):gE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=as(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=as(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);yE(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),Eu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){xu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=as(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Eu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return ga("stringify",i),xu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const mE=new Wl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return bE(e)?e:new oh(e)}function bE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yE(e){return typeof e=="string"||xE(e)}function xE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return vE;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?EE(e):wE(e);if(typeof e=="string")return _E(e);throw new Error("Expected function, string, or object as test")};function EE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function wE(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _E(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(kE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function vE(){return!0}function kE(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],NE=!0,wu=!1,AE="skip";function SE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=TE(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==AE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function TE(e){return Array.isArray(e)?e:typeof e=="number"?[NE,e]:e==null?lh:[e]}function CE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),SE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const OE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},IE=/^(https?|ircs?|mailto|xmpp)$/i,RE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=LE(e),n=ME(e);return DE(t.runSync(t.parse(n),n),e)}function LE(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return mE().use(rx).use(n).use(Jx,r).use(t)}function ME(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function DE(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||PE;for(const u of RE)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+OE+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),CE(e,c),qb(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function PE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||IE.test(e.slice(0,t))?e:""}function ku(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function BE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Vl=function(e){if(e==null)return $E;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?FE(e):qE(e);if(typeof e=="string")return UE(e);throw new Error("Expected function, string, or object as test")};function FE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function qE(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function UE(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(zE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $E(){return!0}function zE(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],jE=!0,Nu=!1,HE="skip";function GE(e,t,n,r){let i;i=t;const s=Vl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=KE(n(l,u)),f[0]===Nu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==HE)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Nu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function KE(e){return Array.isArray(e)?e:typeof e=="number"?[jE,e]:e==null?uh:[e]}function WE(e,t,n){const i=Vl((n||{}).ignore||[]),s=VE(t);let o=-1;for(;++o<s.length;)GE(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,C={index:v.index,input:v.input,stack:[...u,c]};let N=f(...v,C);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(N)?_.push(...N):N&&_.push(N),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,..._)):_=[c],b+_.length}}function VE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([YE(i[0]),ZE(i[1])])}return t}function YE(e){return typeof e=="string"?new RegExp(BE(e),"g"):e}function ZE(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function XE(){return{transforms:[i1],enter:{literalAutolink:JE,literalAutolinkEmail:xa,literalAutolinkHttp:xa,literalAutolinkWww:xa},exit:{literalAutolink:r1,literalAutolinkEmail:n1,literalAutolinkHttp:e1,literalAutolinkWww:t1}}}function QE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function JE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xa(e){this.config.enter.autolinkProtocol.call(this,e)}function e1(e){this.config.exit.autolinkProtocol.call(this,e)}function t1(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function n1(e){this.config.exit.autolinkEmail.call(this,e)}function r1(e){this.exit(e)}function i1(e){WE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s1],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),o1]],{ignore:["link","linkReference"]})}function s1(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!a1(n)))return!1;const o=l1(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function o1(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function a1(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function l1(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ku(e,"(");let s=ku(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ws(n))&&(!t||n!==47)}fh.peek=b1;function c1(){this.buffer()}function u1(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function d1(){this.buffer()}function f1(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function h1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function p1(e){this.exit(e)}function g1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m1(e){this.exit(e)}function b1(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function y1(){return{enter:{gfmFootnoteCallString:c1,gfmFootnoteCall:u1,gfmFootnoteDefinitionLabelString:d1,gfmFootnoteDefinition:f1},exit:{gfmFootnoteCallString:h1,gfmFootnoteCall:p1,gfmFootnoteDefinitionLabelString:g1,gfmFootnoteDefinition:m1}}}function x1(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
+ `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:E1))),c(),l}}function E1(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const w1=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=A1;function _1(){return{canContainEols:["delete"],enter:{strikethrough:k1},exit:{strikethrough:N1}}}function v1(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w1}],handlers:{delete:ph}}}function k1(e){this.enter({type:"delete",children:[]},e)}function N1(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function A1(){return"~"}function S1(e){return e.length}function T1(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||S1,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const _=C1(e[u][y]);if(n.alignDelimiters!==!1){const v=i(_);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(_)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=b.length+_+y.length,_>l[d]&&(l[d]=_),f[d]=_),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const _=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const C=l[d]-(b[d]||0),N=s[d];N===114?v=" ".repeat(C):N===99?C%2?(v=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),T=v):T=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(_),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
16
+ `)}function C1(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function O1(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),I1);return i(),o}function I1(e,t,n){return">"+(n?"":" ")+e}function R1(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&R1(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function L1(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function M1(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function D1(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function P1(e,t,n,r){const i=D1(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(M1(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,B1);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(L1(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
19
19
  `,encode:["`"],...a.current()})),d()}return u+=a.move(`
20
20
  `),s&&(u+=a.move(s+`
21
- `)),u+=a.move(l),c(),u}function BE(e,t,n){return(n?"":" ")+e}function Yl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function FE(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
- `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function qE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _i(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Rr(e),i=Rr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gh.peek=UE;function gh(e,t,n,r){const i=qE(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function UE(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return HE;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?$E(e):zE(e);if(typeof e=="string")return jE(e);throw new Error("Expected function, string, or object as test")};function $E(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function zE(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function jE(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(GE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function HE(){return!0}function GE(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],KE=!0,Ja=!1,WE="skip";function VE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=YE(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==WE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function YE(e){return Array.isArray(e)?e:typeof e=="number"?[KE,e]:e==null?bh:[e]}function ZE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),VE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const XE={};function yh(e,t){const n=XE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xh(e,r,i)}function xh(e,t,n){if(QE(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xh(e[i],t,n);return r.join("")}function QE(e){return!!(e&&typeof e=="object")}function JE(e,t){let n=!1;return ZE(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function ew(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(JE(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
21
+ `)),u+=a.move(l),c(),u}function B1(e,t,n){return(n?"":" ")+e}function Yl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function F1(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
+ `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function q1(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _i(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Rr(e),i=Rr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gh.peek=U1;function gh(e,t,n,r){const i=q1(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function U1(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return H1;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?$1(e):z1(e);if(typeof e=="string")return j1(e);throw new Error("Expected function, string, or object as test")};function $1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function z1(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function j1(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(G1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function H1(){return!0}function G1(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],K1=!0,Ja=!1,W1="skip";function V1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Y1(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==W1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Y1(e){return Array.isArray(e)?e:typeof e=="number"?[K1,e]:e==null?bh:[e]}function Z1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),V1(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const X1={};function yh(e,t){const n=X1,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xh(e,r,i)}function xh(e,t,n){if(Q1(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xh(e[i],t,n);return r.join("")}function Q1(e){return!!(e&&typeof e=="object")}function J1(e,t){let n=!1;return Z1(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function ew(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(J1(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
23
23
  `,after:`
24
24
  `});return d(),u(),h+`
25
25
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
26
26
  `))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...s.current()});return/^[\t ]/.test(c)&&(c=_i(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}Eh.peek=tw;function Eh(e){return e.value||""}function tw(){return"<"}wh.peek=nw;function wh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function nw(){return"!"}_h.peek=rw;function _h(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rw(){return"!"}vh.peek=iw;function vh(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function iw(){return"`"}function kh(e,t){const n=yh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nh.peek=sw;function Nh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(kh(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function sw(e,t,n){return kh(e,n)?"<":"["}Ah.peek=ow;function Ah(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function ow(){return"["}function Zl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aw(e){const t=Zl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lw(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sh(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?lw(n):Zl(n);const a=e.ordered?o==="."?")":".":aw(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sh(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function uw(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dw(e,t,n,r){const i=uw(n);let s=n.bulletCurrent||Zl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function fw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Th=function(e){if(e==null)return mw;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?hw(e):pw(e);if(typeof e=="string")return gw(e);throw new Error("Expected function, string, or object as test")};function hw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return eo(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function pw(e){const t=e;return eo(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function gw(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(bw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mw(){return!0}function bw(e){return e!==null&&typeof e=="object"&&"type"in e}const yw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xw(e,t,n,r){return(e.children.some(function(o){return yw(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ew(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ch.peek=ww;function Ch(e,t,n,r){const i=Ew(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function ww(e,t,n){return n.options.strong||"*"}function _w(e,t,n,r){return n.safe(e.value,r)}function vw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(vw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:OE,break:Tu,code:PE,definition:FE,emphasis:gh,hardBreak:Tu,heading:ew,html:Eh,image:wh,imageReference:_h,inlineCode:vh,link:Nh,linkReference:Ah,list:cw,listItem:dw,paragraph:fw,root:xw,strong:Ch,text:_w,thematicBreak:kw};function Nw(){return{enter:{table:Aw,tableData:Ou,tableHeader:Ou,tableRow:Tw},exit:{codeText:Cw,table:Sw,tableData:Ea,tableHeader:Ea,tableRow:Ea}}}function Aw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sw(e){this.exit(e),this.data.inTable=void 0}function Tw(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Cw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ow(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
27
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=_i(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}Eh.peek=tw;function Eh(e){return e.value||""}function tw(){return"<"}wh.peek=nw;function wh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function nw(){return"!"}_h.peek=rw;function _h(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rw(){return"!"}vh.peek=iw;function vh(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function iw(){return"`"}function kh(e,t){const n=yh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nh.peek=sw;function Nh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(kh(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function sw(e,t,n){return kh(e,n)?"<":"["}Ah.peek=ow;function Ah(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function ow(){return"["}function Zl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aw(e){const t=Zl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lw(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sh(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?lw(n):Zl(n);const a=e.ordered?o==="."?")":".":aw(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sh(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function uw(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dw(e,t,n,r){const i=uw(n);let s=n.bulletCurrent||Zl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function fw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Th=function(e){if(e==null)return mw;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?hw(e):pw(e);if(typeof e=="string")return gw(e);throw new Error("Expected function, string, or object as test")};function hw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return eo(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function pw(e){const t=e;return eo(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function gw(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(bw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mw(){return!0}function bw(e){return e!==null&&typeof e=="object"&&"type"in e}const yw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xw(e,t,n,r){return(e.children.some(function(o){return yw(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ew(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ch.peek=ww;function Ch(e,t,n,r){const i=Ew(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function ww(e,t,n){return n.options.strong||"*"}function _w(e,t,n,r){return n.safe(e.value,r)}function vw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(vw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:O1,break:Tu,code:P1,definition:F1,emphasis:gh,hardBreak:Tu,heading:ew,html:Eh,image:wh,imageReference:_h,inlineCode:vh,link:Nh,linkReference:Ah,list:cw,listItem:dw,paragraph:fw,root:xw,strong:Ch,text:_w,thematicBreak:kw};function Nw(){return{enter:{table:Aw,tableData:Ou,tableHeader:Ou,tableRow:Tw},exit:{codeText:Cw,table:Sw,tableData:Ea,tableHeader:Ea,tableRow:Ea}}}function Aw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sw(e){this.exit(e),this.data.inTable=void 0}function Tw(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Cw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ow(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
28
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const y=d(f,m,b),_=c([y]);return _.slice(0,_.indexOf(`
29
- `))}function l(f,p,m,b){const y=m.enter("tableCell"),_=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return _(),y(),v}function c(f,p){return TE(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("table");for(;++y<b.length;)_[y]=d(b[y],p,m);return v(),_}function d(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("tableRow");for(;++y<b.length;)_[y]=l(b[y],f,p,m);return v(),_}function h(f,p,m){let b=Oh.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Rw(){return{exit:{taskListCheckValueChecked:Iu,taskListCheckValueUnchecked:Iu,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dw}}}function Iu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Oh.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Pw(){return[X1(),yE(),_E(),Nw(),Rw()]}function Bw(e){return{extensions:[Q1(),xE(e),vE(),Iw(e),Lw()]}}const Fw={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Rh={tokenize:Kw,partial:!0},Lh={tokenize:Ww,partial:!0},qw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:zw,previous:Ph},Dh={name:"protocolAutolink",tokenize:jw,previous:Bh},wn={name:"emailAutolink",tokenize:$w,previous:Fh},un={};function Uw(){return{text:un}}let Hn=48;for(;Hn<123;)un[Hn]=wn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);un[43]=wn;un[45]=wn;un[46]=wn;un[95]=wn;un[72]=[wn,Dh];un[104]=[wn,Dh];un[87]=[wn,Mh];un[119]=[wn,Mh];function $w(e,t,n){const r=this;let i,s;return o;function o(d){return!el(d)||!Fh.call(r,r.previous)||Xl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return el(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(qw,u,c)(d):d===45||d===95||Ze(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function zw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Ph.call(r,r.previous)||Xl(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Ih,e.attempt(Rh,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jw(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Bh.call(r,r.previous)&&!Xl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(st(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Is(d)||ke(d)||Yn(d)||Ws(d)?n(d):e.attempt(Ih,e.attempt(Rh,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hw(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Gw(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Lh,l,a)(c):c===null||ke(c)||Yn(c)||c!==45&&Ws(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Kw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Lh,t,s)(o):o===null||ke(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Ww(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||ke(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ke(a)||Yn(a)?t(a):r(a)}function s(a){return st(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):st(a)?(e.consume(a),o):n(a)}}function Vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ze(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function Bh(e){return!st(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||Ze(e)}function Xl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Yw={tokenize:r_,partial:!0};function Zw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e_,continuation:{tokenize:t_},exit:n_}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:Qw}}}}function Xw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Ht(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Qw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||ke(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ke(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function e_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(o>999||p===93&&!a||p===null||p===91||ke(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ke(p)||(a=!0),o++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),be(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function t_(e,t,n){return e.check(Di,t,e.attempt(Yw,t,n))}function n_(e){e.exit("gfmFootnoteDefinition")}function r_(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function i_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&wt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),wt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),wt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Rr(c);if(p===126)return d>1?l(p):(o.consume(p),d++,f);if(d<2&&!n)return l(p);const b=o.exit("strikethroughSequenceTemporary"),y=Rr(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class s_{constructor(){this.map=[]}add(t,n,r){o_(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function o_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function a_(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function l_(){return{flow:{null:{name:"table",tokenize:c_,resolveAll:u_}}}}function c_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(O){let j=r.events.length-1;for(;j>-1;){const X=r.events[j][1].type;if(X==="lineEnding"||X==="linePrefix")j--;else break}const B=j>-1?r.events[j][1].type:null,re=B==="tableHead"||B==="tableRow"?N:l;return re===N&&r.parser.lazy[r.now().line]?n(O):re(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,s+=1),u(O)}function u(O){return O===null?n(O):oe(O)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):n(O):ge(O)?be(e,u,"whitespace")(O):(s+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||ke(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?h:d)}function h(O){return O===92||O===124?(e.consume(O),d):d(O)}function f(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,ge(O)?be(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):C(O)}function m(O){return ge(O)?be(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(s+=1,y(O)):O===null||oe(O)?T(O):C(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):C(O)}function _(O){return O===45?(e.consume(O),_):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return ge(O)?be(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||oe(O)?!o||i!==s?C(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):C(O)}function C(O){return n(O)}function N(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||oe(O)?(e.exit("tableRow"),t(O)):ge(O)?be(e,P,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||ke(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?G:U)}function G(O){return O===92||O===124?(e.consume(O),U):U(O)}}function u_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new s_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Ru(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ls(h,t,s,i,n,d)):o[1]!==0&&(d=ls(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ru(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=a_(t.events,n))}return e}function ls(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=yr(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=yr(t.events,n[2]),u=yr(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ru(e,t,n,r,i){const s=[],o=yr(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const d_={name:"tasklistCheck",tokenize:h_};function f_(){return{text:{91:d_}}}function h_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ke(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return oe(l)?t(l):ge(l)?e.check({tokenize:p_},t,n)(l):n(l)}}function p_(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function g_(e){return qf([Uw(),Zw(),i_(e),l_(),f_()])}const m_={};function qh(e){const t=this,n=e||m_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(g_(n)),s.push(Pw()),o.push(Bw(n))}const Uh=function(e){if(e==null)return E_;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?b_(e):y_(e);if(typeof e=="string")return x_(e);throw new Error("Expected function, string, or object as test")};function b_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return to(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function y_(e){const t=e;return to(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function x_(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(w_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function E_(){return!0}function w_(e){return e!==null&&typeof e=="object"&&"type"in e}const Lu=function(e,t,n){const r=Uh(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},tr=function(e){if(e==null)return k_;if(typeof e=="string")return v_(e);if(typeof e=="object")return __(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function __(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return Ql(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function v_(e){return Ql(t);function t(n){return n.tagName===e}}function Ql(e){return t;function t(n,r,i){return!!(N_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function N_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Mu=/\n/g,Du=/[\t ]+/g,tl=tr("br"),Pu=tr(L_),A_=tr("p"),Bu=tr("tr"),S_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,M_]),$h=tr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T_(e,t){const n=t||{},r="children"in e?e.children:[],i=$h(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
29
+ `))}function l(f,p,m,b){const y=m.enter("tableCell"),_=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return _(),y(),v}function c(f,p){return T1(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("table");for(;++y<b.length;)_[y]=d(b[y],p,m);return v(),_}function d(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("tableRow");for(;++y<b.length;)_[y]=l(b[y],f,p,m);return v(),_}function h(f,p,m){let b=Oh.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Rw(){return{exit:{taskListCheckValueChecked:Iu,taskListCheckValueUnchecked:Iu,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dw}}}function Iu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Oh.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Pw(){return[XE(),y1(),_1(),Nw(),Rw()]}function Bw(e){return{extensions:[QE(),x1(e),v1(),Iw(e),Lw()]}}const Fw={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Rh={tokenize:Kw,partial:!0},Lh={tokenize:Ww,partial:!0},qw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:zw,previous:Ph},Dh={name:"protocolAutolink",tokenize:jw,previous:Bh},wn={name:"emailAutolink",tokenize:$w,previous:Fh},un={};function Uw(){return{text:un}}let Hn=48;for(;Hn<123;)un[Hn]=wn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);un[43]=wn;un[45]=wn;un[46]=wn;un[95]=wn;un[72]=[wn,Dh];un[104]=[wn,Dh];un[87]=[wn,Mh];un[119]=[wn,Mh];function $w(e,t,n){const r=this;let i,s;return o;function o(d){return!el(d)||!Fh.call(r,r.previous)||Xl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return el(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(qw,u,c)(d):d===45||d===95||Ze(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function zw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Ph.call(r,r.previous)||Xl(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Ih,e.attempt(Rh,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jw(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Bh.call(r,r.previous)&&!Xl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(st(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Is(d)||ke(d)||Yn(d)||Ws(d)?n(d):e.attempt(Ih,e.attempt(Rh,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hw(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Gw(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Lh,l,a)(c):c===null||ke(c)||Yn(c)||c!==45&&Ws(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Kw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Lh,t,s)(o):o===null||ke(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Ww(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||ke(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ke(a)||Yn(a)?t(a):r(a)}function s(a){return st(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):st(a)?(e.consume(a),o):n(a)}}function Vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ze(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function Bh(e){return!st(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||Ze(e)}function Xl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Yw={tokenize:r_,partial:!0};function Zw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e_,continuation:{tokenize:t_},exit:n_}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:Qw}}}}function Xw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Ht(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Qw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||ke(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ke(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function e_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(o>999||p===93&&!a||p===null||p===91||ke(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ke(p)||(a=!0),o++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),be(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function t_(e,t,n){return e.check(Di,t,e.attempt(Yw,t,n))}function n_(e){e.exit("gfmFootnoteDefinition")}function r_(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function i_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&wt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),wt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),wt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Rr(c);if(p===126)return d>1?l(p):(o.consume(p),d++,f);if(d<2&&!n)return l(p);const b=o.exit("strikethroughSequenceTemporary"),y=Rr(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class s_{constructor(){this.map=[]}add(t,n,r){o_(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function o_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function a_(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function l_(){return{flow:{null:{name:"table",tokenize:c_,resolveAll:u_}}}}function c_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(O){let j=r.events.length-1;for(;j>-1;){const X=r.events[j][1].type;if(X==="lineEnding"||X==="linePrefix")j--;else break}const B=j>-1?r.events[j][1].type:null,re=B==="tableHead"||B==="tableRow"?N:l;return re===N&&r.parser.lazy[r.now().line]?n(O):re(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,s+=1),u(O)}function u(O){return O===null?n(O):oe(O)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):n(O):ge(O)?be(e,u,"whitespace")(O):(s+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||ke(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?h:d)}function h(O){return O===92||O===124?(e.consume(O),d):d(O)}function f(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,ge(O)?be(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):C(O)}function m(O){return ge(O)?be(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(s+=1,y(O)):O===null||oe(O)?T(O):C(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):C(O)}function _(O){return O===45?(e.consume(O),_):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return ge(O)?be(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||oe(O)?!o||i!==s?C(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):C(O)}function C(O){return n(O)}function N(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||oe(O)?(e.exit("tableRow"),t(O)):ge(O)?be(e,P,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||ke(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?G:U)}function G(O){return O===92||O===124?(e.consume(O),U):U(O)}}function u_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new s_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Ru(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ls(h,t,s,i,n,d)):o[1]!==0&&(d=ls(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ru(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=a_(t.events,n))}return e}function ls(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=yr(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=yr(t.events,n[2]),u=yr(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ru(e,t,n,r,i){const s=[],o=yr(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const d_={name:"tasklistCheck",tokenize:h_};function f_(){return{text:{91:d_}}}function h_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ke(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return oe(l)?t(l):ge(l)?e.check({tokenize:p_},t,n)(l):n(l)}}function p_(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function g_(e){return qf([Uw(),Zw(),i_(e),l_(),f_()])}const m_={};function qh(e){const t=this,n=e||m_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(g_(n)),s.push(Pw()),o.push(Bw(n))}const Uh=function(e){if(e==null)return E_;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?b_(e):y_(e);if(typeof e=="string")return x_(e);throw new Error("Expected function, string, or object as test")};function b_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return to(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function y_(e){const t=e;return to(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function x_(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(w_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function E_(){return!0}function w_(e){return e!==null&&typeof e=="object"&&"type"in e}const Lu=function(e,t,n){const r=Uh(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},tr=function(e){if(e==null)return k_;if(typeof e=="string")return v_(e);if(typeof e=="object")return __(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function __(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return Ql(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function v_(e){return Ql(t);function t(n){return n.tagName===e}}function Ql(e){return t;function t(n,r,i){return!!(N_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function N_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Mu=/\n/g,Du=/[\t ]+/g,tl=tr("br"),Pu=tr(L_),A_=tr("p"),Bu=tr("tr"),S_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,M_]),$h=tr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T_(e,t){const n=t||{},r="children"in e?e.children:[],i=$h(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
30
30
  `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function zh(e,t,n){return e.type==="element"?C_(e,t,n):e.type==="text"?n.whitespace==="normal"?jh(e,n):O_(e):[]}function C_(e,t,n){const r=Hh(e,n),i=e.children||[];let s=-1,o=[];if(S_(e))return o;let a,l;for(tl(e)||Bu(e)&&Lu(t,e,Bu)?l=`
31
31
  `:A_(e)?(a=2,l=2):$h(e)&&(a=1,l=1);++s<i.length;)o=o.concat(zh(i[s],e,{whitespace:r,breakBefore:s?void 0:a,breakAfter:s<i.length-1?tl(i[s+1]):l}));return Pu(e)&&Lu(t,e,Pu)&&o.push(" "),a&&o.unshift(a),l&&o.push(l),o}function jh(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){Mu.lastIndex=s;const l=Mu.exec(n),c=l&&"index"in l?l.index:n.length;r.push(I_(n.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),s=c+1}let o=-1,a;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),a=void 0):r[o]?(typeof a=="number"&&i.push(a),i.push(r[o]),a=0):(o===0||o===r.length-1)&&i.push(0);return i}function O_(e){return[String(e.value)]}function I_(e,t,n){const r=[];let i=0,s;for(;i<e.length;){Du.lastIndex=i;const o=Du.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function Hh(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function R_(e){return!!(e.properties||{}).hidden}function L_(e){return e.tagName==="td"||e.tagName==="th"}function M_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function D_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function P_(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=D_(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function B_(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[..._,...v,"set","shopt",...T,...C]},contains:[f,e.SHEBANG(),p,d,s,o,y,a,l,c,u,n]}}function F_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(_,v,y,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:b}}}function q_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function U_(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(h,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[b,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",T={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},T]}}const $_=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),z_=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],j_=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],H_=[...z_,...j_],G_=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),K_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),W_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),V_=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Y_(e){const t=e.regex,n=$_(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+K_.join("|")+")"},{begin:":(:)?("+W_.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+V_.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:G_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+H_.join("|")+")\\b"}]}}function Z_(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function X_(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function Q_(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function J_(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,s,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),h=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[r,a,s,i,o,n]}}]}}var xr="[0-9](_*[0-9])*",cs=`\\.(${xr})`,us="[0-9a-fA-F](_*[0-9a-fA-F])*",Fu={className:"number",variants:[{begin:`(\\b(${xr})((${cs})|\\.)?|(${cs}))[eE][+-]?(${xr})[fFdD]?\\b`},{begin:`\\b(${xr})((${cs})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cs})[fFdD]?\\b`},{begin:`\\b(${xr})[fFdD]\\b`},{begin:`\\b0[xX]((${us})\\.?|(${us})?\\.(${us}))[pP][+-]?(${xr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Gh(e,t,n){return n===-1?"":e.replace(t,r=>Gh(e,t,n-1))}function ev(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Gh("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Fu,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Fu,c]}}const qu="[A-Za-z$_][0-9A-Za-z$_]*",tv=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],nv=["true","false","null","undefined","NaN","Infinity"],Kh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],iv=[].concat(Vh,Kh,Wh);function sv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=qu,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let ae;const k=F.input.substring(w);if(ae=k.match(/^\s*=/)){K.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){K.ignoreMatch();return}}},a={$pattern:qu,keyword:tv,literal:nv,built_in:iv,"variable.language":rv},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Kh,...Wh]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(F){return t.concat("(?!",F.join("|"),")")}const re={match:t.concat(/\b/,B([...Vh,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",q={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},re,j,P,Y,{match:/\$[(.]/}]}}function ov(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Er="[0-9](_*[0-9])*",ds=`\\.(${Er})`,fs="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${Er})((${ds})|\\.)?|(${ds}))[eE][+-]?(${Er})[fFdD]?\\b`},{begin:`\\b(${Er})((${ds})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ds})[fFdD]?\\b`},{begin:`\\b(${Er})[fFdD]\\b`},{begin:`\\b0[xX]((${fs})\\.?|(${fs})?\\.(${fs}))[pP][+-]?(${Er})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fs})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function lv(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=av,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
32
32
  `},c]}}const cv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],fv=[...uv,...dv],hv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Yh=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Zh=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),gv=Yh.concat(Zh).sort().reverse();function mv(e){const t=cv(e),n=gv,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},c=function(v,T,C){return{className:v,begin:T,relevance:C}},u={$pattern:/[a-z-]+/,keyword:r,attribute:hv.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=a.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pv.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+fv.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Yh.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Zh.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,_,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function bv(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function yv(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,s,o]}}function xv(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),h=e.inherit(u,{contains:[]});c.contains.push(h),u.contains.push(d);let f=[n,l];return[c,u,d,h].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Ev(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function wv(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(m,b,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,r)},f=(m,b,y)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,r),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...d,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function _v(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(X,Y)=>{Y.data._beginMatch=X[1]||X[2]},"on:end":(X,Y)=>{Y.data._beginMatch!==X[1]&&Y.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
@@ -168,7 +168,7 @@ ${ho(this.code(t,n))}
168
168
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[sf]=this[sf]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=ui(o);r[a]||(gL(i,o),r[a]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});L.freezeMethods(gt);function Fa(e,t){const n=this||Gi,r=t||n,i=gt.from(r.headers);let s=r.data;return L.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Yg(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(Hr,ce,{__CANCEL__:!0});function Zg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function yL(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Hs=(e,t,n=3)=>{let r=0;const i=bL(50,250);return yL(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},of=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},af=e=>(...t)=>L.asap(()=>e(...t)),xL=Ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,EL=Ye.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),L.isString(r)&&a.push(`path=${r}`),L.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),L.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _L(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xg(e,t,n){let r=!wL(t);return e&&(r||n==!1)?_L(e,t):t}const lf=e=>e instanceof gt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function i(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return r(void 0,u)}function o(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(lf(c),lf(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Qg=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=gt.from(o),t.url=Kg(Xg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),L.isFormData(n)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&o.set(u,d)})}}if(Ye.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&xL(t.url))){const l=i&&s&&EL.read(s);l&&o.set(i,l)}return t},vL=typeof XMLHttpRequest<"u",kL=vL&&function(e){return new Promise(function(n,r){const i=Qg(e);let s=i.data;const o=gt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function y(){if(!b)return;const v=gt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Zg(function(P){n(P),m()},function(P){r(P),m()},C),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new ce("Request aborted",ce.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const C=T&&T.message?T.message:"Network Error",N=new ce(C,ce.ERR_NETWORK,e,b);N.event=T||null,r(N),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Wg;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new ce(T,C.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&L.forEach(o.toJSON(),function(T,C){b.setRequestHeader(C,T)}),L.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),a&&a!=="json"&&(b.responseType=i.responseType),c&&([h,p]=Hs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=Hs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{b&&(r(!v||v.type?new Hr(null,e,b):v),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=mL(i.url);if(_&&Ye.protocols.indexOf(_)===-1){r(new ce("Unsupported protocol "+_+":",ce.ERR_BAD_REQUEST,e));return}b.send(s||null)})},NL=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof ce?u:new Hr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>L.asap(a),l}},AL=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},SL=async function*(e,t){for await(const n of TL(e))yield*AL(n,t)},TL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cf=(e,t,n,r)=>{const i=SL(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},uf=64*1024,{isFunction:ws}=L,CL=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:df,TextEncoder:ff}=L.global,hf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OL=e=>{e=L.merge.call({skipUndefined:!0},CL,e);const{fetch:t,Request:n,Response:r}=e,i=t?ws(t):typeof fetch=="function",s=ws(n),o=ws(r);if(!i)return!1;const a=i&&ws(df),l=i&&(typeof ff=="function"?(p=>m=>p.encode(m))(new ff):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&hf(()=>{let p=!1;const m=new n(Ye.origin,{body:new df,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&hf(()=>L.isReadableStream(new r("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,b)=>{let y=m&&m[p];if(y)return y.call(m);throw new ce(`Response type '${p}' is not supported`,ce.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(L.isBlob(p))return p.size;if(L.isSpecCompliantForm(p))return(await new n(Ye.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(L.isArrayBufferView(p)||L.isArrayBuffer(p))return p.byteLength;if(L.isURLSearchParams(p)&&(p=p+""),L.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=L.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:y,signal:_,cancelToken:v,timeout:T,onDownloadProgress:C,onUploadProgress:N,responseType:P,headers:U,withCredentials:G="same-origin",fetchOptions:O}=Qg(p),j=t||fetch;P=P?(P+"").toLowerCase():"text";let B=NL([_,v&&v.toAbortSignal()],T),re=null;const X=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let Y;try{if(N&&c&&b!=="get"&&b!=="head"&&(Y=await f(U,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),ae;if(L.isFormData(y)&&(ae=Q.headers.get("content-type"))&&U.setContentType(ae),Q.body){const[k,he]=of(Y,Hs(af(N)));y=cf(Q.body,uf,k,he)}}L.isString(G)||(G=G?"include":"omit");const I=s&&"credentials"in n.prototype,q={...O,signal:B,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:y,duplex:"half",credentials:I?G:void 0};re=s&&new n(m,q);let F=await(s?j(re,O):j(m,q));const K=u&&(P==="stream"||P==="response");if(u&&(C||K&&X)){const Q={};["status","statusText","headers"].forEach(se=>{Q[se]=F[se]});const ae=L.toFiniteNumber(F.headers.get("content-length")),[k,he]=C&&of(ae,Hs(af(C),!0))||[];F=new r(cf(F.body,uf,k,()=>{he&&he(),X&&X()}),Q)}P=P||"text";let w=await d[L.findKey(d,P)||"text"](F,p);return!K&&X&&X(),await new Promise((Q,ae)=>{Zg(Q,ae,{data:w,headers:gt.from(F.headers),status:F.status,statusText:F.statusText,config:p,request:re})})}catch(I){throw X&&X(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,p,re),{cause:I.cause||I}):ce.from(I,I&&I.code,p,re)}}},IL=new Map,Jg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,c,u=IL;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:OL(t)),u=c;return c};Jg();const Cc={http:VR,xhr:kL,fetch:{get:Jg}};L.forEach(Cc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pf=e=>`- ${e}`,RL=e=>L.isFunction(e)||e===null||e===!1;function LL(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let a;if(i=r,!RL(r)&&(i=Cc[(a=String(r)).toLowerCase()],i===void 0))throw new ce(`Unknown adapter '${a}'`);if(i&&(L.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
169
169
  `+o.map(pf).join(`
170
170
  `):" "+pf(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const em={getAdapter:LL,adapters:Cc};function qa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hr(null,e)}function gf(e){return qa(e),e.headers=gt.from(e.headers),e.data=Fa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),em.getAdapter(e.adapter||Gi.adapter,e)(e).then(function(r){return qa(e),r.data=Fa.call(e,e.transformResponse,r),r.headers=gt.from(r.headers),r},function(r){return Yg(r)||(qa(e),r&&r.response&&(r.response.data=Fa.call(e,e.transformResponse,r.response),r.response.headers=gt.from(r.response.headers))),Promise.reject(r)})}const tm="1.13.2",wo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const mf={};wo.transitional=function(t,n,r){function i(s,o){return"[Axios v"+tm+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new ce(i(o," has been removed"+(n?" in "+n:"")),ce.ERR_DEPRECATED);return n&&!mf[o]&&(mf[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};wo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ML(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new ce("option "+s+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+s,ce.ERR_BAD_OPTION)}}const Os={assertOptions:ML,validators:wo},en=Os.validators;let Vn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rf,response:new rf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
171
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Os.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(L.isFunction(i)?n.paramsSerializer={serialize:i}:Os.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Os.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&L.merge(s.common,s[n.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=gt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[gf.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=gf.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jn(this.defaults,t);const n=Xg(t.baseURL,t.url,t.allowAbsoluteUrls);return Kg(n,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Vn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});L.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Jn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Vn.prototype[t]=n(),Vn.prototype[t+"Form"]=n(!0)});let DL=class nm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nm(function(i){t=i}),cancel:t}}};function PL(e){return function(n){return e.apply(null,n)}}function BL(e){return L.isObject(e)&&e.isAxiosError===!0}const Ol={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ol).forEach(([e,t])=>{Ol[t]=e});function rm(e){const t=new Vn(e),n=Mg(Vn.prototype.request,t);return L.extend(n,Vn.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rm(Jn(e,i))},n}const Ie=rm(Gi);Ie.Axios=Vn;Ie.CanceledError=Hr;Ie.CancelToken=DL;Ie.isCancel=Yg;Ie.VERSION=tm;Ie.toFormData=Eo;Ie.AxiosError=ce;Ie.Cancel=Ie.CanceledError;Ie.all=function(t){return Promise.all(t)};Ie.spread=PL;Ie.isAxiosError=BL;Ie.mergeConfig=Jn;Ie.AxiosHeaders=gt;Ie.formToJSON=e=>Vg(L.isHTMLForm(e)?new FormData(e):e);Ie.getAdapter=em.getAdapter;Ie.HttpStatusCode=Ol;Ie.default=Ie;const{Axios:NM,AxiosError:AM,CanceledError:SM,isCancel:TM,CancelToken:CM,VERSION:OM,all:IM,Cancel:RM,isAxiosError:LM,spread:MM,toFormData:DM,AxiosHeaders:PM,HttpStatusCode:BM,formToJSON:FM,getAdapter:qM,mergeConfig:UM}=Ie,rt={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`,IMAGE_UPLOAD:"/api/Image/uploadImage",INSERT_WITH_AI:"/api/article/insertWithAI",UPDATE_WITH_AI:"/api/article/updateWithAI"};class im{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(rt.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:rt.ARTICLES,params:i});const s=await this.client.get(rt.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const o=await this.client.get(rt.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(rt.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.post(rt.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.put(rt.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:rt.ARTICLE_BY_ID(t)}),await this.client.delete(rt.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:rt.INSERT_WITH_AI,data:t});const n=await this.client.post(rt.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:rt.UPDATE_WITH_AI,data:t});const n=await this.client.put(rt.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const tn={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class sm{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:tn.CATEGORIES});const t=await this.client.get(tn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(tn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(tn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.post(tn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.put(tn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:tn.CATEGORY_BY_ID(t)}),await this.client.delete(tn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const Ut={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class om{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ut.TAGS});const t=await this.client.get(Ut.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ut.TAG_BY_ID(t)});const n=await this.client.get(Ut.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.post(Ut.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.put(Ut.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ut.TAG_BY_ID(t)}),await this.client.delete(Ut.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ut.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const am=H.createContext(void 0);function FL({config:e,children:t}){const n=H.useMemo(()=>{const r=e.apiClient||Ie.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json",...e.headers}}),i=new im(r),s=new sm(r),o=new om(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return E.jsx(am.Provider,{value:n,children:t})}function Gr(){const e=H.useContext(am);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function qL({article:e,categories:t=[],onSave:n,onCancel:r,loading:i=!1}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(""),[u,d]=H.useState(""),[h,f]=H.useState(""),[p,m]=H.useState(!1),[b,y]=H.useState(Fe.Draft),[_,v]=H.useState(null),[T,C]=H.useState(""),[N,P]=H.useState(""),[U,G]=H.useState(""),[O,j]=H.useState({});H.useEffect(()=>{var I,q;e&&(a(e.title),c(e.content),d(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&f(e.imageName),y(e.status),v(e.categoryId||null),C(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),P(((I=e.tags)==null?void 0:I.map(F=>F.title).join(", "))||""),G(((q=e.roles)==null?void 0:q.map(F=>F.slug).join(", "))||""))},[e]);const B=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),j(I),Object.keys(I).length===0},re=async I=>{if(I.preventDefault(),!B())return;const q=U.split(",").map(K=>K.trim()).filter(K=>K.length>0),F={title:o.trim(),content:l.trim(),imageName:u||void 0,status:b,categoryId:_||void 0,dateAt:T||void 0,tagList:N.trim()||void 0,roleIds:q.length>0?q:void 0};e?await n({articleId:e.articleId,...F}):await n(F)},X=async I=>{var K;const q=(K=I.target.files)==null?void 0:K[0];if(!q)return;if(!q.type.startsWith("image/")){j({...O,image:"Please select an image file"});return}if(q.size>5*1024*1024){j({...O,image:"Image size must be less than 5MB"});return}j({...O,image:""});const F=new FileReader;F.onloadend=()=>{f(F.result)},F.readAsDataURL(q);try{m(!0);const w=await s.uploadImage(q);d(w),j({...O,image:""})}catch(w){console.error("Error uploading image:",w),j({...O,image:"Failed to upload image. Please try again."})}finally{m(!1)}},Y=()=>{f(""),d("")};return E.jsxs("form",{onSubmit:re,className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[E.jsxs("div",{className:"col-span-2 p-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>a(I.target.value),className:`w-full rounded-md border ${O.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"}),O.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:T,onChange:I=>C(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:"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:_||"",onChange:I=>v(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))]})]}),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:b,onChange:I=>y(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:Fe.Draft,children:"Draft"}),E.jsx("option",{value:Fe.Published,children:"Published"}),E.jsx("option",{value:Fe.Archived,children:"Archived"}),E.jsx("option",{value:Fe.Scheduled,children:"Scheduled"}),E.jsx("option",{value:Fe.Review,children:"Review"})]})]})]}),E.jsx("div",{className:"col-span-1",children:E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Featured Image"}),h?E.jsxs("div",{className:"relative",children:[E.jsx("img",{src:h,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),E.jsx("button",{type:"button",onClick:Y,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:p,style:{top:"2px",right:"2px"},children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:E.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),p&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:E.jsx("span",{className:"text-white text-sm",children:"Uploading..."})})]}):E.jsx("div",{className:"flex items-center",children:E.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:X,disabled:p,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),O.image&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.image}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"JPG, PNG, GIF. Max 5MB"})]})})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),E.jsx(Lg,{value:l,onChange:c,placeholder:"Write your article content...",error:O.content}),O.content&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.content})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("input",{id:"tags",type:"text",value:N,onChange:I=>P(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 tags separated by commas (e.g., AI, Technology, Innovation)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of tags. Tags will be created automatically if they don't exist."})]}),E.jsxs("div",{className:"space-y-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:U,onChange:I=>G(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:r,disabled:i,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: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 Article":"Create Article"})]})]})}function UL({mode:e,articleId:t,isOpen:n,onSuccess:r,onClose:i}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(!1),[u,d]=H.useState(!1),[h,f]=H.useState(null),[p,m]=H.useState(""),b=()=>o.trim()?o.trim().length<10?(f("Prompt must be at least 10 characters long"),!1):o.length>2e3?(f("Prompt must be less than 2000 characters"),!1):!0:(f("Prompt is required"),!1),y=async()=>{if(b()){if(e==="update"&&!t){f("Article ID is required for update mode");return}d(!0),f(null),m(e==="create"?"Creating article with AI...":"Updating article with AI...");try{const C={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:l};l&&m("Generating content and image with AI... This may take a few moments.");let N;e==="create"?N=await s.createArticleWithAI(C):N=await s.updateArticleWithAI(C),m(""),r(N),a(""),c(!1),i()}catch(C){console.error("Error generating article with AI:",C),f(C.message||"Failed to generate article with AI. Please try again."),m("")}finally{d(!1)}}},_=()=>{u||(a(""),c(!1),f(null),i())},v=e==="create"?'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")':'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',T=()=>{const C="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",N=h&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${C} ${N}`};return n?E.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:E.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",onClick:_}),E.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[E.jsxs("div",{className:"bg-white dark:bg-gray-800 px-6 pb-4 pt-5",children:[E.jsxs("div",{className:"flex items-start justify-between mb-4",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900",children:E.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",id:"modal-title",children:e==="create"?"Create Article with AI":"Update Article with AI"}),E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:e==="create"?"Use AI to generate a complete article with title, content, and tags based on your description.":"Use AI to modify the existing article content based on your instructions."})]})]}),E.jsxs("button",{type:"button",onClick:_,disabled:u,className:"rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:[E.jsx("span",{className:"sr-only",children:"Close"}),E.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Description / Instructions *"}),E.jsx("textarea",{id:"prompt",value:o,onChange:C=>a(C.target.value),rows:6,disabled:u,className:T(),placeholder:v,minLength:10,maxLength:2e3}),E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[o.length," / 2000 characters (minimum 10)"]}),h&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:l,onChange:C=>c(C.target.checked),disabled:u,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),E.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Generate image with DALL-E 3"})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:"AI will create an illustrative image for the article. This may take a few extra seconds."})]}),u&&p&&E.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:p}),E.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:"Please wait..."})]})]})})]})]}),E.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:_,disabled:u,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),E.jsx("button",{type:"button",onClick:y,disabled:u||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:u?E.jsxs(E.Fragment,{children:[E.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsx("span",{children:"Generating..."})]}):E.jsxs(E.Fragment,{children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),E.jsx("span",{children:e==="create"?"Create with AI":"Update with AI"})]})})]})]})]})}):null}function $L({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=H.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>a("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>a("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:s},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
171
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Os.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(L.isFunction(i)?n.paramsSerializer={serialize:i}:Os.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Os.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&L.merge(s.common,s[n.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=gt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[gf.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=gf.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jn(this.defaults,t);const n=Xg(t.baseURL,t.url,t.allowAbsoluteUrls);return Kg(n,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Vn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});L.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Jn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Vn.prototype[t]=n(),Vn.prototype[t+"Form"]=n(!0)});let DL=class nm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nm(function(i){t=i}),cancel:t}}};function PL(e){return function(n){return e.apply(null,n)}}function BL(e){return L.isObject(e)&&e.isAxiosError===!0}const Ol={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ol).forEach(([e,t])=>{Ol[t]=e});function rm(e){const t=new Vn(e),n=Mg(Vn.prototype.request,t);return L.extend(n,Vn.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rm(Jn(e,i))},n}const Ie=rm(Gi);Ie.Axios=Vn;Ie.CanceledError=Hr;Ie.CancelToken=DL;Ie.isCancel=Yg;Ie.VERSION=tm;Ie.toFormData=Eo;Ie.AxiosError=ce;Ie.Cancel=Ie.CanceledError;Ie.all=function(t){return Promise.all(t)};Ie.spread=PL;Ie.isAxiosError=BL;Ie.mergeConfig=Jn;Ie.AxiosHeaders=gt;Ie.formToJSON=e=>Vg(L.isHTMLForm(e)?new FormData(e):e);Ie.getAdapter=em.getAdapter;Ie.HttpStatusCode=Ol;Ie.default=Ie;const{Axios:N2,AxiosError:A2,CanceledError:S2,isCancel:T2,CancelToken:C2,VERSION:O2,all:I2,Cancel:R2,isAxiosError:L2,spread:M2,toFormData:D2,AxiosHeaders:P2,HttpStatusCode:B2,formToJSON:F2,getAdapter:q2,mergeConfig:U2}=Ie,rt={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`,IMAGE_UPLOAD:"/api/Image/uploadImage",INSERT_WITH_AI:"/api/article/insertWithAI",UPDATE_WITH_AI:"/api/article/updateWithAI"};class im{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(rt.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:rt.ARTICLES,params:i});const s=await this.client.get(rt.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const o=await this.client.get(rt.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(rt.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.post(rt.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.put(rt.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:rt.ARTICLE_BY_ID(t)}),await this.client.delete(rt.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:rt.INSERT_WITH_AI,data:t});const n=await this.client.post(rt.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:rt.UPDATE_WITH_AI,data:t});const n=await this.client.put(rt.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const tn={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class sm{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:tn.CATEGORIES});const t=await this.client.get(tn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(tn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(tn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.post(tn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.put(tn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:tn.CATEGORY_BY_ID(t)}),await this.client.delete(tn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const Ut={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class om{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ut.TAGS});const t=await this.client.get(Ut.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ut.TAG_BY_ID(t)});const n=await this.client.get(Ut.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.post(Ut.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.put(Ut.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ut.TAG_BY_ID(t)}),await this.client.delete(Ut.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ut.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const am=H.createContext(void 0);function FL({config:e,children:t}){const n=H.useMemo(()=>{const r=e.apiClient||Ie.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json",...e.headers}}),i=new im(r),s=new sm(r),o=new om(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return E.jsx(am.Provider,{value:n,children:t})}function Gr(){const e=H.useContext(am);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function qL({article:e,categories:t=[],onSave:n,onCancel:r,loading:i=!1}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(""),[u,d]=H.useState(""),[h,f]=H.useState(""),[p,m]=H.useState(!1),[b,y]=H.useState(Fe.Draft),[_,v]=H.useState(null),[T,C]=H.useState(""),[N,P]=H.useState(""),[U,G]=H.useState(""),[O,j]=H.useState({});H.useEffect(()=>{var I,q;e&&(a(e.title),c(e.content),d(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&f(e.imageName),y(e.status),v(e.categoryId||null),C(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),P(((I=e.tags)==null?void 0:I.map(F=>F.title).join(", "))||""),G(((q=e.roles)==null?void 0:q.map(F=>F.slug).join(", "))||""))},[e]);const B=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),j(I),Object.keys(I).length===0},re=async I=>{if(I.preventDefault(),!B())return;const q=U.split(",").map(K=>K.trim()).filter(K=>K.length>0),F={title:o.trim(),content:l.trim(),imageName:u||void 0,status:b,categoryId:_||void 0,dateAt:T||void 0,tagList:N.trim()||void 0,roleIds:q.length>0?q:void 0};e?await n({articleId:e.articleId,...F}):await n(F)},X=async I=>{var K;const q=(K=I.target.files)==null?void 0:K[0];if(!q)return;if(!q.type.startsWith("image/")){j({...O,image:"Please select an image file"});return}if(q.size>5*1024*1024){j({...O,image:"Image size must be less than 5MB"});return}j({...O,image:""});const F=new FileReader;F.onloadend=()=>{f(F.result)},F.readAsDataURL(q);try{m(!0);const w=await s.uploadImage(q);d(w),j({...O,image:""})}catch(w){console.error("Error uploading image:",w),j({...O,image:"Failed to upload image. Please try again."})}finally{m(!1)}},Y=()=>{f(""),d("")};return E.jsxs("form",{onSubmit:re,className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[E.jsxs("div",{className:"col-span-2 p-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>a(I.target.value),className:`w-full rounded-md border ${O.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"}),O.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:T,onChange:I=>C(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:"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:_||"",onChange:I=>v(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))]})]}),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:b,onChange:I=>y(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:Fe.Draft,children:"Draft"}),E.jsx("option",{value:Fe.Published,children:"Published"}),E.jsx("option",{value:Fe.Archived,children:"Archived"}),E.jsx("option",{value:Fe.Scheduled,children:"Scheduled"}),E.jsx("option",{value:Fe.Review,children:"Review"})]})]})]}),E.jsx("div",{className:"col-span-1",children:E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Featured Image"}),h?E.jsxs("div",{className:"relative",children:[E.jsx("img",{src:h,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),E.jsx("button",{type:"button",onClick:Y,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:p,style:{top:"2px",right:"2px"},children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:E.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),p&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:E.jsx("span",{className:"text-white text-sm",children:"Uploading..."})})]}):E.jsx("div",{className:"flex items-center",children:E.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:X,disabled:p,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),O.image&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.image}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"JPG, PNG, GIF. Max 5MB"})]})})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),E.jsx(Lg,{value:l,onChange:c,placeholder:"Write your article content...",error:O.content}),O.content&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.content})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("input",{id:"tags",type:"text",value:N,onChange:I=>P(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 tags separated by commas (e.g., AI, Technology, Innovation)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of tags. Tags will be created automatically if they don't exist."})]}),E.jsxs("div",{className:"space-y-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:U,onChange:I=>G(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:r,disabled:i,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: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 Article":"Create Article"})]})]})}function UL({mode:e,articleId:t,isOpen:n,onSuccess:r,onClose:i}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(!1),[u,d]=H.useState(!1),[h,f]=H.useState(null),[p,m]=H.useState(""),b=()=>o.trim()?o.trim().length<10?(f("Prompt must be at least 10 characters long"),!1):o.length>2e3?(f("Prompt must be less than 2000 characters"),!1):!0:(f("Prompt is required"),!1),y=async()=>{if(b()){if(e==="update"&&!t){f("Article ID is required for update mode");return}d(!0),f(null),m(e==="create"?"Creating article with AI...":"Updating article with AI...");try{const C={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:l};l&&m("Generating content and image with AI... This may take a few moments.");let N;e==="create"?N=await s.createArticleWithAI(C):N=await s.updateArticleWithAI(C),m(""),r(N),a(""),c(!1),i()}catch(C){console.error("Error generating article with AI:",C),f(C.message||"Failed to generate article with AI. Please try again."),m("")}finally{d(!1)}}},_=()=>{u||(a(""),c(!1),f(null),i())},v=e==="create"?'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")':'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',T=()=>{const C="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",N=h&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${C} ${N}`};return n?E.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:E.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",onClick:_}),E.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[E.jsxs("div",{className:"bg-white dark:bg-gray-800 px-6 pb-4 pt-5",children:[E.jsxs("div",{className:"flex items-start justify-between mb-4",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900",children:E.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",id:"modal-title",children:e==="create"?"Create Article with AI":"Update Article with AI"}),E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:e==="create"?"Use AI to generate a complete article with title, content, and tags based on your description.":"Use AI to modify the existing article content based on your instructions."})]})]}),E.jsxs("button",{type:"button",onClick:_,disabled:u,className:"rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:[E.jsx("span",{className:"sr-only",children:"Close"}),E.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Description / Instructions *"}),E.jsx("textarea",{id:"prompt",value:o,onChange:C=>a(C.target.value),rows:6,disabled:u,className:T(),placeholder:v,minLength:10,maxLength:2e3}),E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[o.length," / 2000 characters (minimum 10)"]}),h&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:l,onChange:C=>c(C.target.checked),disabled:u,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),E.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Generate image with DALL-E 3"})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:"AI will create an illustrative image for the article. This may take a few extra seconds."})]}),u&&p&&E.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:p}),E.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:"Please wait..."})]})]})})]})]}),E.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:_,disabled:u,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),E.jsx("button",{type:"button",onClick:y,disabled:u||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:u?E.jsxs(E.Fragment,{children:[E.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsx("span",{children:"Generating..."})]}):E.jsxs(E.Fragment,{children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),E.jsx("span",{children:e==="create"?"Create with AI":"Update with AI"})]})})]})]})]})}):null}function $L({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=H.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>a("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>a("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:s},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
172
172
  * @license lucide-react v0.462.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
@@ -203,7 +203,7 @@ ${ho(this.code(t,n))}
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const um=Oc("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function KL({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function WL({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=H.useState(""),[l,c]=H.useState(null),[u,d]=H.useState({});H.useEffect(()=>{e?(a(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{a(""),c(null),d({})},f=()=>{const b={};return o.trim()||(b.title="Title is required"),d(b),Object.keys(b).length===0},p=async b=>{if(b.preventDefault(),!f())return;const y={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...y}):await i(y),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:b=>a(b.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),E.jsxs("select",{id:"parent",value:l||"",onChange:b=>c(b.target.value?Number(b.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>E.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s?"Saving...":e?"Update":"Create"})]})]})]})})}function VL({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:o,showActions:a=!1,emptyMessage:l="No tags found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),a&&(i||s||o)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:E.jsx(GL,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})]},c.tagId))})}function YL({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=H.useState(""),[a,l]=H.useState(""),[c,u]=H.useState({});H.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},h=()=>{const p={};return s.trim()||(p.title="Title is required"),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!h())return;const m={title:s.trim(),slug:a.trim()||void 0};try{e?await r({tagId:e.tagId,...m}):await r(m),n()}catch(b){console.error("Failed to save tag:",b)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:s,onChange:p=>o(p.target.value),className:`w-full rounded-md border ${c.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter tag title"}),c.title&&E.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),E.jsx("input",{id:"slug",type:"text",value:a,onChange:p=>l(p.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),E.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function ZL({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=H.useState(null),[l,c]=H.useState({}),u=t.filter(f=>f.tagId!==e.tagId);H.useEffect(()=>{n||(a(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(p){console.error("Failed to merge tags:",p)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",E.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),E.jsxs("form",{onSubmit:h,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>a(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>E.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s||u.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Merging...":"Merge Tags"})]})]})]})}):null}function XL(){const{articleApi:e}=Gr(),[t,n]=H.useState(null),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;m!=null&&m.roles&&m.roles.length>0?b=await e.filterArticles(m.roles,m.categoryId,m.page,m.pageSize):b=await e.listArticles(m==null?void 0:m.categoryId,m==null?void 0:m.page,m==null?void 0:m.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getArticleById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteArticle(m),a&&await c(a)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a&&await c(a)},[a,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function QL(){const{categoryApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;if(m!=null&&m.roles&&m.roles.length>0?b=await e.filterCategories(m.roles,m.parentId):(m==null?void 0:m.parentId)!==void 0?b=await e.filterCategories(void 0,m.parentId):b=await e.listCategories(),m!=null&&m.searchTerm){const y=m.searchTerm.toLowerCase();b=b.filter(_=>_.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getCategoryById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteCategory(m),a!==void 0?await c(a):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function JL(){const{tagApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const _=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(_)||v.slug&&v.slug.toLowerCase().includes(_))}n(y)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=H.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.createTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,a,c]),h=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.updateTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,a,c]),f=H.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const _=y instanceof Error?y:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,a,c]),p=H.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(_){const v=_ instanceof Error?_:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:m}}function bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e2(...e){return t=>{let n=!1;const r=e.map(i=>{const s=bf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():bf(e[i],null)}}}}var t2=Symbol.for("react.lazy"),Gs=fe[" use ".trim().toString()];function n2(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===t2&&"_payload"in e&&n2(e._payload)}function fm(e){const t=i2(e),n=fe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Gs=="function"&&(s=Gs(s._payload));const a=fe.Children.toArray(s),l=a.find(o2);if(l){const c=l.props.children,u=a.map(d=>d===l?fe.Children.count(c)>1?fe.Children.only(null):fe.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...o,ref:i,children:fe.isValidElement(c)?fe.cloneElement(c,void 0,u):null})}return E.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var r2=fm("Slot");function i2(e){const t=fe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Gs=="function"&&(i=Gs(i._payload)),fe.isValidElement(i)){const o=l2(i),a=a2(s,i.props);return i.type!==fe.Fragment&&(a.ref=r?e2(r,o):o),fe.cloneElement(i,a)}return fe.Children.count(i)>1?fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s2=Symbol("radix.slottable");function o2(e){return fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s2}function a2(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function l2(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hm(e))&&(r&&(r+=" "),r+=t);return r}const yf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xf=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=yf(u)||yf(d);return i[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,h]:c},[]);return xf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ic="-",c2=e=>{const t=d2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Ic);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||u2(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},mm=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?mm(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Ic);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Ef=/^\[(.+)\]$/,u2=e=>{if(Ef.test(e)){const t=Ef.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},d2=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return h2(Object.entries(e.classGroups),n).forEach(([s,o])=>{Il(o,r,s,t)}),r},Il=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:wf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(f2(i)){Il(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Il(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},f2=e=>e.isThemeGetter,h2=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,p2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bm="!",g2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(bm),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},m2=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},b2=e=>({cache:p2(e.cacheSize),parseClassName:g2(e),...c2(e)}),y2=/\s+/,x2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(y2);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const b=m2(u).join(":"),y=d?b+bm:b,_=y+m;if(s.includes(_))continue;s.push(_);const v=i(m,p);for(let T=0;T<v.length;++T){const C=v[T];s.push(y+C)}a=c+(a.length>0?" "+a:a)}return a};function E2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ym(t))&&(r&&(r+=" "),r+=n);return r}const ym=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ym(e[r]))&&(n&&(n+=" "),n+=t);return n};function w2(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=b2(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=x2(l,n);return i(l,u),u}return function(){return s(E2.apply(null,arguments))}}const Ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_2=/^\d+\/\d+$/,v2=new Set(["px","full","screen"]),k2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N2=/\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$/,A2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,S2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Ir(e)||v2.has(e)||_2.test(e),Sn=e=>Kr(e,"length",P2),Ir=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Kr(e,"number",Ir),di=e=>!!e&&Number.isInteger(Number(e)),C2=e=>e.endsWith("%")&&Ir(e.slice(0,-1)),ue=e=>xm.test(e),Tn=e=>k2.test(e),O2=new Set(["length","size","percentage"]),I2=e=>Kr(e,O2,Em),R2=e=>Kr(e,"position",Em),L2=new Set(["image","url"]),M2=e=>Kr(e,L2,F2),D2=e=>Kr(e,"",B2),fi=()=>!0,Kr=(e,t,n)=>{const r=xm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},P2=e=>N2.test(e)&&!A2.test(e),Em=()=>!1,B2=e=>S2.test(e),F2=e=>T2.test(e),q2=()=>{const e=Ce("colors"),t=Ce("spacing"),n=Ce("blur"),r=Ce("brightness"),i=Ce("borderColor"),s=Ce("borderRadius"),o=Ce("borderSpacing"),a=Ce("borderWidth"),l=Ce("contrast"),c=Ce("grayscale"),u=Ce("hueRotate"),d=Ce("invert"),h=Ce("gap"),f=Ce("gradientColorStops"),p=Ce("gradientColorStopPositions"),m=Ce("inset"),b=Ce("margin"),y=Ce("opacity"),_=Ce("padding"),v=Ce("saturate"),T=Ce("scale"),C=Ce("sepia"),N=Ce("skew"),P=Ce("space"),U=Ce("translate"),G=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],B=()=>[ue,t],re=()=>["",bn,Sn],X=()=>["auto",Ir,ue],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",ue],w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ir,ue];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[bn,Sn],blur:["none","",Tn,ue],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,ue],borderSpacing:B(),borderWidth:re(),contrast:Q(),grayscale:K(),hueRotate:Q(),invert:K(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[C2,Sn],inset:j(),margin:j(),opacity:Q(),padding:B(),saturate:Q(),scale:Q(),sepia:K(),skew:Q(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ue]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,ue]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",di,ue]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,ue]},ue]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,ue]},ue]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ua]}],"font-family":[{font:[fi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",Ir,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,Sn]}],"underline-offset":[{"underline-offset":["auto",bn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),R2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[bn,ue]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tn,D2]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[di,ue]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,Sn,Ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},U2=w2(q2);function cr(...e){return U2(pm(e))}const $2=gm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wm=fe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?r2:"button";return E.jsx(o,{className:cr($2({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=fe.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:cr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));_m.displayName="Input";var z2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=z2.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=fe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),j2="Label",vm=fe.forwardRef((e,t)=>E.jsx(_o.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vm.displayName=j2;var km=vm;const H2=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nm=fe.forwardRef(({className:e,...t},n)=>E.jsx(km,{ref:n,className:cr(H2(),e),...t}));Nm.displayName=km.displayName;function G2(e,t=[]){let n=[];function r(s,o){const a=fe.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=d=>{var y;const{scope:h,children:f,...p}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=fe.useMemo(()=>p,Object.values(p));return E.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,p=fe.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>fe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return fe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,K2(i,...t)]}function K2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return fe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function W2(e){const t=fe.useRef(e);return fe.useEffect(()=>{t.current=e}),fe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Rl=globalThis!=null&&globalThis.document?fe.useLayoutEffect:()=>{},Ll={exports:{}},$a={};/**
206
+ */const um=Oc("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function KL({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function WL({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=H.useState(""),[l,c]=H.useState(null),[u,d]=H.useState({});H.useEffect(()=>{e?(a(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{a(""),c(null),d({})},f=()=>{const b={};return o.trim()||(b.title="Title is required"),d(b),Object.keys(b).length===0},p=async b=>{if(b.preventDefault(),!f())return;const y={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...y}):await i(y),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:b=>a(b.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),E.jsxs("select",{id:"parent",value:l||"",onChange:b=>c(b.target.value?Number(b.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>E.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s?"Saving...":e?"Update":"Create"})]})]})]})})}function VL({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:o,showActions:a=!1,emptyMessage:l="No tags found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),a&&(i||s||o)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:E.jsx(GL,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})]},c.tagId))})}function YL({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=H.useState(""),[a,l]=H.useState(""),[c,u]=H.useState({});H.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},h=()=>{const p={};return s.trim()||(p.title="Title is required"),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!h())return;const m={title:s.trim(),slug:a.trim()||void 0};try{e?await r({tagId:e.tagId,...m}):await r(m),n()}catch(b){console.error("Failed to save tag:",b)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:s,onChange:p=>o(p.target.value),className:`w-full rounded-md border ${c.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter tag title"}),c.title&&E.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),E.jsx("input",{id:"slug",type:"text",value:a,onChange:p=>l(p.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),E.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function ZL({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=H.useState(null),[l,c]=H.useState({}),u=t.filter(f=>f.tagId!==e.tagId);H.useEffect(()=>{n||(a(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(p){console.error("Failed to merge tags:",p)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",E.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),E.jsxs("form",{onSubmit:h,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>a(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>E.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s||u.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Merging...":"Merge Tags"})]})]})]})}):null}function XL(){const{articleApi:e}=Gr(),[t,n]=H.useState(null),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;m!=null&&m.roles&&m.roles.length>0?b=await e.filterArticles(m.roles,m.categoryId,m.page,m.pageSize):b=await e.listArticles(m==null?void 0:m.categoryId,m==null?void 0:m.page,m==null?void 0:m.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getArticleById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteArticle(m),a&&await c(a)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a&&await c(a)},[a,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function QL(){const{categoryApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;if(m!=null&&m.roles&&m.roles.length>0?b=await e.filterCategories(m.roles,m.parentId):(m==null?void 0:m.parentId)!==void 0?b=await e.filterCategories(void 0,m.parentId):b=await e.listCategories(),m!=null&&m.searchTerm){const y=m.searchTerm.toLowerCase();b=b.filter(_=>_.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getCategoryById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteCategory(m),a!==void 0?await c(a):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function JL(){const{tagApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const _=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(_)||v.slug&&v.slug.toLowerCase().includes(_))}n(y)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=H.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.createTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,a,c]),h=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.updateTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,a,c]),f=H.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const _=y instanceof Error?y:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,a,c]),p=H.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(_){const v=_ instanceof Error?_:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:m}}function bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=bf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():bf(e[i],null)}}}}var tM=Symbol.for("react.lazy"),Gs=fe[" use ".trim().toString()];function nM(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tM&&"_payload"in e&&nM(e._payload)}function fm(e){const t=iM(e),n=fe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Gs=="function"&&(s=Gs(s._payload));const a=fe.Children.toArray(s),l=a.find(oM);if(l){const c=l.props.children,u=a.map(d=>d===l?fe.Children.count(c)>1?fe.Children.only(null):fe.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...o,ref:i,children:fe.isValidElement(c)?fe.cloneElement(c,void 0,u):null})}return E.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var rM=fm("Slot");function iM(e){const t=fe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Gs=="function"&&(i=Gs(i._payload)),fe.isValidElement(i)){const o=lM(i),a=aM(s,i.props);return i.type!==fe.Fragment&&(a.ref=r?eM(r,o):o),fe.cloneElement(i,a)}return fe.Children.count(i)>1?fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sM=Symbol("radix.slottable");function oM(e){return fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sM}function aM(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function lM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hm(e))&&(r&&(r+=" "),r+=t);return r}const yf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xf=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=yf(u)||yf(d);return i[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,h]:c},[]);return xf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ic="-",cM=e=>{const t=dM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Ic);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||uM(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},mm=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?mm(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Ic);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Ef=/^\[(.+)\]$/,uM=e=>{if(Ef.test(e)){const t=Ef.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return hM(Object.entries(e.classGroups),n).forEach(([s,o])=>{Il(o,r,s,t)}),r},Il=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:wf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(fM(i)){Il(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Il(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fM=e=>e.isThemeGetter,hM=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,pM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bm="!",gM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(bm),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},mM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},bM=e=>({cache:pM(e.cacheSize),parseClassName:gM(e),...cM(e)}),yM=/\s+/,xM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(yM);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const b=mM(u).join(":"),y=d?b+bm:b,_=y+m;if(s.includes(_))continue;s.push(_);const v=i(m,p);for(let T=0;T<v.length;++T){const C=v[T];s.push(y+C)}a=c+(a.length>0?" "+a:a)}return a};function EM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ym(t))&&(r&&(r+=" "),r+=n);return r}const ym=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ym(e[r]))&&(n&&(n+=" "),n+=t);return n};function wM(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=bM(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=xM(l,n);return i(l,u),u}return function(){return s(EM.apply(null,arguments))}}const Ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_M=/^\d+\/\d+$/,vM=new Set(["px","full","screen"]),kM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Ir(e)||vM.has(e)||_M.test(e),Sn=e=>Kr(e,"length",PM),Ir=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Kr(e,"number",Ir),di=e=>!!e&&Number.isInteger(Number(e)),CM=e=>e.endsWith("%")&&Ir(e.slice(0,-1)),ue=e=>xm.test(e),Tn=e=>kM.test(e),OM=new Set(["length","size","percentage"]),IM=e=>Kr(e,OM,Em),RM=e=>Kr(e,"position",Em),LM=new Set(["image","url"]),MM=e=>Kr(e,LM,FM),DM=e=>Kr(e,"",BM),fi=()=>!0,Kr=(e,t,n)=>{const r=xm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PM=e=>NM.test(e)&&!AM.test(e),Em=()=>!1,BM=e=>SM.test(e),FM=e=>TM.test(e),qM=()=>{const e=Ce("colors"),t=Ce("spacing"),n=Ce("blur"),r=Ce("brightness"),i=Ce("borderColor"),s=Ce("borderRadius"),o=Ce("borderSpacing"),a=Ce("borderWidth"),l=Ce("contrast"),c=Ce("grayscale"),u=Ce("hueRotate"),d=Ce("invert"),h=Ce("gap"),f=Ce("gradientColorStops"),p=Ce("gradientColorStopPositions"),m=Ce("inset"),b=Ce("margin"),y=Ce("opacity"),_=Ce("padding"),v=Ce("saturate"),T=Ce("scale"),C=Ce("sepia"),N=Ce("skew"),P=Ce("space"),U=Ce("translate"),G=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],B=()=>[ue,t],re=()=>["",bn,Sn],X=()=>["auto",Ir,ue],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",ue],w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ir,ue];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[bn,Sn],blur:["none","",Tn,ue],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,ue],borderSpacing:B(),borderWidth:re(),contrast:Q(),grayscale:K(),hueRotate:Q(),invert:K(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[CM,Sn],inset:j(),margin:j(),opacity:Q(),padding:B(),saturate:Q(),scale:Q(),sepia:K(),skew:Q(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ue]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,ue]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",di,ue]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,ue]},ue]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,ue]},ue]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ua]}],"font-family":[{font:[fi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",Ir,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,Sn]}],"underline-offset":[{"underline-offset":["auto",bn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),RM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[bn,ue]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tn,DM]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[di,ue]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,Sn,Ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UM=wM(qM);function cr(...e){return UM(pm(e))}const $M=gm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wm=fe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?rM:"button";return E.jsx(o,{className:cr($M({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=fe.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:cr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));_m.displayName="Input";var zM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=zM.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=fe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),jM="Label",vm=fe.forwardRef((e,t)=>E.jsx(_o.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vm.displayName=jM;var km=vm;const HM=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nm=fe.forwardRef(({className:e,...t},n)=>E.jsx(km,{ref:n,className:cr(HM(),e),...t}));Nm.displayName=km.displayName;function GM(e,t=[]){let n=[];function r(s,o){const a=fe.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=d=>{var y;const{scope:h,children:f,...p}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=fe.useMemo(()=>p,Object.values(p));return E.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,p=fe.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>fe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return fe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,KM(i,...t)]}function KM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return fe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function WM(e){const t=fe.useRef(e);return fe.useEffect(()=>{t.current=e}),fe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Rl=globalThis!=null&&globalThis.document?fe.useLayoutEffect:()=>{},Ll={exports:{}},$a={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim.production.js
209
209
  *
@@ -211,7 +211,7 @@ ${ho(this.code(t,n))}
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var _f;function V2(){if(_f)return $a;_f=1;var e=H;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,b=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&b({inst:m})},[d,f,h]),i(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),o(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$a}var za={};/**
214
+ */var _f;function VM(){if(_f)return $a;_f=1;var e=H;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,b=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&b({inst:m})},[d,f,h]),i(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),o(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$a}var za={};/**
215
215
  * @license React
216
216
  * use-sync-external-store-shim.development.js
217
217
  *
@@ -219,5 +219,5 @@ ${ho(this.code(t,n))}
219
219
  *
220
220
  * This source code is licensed under the MIT license found in the
221
221
  * LICENSE file in the root directory of this source tree.
222
- */var vf;function Y2(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!d){var b=p();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=o({inst:{value:m,getSnapshot:p}});var y=b[0].inst,_=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&_({inst:y})},[f,m,p]),a(function(){return n(y)&&_({inst:y}),f(function(){n(y)&&_({inst:y})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=H,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;za.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),za}process.env.NODE_ENV==="production"?Ll.exports=V2():Ll.exports=Y2();var Z2=Ll.exports;function X2(){return Z2.useSyncExternalStore(Q2,()=>!0,()=>!1)}function Q2(){return()=>{}}var Rc="Avatar",[J2]=G2(Rc),[eM,Am]=J2(Rc),Sm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=fe.useState("idle");return E.jsx(eM,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Rc;var Tm="AvatarImage",Cm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=tM(r,s),l=W2(c=>{i(c),o.onImageLoadingStatusChange(c)});return Rl(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?E.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Im=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=fe.useState(r===void 0);return fe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?E.jsx(_o.span,{...i,ref:t}):null});Im.displayName=Om;function kf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tM(e,{referrerPolicy:t,crossOrigin:n}){const r=X2(),i=fe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=fe.useState(()=>kf(s,e));return Rl(()=>{a(kf(s,e))},[s,e]),Rl(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),o}var Rm=Sm,Lm=Cm,Mm=Im;const Dm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Rm,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Rm.displayName;const Pm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Mm,{ref:n,className:cr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bm.displayName=Mm.displayName;function nM(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 rM(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function iM(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function sM(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function oM(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 aM(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 lM(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function cM(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:o=!0}=t,a=[];let l=0;e.length<n?a.push(`Password must be at least ${n} characters long`):(l++,e.length>=12&&l++),r&&!/[A-Z]/.test(e)?a.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&l++,i&&!/[a-z]/.test(e)?a.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&l++,s&&!/\d/.test(e)?a.push("Password must contain at least one number"):/\d/.test(e)&&l++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?a.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&l++;const c=a.length===0;return{score:Math.min(l,4),feedback:a,isValid:c}}function uM(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function dM(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function fM(e){return e.map(t=>t.title).join(", ")}function Fm(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function hM(e){return!e||e.trim().length<10?{valid:!1,error:"Prompt must be at least 10 characters long"}:e.length>2e3?{valid:!1,error:"Prompt must be less than 2000 characters"}:{valid:!0}}function pM(e){if(!e||!e.trim())return{valid:!0,tags:[]};const t=Fm(e);return t.length===0?{valid:!1,error:"Invalid tag format. Use comma-separated values."}:e.split(",").some(i=>i.trim().length===0&&i.length>0)?{valid:!1,error:"Tags cannot be empty. Remove extra commas."}:t.filter(i=>i.length>50).length>0?{valid:!1,error:"Individual tags must be less than 50 characters"}:{valid:!0,tags:t}}exports.AIArticleGenerator=UL;exports.ArticleAPI=im;exports.ArticleEditor=qL;exports.ArticleList=zm;exports.ArticleStatus=Fe;exports.ArticleViewer=dN;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=sm;exports.CategoryList=KL;exports.CategoryModal=WL;exports.Input=_m;exports.Label=Nm;exports.MarkdownEditor=$L;exports.NNewsProvider=FL;exports.RichTextEditor=Lg;exports.TagAPI=om;exports.TagList=VL;exports.TagMerge=ZL;exports.TagModal=YL;exports.cn=cr;exports.debounce=uM;exports.formatDocument=aM;exports.formatPhone=oM;exports.formatZipCode=lM;exports.stringToTagsPreview=Fm;exports.tagsToString=fM;exports.throttle=dM;exports.useArticles=XL;exports.useCategories=QL;exports.useNNews=Gr;exports.useTags=JL;exports.validateCNPJ=rM;exports.validateCPF=nM;exports.validateEmail=iM;exports.validatePasswordStrength=cM;exports.validatePhone=sM;exports.validatePrompt=hM;exports.validateTagList=pM;
222
+ */var vf;function YM(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!d){var b=p();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=o({inst:{value:m,getSnapshot:p}});var y=b[0].inst,_=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&_({inst:y})},[f,m,p]),a(function(){return n(y)&&_({inst:y}),f(function(){n(y)&&_({inst:y})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=H,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;za.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),za}process.env.NODE_ENV==="production"?Ll.exports=VM():Ll.exports=YM();var ZM=Ll.exports;function XM(){return ZM.useSyncExternalStore(QM,()=>!0,()=>!1)}function QM(){return()=>{}}var Rc="Avatar",[JM]=GM(Rc),[e2,Am]=JM(Rc),Sm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=fe.useState("idle");return E.jsx(e2,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Rc;var Tm="AvatarImage",Cm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=t2(r,s),l=WM(c=>{i(c),o.onImageLoadingStatusChange(c)});return Rl(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?E.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Im=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=fe.useState(r===void 0);return fe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?E.jsx(_o.span,{...i,ref:t}):null});Im.displayName=Om;function kf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function t2(e,{referrerPolicy:t,crossOrigin:n}){const r=XM(),i=fe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=fe.useState(()=>kf(s,e));return Rl(()=>{a(kf(s,e))},[s,e]),Rl(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),o}var Rm=Sm,Lm=Cm,Mm=Im;const Dm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Rm,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Rm.displayName;const Pm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Mm,{ref:n,className:cr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bm.displayName=Mm.displayName;function n2(e){if(e=e.replace(/[^\d]/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let t=0;for(let r=0;r<9;r++)t+=parseInt(e.charAt(r))*(10-r);let n=11-t%11;if(n>=10&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let r=0;r<10;r++)t+=parseInt(e.charAt(r))*(11-r);return n=11-t%11,n>=10&&(n=0),n===parseInt(e.charAt(10))}function r2(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function i2(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function s2(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function o2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):t.length===10?t.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e}function a2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):t.length===14?t.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):e}function l2(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function c2(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:o=!0}=t,a=[];let l=0;e.length<n?a.push(`Password must be at least ${n} characters long`):(l++,e.length>=12&&l++),r&&!/[A-Z]/.test(e)?a.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&l++,i&&!/[a-z]/.test(e)?a.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&l++,s&&!/\d/.test(e)?a.push("Password must contain at least one number"):/\d/.test(e)&&l++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?a.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&l++;const c=a.length===0;return{score:Math.min(l,4),feedback:a,isValid:c}}function u2(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function d2(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function f2(e){return e.map(t=>t.title).join(", ")}function Fm(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function h2(e){return!e||e.trim().length<10?{valid:!1,error:"Prompt must be at least 10 characters long"}:e.length>2e3?{valid:!1,error:"Prompt must be less than 2000 characters"}:{valid:!0}}function p2(e){if(!e||!e.trim())return{valid:!0,tags:[]};const t=Fm(e);return t.length===0?{valid:!1,error:"Invalid tag format. Use comma-separated values."}:e.split(",").some(i=>i.trim().length===0&&i.length>0)?{valid:!1,error:"Tags cannot be empty. Remove extra commas."}:t.filter(i=>i.length>50).length>0?{valid:!1,error:"Individual tags must be less than 50 characters"}:{valid:!0,tags:t}}exports.AIArticleGenerator=UL;exports.ArticleAPI=im;exports.ArticleEditor=qL;exports.ArticleList=zm;exports.ArticleStatus=Fe;exports.ArticleViewer=dN;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=sm;exports.CategoryList=KL;exports.CategoryModal=WL;exports.Input=_m;exports.Label=Nm;exports.MarkdownEditor=$L;exports.NNewsProvider=FL;exports.RichTextEditor=Lg;exports.TagAPI=om;exports.TagList=VL;exports.TagMerge=ZL;exports.TagModal=YL;exports.cn=cr;exports.debounce=u2;exports.formatDocument=a2;exports.formatPhone=o2;exports.formatZipCode=l2;exports.stringToTagsPreview=Fm;exports.tagsToString=f2;exports.throttle=d2;exports.useArticles=XL;exports.useCategories=QL;exports.useNNews=Gr;exports.useTags=JL;exports.validateCNPJ=r2;exports.validateCPF=n2;exports.validateEmail=i2;exports.validatePasswordStrength=c2;exports.validatePhone=s2;exports.validatePrompt=h2;exports.validateTagList=p2;
223
223
  //# sourceMappingURL=index.cjs.map