zdashboard 2.8.5 → 2.9.0

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.
@@ -1,4 +1,4 @@
1
- import{c as Ba,g as Jr,j as Le,r as qt,f as GS}from"./index-BAFFLjYP.js";function xd(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Hg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zS={};function wd(e,t){return(zS.jsx?YS:HS).test(e)}const qS=/[ \t\n\f\r]/g;function VS(e){return typeof e=="object"?e.type==="text"?Md(e.value):!1:Md(e)}function Md(e){return e.replace(qS,"")===""}class jr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function Yg(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new jr(n,r,t)}function Yr(e){return e.toLowerCase()}class wt{constructor(t,n){this.attribute=n,this.property=t}}wt.prototype.attribute="";wt.prototype.booleanish=!1;wt.prototype.boolean=!1;wt.prototype.commaOrSpaceSeparated=!1;wt.prototype.commaSeparated=!1;wt.prototype.defined=!1;wt.prototype.mustUseProperty=!1;wt.prototype.number=!1;wt.prototype.overloadedBoolean=!1;wt.prototype.property="";wt.prototype.spaceSeparated=!1;wt.prototype.space=void 0;let $S=0;const ye=Wn(),rt=Wn(),zc=Wn(),ie=Wn(),qe=Wn(),Hn=Wn(),Mt=Wn();function Wn(){return 2**++$S}const qc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:rt,commaOrSpaceSeparated:Mt,commaSeparated:Hn,number:ie,overloadedBoolean:zc,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),Oi=Object.keys(qc);class Ou extends wt{constructor(t,n,r,a){let i=-1;if(super(t,n),Ld(this,"space",a),typeof r=="number")for(;++i<Oi.length;){const s=Oi[i];Ld(this,Oi[i],(r&qc[s])===qc[s])}}}Ou.prototype.defined=!0;function Ld(e,t,n){n&&(e[t]=n)}function Er(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Ou(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Yr(r)]=r,n[Yr(i.attribute)]=r}return new jr(t,n,e.space)}const zg=Er({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:qe,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:ie,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:qe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qg(e,t){return t in e?e[t]:t}function Vg(e,t){return qg(e,t.toLowerCase())}const WS=Er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hn,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alpha:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:qe,autoFocus:ye,autoPlay:ye,blocking:qe,capture:null,charSet:null,checked:ye,cite:null,className:qe,closedBy:null,colorSpace:null,cols:ie,colSpan:ie,command:null,commandFor:null,content:null,contentEditable:rt,controls:ye,controlsList:qe,coords:ie|Hn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:zc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:qe,height:ie,hidden:zc,high:ie,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:qe,itemRef:qe,itemScope:ye,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,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:ye,optimum:ie,pattern:null,ping:qe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:qe,required:ye,reversed:ye,rows:ie,rowSpan:ie,sandbox:qe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootCustomElementRegistry:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shadowRootSerializable:ye,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ye,disablePictureInPicture:ye,disableRemotePlayback:ye,exportParts:Hn,part:qe,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:Vg}),KS=Er({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",maskType:"mask-type",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:Mt,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:qe,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:Hn,g2:Hn,glyphName:Hn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qg}),$g=Er({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()}}),Wg=Er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vg}),Kg=Er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QS={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"},XS=/[A-Z]/g,kd=/-[a-z]/g,ZS=/^data[-\w.:]+$/i;function ei(e,t){const n=Yr(t);let r=t,a=wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZS.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(kd,jS);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!kd.test(i)){let s=i.replace(XS,JS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Ou}return new a(r,t)}function JS(e){return"-"+e.toLowerCase()}function jS(e){return e.charAt(1).toUpperCase()}const ea=Yg([zg,WS,$g,Wg,Kg],"html"),Dn=Yg([zg,KS,$g,Wg,Kg],"svg");function Pd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Qg(e){return e.join(" ").trim()}var vu={},Fd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,eT=/\n/g,tT=/^\s*/,nT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rT=/^:\s*/,aT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,iT=/^[;\s]*/,sT=/^\s+|\s+$/g,oT=`
1
+ import{c as Ba,g as Jr,j as Le,r as qt,f as GS}from"./index-veTBv7Qv.js";function xd(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Hg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zS={};function wd(e,t){return(zS.jsx?YS:HS).test(e)}const qS=/[ \t\n\f\r]/g;function VS(e){return typeof e=="object"?e.type==="text"?Md(e.value):!1:Md(e)}function Md(e){return e.replace(qS,"")===""}class jr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function Yg(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new jr(n,r,t)}function Yr(e){return e.toLowerCase()}class wt{constructor(t,n){this.attribute=n,this.property=t}}wt.prototype.attribute="";wt.prototype.booleanish=!1;wt.prototype.boolean=!1;wt.prototype.commaOrSpaceSeparated=!1;wt.prototype.commaSeparated=!1;wt.prototype.defined=!1;wt.prototype.mustUseProperty=!1;wt.prototype.number=!1;wt.prototype.overloadedBoolean=!1;wt.prototype.property="";wt.prototype.spaceSeparated=!1;wt.prototype.space=void 0;let $S=0;const ye=Wn(),rt=Wn(),zc=Wn(),ie=Wn(),qe=Wn(),Hn=Wn(),Mt=Wn();function Wn(){return 2**++$S}const qc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:rt,commaOrSpaceSeparated:Mt,commaSeparated:Hn,number:ie,overloadedBoolean:zc,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),Oi=Object.keys(qc);class Ou extends wt{constructor(t,n,r,a){let i=-1;if(super(t,n),Ld(this,"space",a),typeof r=="number")for(;++i<Oi.length;){const s=Oi[i];Ld(this,Oi[i],(r&qc[s])===qc[s])}}}Ou.prototype.defined=!0;function Ld(e,t,n){n&&(e[t]=n)}function Er(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Ou(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Yr(r)]=r,n[Yr(i.attribute)]=r}return new jr(t,n,e.space)}const zg=Er({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:qe,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:ie,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:qe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qg(e,t){return t in e?e[t]:t}function Vg(e,t){return qg(e,t.toLowerCase())}const WS=Er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Hn,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alpha:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:qe,autoFocus:ye,autoPlay:ye,blocking:qe,capture:null,charSet:null,checked:ye,cite:null,className:qe,closedBy:null,colorSpace:null,cols:ie,colSpan:ie,command:null,commandFor:null,content:null,contentEditable:rt,controls:ye,controlsList:qe,coords:ie|Hn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:zc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:qe,height:ie,hidden:zc,high:ie,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:qe,itemRef:qe,itemScope:ye,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,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:ye,optimum:ie,pattern:null,ping:qe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:qe,required:ye,reversed:ye,rows:ie,rowSpan:ie,sandbox:qe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootCustomElementRegistry:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shadowRootSerializable:ye,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ye,disablePictureInPicture:ye,disableRemotePlayback:ye,exportParts:Hn,part:qe,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:Vg}),KS=Er({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",maskType:"mask-type",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:Mt,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:qe,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:Hn,g2:Hn,glyphName:Hn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qg}),$g=Er({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()}}),Wg=Er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vg}),Kg=Er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QS={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"},XS=/[A-Z]/g,kd=/-[a-z]/g,ZS=/^data[-\w.:]+$/i;function ei(e,t){const n=Yr(t);let r=t,a=wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZS.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(kd,jS);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!kd.test(i)){let s=i.replace(XS,JS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Ou}return new a(r,t)}function JS(e){return"-"+e.toLowerCase()}function jS(e){return e.charAt(1).toUpperCase()}const ea=Yg([zg,WS,$g,Wg,Kg],"html"),Dn=Yg([zg,KS,$g,Wg,Kg],"svg");function Pd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Qg(e){return e.join(" ").trim()}var vu={},Fd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,eT=/\n/g,tT=/^\s*/,nT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,rT=/^:\s*/,aT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,iT=/^[;\s]*/,sT=/^\s+|\s+$/g,oT=`
2
2
  `,Bd="/",Ud="*",Un="",lT="comment",cT="declaration";function uT(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 a(f){var h=f.match(eT);h&&(n+=h.length);var T=f.lastIndexOf(oT);r=~T?f.length-T:r+f.length}function i(){var f={line:n,column:r};return function(h){return h.position=new s(f),c(),h}}function s(f){this.start=f,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(f){var h=new Error(t.source+":"+n+":"+r+": "+f);if(h.reason=f,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(f){var h=f.exec(e);if(h){var T=h[0];return a(T),e=e.slice(T.length),h}}function c(){l(tT)}function u(f){var h;for(f=f||[];h=d();)h!==!1&&f.push(h);return f}function d(){var f=i();if(!(Bd!=e.charAt(0)||Ud!=e.charAt(1))){for(var h=2;Un!=e.charAt(h)&&(Ud!=e.charAt(h)||Bd!=e.charAt(h+1));)++h;if(h+=2,Un===e.charAt(h-1))return o("End of comment missing");var T=e.slice(2,h-2);return r+=2,a(T),e=e.slice(h),r+=2,f({type:lT,comment:T})}}function p(){var f=i(),h=l(nT);if(h){if(d(),!l(rT))return o("property missing ':'");var T=l(aT),S=f({type:cT,property:Gd(h[0].replace(Fd,Un)),value:T?Gd(T[0].replace(Fd,Un)):Un});return l(iT),S}}function m(){var f=[];u(f);for(var h;h=p();)h!==!1&&(f.push(h),u(f));return f}return c(),m()}function Gd(e){return e?e.replace(sT,Un):Un}var dT=uT,_T=Ba&&Ba.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vu,"__esModule",{value:!0});vu.default=pT;const mT=_T(dT);function pT(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,mT.default)(e),a=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:s,value:o}=i;a?t(s,o,i):o&&(n=n||{},n[s]=o)}),n}var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.camelCase=void 0;var ET=/^--[a-zA-Z0-9_-]+$/,gT=/-([a-z])/g,fT=/^[^-]+$/,hT=/^-(webkit|moz|ms|o|khtml)-/,bT=/^-(ms)-/,ST=function(e){return!e||fT.test(e)||ET.test(e)},TT=function(e,t){return t.toUpperCase()},Hd=function(e,t){return"".concat(t,"-")},CT=function(e,t){return t===void 0&&(t={}),ST(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(bT,Hd):e=e.replace(hT,Hd),e.replace(gT,TT))};ti.camelCase=CT;var NT=Ba&&Ba.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},RT=NT(vu),AT=ti;function Vc(e,t){var n={};return!e||typeof e!="string"||(0,RT.default)(e,function(r,a){r&&a&&(n[(0,AT.camelCase)(r,t)]=a)}),n}Vc.default=Vc;var yT=Vc;const OT=Jr(yT),ni=Xg("end"),jt=Xg("start");function Xg(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 vT(e){const t=jt(e),n=ni(e);if(t&&n)return{start:t,end:n}}function wr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yd(e.position):"start"in e||"end"in e?Yd(e):"line"in e||"column"in e?$c(e):""}function $c(e){return zd(e&&e.line)+":"+zd(e&&e.column)}function Yd(e){return $c(e&&e.start)+"-"+$c(e&&e.end)}function zd(e){return e&&typeof e=="number"?e:1}class bt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=o?o.line:void 0,this.name=wr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0;const Iu={}.hasOwnProperty,IT=new Map,DT=/[A-Z]/g,xT=new Set(["table","tbody","thead","tfoot","tr"]),wT=new Set(["td","th"]),Zg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MT(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=HT(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=GT(n,t.jsx,t.jsxs)}const a={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"?Dn:ea,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Jg(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Jg(e,t,n){if(t.type==="element")return LT(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return FT(e,t,n);if(t.type==="mdxjsEsm")return PT(e,t);if(t.type==="root")return BT(e,t,n);if(t.type==="text")return UT(e,t)}function LT(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Dn,e.schema=a),e.ancestors.push(t);const i=ef(e,t.tagName,!1),s=YT(e,t);let o=xu(e,t);return xT.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!VS(l):!0})),jg(e,s,i,t),Du(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function kT(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)}zr(e,t.position)}function PT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zr(e,t.position)}function FT(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Dn,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:ef(e,t.name,!0),s=zT(e,t),o=xu(e,t);return jg(e,s,i,t),Du(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function BT(e,t,n){const r={};return Du(r,xu(e,t)),e.create(t,e.Fragment,r,n)}function UT(e,t){return t.value}function jg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Du(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function GT(e,t,n){return r;function r(a,i,s,o){const c=Array.isArray(s.children)?n:t;return o?c(i,s,o):c(i,s)}}function HT(e,t){return n;function n(r,a,i,s){const o=Array.isArray(i.children),l=jt(r);return t(a,i,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function YT(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Iu.call(t.properties,a)){const i=qT(e,a,t.properties[a]);if(i){const[s,o]=i;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&wT.has(t.tagName)?r=o:n[s]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function zT(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else zr(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else zr(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function xu(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:IT;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=a.get(l)||0;s=l+"-"+c,a.set(l,c+1)}}const o=Jg(e,i,s);o!==void 0&&n.push(o)}return n}function qT(e,t,n){const r=ei(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Hg(n):Qg(n)),r.property==="style"){let a=typeof n=="object"?n:VT(e,String(n));return e.stylePropertyNameCase==="css"&&(a=$T(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?QS[r.property]||r.property:r.attribute,n]}}function VT(e,t){try{return OT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Zg+"#cannot-parse-style-attribute",a}}function ef(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const o=wd(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=s}else r=wd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Iu.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);zr(e)}function zr(e,t){const n=new bt("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=Zg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $T(e){const t={};let n;for(n in e)Iu.call(e,n)&&(t[WT(n)]=e[n]);return t}function WT(e){let t=e.replace(DT,KT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function KT(e){return"-"+e.toLowerCase()}const vi={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"]},QT={};function wu(e,t){const n=QT,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return tf(e,r,a)}function tf(e,t,n){if(XT(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 qd(e.children,t,n)}return Array.isArray(e)?qd(e,t,n):""}function qd(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=tf(e[a],t,n);return r.join("")}function XT(e){return!!(e&&typeof e=="object")}const Vd=document.createElement("i");function Mu(e){const t="&"+e+";";Vd.innerHTML=t;const n=Vd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Lt(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Gt(e,t){return e.length>0?(Lt(e,e.length,0,t),e):t}const $d={}.hasOwnProperty;function nf(e){const t={};let n=-1;for(;++n<e.length;)ZT(t,e[n]);return t}function ZT(e,t){let n;for(n in t){const a=($d.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){$d.call(a,s)||(a[s]=[]);const o=i[s];JT(a[s],Array.isArray(o)?o:o?[o]:[])}}}function JT(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Lt(e,0,0,r)}function rf(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=xn(/[A-Za-z]/),ft=xn(/[\dA-Za-z]/),jT=xn(/[#-'*+\--9=?A-Z^-~]/);function Ua(e){return e!==null&&(e<32||e===127)}const Wc=xn(/\d/),e1=xn(/[\dA-Fa-f]/),t1=xn(/[!-/:-@[-`{-~]/);function Ee(e){return e!==null&&e<-2}function Ve(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const ri=xn(new RegExp("\\p{P}|\\p{S}","u")),Vn=xn(/\s/);function xn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function gr(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&ft(e.charCodeAt(n+1))&&ft(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(s=String.fromCharCode(i,o),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Me(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(l){return Ie(l)?(e.enter(n),o(l)):t(l)}function o(l){return Ie(l)&&i++<a?(e.consume(l),o):(e.exit(n),t(l))}}const n1={tokenize:r1};function r1(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Me(e,t,"linePrefix")}function a(o){return e.enter("paragraph"),i(o)}function i(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Ee(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),s)}}const a1={tokenize:i1},Wd={tokenize:s1};function i1(e){const t=this,n=[];let r=0,a,i,s;return o;function o(R){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,c)(R)}return c(R)}function l(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&N();const k=t.events.length;let F=k,v;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){v=t.events[F][1].end;break}S(r);let H=k;for(;H<t.events.length;)t.events[H][1].end={...v},H++;return Lt(t.events,F+1,0,t.events.slice(k)),t.events.length=H,c(R)}return o(R)}function c(R){if(r===n.length){if(!a)return p(R);if(a.currentConstruct&&a.currentConstruct.concrete)return f(R);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wd,u,d)(R)}function u(R){return a&&N(),S(r),p(R)}function d(R){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,f(R)}function p(R){return t.containerState={},e.attempt(Wd,m,f)(R)}function m(R){return r++,n.push([t.currentConstruct,t.containerState]),p(R)}function f(R){if(R===null){a&&N(),S(0),e.consume(R);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),h(R)}function h(R){if(R===null){T(e.exit("chunkFlow"),!0),S(0),e.consume(R);return}return Ee(R)?(e.consume(R),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(R),h)}function T(R,k){const F=t.sliceStream(R);if(k&&F.push(null),R.previous=i,i&&(i.next=R),i=R,a.defineSkip(R.start),a.write(F),t.parser.lazy[R.start.line]){let v=a.events.length;for(;v--;)if(a.events[v][1].start.offset<s&&(!a.events[v][1].end||a.events[v][1].end.offset>s))return;const H=t.events.length;let Y=H,V,P;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(V){P=t.events[Y][1].end;break}V=!0}for(S(r),v=H;v<t.events.length;)t.events[v][1].end={...P},v++;Lt(t.events,Y+1,0,t.events.slice(H)),t.events.length=v}}function S(R){let k=n.length;for(;k-- >R;){const F=n[k];t.containerState=F[1],F[0].exit.call(t,e)}n.length=R}function N(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function s1(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function lr(e){if(e===null||Ve(e)||Vn(e))return 1;if(ri(e))return 2}function ai(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Kc={name:"attention",resolveAll:o1,tokenize:l1};function o1(e,t){let n=-1,r,a,i,s,o,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Kd(d,-l),Kd(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Gt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Gt(c,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=Gt(c,ai(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Gt(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Gt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Lt(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 l1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=lr(r);let i;return s;function s(l){return i=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===i)return e.consume(l),o;const c=e.exit("attentionSequence"),u=lr(l),d=!u||u===2&&a||n.includes(l),p=!a||a===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(a||!p)),c._close=!!(i===42?p:p&&(u||!d)),t(l)}}function Kd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const c1={name:"autolink",tokenize:u1};function u1(e,t,n){let r=0;return a;function a(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return yt(m)?(e.consume(m),s):m===64?n(m):c(m)}function s(m){return m===43||m===45||m===46||ft(m)?(r=1,o(m)):c(m)}function o(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||ft(m))&&r++<32?(e.consume(m),o):(r=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ua(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):jT(m)?(e.consume(m),c):n(m)}function u(m){return ft(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,u):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||ft(m))&&r++<63){const f=m===45?p:d;return e.consume(m),f}return n(m)}}const ta={partial:!0,tokenize:d1};function d1(e,t,n){return r;function r(i){return Ie(i)?Me(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Ee(i)?t(i):n(i)}}const af={continuation:{tokenize:m1},exit:p1,name:"blockQuote",tokenize:_1};function _1(e,t,n){const r=this;return a;function a(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return Ie(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function m1(e,t,n){const r=this;return a;function a(s){return Ie(s)?Me(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(af,t,n)(s)}}function p1(e){e.exit("blockQuote")}const sf={name:"characterEscape",tokenize:E1};function E1(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return t1(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const of={name:"characterReference",tokenize:g1};function g1(e,t,n){const r=this;let a=0,i,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=ft,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=e1,u):(e.enter("characterReferenceValue"),i=7,s=Wc,u(d))}function u(d){if(d===59&&a){const p=e.exit("characterReferenceValue");return s===ft&&!Mu(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&a++<i?(e.consume(d),u):n(d)}}const Qd={partial:!0,tokenize:h1},Xd={concrete:!0,name:"codeFenced",tokenize:f1};function f1(e,t,n){const r=this,a={partial:!0,tokenize:F};let i=0,s=0,o;return l;function l(v){return c(v)}function c(v){const H=r.events[r.events.length-1];return i=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(v)}function u(v){return v===o?(s++,e.consume(v),u):s<3?n(v):(e.exit("codeFencedFenceSequence"),Ie(v)?Me(e,d,"whitespace")(v):d(v))}function d(v){return v===null||Ee(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Qd,h,k)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||Ee(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):Ie(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,m,"whitespace")(v)):v===96&&v===o?n(v):(e.consume(v),p)}function m(v){return v===null||Ee(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===null||Ee(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===o?n(v):(e.consume(v),f)}function h(v){return e.attempt(a,k,T)(v)}function T(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),S}function S(v){return i>0&&Ie(v)?Me(e,N,"linePrefix",i+1)(v):N(v)}function N(v){return v===null||Ee(v)?e.check(Qd,h,k)(v):(e.enter("codeFlowValue"),R(v))}function R(v){return v===null||Ee(v)?(e.exit("codeFlowValue"),N(v)):(e.consume(v),R)}function k(v){return e.exit("codeFenced"),t(v)}function F(v,H,Y){let V=0;return P;function P(ne){return v.enter("lineEnding"),v.consume(ne),v.exit("lineEnding"),$}function $(ne){return v.enter("codeFencedFence"),Ie(ne)?Me(v,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):X(ne)}function X(ne){return ne===o?(v.enter("codeFencedFenceSequence"),ue(ne)):Y(ne)}function ue(ne){return ne===o?(V++,v.consume(ne),ue):V>=s?(v.exit("codeFencedFenceSequence"),Ie(ne)?Me(v,ce,"whitespace")(ne):ce(ne)):Y(ne)}function ce(ne){return ne===null||Ee(ne)?(v.exit("codeFencedFence"),H(ne)):Y(ne)}}}function h1(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ii={name:"codeIndented",tokenize:S1},b1={partial:!0,tokenize:T1};function S1(e,t,n){const r=this;return a;function a(c){return e.enter("codeIndented"),Me(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):Ee(c)?e.attempt(b1,s,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Ee(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function T1(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):Ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):Me(e,i,"linePrefix",5)(s)}function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Ee(s)?a(s):n(s)}}const C1={name:"codeText",previous:R1,resolve:N1,tokenize:A1};function N1(e){let t=e.length-4,n=3,r,a;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;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function R1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function A1(e,t,n){let r=0,a,i;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),a=0,u(d)):Ee(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||Ee(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),a++,u):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class y1{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 a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Ar(this.left,r),i.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),Ar(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ar(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);Ar(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ar(this.left,n.reverse())}}}function Ar(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 lf(e){const t={};let n=-1,r,a,i,s,o,l,c;const u=new y1(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,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,O1(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(u.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...u.get(a)[1].start},o=u.slice(a,n),o.unshift(r),u.splice(a,n-a+1,o))}}return Lt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function O1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],c={};let u,d,p=-1,m=n,f=0,h=0;const T=[h];for(;m;){for(;e.get(++a)[1]!==m;);i.push(a),m._tokenizer||(u=r.sliceStream(m),m.next||u.push(null),d&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(h=p+1,T.push(h),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):T.pop(),p=T.length;p--;){const S=o.slice(T[p],T[p+1]),N=i.pop();l.push([N,N+S.length-1]),e.splice(N,2,S)}for(l.reverse(),p=-1;++p<l.length;)c[f+l[p][0]]=f+l[p][1],f+=l[p][1]-l[p][0]-1;return c}const v1={resolve:D1,tokenize:x1},I1={partial:!0,tokenize:w1};function D1(e){return lf(e),e}function x1(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(o)}function a(o){return o===null?i(o):Ee(o)?e.check(I1,s,i)(o):(e.consume(o),a)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function w1(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Me(e,i,"linePrefix")}function i(s){if(s===null||Ee(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function cf(e,t,n,r,a,i,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(S){return S===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(S),e.exit(i),p):S===null||S===32||S===41||Ua(S)?n(S):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),h(S))}function p(S){return S===62?(e.enter(i),e.consume(S),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===62?(e.exit("chunkString"),e.exit(o),p(S)):S===null||S===60||Ee(S)?n(S):(e.consume(S),S===92?f:m)}function f(S){return S===60||S===62||S===92?(e.consume(S),m):m(S)}function h(S){return!u&&(S===null||S===41||Ve(S))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(S)):u<c&&S===40?(e.consume(S),u++,h):S===41?(e.consume(S),u--,h):S===null||S===32||S===40||Ua(S)?n(S):(e.consume(S),S===92?T:h)}function T(S){return S===40||S===41||S===92?(e.consume(S),h):h(S)}}function uf(e,t,n,r,a,i){const s=this;let o=0,l;return c;function c(m){return e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(i),u}function u(m){return o>999||m===null||m===91||m===93&&!l||m===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):Ee(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||Ee(m)||o++>999?(e.exit("chunkString"),u(m)):(e.consume(m),l||(l=!Ie(m)),m===92?p:d)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,d):d(m)}}function df(e,t,n,r,a,i){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(a),e.consume(p),e.exit(a),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===s?(e.exit(i),l(s)):p===null?n(p):Ee(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Me(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===s||p===null||Ee(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===s||p===92?(e.consume(p),u):u(p)}}function Mr(e,t){let n;return r;function r(a){return Ee(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Ie(a)?Me(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const M1={name:"definition",tokenize:k1},L1={partial:!0,tokenize:P1};function k1(e,t,n){const r=this;let a;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return uf.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return a=Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Ve(m)?Mr(e,c)(m):c(m)}function c(m){return cf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function u(m){return e.attempt(L1,d,d)(m)}function d(m){return Ie(m)?Me(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Ee(m)?(e.exit("definition"),r.parser.defined.push(a),t(m)):n(m)}}function P1(e,t,n){return r;function r(o){return Ve(o)?Mr(e,a)(o):n(o)}function a(o){return df(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return Ie(o)?Me(e,s,"whitespace")(o):s(o)}function s(o){return o===null||Ee(o)?t(o):n(o)}}const F1={name:"hardBreakEscape",tokenize:B1};function B1(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Ee(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const U1={name:"headingAtx",resolve:G1,tokenize:H1};function G1(e,t){let n=e.length-2,r=3,a,i;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&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Lt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function H1(e,t,n){let r=0;return a;function a(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(e.consume(u),s):u===null||Ve(u)?(e.exit("atxHeadingSequence"),o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ee(u)?(e.exit("atxHeading"),t(u)):Ie(u)?Me(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Ve(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const Y1=["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"],Zd=["pre","script","style","textarea"],z1={concrete:!0,name:"htmlFlow",resolveTo:$1,tokenize:W1},q1={partial:!0,tokenize:Q1},V1={partial:!0,tokenize:K1};function $1(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 W1(e,t,n){const r=this;let a,i,s,o,l;return c;function c(w){return u(w)}function u(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),i=!0,h):w===63?(e.consume(w),a=3,r.interrupt?t:y):yt(w)?(e.consume(w),s=String.fromCharCode(w),T):n(w)}function p(w){return w===45?(e.consume(w),a=2,m):w===91?(e.consume(w),a=5,o=0,f):yt(w)?(e.consume(w),a=4,r.interrupt?t:y):n(w)}function m(w){return w===45?(e.consume(w),r.interrupt?t:y):n(w)}function f(w){const fe="CDATA[";return w===fe.charCodeAt(o++)?(e.consume(w),o===fe.length?r.interrupt?t:X:f):n(w)}function h(w){return yt(w)?(e.consume(w),s=String.fromCharCode(w),T):n(w)}function T(w){if(w===null||w===47||w===62||Ve(w)){const fe=w===47,be=s.toLowerCase();return!fe&&!i&&Zd.includes(be)?(a=1,r.interrupt?t(w):X(w)):Y1.includes(s.toLowerCase())?(a=6,fe?(e.consume(w),S):r.interrupt?t(w):X(w)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):i?N(w):R(w))}return w===45||ft(w)?(e.consume(w),s+=String.fromCharCode(w),T):n(w)}function S(w){return w===62?(e.consume(w),r.interrupt?t:X):n(w)}function N(w){return Ie(w)?(e.consume(w),N):P(w)}function R(w){return w===47?(e.consume(w),P):w===58||w===95||yt(w)?(e.consume(w),k):Ie(w)?(e.consume(w),R):P(w)}function k(w){return w===45||w===46||w===58||w===95||ft(w)?(e.consume(w),k):F(w)}function F(w){return w===61?(e.consume(w),v):Ie(w)?(e.consume(w),F):R(w)}function v(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,H):Ie(w)?(e.consume(w),v):Y(w)}function H(w){return w===l?(e.consume(w),l=null,V):w===null||Ee(w)?n(w):(e.consume(w),H)}function Y(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ve(w)?F(w):(e.consume(w),Y)}function V(w){return w===47||w===62||Ie(w)?R(w):n(w)}function P(w){return w===62?(e.consume(w),$):n(w)}function $(w){return w===null||Ee(w)?X(w):Ie(w)?(e.consume(w),$):n(w)}function X(w){return w===45&&a===2?(e.consume(w),x):w===60&&a===1?(e.consume(w),z):w===62&&a===4?(e.consume(w),de):w===63&&a===3?(e.consume(w),y):w===93&&a===5?(e.consume(w),re):Ee(w)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(q1,he,ue)(w)):w===null||Ee(w)?(e.exit("htmlFlowData"),ue(w)):(e.consume(w),X)}function ue(w){return e.check(V1,ce,he)(w)}function ce(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),ne}function ne(w){return w===null||Ee(w)?ue(w):(e.enter("htmlFlowData"),X(w))}function x(w){return w===45?(e.consume(w),y):X(w)}function z(w){return w===47?(e.consume(w),s="",W):X(w)}function W(w){if(w===62){const fe=s.toLowerCase();return Zd.includes(fe)?(e.consume(w),de):X(w)}return yt(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),W):X(w)}function re(w){return w===93?(e.consume(w),y):X(w)}function y(w){return w===62?(e.consume(w),de):w===45&&a===2?(e.consume(w),y):X(w)}function de(w){return w===null||Ee(w)?(e.exit("htmlFlowData"),he(w)):(e.consume(w),de)}function he(w){return e.exit("htmlFlow"),t(w)}}function K1(e,t,n){const r=this;return a;function a(s){return Ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Q1(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ta,t,n)}}const X1={name:"htmlText",tokenize:Z1};function Z1(e,t,n){const r=this;let a,i,s;return o;function o(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),F):y===63?(e.consume(y),R):yt(y)?(e.consume(y),Y):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),i=0,f):yt(y)?(e.consume(y),N):n(y)}function u(y){return y===45?(e.consume(y),m):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),p):Ee(y)?(s=d,z(y)):(e.consume(y),d)}function p(y){return y===45?(e.consume(y),m):d(y)}function m(y){return y===62?x(y):y===45?p(y):d(y)}function f(y){const de="CDATA[";return y===de.charCodeAt(i++)?(e.consume(y),i===de.length?h:f):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),T):Ee(y)?(s=h,z(y)):(e.consume(y),h)}function T(y){return y===93?(e.consume(y),S):h(y)}function S(y){return y===62?x(y):y===93?(e.consume(y),S):h(y)}function N(y){return y===null||y===62?x(y):Ee(y)?(s=N,z(y)):(e.consume(y),N)}function R(y){return y===null?n(y):y===63?(e.consume(y),k):Ee(y)?(s=R,z(y)):(e.consume(y),R)}function k(y){return y===62?x(y):R(y)}function F(y){return yt(y)?(e.consume(y),v):n(y)}function v(y){return y===45||ft(y)?(e.consume(y),v):H(y)}function H(y){return Ee(y)?(s=H,z(y)):Ie(y)?(e.consume(y),H):x(y)}function Y(y){return y===45||ft(y)?(e.consume(y),Y):y===47||y===62||Ve(y)?V(y):n(y)}function V(y){return y===47?(e.consume(y),x):y===58||y===95||yt(y)?(e.consume(y),P):Ee(y)?(s=V,z(y)):Ie(y)?(e.consume(y),V):x(y)}function P(y){return y===45||y===46||y===58||y===95||ft(y)?(e.consume(y),P):$(y)}function $(y){return y===61?(e.consume(y),X):Ee(y)?(s=$,z(y)):Ie(y)?(e.consume(y),$):V(y)}function X(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),a=y,ue):Ee(y)?(s=X,z(y)):Ie(y)?(e.consume(y),X):(e.consume(y),ce)}function ue(y){return y===a?(e.consume(y),a=void 0,ne):y===null?n(y):Ee(y)?(s=ue,z(y)):(e.consume(y),ue)}function ce(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||Ve(y)?V(y):(e.consume(y),ce)}function ne(y){return y===47||y===62||Ve(y)?V(y):n(y)}function x(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function z(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),W}function W(y){return Ie(y)?Me(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):re(y)}function re(y){return e.enter("htmlTextData"),s(y)}}const Lu={name:"labelEnd",resolveAll:tC,resolveTo:nC,tokenize:rC},J1={tokenize:aC},j1={tokenize:iC},eC={tokenize:sC};function tC(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 a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Lt(e,0,e.length,n),e}function nC(e,t){let n=e.length,r=0,a,i,s,o;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Gt(o,e.slice(i+1,i+r+3)),o=Gt(o,[["enter",u,t]]),o=Gt(o,ai(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),o=Gt(o,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),o=Gt(o,e.slice(s+1)),o=Gt(o,[["exit",l,t]]),Lt(e,i,e.length,o),e}function rC(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return o;function o(p){return i?i._inactive?d(p):(s=r.parser.defined.includes(Vt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(J1,u,s?u:d)(p):p===91?e.attempt(j1,u,s?c:d)(p):s?u(p):d(p)}function c(p){return e.attempt(eC,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,n(p)}}function aC(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),a}function a(d){return Ve(d)?Mr(e,i)(d):i(d)}function i(d){return d===41?u(d):cf(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ve(d)?Mr(e,l)(d):u(d)}function o(d){return n(d)}function l(d){return d===34||d===39||d===40?df(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Ve(d)?Mr(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 iC(e,t,n){const r=this;return a;function a(o){return uf.call(r,e,i,s,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function sC(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const oC={name:"labelStartImage",resolveAll:Lu.resolveAll,tokenize:lC};function lC(e,t,n){const r=this;return a;function a(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const cC={name:"labelStartLink",resolveAll:Lu.resolveAll,tokenize:uC};function uC(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Di={name:"lineEnding",tokenize:dC};function dC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const wa={name:"thematicBreak",tokenize:_C};function _C(e,t,n){let r=0,a;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return a=c,o(c)}function o(c){return c===a?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ee(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===a?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Ie(c)?Me(e,o,"whitespace")(c):o(c))}}const Dt={continuation:{tokenize:gC},exit:hC,name:"list",tokenize:EC},mC={partial:!0,tokenize:bC},pC={partial:!0,tokenize:fC};function EC(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return o;function o(m){const f=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Wc(m)){if(r.containerState.type||(r.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(wa,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return Wc(m)&&++s<10?(e.consume(m),l):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ta,r.interrupt?n:u,e.attempt(mC,p,d))}function u(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function d(m){return Ie(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function gC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ta,a,i);function a(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Me(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!Ie(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pC,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Me(e,e.attempt(Dt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function fC(e,t,n){const r=this;return Me(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function hC(e){e.exit(this.containerState.type)}function bC(e,t,n){const r=this;return Me(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!Ie(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Jd={name:"setextUnderline",resolveTo:SC,tokenize:TC};function SC(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function TC(e,t,n){const r=this;let a;return i;function i(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"),a=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===a?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Ie(c)?Me(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ee(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const CC={tokenize:NC};function NC(e){const t=this,n=e.attempt(ta,r,e.attempt(this.parser.constructs.flowInitial,a,Me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(v1,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const RC={resolveAll:mf()},AC=_f("string"),yC=_f("text");function _f(e){return{resolveAll:mf(e==="text"?OC:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,o);return s;function s(u){return c(u)?i(u):o(u)}function o(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=a[u];let p=-1;if(d)for(;++p<d.length;){const m=d[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function mf(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function OC(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],a=t.sliceStream(r);let i=a.length,s=-1,o=0,l;for(;i--;){const c=a[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)l=!0,o++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const vC={42:Dt,43:Dt,45:Dt,48:Dt,49:Dt,50:Dt,51:Dt,52:Dt,53:Dt,54:Dt,55:Dt,56:Dt,57:Dt,62:af},IC={91:M1},DC={[-2]:Ii,[-1]:Ii,32:Ii},xC={35:U1,42:wa,45:[Jd,wa],60:z1,61:Jd,95:wa,96:Xd,126:Xd},wC={38:of,92:sf},MC={[-5]:Di,[-4]:Di,[-3]:Di,33:oC,38:of,42:Kc,60:[c1,X1],91:cC,92:[F1,sf],93:Lu,95:Kc,96:C1},LC={null:[Kc,RC]},kC={null:[42,95]},PC={null:[]},FC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kC,contentInitial:IC,disable:PC,document:vC,flow:xC,flowInitial:DC,insideSpan:LC,string:wC,text:MC},Symbol.toStringTag,{value:"Module"}));function BC(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 a={},i=[];let s=[],o=[];const l={attempt:H(F),check:H(v),consume:N,enter:R,exit:k,interrupt:H(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:h,events:[],now:f,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d($){return s=Gt(s,$),T(),s[s.length-1]!==null?[]:(Y(t,0),c.events=ai(i,c.events,c),c.events)}function p($,X){return GC(m($),X)}function m($){return UC(s,$)}function f(){const{_bufferIndex:$,_index:X,line:ue,column:ce,offset:ne}=r;return{_bufferIndex:$,_index:X,line:ue,column:ce,offset:ne}}function h($){a[$.line]=$.column,P()}function T(){let $;for(;r._index<s.length;){const X=s[r._index];if(typeof X=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<X.length;)S(X.charCodeAt(r._bufferIndex));else S(X)}}function S($){u=u($)}function N($){Ee($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,P()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=$}function R($,X){const ue=X||{};return ue.type=$,ue.start=f(),c.events.push(["enter",ue,c]),o.push(ue),ue}function k($){const X=o.pop();return X.end=f(),c.events.push(["exit",X,c]),X}function F($,X){Y($,X.from)}function v($,X){X.restore()}function H($,X){return ue;function ue(ce,ne,x){let z,W,re,y;return Array.isArray(ce)?he(ce):"tokenize"in ce?he([ce]):de(ce);function de(Ne){return Re;function Re(Te){const ve=Te!==null&&Ne[Te],ke=Te!==null&&Ne.null,Fe=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return he(Fe)(Te)}}function he(Ne){return z=Ne,W=0,Ne.length===0?x:w(Ne[W])}function w(Ne){return Re;function Re(Te){return y=V(),re=Ne,Ne.partial||(c.currentConstruct=Ne),Ne.name&&c.parser.constructs.disable.null.includes(Ne.name)?be():Ne.tokenize.call(X?Object.assign(Object.create(c),X):c,l,fe,be)(Te)}}function fe(Ne){return $(re,y),ne}function be(Ne){return y.restore(),++W<z.length?w(z[W]):x}}}function Y($,X){$.resolveAll&&!i.includes($)&&i.push($),$.resolve&&Lt(c.events,X,c.events.length-X,$.resolve(c.events.slice(X),c)),$.resolveTo&&(c.events=$.resolveTo(c.events,c))}function V(){const $=f(),X=c.previous,ue=c.currentConstruct,ce=c.events.length,ne=Array.from(o);return{from:ce,restore:x};function x(){r=$,c.previous=X,c.currentConstruct=ue,c.events.length=ce,o=ne,P()}}function P(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function UC(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function GC(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
3
3
  `;break}case-3:{s=`\r
4
4
  `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function HC(e){const r={constructs:nf([FC,...(e||{}).extensions||[]]),content:a(n1),defined:[],document:a(a1),flow:a(CC),lazy:{},string:a(AC),text:a(yC)};return r;function a(i){return s;function s(o){return BC(r,i,o)}}}function YC(e){for(;!lf(e););return e}const jd=/[\0\t\n\r]/g;function zC(){let e=1,t="",n=!0,r;return a;function a(i,s,o){const l=[];let c,u,d,p,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(jd.lastIndex=d,c=jd.exec(i),p=c&&c.index!==void 0?c.index:i.length,m=i.charCodeAt(p),!c){t=i.slice(d);break}if(m===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(i.slice(d,p)),e+=p-d),m){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const qC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VC(e){return e.replace(qC,$C)}function $C(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return rf(n.slice(i?2:1),i?16:10)}return Mu(n)||e}const pf={}.hasOwnProperty;function WC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),KC(n)(YC(HC(n).document().write(zC()(e,t,!0))))}function KC(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(mt),autolinkProtocol:V,autolinkEmail:V,atxHeading:i(Be),blockQuote:i(ke),characterEscape:V,characterReference:V,codeFenced:i(Fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Fe,s),codeText:i(We,s),codeTextData:V,data:V,codeFlowValue:V,definition:i(He),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(ct),hardBreakEscape:i(xe),hardBreakTrailing:i(xe),htmlFlow:i(tt,s),htmlFlowData:V,htmlText:i(tt,s),htmlTextData:V,image:i(j),label:s,link:i(mt),listItem:i(ge),listItemValue:p,listOrdered:i(Ae,d),listUnordered:i(Ae),paragraph:i(pt),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Be),strong:i(Ke),thematicBreak:i(ut)},exit:{atxHeading:l(),atxHeadingSequence:F,autolink:l(),autolinkEmail:ve,autolinkProtocol:Te,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:Ne,characterReference:Re,codeFenced:l(T),codeFencedFence:h,codeFencedFenceInfo:m,codeFencedFenceMeta:f,codeFlowValue:P,codeIndented:l(S),codeText:l(ne),codeTextData:P,data:P,definition:l(),definitionDestinationString:k,definitionLabelString:N,definitionTitleString:R,emphasis:l(),hardBreakEscape:l(X),hardBreakTrailing:l(X),htmlFlow:l(ue),htmlFlowData:P,htmlText:l(ce),htmlTextData:P,image:l(z),label:re,labelText:W,lineEnding:$,link:l(x),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:fe,resourceDestinationString:y,resourceTitleString:de,resource:he,setextHeading:l(Y),setextHeadingLineSequence:H,setextHeadingText:v,strong:l(),thematicBreak:l()}};Ef(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let B={type:"root",children:[]};const Q={stack:[B],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:u,data:n},Z=[];let pe=-1;for(;++pe<O.length;)if(O[pe][1].type==="listOrdered"||O[pe][1].type==="listUnordered")if(O[pe][0]==="enter")Z.push(pe);else{const Pe=Z.pop();pe=a(O,Pe,pe)}for(pe=-1;++pe<O.length;){const Pe=t[O[pe][0]];pf.call(Pe,O[pe][1].type)&&Pe[O[pe][1].type].call(Object.assign({sliceSerialize:O[pe][2].sliceSerialize},Q),O[pe][1])}if(Q.tokenStack.length>0){const Pe=Q.tokenStack[Q.tokenStack.length-1];(Pe[1]||e_).call(Q,void 0,Pe[0])}for(B.position={start:fn(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:fn(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)B=t.transforms[pe](B)||B;return B}function a(O,B,Q){let Z=B-1,pe=-1,Pe=!1,Ct,Et,En,gn;for(;++Z<=Q;){const gt=O[Z];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?pe++:pe--,gn=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(Ct&&!gn&&!pe&&!En&&(En=Z),gn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gn=void 0}if(!pe&&gt[0]==="enter"&&gt[1].type==="listItemPrefix"||pe===-1&&gt[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(Ct){let an=Z;for(Et=void 0;an--;){const Ut=O[an];if(Ut[1].type==="lineEnding"||Ut[1].type==="lineEndingBlank"){if(Ut[0]==="exit")continue;Et&&(O[Et][1].type="lineEndingBlank",Pe=!0),Ut[1].type="lineEnding",Et=an}else if(!(Ut[1].type==="linePrefix"||Ut[1].type==="blockQuotePrefix"||Ut[1].type==="blockQuotePrefixWhitespace"||Ut[1].type==="blockQuoteMarker"||Ut[1].type==="listItemIndent"))break}En&&(!Et||En<Et)&&(Ct._spread=!0),Ct.end=Object.assign({},Et?O[Et][1].start:gt[1].end),O.splice(Et||Z,0,["exit",Ct,gt[2]]),Z++,Q++}if(gt[1].type==="listItemPrefix"){const an={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};Ct=an,O.splice(Z,0,["enter",an,gt[2]]),Z++,Q++,En=void 0,gn=!0}}}return O[B][1]._spread=Pe,Q}function i(O,B){return Q;function Q(Z){o.call(this,O(Z),Z),B&&B.call(this,Z)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(O,B,Q){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([B,Q||void 0]),O.position={start:fn(B.start),end:void 0}}function l(O){return B;function B(Q){O&&O.call(this,Q),c.call(this,Q)}}function c(O,B){const Q=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==O.type&&(B?B.call(this,O,Z[0]):(Z[1]||e_).call(this,O,Z[0]));else throw new Error("Cannot close `"+O.type+"` ("+wr({start:O.start,end:O.end})+"): it’s not open");Q.position.end=fn(O.end)}function u(){return wu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function m(){const O=this.resume(),B=this.stack[this.stack.length-1];B.lang=O}function f(){const O=this.resume(),B=this.stack[this.stack.length-1];B.meta=O}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O.replace(/(\r?\n|\r)$/g,"")}function N(O){const B=this.resume(),Q=this.stack[this.stack.length-1];Q.label=B,Q.identifier=Vt(this.sliceSerialize(O)).toLowerCase()}function R(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function k(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function F(O){const B=this.stack[this.stack.length-1];if(!B.depth){const Q=this.sliceSerialize(O).length;B.depth=Q}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function H(O){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function V(O){const Q=this.stack[this.stack.length-1].children;let Z=Q[Q.length-1];(!Z||Z.type!=="text")&&(Z=Tt(),Z.position={start:fn(O.start),end:void 0},Q.push(Z)),this.stack.push(Z)}function P(O){const B=this.stack.pop();B.value+=this.sliceSerialize(O),B.position.end=fn(O.end)}function $(O){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=B.children[B.children.length-1];Q.position.end=fn(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(V.call(this,O),P.call(this,O))}function X(){this.data.atHardBreak=!0}function ue(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ce(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function ne(){const O=this.resume(),B=this.stack[this.stack.length-1];B.value=O}function x(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function z(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=B,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function W(O){const B=this.sliceSerialize(O),Q=this.stack[this.stack.length-2];Q.label=VC(B),Q.identifier=Vt(B).toLowerCase()}function re(){const O=this.stack[this.stack.length-1],B=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const Z=O.children;Q.children=Z}else Q.alt=B}function y(){const O=this.resume(),B=this.stack[this.stack.length-1];B.url=O}function de(){const O=this.resume(),B=this.stack[this.stack.length-1];B.title=O}function he(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function fe(O){const B=this.resume(),Q=this.stack[this.stack.length-1];Q.label=B,Q.identifier=Vt(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function be(O){this.data.characterReferenceType=O.type}function Ne(O){const B=this.sliceSerialize(O),Q=this.data.characterReferenceType;let Z;Q?(Z=rf(B,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Mu(B);const pe=this.stack[this.stack.length-1];pe.value+=Z}function Re(O){const B=this.stack.pop();B.position.end=fn(O.end)}function Te(O){P.call(this,O);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(O)}function ve(O){P.call(this,O);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(O)}function ke(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function We(){return{type:"inlineCode",value:""}}function He(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ct(){return{type:"emphasis",children:[]}}function Be(){return{type:"heading",depth:0,children:[]}}function xe(){return{type:"break"}}function tt(){return{type:"html",value:""}}function j(){return{type:"image",title:null,url:"",alt:null}}function mt(){return{type:"link",title:null,url:"",children:[]}}function Ae(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function ge(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function pt(){return{type:"paragraph",children:[]}}function Ke(){return{type:"strong",children:[]}}function Tt(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function fn(e){return{line:e.line,column:e.column,offset:e.offset}}function Ef(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ef(e,r):QC(e,r)}}function QC(e,t){let n;for(n in t)if(pf.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 e_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wr({start:t.start,end:t.end})+") is still open")}function XC(e){const t=this;t.parser=n;function n(r){return WC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZC(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 JC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -1 +1 @@
1
- import{u as o,j as c}from"./index-BAFFLjYP.js";const m={".md":"md",".markdown":"md",".mdx":"md",".ts":"ts",".tsx":"tsx",".js":"js",".jsx":"jsx",".mjs":"mjs",".cjs":"mjs",".mts":"mjs",".cts":"mjs",".css":"css",".scss":"css",".less":"css",".html":"html",".htm":"html",".json":"json",".yaml":"json",".yml":"json",".toml":"json",".csv":"csv",".tsv":"csv",".sh":"sh",".bash":"sh",".zsh":"sh",".sql":"sh",".py":"py",".go":"py",".rs":"py",".java":"py",".svg":"svg",".png":"svg",".jpg":"svg",".jpeg":"svg",".gif":"svg",".webp":"svg",".ico":"svg"};function r(s){const t=s.toLowerCase();if(t==="justfile"||t==="makefile")return t;const n=s.lastIndexOf("."),e=n>=0?s.slice(n).toLowerCase():"";return m[e]??"unknown"}function i({name:s,active:t}){const{icon:n}=o(),e=n(r(s));return e?c.jsx("span",{className:`h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center ${t?"text-primary":"text-muted-foreground"}`,children:e}):null}export{i as F};
1
+ import{u as o,j as c}from"./index-veTBv7Qv.js";const m={".md":"md",".markdown":"md",".mdx":"md",".ts":"ts",".tsx":"tsx",".js":"js",".jsx":"jsx",".mjs":"mjs",".cjs":"mjs",".mts":"mjs",".cts":"mjs",".css":"css",".scss":"css",".less":"css",".html":"html",".htm":"html",".json":"json",".yaml":"json",".yml":"json",".toml":"json",".csv":"csv",".tsv":"csv",".sh":"sh",".bash":"sh",".zsh":"sh",".sql":"sh",".py":"py",".go":"py",".rs":"py",".java":"py",".svg":"svg",".png":"svg",".jpg":"svg",".jpeg":"svg",".gif":"svg",".webp":"svg",".ico":"svg"};function r(s){const t=s.toLowerCase();if(t==="justfile"||t==="makefile")return t;const n=s.lastIndexOf("."),e=n>=0?s.slice(n).toLowerCase():"";return m[e]??"unknown"}function i({name:s,active:t}){const{icon:n}=o(),e=n(r(s));return e?c.jsx("span",{className:`h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center ${t?"text-primary":"text-muted-foreground"}`,children:e}):null}export{i as F};
@@ -1 +1 @@
1
- import{j as e,e as n}from"./index-BAFFLjYP.js";function b({items:l,value:d,onChange:c,ariaLabel:p,renderExtra:a,renderLabel:o,className:t,...u}){return e.jsx("div",{role:"group","aria-label":p,className:n("inline-flex items-center gap-1.5 flex-wrap",t),...u,children:l.map(r=>{const s=r.key===d;return e.jsxs("button",{type:"button","aria-pressed":s,onClick:()=>c(r.key),className:n("inline-flex items-center gap-1.5 h-7 px-2.5 rounded-[var(--radius-full)] border text-xs transition-colors",s?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground hover:border-muted-foreground/40",r.className),children:[r.renderLabel?r.renderLabel(r):o?o(r):e.jsx("span",{children:r.label}),r.badge&&e.jsx("span",{className:"opacity-80",children:r.badge}),r.renderExtra?r.renderExtra(r):a==null?void 0:a(r)]},r.key)})})}export{b as F};
1
+ import{j as e,e as n}from"./index-veTBv7Qv.js";function b({items:l,value:d,onChange:c,ariaLabel:p,renderExtra:a,renderLabel:o,className:t,...u}){return e.jsx("div",{role:"group","aria-label":p,className:n("inline-flex items-center gap-1.5 flex-wrap",t),...u,children:l.map(r=>{const s=r.key===d;return e.jsxs("button",{type:"button","aria-pressed":s,onClick:()=>c(r.key),className:n("inline-flex items-center gap-1.5 h-7 px-2.5 rounded-[var(--radius-full)] border text-xs transition-colors",s?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground hover:border-muted-foreground/40",r.className),children:[r.renderLabel?r.renderLabel(r):o?o(r):e.jsx("span",{children:r.label}),r.badge&&e.jsx("span",{className:"opacity-80",children:r.badge}),r.renderExtra?r.renderExtra(r):a==null?void 0:a(r)]},r.key)})})}export{b as F};
@@ -1 +1 @@
1
- import{b as W,u as S,r as v,j as e}from"./index-BAFFLjYP.js";import{F as D}from"./FileIcon-FyROY2Qe.js";import{u as I}from"./usePluginData-DEpAv1Yl.js";function h(r,s){return!s||r.name.toLowerCase().includes(s)?!0:(r.children??[]).some(o=>h(o,s))}async function E(){const r=await fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).catch(()=>[]),s={};await Promise.all(r.map(async a=>{try{const l=await fetch(`/__files?wt=${encodeURIComponent(a.path)}`,{cache:"no-store"}).then(i=>i.json());s[a.path]=l.tree??[]}catch{s[a.path]=[]}}));const o=await fetch("/__files",{cache:"no-store"}).then(a=>a.json()).then(a=>a.tree??[]).catch(()=>[]);return{worktrees:r,wtTrees:s,rootTree:o}}function y({node:r,depth:s,filter:o,current:a,onSelectFile:l}){const{icon:i}=S(),c=r.children??[],f=!!o&&r.name.toLowerCase().includes(o)?c:c.filter(n=>h(n,o)),[x,b]=v.useState(!r.defaultCollapsed),d=o?!0:x;return!f.length&&o?null:e.jsxs("div",{children:[(()=>{const n=r.name.match(/^([a-z]+)(?: \((\d+)\))?$/),p=n?i(n[1]):void 0;return e.jsxs("button",{onClick:()=>b(m=>!m),className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+s*14,width:"calc(100% - 8px)"},children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${d?"rotate-90":""}`,children:i("chevron-right")}),p?e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:p}):e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-colors",children:i(d?"folder-open":"folder")}),e.jsx("span",{className:"font-medium truncate",children:n?n[1]:r.name}),(n==null?void 0:n[2])&&e.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-xs font-mono text-muted-foreground",children:n[2]})]})})(),d&&f.map(n=>n.kind==="dir"?e.jsx(y,{node:n,depth:s+1,filter:o,current:a,onSelectFile:l},n.name+s):e.jsxs("button",{onClick:()=>n.path&&l(n.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-sm hover:bg-muted rounded-md mx-1 ${a===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+s*14,width:"calc(100% - 8px)"},children:[e.jsx(D,{name:n.name,active:a===n.path}),e.jsx("span",{className:"truncate",children:n.name})]},n.path))]})}function O(){var N,k,C;const r=W(),s=r.params,o=s.get("file"),a=s.get("wt"),l=(s.get("filter")??"").toLowerCase(),i=s.get("card")==="dirty",{icon:c}=S(),[w,f]=v.useState(new Set),[x,b]=v.useState(!1),d=I("view:sidebar-trees",E,{subscribe:"files"}),n=((N=d.data)==null?void 0:N.worktrees)??[],p=((k=d.data)==null?void 0:k.wtTrees)??{},m=((C=d.data)==null?void 0:C.rootTree)??[],R=t=>{f(g=>{const u=new Set(g);return u.has(t)?u.delete(t):u.add(t),u})},_=()=>b(t=>!t),$=t=>{r.navigate({filter:t.trim()?t:null},{replace:!0})},F=n.length>0;return e.jsx("div",{className:"p-2 flex flex-col h-full",children:e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsx("input",{value:l,onChange:t=>$(t.target.value),placeholder:"过滤…","data-testid":"view-filter-input",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),e.jsxs("div",{className:"py-1 flex-1 min-h-0 overflow-auto","data-testid":"view-tree-scroller",children:[F&&n.map(t=>{const u=(p[t.path]??[]).filter(j=>h(j,l));if(!u.length&&l)return null;const T=i&&t.dirty;return e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:()=>R(t.path),"data-drill-dirty":T?"true":void 0,className:`w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md ${T?"bg-warning/10 ring-1 ring-warning":""}`,children:[e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform",children:c("chevron-right",w.has(t.path)?"":"rotate-90")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{className:"truncate",children:t.branch}),t.dirty&&e.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]}),!w.has(t.path)&&e.jsx("div",{className:"ml-2",children:u.map(j=>e.jsx(y,{node:j,depth:1,filter:l,current:a===t.path?o:null,onSelectFile:L=>r.navigate({wt:t.path,file:L})},j.name))})]},t.path)}),m.length>0&&(!l||m.some(t=>h(t,l)))&&e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:_,className:"w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${x?"":"rotate-90"}`,children:c("chevron-right")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{children:"当前分支"})]}),!x&&e.jsx("div",{className:"ml-2",children:m.filter(t=>h(t,l)).map(t=>e.jsx(y,{node:t,depth:1,filter:l,current:a?null:o,onSelectFile:g=>r.navigate({wt:null,file:g})},t.name))})]})]})]})})}export{O as default};
1
+ import{b as W,u as S,r as v,j as e}from"./index-veTBv7Qv.js";import{F as D}from"./FileIcon-DCL9OD6I.js";import{u as I}from"./usePluginData-mjHueOjf.js";function h(r,s){return!s||r.name.toLowerCase().includes(s)?!0:(r.children??[]).some(o=>h(o,s))}async function E(){const r=await fetch("/__worktrees",{cache:"no-store"}).then(a=>a.json()).catch(()=>[]),s={};await Promise.all(r.map(async a=>{try{const l=await fetch(`/__files?wt=${encodeURIComponent(a.path)}`,{cache:"no-store"}).then(i=>i.json());s[a.path]=l.tree??[]}catch{s[a.path]=[]}}));const o=await fetch("/__files",{cache:"no-store"}).then(a=>a.json()).then(a=>a.tree??[]).catch(()=>[]);return{worktrees:r,wtTrees:s,rootTree:o}}function y({node:r,depth:s,filter:o,current:a,onSelectFile:l}){const{icon:i}=S(),c=r.children??[],f=!!o&&r.name.toLowerCase().includes(o)?c:c.filter(n=>h(n,o)),[x,b]=v.useState(!r.defaultCollapsed),d=o?!0:x;return!f.length&&o?null:e.jsxs("div",{children:[(()=>{const n=r.name.match(/^([a-z]+)(?: \((\d+)\))?$/),p=n?i(n[1]):void 0;return e.jsxs("button",{onClick:()=>b(m=>!m),className:"w-full flex items-center gap-1.5 px-2 py-1 text-sm text-foreground hover:bg-muted rounded-md mx-1",style:{paddingLeft:8+s*14,width:"calc(100% - 8px)"},children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${d?"rotate-90":""}`,children:i("chevron-right")}),p?e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:p}):e.jsx("span",{className:"h-3.5 w-3.5 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-colors",children:i(d?"folder-open":"folder")}),e.jsx("span",{className:"font-medium truncate",children:n?n[1]:r.name}),(n==null?void 0:n[2])&&e.jsx("span",{className:"ml-auto mr-1 shrink-0 rounded-full bg-muted px-1.5 text-xs font-mono text-muted-foreground",children:n[2]})]})})(),d&&f.map(n=>n.kind==="dir"?e.jsx(y,{node:n,depth:s+1,filter:o,current:a,onSelectFile:l},n.name+s):e.jsxs("button",{onClick:()=>n.path&&l(n.path),className:`w-full flex items-center gap-1.5 pr-2 py-1 text-sm hover:bg-muted rounded-md mx-1 ${a===n.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,style:{paddingLeft:20+s*14,width:"calc(100% - 8px)"},children:[e.jsx(D,{name:n.name,active:a===n.path}),e.jsx("span",{className:"truncate",children:n.name})]},n.path))]})}function O(){var N,k,C;const r=W(),s=r.params,o=s.get("file"),a=s.get("wt"),l=(s.get("filter")??"").toLowerCase(),i=s.get("card")==="dirty",{icon:c}=S(),[w,f]=v.useState(new Set),[x,b]=v.useState(!1),d=I("view:sidebar-trees",E,{subscribe:"files"}),n=((N=d.data)==null?void 0:N.worktrees)??[],p=((k=d.data)==null?void 0:k.wtTrees)??{},m=((C=d.data)==null?void 0:C.rootTree)??[],R=t=>{f(g=>{const u=new Set(g);return u.has(t)?u.delete(t):u.add(t),u})},_=()=>b(t=>!t),$=t=>{r.navigate({filter:t.trim()?t:null},{replace:!0})},F=n.length>0;return e.jsx("div",{className:"p-2 flex flex-col h-full",children:e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[e.jsx("input",{value:l,onChange:t=>$(t.target.value),placeholder:"过滤…","data-testid":"view-filter-input",className:"w-full h-7 px-2 text-xs rounded border border-border bg-background focus:outline-none focus:border-primary"}),e.jsxs("div",{className:"py-1 flex-1 min-h-0 overflow-auto","data-testid":"view-tree-scroller",children:[F&&n.map(t=>{const u=(p[t.path]??[]).filter(j=>h(j,l));if(!u.length&&l)return null;const T=i&&t.dirty;return e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:()=>R(t.path),"data-drill-dirty":T?"true":void 0,className:`w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md ${T?"bg-warning/10 ring-1 ring-warning":""}`,children:[e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform",children:c("chevron-right",w.has(t.path)?"":"rotate-90")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{className:"truncate",children:t.branch}),t.dirty&&e.jsx("span",{className:"ml-auto flex-none h-2 w-2 rounded-full bg-destructive shrink-0",title:"有未提交变更"})]}),!w.has(t.path)&&e.jsx("div",{className:"ml-2",children:u.map(j=>e.jsx(y,{node:j,depth:1,filter:l,current:a===t.path?o:null,onSelectFile:L=>r.navigate({wt:t.path,file:L})},j.name))})]},t.path)}),m.length>0&&(!l||m.some(t=>h(t,l)))&&e.jsxs("div",{className:"mb-1",children:[e.jsxs("button",{onClick:_,className:"w-full flex items-center gap-1 px-2 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md",children:[e.jsx("span",{className:`h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground transition-transform ${x?"":"rotate-90"}`,children:c("chevron-right")}),e.jsx("span",{className:"h-3 w-3 shrink-0 inline-flex items-center justify-center text-muted-foreground",children:c("git-branch")}),e.jsx("span",{children:"当前分支"})]}),!x&&e.jsx("div",{className:"ml-2",children:m.filter(t=>h(t,l)).map(t=>e.jsx(y,{node:t,depth:1,filter:l,current:a?null:o,onSelectFile:g=>r.navigate({wt:null,file:g})},t.name))})]})]})]})})}export{O as default};
@@ -1 +1 @@
1
- import{b as x,u as d,r as m,j as s}from"./index-BAFFLjYP.js";import{F as f}from"./FileIcon-FyROY2Qe.js";import{u as h}from"./usePluginData-DEpAv1Yl.js";const b={page:"monitor",component:"blocks",icon:"shapes",token:"palette",md:"book-open",video:"video",audio:"audio-lines",pdf:"file-text",font:"type"},k=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"}];function N(){const n=x(),o=n.params,l=o.get("asset"),c=o.get("type"),a=o.get("folder");d();const r=h("design:/__design/assets",()=>fetch("/__design/assets",{cache:"no-store"}).then(t=>t.json()),{subscribe:"files"}),i=m.useMemo(()=>{const t=r.data;return t?k.map(u=>({...u,items:(t[u.key]??[]).filter(p=>!a||p.path.startsWith(a))})).filter(u=>u.items.length>0):[]},[r.data,a]),e=t=>n.navigate({type:t.type,asset:t.path});return s.jsxs("div",{children:[s.jsx("div",{className:"p-3 text-xs text-muted-foreground truncate",children:"设计资产"}),i.map(t=>s.jsx(g,{group:t,current:l&&c===t.key?l:null,onSelect:e},t.key))]})}function g({group:n,current:o,onSelect:l}){const[c,a]=m.useState(!0),{icon:r}=d(),i=b[n.key];return s.jsxs("div",{className:"mb-1.5 px-1",children:[s.jsxs("button",{onClick:()=>a(e=>!e),className:"w-full flex items-center gap-1.5 pt-2 pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground rounded-md",children:[r("chevron-right",`h-3 w-3 shrink-0 transition-transform ${c?"rotate-90":""}`),i&&r(i,"h-3.5 w-3.5 shrink-0"),s.jsx("span",{className:"truncate",children:n.label}),s.jsx("span",{className:"ml-auto shrink-0 rounded-full bg-muted px-1.5 font-mono text-xs font-normal",children:n.items.length})]}),c&&n.items.map(e=>s.jsxs("button",{onClick:()=>l(e),className:`w-full text-left flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${o===e.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,children:[s.jsx(f,{name:e.name,active:o===e.path}),s.jsx("span",{className:"truncate",children:e.name}),e.ext&&s.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground/60",children:e.ext})]},e.path))]})}export{N as default};
1
+ import{b as x,u as d,r as m,j as s}from"./index-veTBv7Qv.js";import{F as f}from"./FileIcon-DCL9OD6I.js";import{u as h}from"./usePluginData-mjHueOjf.js";const b={page:"monitor",component:"blocks",icon:"shapes",token:"palette",md:"book-open",video:"video",audio:"audio-lines",pdf:"file-text",font:"type"},k=[{key:"page",label:"页面"},{key:"component",label:"组件"},{key:"icon",label:"图标"},{key:"token",label:"Tokens"},{key:"md",label:"文档"},{key:"video",label:"视频"},{key:"audio",label:"音频"},{key:"pdf",label:"PDF"},{key:"font",label:"字体"}];function N(){const n=x(),o=n.params,l=o.get("asset"),c=o.get("type"),a=o.get("folder");d();const r=h("design:/__design/assets",()=>fetch("/__design/assets",{cache:"no-store"}).then(t=>t.json()),{subscribe:"files"}),i=m.useMemo(()=>{const t=r.data;return t?k.map(u=>({...u,items:(t[u.key]??[]).filter(p=>!a||p.path.startsWith(a))})).filter(u=>u.items.length>0):[]},[r.data,a]),e=t=>n.navigate({type:t.type,asset:t.path});return s.jsxs("div",{children:[s.jsx("div",{className:"p-3 text-xs text-muted-foreground truncate",children:"设计资产"}),i.map(t=>s.jsx(g,{group:t,current:l&&c===t.key?l:null,onSelect:e},t.key))]})}function g({group:n,current:o,onSelect:l}){const[c,a]=m.useState(!0),{icon:r}=d(),i=b[n.key];return s.jsxs("div",{className:"mb-1.5 px-1",children:[s.jsxs("button",{onClick:()=>a(e=>!e),className:"w-full flex items-center gap-1.5 pt-2 pb-1 text-sm font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground rounded-md",children:[r("chevron-right",`h-3 w-3 shrink-0 transition-transform ${c?"rotate-90":""}`),i&&r(i,"h-3.5 w-3.5 shrink-0"),s.jsx("span",{className:"truncate",children:n.label}),s.jsx("span",{className:"ml-auto shrink-0 rounded-full bg-muted px-1.5 font-mono text-xs font-normal",children:n.items.length})]}),c&&n.items.map(e=>s.jsxs("button",{onClick:()=>l(e),className:`w-full text-left flex items-center gap-2 px-2.5 py-1.5 text-xs hover:bg-muted rounded-md ${o===e.path?"bg-primary/10 text-foreground font-medium":"text-muted-foreground"}`,children:[s.jsx(f,{name:e.name,active:o===e.path}),s.jsx("span",{className:"truncate",children:e.name}),e.ext&&s.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground/60",children:e.ext})]},e.path))]})}export{N as default};
@@ -1 +1 @@
1
- import{j as t,e as g,u as b,a as p,b as j,f as v,P as N}from"./index-BAFFLjYP.js";import{u}from"./usePluginData-DEpAv1Yl.js";import{m as n}from"./web-S85uEYzf.js";import"./client-Cw4K1Nx3.js";function y({value:o,className:l}){const r=Math.max(0,Math.min(100,o));return t.jsx("div",{className:g("rounded-[var(--radius-full)] bg-muted overflow-hidden",l),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuetext":`${r}%`,children:t.jsx("div",{className:"h-full rounded-[var(--radius-full)] bg-primary transition-all",style:{width:`${r}%`}})})}function P(o){var d,c;const{icon:l}=b(),r=p(n.mode,"h-5 w-5"),m=j(),a=u("stats:/__stats/data",()=>fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()),{subscribe:"files"}),i=u("stats:/__detect",()=>fetch("/__detect",{cache:"no-store"}).then(e=>e.json()));if(a.error)return t.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:t.jsxs("p",{children:["加载失败: ",a.error]})});if(!a.data)return t.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:t.jsx("p",{children:"加载中…"})});const s=a.data,x=Math.max(...s.byExt.map(e=>e.count),1),f=[{label:"文件",value:String(s.files),iconName:"file-text",drill:null},{label:"目录",value:String(s.dirs),iconName:"folder-tree",drill:null},{label:"总大小",value:v(s.totalSize),iconName:null,drill:null},{label:"Worktree",value:String(s.worktrees),iconName:"git-branch",drill:"worktree"},{label:"未提交",value:String(s.dirty??0),iconName:null,drill:"dirty"}],h=e=>m.navigate({p:"view",card:e});return t.jsx(N,{manifest:n,icon:r,breadcrumb:["插件",n.mode],children:t.jsxs("div",{className:"mx-auto h-full max-w-6xl overflow-auto rounded-lg border bg-background p-6 shadow-sm",children:[t.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"后端 fs 扫描 + 前端渲染 · 改文件即时刷新 · 点击卡片跳转"}),t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-6",children:f.map(e=>t.jsxs("button",{type:"button",onClick:()=>e.drill&&h(e.drill),disabled:!e.drill,title:e.drill?`点击跳转至 ${e.label}`:void 0,className:`rounded-lg border bg-background p-4 text-left transition-colors ${e.drill?"hover:bg-muted/70 cursor-pointer":"cursor-default opacity-80"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xl font-bold",children:e.value}),e.iconName&&l(e.iconName,"h-4 w-4 text-muted-foreground/50")]}),t.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:e.label})]},e.label))}),t.jsx("h2",{className:"text-xs font-medium text-muted-foreground mb-3",children:"文件类型 Top 10"}),t.jsx("div",{className:"space-y-2",children:s.byExt.map(e=>t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsx("span",{className:"w-16 font-mono text-foreground truncate",children:e.ext}),t.jsx(y,{value:parseFloat((e.count/x*100).toFixed(1)),className:"flex-1 h-2"}),t.jsx("span",{className:"w-8 text-right font-mono text-muted-foreground",children:e.count})]},e.ext))}),t.jsxs("div",{className:"mt-5 flex items-center gap-2 text-xs",children:[t.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${(d=i.data)!=null&&d.hasJust?"text-success border-success/30 bg-success/10":"text-muted-foreground border-border"}`,children:["justfile ",(c=i.data)!=null&&c.hasJust?"✓":"✗"]}),typeof s.dirty=="number"&&t.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${s.dirty?"text-warning border-warning/30 bg-warning/10":"text-success border-success/30 bg-success/10"}`,children:s.dirty?`${s.dirty} 未提交`:"clean"}),t.jsxs("span",{className:"text-muted-foreground",children:["root: ",s.root]})]})]})})}export{P as default};
1
+ import{j as t,e as g,u as b,a as p,b as j,f as v,P as N}from"./index-veTBv7Qv.js";import{u}from"./usePluginData-mjHueOjf.js";import{m as n}from"./web-DIZjnUb4.js";import"./client-Cw4K1Nx3.js";function y({value:o,className:l}){const r=Math.max(0,Math.min(100,o));return t.jsx("div",{className:g("rounded-[var(--radius-full)] bg-muted overflow-hidden",l),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuetext":`${r}%`,children:t.jsx("div",{className:"h-full rounded-[var(--radius-full)] bg-primary transition-all",style:{width:`${r}%`}})})}function P(o){var d,c;const{icon:l}=b(),r=p(n.mode,"h-5 w-5"),m=j(),a=u("stats:/__stats/data",()=>fetch("/__stats/data",{cache:"no-store"}).then(e=>e.json()),{subscribe:"files"}),i=u("stats:/__detect",()=>fetch("/__detect",{cache:"no-store"}).then(e=>e.json()));if(a.error)return t.jsx("div",{className:"flex h-full items-center justify-center text-destructive",children:t.jsxs("p",{children:["加载失败: ",a.error]})});if(!a.data)return t.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:t.jsx("p",{children:"加载中…"})});const s=a.data,x=Math.max(...s.byExt.map(e=>e.count),1),f=[{label:"文件",value:String(s.files),iconName:"file-text",drill:null},{label:"目录",value:String(s.dirs),iconName:"folder-tree",drill:null},{label:"总大小",value:v(s.totalSize),iconName:null,drill:null},{label:"Worktree",value:String(s.worktrees),iconName:"git-branch",drill:"worktree"},{label:"未提交",value:String(s.dirty??0),iconName:null,drill:"dirty"}],h=e=>m.navigate({p:"view",card:e});return t.jsx(N,{manifest:n,icon:r,breadcrumb:["插件",n.mode],children:t.jsxs("div",{className:"mx-auto h-full max-w-6xl overflow-auto rounded-lg border bg-background p-6 shadow-sm",children:[t.jsx("p",{className:"text-xs text-muted-foreground mb-5",children:"后端 fs 扫描 + 前端渲染 · 改文件即时刷新 · 点击卡片跳转"}),t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 mb-6",children:f.map(e=>t.jsxs("button",{type:"button",onClick:()=>e.drill&&h(e.drill),disabled:!e.drill,title:e.drill?`点击跳转至 ${e.label}`:void 0,className:`rounded-lg border bg-background p-4 text-left transition-colors ${e.drill?"hover:bg-muted/70 cursor-pointer":"cursor-default opacity-80"}`,children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xl font-bold",children:e.value}),e.iconName&&l(e.iconName,"h-4 w-4 text-muted-foreground/50")]}),t.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:e.label})]},e.label))}),t.jsx("h2",{className:"text-xs font-medium text-muted-foreground mb-3",children:"文件类型 Top 10"}),t.jsx("div",{className:"space-y-2",children:s.byExt.map(e=>t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsx("span",{className:"w-16 font-mono text-foreground truncate",children:e.ext}),t.jsx(y,{value:parseFloat((e.count/x*100).toFixed(1)),className:"flex-1 h-2"}),t.jsx("span",{className:"w-8 text-right font-mono text-muted-foreground",children:e.count})]},e.ext))}),t.jsxs("div",{className:"mt-5 flex items-center gap-2 text-xs",children:[t.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${(d=i.data)!=null&&d.hasJust?"text-success border-success/30 bg-success/10":"text-muted-foreground border-border"}`,children:["justfile ",(c=i.data)!=null&&c.hasJust?"✓":"✗"]}),typeof s.dirty=="number"&&t.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded border ${s.dirty?"text-warning border-warning/30 bg-warning/10":"text-success border-success/30 bg-success/10"}`,children:s.dirty?`${s.dirty} 未提交`:"clean"}),t.jsxs("span",{className:"text-muted-foreground",children:["root: ",s.root]})]})]})})}export{P as default};
@@ -1 +1 @@
1
- import{u as g,j as e,r as f,a as w,P as j,E as y}from"./index-BAFFLjYP.js";import{C as p,M as I,I as k}from"./CodeViewer-BrquqtDE.js";import{m as b}from"./web-CE86ahqk.js";import"./client-Cw4K1Nx3.js";function N({path:s}){const{icon:o}=g();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[o("file-question","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:s})]})})}function S({containerRef:s}){const{icon:o}=g(),[r,n]=f.useState([]),[h,x]=f.useState(null);f.useEffect(()=>{const t=s.current;if(!t)return;let i=!1;const l=()=>{if(i)return;const d=t.querySelectorAll("h1[id], h2[id], h3[id]"),u=[];d.forEach(a=>{var v;u.push({id:a.id,text:((v=a.textContent)==null?void 0:v.trim())??"",level:parseInt(a.tagName[1],10)})}),n(u)};l();const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{i=!0,c.disconnect()}},[s]),f.useEffect(()=>{const t=s.current;if(!t||!r.length)return;const i=new IntersectionObserver(l=>{const c=l.filter(d=>d.isIntersecting);if(c.length){const d=c.reduce((u,a)=>u.boundingClientRect.top<a.boundingClientRect.top?u:a);x(d.target.id)}},{root:t,rootMargin:"-60px 0px -70% 0px",threshold:0});return r.forEach(({id:l})=>{const c=t.querySelector(`#${CSS.escape(l)}`);c&&i.observe(c)}),()=>i.disconnect()},[r,s]);const m=t=>{var l;const i=(l=s.current)==null?void 0:l.querySelector(`#${CSS.escape(t)}`);i==null||i.scrollIntoView({behavior:"smooth",block:"start"})};return r.length?e.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[e.jsxs("div",{className:"flex items-center gap-1 mb-2 text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[o("file-text","h-3 w-3"),e.jsx("span",{children:"大纲"})]}),e.jsx("ul",{className:"space-y-0.5",children:r.map(t=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>m(t.id),className:`w-full text-left text-sm leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${h===t.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(t.level-1)*10},children:t.text||t.id})},t.id))})]}):null}function C(s){const o=s.slice(s.lastIndexOf("/")+1).toLowerCase();if(o==="justfile"||o==="makefile")return p;const r=o.lastIndexOf("."),n=r>=0?o.slice(r):"";return n===".md"||n===".markdown"?I:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(n)?k:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(n)?p:r===-1?p:N}function O({params:s}){const{icon:o}=g(),r=w(b.mode,"h-5 w-5"),n=s.get("file"),h=s.get("wt"),x=f.useRef(null),m=n?C(n):null;return e.jsx(j,{manifest:b,icon:r,breadcrumb:["插件",h??"当前分支",...n?[n]:[]],children:e.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:n&&m?e.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[e.jsx("div",{ref:x,className:"flex-1 min-h-0 overflow-auto",children:e.jsx(m,{path:n})}),e.jsx(S,{containerRef:x})]}):e.jsx(y,{icon:o("eye","h-6 w-6"),title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式"})})})}export{O as default};
1
+ import{u as g,j as e,r as f,a as w,P as j,E as y}from"./index-veTBv7Qv.js";import{C as p,M as I,I as k}from"./CodeViewer-yUtAi1hT.js";import{m as b}from"./web-CsCyTuDw.js";import"./client-Cw4K1Nx3.js";function N({path:s}){const{icon:o}=g();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[o("file-question","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:s})]})})}function S({containerRef:s}){const{icon:o}=g(),[r,n]=f.useState([]),[h,x]=f.useState(null);f.useEffect(()=>{const t=s.current;if(!t)return;let i=!1;const l=()=>{if(i)return;const d=t.querySelectorAll("h1[id], h2[id], h3[id]"),u=[];d.forEach(a=>{var v;u.push({id:a.id,text:((v=a.textContent)==null?void 0:v.trim())??"",level:parseInt(a.tagName[1],10)})}),n(u)};l();const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{i=!0,c.disconnect()}},[s]),f.useEffect(()=>{const t=s.current;if(!t||!r.length)return;const i=new IntersectionObserver(l=>{const c=l.filter(d=>d.isIntersecting);if(c.length){const d=c.reduce((u,a)=>u.boundingClientRect.top<a.boundingClientRect.top?u:a);x(d.target.id)}},{root:t,rootMargin:"-60px 0px -70% 0px",threshold:0});return r.forEach(({id:l})=>{const c=t.querySelector(`#${CSS.escape(l)}`);c&&i.observe(c)}),()=>i.disconnect()},[r,s]);const m=t=>{var l;const i=(l=s.current)==null?void 0:l.querySelector(`#${CSS.escape(t)}`);i==null||i.scrollIntoView({behavior:"smooth",block:"start"})};return r.length?e.jsxs("nav",{className:"hidden md:flex w-44 shrink-0 flex-col border-l pl-3 py-2 overflow-y-auto","aria-label":"文档大纲",children:[e.jsxs("div",{className:"flex items-center gap-1 mb-2 text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[o("file-text","h-3 w-3"),e.jsx("span",{children:"大纲"})]}),e.jsx("ul",{className:"space-y-0.5",children:r.map(t=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>m(t.id),className:`w-full text-left text-sm leading-snug py-0.5 px-1.5 rounded truncate transition-colors ${h===t.id?"bg-primary/10 text-foreground font-medium":"text-muted-foreground hover:bg-muted/70"}`,style:{paddingLeft:6+(t.level-1)*10},children:t.text||t.id})},t.id))})]}):null}function C(s){const o=s.slice(s.lastIndexOf("/")+1).toLowerCase();if(o==="justfile"||o==="makefile")return p;const r=o.lastIndexOf("."),n=r>=0?o.slice(r):"";return n===".md"||n===".markdown"?I:[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"].includes(n)?k:[".sql",".txt",".csv",".tsv",".json",".yaml",".yml",".xml",".py",".js",".ts",".java",".go",".rs",".rb",".php",".c",".cpp",".h",".cs",".swift",".kt",".scala",".sh",".bash",".zsh",".fish",".env",".gitignore",".dockerfile"].includes(n)?p:r===-1?p:N}function O({params:s}){const{icon:o}=g(),r=w(b.mode,"h-5 w-5"),n=s.get("file"),h=s.get("wt"),x=f.useRef(null),m=n?C(n):null;return e.jsx(j,{manifest:b,icon:r,breadcrumb:["插件",h??"当前分支",...n?[n]:[]],children:e.jsx("div",{className:"mx-auto h-full max-w-5xl bg-background border rounded-lg shadow-sm overflow-hidden flex flex-col",children:n&&m?e.jsxs("div",{className:"flex-1 min-h-0 flex overflow-hidden",children:[e.jsx("div",{ref:x,className:"flex-1 min-h-0 overflow-auto",children:e.jsx(m,{path:n})}),e.jsx(S,{containerRef:x})]}):e.jsx(y,{icon:o("eye","h-6 w-6"),title:"从左侧选择文件预览",hint:"支持 Markdown、图片、代码等格式"})})})}export{O as default};
@@ -1 +1 @@
1
- import{j as e,r as u,u as j,a as _,b as I,P as R,E as F}from"./index-BAFFLjYP.js";import{F as S}from"./FilterPills-DwCH0Z96.js";import{C as U,M as L,I as E}from"./CodeViewer-BrquqtDE.js";import{m as v}from"./web-BP-QGcd3.js";import"./client-Cw4K1Nx3.js";function $({path:t}){return e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"预览",className:"w-full h-full border-0 bg-white"})}const k=/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i,y=/font|family|type/i;function A({path:t}){const[m,d]=u.useState([]),[i,a]=u.useState(!0);return u.useEffect(()=>{let s=!1;return a(!0),d([]),fetch("/__design/asset?path="+encodeURIComponent(t),{cache:"no-store"}).then(o=>o.text()).then(o=>{if(s)return;const c=o.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){d([]),a(!1);return}const r=l=>{const N=l.indexOf(":"),V=l.slice(0,N).trim(),C=l.slice(N+1).trim();return{name:V,value:C}},n=l=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(l),p=l=>y.test(l),x=c.map(r),f=x.filter(l=>n(l.value)),g=x.filter(l=>!n(l.value)&&p(l.name)),b=x.filter(l=>!n(l.value)&&!p(l.name)),h=[];f.length&&h.push({label:`配色 · ${f.length}`,items:f}),g.length&&h.push({label:`字体 · ${g.length}`,items:g}),b.length&&h.push({label:`其他 · ${b.length}`,items:b}),d(h),a(!1)}).catch(()=>{s||(d([]),a(!1))}),()=>{s=!0}},[t]),i?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):m.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:m.map(s=>{const o=s.items.some(r=>k.test(r.value)),c=s.items.some(r=>y.test(r.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-sm font-semibold uppercase text-muted-foreground",children:s.label}),o?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.filter(r=>k.test(r.value)).map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[var(--design-preview-h)] border-b",style:{background:n}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-sm break-all",children:r}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:n})]},r))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[var(--design-preview-h)] place-items-center text-2xl",style:{fontFamily:n},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-sm",children:r})]},r))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx("span",{className:"text-muted-foreground",children:n})]},r))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}const w=t=>"/__design/asset?path="+encodeURIComponent(t);function O({path:t}){return e.jsx(L,{path:t,resolve:w})}function M({path:t}){return e.jsx(E,{path:t,resolve:w})}function P({path:t}){return e.jsx(U,{path:t,resolve:w})}function W({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function z({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"w-full max-w-2xl"})})}function T({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function D({path:t}){const[m,d]=u.useState("");return u.useEffect(()=>{let i=!1,a="",s=null;return fetch("/__design/asset?path="+encodeURIComponent(t)).then(o=>o.blob()).then(async o=>{var c;if(!i){if(a=URL.createObjectURL(o),s=new FontFace("zd-font-preview",`url(${a})`),await s.load(),i){(c=s.dispose)==null||c.call(s);return}document.fonts.add(s),d(t.split("/").pop()??t)}}).catch(()=>{i||d(t.split("/").pop()??t)}),()=>{var o;if(i=!0,s)try{document.fonts.delete(s),(o=s.dispose)==null||o.call(s)}catch{}a&&URL.revokeObjectURL(a)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:m?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function H({path:t}){const{icon:m}=j();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[m("image-off","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const K={page:$,icon:M,token:A,md:O,video:W,audio:z,pdf:T,component:P,font:D};function Z(t){return K[t]??H}function q({mode:t,onMode:m,w:d,h:i,onW:a,onH:s}){const{icon:o}=j(),c=[{v:0,icon:o("monitor","h-3.5 w-3.5"),label:"桌面"},{v:768,icon:o("tablet","h-3.5 w-3.5"),label:"768"},{v:375,icon:o("smartphone","h-3.5 w-3.5"),label:"375"},{v:"custom",icon:o("sliders-horizontal","h-3.5 w-3.5"),label:"自定义"}],r="w-[var(--design-input-w)] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(S,{items:c.map(n=>({key:String(n.v),label:n.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[n.icon,e.jsx("span",{className:"hidden sm:inline",children:n.label})]})})),value:String(t),onChange:n=>m(n==="0"?0:n==="custom"?"custom":Number(n)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:d,min:280,max:3e3,step:8,onChange:n=>a(Number(n.target.value)),"aria-label":"自定义宽度",className:r}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:i,min:400,max:3e3,step:8,onChange:n=>s(Number(n.target.value)),"aria-label":"自定义高度",className:r}),e.jsx("span",{className:"text-sm text-muted-foreground/70",children:"px"})]})]})}function Y({params:t}){const{icon:m}=j(),d=_(v.mode,"h-5 w-5");I();const i=t.get("type")??"",a=t.get("asset"),[s,o]=u.useState(0),[c,r]=u.useState(1024),[n,p]=u.useState(768),x=a?Z(i):null,f=s===0?"桌面":s==="custom"?`${c} × ${n}`:`${s}px`;return e.jsx(R,{manifest:v,icon:d,breadcrumb:["插件",v.mode,...i?[i]:[],...a?[a]:[]],children:e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:a&&x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[var(--design-toolbar-h)] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:a}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:f}),e.jsx(q,{mode:s,onMode:o,w:c,h:n,onW:r,onH:p})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:i==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:s===0?void 0:s==="custom"?c:s,height:s==="custom"?n:"100%"},children:e.jsx(x,{path:a})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(x,{path:a})})})]}):e.jsx(F,{icon:m("palette","h-6 w-6"),title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新"})})})}export{Y as default};
1
+ import{j as e,r as u,u as j,a as _,b as I,P as R,E as F}from"./index-veTBv7Qv.js";import{F as S}from"./FilterPills-BD2vsIx2.js";import{C as U,M as L,I as E}from"./CodeViewer-yUtAi1hT.js";import{m as v}from"./web-BODcUPmi.js";import"./client-Cw4K1Nx3.js";function $({path:t}){return e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"预览",className:"w-full h-full border-0 bg-white"})}const k=/^(#|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i,y=/font|family|type/i;function A({path:t}){const[m,d]=u.useState([]),[i,a]=u.useState(!0);return u.useEffect(()=>{let s=!1;return a(!0),d([]),fetch("/__design/asset?path="+encodeURIComponent(t),{cache:"no-store"}).then(o=>o.text()).then(o=>{if(s)return;const c=o.match(/--[A-Za-z0-9_-]+\s*:\s*[^;}\n]+/g)??[];if(!c.length){d([]),a(!1);return}const r=l=>{const N=l.indexOf(":"),V=l.slice(0,N).trim(),C=l.slice(N+1).trim();return{name:V,value:C}},n=l=>/^(#([0-9a-fA-F]{3,8})\b|rgb|rgba|hsl|hsla|oklch|oklab|color\()/i.test(l),p=l=>y.test(l),x=c.map(r),f=x.filter(l=>n(l.value)),g=x.filter(l=>!n(l.value)&&p(l.name)),b=x.filter(l=>!n(l.value)&&!p(l.name)),h=[];f.length&&h.push({label:`配色 · ${f.length}`,items:f}),g.length&&h.push({label:`字体 · ${g.length}`,items:g}),b.length&&h.push({label:`其他 · ${b.length}`,items:b}),d(h),a(!1)}).catch(()=>{s||(d([]),a(!1))}),()=>{s=!0}},[t]),i?e.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"解析中…"}):m.length?e.jsx("div",{className:"p-8 flex flex-col gap-7",children:m.map(s=>{const o=s.items.some(r=>k.test(r.value)),c=s.items.some(r=>y.test(r.name));return e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 text-sm font-semibold uppercase text-muted-foreground",children:s.label}),o?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.filter(r=>k.test(r.value)).map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"h-[var(--design-preview-h)] border-b",style:{background:n}}),e.jsx("div",{className:"px-2.5 pt-2 font-mono text-sm break-all",children:r}),e.jsx("div",{className:"px-2.5 pb-2 text-xs text-muted-foreground",children:n})]},r))}):c?e.jsx("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(var(--token-card-min-w), 1fr))"},children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-background",children:[e.jsx("div",{className:"grid h-[var(--design-preview-h)] place-items-center text-2xl",style:{fontFamily:n},children:"Aa"}),e.jsx("div",{className:"px-2.5 font-mono text-sm",children:r})]},r))}):e.jsx("div",{className:"flex flex-col gap-1",children:s.items.map(({name:r,value:n})=>e.jsxs("div",{className:"flex justify-between gap-3 px-2.5 py-1.5 rounded border bg-background text-xs",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx("span",{className:"text-muted-foreground",children:n})]},r))})]},s.label)})}):e.jsx("p",{className:"p-3 text-xs",children:"未发现 CSS 变量"})}const w=t=>"/__design/asset?path="+encodeURIComponent(t);function O({path:t}){return e.jsx(L,{path:t,resolve:w})}function M({path:t}){return e.jsx(E,{path:t,resolve:w})}function P({path:t}){return e.jsx(U,{path:t,resolve:w})}function W({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("video",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"max-w-full max-h-[80vh] rounded border"})})}function z({path:t}){return e.jsx("div",{className:"grid place-items-center p-8",children:e.jsx("audio",{src:"/__design/asset?path="+encodeURIComponent(t),controls:!0,className:"w-full max-w-2xl"})})}function T({path:t}){return e.jsx("div",{className:"grid place-items-center p-8 h-full",children:e.jsx("iframe",{src:"/__design/asset?path="+encodeURIComponent(t),title:"PDF",className:"w-full h-full max-h-[80vh] rounded border bg-white"})})}function D({path:t}){const[m,d]=u.useState("");return u.useEffect(()=>{let i=!1,a="",s=null;return fetch("/__design/asset?path="+encodeURIComponent(t)).then(o=>o.blob()).then(async o=>{var c;if(!i){if(a=URL.createObjectURL(o),s=new FontFace("zd-font-preview",`url(${a})`),await s.load(),i){(c=s.dispose)==null||c.call(s);return}document.fonts.add(s),d(t.split("/").pop()??t)}}).catch(()=>{i||d(t.split("/").pop()??t)}),()=>{var o;if(i=!0,s)try{document.fonts.delete(s),(o=s.dispose)==null||o.call(s)}catch{}a&&URL.revokeObjectURL(a)}},[t]),e.jsxs("div",{className:"h-full overflow-auto p-8 grid gap-6 place-content-center text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:t}),e.jsx("div",{className:"text-5xl",style:{fontFamily:m?"'zd-font-preview', serif":"serif"},children:"Aa 字体预览 0123"})]})}function H({path:t}){const{icon:m}=j();return e.jsx("div",{className:"grid place-items-center h-full text-center text-muted-foreground",children:e.jsxs("div",{children:[m("image-off","h-10 w-10 mx-auto mb-3 opacity-50"),e.jsx("p",{children:"该格式无法预览"}),e.jsx("p",{className:"mt-1 font-mono text-xs break-all",children:t})]})})}const K={page:$,icon:M,token:A,md:O,video:W,audio:z,pdf:T,component:P,font:D};function Z(t){return K[t]??H}function q({mode:t,onMode:m,w:d,h:i,onW:a,onH:s}){const{icon:o}=j(),c=[{v:0,icon:o("monitor","h-3.5 w-3.5"),label:"桌面"},{v:768,icon:o("tablet","h-3.5 w-3.5"),label:"768"},{v:375,icon:o("smartphone","h-3.5 w-3.5"),label:"375"},{v:"custom",icon:o("sliders-horizontal","h-3.5 w-3.5"),label:"自定义"}],r="w-[var(--design-input-w)] h-7 px-1 text-center text-xs rounded border border-border bg-background text-foreground [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none focus:outline-none focus:border-primary";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-md border border-border p-0.5 bg-muted",children:e.jsx(S,{items:c.map(n=>({key:String(n.v),label:n.label,renderLabel:()=>e.jsxs(e.Fragment,{children:[n.icon,e.jsx("span",{className:"hidden sm:inline",children:n.label})]})})),value:String(t),onChange:n=>m(n==="0"?0:n==="custom"?"custom":Number(n)),ariaLabel:"视口模式"})}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx("input",{type:"number",value:d,min:280,max:3e3,step:8,onChange:n=>a(Number(n.target.value)),"aria-label":"自定义宽度",className:r}),e.jsx("span",{className:"text-muted-foreground/70",children:"×"}),e.jsx("input",{type:"number",value:i,min:400,max:3e3,step:8,onChange:n=>s(Number(n.target.value)),"aria-label":"自定义高度",className:r}),e.jsx("span",{className:"text-sm text-muted-foreground/70",children:"px"})]})]})}function Y({params:t}){const{icon:m}=j(),d=_(v.mode,"h-5 w-5");I();const i=t.get("type")??"",a=t.get("asset"),[s,o]=u.useState(0),[c,r]=u.useState(1024),[n,p]=u.useState(768),x=a?Z(i):null,f=s===0?"桌面":s==="custom"?`${c} × ${n}`:`${s}px`;return e.jsx(R,{manifest:v,icon:d,breadcrumb:["插件",v.mode,...i?[i]:[],...a?[a]:[]],children:e.jsx("div",{className:"mx-auto h-full flex flex-col bg-background border rounded-lg shadow-sm overflow-hidden",children:a&&x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[var(--design-toolbar-h)] flex-none flex items-center justify-between px-3.5 border-b bg-background text-xs",children:[e.jsx("span",{className:"font-mono truncate",children:a}),e.jsx("span",{className:"text-muted-foreground ml-3 flex-none",children:f}),e.jsx(q,{mode:s,onMode:o,w:c,h:n,onW:r,onH:p})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:i==="page"?e.jsx("div",{className:"mx-auto bg-background overflow-hidden",style:{maxWidth:s===0?void 0:s==="custom"?c:s,height:s==="custom"?n:"100%"},children:e.jsx(x,{path:a})}):e.jsx("div",{className:"mx-auto max-w-5xl h-full overflow-auto",children:e.jsx(x,{path:a})})})]}):e.jsx(F,{icon:m("palette","h-6 w-6"),title:"从左侧选择一个资产预览",hint:"点左侧折叠钮展开资产树 · 改文件即时刷新"})})})}export{Y as default};
@@ -1,4 +1,4 @@
1
- import{r as z,c as R,u as Fe,j as _,B as S,d as be,a as ve,b as ye,P as Ce}from"./index-BAFFLjYP.js";import{F as Ee}from"./FilterPills-DwCH0Z96.js";import{u as Ae}from"./usePluginData-DEpAv1Yl.js";import{m as Y}from"./web-D0z_1kb8.js";import"./client-Cw4K1Nx3.js";function d(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function L(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function je(t,e){const s=d(t);return isNaN(e)?L(t,NaN):(e&&s.setDate(s.getDate()+e),s)}function ze(t,e){const s=d(t);if(isNaN(e))return L(t,NaN);if(!e)return s;const n=s.getDate(),r=L(t,s.getTime());r.setMonth(s.getMonth()+e+1,0);const u=r.getDate();return n>=u?r:(s.setFullYear(r.getFullYear(),r.getMonth(),n),s)}function I(t,e){const{years:s=0,months:n=0,weeks:r=0,days:u=0,hours:o=0,minutes:c=0,seconds:l=0}=e,i=d(t),g=n||s?ze(i,n+s*12):i,a=u||r?je(g,u+r*7):g,D=c+o*60,x=(l+D*60)*1e3;return L(t,a.getTime()+x)}const we=864e5,ke=6e4,Ne=36e5;function se(t){const e=d(t);return e.setHours(0,0,0,0),e}function ne(t){const e=d(t),s=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return s.setUTCFullYear(e.getFullYear()),+t-+s}function Re(t,e){const s=se(t),n=se(e),r=+s-ne(s),u=+n-ne(n);return Math.round((r-u)/we)}function $(t,e){const s=d(t),n=d(e),r=s.getTime()-n.getTime();return r<0?-1:r>0?1:r}function Oe(t,e){const s=d(t),n=d(e),r=s.getFullYear()-n.getFullYear(),u=s.getMonth()-n.getMonth();return r*12+u}function Me(t,e){const s=d(t),n=d(e);return s.getFullYear()-n.getFullYear()}function Se(t,e){const s=d(t),n=d(e),r=re(s,n),u=Math.abs(Re(s,n));s.setDate(s.getDate()-r*u);const o=+(re(s,n)===-r),c=r*(u-o);return c===0?0:c}function re(t,e){const s=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return s<0?-1:s>0?1:s}function K(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function Q(t,e){return+d(t)-+d(e)}function Ie(t,e,s){const n=Q(t,e)/Ne;return K(s==null?void 0:s.roundingMethod)(n)}function $e(t,e,s){const n=Q(t,e)/ke;return K(s==null?void 0:s.roundingMethod)(n)}function Le(t){const e=d(t);return e.setHours(23,59,59,999),e}function Te(t){const e=d(t),s=e.getMonth();return e.setFullYear(e.getFullYear(),s+1,0),e.setHours(23,59,59,999),e}function Be(t){const e=d(t);return+Le(e)==+Te(e)}function Pe(t,e){const s=d(t),n=d(e),r=$(s,n),u=Math.abs(Oe(s,n));let o;if(u<1)o=0;else{s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-r*u);let c=$(s,n)===-r;Be(d(t))&&u===1&&$(t,n)===1&&(c=!1),o=r*(u-Number(c))}return o===0?0:o}function Ze(t,e,s){const n=Q(t,e)/1e3;return K(s==null?void 0:s.roundingMethod)(n)}function qe(t,e){const s=d(t),n=d(e),r=$(s,n),u=Math.abs(Me(s,n));s.setFullYear(1584),n.setFullYear(1584);const o=$(s,n)===-r,c=r*(u-+o);return c===0?0:c}function Ye(t){const e=d(t.start),s=d(t.end),n={},r=qe(s,e);r&&(n.years=r);const u=I(e,{years:n.years}),o=Pe(s,u);o&&(n.months=o);const c=I(u,{months:n.months}),l=Se(s,c);l&&(n.days=l);const i=I(c,{days:n.days}),g=Ie(s,i);g&&(n.hours=g);const a=I(i,{hours:n.hours}),D=$e(s,a);D&&(n.minutes=D);const F=I(a,{minutes:n.minutes}),x=Ze(s,F);return x&&(n.seconds=x),n}var ge={};const k=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],He=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class O{static escapeForHtml(e){return new O().escapeForHtml(e)}static linkify(e){return new O().linkify(e)}static ansiToHtml(e,s){return new O().ansiToHtml(e,s)}static ansiToJson(e,s){return new O().ansiToJson(e,s)}static ansiToText(e){return new O().ansiToText(e)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let r=0;r<2;++r)for(let u=0;u<8;++u)this.PALETTE_COLORS.push(k[r][u].color);let e=[0,95,135,175,215,255],s=(r,u,o)=>e[r]+", "+e[u]+", "+e[o];for(let r=0;r<6;++r)for(let u=0;u<6;++u)for(let o=0;o<6;++o)this.PALETTE_COLORS.push(s(r,u,o));let n=8;for(let r=0;r<24;++r,n+=10)this.PALETTE_COLORS.push(n+", "+n+", "+n)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,s=>s=="&"?"&amp;":s=='"'?"&quot;":s=="<"?"&lt;":s==">"?"&gt;":"")}linkify(e){return e.replace(He,s=>`<a href="${s}">${s}</a>`)}ansiToHtml(e,s){return this.process(e,s,!0)}ansiToJson(e,s){return s=s||{},s.json=!0,s.clearLine=!1,this.process(e,s,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,s,n){let r=this,u=e.split(/\033\[/),o=u.shift();s==null&&(s={}),s.clearLine=/\r/.test(e);let c=u.map(l=>this.processChunk(l,s,n));if(s&&s.json){let l=r.processChunkJson("");return l.content=o,l.clearLine=s.clearLine,c.unshift(l),s.remove_empty&&(c=c.filter(i=>!i.isEmpty())),c}else c.unshift(o);return c.join("")}processChunkJson(e,s,n){s=typeof s>"u"?{}:s;let r=s.use_classes=typeof s.use_classes<"u"&&s.use_classes,u=s.key=r?"class":"color",o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:s.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!o.content},c=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!c)return o;o.content=c[4];let l=c[2].split(";");if(c[1]!==""||c[3]!=="m"||!n)return o;let i=this;for(;l.length>0;){let g=l.shift(),a=parseInt(g);if(isNaN(a)||a===0)i.fg=i.bg=null,i.decorations=[];else if(a===1)i.decorations.push("bold");else if(a===2)i.decorations.push("dim");else if(a===3)i.decorations.push("italic");else if(a===4)i.decorations.push("underline");else if(a===5)i.decorations.push("blink");else if(a===7)i.decorations.push("reverse");else if(a===8)i.decorations.push("hidden");else if(a===9)i.decorations.push("strikethrough");else if(a===21)i.removeDecoration("bold");else if(a===22)i.removeDecoration("bold"),i.removeDecoration("dim");else if(a===23)i.removeDecoration("italic");else if(a===24)i.removeDecoration("underline");else if(a===25)i.removeDecoration("blink");else if(a===27)i.removeDecoration("reverse");else if(a===28)i.removeDecoration("hidden");else if(a===29)i.removeDecoration("strikethrough");else if(a===39)i.fg=null;else if(a===49)i.bg=null;else if(a>=30&&a<38)i.fg=k[0][a%10][u];else if(a>=90&&a<98)i.fg=k[1][a%10][u];else if(a>=40&&a<48)i.bg=k[0][a%10][u];else if(a>=100&&a<108)i.bg=k[1][a%10][u];else if(a===38||a===48){let D=a===38;if(l.length>=1){let F=l.shift();if(F==="5"&&l.length>=1){let x=parseInt(l.shift());if(x>=0&&x<=255)if(!r)this.PALETTE_COLORS||i.setupPalette(),D?i.fg=this.PALETTE_COLORS[x]:i.bg=this.PALETTE_COLORS[x];else{let y=x>=16?"ansi-palette-"+x:k[x>7?1:0][x%8].class;D?i.fg=y:i.bg=y}}else if(F==="2"&&l.length>=3){let x=parseInt(l.shift()),y=parseInt(l.shift()),j=parseInt(l.shift());if(x>=0&&x<=255&&y>=0&&y<=255&&j>=0&&j<=255){let C=x+", "+y+", "+j;r?D?(i.fg="ansi-truecolor",i.fg_truecolor=C):(i.bg="ansi-truecolor",i.bg_truecolor=C):D?i.fg=C:i.bg=C}}}}}return i.fg===null&&i.bg===null&&i.decorations.length===0||(o.fg=i.fg,o.bg=i.bg,o.fg_truecolor=i.fg_truecolor,o.bg_truecolor=i.bg_truecolor,o.decorations=i.decorations,o.decoration=i.decorations.slice(-1).pop()||null,o.was_processed=!0),o}processChunk(e,s,n){s=s||{};let r=this.processChunkJson(e,s,n),u=s.use_classes;if(r.decorations=r.decorations.filter(a=>{if(a==="reverse"){r.fg||(r.fg=k[0][7][u?"class":"color"]),r.bg||(r.bg=k[0][0][u?"class":"color"]);let D=r.fg;r.fg=r.bg,r.bg=D;let F=r.fg_truecolor;return r.fg_truecolor=r.bg_truecolor,r.bg_truecolor=F,r.isInverted=!0,!1}return!0}),s.json)return r;if(r.isEmpty())return"";if(!r.was_processed)return r.content;let o=[],c=[],l=[],i={},g=a=>{let D=[],F;for(F in a)a.hasOwnProperty(F)&&D.push("data-"+F+'="'+this.escapeForHtml(a[F])+'"');return D.length>0?" "+D.join(" "):""};return r.isInverted&&(i["ansi-is-inverted"]="true"),r.fg&&(u?(o.push(r.fg+"-fg"),r.fg_truecolor!==null&&(i["ansi-truecolor-fg"]=r.fg_truecolor,r.fg_truecolor=null)):o.push("color:rgb("+r.fg+")")),r.bg&&(u?(o.push(r.bg+"-bg"),r.bg_truecolor!==null&&(i["ansi-truecolor-bg"]=r.bg_truecolor,r.bg_truecolor=null)):o.push("background-color:rgb("+r.bg+")")),r.decorations.forEach(a=>{if(u){c.push("ansi-"+a);return}a==="bold"?c.push("font-weight:bold"):a==="dim"?c.push("opacity:0.5"):a==="italic"?c.push("font-style:italic"):a==="hidden"?c.push("visibility:hidden"):a==="strikethrough"?l.push("line-through"):l.push(a)}),l.length&&c.push("text-decoration:"+l.join(" ")),u?'<span class="'+o.concat(c).join(" ")+'"'+g(i)+">"+r.content+"</span>":'<span style="'+o.concat(c).join(";")+'"'+g(i)+">"+r.content+"</span>"}removeDecoration(e){const s=this.decorations.indexOf(e);s>=0&&this.decorations.splice(s,1)}}var We=O,B={exports:{}};function X(t){if(!t)return"";if(!/\r/.test(t))return t;for(t=t.replace(/\r+\n/gm,`
1
+ import{r as z,c as R,u as Fe,j as _,B as S,d as be,a as ve,b as ye,P as Ce}from"./index-veTBv7Qv.js";import{F as Ee}from"./FilterPills-BD2vsIx2.js";import{u as Ae}from"./usePluginData-mjHueOjf.js";import{m as Y}from"./web-D6VGQFbH.js";import"./client-Cw4K1Nx3.js";function d(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function L(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function je(t,e){const s=d(t);return isNaN(e)?L(t,NaN):(e&&s.setDate(s.getDate()+e),s)}function ze(t,e){const s=d(t);if(isNaN(e))return L(t,NaN);if(!e)return s;const n=s.getDate(),r=L(t,s.getTime());r.setMonth(s.getMonth()+e+1,0);const u=r.getDate();return n>=u?r:(s.setFullYear(r.getFullYear(),r.getMonth(),n),s)}function I(t,e){const{years:s=0,months:n=0,weeks:r=0,days:u=0,hours:o=0,minutes:c=0,seconds:l=0}=e,i=d(t),g=n||s?ze(i,n+s*12):i,a=u||r?je(g,u+r*7):g,D=c+o*60,x=(l+D*60)*1e3;return L(t,a.getTime()+x)}const we=864e5,ke=6e4,Ne=36e5;function se(t){const e=d(t);return e.setHours(0,0,0,0),e}function ne(t){const e=d(t),s=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return s.setUTCFullYear(e.getFullYear()),+t-+s}function Re(t,e){const s=se(t),n=se(e),r=+s-ne(s),u=+n-ne(n);return Math.round((r-u)/we)}function $(t,e){const s=d(t),n=d(e),r=s.getTime()-n.getTime();return r<0?-1:r>0?1:r}function Oe(t,e){const s=d(t),n=d(e),r=s.getFullYear()-n.getFullYear(),u=s.getMonth()-n.getMonth();return r*12+u}function Me(t,e){const s=d(t),n=d(e);return s.getFullYear()-n.getFullYear()}function Se(t,e){const s=d(t),n=d(e),r=re(s,n),u=Math.abs(Re(s,n));s.setDate(s.getDate()-r*u);const o=+(re(s,n)===-r),c=r*(u-o);return c===0?0:c}function re(t,e){const s=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return s<0?-1:s>0?1:s}function K(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function Q(t,e){return+d(t)-+d(e)}function Ie(t,e,s){const n=Q(t,e)/Ne;return K(s==null?void 0:s.roundingMethod)(n)}function $e(t,e,s){const n=Q(t,e)/ke;return K(s==null?void 0:s.roundingMethod)(n)}function Le(t){const e=d(t);return e.setHours(23,59,59,999),e}function Te(t){const e=d(t),s=e.getMonth();return e.setFullYear(e.getFullYear(),s+1,0),e.setHours(23,59,59,999),e}function Be(t){const e=d(t);return+Le(e)==+Te(e)}function Pe(t,e){const s=d(t),n=d(e),r=$(s,n),u=Math.abs(Oe(s,n));let o;if(u<1)o=0;else{s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-r*u);let c=$(s,n)===-r;Be(d(t))&&u===1&&$(t,n)===1&&(c=!1),o=r*(u-Number(c))}return o===0?0:o}function Ze(t,e,s){const n=Q(t,e)/1e3;return K(s==null?void 0:s.roundingMethod)(n)}function qe(t,e){const s=d(t),n=d(e),r=$(s,n),u=Math.abs(Me(s,n));s.setFullYear(1584),n.setFullYear(1584);const o=$(s,n)===-r,c=r*(u-+o);return c===0?0:c}function Ye(t){const e=d(t.start),s=d(t.end),n={},r=qe(s,e);r&&(n.years=r);const u=I(e,{years:n.years}),o=Pe(s,u);o&&(n.months=o);const c=I(u,{months:n.months}),l=Se(s,c);l&&(n.days=l);const i=I(c,{days:n.days}),g=Ie(s,i);g&&(n.hours=g);const a=I(i,{hours:n.hours}),D=$e(s,a);D&&(n.minutes=D);const F=I(a,{minutes:n.minutes}),x=Ze(s,F);return x&&(n.seconds=x),n}var ge={};const k=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],He=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;class O{static escapeForHtml(e){return new O().escapeForHtml(e)}static linkify(e){return new O().linkify(e)}static ansiToHtml(e,s){return new O().ansiToHtml(e,s)}static ansiToJson(e,s){return new O().ansiToJson(e,s)}static ansiToText(e){return new O().ansiToText(e)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let r=0;r<2;++r)for(let u=0;u<8;++u)this.PALETTE_COLORS.push(k[r][u].color);let e=[0,95,135,175,215,255],s=(r,u,o)=>e[r]+", "+e[u]+", "+e[o];for(let r=0;r<6;++r)for(let u=0;u<6;++u)for(let o=0;o<6;++o)this.PALETTE_COLORS.push(s(r,u,o));let n=8;for(let r=0;r<24;++r,n+=10)this.PALETTE_COLORS.push(n+", "+n+", "+n)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,s=>s=="&"?"&amp;":s=='"'?"&quot;":s=="<"?"&lt;":s==">"?"&gt;":"")}linkify(e){return e.replace(He,s=>`<a href="${s}">${s}</a>`)}ansiToHtml(e,s){return this.process(e,s,!0)}ansiToJson(e,s){return s=s||{},s.json=!0,s.clearLine=!1,this.process(e,s,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,s,n){let r=this,u=e.split(/\033\[/),o=u.shift();s==null&&(s={}),s.clearLine=/\r/.test(e);let c=u.map(l=>this.processChunk(l,s,n));if(s&&s.json){let l=r.processChunkJson("");return l.content=o,l.clearLine=s.clearLine,c.unshift(l),s.remove_empty&&(c=c.filter(i=>!i.isEmpty())),c}else c.unshift(o);return c.join("")}processChunkJson(e,s,n){s=typeof s>"u"?{}:s;let r=s.use_classes=typeof s.use_classes<"u"&&s.use_classes,u=s.key=r?"class":"color",o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:s.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!o.content},c=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!c)return o;o.content=c[4];let l=c[2].split(";");if(c[1]!==""||c[3]!=="m"||!n)return o;let i=this;for(;l.length>0;){let g=l.shift(),a=parseInt(g);if(isNaN(a)||a===0)i.fg=i.bg=null,i.decorations=[];else if(a===1)i.decorations.push("bold");else if(a===2)i.decorations.push("dim");else if(a===3)i.decorations.push("italic");else if(a===4)i.decorations.push("underline");else if(a===5)i.decorations.push("blink");else if(a===7)i.decorations.push("reverse");else if(a===8)i.decorations.push("hidden");else if(a===9)i.decorations.push("strikethrough");else if(a===21)i.removeDecoration("bold");else if(a===22)i.removeDecoration("bold"),i.removeDecoration("dim");else if(a===23)i.removeDecoration("italic");else if(a===24)i.removeDecoration("underline");else if(a===25)i.removeDecoration("blink");else if(a===27)i.removeDecoration("reverse");else if(a===28)i.removeDecoration("hidden");else if(a===29)i.removeDecoration("strikethrough");else if(a===39)i.fg=null;else if(a===49)i.bg=null;else if(a>=30&&a<38)i.fg=k[0][a%10][u];else if(a>=90&&a<98)i.fg=k[1][a%10][u];else if(a>=40&&a<48)i.bg=k[0][a%10][u];else if(a>=100&&a<108)i.bg=k[1][a%10][u];else if(a===38||a===48){let D=a===38;if(l.length>=1){let F=l.shift();if(F==="5"&&l.length>=1){let x=parseInt(l.shift());if(x>=0&&x<=255)if(!r)this.PALETTE_COLORS||i.setupPalette(),D?i.fg=this.PALETTE_COLORS[x]:i.bg=this.PALETTE_COLORS[x];else{let y=x>=16?"ansi-palette-"+x:k[x>7?1:0][x%8].class;D?i.fg=y:i.bg=y}}else if(F==="2"&&l.length>=3){let x=parseInt(l.shift()),y=parseInt(l.shift()),j=parseInt(l.shift());if(x>=0&&x<=255&&y>=0&&y<=255&&j>=0&&j<=255){let C=x+", "+y+", "+j;r?D?(i.fg="ansi-truecolor",i.fg_truecolor=C):(i.bg="ansi-truecolor",i.bg_truecolor=C):D?i.fg=C:i.bg=C}}}}}return i.fg===null&&i.bg===null&&i.decorations.length===0||(o.fg=i.fg,o.bg=i.bg,o.fg_truecolor=i.fg_truecolor,o.bg_truecolor=i.bg_truecolor,o.decorations=i.decorations,o.decoration=i.decorations.slice(-1).pop()||null,o.was_processed=!0),o}processChunk(e,s,n){s=s||{};let r=this.processChunkJson(e,s,n),u=s.use_classes;if(r.decorations=r.decorations.filter(a=>{if(a==="reverse"){r.fg||(r.fg=k[0][7][u?"class":"color"]),r.bg||(r.bg=k[0][0][u?"class":"color"]);let D=r.fg;r.fg=r.bg,r.bg=D;let F=r.fg_truecolor;return r.fg_truecolor=r.bg_truecolor,r.bg_truecolor=F,r.isInverted=!0,!1}return!0}),s.json)return r;if(r.isEmpty())return"";if(!r.was_processed)return r.content;let o=[],c=[],l=[],i={},g=a=>{let D=[],F;for(F in a)a.hasOwnProperty(F)&&D.push("data-"+F+'="'+this.escapeForHtml(a[F])+'"');return D.length>0?" "+D.join(" "):""};return r.isInverted&&(i["ansi-is-inverted"]="true"),r.fg&&(u?(o.push(r.fg+"-fg"),r.fg_truecolor!==null&&(i["ansi-truecolor-fg"]=r.fg_truecolor,r.fg_truecolor=null)):o.push("color:rgb("+r.fg+")")),r.bg&&(u?(o.push(r.bg+"-bg"),r.bg_truecolor!==null&&(i["ansi-truecolor-bg"]=r.bg_truecolor,r.bg_truecolor=null)):o.push("background-color:rgb("+r.bg+")")),r.decorations.forEach(a=>{if(u){c.push("ansi-"+a);return}a==="bold"?c.push("font-weight:bold"):a==="dim"?c.push("opacity:0.5"):a==="italic"?c.push("font-style:italic"):a==="hidden"?c.push("visibility:hidden"):a==="strikethrough"?l.push("line-through"):l.push(a)}),l.length&&c.push("text-decoration:"+l.join(" ")),u?'<span class="'+o.concat(c).join(" ")+'"'+g(i)+">"+r.content+"</span>":'<span style="'+o.concat(c).join(";")+'"'+g(i)+">"+r.content+"</span>"}removeDecoration(e){const s=this.decorations.indexOf(e);s>=0&&this.decorations.splice(s,1)}}var We=O,B={exports:{}};function X(t){if(!t)return"";if(!/\r/.test(t))return t;for(t=t.replace(/\r+\n/gm,`
2
2
  `);/\r./.test(t);)t=t.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(e,s,n){return n+s.slice(n.length)});return t}function Je(t){for(var e=0,s=0;s<t.length;s++)t[e].length<=t[s].length&&(e=s);return e}function ie(t){if(!/\r/.test(t))return t;for(var e=t.split("\r"),s=[];e.length>0;){var n=Je(e);s.push(e[n]),e=e.slice(n+1)}return s.join("\r")}function Ge(t){if(!t)return"";if(!/\r/.test(t))return t;if(!/\n/.test(t))return ie(t);t=t.replace(/\r+\n/gm,`
3
3
  `);var e=t.lastIndexOf(`
4
4
  `);return X(t.slice(0,e))+`