@tickernelz/paperclip-pro-ui 2026.929.0 → 2026.929.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Agents.production-BeDi727Q.js → Agents.production-DXVQbH40.js} +2 -2
- package/dist/assets/{CompanyActivity.production-Qt-mLMpq.js → CompanyActivity.production-CinmmGVv.js} +1 -1
- package/dist/assets/{CompanyExport-Dq2gmciJ.js → CompanyExport-DaS-YmqD.js} +1 -1
- package/dist/assets/{CompanySkills.production-C4smxeMX.js → CompanySkills.production-DayJEg3Z.js} +1 -1
- package/dist/assets/{Costs.production-CDsWvATt.js → Costs.production-qBNyNNRY.js} +1 -1
- package/dist/assets/{MarkdownBody-DJQ35hak.js → MarkdownBody-NJwkQWmo.js} +2 -2
- package/dist/assets/{OrgChart.production-uQij-DWC.js → OrgChart.production-7-WQ0htv.js} +1 -1
- package/dist/assets/{RoutineDetail.production-DmubEXM7.js → RoutineDetail.production-CEF8wtwL.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-Bt4KAWCh.js → RoutineRunVariablesDialog-B1KRZJIl.js} +2 -2
- package/dist/assets/{Routines.production-_siggo5J.js → Routines.production-C15V_czC.js} +1 -1
- package/dist/assets/StatusIcon-DgMlA1TU.js +1 -0
- package/dist/assets/{definition-DroCAncf.js → definition-C_4HgU9U.js} +1 -1
- package/dist/assets/{index-BCClSQew.js → index-DMN58MRe.js} +163 -160
- package/dist/assets/{index-J-4PQOv1.css → index-Dkjt7SQK.css} +1 -1
- package/dist/index.html +5 -5
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/StatusIcon-BuUYMqqU.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-G_BSi0G0.js","assets/preload-helper-CceJXRIF.js","assets/chunk-Y2CYZVJY-OvsAdhaO.js","assets/src-Bssc388C.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/chunk-DU6HZSFF-2P5iNHqg.js","assets/chunk-75Z2AOVW-BaPl5WA6.js","assets/dist-Cj4C2HPs.js","assets/chunk-PWAF6VOD-CR3rNBNB.js","assets/chunk-GMAD6QVW-BfvaaEBW.js","assets/chunk-P2QGCYS3-CjqEi3mx.js","assets/chunk-4HAMMTFA-CGGd_Pxz.js","assets/rough.esm-DnC5Tr1g.js","assets/chunk-GVQU2GXP-Cwp_Wpj2.js","assets/chunk-OSK3NFVY-DlrxddG-.js","assets/line-CJEZO7lL.js","assets/path-D6mommQw.js","assets/array-CL5Tisss.js","assets/graphlib-DHhK3saS.js","assets/chunk-L3NEJ4N5-JUd1UqX1.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var xn=Object.defineProperty;var o=(e,t)=>xn(e,"name",{value:t,configurable:!0});import{i as ye,n as Sn,t as ie}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Bn,Lr as In,Pr as Pn,S as H,W as Ln,Xn as fe,Y as St,nr as Rn,t as Bt}from"./createLucideIcon-r3v6fbGz.js";import{t as jn}from"./preload-helper-CceJXRIF.js";import{B as Tn,a as Nn,c as _n,it as It,o as On,s as Mn,t as Ue}from"./router-Bb8nJWyv.js";import{C as zn,D as Pt,F as Re,H as re,I as tt,J as He,K as $,L as $n,P as T,R as Un,S as Hn,U as le,W as Wn,Y as Z,_ as Vn,c as Kn,d as qn,f as Xn,g as ue,h as Yn,i as Lt,j as We,k as nt,l as Gn,m as Zn,p as Jn,r as Qn,u as er,x as Ve,z as tr}from"./mention-chips-DXumPrOR.js";import{c as nr,d as rr,h as rt,i as Rt,l as lr,m as or,n as ir,t as ur,u as jt,y as ar}from"./StatusIcon-BuUYMqqU.js";import{t as sr}from"./check-DDiXDm2i.js";import{p as cr}from"./button-CAPbz11u.js";import{i as pr,r as fr,t as hr}from"./clipboard-CYJ5Q78m.js";import{t as dr}from"./external-link-0lrOvZWO.js";var mr=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],Dr=Bt("file-code-corner",mr),gr=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],Fr=Bt("text-wrap",gr);function J(e){const t=[];let n=-1,r=0,l=0;for(;++n<e.length;){const u=e.charCodeAt(n);let i="";if(u===37&&le(e.charCodeAt(n+1))&&le(e.charCodeAt(n+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(i=String.fromCharCode(u));else if(u>55295&&u<57344){const a=e.charCodeAt(n+1);u<56320&&a>56319&&a<57344?(i=String.fromCharCode(u,a),l=1):i="�"}else i=String.fromCharCode(u);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+l+1,i=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}o(J,"normalizeUri");var w=ye(In(),1),g=ye(Bn(),1);function yr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(yr,"escapeStringRegexp");var Tt="paperclip.theme",wr="#18181b",Cr="#ffffff",Nt=(0,w.createContext)(void 0);function kr(){return typeof document>"u"||document.documentElement.classList.contains("dark")?"dark":"light"}o(kr,"resolveThemeFromDocument");function Er(){if(typeof window>"u")return!1;try{const e=window.localStorage.getItem(Tt);return e==="light"||e==="dark"}catch{return!1}}o(Er,"hasStoredTheme");function Ar(e){if(typeof document>"u")return;const t=e==="dark",n=document.documentElement;n.classList.toggle("dark",t),n.style.colorScheme=t?"dark":"light";const r=document.querySelector('meta[name="theme-color"]');r instanceof HTMLMetaElement&&r.setAttribute("content",t?wr:Cr)}o(Ar,"applyTheme");function oa({children:e}){const[t,n]=(0,w.useState)(()=>kr()),[r,l]=(0,w.useState)(()=>Er()),u=(0,w.useCallback)(c=>{l(!0),n(c)},[]),i=(0,w.useCallback)(()=>{l(!0),n(c=>c==="dark"?"light":"dark")},[]);(0,w.useEffect)(()=>{if(Ar(t),!!r)try{localStorage.setItem(Tt,t)}catch{}},[t,r]),(0,w.useEffect)(()=>{if(r||typeof window>"u"||typeof window.matchMedia!="function")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),p=o(f=>{n(f.matches?"dark":"light")},"handleChange");return c.addEventListener("change",p),()=>c.removeEventListener("change",p)},[r]);const a=(0,w.useMemo)(()=>({theme:t,setTheme:u,toggleTheme:i}),[t,u,i]);return(0,g.jsx)(Nt.Provider,{value:a,children:e})}o(oa,"ThemeProvider");function vr(){const e=(0,w.useContext)(Nt);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}o(vr,"useTheme");function br(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}o(br,"stringify$1");var xr=/[ \t\n\f\r]/g;function Sr(e){return typeof e=="object"?e.type==="text"?lt(e.value):!1:lt(e)}o(Sr,"whitespace");function lt(e){return e.replace(xr,"")===""}o(lt,"empty");var ae=class{static{o(this,"Schema")}constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ae.prototype.normal={};ae.prototype.property={};ae.prototype.space=void 0;function _t(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new ae(n,r,t)}o(_t,"merge");function je(e){return e.toLowerCase()}o(je,"normalize$1");var N=class{static{o(this,"Info")}constructor(e,t){this.attribute=t,this.property=e}};N.prototype.attribute="";N.prototype.booleanish=!1;N.prototype.boolean=!1;N.prototype.commaOrSpaceSeparated=!1;N.prototype.commaSeparated=!1;N.prototype.defined=!1;N.prototype.mustUseProperty=!1;N.prototype.number=!1;N.prototype.overloadedBoolean=!1;N.prototype.property="";N.prototype.spaceSeparated=!1;N.prototype.space=void 0;var Te=Sn({boolean:o(()=>v,"boolean"),booleanish:o(()=>L,"booleanish"),commaOrSpaceSeparated:o(()=>M,"commaOrSpaceSeparated"),commaSeparated:o(()=>X,"commaSeparated"),number:o(()=>m,"number"),overloadedBoolean:o(()=>Ne,"overloadedBoolean"),spaceSeparated:o(()=>P,"spaceSeparated")}),Br=0,v=Y(),L=Y(),Ne=Y(),m=Y(),P=Y(),X=Y(),M=Y();function Y(){return 2**++Br}o(Y,"increment");var we=Object.keys(Te),Ke=class extends N{static{o(this,"DefinedInfo")}constructor(e,t,n,r){let l=-1;if(super(e,t),ot(this,"space",r),typeof n=="number")for(;++l<we.length;){const u=we[l];ot(this,we[l],(n&Te[u])===Te[u])}}};Ke.prototype.defined=!0;function ot(e,t,n){n&&(e[t]=n)}o(ot,"mark");function Q(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const u=new Ke(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[je(r)]=r,n[je(u.attribute)]=r}return new ae(t,n,e.space)}o(Q,"create");var Ot=Q({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:L,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:P,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:m,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:P,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:L,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Mt(e,t){return t in e?e[t]:t}o(Mt,"caseSensitiveTransform");function zt(e,t){return Mt(e,t.toLowerCase())}o(zt,"caseInsensitiveTransform");var Ir=Q({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:X,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alpha:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:P,autoFocus:v,autoPlay:v,blocking:P,capture:null,charSet:null,checked:v,cite:null,className:P,closedBy:null,colorSpace:null,cols:m,colSpan:m,command:null,commandFor:null,content:null,contentEditable:L,controls:v,controlsList:P,coords:m|X,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:Ne,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:P,height:m,hidden:Ne,high:m,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:P,itemRef:P,itemScope:v,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,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:v,optimum:m,pattern:null,ping:P,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:P,required:v,reversed:v,rows:m,rowSpan:m,sandbox:P,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootCustomElementRegistry:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shadowRootSerializable:v,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:L,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:v,disablePictureInPicture:v,disableRemotePlayback:v,exportParts:X,part:P,prefix:null,property:null,results:m,security:null,unselectable:null},space:"html",transform:zt}),Pr=Q({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:M,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:P,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:X,g2:X,glyphName:X,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mt}),$t=Q({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()}}),Ut=Q({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zt}),Ht=Q({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Lr={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"},Rr=/[A-Z]/g,it=/-[a-z]/g,jr=/^data[-\w.:]+$/i;function Tr(e,t){const n=je(t);let r=t,l=N;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jr.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(it,_r);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!it.test(u)){let i=u.replace(Rr,Nr);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}l=Ke}return new l(r,t)}o(Tr,"find");function Nr(e){return"-"+e.toLowerCase()}o(Nr,"kebab");function _r(e){return e.charAt(1).toUpperCase()}o(_r,"camelcase");var Or=_t([Ot,Ir,$t,Ut,Ht],"html"),qe=_t([Ot,Pr,$t,Ut,Ht],"svg");function Mr(e){return e.join(" ").trim()}o(Mr,"stringify");var zr=ie(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,p=/^\s+|\s+$/g,f=`
|
|
2
|
+
var xn=Object.defineProperty;var o=(e,t)=>xn(e,"name",{value:t,configurable:!0});import{i as ye,n as Sn,t as ie}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Bn,Lr as In,Pr as Pn,S as H,W as Ln,Xn as fe,Y as St,nr as Rn,t as Bt}from"./createLucideIcon-r3v6fbGz.js";import{t as jn}from"./preload-helper-CceJXRIF.js";import{B as Tn,a as Nn,c as _n,it as It,o as On,s as Mn,t as Ue}from"./router-Bb8nJWyv.js";import{C as zn,D as Pt,F as Re,H as re,I as tt,J as He,K as $,L as $n,P as T,R as Un,S as Hn,U as le,W as Wn,Y as Z,_ as Vn,c as Kn,d as qn,f as Xn,g as ue,h as Yn,i as Lt,j as We,k as nt,l as Gn,m as Zn,p as Jn,r as Qn,u as er,x as Ve,z as tr}from"./mention-chips-DXumPrOR.js";import{b as nr,c as rr,d as lr,h as rt,i as Rt,l as or,m as ir,n as ur,t as ar,u as jt}from"./StatusIcon-DgMlA1TU.js";import{t as sr}from"./check-DDiXDm2i.js";import{p as cr}from"./button-CAPbz11u.js";import{i as pr,r as fr,t as hr}from"./clipboard-CYJ5Q78m.js";import{t as dr}from"./external-link-0lrOvZWO.js";var mr=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],Dr=Bt("file-code-corner",mr),gr=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],Fr=Bt("text-wrap",gr);function J(e){const t=[];let n=-1,r=0,l=0;for(;++n<e.length;){const u=e.charCodeAt(n);let i="";if(u===37&&le(e.charCodeAt(n+1))&&le(e.charCodeAt(n+2)))l=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(i=String.fromCharCode(u));else if(u>55295&&u<57344){const a=e.charCodeAt(n+1);u<56320&&a>56319&&a<57344?(i=String.fromCharCode(u,a),l=1):i="�"}else i=String.fromCharCode(u);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+l+1,i=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}o(J,"normalizeUri");var w=ye(In(),1),g=ye(Bn(),1);function yr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}o(yr,"escapeStringRegexp");var Tt="paperclip.theme",wr="#18181b",Cr="#ffffff",Nt=(0,w.createContext)(void 0);function kr(){return typeof document>"u"||document.documentElement.classList.contains("dark")?"dark":"light"}o(kr,"resolveThemeFromDocument");function Er(){if(typeof window>"u")return!1;try{const e=window.localStorage.getItem(Tt);return e==="light"||e==="dark"}catch{return!1}}o(Er,"hasStoredTheme");function Ar(e){if(typeof document>"u")return;const t=e==="dark",n=document.documentElement;n.classList.toggle("dark",t),n.style.colorScheme=t?"dark":"light";const r=document.querySelector('meta[name="theme-color"]');r instanceof HTMLMetaElement&&r.setAttribute("content",t?wr:Cr)}o(Ar,"applyTheme");function oa({children:e}){const[t,n]=(0,w.useState)(()=>kr()),[r,l]=(0,w.useState)(()=>Er()),u=(0,w.useCallback)(c=>{l(!0),n(c)},[]),i=(0,w.useCallback)(()=>{l(!0),n(c=>c==="dark"?"light":"dark")},[]);(0,w.useEffect)(()=>{if(Ar(t),!!r)try{localStorage.setItem(Tt,t)}catch{}},[t,r]),(0,w.useEffect)(()=>{if(r||typeof window>"u"||typeof window.matchMedia!="function")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),p=o(f=>{n(f.matches?"dark":"light")},"handleChange");return c.addEventListener("change",p),()=>c.removeEventListener("change",p)},[r]);const a=(0,w.useMemo)(()=>({theme:t,setTheme:u,toggleTheme:i}),[t,u,i]);return(0,g.jsx)(Nt.Provider,{value:a,children:e})}o(oa,"ThemeProvider");function vr(){const e=(0,w.useContext)(Nt);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}o(vr,"useTheme");function br(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}o(br,"stringify$1");var xr=/[ \t\n\f\r]/g;function Sr(e){return typeof e=="object"?e.type==="text"?lt(e.value):!1:lt(e)}o(Sr,"whitespace");function lt(e){return e.replace(xr,"")===""}o(lt,"empty");var ae=class{static{o(this,"Schema")}constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ae.prototype.normal={};ae.prototype.property={};ae.prototype.space=void 0;function _t(e,t){const n={},r={};for(const l of e)Object.assign(n,l.property),Object.assign(r,l.normal);return new ae(n,r,t)}o(_t,"merge");function je(e){return e.toLowerCase()}o(je,"normalize$1");var N=class{static{o(this,"Info")}constructor(e,t){this.attribute=t,this.property=e}};N.prototype.attribute="";N.prototype.booleanish=!1;N.prototype.boolean=!1;N.prototype.commaOrSpaceSeparated=!1;N.prototype.commaSeparated=!1;N.prototype.defined=!1;N.prototype.mustUseProperty=!1;N.prototype.number=!1;N.prototype.overloadedBoolean=!1;N.prototype.property="";N.prototype.spaceSeparated=!1;N.prototype.space=void 0;var Te=Sn({boolean:o(()=>v,"boolean"),booleanish:o(()=>L,"booleanish"),commaOrSpaceSeparated:o(()=>M,"commaOrSpaceSeparated"),commaSeparated:o(()=>X,"commaSeparated"),number:o(()=>m,"number"),overloadedBoolean:o(()=>Ne,"overloadedBoolean"),spaceSeparated:o(()=>P,"spaceSeparated")}),Br=0,v=Y(),L=Y(),Ne=Y(),m=Y(),P=Y(),X=Y(),M=Y();function Y(){return 2**++Br}o(Y,"increment");var we=Object.keys(Te),Ke=class extends N{static{o(this,"DefinedInfo")}constructor(e,t,n,r){let l=-1;if(super(e,t),ot(this,"space",r),typeof n=="number")for(;++l<we.length;){const u=we[l];ot(this,we[l],(n&Te[u])===Te[u])}}};Ke.prototype.defined=!0;function ot(e,t,n){n&&(e[t]=n)}o(ot,"mark");function Q(e){const t={},n={};for(const[r,l]of Object.entries(e.properties)){const u=new Ke(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),t[r]=u,n[je(r)]=r,n[je(u.attribute)]=r}return new ae(t,n,e.space)}o(Q,"create");var Ot=Q({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:P,ariaCurrent:null,ariaDescribedBy:P,ariaDetails:null,ariaDisabled:L,ariaDropEffect:P,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:P,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P,ariaLevel:m,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:P,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:P,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:L,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Mt(e,t){return t in e?e[t]:t}o(Mt,"caseSensitiveTransform");function zt(e,t){return Mt(e,t.toLowerCase())}o(zt,"caseInsensitiveTransform");var Ir=Q({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:X,acceptCharset:P,accessKey:P,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alpha:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:P,autoFocus:v,autoPlay:v,blocking:P,capture:null,charSet:null,checked:v,cite:null,className:P,closedBy:null,colorSpace:null,cols:m,colSpan:m,command:null,commandFor:null,content:null,contentEditable:L,controls:v,controlsList:P,coords:m|X,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:Ne,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:P,height:m,hidden:Ne,high:m,href:null,hrefLang:null,htmlFor:P,httpEquiv:P,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:P,itemRef:P,itemScope:v,itemType:P,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,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:v,optimum:m,pattern:null,ping:P,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:P,required:v,reversed:v,rows:m,rowSpan:m,sandbox:P,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootCustomElementRegistry:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shadowRootSerializable:v,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:L,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:v,disablePictureInPicture:v,disableRemotePlayback:v,exportParts:X,part:P,prefix:null,property:null,results:m,security:null,unselectable:null},space:"html",transform:zt}),Pr=Q({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:M,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:P,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:X,g2:X,glyphName:X,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mt}),$t=Q({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()}}),Ut=Q({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zt}),Ht=Q({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Lr={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"},Rr=/[A-Z]/g,it=/-[a-z]/g,jr=/^data[-\w.:]+$/i;function Tr(e,t){const n=je(t);let r=t,l=N;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jr.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(it,_r);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!it.test(u)){let i=u.replace(Rr,Nr);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}l=Ke}return new l(r,t)}o(Tr,"find");function Nr(e){return"-"+e.toLowerCase()}o(Nr,"kebab");function _r(e){return e.charAt(1).toUpperCase()}o(_r,"camelcase");var Or=_t([Ot,Ir,$t,Ut,Ht],"html"),qe=_t([Ot,Pr,$t,Ut,Ht],"svg");function Mr(e){return e.join(" ").trim()}o(Mr,"stringify");var zr=ie(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,p=/^\s+|\s+$/g,f=`
|
|
3
3
|
`,s="/",h="*",d="",D="comment",F="declaration";function C(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var A=1,y=1;function B(I){var S=I.match(r);S&&(A+=S.length);var O=I.lastIndexOf(f);y=~O?I.length-O:y+I.length}o(B,"updatePosition");function x(){var I={line:A,column:y};return function(S){return S.position=new _(I),ee(),S}}o(x,"position");function _(I){this.start=I,this.end={line:A,column:y},this.source=E.source}o(_,"Position"),_.prototype.content=k;function j(I){var S=new Error(E.source+":"+A+":"+y+": "+I);if(S.reason=I,S.filename=E.source,S.line=A,S.column=y,S.source=k,!E.silent)throw S}o(j,"error");function V(I){var S=I.exec(k);if(S){var O=S[0];return B(O),k=k.slice(O.length),S}}o(V,"match");function ee(){V(l)}o(ee,"whitespace");function R(I){var S;for(I=I||[];S=te();)S!==!1&&I.push(S);return I}o(R,"comments");function te(){var I=x();if(!(s!=k.charAt(0)||h!=k.charAt(1))){for(var S=2;d!=k.charAt(S)&&(h!=k.charAt(S)||s!=k.charAt(S+1));)++S;if(S+=2,d===k.charAt(S-1))return j("End of comment missing");var O=k.slice(2,S-2);return y+=2,B(O),k=k.slice(S),y+=2,I({type:D,comment:O})}}o(te,"comment");function ce(){var I=x(),S=V(u);if(S){if(te(),!V(i))return j("property missing ':'");var O=V(a),bn=I({type:F,property:b(S[0].replace(n,d)),value:O?b(O[0].replace(n,d)):d});return V(c),bn}}o(ce,"declaration");function pe(){var I=[];R(I);for(var S;S=ce();)S!==!1&&(I.push(S),R(I));return I}return o(pe,"declarations"),ee(),pe()}o(C,"index");function b(k){return k?k.replace(p,d):d}o(b,"trim"),t.exports=C})),$r=ie((e=>{var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(zr());function r(l,u){let i=null;if(!l||typeof l!="string")return i;const a=(0,n.default)(l),c=typeof u=="function";return a.forEach(p=>{if(p.type!=="declaration")return;const{property:f,value:s}=p;c?u(f,s,p):s&&(i=i||{},i[f]=s)}),i}o(r,"StyleToObject")})),Ur=ie((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,i=o(function(f){return!f||r.test(f)||t.test(f)},"skipCamelCase"),a=o(function(f,s){return s.toUpperCase()},"capitalize"),c=o(function(f,s){return"".concat(s,"-")},"trimHyphen"),p=o(function(f,s){return s===void 0&&(s={}),i(f)?f:(f=f.toLowerCase(),s.reactCompat?f=f.replace(u,c):f=f.replace(l,c),f.replace(n,a))},"camelCase");e.camelCase=p})),Hr=ie(((e,t)=>{var n=(e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}})($r()),r=Ur();function l(u,i){var a={};return!u||typeof u!="string"||(0,n.default)(u,function(c,p){c&&p&&(a[(0,r.camelCase)(c,i)]=p)}),a}o(l,"StyleToJS"),l.default=l,t.exports=l})),Wt=Vt("end"),Xe=Vt("start");function Vt(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}}}o(Vt,"point");function Wr(e){const t=Xe(e),n=Wt(e);if(t&&n)return{start:t,end:n}}o(Wr,"position");var Vr=ye(Hr(),1),Ye={}.hasOwnProperty,Kr=new Map,qr=/[A-Z]/g,Xr=new Set(["table","tbody","thead","tfoot","tr"]),Yr=new Set(["td","th"]),Kt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gr(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=ll(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=rl(n,t.jsx,t.jsxs)}const l={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"?qe:Or,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=qt(l,e,void 0);return u&&typeof u!="string"?u:l.create(e,l.Fragment,{children:u||void 0},void 0)}o(Gr,"toJsxRuntime");function qt(e,t,n){if(t.type==="element")return Zr(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jr(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return el(e,t,n);if(t.type==="mdxjsEsm")return Qr(e,t);if(t.type==="root")return tl(e,t,n);if(t.type==="text")return nl(e,t)}o(qt,"one$1");function Zr(e,t,n){const r=e.schema;let l=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=qe,e.schema=l),e.ancestors.push(t);const u=Yt(e,t.tagName,!1),i=ol(e,t);let a=Ze(e,t);return Xr.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Sr(c):!0})),Xt(e,i,u,t),Ge(i,a),e.ancestors.pop(),e.schema=r,e.create(t,u,i,n)}o(Zr,"element");function Jr(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}oe(e,t.position)}o(Jr,"mdxExpression");function Qr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oe(e,t.position)}o(Qr,"mdxEsm");function el(e,t,n){const r=e.schema;let l=r;t.name==="svg"&&r.space==="html"&&(l=qe,e.schema=l),e.ancestors.push(t);const u=t.name===null?e.Fragment:Yt(e,t.name,!0),i=il(e,t),a=Ze(e,t);return Xt(e,i,u,t),Ge(i,a),e.ancestors.pop(),e.schema=r,e.create(t,u,i,n)}o(el,"mdxJsxElement");function tl(e,t,n){const r={};return Ge(r,Ze(e,t)),e.create(t,e.Fragment,r,n)}o(tl,"root$1");function nl(e,t){return t.value}o(nl,"text$2");function Xt(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}o(Xt,"addNode");function Ge(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}o(Ge,"addChildren");function rl(e,t,n){return r;function r(l,u,i,a){const c=Array.isArray(i.children)?n:t;return a?c(u,i,a):c(u,i)}}o(rl,"productionCreate");function ll(e,t){return n;function n(r,l,u,i){const a=Array.isArray(u.children),c=Xe(r);return t(l,u,i,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}o(ll,"developmentCreate");function ol(e,t){const n={};let r,l;for(l in t.properties)if(l!=="children"&&Ye.call(t.properties,l)){const u=ul(e,l,t.properties[l]);if(u){const[i,a]=u;e.tableCellAlignToStyle&&i==="align"&&typeof a=="string"&&Yr.has(t.tagName)?r=a:n[i]=a}}if(r){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}o(ol,"createElementProps");function il(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const u=l.expression;u.type;const i=u.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else oe(e,t.position);else{const l=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const i=r.value.data.estree.body[0];i.type,u=e.evaluater.evaluateExpression(i.expression)}else oe(e,t.position);else u=r.value===null?!0:r.value;n[l]=u}return n}o(il,"createJsxElementProps");function Ze(e,t){const n=[];let r=-1;const l=e.passKeys?new Map:Kr;for(;++r<t.children.length;){const u=t.children[r];let i;if(e.passKeys){const c=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(c){const p=l.get(c)||0;i=c+"-"+p,l.set(c,p+1)}}const a=qt(e,u,i);a!==void 0&&n.push(a)}return n}o(Ze,"createChildren");function ul(e,t,n){const r=Tr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?br(n):Mr(n)),r.property==="style"){let l=typeof n=="object"?n:al(e,String(n));return e.stylePropertyNameCase==="css"&&(l=sl(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&r.space?Lr[r.property]||r.property:r.attribute,n]}}o(ul,"createProperty");function al(e,t){try{return(0,Vr.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,l=new We("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Kt+"#cannot-parse-style-attribute",l}}o(al,"parseStyle");function Yt(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let u=-1,i;for(;++u<l.length;){const a=nt(l[u])?{type:"Identifier",name:l[u]}:{type:"Literal",value:l[u]};i=i?{type:"MemberExpression",object:i,property:a,computed:!!(u&&a.type==="Literal"),optional:!1}:a}r=i}else r=nt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const l=r.value;return Ye.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(r);oe(e)}o(Yt,"findComponentFromName");function oe(e,t){const n=new We("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=Kt+"#cannot-handle-mdx-estrees-without-createevaluater",n}o(oe,"crashEstree");function sl(e){const t={};let n;for(n in e)Ye.call(e,n)&&(t[cl(n)]=e[n]);return t}o(sl,"transformStylesToCssCasing");function cl(e){let t=e.replace(qr,pl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}o(cl,"transformStyleToCssCasing");function pl(e){return"-"+e.toLowerCase()}o(pl,"toDash");var Ce={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"]};function fl(e){const t=this;t.parser=n;function n(r){return Zn(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}o(n,"parser")}o(fl,"remarkParse");function hl(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)}o(hl,"blockquote");function dl(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
4
4
|
`}]}o(dl,"hardBreak");function ml(e,t){const n=t.value?t.value+`
|
|
5
5
|
`:"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}o(ml,"code$1");function Dl(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}o(Dl,"strikethrough");function gl(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}o(gl,"emphasis");function Fl(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),l=J(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let i,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=u+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,c);const p={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,p),e.applyData(t,p)}o(Fl,"footnoteReference$1");function yl(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}o(yl,"heading");function wl(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}o(wl,"html");function Gt(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const l=e.all(t),u=l[0];u&&u.type==="text"?u.value="["+u.value:l.unshift({type:"text",value:"["});const i=l[l.length-1];return i&&i.type==="text"?i.value+=r:l.push({type:"text",value:r}),l}o(Gt,"revert");function Cl(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gt(e,t);const l={src:J(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(l.title=r.title);const u={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,u),e.applyData(t,u)}o(Cl,"imageReference");function kl(e,t){const n={src:J(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}o(kl,"image");function El(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}o(El,"inlineCode");function Al(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gt(e,t);const l={href:J(r.url||"")};r.title!==null&&r.title!==void 0&&(l.title=r.title);const u={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}o(Al,"linkReference");function vl(e,t){const n={href:J(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}o(vl,"link");function bl(e,t,n){const r=e.all(t),l=n?xl(n):Zt(t),u={},i=[];if(typeof t.checked=="boolean"){const f=r[0];let s;f&&f.type==="element"&&f.tagName==="p"?s=f:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(l||a!==0||f.type!=="element"||f.tagName!=="p")&&i.push({type:"text",value:`
|
|
@@ -13,4 +13,4 @@ var xn=Object.defineProperty;var o=(e,t)=>xn(e,"name",{value:t,configurable:!0})
|
|
|
13
13
|
`},l)),u}o(dt,"toHast");function Jl(e,t){return e&&"run"in e?async function(n,r){const l=dt(n,{file:r,...t});await e.run(l,r)}:function(n,r){return dt(n,{file:r,...e||t})}}o(Jl,"remarkRehype");function mt(e){if(e)throw e}o(mt,"bail");var Ql=ie(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,i=o(function(s){return typeof Array.isArray=="function"?Array.isArray(s):r.call(s)==="[object Array]"},"isArray"),a=o(function(s){if(!s||r.call(s)!=="[object Object]")return!1;var h=n.call(s,"constructor"),d=s.constructor&&s.constructor.prototype&&n.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!h&&!d)return!1;var D;for(D in s);return typeof D>"u"||n.call(s,D)},"isPlainObject"),c=o(function(s,h){l&&h.name==="__proto__"?l(s,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):s[h.name]=h.newValue},"setProperty"),p=o(function(s,h){if(h==="__proto__")if(n.call(s,h)){if(u)return u(s,h).value}else return;return s[h]},"getProperty");t.exports=o(function f(){var s,h,d,D,F,C,b=arguments[0],k=1,E=arguments.length,A=!1;for(typeof b=="boolean"&&(A=b,b=arguments[1]||{},k=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});k<E;++k)if(s=arguments[k],s!=null)for(h in s)d=p(b,h),D=p(s,h),b!==D&&(A&&D&&(a(D)||(F=i(D)))?(F?(F=!1,C=d&&i(d)?d:[]):C=d&&a(d)?d:{},c(b,{name:h,newValue:f(A,C,D)})):typeof D<"u"&&c(b,{name:h,newValue:D}));return b},"extend")})),ke=ye(Ql(),1);function Oe(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}o(Oe,"isPlainObject");function eo(){const e=[],t={run:n,use:r};return t;function n(...l){let u=-1;const i=l.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);a(null,...l);function a(c,...p){const f=e[++u];let s=-1;if(c){i(c);return}for(;++s<l.length;)(p[s]===null||p[s]===void 0)&&(p[s]=l[s]);l=p,f?to(f,a)(...p):i(null,...p)}o(a,"next")}function r(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}o(eo,"trough");function to(e,t){let n;return r;function r(...i){const a=e.length>i.length;let c;a&&i.push(l);try{c=e.apply(this,i)}catch(p){const f=p;if(a&&n)throw f;return l(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(u,l):c instanceof Error?l(c):u(c))}function l(i,...a){n||(n=!0,t(i,...a))}function u(i){l(null,i)}}o(to,"wrap");var z={basename:no,dirname:ro,extname:lo,join:oo,sep:"/"};function no(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');se(e);let n=0,r=-1,l=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else r<0&&(u=!0,r=l+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,a=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){n=l+1;break}}else i<0&&(u=!0,i=l+1),a>-1&&(e.codePointAt(l)===t.codePointAt(a--)?a<0&&(r=l):(a=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}o(no,"basename");function ro(e){if(se(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}o(ro,"dirname");function lo(e){se(e);let t=e.length,n=-1,r=0,l=-1,u=0,i;for(;t--;){const a=e.codePointAt(t);if(a===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),a===46?l<0?l=t:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||n<0||u===0||u===1&&l===n-1&&l===r+1?"":e.slice(l,n)}o(lo,"extname");function oo(...e){let t=-1,n;for(;++t<e.length;)se(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":io(n)}o(oo,"join");function io(e){se(e);const t=e.codePointAt(0)===47;let n=uo(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}o(io,"normalize");function uo(e,t){let n="",r=0,l=-1,u=0,i=-1,a,c;for(;++i<=e.length;){if(i<e.length)a=e.codePointAt(i);else{if(a===47)break;a=47}if(a===47){if(!(l===i-1||u===1))if(l!==i-1&&u===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),l=i,u=0;continue}}else if(n.length>0){n="",r=0,l=i,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(l+1,i):n=e.slice(l+1,i),r=i-l-1;l=i,u=0}else a===46&&u>-1?u++:u=-1}return n}o(uo,"normalizeString");function se(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}o(se,"assertPath$1");var ao={cwd:so};function so(){return"/"}o(so,"cwd");function Me(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}o(Me,"isUrl");function co(e){if(typeof e=="string")e=new URL(e);else if(!Me(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return po(e)}o(co,"urlToPath");function po(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}o(po,"getPathFromURLPosix");var Ee=["history","path","basename","stem","extname","dirname"],Jt=class{static{o(this,"VFile")}constructor(e){let t;e?Me(e)?t={path:e}:typeof e=="string"||fo(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":ao.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ee.length;){const l=Ee[n];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let r;for(r in t)Ee.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path=="string"?z.basename(this.path):void 0}set basename(e){ve(e,"basename"),Ae(e,"basename"),this.path=z.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?z.dirname(this.path):void 0}set dirname(e){Dt(this.basename,"dirname"),this.path=z.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?z.extname(this.path):void 0}set extname(e){if(Ae(e,"extname"),Dt(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=z.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Me(e)&&(e=co(e)),ve(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?z.basename(this.path,this.extname):void 0}set stem(e){ve(e,"stem"),Ae(e,"stem"),this.path=z.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new We(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Ae(e,t){if(e&&e.includes(z.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+z.sep+"`")}o(Ae,"assertPart");function ve(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}o(ve,"assertNonEmpty");function Dt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}o(Dt,"assertPath");function fo(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}o(fo,"isUint8Array$1");var ho=o((function(e){const t=this.constructor.prototype,n=t[e],r=o(function(){return n.apply(r,arguments)},"apply");return Object.setPrototypeOf(r,t),r}),"CallableInstance"),mo={}.hasOwnProperty,Do=class Qt extends ho{static{o(this,"Processor")}constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=eo()}copy(){const t=new Qt;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data((0,ke.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Se("data",this.frozen),this.namespace[t]=n,this):mo.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Se("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const l=n.call(t,...r);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=me(t),r=this.parser||this.Parser;return be("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),be("process",this.parser||this.Parser),xe("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(u,i){const a=me(t),c=r.parse(a);r.run(c,a,function(f,s,h){if(f||!s||!h)return p(f);const d=s,D=r.stringify(d,h);yo(D)?h.value=D:h.result=D,p(f,h)});function p(f,s){f||!s?i(f):u?u(s):n(void 0,s)}o(p,"realDone")}o(l,"executor")}processSync(t){let n=!1,r;return this.freeze(),be("processSync",this.parser||this.Parser),xe("processSync",this.compiler||this.Compiler),this.process(t,l),Ft("processSync","process",n),r;function l(u,i){n=!0,mt(u),r=i}o(l,"realDone")}run(t,n,r){gt(t),this.freeze();const l=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?u(void 0,r):new Promise(u);function u(i,a){const c=me(n);l.run(t,c,p);function p(f,s,h){const d=s||t;f?a(f):i?i(d):r(void 0,d,h)}o(p,"realDone")}o(u,"executor")}runSync(t,n){let r=!1,l;return this.run(t,n,u),Ft("runSync","run",r),l;function u(i,a){mt(i),l=a,r=!0}o(u,"realDone")}stringify(t,n){this.freeze();const r=me(n),l=this.compiler||this.Compiler;return xe("stringify",l),gt(t),l(t,r)}use(t,...n){const r=this.attachers,l=this.namespace;if(Se("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(p){if(typeof p=="function")c(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[f,...s]=p;c(f,s)}else i(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function i(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(p.plugins),p.settings&&(l.settings=(0,ke.default)(!0,l.settings,p.settings))}function a(p){let f=-1;if(p!=null)if(Array.isArray(p))for(;++f<p.length;){const s=p[f];u(s)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function c(p,f){let s=-1,h=-1;for(;++s<r.length;)if(r[s][0]===p){h=s;break}if(h===-1)r.push([p,...f]);else if(f.length>0){let[d,...D]=f;const F=r[h][1];Oe(F)&&Oe(d)&&(d=(0,ke.default)(!0,F,d)),r[h]=[p,d,...D]}}}},go=new Do().freeze();function be(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}o(be,"assertParser");function xe(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}o(xe,"assertCompiler");function Se(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}o(Se,"assertUnfrozen");function gt(e){if(!Oe(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}o(gt,"assertNode");function Ft(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}o(Ft,"assertDone");function me(e){return Fo(e)?e:new Jt(e)}o(me,"vfile");function Fo(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}o(Fo,"looksLikeAVFile");function yo(e){return typeof e=="string"||wo(e)}o(yo,"looksLikeAValue");function wo(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}o(wo,"isUint8Array");var yt=[],wt={allowDangerousHtml:!0},Co=/^(https?|ircs?|mailto|xmpp)$/i,ko=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Eo(e){const t=Ao(e),n=vo(e);return bo(t.runSync(t.parse(n),n),e)}o(Eo,"Markdown");function Ao(e){const t=e.rehypePlugins||yt,n=e.remarkPlugins||yt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wt}:wt;return go().use(fl).use(n).use(Jl,r).use(t)}o(Ao,"createProcessor");function vo(e){const t=e.children||"",n=new Jt;return typeof t=="string"?n.value=t:""+t,n}o(vo,"createFile");function bo(e,t){const n=t.allowedElements,r=t.allowElement,l=t.components,u=t.disallowedElements,i=t.skipHtml,a=t.unwrapDisallowed,c=t.urlTransform||en;for(const f of ko)Object.hasOwn(t,f.from)&&""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+f.id;return Ve(e,p),Gr(e,{Fragment:g.Fragment,components:l,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(f,s,h){if(f.type==="raw"&&h&&typeof s=="number")return i?h.children.splice(s,1):h.children[s]={type:"text",value:f.value},s;if(f.type==="element"){let d;for(d in Ce)if(Object.hasOwn(Ce,d)&&Object.hasOwn(f.properties,d)){const D=f.properties[d],F=Ce[d];(F===null||F.includes(f.tagName))&&(f.properties[d]=c(String(D||""),d,f))}}if(f.type==="element"){let d=n?!n.includes(f.tagName):u?u.includes(f.tagName):!1;if(!d&&r&&typeof s=="number"&&(d=!r(f,s,h)),d&&h&&typeof s=="number")return a&&f.children?h.children.splice(s,1,...f.children):h.children.splice(s,1),s}}o(p,"transform")}o(bo,"post");function en(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||r!==-1&&t>r||Co.test(e.slice(0,t))?e:""}o(en,"defaultUrlTransform");function xo(e,t,n){const r=zn((n||{}).ignore||[]),l=So(t);let u=-1;for(;++u<l.length;)Hn(e,"text",i);function i(c,p){let f=-1,s;for(;++f<p.length;){const h=p[f],d=s?s.children:void 0;if(r(h,d?d.indexOf(h):void 0,s))return;s=h}if(s)return a(c,p)}o(i,"visitor");function a(c,p){const f=p[p.length-1],s=l[u][0],h=l[u][1];let d=0;const D=f.children.indexOf(c);let F=!1,C=[];s.lastIndex=0;let b=s.exec(c.value);for(;b;){const k=b.index,E={index:b.index,input:b.input,stack:[...p,c]};let A=h(...b,E);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?s.lastIndex=k+1:(d!==k&&C.push({type:"text",value:c.value.slice(d,k)}),Array.isArray(A)?C.push(...A):A&&C.push(A),d=k+b[0].length,F=!0),!s.global)break;b=s.exec(c.value)}return F?(d<c.value.length&&C.push({type:"text",value:c.value.slice(d)}),f.children.splice(D,1,...C)):C=[c],D+C.length}o(a,"handler")}o(xo,"findAndReplace");function So(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const l=n[r];t.push([Bo(l[0]),Io(l[1])])}return t}o(So,"toPairs");function Bo(e){return typeof e=="string"?new RegExp(yr(e),"g"):e}o(Bo,"toExpression");function Io(e){return typeof e=="function"?e:function(){return e}}o(Io,"toFunction");var Be="phrasing",Ie=["autolink","link","image","label"];function Po(){return{transforms:[Oo],enter:{literalAutolink:Ro,literalAutolinkEmail:Pe,literalAutolinkHttp:Pe,literalAutolinkWww:Pe},exit:{literalAutolink:_o,literalAutolinkEmail:No,literalAutolinkHttp:jo,literalAutolinkWww:To}}}o(Po,"gfmAutolinkLiteralFromMarkdown");function Lo(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Be,notInConstruct:Ie},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Be,notInConstruct:Ie},{character:":",before:"[ps]",after:"\\/",inConstruct:Be,notInConstruct:Ie}]}}o(Lo,"gfmAutolinkLiteralToMarkdown");function Ro(e){this.enter({type:"link",title:null,url:"",children:[]},e)}o(Ro,"enterLiteralAutolink");function Pe(e){this.config.enter.autolinkProtocol.call(this,e)}o(Pe,"enterLiteralAutolinkValue");function jo(e){this.config.exit.autolinkProtocol.call(this,e)}o(jo,"exitLiteralAutolinkHttp");function To(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}o(To,"exitLiteralAutolinkWww");function No(e){this.config.exit.autolinkEmail.call(this,e)}o(No,"exitLiteralAutolinkEmail");function _o(e){this.exit(e)}o(_o,"exitLiteralAutolink");function Oo(e){xo(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mo],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zo]],{ignore:["link","linkReference"]})}o(Oo,"transformGfmAutolinkLiterals");function Mo(e,t,n,r,l){let u="";if(!tn(l)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!$o(n)))return!1;const i=Uo(n+r);if(!i[0])return!1;const a={type:"link",title:null,url:u+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[a,{type:"text",value:i[1]}]:a}o(Mo,"findUrl");function zo(e,t,n,r){return!tn(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}o(zo,"findEmail");function $o(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}o($o,"isCorrectDomain");function Uo(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const l=tt(e,"(");let u=tt(e,")");for(;r!==-1&&l>u;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),u++;return[e,n]}o(Uo,"splitUrl");function tn(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Z(n)||He(n))&&(!t||n!==47)}o(tn,"previous");nn.peek=Zo;function Ho(){this.buffer()}o(Ho,"enterFootnoteCallString");function Wo(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}o(Wo,"enterFootnoteCall");function Vo(){this.buffer()}o(Vo,"enterFootnoteDefinitionLabelString");function Ko(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}o(Ko,"enterFootnoteDefinition");function qo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}o(qo,"exitFootnoteCallString");function Xo(e){this.exit(e)}o(Xo,"exitFootnoteCall");function Yo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}o(Yo,"exitFootnoteDefinitionLabelString");function Go(e){this.exit(e)}o(Go,"exitFootnoteDefinition");function Zo(){return"["}o(Zo,"footnoteReferencePeek");function nn(e,t,n,r){const l=n.createTracker(r);let u=l.move("[^");const i=n.enter("footnoteReference"),a=n.enter("reference");return u+=l.move(n.safe(n.associationId(e),{after:"]",before:u})),a(),i(),u+=l.move("]"),u}o(nn,"footnoteReference");function Jo(){return{enter:{gfmFootnoteCallString:Ho,gfmFootnoteCall:Wo,gfmFootnoteDefinitionLabelString:Vo,gfmFootnoteDefinition:Ko},exit:{gfmFootnoteCallString:qo,gfmFootnoteCall:Xo,gfmFootnoteDefinitionLabelString:Yo,gfmFootnoteDefinition:Go}}}o(Jo,"gfmFootnoteFromMarkdown");function Qo(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:nn},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,l,u,i){const a=u.createTracker(i);let c=a.move("[^");const p=u.enter("footnoteDefinition"),f=u.enter("label");return c+=a.move(u.safe(u.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((t?`
|
|
14
14
|
`:" ")+u.indentLines(u.containerFlow(r,a.current()),t?rn:ei))),p(),c}o(n,"footnoteDefinition")}o(Qo,"gfmFootnoteToMarkdown");function ei(e,t,n){return t===0?e:rn(e,t,n)}o(ei,"mapExceptFirst");function rn(e,t,n){return(n?"":" ")+e}o(rn,"mapAll");function ti(){return[Po(),Jo(),$n(),Gn(),qn()]}o(ti,"gfmFromMarkdown");function ni(e){return{extensions:[Lo(),Qo(e),Un(),er(e),Xn()]}}o(ni,"gfmToMarkdown");var ri={tokenize:si,partial:!0},ln={tokenize:ci,partial:!0},on={tokenize:pi,partial:!0},un={tokenize:fi,partial:!0},li={tokenize:hi,partial:!0},an={name:"wwwAutolink",tokenize:ui,previous:cn},sn={name:"protocolAutolink",tokenize:ai,previous:pn},W={name:"emailAutolink",tokenize:ii,previous:fn},U={};function oi(){return{text:U}}o(oi,"gfmAutolinkLiteral");var q=48;for(;q<123;)U[q]=W,q++,q===58?q=65:q===91&&(q=97);U[43]=W;U[45]=W;U[46]=W;U[95]=W;U[72]=[W,sn];U[104]=[W,sn];U[87]=[W,an];U[119]=[W,an];function ii(e,t,n){const r=this;let l,u;return i;function i(s){return!ze(s)||!fn.call(r,r.previous)||Je(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(s))}function a(s){return ze(s)?(e.consume(s),a):s===64?(e.consume(s),c):n(s)}function c(s){return s===46?e.check(li,f,p)(s):s===45||s===95||le(s)?(u=!0,e.consume(s),c):f(s)}function p(s){return e.consume(s),l=!0,c}function f(s){return u&&l&&re(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}}o(ii,"tokenizeEmailAutolink");function ui(e,t,n){const r=this;return l;function l(i){return i!==87&&i!==119||!cn.call(r,r.previous)||Je(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ri,e.attempt(ln,e.attempt(on,u),n),n)(i))}function u(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}o(ui,"tokenizeWwwAutolink");function ai(e,t,n){const r=this;let l="",u=!1;return i;function i(s){return(s===72||s===104)&&pn.call(r,r.previous)&&!Je(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(s),e.consume(s),a):n(s)}function a(s){if(re(s)&&l.length<5)return l+=String.fromCodePoint(s),e.consume(s),a;if(s===58){const h=l.toLowerCase();if(h==="http"||h==="https")return e.consume(s),c}return n(s)}function c(s){return s===47?(e.consume(s),u?p:(u=!0,c)):n(s)}function p(s){return s===null||Wn(s)||$(s)||Z(s)||He(s)?n(s):e.attempt(ln,e.attempt(on,f),n)(s)}function f(s){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(s)}}o(ai,"tokenizeProtocolAutolink");function si(e,t,n){let r=0;return l;function l(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),l):i===46&&r===3?(e.consume(i),u):n(i)}function u(i){return i===null?n(i):t(i)}}o(si,"tokenizeWwwPrefix");function ci(e,t,n){let r,l,u;return i;function i(p){return p===46||p===95?e.check(un,c,a)(p):p===null||$(p)||Z(p)||p!==45&&He(p)?c(p):(u=!0,e.consume(p),i)}function a(p){return p===95?r=!0:(l=r,r=void 0),e.consume(p),i}function c(p){return l||r||!u?n(p):t(p)}}o(ci,"tokenizeDomain");function pi(e,t){let n=0,r=0;return l;function l(i){return i===40?(n++,e.consume(i),l):i===41&&r<n?u(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(un,t,u)(i):i===null||$(i)||Z(i)?t(i):(e.consume(i),l)}function u(i){return i===41&&r++,e.consume(i),l}}o(pi,"tokenizePath");function fi(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),u):a===93?(e.consume(a),l):a===60||a===null||$(a)||Z(a)?t(a):n(a)}function l(a){return a===null||a===40||a===91||$(a)||Z(a)?t(a):r(a)}function u(a){return re(a)?i(a):n(a)}function i(a){return a===59?(e.consume(a),r):re(a)?(e.consume(a),i):n(a)}}o(fi,"tokenizeTrail");function hi(e,t,n){return r;function r(u){return e.consume(u),l}function l(u){return le(u)?n(u):t(u)}}o(hi,"tokenizeEmailDomainDotTrail");function cn(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||$(e)}o(cn,"previousWww");function pn(e){return!re(e)}o(pn,"previousProtocol");function fn(e){return!(e===47||ze(e))}o(fn,"previousEmail");function ze(e){return e===43||e===45||e===46||e===95||le(e)}o(ze,"gfmAtext");function Je(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}o(Je,"previousUnbalanced");var di={tokenize:ki,partial:!0};function mi(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yi,continuation:{tokenize:wi},exit:Ci}},text:{91:{name:"gfmFootnoteCall",tokenize:Fi},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Di,resolveTo:gi}}}}o(mi,"gfmFootnote");function Di(e,t,n){const r=this;let l=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;l--;){const c=r.events[l][1];if(c.type==="labelImage"){i=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!i||!i._balanced)return n(c);const p=ue(r.sliceSerialize({start:i.end,end:r.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}o(Di,"tokenizePotentialGfmFootnoteCall");function gi(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",u,t],["enter",i,t],["exit",i,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}o(gi,"resolveToPotentialGfmFootnoteCall");function Fi(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,i;return a;function a(s){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),c}function c(s){return s!==94?n(s):(e.enter("gfmFootnoteCallMarker"),e.consume(s),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(s){if(u>999||s===93&&!i||s===null||s===91||$(s))return n(s);if(s===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return l.includes(ue(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return $(s)||(i=!0),u++,e.consume(s),s===92?f:p}function f(s){return s===91||s===92||s===93?(e.consume(s),u++,p):p(s)}}o(Fi,"tokenizeGfmFootnoteCall");function yi(e,t,n){const r=this,l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,i=0,a;return c;function c(D){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(D),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(D){return D===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(D),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(D)}function f(D){if(i>999||D===93&&!a||D===null||D===91||$(D))return n(D);if(D===93){e.exit("chunkString");const F=e.exit("gfmFootnoteDefinitionLabelString");return u=ue(r.sliceSerialize(F)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(D),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return $(D)||(a=!0),i++,e.consume(D),D===92?s:f}function s(D){return D===91||D===92||D===93?(e.consume(D),i++,f):f(D)}function h(D){return D===58?(e.enter("definitionMarker"),e.consume(D),e.exit("definitionMarker"),l.includes(u)||l.push(u),Pt(e,d,"gfmFootnoteDefinitionWhitespace")):n(D)}function d(D){return t(D)}}o(yi,"tokenizeDefinitionStart");function wi(e,t,n){return e.check(Yn,t,e.attempt(di,t,n))}o(wi,"tokenizeDefinitionContinuation");function Ci(e){e.exit("gfmFootnoteDefinition")}o(Ci,"gfmFootnoteDefinitionEnd");function ki(e,t,n){const r=this;return Pt(e,l,"gfmFootnoteDefinitionIndent",5);function l(u){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(u):n(u)}}o(ki,"tokenizeIndent");function Ei(e){return Vn([oi(),mi(),tr(e),Kn(),Jn()])}o(Ei,"gfm");var Ai={};function vi(e){const t=this,n=e||Ai,r=t.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(Ei(n)),u.push(ti()),i.push(ni(n))}o(vi,"remarkGfm");var bi=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,xi=Object.hasOwnProperty,Si=class{static{o(this,"BananaSlug")}constructor(){this.occurrences,this.reset()}slug(e,t){const n=this;let r=Bi(e,t===!0);const l=r;for(;xi.call(n.occurrences,r);)n.occurrences[l]++,r=l+"-"+n.occurrences[l];return n.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}};function Bi(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(bi,"").replace(/ /g,"-"))}o(Bi,"slug");function Ii(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}o(Ii,"headingRank");function Pi(e){return"children"in e?hn(e):"value"in e?e.value:""}o(Pi,"toString");function Li(e){return e.type==="text"?e.value:"children"in e?hn(e):""}o(Li,"one");function hn(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Li(e.children[t]);return n.join("")}o(hn,"all");var Ri={},Ct=new Si;function ji(e){const t=(e||Ri).prefix||"";return function(n){Ct.reset(),Ve(n,"element",function(r){Ii(r)&&!r.properties.id&&(r.properties.id=t+Ct.slug(Pi(r)))})}}o(ji,"rehypeSlug");var Ti=/^[A-Z][A-Z0-9]*-C\d+$/i,Ni=/\b[A-Z][A-Z0-9]*-C\d+\b/gi;function dn(e,t){if(!e)return null;const n=e.trim();if(!Ti.test(n))return null;const r=n.toUpperCase();if(t&&t.size>0){const l=r.split("-")[0];if(!l||!t.has(l))return null}return{identifier:r,href:`/cases/${encodeURIComponent(r)}`}}o(dn,"parseCaseReferenceFromHref");function mn(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}o(mn,"createCaseLinkNode");function _i(e,t){const n=[];let r=0,l=!1;for(const u of e.matchAll(Ni)){const i=u[0];if(!i)continue;const a=dn(i,t);if(!a)continue;const c=u.index??0;l=!0,c>r&&n.push({type:"text",value:e.slice(r,c)}),n.push(mn(i,a.href)),r=c+i.length}return l?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}o(_i,"linkifyCaseReferencesInText");function Dn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const l=dn(r.value,t);if(l){n.push(mn(r.value,l.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const l=_i(r.value,t);if(l){n.push(...l);continue}}Dn(r,t),n.push(r)}e.children=n}o(Dn,"rewriteMarkdownTree$1");function Oi(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{Dn(n,t)}}o(Oi,"remarkLinkCaseReferences");var Mi=/^([A-Za-z0-9_.\-+][A-Za-z0-9_./\-+]*\.[A-Za-z0-9_+\-]{1,10})(?::([1-9]\d*)(?::([1-9]\d*))?|#L([1-9]\d*)(?:C([1-9]\d*))?)?$/,zi=/^([A-Za-z0-9_.\-+][A-Za-z0-9_./\-+]+\/[A-Za-z0-9_.\-+]+)(?::([1-9]\d*)(?::([1-9]\d*))?|#L([1-9]\d*)(?:C([1-9]\d*))?)?$/,$i=/^([A-Za-z0-9_.\-+][A-Za-z0-9_./\-+]*\/)$/,Ui=["/","./","../","~/"];function De(e){if(!e)return null;const t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0?null:t}o(De,"toPositiveInt");function kt(e,t){if(!e||e.length>512||e.includes("\\")||e.includes("\0")||e.startsWith("/")||e.startsWith("~")||/^[A-Za-z]:/.test(e)||e.includes("//")||Ui.some(l=>e===l.slice(0,-1)))return!1;const n=t.allowTrailingSlash&&e.endsWith("/")?e.slice(0,-1):e;if(!n||/^\.+$/.test(n))return!1;const r=n.split("/");for(const l of r)if(l===""||l==="."||l==="..")return!1;return!0}o(kt,"looksLikeWorkspacePath");function gn(e){if(typeof e!="string")return null;const t=e.trim();if(!t)return null;const n=t.match($i);if(n){const[,s]=n;return!s||!kt(s,{allowTrailingSlash:!0})||!s.slice(0,-1).includes("/")?null:{path:s,resourceKind:"directory",line:null,column:null,raw:t}}const r=t.match(Mi)??t.match(zi);if(!r)return null;const[,l,u,i,a,c]=r;if(!l||!kt(l,{allowTrailingSlash:!1}))return null;const p=De(u)??De(a),f=De(i)??De(c);return!l.includes("/")&&p===null?null:{path:l,resourceKind:"file",line:p,column:f,raw:t}}o(gn,"parseWorkspaceFileRef");function Hi(e){const t=e.line&&e.column?`${e.path}:${e.line}:${e.column}`:e.line?`${e.path}:${e.line}`:e.path;return e.projectName?`${e.projectName} / ${t}`:t}o(Hi,"formatWorkspaceFileRefDisplay");var Fn="workspace-file:";function yn(e){const t=new URLSearchParams;return e.projectId&&t.set("projectId",e.projectId),e.workspaceId&&t.set("workspaceId",e.workspaceId),e.workspace&&e.workspace!=="auto"&&t.set("workspace",e.workspace),e.resourceKind==="directory"&&t.set("kind","directory"),t.set("path",e.path),e.line!==null&&t.set("line",String(e.line)),e.column!==null&&t.set("column",String(e.column)),e.projectName&&t.set("projectName",e.projectName),`${Fn}?${t.toString()}`}o(yn,"buildWorkspaceFileHref");function Wi(e){if(!e||typeof e!="string"||!e.startsWith(Fn))return null;const t=e.slice(15),n=t.startsWith("?")?t.slice(1):t,r=new URLSearchParams(n),l=r.get("path");if(!l)return null;const u=r.get("projectId"),i=r.get("workspaceId"),a=!!(u&&i),c=r.get("projectName"),p=r.get("workspace"),f=p==="execution"||p==="project"?p:"auto",s=r.get("kind"),h=r.get("line"),d=r.get("column"),D=h?Number.parseInt(h,10):NaN,F=d?Number.parseInt(d,10):NaN;return{path:l,resourceKind:s==="directory"||l.endsWith("/")?"directory":"file",line:Number.isFinite(D)&&D>0?D:null,column:Number.isFinite(F)&&F>0?F:null,projectId:a?u:null,workspaceId:a?i:null,projectName:c||null,workspace:f,raw:l}}o(Wi,"parseWorkspaceFileHref");function Vi(e){return{type:"link",url:yn(e),children:[{type:"inlineCode",value:e.raw}]}}o(Vi,"createWorkspaceFileLinkNode");function Ki(e){if(!Array.isArray(e.children)||e.children.length!==1)return null;const[t]=e.children;return t?.type!=="inlineCode"||typeof t.value!="string"?null:gn(t.value)}o(Ki,"parseSingleInlineCodeFileRef");function qi(e,t){return{...e,workspace:t.workspace,projectId:t.projectId??e.projectId??null,workspaceId:t.workspaceId??e.workspaceId??null,projectName:e.projectName??null}}o(qi,"applyResolvedTarget");function Et(e,t){const n=t(e);return n?qi(e,n):null}o(Et,"openableRef");function wn(e,t){if(!Array.isArray(e.children)||e.children.length===0)return;if(e.type==="link"){const r=Ki(e),l=r?Et(r,t):null;l&&(e.url=yn(l));return}if(e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const l=gn(r.value),u=l?Et(l,t):null;if(u){n.push(Vi(u));continue}}wn(r,t),n.push(r)}e.children=n}o(wn,"rewriteMarkdownTree");function Xi(e){return o(function(){return n=>{wn(n,e)}},"remarkWorkspaceFileRefs")}o(Xi,"createRemarkWorkspaceFileRefs");function Yi(e){return typeof e=="object"&&e!==null&&Array.isArray(e.children)}o(Yi,"isParentNode");function Gi(e){const t=e.split(`
|
|
15
15
|
`),n=[];for(let r=0;r<t.length;r+=1){const l=t[r];l.length>0&&n.push({type:"text",value:l}),r<t.length-1&&n.push({type:"break"})}return n.length>0?n:[{type:"text",value:""}]}o(Gi,"buildSoftBreakReplacement");function Cn(e){if(Yi(e))for(let t=0;t<e.children.length;t+=1){const n=e.children[t];if(n?.type==="text"&&typeof n.value=="string"&&n.value.includes(`
|
|
16
|
-
`)){const r=Gi(n.value);e.children.splice(t,1,...r),t+=r.length-1;continue}Cn(n)}}o(Cn,"transformNode");function Zi(){return e=>{Cn(e)}}o(Zi,"remarkSoftBreaks");function ge(e){const t=new URLSearchParams;return e.projectId&&e.workspaceId&&(t.set("projectId",e.projectId),t.set("workspaceId",e.workspaceId)),"path"in e&&e.path&&t.set("path",e.path),e.workspace&&e.workspace!=="auto"&&t.set("workspace",e.workspace),"mode"in e&&e.mode&&e.mode!=="all"&&t.set("mode",e.mode),"q"in e&&e.q&&t.set("q",e.q),"limit"in e&&e.limit&&t.set("limit",String(e.limit)),"offset"in e&&e.offset&&t.set("offset",String(e.offset)),t.toString()}o(ge,"buildQuery");function Ji(e,t){const n=new URLSearchParams(ge(t));return n.set("download","1"),`/api/issues/${encodeURIComponent(e)}/file-resources/content?${n.toString()}`}o(Ji,"buildFileResourceDownloadUrl");var Qi={list(e,t={},n){const r=ge(t),l=r?`?${r}`:"";return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/list${l}`,n)},availability(e,t){return fe.post(`/issues/${encodeURIComponent(e)}/file-resources/availability`,{queries:t.map(n=>({path:n.path,...n.workspace&&n.workspace!=="auto"?{workspace:n.workspace}:{},...n.projectId&&n.workspaceId?{projectId:n.projectId,workspaceId:n.workspaceId}:{}}))})},resolve(e,t){return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/resolve?${ge(t)}`)},content(e,t){return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/content?${ge(t)}`)},downloadUrl:Ji};var eu=3e4,tu={state:"pending"};function ia(e){return{path:e.path,workspace:e.workspace??"auto",projectId:e.projectId??null,workspaceId:e.workspaceId??null}}o(ia,"workspaceFileAvailabilityRef");function At(e){return JSON.stringify([e.workspace,e.projectId,e.workspaceId,e.path])}o(At,"workspaceFileAvailabilityKey");function nu(e,t=100){if(e.length<=t)return e.length>0?[e]:[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}o(nu,"chunkWorkspaceFileAvailabilityRefs");function ru(e){return e.workspaceKind==="project_workspace"&&e.projectId&&e.workspaceId?{workspace:"project",projectId:e.projectId,workspaceId:e.workspaceId,projectName:e.projectName??null}:{workspace:e.workspaceKind==="project_workspace"?"project":"execution",projectId:null,workspaceId:null,projectName:e.projectName??null}}o(ru,"workspaceFileAvailabilityTarget");function lu(e){return!e.openable||!e.resource?{state:"unavailable",reason:e.unavailableReason??null}:{state:"openable",target:ru(e.resource)}}o(lu,"workspaceFileAvailabilityFromResult");var ou=2;function iu(e,t){return e[0]==="issues"&&e[1]==="file-resources"&&e[2]===t}o(iu,"isFileResourceKeyForIssue");function uu(e){const t=Pn(),[n,r]=(0,w.useState)(0),l=(0,w.useRef)(new Map),u=(0,w.useRef)(new Map),i=(0,w.useRef)(new Set),a=(0,w.useRef)([]),c=(0,w.useRef)(0),p=(0,w.useRef)(null),f=(0,w.useRef)(!0),s=(0,w.useRef)(0),h=(0,w.useRef)(t);h.current=t;const d=(0,w.useRef)(e);d.current!==e&&(d.current=e,s.current+=1,p.current!==null&&(clearTimeout(p.current),p.current=null),l.current.clear(),u.current.clear(),i.current.clear(),a.current=[]);const D=(0,w.useCallback)(()=>{f.current&&r(E=>E+1)},[]),F=(0,w.useCallback)(async({chunk:E,issueId:A,generation:y})=>{const B=E.map(([x])=>x).sort();try{const x=await h.current.fetchQuery({queryKey:St.issues.fileResourceAvailability(A,B),queryFn:o(()=>Qi.availability(A,E.map(([,j])=>j)),"queryFn"),staleTime:eu});if(y!==s.current)return;const _=new Map(x.results.map(j=>[At(j.query),lu(j)]));for(const[j]of E)l.current.set(j,_.get(j)??{state:"unavailable",reason:"unmatched_reference"}),i.current.delete(j);D()}catch{if(y!==s.current)return;for(const[x]of E)i.current.delete(x)}},[D]),C=(0,w.useCallback)(()=>{for(;c.current<ou&&a.current.length>0;){const E=a.current.shift();c.current+=1,F(E).finally(()=>{c.current-=1,C()})}},[F]),b=(0,w.useCallback)(()=>{p.current=null;const E=[...u.current.entries()];u.current.clear();const A=E.filter(([y])=>!i.current.has(y)&&!l.current.has(y));if(A.length!==0){for(const[y]of A)i.current.add(y);a.current.push(...nu(A).map(y=>({chunk:y,issueId:e,generation:s.current}))),C()}},[C,e]),k=(0,w.useCallback)(E=>{const A=At(E),y=l.current.get(A);return y||(!i.current.has(A)&&!u.current.has(A)&&(u.current.set(A,E),p.current===null&&(p.current=setTimeout(b,0))),tu)},[b]);return(0,w.useEffect)(()=>(f.current=!0,u.current.size>0&&p.current===null&&(p.current=setTimeout(b,0)),()=>{f.current=!1,p.current!==null&&(clearTimeout(p.current),p.current=null)}),[b]),(0,w.useEffect)(()=>t.getQueryCache().subscribe(E=>{E.type!=="updated"||E.action.type!=="invalidate"||iu(E.query.queryKey,e)&&l.current.size!==0&&(l.current.clear(),D())}),[D,e,t]),(0,w.useMemo)(()=>({version:n,check:k}),[n,k])}o(uu,"useWorkspaceFileAvailability");var Qe=(0,w.createContext)(null),au={replace:!1,preventScrollReset:!0};function kn(e){return typeof window>"u"?e:window.location.search}o(kn,"getCurrentFileViewerSearch");function su(e,t){return e!==kn(t)}o(su,"shouldNavigateFileViewerSearch");function cu(e){const t=new URLSearchParams(e),n=t.get("file");if(!n)return null;const r=t.get("line"),l=t.get("column"),u=t.get("workspace"),i=t.get("projectId"),a=t.get("workspaceId"),c=!!(i&&a),p=r?Number.parseInt(r,10):NaN,f=l?Number.parseInt(l,10):NaN,s=u==="execution"||u==="project"?u:"auto";return{path:n,line:Number.isFinite(p)&&p>0?p:null,column:Number.isFinite(f)&&f>0?f:null,workspace:s,projectId:c?i:null,workspaceId:c?a:null}}o(cu,"readFileViewerStateFromSearch");function $e(e,t){const n=new URLSearchParams(e);n.delete("browse"),n.delete("q"),n.delete("folder"),t?(n.set("file",t.path),t.line!==null?n.set("line",String(t.line)):n.delete("line"),t.column!==null?n.set("column",String(t.column)):n.delete("column"),t.workspace&&t.workspace!=="auto"?n.set("workspace",t.workspace):n.delete("workspace"),t.projectId?n.set("projectId",t.projectId):n.delete("projectId"),t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId")):(n.delete("file"),n.delete("line"),n.delete("column"),n.delete("workspace"),n.delete("projectId"),n.delete("workspaceId"));const r=n.toString();return r?`?${r}`:""}o($e,"writeFileViewerStateToSearch");function pu(e){const t=new URLSearchParams(e);if(t.get("browse")!=="1")return null;const n=t.get("q"),r=t.get("folder"),l=t.get("projectId"),u=t.get("workspaceId");return{q:n&&n.length>0?n:null,folderPath:r&&r.length>0?r:null,projectId:l||null,workspaceId:u||null}}o(pu,"readBrowseStateFromSearch");function En(e,t){const n=new URLSearchParams(e);n.delete("file"),n.delete("line"),n.delete("column"),n.delete("workspace"),n.delete("q"),n.set("browse","1"),n.set("folder",t.path),t.projectId?n.set("projectId",t.projectId):n.delete("projectId"),t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId");const r=n.toString();return r?`?${r}`:""}o(En,"writeFolderViewerStateToSearch");function fu(e,t){const n=new URLSearchParams(e);if(n.set("browse","1"),"q"in t){const l=t.q?.trim()??"";l?n.set("q",l):n.delete("q")}if("folderPath"in t){const l=t.folderPath?.trim()??"";l?n.set("folder",l):n.delete("folder")}"projectId"in t&&(t.projectId?n.set("projectId",t.projectId):n.delete("projectId")),"workspaceId"in t&&(t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId"));const r=n.toString();return r?`?${r}`:""}o(fu,"writeBrowseStateToSearch");function ua({issueId:e,children:t,enabled:n=!0}){return n?(0,g.jsx)(hu,{issueId:e,children:t}):(0,g.jsx)(g.Fragment,{children:t})}o(ua,"FileViewerProvider");function hu({issueId:e,children:t}){const n=It(),r=On(),l=(0,w.useMemo)(()=>cu(n.search),[n.search]),u=(0,w.useMemo)(()=>pu(n.search),[n.search]),i=uu(e),a=(0,w.useCallback)((F,C)=>{su(F,n.search)&&r({pathname:n.pathname,hash:n.hash,search:F},{...au,...C,state:n.state})},[n.hash,n.pathname,n.state,r]),c=(0,w.useCallback)((F,C)=>{let b=$e(n.search,{path:F.path,line:F.line??null,column:F.column??null,workspace:F.workspace??"auto",projectId:F.projectId??null,workspaceId:F.workspaceId??null});if(C?.fromBrowse){const k=new URLSearchParams(b);k.set("browse","1");const E=new URLSearchParams(n.search),A=E.get("q"),y=E.get("folder"),B=Object.prototype.hasOwnProperty.call(C.browseState??{},"q")?C.browseState?.q:A,x=Object.prototype.hasOwnProperty.call(C.browseState??{},"folderPath")?C.browseState?.folderPath:y;B?k.set("q",B):k.delete("q"),x?k.set("folder",x):k.delete("folder"),b=k.toString()?`?${k.toString()}`:""}a(b)},[n.search,a]),p=(0,w.useCallback)(F=>{const C=new URLSearchParams(n.search);C.delete("file"),C.delete("line"),C.delete("column"),C.delete("folder"),C.set("browse","1"),typeof F?.q=="string"&&F.q.length>0?C.set("q",F.q):C.delete("q"),a(C.toString()?`?${C.toString()}`:"")},[n.search,a]),f=(0,w.useCallback)(F=>{a(fu(n.search,F),{replace:!0})},[n.search,a]),s=(0,w.useCallback)(F=>{const C=En(n.search,{path:F.path,projectId:F.projectId??null,workspaceId:F.workspaceId??null});a(C)},[n.search,a]),h=(0,w.useCallback)(()=>{const F=new URLSearchParams(n.search);F.delete("file"),F.delete("line"),F.delete("column"),F.delete("workspace"),F.set("browse","1"),a(F.toString()?`?${F.toString()}`:"")},[n.search,a]),d=(0,w.useCallback)(()=>{const F=kn(n.search),C=new URLSearchParams($e(F,null).replace(/^\?/,""));C.delete("browse"),C.delete("q"),C.delete("folder"),a(C.toString()?`?${C.toString()}`:"")},[n.search,a]),D=(0,w.useMemo)(()=>({issueId:e,availability:i,state:l,browse:u!==null,query:u?.q??null,browseProjectId:u?.projectId??null,browseWorkspaceId:u?.workspaceId??null,folderPath:u?.folderPath??null,open:c,openBrowse:p,updateBrowseState:f,openFolder:s,backToFiles:h,close:d}),[e,i,l,u,c,p,f,s,h,d]);return(0,g.jsx)(Qe.Provider,{value:D,children:t})}o(hu,"EnabledFileViewerProvider");function du(){return(0,w.useContext)(Qe)}o(du,"useFileViewer");function aa(){const e=(0,w.useContext)(Qe);if(!e)throw new Error("useRequiredFileViewer must be used within a FileViewerProvider");return e}o(aa,"useRequiredFileViewer");function mu({workspaceFileRef:e,label:t,className:n,onOpen:r,showIcon:l=!0,title:u}){const i=du(),a=It(),c=typeof t<"u"?t:Hi(e),p=!!(r||i),f=e.resourceKind==="directory"||e.path.endsWith("/"),s=e.line?` line ${e.line}${e.column?` column ${e.column}`:""}`:"",h=p?`Open ${e.path}${s} in the ${f?"workspace browser":"file viewer"}`:`Workspace ${f?"folder":"file"} ${e.path}${s}`,d=u??(p?`Open ${e.path}${s} in the ${f?"workspace browser":"file viewer"}`:`Workspace ${f?"folder":"file"} ${e.path}${s}`),D=f?En(a.search,{path:e.path,projectId:e.projectId??null,workspaceId:e.workspaceId??null}):$e(a.search,{path:e.path,line:e.line??null,column:e.column??null,workspace:e.workspace??"auto",projectId:e.projectId??null,workspaceId:e.workspaceId??null}),F=p?`${a.pathname}${D}${a.hash}`:"#",C=o(b=>{b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||b.button===0&&(b.preventDefault(),p&&(r?r(e):f?i?.openFolder(e):i?.open(e)))},"handleClick");return(0,g.jsxs)("a",{href:F,role:p?"button":void 0,"data-workspace-file-link":"true","data-workspace-file-path":e.path,"aria-label":h,title:d,className:H("paperclip-workspace-file-link inline-flex items-center gap-1 rounded-sm border border-border bg-muted/60 px-1.5 py-0.5 font-mono text-xs leading-tight text-foreground/90 align-middle no-underline hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",n),onClick:C,children:[l?f?(0,g.jsx)(fr,{"aria-hidden":"true",className:"h-3 w-3 shrink-0 opacity-70"}):(0,g.jsx)(Dr,{"aria-hidden":"true",className:"h-3 w-3 shrink-0 opacity-70"}):null,(0,g.jsx)("span",{className:"max-w-full whitespace-normal break-all text-left",children:c})]})}o(mu,"WorkspaceFileLink");function Du({category:e,liveness:t,statusIconKey:n,label:r,className:l,sizeClassName:u="h-3.5 w-3.5",inline:i=!1}){const a=ir(),c=lr(n)??nr(e),p=n==="git-merge"?"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400":cr[e]??"text-muted-foreground border-muted-foreground",f=t==="fresh"||t==="unknown"?"":` (${jt(t)})`,s=`${r??Rt(e)}${f}`,h=i?"relative mr-1 inline-flex shrink-0 align-(--va-0_125em)":"relative inline-flex shrink-0",d=i?"h-3 w-3":u,D=e==="running"&&!a?"animate-spin":"";return(0,g.jsxs)("span",{role:"img","aria-label":s,className:H(h,l),children:[(0,g.jsx)(c,{"aria-hidden":"true",className:H(d,p.split(" ").filter(F=>F.startsWith("text-")).join(" "),D)}),t==="stale"?(0,g.jsx)(ar,{"aria-hidden":"true",className:H("absolute -bottom-0.5 -right-0.5 h-2 w-2 rounded-full bg-background text-muted-foreground",i?"":"p-px")}):null]})}o(Du,"ExternalObjectStatusIcon");var gu=/^\/cases\/([A-Z][A-Z0-9]*-C\d+)$/i,Fu=[ji];function yu(e){if(!e)return null;const t=decodeURIComponent(e.trim()).match(gu);return t?t[1].toUpperCase():null}o(yu,"caseIdentifierFromHref");var Le=null;function wu({issuePathId:e,children:t}){const{data:n}=Rn({queryKey:St.issues.detail(e),queryFn:o(()=>Tn.get(e),"queryFn"),staleTime:6e4}),r=n?.identifier??e,l=n?.title??r,u=n?.status,i=l!==r?`Issue ${r}: ${l}`:`Issue ${r}`;return(0,g.jsxs)(Ue,{to:`/issues/${r}`,"data-mention-kind":"issue",className:H("paperclip-markdown-issue-ref","font-normal underline"),title:l,"aria-label":i,children:[u?(0,g.jsx)(ur,{status:u,size:"md",className:"relative -top-px mr-1 inline-block h-4 w-4 align-middle"}):null,t]})}o(wu,"MarkdownIssueLink");function Cu({identifier:e,children:t}){const n=Nn();return(0,g.jsx)(Ue,{to:n(e),"data-mention-kind":"case",className:H("paperclip-markdown-case-ref","font-normal underline"),"aria-label":`Case ${e}`,children:t})}o(Cu,"MarkdownCaseLink");function ku({href:e,reference:t,children:n}){const r=rr(t.providerKey),l=t.displayKey?.trim()||r,u=t.statusLabel??Rt(t.statusCategory),i=jt(t.liveness),a=t.liveness==="fresh"||t.liveness==="unknown"?"":` (${i})`,c=[t.displayTitle??`${l} ${u}`,`${l} — ${u}${a}`].filter(Boolean).join(" · ");return(0,g.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer","data-external-link":"resolved","data-external-status":t.statusCategory,"data-external-liveness":t.liveness,title:c,"aria-label":`${l} ${u}${a}: ${t.displayTitle??e}`,className:"paperclip-markdown-external-ref",children:[(0,g.jsx)(Du,{category:t.statusCategory,liveness:t.liveness,statusIconKey:t.statusIconKey,label:`${l}: ${u}`,inline:!0}),n]})}o(ku,"MarkdownExternalLink");function Eu(){return Le||(Le=jn(()=>import("./mermaid.core-G_BSi0G0.js").then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),Le}o(Eu,"loadMermaid");var Au={overflowWrap:"anywhere",wordBreak:"break-word"},vu={maxWidth:"100%",overflowX:"auto"},bu={position:"absolute",top:"0.4rem",right:"0.4rem",display:"inline-flex",alignItems:"center",gap:"0.25rem"},An={position:"static",opacity:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",minHeight:"1.55rem",padding:"0.2rem 0.4rem",borderRadius:"calc(var(--radius) - 4px)",border:"1px solid color-mix(in oklab, var(--foreground) 14%, transparent)",backgroundColor:"var(--background)",color:"var(--muted-foreground)",fontSize:"var(--text-micro)",lineHeight:1,cursor:"pointer"},vt={...An,width:"1.55rem",paddingInline:0},xu={overflowWrap:"anywhere",wordBreak:"normal"};function Su(e){return e.type==="html"&&typeof e.value=="string"&&/^<!--[\s\S]*-->$/.test(e.value.trim())}o(Su,"isHtmlCommentNode");function Bu(e){if(e.type!=="text"||typeof e.value!="string")return!1;const t=e.value.trim();return/^\\?<!--(?:\s*-{0,2}>?)?$/.test(t)||/^<!--(?:\s*-{0,2}(?:>)?)?$/.test(t)}o(Bu,"isEscapedHtmlCommentPlaceholder");function Iu(){return e=>{const t=o(n=>{const r=n.children;if(r){n.children=r.filter(l=>!Su(l)&&!Bu(l));for(const l of n.children)t(l)}},"visit");t(e)}}o(Iu,"remarkDropHtmlComments");function K(e){return{...Au,...e}}o(K,"mergeWrapStyle");function bt(e){return{...xu,...e}}o(bt,"mergeTableCellStyle");function Pu(e){return{...vu,...e}}o(Pu,"mergeScrollableBlockStyle");function et(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(t=>et(t)).join(""):""}o(et,"flattenText");function Lu(e){if(!(0,w.isValidElement)(e))return null;const t=e.props;return typeof t.className!="string"||!/\blanguage-mermaid\b/i.test(t.className)?null:et(t.children).replace(/\n$/,"")}o(Lu,"extractMermaidSource");function Ru(e){return e.startsWith("workspace-file:")||Lt(e)?e:en(e)}o(Ru,"safeMarkdownUrlTransform");var ju=/\[\[([^\]\r\n]+)\]\]/g,Tu=new Set(["definition","image","imageReference","link","linkReference"]);function Nu(e){const[t,...n]=e.split("|"),r=t?.trim()??"",l=n.length>0?n.join("|").trim():r;return!r||r.includes("[")||r.includes("]")?null:{target:r,label:l||r}}o(Nu,"parseWikiLinkBody");function _u(e){const t=e.trim();if(!t||/^[a-z][a-z\d+.-]*:/i.test(t)||t.startsWith("//"))return null;const n=t.indexOf("#"),r=(n>=0?t.slice(0,n):t).trim().replace(/^\/+/,"");if(!r||r.includes("\\")||r.split("/").some(i=>!i||i==="."||i===".."))return null;const l=r.split("/").map(i=>encodeURIComponent(i)).join("/"),u=n>=0?t.slice(n+1).trim():"";return u?`${l}#${encodeURIComponent(u)}`:l}o(_u,"encodeWikiLinkTarget");function xt(e,t){const n=_u(e);if(!n)return null;const r=t?.trim().replace(/\/+$/,"")??"";return r?`${r}/${n}`:n}o(xt,"defaultWikiLinkHref");function Ou(e,t){return{type:"link",url:e,title:null,data:{hProperties:{"data-paperclip-wiki-link":"true","data-paperclip-wiki-target":t.target}},children:[{type:"text",value:t.label}]}}o(Ou,"createWikiLinkNode");function Mu(e,t){const n=[];let r=0;for(const l of e.matchAll(ju)){const u=l[0]??"",i=l[1]??"",a=l.index??0;a>r&&n.push({type:"text",value:e.slice(r,a)});const c=Nu(i);let p=null;if(c)if(t.resolveWikiLinkHref){const f=t.resolveWikiLinkHref(c.target,c.label);p=f===void 0?xt(c.target,t.wikiLinkRoot):f}else p=xt(c.target,t.wikiLinkRoot);c&&p?n.push(Ou(p,c)):n.push({type:"text",value:u}),r=a+u.length}return r<e.length&&n.push({type:"text",value:e.slice(r)}),n}o(Mu,"splitTextByWikiLinks");function vn(e,t){!e.children||Tu.has(e.type??"")||(e.children=e.children.flatMap(n=>n.type==="text"&&typeof n.value=="string"&&n.value.includes("[[")?Mu(n.value,t):(vn(n,t),n)))}o(vn,"transformWikiLinkChildren");function zu(e){return o(function(){return n=>{vn(n,e)}},"remarkWikiLinks")}o(zu,"createRemarkWikiLinks");function $u(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&(t.hostname==="github.com"||t.hostname==="www.github.com")}catch{return!1}}o($u,"isGitHubUrl");function Uu(e){if(!e)return!1;try{const t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?!1:typeof window>"u"?!0:t.origin!==window.location.origin}catch{return!1}}o(Uu,"isExternalHttpUrl");function Hu(e,t,n){if(!t&&!n)return e;if(typeof e=="string"&&e.length>0){if(e.length===1)return(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[t,e,n]});const r=e[0],l=e[e.length-1],u=e.slice(1,-1);return(0,g.jsxs)(g.Fragment,{children:[t?(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[t,r]}):r,u,n?(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[l,n]}):l]})}return(0,g.jsxs)(g.Fragment,{children:[t,e,n]})}o(Hu,"renderLinkBody");function Wu({children:e,preProps:t}){const[n,r]=(0,w.useState)(!1),[l,u]=(0,w.useState)(!1),[i,a]=(0,w.useState)(!1),c=(0,w.useRef)(null),p=(0,w.useRef)(void 0);(0,w.useEffect)(()=>()=>clearTimeout(p.current),[]);const f=(0,w.useCallback)(async()=>{const d=c.current?.innerText??et(e);try{await hr(d),u(!1),r(!0)}catch{u(!0),r(!0)}clearTimeout(p.current),p.current=setTimeout(()=>{r(!1),u(!1)},1500)},[e]),s=l?"Copy failed":n?"Copied!":"Copy",h=i?"Unwrap lines":"Wrap lines";return(0,g.jsxs)("div",{className:"paperclip-markdown-codeblock","data-wrap-lines":i||void 0,children:[(0,g.jsx)("pre",{...t,ref:c,style:{...Pu(t.style),...i?{overflowX:"hidden",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"}:null},children:e}),(0,g.jsxs)("div",{className:"paperclip-markdown-codeblock-actions",style:bu,"data-active":n||l||i||void 0,children:[(0,g.jsx)("button",{type:"button",onClick:o(()=>a(d=>!d),"onClick"),"aria-label":h,title:h,className:"paperclip-markdown-codeblock-action paperclip-markdown-codeblock-wrap",style:i?{...vt,borderColor:"color-mix(in oklab, var(--primary) 38%, transparent)",color:"var(--primary)"}:vt,"aria-pressed":i,"data-active":i||void 0,children:(0,g.jsx)(Fr,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}),(0,g.jsxs)("button",{type:"button",onClick:f,"aria-label":"Copy code",title:s,className:"paperclip-markdown-codeblock-action paperclip-markdown-codeblock-copy",style:An,"data-copied":n||void 0,"data-failed":l||void 0,children:[n&&!l?(0,g.jsx)(sr,{"aria-hidden":"true",className:"h-3.5 w-3.5"}):(0,g.jsx)(pr,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),(0,g.jsx)("span",{className:"paperclip-markdown-codeblock-action-label",children:s})]})]})]})}o(Wu,"CodeBlock");function Vu({source:e,darkMode:t}){const n=(0,w.useId)().replace(/[^a-zA-Z0-9_-]/g,""),[r,l]=(0,w.useState)(null),[u,i]=(0,w.useState)(null);return(0,w.useEffect)(()=>{let a=!0;return l(null),i(null),Eu().then(async c=>{c.initialize({startOnLoad:!1,securityLevel:"strict",theme:t?"dark":"default",fontFamily:"inherit",suppressErrorRendering:!0});const p=await c.render(`paperclip-mermaid-${n}`,e);a&&l(p.svg)}).catch(c=>{if(!a)return;const p=c instanceof Error&&c.message?c.message:"Failed to render Mermaid diagram.";i(p)}),()=>{a=!1}},[t,n,e]),(0,g.jsx)("div",{className:"paperclip-mermaid",children:r?(0,g.jsx)("div",{dangerouslySetInnerHTML:{__html:r}}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:H("paperclip-mermaid-status",u&&"paperclip-mermaid-status-error"),children:u?`Unable to render Mermaid diagram: ${u}`:"Rendering Mermaid diagram..."}),(0,g.jsx)("pre",{className:"paperclip-mermaid-source",children:(0,g.jsx)("code",{className:"language-mermaid",children:e})})]})})}o(Vu,"MermaidDiagramBlock");function Ku({children:e,className:t,style:n,softBreaks:r=!0,linkIssueReferences:l=!0,linkCaseReferences:u=!1,enableWikiLinks:i=!1,wikiLinkRoot:a,resolveWikiLinkHref:c,externalReferences:p,resolveImageSrc:f,onImageClick:s,resolveWorkspaceFileRef:h}){const{theme:d}=vr(),D=Ln()?.companies,F=(0,w.useMemo)(()=>D?.length?D.map(E=>E.issuePrefix):void 0,[D]),C=(0,w.useMemo)(()=>{if(!p)return null;const E={};for(const[A,y]of Object.entries(p)){const B=rt(A)??A;E[B]=y}return E},[p]),b=(0,w.useMemo)(()=>{const E=[vi,Iu];return i&&E.push(zu({wikiLinkRoot:a,resolveWikiLinkHref:c})),h&&E.push(Xi(h)),l&&E.push([_n,{knownPrefixes:F}]),u&&E.push([Oi,{knownPrefixes:F}]),r&&E.push(Zi),E},[i,a,c,h,l,u,F,r]),k=(0,w.useMemo)(()=>{const E={p:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("p",{...x,style:K(y),children:B}),"p"),li:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("li",{...x,style:K(y),children:B}),"li"),blockquote:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("blockquote",{...x,style:K(y),children:B}),"blockquote"),table:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("div",{className:"paperclip-markdown-table-scroll",role:"region","aria-label":"Scrollable table",tabIndex:0,children:(0,g.jsx)("table",{...x,style:y,children:B})}),"table"),td:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("td",{...x,style:bt(y),children:B}),"td"),th:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("th",{...x,style:bt(y),children:B}),"th"),pre:o(({node:A,children:y,...B})=>{const x=Lu(y);return x?(0,g.jsx)(Vu,{source:x,darkMode:d==="dark"}):(0,g.jsx)(Wu,{preProps:B,children:y})},"pre"),code:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("code",{...x,style:K(y),children:B}),"code"),a:o(({node:A,href:y,style:B,children:x,..._})=>{const j=Wi(y);if(j)return(0,g.jsx)(mu,{workspaceFileRef:j,label:x,className:typeof _.className=="string"?_.className:void 0});if(_["data-paperclip-wiki-link"]==="true"&&y&&!/^[a-z][a-z\d+.-]*:/i.test(y)&&!y.startsWith("//"))return(0,g.jsx)(Ue,{to:y,..._,rel:"noreferrer",style:K(B),children:x});const V=l?Mn(y):null;if(V)return(0,g.jsx)(wu,{issuePathId:V.issuePathId,children:x});const ee=u?yu(y):null;if(ee)return(0,g.jsx)(Cu,{identifier:ee,children:x});const R=y?Lt(y):null;if(R){const O=R.kind==="project"?`/projects/${R.projectId}`:R.kind==="issue"?`/issues/${R.identifier}`:R.kind==="skill"?`/skills/${R.skillId}`:R.kind==="routine"?`/routines/${R.routineId}`:R.kind==="user"?"/company/settings/access":`/agents/${R.agentId}`;return(0,g.jsx)("a",{href:O,className:H("paperclip-mention-chip",`paperclip-mention-chip--${R.kind}`,R.kind==="project"&&"paperclip-project-mention-chip"),"data-mention-kind":R.kind,style:{...K(B),...Qn(R)},children:x})}const te=y&&C?C[rt(y)??""]??null:null;if(te&&y)return(0,g.jsx)(ku,{href:y,reference:te,children:x});const ce=$u(y),pe=Uu(y),I=ce?(0,g.jsx)(or,{"aria-hidden":"true",className:"mr-1 inline h-3.5 w-3.5 align-(--va-0_125em)"}):null,S=pe&&!ce?(0,g.jsx)(dr,{"aria-hidden":"true",className:"ml-1 inline h-3 w-3 align-(--va-0_125em)"}):null;return(0,g.jsx)("a",{href:y,...pe?{target:"_blank",rel:"noopener noreferrer"}:{rel:"noreferrer"},style:K(B),children:Hu(x,I,S)})},"a")};return(f||s)&&(E.img=({node:A,src:y,alt:B,...x})=>{const _=(f&&y?f(y):null)??y;return(0,g.jsx)("img",{...x,src:_,alt:B??"",onClick:s&&_?j=>{j.preventDefault(),s(_)}:void 0,style:s?{cursor:"pointer",...x.style}:x.style})}),E},[d,l,u,C,f,s]);return(0,g.jsx)("div",{className:H("paperclip-markdown prose prose-sm min-w-0 max-w-full break-words overflow-hidden",d==="dark"&&"prose-invert",t),style:K(n),children:(0,g.jsx)(Eo,{remarkPlugins:b,rehypePlugins:Fu,components:k,urlTransform:Ru,children:e})})}o(Ku,"MarkdownBodyImpl");var sa=(0,w.memo)(Ku);export{oa as _,ua as a,cu as c,aa as d,fu as f,gn as g,Qi as h,au as i,su as l,ia as m,Du as n,kn as o,$e as p,mu as r,pu as s,sa as t,du as u,vr as v,Dr as y};
|
|
16
|
+
`)){const r=Gi(n.value);e.children.splice(t,1,...r),t+=r.length-1;continue}Cn(n)}}o(Cn,"transformNode");function Zi(){return e=>{Cn(e)}}o(Zi,"remarkSoftBreaks");function ge(e){const t=new URLSearchParams;return e.projectId&&e.workspaceId&&(t.set("projectId",e.projectId),t.set("workspaceId",e.workspaceId)),"path"in e&&e.path&&t.set("path",e.path),e.workspace&&e.workspace!=="auto"&&t.set("workspace",e.workspace),"mode"in e&&e.mode&&e.mode!=="all"&&t.set("mode",e.mode),"q"in e&&e.q&&t.set("q",e.q),"limit"in e&&e.limit&&t.set("limit",String(e.limit)),"offset"in e&&e.offset&&t.set("offset",String(e.offset)),t.toString()}o(ge,"buildQuery");function Ji(e,t){const n=new URLSearchParams(ge(t));return n.set("download","1"),`/api/issues/${encodeURIComponent(e)}/file-resources/content?${n.toString()}`}o(Ji,"buildFileResourceDownloadUrl");var Qi={list(e,t={},n){const r=ge(t),l=r?`?${r}`:"";return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/list${l}`,n)},availability(e,t){return fe.post(`/issues/${encodeURIComponent(e)}/file-resources/availability`,{queries:t.map(n=>({path:n.path,...n.workspace&&n.workspace!=="auto"?{workspace:n.workspace}:{},...n.projectId&&n.workspaceId?{projectId:n.projectId,workspaceId:n.workspaceId}:{}}))})},resolve(e,t){return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/resolve?${ge(t)}`)},content(e,t){return fe.get(`/issues/${encodeURIComponent(e)}/file-resources/content?${ge(t)}`)},downloadUrl:Ji};var eu=3e4,tu={state:"pending"};function ia(e){return{path:e.path,workspace:e.workspace??"auto",projectId:e.projectId??null,workspaceId:e.workspaceId??null}}o(ia,"workspaceFileAvailabilityRef");function At(e){return JSON.stringify([e.workspace,e.projectId,e.workspaceId,e.path])}o(At,"workspaceFileAvailabilityKey");function nu(e,t=100){if(e.length<=t)return e.length>0?[e]:[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}o(nu,"chunkWorkspaceFileAvailabilityRefs");function ru(e){return e.workspaceKind==="project_workspace"&&e.projectId&&e.workspaceId?{workspace:"project",projectId:e.projectId,workspaceId:e.workspaceId,projectName:e.projectName??null}:{workspace:e.workspaceKind==="project_workspace"?"project":"execution",projectId:null,workspaceId:null,projectName:e.projectName??null}}o(ru,"workspaceFileAvailabilityTarget");function lu(e){return!e.openable||!e.resource?{state:"unavailable",reason:e.unavailableReason??null}:{state:"openable",target:ru(e.resource)}}o(lu,"workspaceFileAvailabilityFromResult");var ou=2;function iu(e,t){return e[0]==="issues"&&e[1]==="file-resources"&&e[2]===t}o(iu,"isFileResourceKeyForIssue");function uu(e){const t=Pn(),[n,r]=(0,w.useState)(0),l=(0,w.useRef)(new Map),u=(0,w.useRef)(new Map),i=(0,w.useRef)(new Set),a=(0,w.useRef)([]),c=(0,w.useRef)(0),p=(0,w.useRef)(null),f=(0,w.useRef)(!0),s=(0,w.useRef)(0),h=(0,w.useRef)(t);h.current=t;const d=(0,w.useRef)(e);d.current!==e&&(d.current=e,s.current+=1,p.current!==null&&(clearTimeout(p.current),p.current=null),l.current.clear(),u.current.clear(),i.current.clear(),a.current=[]);const D=(0,w.useCallback)(()=>{f.current&&r(E=>E+1)},[]),F=(0,w.useCallback)(async({chunk:E,issueId:A,generation:y})=>{const B=E.map(([x])=>x).sort();try{const x=await h.current.fetchQuery({queryKey:St.issues.fileResourceAvailability(A,B),queryFn:o(()=>Qi.availability(A,E.map(([,j])=>j)),"queryFn"),staleTime:eu});if(y!==s.current)return;const _=new Map(x.results.map(j=>[At(j.query),lu(j)]));for(const[j]of E)l.current.set(j,_.get(j)??{state:"unavailable",reason:"unmatched_reference"}),i.current.delete(j);D()}catch{if(y!==s.current)return;for(const[x]of E)i.current.delete(x)}},[D]),C=(0,w.useCallback)(()=>{for(;c.current<ou&&a.current.length>0;){const E=a.current.shift();c.current+=1,F(E).finally(()=>{c.current-=1,C()})}},[F]),b=(0,w.useCallback)(()=>{p.current=null;const E=[...u.current.entries()];u.current.clear();const A=E.filter(([y])=>!i.current.has(y)&&!l.current.has(y));if(A.length!==0){for(const[y]of A)i.current.add(y);a.current.push(...nu(A).map(y=>({chunk:y,issueId:e,generation:s.current}))),C()}},[C,e]),k=(0,w.useCallback)(E=>{const A=At(E),y=l.current.get(A);return y||(!i.current.has(A)&&!u.current.has(A)&&(u.current.set(A,E),p.current===null&&(p.current=setTimeout(b,0))),tu)},[b]);return(0,w.useEffect)(()=>(f.current=!0,u.current.size>0&&p.current===null&&(p.current=setTimeout(b,0)),()=>{f.current=!1,p.current!==null&&(clearTimeout(p.current),p.current=null)}),[b]),(0,w.useEffect)(()=>t.getQueryCache().subscribe(E=>{E.type!=="updated"||E.action.type!=="invalidate"||iu(E.query.queryKey,e)&&l.current.size!==0&&(l.current.clear(),D())}),[D,e,t]),(0,w.useMemo)(()=>({version:n,check:k}),[n,k])}o(uu,"useWorkspaceFileAvailability");var Qe=(0,w.createContext)(null),au={replace:!1,preventScrollReset:!0};function kn(e){return typeof window>"u"?e:window.location.search}o(kn,"getCurrentFileViewerSearch");function su(e,t){return e!==kn(t)}o(su,"shouldNavigateFileViewerSearch");function cu(e){const t=new URLSearchParams(e),n=t.get("file");if(!n)return null;const r=t.get("line"),l=t.get("column"),u=t.get("workspace"),i=t.get("projectId"),a=t.get("workspaceId"),c=!!(i&&a),p=r?Number.parseInt(r,10):NaN,f=l?Number.parseInt(l,10):NaN,s=u==="execution"||u==="project"?u:"auto";return{path:n,line:Number.isFinite(p)&&p>0?p:null,column:Number.isFinite(f)&&f>0?f:null,workspace:s,projectId:c?i:null,workspaceId:c?a:null}}o(cu,"readFileViewerStateFromSearch");function $e(e,t){const n=new URLSearchParams(e);n.delete("browse"),n.delete("q"),n.delete("folder"),t?(n.set("file",t.path),t.line!==null?n.set("line",String(t.line)):n.delete("line"),t.column!==null?n.set("column",String(t.column)):n.delete("column"),t.workspace&&t.workspace!=="auto"?n.set("workspace",t.workspace):n.delete("workspace"),t.projectId?n.set("projectId",t.projectId):n.delete("projectId"),t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId")):(n.delete("file"),n.delete("line"),n.delete("column"),n.delete("workspace"),n.delete("projectId"),n.delete("workspaceId"));const r=n.toString();return r?`?${r}`:""}o($e,"writeFileViewerStateToSearch");function pu(e){const t=new URLSearchParams(e);if(t.get("browse")!=="1")return null;const n=t.get("q"),r=t.get("folder"),l=t.get("projectId"),u=t.get("workspaceId");return{q:n&&n.length>0?n:null,folderPath:r&&r.length>0?r:null,projectId:l||null,workspaceId:u||null}}o(pu,"readBrowseStateFromSearch");function En(e,t){const n=new URLSearchParams(e);n.delete("file"),n.delete("line"),n.delete("column"),n.delete("workspace"),n.delete("q"),n.set("browse","1"),n.set("folder",t.path),t.projectId?n.set("projectId",t.projectId):n.delete("projectId"),t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId");const r=n.toString();return r?`?${r}`:""}o(En,"writeFolderViewerStateToSearch");function fu(e,t){const n=new URLSearchParams(e);if(n.set("browse","1"),"q"in t){const l=t.q?.trim()??"";l?n.set("q",l):n.delete("q")}if("folderPath"in t){const l=t.folderPath?.trim()??"";l?n.set("folder",l):n.delete("folder")}"projectId"in t&&(t.projectId?n.set("projectId",t.projectId):n.delete("projectId")),"workspaceId"in t&&(t.workspaceId?n.set("workspaceId",t.workspaceId):n.delete("workspaceId"));const r=n.toString();return r?`?${r}`:""}o(fu,"writeBrowseStateToSearch");function ua({issueId:e,children:t,enabled:n=!0}){return n?(0,g.jsx)(hu,{issueId:e,children:t}):(0,g.jsx)(g.Fragment,{children:t})}o(ua,"FileViewerProvider");function hu({issueId:e,children:t}){const n=It(),r=On(),l=(0,w.useMemo)(()=>cu(n.search),[n.search]),u=(0,w.useMemo)(()=>pu(n.search),[n.search]),i=uu(e),a=(0,w.useCallback)((F,C)=>{su(F,n.search)&&r({pathname:n.pathname,hash:n.hash,search:F},{...au,...C,state:n.state})},[n.hash,n.pathname,n.state,r]),c=(0,w.useCallback)((F,C)=>{let b=$e(n.search,{path:F.path,line:F.line??null,column:F.column??null,workspace:F.workspace??"auto",projectId:F.projectId??null,workspaceId:F.workspaceId??null});if(C?.fromBrowse){const k=new URLSearchParams(b);k.set("browse","1");const E=new URLSearchParams(n.search),A=E.get("q"),y=E.get("folder"),B=Object.prototype.hasOwnProperty.call(C.browseState??{},"q")?C.browseState?.q:A,x=Object.prototype.hasOwnProperty.call(C.browseState??{},"folderPath")?C.browseState?.folderPath:y;B?k.set("q",B):k.delete("q"),x?k.set("folder",x):k.delete("folder"),b=k.toString()?`?${k.toString()}`:""}a(b)},[n.search,a]),p=(0,w.useCallback)(F=>{const C=new URLSearchParams(n.search);C.delete("file"),C.delete("line"),C.delete("column"),C.delete("folder"),C.set("browse","1"),typeof F?.q=="string"&&F.q.length>0?C.set("q",F.q):C.delete("q"),a(C.toString()?`?${C.toString()}`:"")},[n.search,a]),f=(0,w.useCallback)(F=>{a(fu(n.search,F),{replace:!0})},[n.search,a]),s=(0,w.useCallback)(F=>{const C=En(n.search,{path:F.path,projectId:F.projectId??null,workspaceId:F.workspaceId??null});a(C)},[n.search,a]),h=(0,w.useCallback)(()=>{const F=new URLSearchParams(n.search);F.delete("file"),F.delete("line"),F.delete("column"),F.delete("workspace"),F.set("browse","1"),a(F.toString()?`?${F.toString()}`:"")},[n.search,a]),d=(0,w.useCallback)(()=>{const F=kn(n.search),C=new URLSearchParams($e(F,null).replace(/^\?/,""));C.delete("browse"),C.delete("q"),C.delete("folder"),a(C.toString()?`?${C.toString()}`:"")},[n.search,a]),D=(0,w.useMemo)(()=>({issueId:e,availability:i,state:l,browse:u!==null,query:u?.q??null,browseProjectId:u?.projectId??null,browseWorkspaceId:u?.workspaceId??null,folderPath:u?.folderPath??null,open:c,openBrowse:p,updateBrowseState:f,openFolder:s,backToFiles:h,close:d}),[e,i,l,u,c,p,f,s,h,d]);return(0,g.jsx)(Qe.Provider,{value:D,children:t})}o(hu,"EnabledFileViewerProvider");function du(){return(0,w.useContext)(Qe)}o(du,"useFileViewer");function aa(){const e=(0,w.useContext)(Qe);if(!e)throw new Error("useRequiredFileViewer must be used within a FileViewerProvider");return e}o(aa,"useRequiredFileViewer");function mu({workspaceFileRef:e,label:t,className:n,onOpen:r,showIcon:l=!0,title:u}){const i=du(),a=It(),c=typeof t<"u"?t:Hi(e),p=!!(r||i),f=e.resourceKind==="directory"||e.path.endsWith("/"),s=e.line?` line ${e.line}${e.column?` column ${e.column}`:""}`:"",h=p?`Open ${e.path}${s} in the ${f?"workspace browser":"file viewer"}`:`Workspace ${f?"folder":"file"} ${e.path}${s}`,d=u??(p?`Open ${e.path}${s} in the ${f?"workspace browser":"file viewer"}`:`Workspace ${f?"folder":"file"} ${e.path}${s}`),D=f?En(a.search,{path:e.path,projectId:e.projectId??null,workspaceId:e.workspaceId??null}):$e(a.search,{path:e.path,line:e.line??null,column:e.column??null,workspace:e.workspace??"auto",projectId:e.projectId??null,workspaceId:e.workspaceId??null}),F=p?`${a.pathname}${D}${a.hash}`:"#",C=o(b=>{b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||b.button===0&&(b.preventDefault(),p&&(r?r(e):f?i?.openFolder(e):i?.open(e)))},"handleClick");return(0,g.jsxs)("a",{href:F,role:p?"button":void 0,"data-workspace-file-link":"true","data-workspace-file-path":e.path,"aria-label":h,title:d,className:H("paperclip-workspace-file-link inline-flex items-center gap-1 rounded-sm border border-border bg-muted/60 px-1.5 py-0.5 font-mono text-xs leading-tight text-foreground/90 align-middle no-underline hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",n),onClick:C,children:[l?f?(0,g.jsx)(fr,{"aria-hidden":"true",className:"h-3 w-3 shrink-0 opacity-70"}):(0,g.jsx)(Dr,{"aria-hidden":"true",className:"h-3 w-3 shrink-0 opacity-70"}):null,(0,g.jsx)("span",{className:"max-w-full whitespace-normal break-all text-left",children:c})]})}o(mu,"WorkspaceFileLink");function Du({category:e,liveness:t,statusIconKey:n,label:r,className:l,sizeClassName:u="h-3.5 w-3.5",inline:i=!1}){const a=ur(),c=or(n)??rr(e),p=n==="git-merge"?"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400":cr[e]??"text-muted-foreground border-muted-foreground",f=t==="fresh"||t==="unknown"?"":` (${jt(t)})`,s=`${r??Rt(e)}${f}`,h=i?"relative mr-1 inline-flex shrink-0 align-(--va-0_125em)":"relative inline-flex shrink-0",d=i?"h-3 w-3":u,D=e==="running"&&!a?"animate-spin":"";return(0,g.jsxs)("span",{role:"img","aria-label":s,className:H(h,l),children:[(0,g.jsx)(c,{"aria-hidden":"true",className:H(d,p.split(" ").filter(F=>F.startsWith("text-")).join(" "),D)}),t==="stale"?(0,g.jsx)(nr,{"aria-hidden":"true",className:H("absolute -bottom-0.5 -right-0.5 h-2 w-2 rounded-full bg-background text-muted-foreground",i?"":"p-px")}):null]})}o(Du,"ExternalObjectStatusIcon");var gu=/^\/cases\/([A-Z][A-Z0-9]*-C\d+)$/i,Fu=[ji];function yu(e){if(!e)return null;const t=decodeURIComponent(e.trim()).match(gu);return t?t[1].toUpperCase():null}o(yu,"caseIdentifierFromHref");var Le=null;function wu({issuePathId:e,children:t}){const{data:n}=Rn({queryKey:St.issues.detail(e),queryFn:o(()=>Tn.get(e),"queryFn"),staleTime:6e4}),r=n?.identifier??e,l=n?.title??r,u=n?.status,i=l!==r?`Issue ${r}: ${l}`:`Issue ${r}`;return(0,g.jsxs)(Ue,{to:`/issues/${r}`,"data-mention-kind":"issue",className:H("paperclip-markdown-issue-ref","font-normal underline"),title:l,"aria-label":i,children:[u?(0,g.jsx)(ar,{status:u,size:"md",className:"relative -top-px mr-1 inline-block h-4 w-4 align-middle"}):null,t]})}o(wu,"MarkdownIssueLink");function Cu({identifier:e,children:t}){const n=Nn();return(0,g.jsx)(Ue,{to:n(e),"data-mention-kind":"case",className:H("paperclip-markdown-case-ref","font-normal underline"),"aria-label":`Case ${e}`,children:t})}o(Cu,"MarkdownCaseLink");function ku({href:e,reference:t,children:n}){const r=lr(t.providerKey),l=t.displayKey?.trim()||r,u=t.statusLabel??Rt(t.statusCategory),i=jt(t.liveness),a=t.liveness==="fresh"||t.liveness==="unknown"?"":` (${i})`,c=[t.displayTitle??`${l} ${u}`,`${l} — ${u}${a}`].filter(Boolean).join(" · ");return(0,g.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer","data-external-link":"resolved","data-external-status":t.statusCategory,"data-external-liveness":t.liveness,title:c,"aria-label":`${l} ${u}${a}: ${t.displayTitle??e}`,className:"paperclip-markdown-external-ref",children:[(0,g.jsx)(Du,{category:t.statusCategory,liveness:t.liveness,statusIconKey:t.statusIconKey,label:`${l}: ${u}`,inline:!0}),n]})}o(ku,"MarkdownExternalLink");function Eu(){return Le||(Le=jn(()=>import("./mermaid.core-G_BSi0G0.js").then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),Le}o(Eu,"loadMermaid");var Au={overflowWrap:"anywhere",wordBreak:"break-word"},vu={maxWidth:"100%",overflowX:"auto"},bu={position:"absolute",top:"0.4rem",right:"0.4rem",display:"inline-flex",alignItems:"center",gap:"0.25rem"},An={position:"static",opacity:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",minHeight:"1.55rem",padding:"0.2rem 0.4rem",borderRadius:"calc(var(--radius) - 4px)",border:"1px solid color-mix(in oklab, var(--foreground) 14%, transparent)",backgroundColor:"var(--background)",color:"var(--muted-foreground)",fontSize:"var(--text-micro)",lineHeight:1,cursor:"pointer"},vt={...An,width:"1.55rem",paddingInline:0},xu={overflowWrap:"anywhere",wordBreak:"normal"};function Su(e){return e.type==="html"&&typeof e.value=="string"&&/^<!--[\s\S]*-->$/.test(e.value.trim())}o(Su,"isHtmlCommentNode");function Bu(e){if(e.type!=="text"||typeof e.value!="string")return!1;const t=e.value.trim();return/^\\?<!--(?:\s*-{0,2}>?)?$/.test(t)||/^<!--(?:\s*-{0,2}(?:>)?)?$/.test(t)}o(Bu,"isEscapedHtmlCommentPlaceholder");function Iu(){return e=>{const t=o(n=>{const r=n.children;if(r){n.children=r.filter(l=>!Su(l)&&!Bu(l));for(const l of n.children)t(l)}},"visit");t(e)}}o(Iu,"remarkDropHtmlComments");function K(e){return{...Au,...e}}o(K,"mergeWrapStyle");function bt(e){return{...xu,...e}}o(bt,"mergeTableCellStyle");function Pu(e){return{...vu,...e}}o(Pu,"mergeScrollableBlockStyle");function et(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(t=>et(t)).join(""):""}o(et,"flattenText");function Lu(e){if(!(0,w.isValidElement)(e))return null;const t=e.props;return typeof t.className!="string"||!/\blanguage-mermaid\b/i.test(t.className)?null:et(t.children).replace(/\n$/,"")}o(Lu,"extractMermaidSource");function Ru(e){return e.startsWith("workspace-file:")||Lt(e)?e:en(e)}o(Ru,"safeMarkdownUrlTransform");var ju=/\[\[([^\]\r\n]+)\]\]/g,Tu=new Set(["definition","image","imageReference","link","linkReference"]);function Nu(e){const[t,...n]=e.split("|"),r=t?.trim()??"",l=n.length>0?n.join("|").trim():r;return!r||r.includes("[")||r.includes("]")?null:{target:r,label:l||r}}o(Nu,"parseWikiLinkBody");function _u(e){const t=e.trim();if(!t||/^[a-z][a-z\d+.-]*:/i.test(t)||t.startsWith("//"))return null;const n=t.indexOf("#"),r=(n>=0?t.slice(0,n):t).trim().replace(/^\/+/,"");if(!r||r.includes("\\")||r.split("/").some(i=>!i||i==="."||i===".."))return null;const l=r.split("/").map(i=>encodeURIComponent(i)).join("/"),u=n>=0?t.slice(n+1).trim():"";return u?`${l}#${encodeURIComponent(u)}`:l}o(_u,"encodeWikiLinkTarget");function xt(e,t){const n=_u(e);if(!n)return null;const r=t?.trim().replace(/\/+$/,"")??"";return r?`${r}/${n}`:n}o(xt,"defaultWikiLinkHref");function Ou(e,t){return{type:"link",url:e,title:null,data:{hProperties:{"data-paperclip-wiki-link":"true","data-paperclip-wiki-target":t.target}},children:[{type:"text",value:t.label}]}}o(Ou,"createWikiLinkNode");function Mu(e,t){const n=[];let r=0;for(const l of e.matchAll(ju)){const u=l[0]??"",i=l[1]??"",a=l.index??0;a>r&&n.push({type:"text",value:e.slice(r,a)});const c=Nu(i);let p=null;if(c)if(t.resolveWikiLinkHref){const f=t.resolveWikiLinkHref(c.target,c.label);p=f===void 0?xt(c.target,t.wikiLinkRoot):f}else p=xt(c.target,t.wikiLinkRoot);c&&p?n.push(Ou(p,c)):n.push({type:"text",value:u}),r=a+u.length}return r<e.length&&n.push({type:"text",value:e.slice(r)}),n}o(Mu,"splitTextByWikiLinks");function vn(e,t){!e.children||Tu.has(e.type??"")||(e.children=e.children.flatMap(n=>n.type==="text"&&typeof n.value=="string"&&n.value.includes("[[")?Mu(n.value,t):(vn(n,t),n)))}o(vn,"transformWikiLinkChildren");function zu(e){return o(function(){return n=>{vn(n,e)}},"remarkWikiLinks")}o(zu,"createRemarkWikiLinks");function $u(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&(t.hostname==="github.com"||t.hostname==="www.github.com")}catch{return!1}}o($u,"isGitHubUrl");function Uu(e){if(!e)return!1;try{const t=new URL(e);return t.protocol!=="http:"&&t.protocol!=="https:"?!1:typeof window>"u"?!0:t.origin!==window.location.origin}catch{return!1}}o(Uu,"isExternalHttpUrl");function Hu(e,t,n){if(!t&&!n)return e;if(typeof e=="string"&&e.length>0){if(e.length===1)return(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[t,e,n]});const r=e[0],l=e[e.length-1],u=e.slice(1,-1);return(0,g.jsxs)(g.Fragment,{children:[t?(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[t,r]}):r,u,n?(0,g.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[l,n]}):l]})}return(0,g.jsxs)(g.Fragment,{children:[t,e,n]})}o(Hu,"renderLinkBody");function Wu({children:e,preProps:t}){const[n,r]=(0,w.useState)(!1),[l,u]=(0,w.useState)(!1),[i,a]=(0,w.useState)(!1),c=(0,w.useRef)(null),p=(0,w.useRef)(void 0);(0,w.useEffect)(()=>()=>clearTimeout(p.current),[]);const f=(0,w.useCallback)(async()=>{const d=c.current?.innerText??et(e);try{await hr(d),u(!1),r(!0)}catch{u(!0),r(!0)}clearTimeout(p.current),p.current=setTimeout(()=>{r(!1),u(!1)},1500)},[e]),s=l?"Copy failed":n?"Copied!":"Copy",h=i?"Unwrap lines":"Wrap lines";return(0,g.jsxs)("div",{className:"paperclip-markdown-codeblock","data-wrap-lines":i||void 0,children:[(0,g.jsx)("pre",{...t,ref:c,style:{...Pu(t.style),...i?{overflowX:"hidden",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"}:null},children:e}),(0,g.jsxs)("div",{className:"paperclip-markdown-codeblock-actions",style:bu,"data-active":n||l||i||void 0,children:[(0,g.jsx)("button",{type:"button",onClick:o(()=>a(d=>!d),"onClick"),"aria-label":h,title:h,className:"paperclip-markdown-codeblock-action paperclip-markdown-codeblock-wrap",style:i?{...vt,borderColor:"color-mix(in oklab, var(--primary) 38%, transparent)",color:"var(--primary)"}:vt,"aria-pressed":i,"data-active":i||void 0,children:(0,g.jsx)(Fr,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}),(0,g.jsxs)("button",{type:"button",onClick:f,"aria-label":"Copy code",title:s,className:"paperclip-markdown-codeblock-action paperclip-markdown-codeblock-copy",style:An,"data-copied":n||void 0,"data-failed":l||void 0,children:[n&&!l?(0,g.jsx)(sr,{"aria-hidden":"true",className:"h-3.5 w-3.5"}):(0,g.jsx)(pr,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),(0,g.jsx)("span",{className:"paperclip-markdown-codeblock-action-label",children:s})]})]})]})}o(Wu,"CodeBlock");function Vu({source:e,darkMode:t}){const n=(0,w.useId)().replace(/[^a-zA-Z0-9_-]/g,""),[r,l]=(0,w.useState)(null),[u,i]=(0,w.useState)(null);return(0,w.useEffect)(()=>{let a=!0;return l(null),i(null),Eu().then(async c=>{c.initialize({startOnLoad:!1,securityLevel:"strict",theme:t?"dark":"default",fontFamily:"inherit",suppressErrorRendering:!0});const p=await c.render(`paperclip-mermaid-${n}`,e);a&&l(p.svg)}).catch(c=>{if(!a)return;const p=c instanceof Error&&c.message?c.message:"Failed to render Mermaid diagram.";i(p)}),()=>{a=!1}},[t,n,e]),(0,g.jsx)("div",{className:"paperclip-mermaid",children:r?(0,g.jsx)("div",{dangerouslySetInnerHTML:{__html:r}}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:H("paperclip-mermaid-status",u&&"paperclip-mermaid-status-error"),children:u?`Unable to render Mermaid diagram: ${u}`:"Rendering Mermaid diagram..."}),(0,g.jsx)("pre",{className:"paperclip-mermaid-source",children:(0,g.jsx)("code",{className:"language-mermaid",children:e})})]})})}o(Vu,"MermaidDiagramBlock");function Ku({children:e,className:t,style:n,softBreaks:r=!0,linkIssueReferences:l=!0,linkCaseReferences:u=!1,enableWikiLinks:i=!1,wikiLinkRoot:a,resolveWikiLinkHref:c,externalReferences:p,resolveImageSrc:f,onImageClick:s,resolveWorkspaceFileRef:h}){const{theme:d}=vr(),D=Ln()?.companies,F=(0,w.useMemo)(()=>D?.length?D.map(E=>E.issuePrefix):void 0,[D]),C=(0,w.useMemo)(()=>{if(!p)return null;const E={};for(const[A,y]of Object.entries(p)){const B=rt(A)??A;E[B]=y}return E},[p]),b=(0,w.useMemo)(()=>{const E=[vi,Iu];return i&&E.push(zu({wikiLinkRoot:a,resolveWikiLinkHref:c})),h&&E.push(Xi(h)),l&&E.push([_n,{knownPrefixes:F}]),u&&E.push([Oi,{knownPrefixes:F}]),r&&E.push(Zi),E},[i,a,c,h,l,u,F,r]),k=(0,w.useMemo)(()=>{const E={p:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("p",{...x,style:K(y),children:B}),"p"),li:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("li",{...x,style:K(y),children:B}),"li"),blockquote:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("blockquote",{...x,style:K(y),children:B}),"blockquote"),table:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("div",{className:"paperclip-markdown-table-scroll",role:"region","aria-label":"Scrollable table",tabIndex:0,children:(0,g.jsx)("table",{...x,style:y,children:B})}),"table"),td:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("td",{...x,style:bt(y),children:B}),"td"),th:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("th",{...x,style:bt(y),children:B}),"th"),pre:o(({node:A,children:y,...B})=>{const x=Lu(y);return x?(0,g.jsx)(Vu,{source:x,darkMode:d==="dark"}):(0,g.jsx)(Wu,{preProps:B,children:y})},"pre"),code:o(({node:A,style:y,children:B,...x})=>(0,g.jsx)("code",{...x,style:K(y),children:B}),"code"),a:o(({node:A,href:y,style:B,children:x,..._})=>{const j=Wi(y);if(j)return(0,g.jsx)(mu,{workspaceFileRef:j,label:x,className:typeof _.className=="string"?_.className:void 0});if(_["data-paperclip-wiki-link"]==="true"&&y&&!/^[a-z][a-z\d+.-]*:/i.test(y)&&!y.startsWith("//"))return(0,g.jsx)(Ue,{to:y,..._,rel:"noreferrer",style:K(B),children:x});const V=l?Mn(y):null;if(V)return(0,g.jsx)(wu,{issuePathId:V.issuePathId,children:x});const ee=u?yu(y):null;if(ee)return(0,g.jsx)(Cu,{identifier:ee,children:x});const R=y?Lt(y):null;if(R){const O=R.kind==="project"?`/projects/${R.projectId}`:R.kind==="issue"?`/issues/${R.identifier}`:R.kind==="skill"?`/skills/${R.skillId}`:R.kind==="routine"?`/routines/${R.routineId}`:R.kind==="user"?"/company/settings/access":`/agents/${R.agentId}`;return(0,g.jsx)("a",{href:O,className:H("paperclip-mention-chip",`paperclip-mention-chip--${R.kind}`,R.kind==="project"&&"paperclip-project-mention-chip"),"data-mention-kind":R.kind,style:{...K(B),...Qn(R)},children:x})}const te=y&&C?C[rt(y)??""]??null:null;if(te&&y)return(0,g.jsx)(ku,{href:y,reference:te,children:x});const ce=$u(y),pe=Uu(y),I=ce?(0,g.jsx)(ir,{"aria-hidden":"true",className:"mr-1 inline h-3.5 w-3.5 align-(--va-0_125em)"}):null,S=pe&&!ce?(0,g.jsx)(dr,{"aria-hidden":"true",className:"ml-1 inline h-3 w-3 align-(--va-0_125em)"}):null;return(0,g.jsx)("a",{href:y,...pe?{target:"_blank",rel:"noopener noreferrer"}:{rel:"noreferrer"},style:K(B),children:Hu(x,I,S)})},"a")};return(f||s)&&(E.img=({node:A,src:y,alt:B,...x})=>{const _=(f&&y?f(y):null)??y;return(0,g.jsx)("img",{...x,src:_,alt:B??"",onClick:s&&_?j=>{j.preventDefault(),s(_)}:void 0,style:s?{cursor:"pointer",...x.style}:x.style})}),E},[d,l,u,C,f,s]);return(0,g.jsx)("div",{className:H("paperclip-markdown prose prose-sm min-w-0 max-w-full break-words overflow-hidden",d==="dark"&&"prose-invert",t),style:K(n),children:(0,g.jsx)(Eo,{remarkPlugins:b,rehypePlugins:Fu,components:k,urlTransform:Ru,children:e})})}o(Ku,"MarkdownBodyImpl");var sa=(0,w.memo)(Ku);export{Eo as _,ua as a,Dr as b,cu as c,aa as d,fu as f,gn as g,Qi as h,au as i,su as l,ia as m,Du as n,kn as o,$e as p,mu as r,pu as s,sa as t,du as u,oa as v,vr as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var pt=Object.defineProperty;var u=(e,a)=>pt(e,"name",{value:a,configurable:!0});import{i as ot}from"./rolldown-runtime-ZpX3ckPj.js";import{En as yt,Fr as bt,Lr as vt,U as wt,Y as K,_ as Ct,nr as Q}from"./createLucideIcon-r3v6fbGz.js";import{o as jt,t as V}from"./router-Bb8nJWyv.js";import{t as Mt}from"./AgentAvatar-PT82VwmU.js";import{t as J}from"./agents-BlSzFh-1.js";import{r as Nt,t as tt}from"./EmptyState-DPcc0zYh.js";import{k as kt,t as et}from"./button-CAPbz11u.js";import{n as Pt,t as Dt}from"./useHiddenSettings-2JpxuJV7.js";import{t as Yt}from"./card-dmVcp3AX.js";import{t as Zt}from"./PageSkeleton-DHjTwRT3.js";import{Dn as rt,On as Et,Pn as Tt,Yt as _t,en as Xt,hn as zt}from"./index-BCClSQew.js";var o=ot(vt(),1),n=ot(bt(),1),N=200,W=100,X=32,$t=80,L=60,Wt=.2,Lt=2,R=6;function Z(e){if(e.reports.length===0)return N;const a=e.reports.reduce((i,f)=>i+Z(f),0),d=(e.reports.length-1)*X;return Math.max(N,a+d)}u(Z,"subtreeWidth");function at(e,a,d){const i=Z(e),f=[];if(e.reports.length>0){const C=e.reports.reduce((k,P)=>k+Z(P),0),S=(e.reports.length-1)*X;let j=a+(i-C-S)/2;for(const k of e.reports){const P=Z(k);f.push(at(k,j,d+W+$t)),j+=P+X}}return{id:e.id,name:e.name,role:e.role,status:e.status,x:a+(i-N)/2,y:d,children:f}}u(at,"layoutTree");function St(e){if(e.length===0)return[];e.reduce((f,C)=>f+Z(C),0),(e.length-1)*X;let a=L;const d=L,i=[];for(const f of e){const C=Z(f);i.push(at(f,a,d)),a+=C+X}return i}u(St,"layoutForest");function Ht(e){const a=[];function d(i){a.push(i),i.children.forEach(d)}return u(d,"walk"),e.forEach(d),a}u(Ht,"flattenLayout");function Rt(e){const a=[];function d(i){for(const f of i.children)a.push({parent:i,child:f}),d(f)}return u(d,"walk"),e.forEach(d),a}u(Rt,"collectEdges");function A(e){return Math.min(Math.max(e,Wt),Lt)}u(A,"clampZoom");function At(e){return{x:e.clientX,y:e.clientY}}u(At,"touchPoint");function nt(e,a){const d=e.clientX-a.clientX,i=e.clientY-a.clientY;return Math.hypot(d,i)}u(nt,"touchDistance");function st(e,a,d){const i=d.getBoundingClientRect();return{x:(e.clientX+a.clientX)/2-i.left,y:(e.clientY+a.clientY)/2-i.top}}u(st,"touchCenter");var Ot={running:"var(--hex-22d3ee)",active:"var(--hex-4ade80)",paused:"var(--hex-facc15)",idle:"var(--hex-facc15)",error:"var(--hex-f87171)",terminated:"var(--hex-a3a3a3)"},Bt="var(--hex-a3a3a3)";function oe(){const{selectedCompanyId:e}=wt(),{setBreadcrumbs:a}=Nt(),d=jt(),i=!!Xt(),{hidden:f}=Dt(),C=!i&&!f.has("company.import"),S=!f.has("company.export"),{data:j,isLoading:k}=Q({queryKey:K.org(e),queryFn:u(()=>J.org(e),"queryFn"),enabled:!!e}),{data:P}=Q({queryKey:K.agents.list(e),queryFn:u(()=>J.list(e),"queryFn"),enabled:!!e}),ct=(0,o.useMemo)(()=>{const t=new Map;for(const r of P??[])t.set(r.id,r);return t},[P]);(0,o.useEffect)(()=>{a([{label:"Org Chart"}])},[a]);const z=(0,o.useMemo)(()=>St(j??[]),[j]),D=(0,o.useMemo)(()=>Ht(z),[z]),it=(0,o.useMemo)(()=>Rt(z),[z]),v=(0,o.useMemo)(()=>{if(D.length===0)return{width:800,height:600};let t=0,r=0;for(const s of D)t=Math.max(t,s.x+N),r=Math.max(r,s.y+W);return{width:t+L,height:r+L}},[D]),p=(0,o.useRef)(null),[l,M]=(0,o.useState)({x:0,y:0}),[h,E]=(0,o.useState)(1),[H,O]=(0,o.useState)(!1),T=(0,o.useRef)({x:0,y:0,panX:0,panY:0}),m=(0,o.useRef)({mode:null,startPoint:{x:0,y:0},startPan:{x:0,y:0},startZoom:1,startDistance:0,startCenter:{x:0,y:0},moved:!1}),$=(0,o.useRef)(!1),Y=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>{Y.current!==null&&window.clearTimeout(Y.current)},[]);const B=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(B.current||D.length===0||!p.current)return;B.current=!0;const t=p.current,r=t.clientWidth,s=t.clientHeight,c=(r-40)/v.width,x=(s-40)/v.height,g=Math.min(c,x,1),y=v.width*g,w=v.height*g;E(g),M({x:(r-y)/2,y:(s-w)/2})},[D,v]);const lt=(0,o.useCallback)(t=>{t.button===0&&(t.target.closest("[data-org-card]")||(O(!0),T.current={x:t.clientX,y:t.clientY,panX:l.x,panY:l.y}))},[l]),ut=(0,o.useCallback)(t=>{if(!H)return;const r=t.clientX-T.current.x,s=t.clientY-T.current.y;M({x:T.current.panX+r,y:T.current.panY+s})},[H]),q=(0,o.useCallback)(()=>{O(!1)},[]),dt=(0,o.useCallback)(t=>{t.preventDefault();const r=p.current;if(!r)return;const s=r.getBoundingClientRect(),c=t.clientX-s.left,x=t.clientY-s.top,g=t.deltaY<0?1.1:.9,y=A(h*g),w=y/h;M({x:c-w*(c-l.x),y:x-w*(x-l.y)}),E(y)},[h,l]),I=(0,o.useCallback)((t,r)=>{const s=A(t),c=s/h;M({x:r.x-c*(r.x-l.x),y:r.y-c*(r.y-l.y)}),E(s)},[h,l]),ht=(0,o.useCallback)(()=>{if(!p.current)return;const t=p.current.clientWidth,r=p.current.clientHeight,s=(t-40)/v.width,c=(r-40)/v.height,x=Math.min(s,c,1),g=v.width*x,y=v.height*x;E(x),M({x:(t-g)/2,y:(r-y)/2})},[v]),mt=(0,o.useCallback)(t=>{if(t.touches.length>=2&&p.current){const[s,c]=[t.touches[0],t.touches[1]];m.current={mode:"pinch",startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:nt(s,c),startCenter:st(s,c,p.current),moved:!1};return}const r=t.touches[0];r&&(m.current={mode:"pan",startPoint:At(r),startPan:l,startZoom:h,startDistance:0,startCenter:{x:0,y:0},moved:!1})},[l,h]),ft=(0,o.useCallback)(t=>{const r=p.current;if(!r||!m.current.mode)return;if(t.touches.length>=2){const[g,y]=[t.touches[0],t.touches[1]],w=nt(g,y),_=st(g,y,r);if(m.current.mode!=="pinch"||m.current.startDistance===0){m.current={mode:"pinch",startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:w,startCenter:_,moved:!1};return}const b=m.current,U=A(b.startZoom*(w/b.startDistance)),G=U/b.startZoom,xt=_.x-b.startCenter.x,gt=_.y-b.startCenter.y;b.moved=b.moved||Math.abs(w-b.startDistance)>R||Math.hypot(xt,gt)>R,E(U),M({x:_.x-G*(b.startCenter.x-b.startPan.x),y:_.y-G*(b.startCenter.y-b.startPan.y)});return}const s=t.touches[0];if(!s||m.current.mode!=="pan")return;const c=s.clientX-m.current.startPoint.x,x=s.clientY-m.current.startPoint.y;m.current.moved=m.current.moved||Math.hypot(c,x)>R,M({x:m.current.startPan.x+c,y:m.current.startPan.y+x})},[l,h]),F=(0,o.useCallback)(()=>{m.current.moved&&($.current=!0,Y.current!==null&&window.clearTimeout(Y.current),Y.current=window.setTimeout(()=>{$.current=!1,Y.current=null},400)),m.current={mode:null,startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:0,startCenter:{x:0,y:0},moved:!1}},[l,h]);return e?k?(0,n.jsx)(Zt,{variant:"org-chart"}):j&&j.length===0?(0,n.jsx)(tt,{icon:rt,message:"No organizational hierarchy defined."}):(0,n.jsxs)("div",{className:"flex h-(--sz-calc-38) min-h-(--sz-420px) flex-col md:h-full md:min-h-0",children:[(0,n.jsxs)("div",{className:"mb-2 flex shrink-0 flex-wrap items-center justify-start gap-2",children:[C&&(0,n.jsx)(V,{to:"/company/import",children:(0,n.jsxs)(et,{variant:"outline",size:"sm",children:[(0,n.jsx)(zt,{className:"mr-1.5 h-3.5 w-3.5"}),"Import company"]})}),S&&(0,n.jsx)(V,{to:"/company/export",children:(0,n.jsxs)(et,{variant:"outline",size:"sm",children:[(0,n.jsx)(Tt,{className:"mr-1.5 h-3.5 w-3.5"}),"Export company"]})})]}),(0,n.jsxs)("div",{ref:p,"data-testid":"org-chart-viewport",className:"w-full flex-1 min-h-0 overflow-hidden relative bg-muted/20 border border-border rounded-lg",style:{cursor:H?"grabbing":"grab",touchAction:"none",overscrollBehavior:"contain"},onMouseDown:lt,onMouseMove:ut,onMouseUp:q,onMouseLeave:q,onWheel:dt,onTouchStart:mt,onTouchMove:ft,onTouchEnd:F,onTouchCancel:F,children:[(0,n.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1.5",children:[(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-sm transition-colors hover:bg-accent sm:size-7",onClick:u(()=>{const t=p.current;t&&I(h*1.2,{x:t.clientWidth/2,y:t.clientHeight/2})},"onClick"),title:"Zoom in","aria-label":"Zoom in",children:(0,n.jsx)(kt,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})}),(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-sm transition-colors hover:bg-accent sm:size-7",onClick:u(()=>{const t=p.current;t&&I(h*.8,{x:t.clientWidth/2,y:t.clientHeight/2})},"onClick"),title:"Zoom out","aria-label":"Zoom out",children:(0,n.jsx)(Pt,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})}),(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-(length:--text-nano) transition-colors hover:bg-accent sm:size-7",onClick:ht,title:"Fit to screen","aria-label":"Fit chart to screen",children:(0,n.jsx)(Et,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})})]}),(0,n.jsx)("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%"},children:(0,n.jsx)("g",{transform:`translate(${l.x}, ${l.y}) scale(${h})`,children:it.map(({parent:t,child:r})=>{const s=t.x+N/2,c=t.y+W,x=r.x+N/2,g=r.y,y=(c+g)/2;return(0,n.jsx)("path",{d:`M ${s} ${c} L ${s} ${y} L ${x} ${y} L ${x} ${g}`,fill:"none",stroke:"var(--border)",strokeWidth:1.5},`${t.id}-${r.id}`)})})}),(0,n.jsx)("div",{"data-testid":"org-chart-card-layer",className:"absolute inset-0",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${h})`,transformOrigin:"0 0"},children:D.map(t=>{const r=ct.get(t.id),s=Ot[t.status]??Bt;return(0,n.jsx)(Yt,{"data-org-card":!0,className:"block absolute py-0 hover:shadow-md hover:border-foreground/20 transition-(--tp-box-shadow-border-color) duration-150 cursor-pointer select-none",style:{left:t.x,top:t.y,width:N,minHeight:W},onClick:u(()=>d(r?Ct(r):`/agents/${t.id}`),"onClick"),onClickCapture:u(c=>{$.current&&($.current=!1,c.preventDefault(),c.stopPropagation())},"onClickCapture"),children:(0,n.jsxs)("div",{className:"flex items-center px-4 py-3 gap-3",children:[(0,n.jsxs)("div",{className:"relative shrink-0",children:[(0,n.jsx)("div",{className:"w-9 h-9 rounded-full bg-muted flex items-center justify-center",children:(0,n.jsx)(Mt,{agent:r,size:16,className:"h-4.5 w-4.5 text-foreground/70"})}),(0,n.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 h-3 w-3 rounded-full border-2 border-card",style:{backgroundColor:s}})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-foreground leading-tight",children:t.name}),(0,n.jsx)("span",{className:"text-(length:--text-micro) text-muted-foreground leading-tight mt-0.5",children:r?.title??It(t.role)}),r&&(0,n.jsx)("span",{className:"text-(length:--text-nano) text-muted-foreground/60 font-mono leading-tight mt-1",children:_t(r.adapterType)}),r&&r.capabilities&&(0,n.jsx)("span",{className:"text-(length:--text-nano) text-muted-foreground/80 leading-tight mt-1 line-clamp-2",children:r.capabilities})]})]})},t.id)})})]})]}):(0,n.jsx)(tt,{icon:rt,message:"Select a company to view the org chart."})}u(oe,"OrgChart");var qt=yt;function It(e){return qt[e]??e}u(It,"roleLabel");export{oe as OrgChart};
|
|
1
|
+
var pt=Object.defineProperty;var u=(e,a)=>pt(e,"name",{value:a,configurable:!0});import{i as ot}from"./rolldown-runtime-ZpX3ckPj.js";import{En as yt,Fr as bt,Lr as vt,U as wt,Y as K,_ as Ct,nr as Q}from"./createLucideIcon-r3v6fbGz.js";import{o as jt,t as V}from"./router-Bb8nJWyv.js";import{t as Mt}from"./AgentAvatar-PT82VwmU.js";import{t as J}from"./agents-BlSzFh-1.js";import{r as Nt,t as tt}from"./EmptyState-DPcc0zYh.js";import{k as kt,t as et}from"./button-CAPbz11u.js";import{n as Pt,t as Dt}from"./useHiddenSettings-2JpxuJV7.js";import{t as Yt}from"./card-dmVcp3AX.js";import{t as Zt}from"./PageSkeleton-DHjTwRT3.js";import{Dn as rt,On as Et,Pn as Tt,Yt as _t,en as Xt,hn as zt}from"./index-DMN58MRe.js";var o=ot(vt(),1),n=ot(bt(),1),N=200,W=100,X=32,$t=80,L=60,Wt=.2,Lt=2,R=6;function Z(e){if(e.reports.length===0)return N;const a=e.reports.reduce((i,f)=>i+Z(f),0),d=(e.reports.length-1)*X;return Math.max(N,a+d)}u(Z,"subtreeWidth");function at(e,a,d){const i=Z(e),f=[];if(e.reports.length>0){const C=e.reports.reduce((k,P)=>k+Z(P),0),S=(e.reports.length-1)*X;let j=a+(i-C-S)/2;for(const k of e.reports){const P=Z(k);f.push(at(k,j,d+W+$t)),j+=P+X}}return{id:e.id,name:e.name,role:e.role,status:e.status,x:a+(i-N)/2,y:d,children:f}}u(at,"layoutTree");function St(e){if(e.length===0)return[];e.reduce((f,C)=>f+Z(C),0),(e.length-1)*X;let a=L;const d=L,i=[];for(const f of e){const C=Z(f);i.push(at(f,a,d)),a+=C+X}return i}u(St,"layoutForest");function Ht(e){const a=[];function d(i){a.push(i),i.children.forEach(d)}return u(d,"walk"),e.forEach(d),a}u(Ht,"flattenLayout");function Rt(e){const a=[];function d(i){for(const f of i.children)a.push({parent:i,child:f}),d(f)}return u(d,"walk"),e.forEach(d),a}u(Rt,"collectEdges");function A(e){return Math.min(Math.max(e,Wt),Lt)}u(A,"clampZoom");function At(e){return{x:e.clientX,y:e.clientY}}u(At,"touchPoint");function nt(e,a){const d=e.clientX-a.clientX,i=e.clientY-a.clientY;return Math.hypot(d,i)}u(nt,"touchDistance");function st(e,a,d){const i=d.getBoundingClientRect();return{x:(e.clientX+a.clientX)/2-i.left,y:(e.clientY+a.clientY)/2-i.top}}u(st,"touchCenter");var Ot={running:"var(--hex-22d3ee)",active:"var(--hex-4ade80)",paused:"var(--hex-facc15)",idle:"var(--hex-facc15)",error:"var(--hex-f87171)",terminated:"var(--hex-a3a3a3)"},Bt="var(--hex-a3a3a3)";function oe(){const{selectedCompanyId:e}=wt(),{setBreadcrumbs:a}=Nt(),d=jt(),i=!!Xt(),{hidden:f}=Dt(),C=!i&&!f.has("company.import"),S=!f.has("company.export"),{data:j,isLoading:k}=Q({queryKey:K.org(e),queryFn:u(()=>J.org(e),"queryFn"),enabled:!!e}),{data:P}=Q({queryKey:K.agents.list(e),queryFn:u(()=>J.list(e),"queryFn"),enabled:!!e}),ct=(0,o.useMemo)(()=>{const t=new Map;for(const r of P??[])t.set(r.id,r);return t},[P]);(0,o.useEffect)(()=>{a([{label:"Org Chart"}])},[a]);const z=(0,o.useMemo)(()=>St(j??[]),[j]),D=(0,o.useMemo)(()=>Ht(z),[z]),it=(0,o.useMemo)(()=>Rt(z),[z]),v=(0,o.useMemo)(()=>{if(D.length===0)return{width:800,height:600};let t=0,r=0;for(const s of D)t=Math.max(t,s.x+N),r=Math.max(r,s.y+W);return{width:t+L,height:r+L}},[D]),p=(0,o.useRef)(null),[l,M]=(0,o.useState)({x:0,y:0}),[h,E]=(0,o.useState)(1),[H,O]=(0,o.useState)(!1),T=(0,o.useRef)({x:0,y:0,panX:0,panY:0}),m=(0,o.useRef)({mode:null,startPoint:{x:0,y:0},startPan:{x:0,y:0},startZoom:1,startDistance:0,startCenter:{x:0,y:0},moved:!1}),$=(0,o.useRef)(!1),Y=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>{Y.current!==null&&window.clearTimeout(Y.current)},[]);const B=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(B.current||D.length===0||!p.current)return;B.current=!0;const t=p.current,r=t.clientWidth,s=t.clientHeight,c=(r-40)/v.width,x=(s-40)/v.height,g=Math.min(c,x,1),y=v.width*g,w=v.height*g;E(g),M({x:(r-y)/2,y:(s-w)/2})},[D,v]);const lt=(0,o.useCallback)(t=>{t.button===0&&(t.target.closest("[data-org-card]")||(O(!0),T.current={x:t.clientX,y:t.clientY,panX:l.x,panY:l.y}))},[l]),ut=(0,o.useCallback)(t=>{if(!H)return;const r=t.clientX-T.current.x,s=t.clientY-T.current.y;M({x:T.current.panX+r,y:T.current.panY+s})},[H]),q=(0,o.useCallback)(()=>{O(!1)},[]),dt=(0,o.useCallback)(t=>{t.preventDefault();const r=p.current;if(!r)return;const s=r.getBoundingClientRect(),c=t.clientX-s.left,x=t.clientY-s.top,g=t.deltaY<0?1.1:.9,y=A(h*g),w=y/h;M({x:c-w*(c-l.x),y:x-w*(x-l.y)}),E(y)},[h,l]),I=(0,o.useCallback)((t,r)=>{const s=A(t),c=s/h;M({x:r.x-c*(r.x-l.x),y:r.y-c*(r.y-l.y)}),E(s)},[h,l]),ht=(0,o.useCallback)(()=>{if(!p.current)return;const t=p.current.clientWidth,r=p.current.clientHeight,s=(t-40)/v.width,c=(r-40)/v.height,x=Math.min(s,c,1),g=v.width*x,y=v.height*x;E(x),M({x:(t-g)/2,y:(r-y)/2})},[v]),mt=(0,o.useCallback)(t=>{if(t.touches.length>=2&&p.current){const[s,c]=[t.touches[0],t.touches[1]];m.current={mode:"pinch",startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:nt(s,c),startCenter:st(s,c,p.current),moved:!1};return}const r=t.touches[0];r&&(m.current={mode:"pan",startPoint:At(r),startPan:l,startZoom:h,startDistance:0,startCenter:{x:0,y:0},moved:!1})},[l,h]),ft=(0,o.useCallback)(t=>{const r=p.current;if(!r||!m.current.mode)return;if(t.touches.length>=2){const[g,y]=[t.touches[0],t.touches[1]],w=nt(g,y),_=st(g,y,r);if(m.current.mode!=="pinch"||m.current.startDistance===0){m.current={mode:"pinch",startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:w,startCenter:_,moved:!1};return}const b=m.current,U=A(b.startZoom*(w/b.startDistance)),G=U/b.startZoom,xt=_.x-b.startCenter.x,gt=_.y-b.startCenter.y;b.moved=b.moved||Math.abs(w-b.startDistance)>R||Math.hypot(xt,gt)>R,E(U),M({x:_.x-G*(b.startCenter.x-b.startPan.x),y:_.y-G*(b.startCenter.y-b.startPan.y)});return}const s=t.touches[0];if(!s||m.current.mode!=="pan")return;const c=s.clientX-m.current.startPoint.x,x=s.clientY-m.current.startPoint.y;m.current.moved=m.current.moved||Math.hypot(c,x)>R,M({x:m.current.startPan.x+c,y:m.current.startPan.y+x})},[l,h]),F=(0,o.useCallback)(()=>{m.current.moved&&($.current=!0,Y.current!==null&&window.clearTimeout(Y.current),Y.current=window.setTimeout(()=>{$.current=!1,Y.current=null},400)),m.current={mode:null,startPoint:{x:0,y:0},startPan:l,startZoom:h,startDistance:0,startCenter:{x:0,y:0},moved:!1}},[l,h]);return e?k?(0,n.jsx)(Zt,{variant:"org-chart"}):j&&j.length===0?(0,n.jsx)(tt,{icon:rt,message:"No organizational hierarchy defined."}):(0,n.jsxs)("div",{className:"flex h-(--sz-calc-38) min-h-(--sz-420px) flex-col md:h-full md:min-h-0",children:[(0,n.jsxs)("div",{className:"mb-2 flex shrink-0 flex-wrap items-center justify-start gap-2",children:[C&&(0,n.jsx)(V,{to:"/company/import",children:(0,n.jsxs)(et,{variant:"outline",size:"sm",children:[(0,n.jsx)(zt,{className:"mr-1.5 h-3.5 w-3.5"}),"Import company"]})}),S&&(0,n.jsx)(V,{to:"/company/export",children:(0,n.jsxs)(et,{variant:"outline",size:"sm",children:[(0,n.jsx)(Tt,{className:"mr-1.5 h-3.5 w-3.5"}),"Export company"]})})]}),(0,n.jsxs)("div",{ref:p,"data-testid":"org-chart-viewport",className:"w-full flex-1 min-h-0 overflow-hidden relative bg-muted/20 border border-border rounded-lg",style:{cursor:H?"grabbing":"grab",touchAction:"none",overscrollBehavior:"contain"},onMouseDown:lt,onMouseMove:ut,onMouseUp:q,onMouseLeave:q,onWheel:dt,onTouchStart:mt,onTouchMove:ft,onTouchEnd:F,onTouchCancel:F,children:[(0,n.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1.5",children:[(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-sm transition-colors hover:bg-accent sm:size-7",onClick:u(()=>{const t=p.current;t&&I(h*1.2,{x:t.clientWidth/2,y:t.clientHeight/2})},"onClick"),title:"Zoom in","aria-label":"Zoom in",children:(0,n.jsx)(kt,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})}),(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-sm transition-colors hover:bg-accent sm:size-7",onClick:u(()=>{const t=p.current;t&&I(h*.8,{x:t.clientWidth/2,y:t.clientHeight/2})},"onClick"),title:"Zoom out","aria-label":"Zoom out",children:(0,n.jsx)(Pt,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})}),(0,n.jsx)("button",{className:"flex size-9 items-center justify-center rounded border border-border bg-background text-(length:--text-nano) transition-colors hover:bg-accent sm:size-7",onClick:ht,title:"Fit to screen","aria-label":"Fit chart to screen",children:(0,n.jsx)(Et,{className:"h-4 w-4 sm:h-3.5 sm:w-3.5"})})]}),(0,n.jsx)("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%"},children:(0,n.jsx)("g",{transform:`translate(${l.x}, ${l.y}) scale(${h})`,children:it.map(({parent:t,child:r})=>{const s=t.x+N/2,c=t.y+W,x=r.x+N/2,g=r.y,y=(c+g)/2;return(0,n.jsx)("path",{d:`M ${s} ${c} L ${s} ${y} L ${x} ${y} L ${x} ${g}`,fill:"none",stroke:"var(--border)",strokeWidth:1.5},`${t.id}-${r.id}`)})})}),(0,n.jsx)("div",{"data-testid":"org-chart-card-layer",className:"absolute inset-0",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${h})`,transformOrigin:"0 0"},children:D.map(t=>{const r=ct.get(t.id),s=Ot[t.status]??Bt;return(0,n.jsx)(Yt,{"data-org-card":!0,className:"block absolute py-0 hover:shadow-md hover:border-foreground/20 transition-(--tp-box-shadow-border-color) duration-150 cursor-pointer select-none",style:{left:t.x,top:t.y,width:N,minHeight:W},onClick:u(()=>d(r?Ct(r):`/agents/${t.id}`),"onClick"),onClickCapture:u(c=>{$.current&&($.current=!1,c.preventDefault(),c.stopPropagation())},"onClickCapture"),children:(0,n.jsxs)("div",{className:"flex items-center px-4 py-3 gap-3",children:[(0,n.jsxs)("div",{className:"relative shrink-0",children:[(0,n.jsx)("div",{className:"w-9 h-9 rounded-full bg-muted flex items-center justify-center",children:(0,n.jsx)(Mt,{agent:r,size:16,className:"h-4.5 w-4.5 text-foreground/70"})}),(0,n.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 h-3 w-3 rounded-full border-2 border-card",style:{backgroundColor:s}})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"text-sm font-semibold text-foreground leading-tight",children:t.name}),(0,n.jsx)("span",{className:"text-(length:--text-micro) text-muted-foreground leading-tight mt-0.5",children:r?.title??It(t.role)}),r&&(0,n.jsx)("span",{className:"text-(length:--text-nano) text-muted-foreground/60 font-mono leading-tight mt-1",children:_t(r.adapterType)}),r&&r.capabilities&&(0,n.jsx)("span",{className:"text-(length:--text-nano) text-muted-foreground/80 leading-tight mt-1 line-clamp-2",children:r.capabilities})]})]})},t.id)})})]})]}):(0,n.jsx)(tt,{icon:rt,message:"Select a company to view the org chart."})}u(oe,"OrgChart");var qt=yt;function It(e){return qt[e]??e}u(It,"roleLabel");export{oe as OrgChart};
|