@dubusoft/toodo-linux-arm64 1.11.1-dev.196 → 1.11.1-dev.199
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/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/{Item-kYAeJfj9.js → Item-BOAbhUAB.js} +2 -2
- package/web/assets/{MenuBottomSheet-VP3PGD53.js → MenuBottomSheet-o_RDrtX2.js} +1 -1
- package/web/assets/{MenuBottomSheetActionList-CRRB5FYa.js → MenuBottomSheetActionList-By0_MhgW.js} +1 -1
- package/web/assets/{Selector-DG4ggGGA.js → Selector-B4vDQvaj.js} +2 -2
- package/web/assets/{SwipeActionsLayer-CSsG2Nuv.js → SwipeActionsLayer-DY0TreJX.js} +1 -1
- package/web/assets/{button-BKkZpxrZ.js → button-jyacV0rZ.js} +1 -1
- package/web/assets/{details-sheet-BZeYYEDw.js → details-sheet-fLXbNgUT.js} +1 -1
- package/web/assets/{index-DmSb8q-K.js → index-83Ne6V12.js} +5 -5
- package/web/assets/{index-DCOB-S8R.css → index-DWOI03Kr.css} +1 -1
- package/web/assets/{markdown-LwXrtHS-.js → markdown-C9TVA_eC.js} +1 -1
- package/web/assets/{offline-screen-fttSh_le.js → offline-screen-BmIDRilP.js} +1 -1
- package/web/assets/{review-CRBZXdlh.js → review-BRW0Me7k.js} +1 -1
- package/web/assets/{server-access-C38Sia28.js → server-access-Be1KAdSn.js} +1 -1
- package/web/assets/{task-details-C9XEbWux.js → task-details-v7VgvdGP.js} +1 -1
- package/web/assets/{task-graph-BrgtfnW3.js → task-graph-Df2HEjsp.js} +1 -1
- package/web/assets/{useLinkComponent-BQDbA1Rk.js → useLinkComponent-CSli8MM5.js} +2 -2
- package/web/index.html +7 -7
- package/web/sw.js +2 -2
- package/web/version.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{t as r}from"./opener-DWhHPoCL.js";import{t as i}from"./createLucideIcon-DtNDbJdC.js";import{n as a,t as o}from"./jsx-runtime-C3cWAN_r.js";import{mt as s}from"./index-DmSb8q-K.js";var c={name:`square-check`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-square-2`]};c.node;var l=i(c),u={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};u.node;var d=i(u);function f(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var p=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e,t){return((t||h).jsx?m:p).test(e)}var _=/[ \t\n\f\r]/g;function v(e){return typeof e==`object`?e.type===`text`&&y(e.value):y(e)}function y(e){return e.replace(_,``)===``}var b=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};b.prototype.normal={},b.prototype.property={},b.prototype.space=void 0;function x(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new b(n,r,t)}function S(e){return e.toLowerCase()}var C=class{constructor(e,t){this.attribute=t,this.property=e}};C.prototype.attribute=``,C.prototype.booleanish=!1,C.prototype.boolean=!1,C.prototype.commaOrSpaceSeparated=!1,C.prototype.commaSeparated=!1,C.prototype.defined=!1,C.prototype.mustUseProperty=!1,C.prototype.number=!1,C.prototype.overloadedBoolean=!1,C.prototype.property=``,C.prototype.spaceSeparated=!1,C.prototype.space=void 0;var w=e({boolean:()=>E,booleanish:()=>D,commaOrSpaceSeparated:()=>M,commaSeparated:()=>j,number:()=>k,overloadedBoolean:()=>O,spaceSeparated:()=>A}),T=0,E=N(),D=N(),O=N(),k=N(),A=N(),j=N(),M=N();function N(){return 2**++T}var P=Object.keys(w),ee=class extends C{constructor(e,t,n,r){let i=-1;if(super(e,t),F(this,`space`,r),typeof n==`number`)for(;++i<P.length;){let e=P[i];F(this,P[i],(n&w[e])===w[e])}}};ee.prototype.defined=!0;function F(e,t,n){n&&(e[t]=n)}function I(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ee(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[S(r)]=r,n[S(a.attribute)]=r}return new b(t,n,e.space)}var te=I({properties:{ariaActiveDescendant:null,ariaAtomic:D,ariaAutoComplete:null,ariaBusy:D,ariaChecked:D,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:A,ariaCurrent:null,ariaDescribedBy:A,ariaDetails:null,ariaDisabled:D,ariaDropEffect:A,ariaErrorMessage:null,ariaExpanded:D,ariaFlowTo:A,ariaGrabbed:D,ariaHasPopup:null,ariaHidden:D,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:A,ariaLevel:k,ariaLive:null,ariaModal:D,ariaMultiLine:D,ariaMultiSelectable:D,ariaOrientation:null,ariaOwns:A,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:D,ariaReadOnly:D,ariaRelevant:null,ariaRequired:D,ariaRoleDescription:A,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:D,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ne(e,t){return t in e?e[t]:t}function re(e,t){return ne(e,t.toLowerCase())}var ie=I({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:j,acceptCharset:A,accessKey:A,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alpha:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:A,autoFocus:E,autoPlay:E,blocking:A,capture:null,charSet:null,checked:E,cite:null,className:A,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:D,controls:E,controlsList:A,coords:k|j,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:O,draggable:D,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:A,height:k,hidden:O,high:k,href:null,hrefLang:null,htmlFor:A,httpEquiv:A,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:A,itemRef:A,itemScope:E,itemType:A,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:k,pattern:null,ping:A,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:A,required:E,reversed:E,rows:k,rowSpan:k,sandbox:A,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootCustomElementRegistry:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shadowRootSerializable:E,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:D,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:D,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:A,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:D,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:E,disablePictureInPicture:E,disableRemotePlayback:E,exportParts:j,part:A,prefix:null,property:null,results:k,security:null,unselectable:null},space:`html`,transform:re}),ae=I({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:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:A,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:j,g2:j,glyphName:j,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:A,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,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:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),oe=I({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()}}),se=I({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:re}),ce=I({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),le={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`},ue=/[A-Z]/g,de=/-[a-z]/g,fe=/^data[-\w.:]+$/i;function pe(e,t){let n=S(t),r=t,i=C;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&fe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(de,he);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!de.test(e)){let n=e.replace(ue,me);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ee}return new i(r,t)}function me(e){return`-`+e.toLowerCase()}function he(e){return e.charAt(1).toUpperCase()}var ge=x([te,ie,oe,se,ce],`html`),_e=x([te,ae,oe,se,ce],`svg`);function ve(e){return e.join(` `).trim()}var ye=/\/\*(?:[^*]|\*(?!\/))*\*\//g,be=/\n/g,xe=/^\s*/,Se=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ce=/^:\s*/,we=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Te=/^[;\s]*/,Ee=`
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{t as r}from"./opener-DWhHPoCL.js";import{t as i}from"./createLucideIcon-DtNDbJdC.js";import{n as a,t as o}from"./jsx-runtime-C3cWAN_r.js";import{mt as s}from"./index-83Ne6V12.js";var c={name:`square-check`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-square-2`]};c.node;var l=i(c),u={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};u.node;var d=i(u);function f(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var p=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h={};function g(e,t){return((t||h).jsx?m:p).test(e)}var _=/[ \t\n\f\r]/g;function v(e){return typeof e==`object`?e.type===`text`&&y(e.value):y(e)}function y(e){return e.replace(_,``)===``}var b=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};b.prototype.normal={},b.prototype.property={},b.prototype.space=void 0;function x(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new b(n,r,t)}function S(e){return e.toLowerCase()}var C=class{constructor(e,t){this.attribute=t,this.property=e}};C.prototype.attribute=``,C.prototype.booleanish=!1,C.prototype.boolean=!1,C.prototype.commaOrSpaceSeparated=!1,C.prototype.commaSeparated=!1,C.prototype.defined=!1,C.prototype.mustUseProperty=!1,C.prototype.number=!1,C.prototype.overloadedBoolean=!1,C.prototype.property=``,C.prototype.spaceSeparated=!1,C.prototype.space=void 0;var w=e({boolean:()=>E,booleanish:()=>D,commaOrSpaceSeparated:()=>M,commaSeparated:()=>j,number:()=>k,overloadedBoolean:()=>O,spaceSeparated:()=>A}),T=0,E=N(),D=N(),O=N(),k=N(),A=N(),j=N(),M=N();function N(){return 2**++T}var P=Object.keys(w),ee=class extends C{constructor(e,t,n,r){let i=-1;if(super(e,t),F(this,`space`,r),typeof n==`number`)for(;++i<P.length;){let e=P[i];F(this,P[i],(n&w[e])===w[e])}}};ee.prototype.defined=!0;function F(e,t,n){n&&(e[t]=n)}function I(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ee(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[S(r)]=r,n[S(a.attribute)]=r}return new b(t,n,e.space)}var te=I({properties:{ariaActiveDescendant:null,ariaAtomic:D,ariaAutoComplete:null,ariaBusy:D,ariaChecked:D,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:A,ariaCurrent:null,ariaDescribedBy:A,ariaDetails:null,ariaDisabled:D,ariaDropEffect:A,ariaErrorMessage:null,ariaExpanded:D,ariaFlowTo:A,ariaGrabbed:D,ariaHasPopup:null,ariaHidden:D,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:A,ariaLevel:k,ariaLive:null,ariaModal:D,ariaMultiLine:D,ariaMultiSelectable:D,ariaOrientation:null,ariaOwns:A,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:D,ariaReadOnly:D,ariaRelevant:null,ariaRequired:D,ariaRoleDescription:A,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:D,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ne(e,t){return t in e?e[t]:t}function re(e,t){return ne(e,t.toLowerCase())}var ie=I({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:j,acceptCharset:A,accessKey:A,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alpha:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:A,autoFocus:E,autoPlay:E,blocking:A,capture:null,charSet:null,checked:E,cite:null,className:A,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:D,controls:E,controlsList:A,coords:k|j,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:O,draggable:D,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:A,height:k,hidden:O,high:k,href:null,hrefLang:null,htmlFor:A,httpEquiv:A,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:A,itemRef:A,itemScope:E,itemType:A,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:k,pattern:null,ping:A,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:A,required:E,reversed:E,rows:k,rowSpan:k,sandbox:A,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootCustomElementRegistry:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shadowRootSerializable:E,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:D,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:D,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:A,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:D,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:E,disablePictureInPicture:E,disableRemotePlayback:E,exportParts:j,part:A,prefix:null,property:null,results:k,security:null,unselectable:null},space:`html`,transform:re}),ae=I({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:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:A,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:j,g2:j,glyphName:j,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,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:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:A,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,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:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),oe=I({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()}}),se=I({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:re}),ce=I({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),le={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`},ue=/[A-Z]/g,de=/-[a-z]/g,fe=/^data[-\w.:]+$/i;function pe(e,t){let n=S(t),r=t,i=C;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&fe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(de,he);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!de.test(e)){let n=e.replace(ue,me);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ee}return new i(r,t)}function me(e){return`-`+e.toLowerCase()}function he(e){return e.charAt(1).toUpperCase()}var ge=x([te,ie,oe,se,ce],`html`),_e=x([te,ae,oe,se,ce],`svg`);function ve(e){return e.join(` `).trim()}var ye=/\/\*(?:[^*]|\*(?!\/))*\*\//g,be=/\n/g,xe=/^\s*/,Se=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ce=/^:\s*/,we=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Te=/^[;\s]*/,Ee=`
|
|
2
2
|
`,De=`/`,Oe=`*`,ke=``,Ae=`comment`,je=`declaration`;function Me(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(be);t&&(n+=t.length);var i=e.lastIndexOf(Ee);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(xe)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(De==e.charAt(0)&&Oe==e.charAt(1)){for(var n=2;ke!=e.charAt(n)&&(Oe!=e.charAt(n)||De!=e.charAt(n+1));)++n;if(n+=2,ke===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Ae,comment:o})}}function f(){var e=a(),t=c(Se);if(t){if(d(),!c(Ce))return s(`property missing ':'`);var n=c(we),r=e({type:je,property:t[0].replace(ye,ke).trim(),value:n?n[0].replace(ye,ke).trim():ke});return c(Te),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function Ne(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Me(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Pe=Ie(`end`),Fe=Ie(`start`);function Ie(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Le(e){let t=Fe(e),n=Pe(e);if(t&&n)return{start:t,end:n}}function Re(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Be(e.position):`start`in e||`end`in e?Be(e):`line`in e||`column`in e?ze(e):``}function ze(e){return Ve(e&&e.line)+`:`+Ve(e&&e.column)}function Be(e){return ze(e&&e.start)+`-`+ze(e&&e.end)}function Ve(e){return e&&typeof e==`number`?e:1}var He=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Re(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(He.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var Ue={}.hasOwnProperty,We=new Map,Ge=/[A-Z]/g,Ke=/-([a-z])/g,qe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Je=new Set([`td`,`th`]),Ye=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xe(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=st(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=ot(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?_e:ge,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ze(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ze(e,t,n){if(t.type===`element`)return Qe(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tt(e,t,n);if(t.type===`mdxjsEsm`)return et(e,t);if(t.type===`root`)return nt(e,t,n);if(t.type===`text`)return rt(e,t)}function Qe(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=_e,e.schema=i),e.ancestors.push(t);let a=pt(e,t.tagName,!1),o=ct(e,t),s=ut(e,t);return qe.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!v(e)})),it(e,o,a,t),at(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $e(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}mt(e,t.position)}function et(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mt(e,t.position)}function tt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=_e,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pt(e,t.name,!0),o=lt(e,t),s=ut(e,t);return it(e,o,a,t),at(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nt(e,t,n){let r={};return at(r,ut(e,t)),e.create(t,e.Fragment,r,n)}function rt(e,t){return t.value}function it(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function at(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ot(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function st(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Fe(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ct(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ue.call(t.properties,i)){let a=dt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Je.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function lt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else mt(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else mt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function ut(e,t){let n=[],r=-1,i=e.passKeys?new Map:We;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Ze(e,a,o);s!==void 0&&n.push(s)}return n}function dt(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=pe(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?f(n):ve(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:ht(n):ft(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?le[r.property]||r.property:r.attribute,n]}function ft(e,t){let n={};try{Ne(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(Ke,vt))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new He("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Ye+`#cannot-parse-style-attribute`,r}return n}function pt(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=g(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=g(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ue.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mt(e)}function mt(e,t){let n=new He("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=Ye+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ht(e){let t={},n;for(n in e)Ue.call(e,n)&&(t[gt(n)]=e[n]);return t}function gt(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Ge,_t);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _t(e){return`-`+e.toLowerCase()}function vt(e,t){return t.toUpperCase()}var yt={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`]},bt={};function xt(e,t){let n=t||bt;return St(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function St(e,t,n){if(wt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Ct(e.children,t,n)}return Array.isArray(e)?Ct(e,t,n):``}function Ct(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=St(e[i],t,n);return r.join(``)}function wt(e){return!!(e&&typeof e==`object`)}var Tt=document.createElement(`i`);function Et(e){let t=`&`+e+`;`;Tt.innerHTML=t;let n=Tt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function L(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function R(e,t){return e.length>0?(L(e,e.length,0,t),e):t}var Dt={}.hasOwnProperty;function Ot(e){let t={},n=-1;for(;++n<e.length;)kt(t,e[n]);return t}function kt(e,t){let n;for(n in t){let r=(Dt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Dt.call(r,a)||(r[a]=[]);let e=i[a];At(r[a],Array.isArray(e)?e:e?[e]:[])}}}function At(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);L(e,0,0,r)}function jt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function z(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var B=G(/[A-Za-z]/),V=G(/[\dA-Za-z]/),Mt=G(/[#-'*+\--9=?A-Z^-~]/);function Nt(e){return e!==null&&(e<32||e===127)}var Pt=G(/\d/),Ft=G(/[\dA-Fa-f]/),It=G(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function U(e){return e!==null&&(e<0||e===32)}function W(e){return e===-2||e===-1||e===32}var Lt=G(/\p{P}|\p{S}/u),Rt=G(/\s/);function G(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zt(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&V(e.charCodeAt(n+1))&&V(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return W(r)?(e.enter(n),s(r)):t(r)}function s(r){return W(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Bt(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&W(t)?(e.enter(r),c(t)):l(t)}function c(t){return W(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Vt={tokenize:Ht};function Ht(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return H(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ut=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Wt(this,e,t,n,!1)}addBefore(e,t,n){Wt(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Wt(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Gt={tokenize:qt},Kt={tokenize:Jt};function qt(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Ut;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Kt,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Kt,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return H(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Ut;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Jt(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function q(e){if(e===null||U(e)||Rt(e))return 1;if(Lt(e))return 2}function Yt(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Xt={name:`attention`,resolveAll:Zt,tokenize:Qt};function Zt(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};$t(o,-a),$t(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=R(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=R(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=R(r,Yt(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=R(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=R(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),L(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Qt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=q(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=q(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function $t(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var en={name:`autolink`,tokenize:tn};function tn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return B(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||V(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||V(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Nt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Mt(t)?(e.consume(t),l):n(t)}function u(e){return V(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||V(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var nn={partial:!0,tokenize:rn};function rn(e,t,n){return r;function r(t){return W(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||H(e)?t(e):n(e)}}var an={continuation:{tokenize:sn},exit:cn,name:`blockQuote`,tokenize:on};function on(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return W(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function sn(e,t,n){let r=this;return i;function i(t){return W(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(an,t,n)(r)}}function cn(e){e.exit(`blockQuote`)}var ln={name:`characterEscape`,tokenize:un};function un(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return It(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var dn={name:`characterReference`,tokenize:fn};function fn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=V,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ft,u):(e.enter(`characterReferenceValue`),a=7,o=Pt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===V&&!Et(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var pn={partial:!0,tokenize:mn};function mn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var hn={concrete:!0,name:`codeFenced`,tokenize:gn};function gn(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),W(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||H(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(pn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):W(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||H(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&W(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||H(t)?e.check(pn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||H(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),W(t)?K(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),W(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||H(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var _n={name:`codeIndented`,tokenize:yn},vn={partial:!0,tokenize:bn};function yn(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Bt(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):H(t)?e.attempt(vn,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||H(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function bn(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Bt(e,t,a,`linePrefix`,4,4)(o)}function a(e){return H(e)?i(e):n(e)}}var xn={name:`codeText`,previous:Cn,resolve:Sn,tokenize:wn};function Sn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Cn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function wn(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||H(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Tn=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&En(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),En(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),En(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);En(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);En(this.left,t.reverse())}}}};function En(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Dn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Tn(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,On(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return L(e,0,1/0,u.slice(0)),!l}function On(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var kn={resolve:jn,tokenize:Mn},An={partial:!0,tokenize:Nn};function jn(e){return Dn(e),e}function Mn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):H(t)?e.check(An,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Nn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||H(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Pn(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Nt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||H(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||U(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Nt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Fn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):H(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||H(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!W(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function In(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):H(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||H(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ln(e,t){let n;return r;function r(i){return H(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):W(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Rn={name:`definition`,tokenize:Bn},zn={partial:!0,tokenize:Vn};function Bn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Fn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return U(t)?Ln(e,l)(t):l(t)}function l(t){return Pn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(zn,d,d)(t)}function d(t){return W(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||H(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Vn(e,t,n){return r;function r(t){return U(t)?Ln(e,i)(t):n(t)}function i(t){return In(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||H(e)?t(e):n(e)}}var Hn={name:`hardBreakEscape`,tokenize:Un};function Un(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return H(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Wn={name:`headingAtx`,resolve:Gn,tokenize:Kn};function Gn(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};L(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Kn(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||U(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||H(n)?(e.exit(`atxHeading`),t(n)):W(n)?K(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||U(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var qn=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Jn=[`pre`,`script`,`style`,`textarea`],Yn={concrete:!0,name:`htmlFlow`,resolveTo:Zn,tokenize:Qn},Xn={partial:!0,tokenize:$n};function Zn(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qn(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):B(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):B(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return B(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||U(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Jn.includes(l)?(i=1,r.interrupt?t(s):O(s)):qn.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||V(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return W(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||B(t)?(e.consume(t),b):W(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):W(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):W(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||H(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||U(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||W(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||H(t)?O(t):W(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):H(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Xn,te,k)(t)):t===null||H(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(pn,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||H(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Jn.includes(n)?(e.consume(t),I):O(t)}return B(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||H(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function $n(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(nn,t,n)}}var er={name:`htmlText`,tokenize:tr};function tr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):B(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):B(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):H(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):H(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):H(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):H(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return B(t)?(e.consume(t),S):n(t)}function S(t){return t===45||V(t)?(e.consume(t),S):C(t)}function C(t){return H(t)?(o=C,N(t)):W(t)?(e.consume(t),C):M(t)}function w(t){return t===45||V(t)?(e.consume(t),w):t===47||t===62||U(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||B(t)?(e.consume(t),E):H(t)?(o=T,N(t)):W(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||V(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):H(t)?(o=D,N(t)):W(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):H(t)?(o=O,N(t)):W(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):H(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||U(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||U(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return W(t)?K(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var nr={name:`labelEnd`,resolveAll:or,resolveTo:sr,tokenize:cr},rr={tokenize:lr},ir={tokenize:ur},ar={tokenize:dr};function or(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&L(e,0,e.length,n),e}function sr(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=R(o,e.slice(i+1,i+r+3)),o=R(o,[[`enter`,l,t]]),o=R(o,Yt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=R(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=R(o,e.slice(a+1)),o=R(o,[[`exit`,s,t]]),L(e,i,e.length,o),e}function cr(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(z(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(rr,u,o?u:d)(t):t===91?e.attempt(ir,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ar,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function lr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return U(t)?Ln(e,a)(t):a(t)}function a(t){return t===41?u(t):Pn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return U(t)?Ln(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?In(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return U(t)?Ln(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ur(e,t,n){let r=this;return i;function i(t){return Fn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function dr(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var fr={name:`labelStartImage`,resolveAll:nr.resolveAll,tokenize:pr};function pr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var mr={name:`labelStartLink`,resolveAll:nr.resolveAll,tokenize:hr};function hr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var gr={name:`lineEnding`,tokenize:_r};function _r(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}var vr={name:`thematicBreak`,tokenize:yr};function yr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||H(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),W(t)?K(e,s,`whitespace`)(t):s(t))}}var J={continuation:{tokenize:Cr},exit:Tr,name:`list`,tokenize:Sr},br={partial:!0,tokenize:Er},xr={partial:!0,tokenize:wr};function Sr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Pt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(vr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Pt(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(nn,r.interrupt?n:u,e.attempt(br,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return W(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Cr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(nn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!W(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(J,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wr(e,t,n){let r=this;return K(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Tr(e){e.exit(this.containerState.type)}function Er(e,t,n){let r=this;return K(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!W(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Dr={name:`setextUnderline`,resolveTo:Or,tokenize:kr};function Or(e,t){let n=new Ut,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function kr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),W(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||H(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Ar={tokenize:jr};function jr(e){let t=this,n=e.attempt(nn,r,e.attempt(this.parser.constructs.flowInitial,i,K(e,e.attempt(this.parser.constructs.flow,i,e.attempt(kn,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Mr={resolveAll:Ir()},Nr=Fr(`string`),Pr=Fr(`text`);function Fr(e){return{resolveAll:Ir(e===`text`?Lr:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ir(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Lr(e,t){let n=new Ut,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Rr=e({attentionMarkers:()=>Kr,contentInitial:()=>Br,disable:()=>qr,document:()=>zr,flow:()=>Hr,flowInitial:()=>Vr,insideSpan:()=>Gr,string:()=>Ur,text:()=>Wr}),zr={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:an},Br={91:Rn},Vr={[-2]:_n,[-1]:_n,32:_n},Hr={35:Wn,42:vr,45:[Dr,vr],60:Yn,61:Dr,95:vr,96:hn,126:hn},Ur={38:dn,92:ln},Wr={[-5]:gr,[-4]:gr,[-3]:gr,33:fr,38:dn,42:Xt,60:[en,er],91:mr,92:[Hn,ln],93:nr,95:Xt,96:xn},Gr={null:[Xt,Mr]},Kr={null:[42,95]},qr={null:[]};function Jr(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=R(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Yt(a,l.events,l),l.events):[]}function f(e,t){return Xr(p(e),t)}function p(e){return Yr(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){H(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&L(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Yr(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Xr(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
3
|
`;break;case-3:o=`\r
|
|
4
4
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Zr(e){let t={constructs:Ot([Rr,...(e||{}).extensions||[]]),content:n(Vt),defined:[],document:n(Gt),flow:n(Ar),lazy:{},string:n(Nr),text:n(Pr)};return t;function n(e){return n;function n(n){return Jr(t,e,n)}}}function Qr(e){for(;!Dn(e););return e}var $r=/[\0\t\n\r]/g;function ei(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){$r.lastIndex=c;let n=$r.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var ti=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ni(e){return e.replace(ti,ri)}function ri(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return jt(n.slice(t?2:1),t?16:10)}return Et(n)||e}var ii={}.hasOwnProperty;function ai(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),oi(n)(Qr(Zr(n).document().write(ei()(e,t,!0))))}function oi(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ye),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(he),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(fe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(pe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(me),hardBreakEscape:o(ge),hardBreakTrailing:o(ge),htmlFlow:o(_e,s),htmlFlowData:E,htmlText:o(_e,s),htmlTextData:E,image:o(ve),label:s,link:o(ye),listItem:o(xe),listItemValue:p,listOrdered:o(be,f),listUnordered:o(be),paragraph:o(Se),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(he),strong:o(Ce),thematicBreak:o(Te)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:F,labelText:ee,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:I,resourceTitleString:te,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};si(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),ii.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||li).call(o,void 0,e[0])}for(r.position={start:Y(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Y(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Y(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+Re({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||li).call(this,e,r[0])),n.position.end=Y(e.end)}function d(){return xt(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=z(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=we(),n.position={start:Y(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Y(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Y(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ni(t),n.identifier=z(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=z(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=jt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Et(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=Y(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function fe(){return{type:`inlineCode`,value:``,position:void 0}}function pe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function me(){return{type:`emphasis`,children:[],position:void 0}}function he(){return{type:`heading`,depth:0,children:[],position:void 0}}function ge(){return{type:`break`,position:void 0}}function _e(){return{type:`html`,value:``,position:void 0}}function ve(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ye(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function be(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Se(){return{type:`paragraph`,children:[],position:void 0}}function Ce(){return{type:`strong`,children:[],position:void 0}}function we(){return{type:`text`,value:``,position:void 0}}function Te(){return{type:`thematicBreak`,position:void 0}}}function Y(e){return{line:e.line,column:e.column,offset:e.offset}}function si(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?si(e,r):ci(e,r)}}function ci(e,t){let n;for(n in t)if(ii.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function li(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Re({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Re({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Re({start:t.start,end:t.end})+`) is still open`)}function ui(e){let t=this;t.parser=n;function n(n){return ai(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function di(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function fi(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{Mt as r,gn as i,r as a}from"./queries-X7gjrMUw.js";import{t as o}from"./createLucideIcon-DtNDbJdC.js";import{t as s}from"./button-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{Mt as r,gn as i,r as a}from"./queries-X7gjrMUw.js";import{t as o}from"./createLucideIcon-DtNDbJdC.js";import{t as s}from"./button-jyacV0rZ.js";import{_ as c,h as l,p as u,v as d,y as f}from"./session-sBDFnC3r.js";var p={name:`wifi-off`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};p.node;var m=o(p),h=e(t(),1),g=n();function _({children:e}){let t=(0,h.useSyncExternalStore)(d,u),n=t===`unreachable`||t===`retrying`;return(0,g.jsxs)(g.Fragment,{children:[n&&(0,g.jsx)(v,{retrying:t===`retrying`}),e,n&&(0,g.jsx)(`div`,{"aria-hidden":!0,className:`h-40`})]})}function v({retrying:e}){let t=navigator.onLine?f():`This device is offline.`,n=navigator.onLine&&c(),o=i().getQueryState(a.tasks)?.dataUpdatedAt;return(0,g.jsxs)(`div`,{role:`alert`,className:`fixed inset-x-2 bottom-2 z-50 mx-auto flex max-w-xl flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-amber-500 bg-amber-100 p-3 text-sm text-amber-950 shadow-md dark:bg-amber-950 dark:text-amber-100`,children:[(0,g.jsx)(m,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`p`,{className:`font-medium`,children:n?`Sign in to the Toodo server again`:`Can't reach the Toodo server`}),(0,g.jsxs)(`p`,{className:`text-xs`,children:[t,` `,o?(0,g.jsxs)(g.Fragment,{children:[`Read-only: the tasks shown were loaded `,(0,g.jsx)(r,{at:Math.floor(o/1e3)}),` and may be out of date.`]}):`What you see may be out of date.`,` `,n?`Changes are paused until you sign in again.`:`Changes are paused. Toodo reconnects on its own as soon as the server answers.`]})]}),n?(0,g.jsx)(s,{size:`sm`,variant:`secondary`,label:`Reload`,onClick:()=>location.reload()}):(0,g.jsx)(s,{size:`sm`,variant:`secondary`,label:e?`Trying...`:`Retry now`,isDisabled:e,onClick:l})]})}export{_ as ConnectionGate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{A as r,C as i,D as a,E as o,G as s,Ht as c,It as l,J as u,L as d,Lt as f,M as ee,N as p,O as m,P as te,Q as ne,S as re,T as h,Ut as ie,Wt as ae,X as g,Z as oe,_ as se,b as _,c as ce,d as le,dt as ue,f as v,g as y,h as b,j as x,k as de,l as S,m as C,mt as w,p as T,s as fe,u as E,ut as pe,v as D,w as me,x as O,y as k}from"./index-DmSb8q-K.js";import{t as A}from"./Selector-DG4ggGGA.js";import{n as j,t as M}from"./button-BKkZpxrZ.js";import{$ as he,At as ge,Bt as N,D as _e,Ft as ve,J as ye,Mt as P,Nt as F,Pt as I,X as be,Y as xe,Z as L,Zt as R,ht as Se,i as Ce,kt as we,l as Te,qt as z,rt as B,zt as V}from"./queries-X7gjrMUw.js";import{t as H}from"./opener-DWhHPoCL.js";var U=e(t(),1),W=n(),Ee={completed:R.success,opened_for_review:R.review,started:R.progress,worked_on:R.progress,planned:R.neutral},G=`live`,K=`all`,q=`any`,De=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function Oe({disabled:e,items:t}){return(0,W.jsx)(s,{items:t,alignment:`end`,menuWidth:192,renderTrigger:t=>(0,W.jsx)(M,{...t,size:`sm`,variant:`primary`,icon:(0,W.jsx)(c,{}),label:`Export`,isDisabled:e})})}function J(e,t){return`${e} ${t}${e===1?``:`s`}`}function ke(){let e=L(),t=B(),[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(null),c=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function l(e){s(null);try{await t.mutateAsync(e),r(!1)}catch(e){s(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:u,configured:d}=e.data;return n?(0,W.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),l(i)},children:[(0,W.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,W.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:w(g,`w-56`),value:i,onChange:e=>a(e.target.value)}),(0,W.jsx)(`datalist`,{id:`review-time-zones`,children:c.map(e=>(0,W.jsx)(`option`,{value:e},e))}),(0,W.jsx)(M,{size:`sm`,variant:`primary`,type:`submit`,label:`Save`,isDisabled:t.isPending}),d!==null&&(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Use the server's`,onClick:()=>void l(null)}),(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Cancel`,onClick:()=>r(!1)}),o&&(0,W.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:o})]}):(0,W.jsxs)(`span`,{children:[`Days are in `,u,d===null&&` (the server's time zone)`,`.`,` `,(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Change time zone`,className:`print:hidden`,onClick:()=>{a(d??u),r(!0)}})]})}function Y({onShowTask:e}){let[t,n]=(0,U.useState)(()=>O(`week`,I(Date.now()/1e3))),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(k),[p,m]=(0,U.useState)(null),[h,g]=(0,U.useState)(null),v=ye(t.from,t.to),y=be(),b=xe(h),x=he(),S=_e(),C=h!==null,T=C?b:v,E=Se(),D=Te(),N=C?b.data?.workspaces??[]:[...E.data??[],...D.data?.workspaces??[]],F=new Map(N.map(e=>[e.id,e.name])),L=C?b.data&&{period:{kind:b.data.summary.period,from:b.data.summary.from,to:b.data.summary.to},entries:b.data.entries,start:b.data.summary.start,end:b.data.summary.end,timeZone:b.data.summary.timeZone,now:b.data.summary.savedAt}:v.data&&{period:t,entries:v.data.entries,start:v.data.start,end:v.data.end,timeZone:v.data.timeZone,now:Date.now()/1e3},R=L?.period??t,z=L&&le(L.entries,c),B=de(L?.entries??[]);c.label!==null&&!B.includes(c.label)&&B.push(c.label);let V=[c.workspaceId===null?`across all workspaces`:`in ${F.get(c.workspaceId)??`workspace ${c.workspaceId}`}`,c.label!==null&&`labelled ${c.label}`].filter(Boolean).join(`, `),H=i[R.kind];function Y(e){s(null),n(e)}function X(e){s(null),m(null),g(e)}async function Pe(){try{let e=await x.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:c.workspaceId,label:c.label,title:null});s(`Saved "${e.title}" with ${J(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){s(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function Fe(e){try{await S.mutateAsync(e),X(null),s(`Deleted the saved review.`)}catch(e){s(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}function Ie(e){e!==t.kind&&Y(e===`custom`?{...t,kind:e}:O(e,t.from))}function Q(e){return C?b.data?Promise.resolve(e===`csv`?b.data.csv:b.data.markdown):Promise.reject(Error(`the saved review is still loading`)):Ce(ge.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:c.workspaceId,label:c.label}))}async function Le(){try{let e=Q(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}s(`Copied as Markdown.`)}catch(e){s(`Could not copy: ${e instanceof Error?e.message:String(e)}`)}}async function $(e){try{let t=await Q(e);we(t.fileName,new Blob([t.contents],{type:`${t.mediaType};charset=utf-8`})),s(`Downloaded ${t.fileName}`)}catch(e){s(`Could not export: ${e instanceof Error?e.message:String(e)}`)}}return(0,W.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:C&&b.data?b.data.summary.title:me[R.kind]}),(0,W.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,R.from,` to `,R.to,` `,V,`.`,` `,C?b.data&&(0,W.jsxs)(`span`,{children:[`Saved `,ve(b.data.summary.savedAt),`, with days in `,b.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,W.jsx)(ke,{})]})]}),(C||(y.data?.length??0)>0)&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,W.jsx)(A,{label:`Saved reviews`,isLabelHidden:!0,size:`sm`,options:[{value:G,label:`Live review`},...(y.data??[]).map(e=>({value:String(e.id),label:`${e.title} (saved ${I(e.savedAt)})`}))],value:h===null?G:String(h),onChange:e=>X(e===G?null:Number(e))}),h!==null&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Back to the live review`,onClick:()=>X(null)}),(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Delete saved review`,isDisabled:S.isPending,onClick:()=>void Fe(h)})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 print:hidden`,children:[!C&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ne,{label:`Review period`,size:`sm`,value:t.kind,onChange:e=>typeof e==`string`&&Ie(e),children:De.map(({kind:e,label:t})=>(0,W.jsx)(oe,{value:e,label:t},e))}),t.kind===`week`&&(0,W.jsx)(d,{label:`Week starting`,size:`sm`,format:`system_date`,value:t.from,onChange:e=>e&&Y(ee(e))}),t.kind===`custom`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(d,{label:`From`,size:`sm`,format:`system_date`,max:t.to,value:t.from,onChange:e=>e&&e<=t.to&&Y({...t,from:e})}),(0,W.jsx)(d,{label:`To`,size:`sm`,format:`system_date`,min:t.from,value:t.to,onChange:e=>e&&e>=t.from&&Y({...t,to:e})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,W.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:re(t)}),(0,W.jsx)(j,{size:`sm`,variant:`secondary`,icon:(0,W.jsx)(ae,{}),label:`Previous ${H}`,tooltip:`Previous ${H}`,onClick:()=>Y(r(t,-1))}),(0,W.jsx)(j,{size:`sm`,variant:`secondary`,icon:(0,W.jsx)(ie,{}),label:`Next ${H}`,tooltip:`Next ${H}`,onClick:()=>Y(r(t,1))}),t.kind!==`custom`&&(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`This ${H}`,onClick:()=>Y(O(t.kind,I(Date.now()/1e3)))})]}),(0,W.jsx)(`div`,{className:`ml-auto`,children:(0,W.jsx)(Oe,{disabled:!z,items:[...C?[]:[{label:`Save as snapshot`,onClick:()=>void Pe()}],{label:`Copy as Markdown`,onClick:()=>void Le()},{label:`Save as Markdown`,onClick:()=>void $(`markdown`)},{label:`Save as CSV`,onClick:()=>void $(`csv`)},{label:`Print or save as PDF`,onClick:()=>window.print()}]})})]}),(0,W.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,W.jsx)(A,{label:`Workspace`,isLabelHidden:!0,size:`sm`,options:[{value:K,label:`All workspaces`},...N.map(e=>({value:String(e.id),label:e.name}))],value:c.workspaceId===null?K:String(c.workspaceId),onChange:e=>l({...c,workspaceId:e===K?null:Number(e)})}),(0,W.jsx)(A,{label:`Label`,isLabelHidden:!0,size:`sm`,options:[{value:q,label:B.length===0?`No labels in this period`:`Any label`},...B.map(e=>({value:`label:${e}`,label:e}))],value:c.label===null?q:`label:${c.label}`,onChange:e=>l({...c,label:e===q?null:e.slice(6)})}),(c.workspaceId!==null||c.label!==null)&&(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Clear filters`,onClick:()=>l(k)})]}),o&&(0,W.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:o}),(0,W.jsx)(`p`,{role:`status`,className:w(`text-sm text-muted-foreground`,!T.isPending&&`sr-only`),children:T.isPending?`Loading the review...`:z?`Showing ${z.length} ${z.length===1?`task`:`tasks`} with activity in this ${H}.`:``}),T.isError&&(0,W.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,T.error.message]}),z?.length===0&&(0,W.jsx)(fe,{title:L?.entries.length===0?`No recorded activity in this ${H}.`:`No recorded activity in this ${H} matches the filters.`,hint:C?`This saved review keeps the tasks it had when it was saved.`:L?.entries.length===0?`Toodo records each task as it is planned, started, moved to review, and completed, so reviews fill up as you work.`:`Pick another period or change the filters to look at other work.`,action:C?void 0:(0,W.jsx)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Show the ${H} before`,onClick:()=>Y(r(t,-1))})})}),L&&z&&z.length>0&&(0,W.jsx)(Ne,{shown:L,entries:z,workspaces:N}),L&&z&&(0,W.jsx)(Z,{shown:L,entries:z,editable:!C}),R.kind===`year`&&z&&(0,W.jsx)(Me,{entries:z}),z&&se(z).map(t=>(0,W.jsxs)(`section`,{"aria-label":_[t.outcome],className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`h3`,{className:w(`text-sm font-semibold`,Ee[t.outcome]),children:[_[t.outcome],` `,(0,W.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,W.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:i,pullRequest:o})=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(u,{type:t.taskType}),(0,W.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,W.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,W.jsx)(f,{className:`shrink-0`,label:`Not adopted`}),i&&(0,W.jsx)(f,{className:`shrink-0`,label:`Archived`}),t.resolution===`completed`&&(0,W.jsx)(f,{className:`shrink-0`,variant:`green`,label:`Completed`}),a(t)&&(0,W.jsx)(je,{url:a(t),stats:o}),(0,W.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[F.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,W.jsx)(P,{at:n})]})]}),(0,W.jsx)(ue,{task:t}),i||C?null:p?.id===t.id?(0,W.jsx)(te,{task:t,focusPlan:p.field,onDone:()=>m(null)}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,W.jsx)(pe,{task:t,onEdit:e=>m({id:t.id,field:e})})}),t.completionNote&&(0,W.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),L&&(0,W.jsx)(Ae,{task:t,shown:L}),r.length>0&&(0,W.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${H}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,W.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,W.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,W.jsx)(`span`,{className:`truncate`,children:ce(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function X(e){return e===0?`0h`:C(e)}function Ae({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=F(e.timeline,i),o=V(e.timeline,i);if(a===null||o===null)return null;let s=N(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,W.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,W.jsxs)(`p`,{children:[X(a),` active, `,X(o),` waiting`]}),s.length>0&&(0,W.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,W.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,X(Math.max((e.end??i)-e.start,0)),` from `,I(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function je({url:e,stats:t}){let n=o(e),r=t=>{t.preventDefault(),H(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,W.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${m(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function Me({entries:e}){let t=p(e);return t===null?null:(0,W.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,W.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,W.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,W.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,W.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,W.jsxs)(`dd`,{className:`text-lg font-semibold`,title:y(t.pullRequests),children:[t.pullRequests.reviews,(0,W.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,W.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(u,{type:e.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:m(t)})]},e.id))})]}),t.research.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,W.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsx)(f,{className:`shrink-0`,variant:n?`green`:`neutral`,label:n?`Adopted`:`Not adopted`}),(0,W.jsx)(P,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,W.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,W.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(u,{type:e.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,C(t),`, `,C(n),` active`]})]},e.id))})]})]})}function Z({shown:e,entries:t,editable:n}){let r=h(e.end,t,e.now),i=n?t.filter(({archived:e})=>!e).map(({task:e})=>l(e)):[],a=i.filter(e=>e.includes(`estimate`)).length,o=i.filter(e=>e.includes(`dueDate`)).length;if(r===null&&a+o===0)return null;let s=(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,W.jsxs)(`dd`,{children:[[a>0&&`${J(a,`task`)} without an estimate`,o>0&&`${J(o,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,W.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,W.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:s})]}):(0,W.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,W.jsx)(`dd`,{children:r.time?b(r.time):`No completed task had an estimate`})]}),(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,W.jsx)(`dd`,{children:r.dueDates?T(r.dueDates):`No completed task had a due date`})]}),a+o>0&&s]}),r!==null&&r.late.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,W.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,W.jsx)(u,{type:e.task.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,W.jsx)(`span`,{className:w(`ml-auto shrink-0 text-xs`,R.danger),children:D(e)})]},e.task.id))})]})]})}function Ne({shown:e,entries:t,workspaces:n}){let r=x(e.period,t,n,e.timeZone),i=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,W.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:_[e]}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,W.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[S.map(e=>{let t=r[e];return(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:E[e]}),(0,W.jsx)(`dd`,{children:t===null?`No data`:`${C(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,W.jsx)(`dd`,{children:v(r.changes)})]}),r.completedByType.length>0&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,W.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,W.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,W.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,W.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,W.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,W.jsx)(`span`,{"aria-hidden":!0,className:w(`h-2 rounded-sm`,z.success),style:{width:`${t/i*60}%`,minWidth:t>0?4:0}}),(0,W.jsx)(`span`,{children:t})]},e))})]})]})}export{Y as Review};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{A as r,C as i,D as a,E as o,G as s,Ht as c,It as l,J as u,L as d,Lt as f,M as ee,N as p,O as m,P as te,Q as ne,S as re,T as h,Ut as ie,Wt as ae,X as g,Z as oe,_ as se,b as _,c as ce,d as le,dt as ue,f as v,g as y,h as b,j as x,k as de,l as S,m as C,mt as w,p as T,s as fe,u as E,ut as pe,v as D,w as me,x as O,y as k}from"./index-83Ne6V12.js";import{t as A}from"./Selector-B4vDQvaj.js";import{n as j,t as M}from"./button-jyacV0rZ.js";import{$ as he,At as ge,Bt as N,D as _e,Ft as ve,J as ye,Mt as P,Nt as F,Pt as I,X as be,Y as xe,Z as L,Zt as R,ht as Se,i as Ce,kt as we,l as Te,qt as z,rt as B,zt as V}from"./queries-X7gjrMUw.js";import{t as H}from"./opener-DWhHPoCL.js";var U=e(t(),1),W=n(),Ee={completed:R.success,opened_for_review:R.review,started:R.progress,worked_on:R.progress,planned:R.neutral},G=`live`,K=`all`,q=`any`,De=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function Oe({disabled:e,items:t}){return(0,W.jsx)(s,{items:t,alignment:`end`,menuWidth:192,renderTrigger:t=>(0,W.jsx)(M,{...t,size:`sm`,variant:`primary`,icon:(0,W.jsx)(c,{}),label:`Export`,isDisabled:e})})}function J(e,t){return`${e} ${t}${e===1?``:`s`}`}function ke(){let e=L(),t=B(),[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(null),c=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function l(e){s(null);try{await t.mutateAsync(e),r(!1)}catch(e){s(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:u,configured:d}=e.data;return n?(0,W.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),l(i)},children:[(0,W.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,W.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:w(g,`w-56`),value:i,onChange:e=>a(e.target.value)}),(0,W.jsx)(`datalist`,{id:`review-time-zones`,children:c.map(e=>(0,W.jsx)(`option`,{value:e},e))}),(0,W.jsx)(M,{size:`sm`,variant:`primary`,type:`submit`,label:`Save`,isDisabled:t.isPending}),d!==null&&(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Use the server's`,onClick:()=>void l(null)}),(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Cancel`,onClick:()=>r(!1)}),o&&(0,W.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:o})]}):(0,W.jsxs)(`span`,{children:[`Days are in `,u,d===null&&` (the server's time zone)`,`.`,` `,(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Change time zone`,className:`print:hidden`,onClick:()=>{a(d??u),r(!0)}})]})}function Y({onShowTask:e}){let[t,n]=(0,U.useState)(()=>O(`week`,I(Date.now()/1e3))),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(k),[p,m]=(0,U.useState)(null),[h,g]=(0,U.useState)(null),v=ye(t.from,t.to),y=be(),b=xe(h),x=he(),S=_e(),C=h!==null,T=C?b:v,E=Se(),D=Te(),N=C?b.data?.workspaces??[]:[...E.data??[],...D.data?.workspaces??[]],F=new Map(N.map(e=>[e.id,e.name])),L=C?b.data&&{period:{kind:b.data.summary.period,from:b.data.summary.from,to:b.data.summary.to},entries:b.data.entries,start:b.data.summary.start,end:b.data.summary.end,timeZone:b.data.summary.timeZone,now:b.data.summary.savedAt}:v.data&&{period:t,entries:v.data.entries,start:v.data.start,end:v.data.end,timeZone:v.data.timeZone,now:Date.now()/1e3},R=L?.period??t,z=L&&le(L.entries,c),B=de(L?.entries??[]);c.label!==null&&!B.includes(c.label)&&B.push(c.label);let V=[c.workspaceId===null?`across all workspaces`:`in ${F.get(c.workspaceId)??`workspace ${c.workspaceId}`}`,c.label!==null&&`labelled ${c.label}`].filter(Boolean).join(`, `),H=i[R.kind];function Y(e){s(null),n(e)}function X(e){s(null),m(null),g(e)}async function Pe(){try{let e=await x.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:c.workspaceId,label:c.label,title:null});s(`Saved "${e.title}" with ${J(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){s(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function Fe(e){try{await S.mutateAsync(e),X(null),s(`Deleted the saved review.`)}catch(e){s(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}function Ie(e){e!==t.kind&&Y(e===`custom`?{...t,kind:e}:O(e,t.from))}function Q(e){return C?b.data?Promise.resolve(e===`csv`?b.data.csv:b.data.markdown):Promise.reject(Error(`the saved review is still loading`)):Ce(ge.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:c.workspaceId,label:c.label}))}async function Le(){try{let e=Q(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}s(`Copied as Markdown.`)}catch(e){s(`Could not copy: ${e instanceof Error?e.message:String(e)}`)}}async function $(e){try{let t=await Q(e);we(t.fileName,new Blob([t.contents],{type:`${t.mediaType};charset=utf-8`})),s(`Downloaded ${t.fileName}`)}catch(e){s(`Could not export: ${e instanceof Error?e.message:String(e)}`)}}return(0,W.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:C&&b.data?b.data.summary.title:me[R.kind]}),(0,W.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,R.from,` to `,R.to,` `,V,`.`,` `,C?b.data&&(0,W.jsxs)(`span`,{children:[`Saved `,ve(b.data.summary.savedAt),`, with days in `,b.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,W.jsx)(ke,{})]})]}),(C||(y.data?.length??0)>0)&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,W.jsx)(A,{label:`Saved reviews`,isLabelHidden:!0,size:`sm`,options:[{value:G,label:`Live review`},...(y.data??[]).map(e=>({value:String(e.id),label:`${e.title} (saved ${I(e.savedAt)})`}))],value:h===null?G:String(h),onChange:e=>X(e===G?null:Number(e))}),h!==null&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Back to the live review`,onClick:()=>X(null)}),(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Delete saved review`,isDisabled:S.isPending,onClick:()=>void Fe(h)})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 print:hidden`,children:[!C&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ne,{label:`Review period`,size:`sm`,value:t.kind,onChange:e=>typeof e==`string`&&Ie(e),children:De.map(({kind:e,label:t})=>(0,W.jsx)(oe,{value:e,label:t},e))}),t.kind===`week`&&(0,W.jsx)(d,{label:`Week starting`,size:`sm`,format:`system_date`,value:t.from,onChange:e=>e&&Y(ee(e))}),t.kind===`custom`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(d,{label:`From`,size:`sm`,format:`system_date`,max:t.to,value:t.from,onChange:e=>e&&e<=t.to&&Y({...t,from:e})}),(0,W.jsx)(d,{label:`To`,size:`sm`,format:`system_date`,min:t.from,value:t.to,onChange:e=>e&&e>=t.from&&Y({...t,to:e})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,W.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:re(t)}),(0,W.jsx)(j,{size:`sm`,variant:`secondary`,icon:(0,W.jsx)(ae,{}),label:`Previous ${H}`,tooltip:`Previous ${H}`,onClick:()=>Y(r(t,-1))}),(0,W.jsx)(j,{size:`sm`,variant:`secondary`,icon:(0,W.jsx)(ie,{}),label:`Next ${H}`,tooltip:`Next ${H}`,onClick:()=>Y(r(t,1))}),t.kind!==`custom`&&(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`This ${H}`,onClick:()=>Y(O(t.kind,I(Date.now()/1e3)))})]}),(0,W.jsx)(`div`,{className:`ml-auto`,children:(0,W.jsx)(Oe,{disabled:!z,items:[...C?[]:[{label:`Save as snapshot`,onClick:()=>void Pe()}],{label:`Copy as Markdown`,onClick:()=>void Le()},{label:`Save as Markdown`,onClick:()=>void $(`markdown`)},{label:`Save as CSV`,onClick:()=>void $(`csv`)},{label:`Print or save as PDF`,onClick:()=>window.print()}]})})]}),(0,W.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,W.jsx)(A,{label:`Workspace`,isLabelHidden:!0,size:`sm`,options:[{value:K,label:`All workspaces`},...N.map(e=>({value:String(e.id),label:e.name}))],value:c.workspaceId===null?K:String(c.workspaceId),onChange:e=>l({...c,workspaceId:e===K?null:Number(e)})}),(0,W.jsx)(A,{label:`Label`,isLabelHidden:!0,size:`sm`,options:[{value:q,label:B.length===0?`No labels in this period`:`Any label`},...B.map(e=>({value:`label:${e}`,label:e}))],value:c.label===null?q:`label:${c.label}`,onChange:e=>l({...c,label:e===q?null:e.slice(6)})}),(c.workspaceId!==null||c.label!==null)&&(0,W.jsx)(M,{size:`sm`,variant:`ghost`,label:`Clear filters`,onClick:()=>l(k)})]}),o&&(0,W.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:o}),(0,W.jsx)(`p`,{role:`status`,className:w(`text-sm text-muted-foreground`,!T.isPending&&`sr-only`),children:T.isPending?`Loading the review...`:z?`Showing ${z.length} ${z.length===1?`task`:`tasks`} with activity in this ${H}.`:``}),T.isError&&(0,W.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,T.error.message]}),z?.length===0&&(0,W.jsx)(fe,{title:L?.entries.length===0?`No recorded activity in this ${H}.`:`No recorded activity in this ${H} matches the filters.`,hint:C?`This saved review keeps the tasks it had when it was saved.`:L?.entries.length===0?`Toodo records each task as it is planned, started, moved to review, and completed, so reviews fill up as you work.`:`Pick another period or change the filters to look at other work.`,action:C?void 0:(0,W.jsx)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:(0,W.jsx)(M,{size:`sm`,variant:`secondary`,label:`Show the ${H} before`,onClick:()=>Y(r(t,-1))})})}),L&&z&&z.length>0&&(0,W.jsx)(Ne,{shown:L,entries:z,workspaces:N}),L&&z&&(0,W.jsx)(Z,{shown:L,entries:z,editable:!C}),R.kind===`year`&&z&&(0,W.jsx)(Me,{entries:z}),z&&se(z).map(t=>(0,W.jsxs)(`section`,{"aria-label":_[t.outcome],className:`flex flex-col gap-2`,children:[(0,W.jsxs)(`h3`,{className:w(`text-sm font-semibold`,Ee[t.outcome]),children:[_[t.outcome],` `,(0,W.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,W.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:i,pullRequest:o})=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,W.jsx)(u,{type:t.taskType}),(0,W.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,W.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,W.jsx)(f,{className:`shrink-0`,label:`Not adopted`}),i&&(0,W.jsx)(f,{className:`shrink-0`,label:`Archived`}),t.resolution===`completed`&&(0,W.jsx)(f,{className:`shrink-0`,variant:`green`,label:`Completed`}),a(t)&&(0,W.jsx)(je,{url:a(t),stats:o}),(0,W.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[F.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,W.jsx)(P,{at:n})]})]}),(0,W.jsx)(ue,{task:t}),i||C?null:p?.id===t.id?(0,W.jsx)(te,{task:t,focusPlan:p.field,onDone:()=>m(null)}):(0,W.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,W.jsx)(pe,{task:t,onEdit:e=>m({id:t.id,field:e})})}),t.completionNote&&(0,W.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),L&&(0,W.jsx)(Ae,{task:t,shown:L}),r.length>0&&(0,W.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${H}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,W.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,W.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,W.jsx)(`span`,{className:`truncate`,children:ce(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function X(e){return e===0?`0h`:C(e)}function Ae({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=F(e.timeline,i),o=V(e.timeline,i);if(a===null||o===null)return null;let s=N(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,W.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,W.jsxs)(`p`,{children:[X(a),` active, `,X(o),` waiting`]}),s.length>0&&(0,W.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,W.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,X(Math.max((e.end??i)-e.start,0)),` from `,I(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function je({url:e,stats:t}){let n=o(e),r=t=>{t.preventDefault(),H(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,W.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${m(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function Me({entries:e}){let t=p(e);return t===null?null:(0,W.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,W.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,W.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,W.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,W.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,W.jsxs)(`dd`,{className:`text-lg font-semibold`,title:y(t.pullRequests),children:[t.pullRequests.reviews,(0,W.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,W.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(u,{type:e.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:m(t)})]},e.id))})]}),t.research.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,W.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,W.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsx)(f,{className:`shrink-0`,variant:n?`green`:`neutral`,label:n?`Adopted`:`Not adopted`}),(0,W.jsx)(P,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,W.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,W.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsx)(u,{type:e.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,W.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,C(t),`, `,C(n),` active`]})]},e.id))})]})]})}function Z({shown:e,entries:t,editable:n}){let r=h(e.end,t,e.now),i=n?t.filter(({archived:e})=>!e).map(({task:e})=>l(e)):[],a=i.filter(e=>e.includes(`estimate`)).length,o=i.filter(e=>e.includes(`dueDate`)).length;if(r===null&&a+o===0)return null;let s=(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,W.jsxs)(`dd`,{children:[[a>0&&`${J(a,`task`)} without an estimate`,o>0&&`${J(o,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,W.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,W.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:s})]}):(0,W.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,W.jsx)(`dd`,{children:r.time?b(r.time):`No completed task had an estimate`})]}),(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,W.jsx)(`dd`,{children:r.dueDates?T(r.dueDates):`No completed task had a due date`})]}),a+o>0&&s]}),r!==null&&r.late.length>0&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,W.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,W.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,W.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,W.jsx)(u,{type:e.task.taskType}),(0,W.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,W.jsx)(`span`,{className:w(`ml-auto shrink-0 text-xs`,R.danger),children:D(e)})]},e.task.id))})]})]})}function Ne({shown:e,entries:t,workspaces:n}){let r=x(e.period,t,n,e.timeZone),i=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,W.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,W.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:_[e]}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,W.jsxs)(`div`,{className:`flex flex-col`,children:[(0,W.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,W.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,W.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[S.map(e=>{let t=r[e];return(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:E[e]}),(0,W.jsx)(`dd`,{children:t===null?`No data`:`${C(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,W.jsx)(`dd`,{children:v(r.changes)})]}),r.completedByType.length>0&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,W.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,W.jsxs)(`div`,{className:`contents`,children:[(0,W.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,W.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,W.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,W.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,W.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,W.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,W.jsx)(`span`,{"aria-hidden":!0,className:w(`h-2 rounded-sm`,z.success),style:{width:`${t/i*60}%`,minWidth:t>0?4:0}}),(0,W.jsx)(`span`,{children:t})]},e))})]})]})}export{Y as Review};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{t as r,u as i}from"./Selector-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{t as r,u as i}from"./Selector-B4vDQvaj.js";import{t as a}from"./button-jyacV0rZ.js";import{a as o,i as s,n as c,o as l,r as u}from"./index-83Ne6V12.js";import{d,r as f,s as p,u as m}from"./session-sBDFnC3r.js";var h=e(t(),1),g=n();function _({children:e}){let t=(0,h.useSyncExternalStore)(d,p),[n,r]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{if(t)return;let e=!0;return f().catch(e=>console.warn(`toodo: could not ask the server about Cloudflare Access`,e)).finally(()=>{e&&r(!0)}),()=>{e=!1,r(!1)}},[t]),t?e:n?(0,g.jsx)(b,{}):null}var v=[{value:`full`,label:`Full access`},{value:`read`,label:`Read-only`}],y=u.map(({label:e,days:t})=>({value:t===null?`never`:String(t),label:e}));function b(){let[e,t]=(0,h.useState)(``),[n,u]=(0,h.useState)(()=>o(navigator.userAgent)),[d,f]=(0,h.useState)(c.scope),[p,_]=(0,h.useState)(String(c.expiresInDays)),[b,x]=(0,h.useState)(null),[S,C]=(0,h.useState)(!1),[w,T]=(0,h.useState)(!1),E=(0,h.useRef)(null),D=(0,h.useId)(),O=`${D}-help`,k=`${D}-rejected`;async function A(t){t.preventDefault(),T(!0),x(null),C(!1);try{let t=p===`never`?null:Number(p);m(await l(e.trim(),n.trim(),{scope:d,expiresInDays:t}))}catch(e){e instanceof s?(C(!0),E.current?.focus(),E.current?.select()):e instanceof TypeError?x(`Could not reach the server: ${String(e)}`):x(e instanceof Error?e.message:String(e))}finally{T(!1)}}return(0,g.jsx)(`main`,{className:`flex min-h-svh flex-col items-center justify-center gap-4 p-6`,children:(0,g.jsxs)(`form`,{onSubmit:A,"aria-label":`Server access`,className:`flex w-full max-w-sm flex-col gap-3 rounded-lg border p-5`,children:[(0,g.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Toodo server`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Sign in with the server's access token. This browser then gets a token of its own, which you can revoke under Devices.`}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,g.jsx)(i,{ref:E,label:`Access token`,type:`password`,autoComplete:`current-password`,value:e,onChange:e=>{t(e),C(!1)},status:S?{type:`error`}:void 0,"aria-describedby":S?`${k} ${O}`:O}),S&&(0,g.jsxs)(`p`,{id:k,role:`alert`,className:`text-xs text-destructive`,children:[`The server did not accept this token. Paste the whole contents of`,` `,(0,g.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` again; a device token stops working once it is revoked.`]}),(0,g.jsxs)(`p`,{id:O,className:`text-xs text-muted-foreground`,children:[`Copy it from `,(0,g.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` in the server's data directory.`]})]}),(0,g.jsx)(i,{label:`Device name`,description:`Signing in again under a device's name replaces that device, so give each browser its own name.`,value:n,onChange:e=>u(e.slice(0,80))}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,g.jsx)(r,{label:`Access`,options:v,value:d,onChange:e=>f(e)}),(0,g.jsx)(r,{label:`Token expires after`,options:y,value:p,onChange:_})]}),(0,g.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Applies when you sign in with `,(0,g.jsx)(`code`,{className:`text-xs`,children:`web-token`}),`. When the token expires, sign in again.`]}),b&&(0,g.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:b}),(0,g.jsx)(a,{type:`submit`,variant:`primary`,label:w?`Checking...`:`Continue`,isDisabled:w||!e.trim()||!n.trim()})]})})}export{_ as ServerAccess};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{n as r,t as i}from"./button-BKkZpxrZ.js";import{t as a}from"./details-sheet-BZeYYEDw.js";import{Bt as o,F as s,Ft as c,Gt as l,H as u,I as d,Lt as f,U as p,W as m,at as h,ct as g,dt as _,ft as v,it as y,lt as b,mt as x,ot as S,pt as C,st as w,zt as T}from"./index-DmSb8q-K.js";import{t as E,u as D}from"./Selector-DG4ggGGA.js";import{Ft as O,L as ee,Lt as k,Mt as A,Rt as j,S as M,U as N,Zt as P,_ as te,c as ne,dt as re,g as ie,h as F,ht as I,ot as L}from"./queries-X7gjrMUw.js";import{t as R}from"./opener-DWhHPoCL.js";import{t as z}from"./createLucideIcon-DtNDbJdC.js";var B={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};B.node;var V=z(B),H={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};H.node;var U=z(H),W={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};W.node;var G=z(W),K=e(t(),1),q=n();function J({onClose:e,children:t}){let n=(0,K.useRef)(null),[r,o]=(0,K.useState)(!1);function s(){n.current?.querySelector(`form[data-dirty]`)?o(!0):e()}return(0,K.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[aria-haspopup='menu'][aria-expanded='true']`)||(r?o(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select, [role=combobox], [role=listbox]`)||s())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,q.jsx)(a,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:s,banner:r&&(0,q.jsxs)(`div`,{role:`group`,"aria-label":`Unsaved changes`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b bg-muted px-4 py-2 text-xs`,children:[(0,q.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,q.jsx)(i,{size:`sm`,variant:`secondary`,label:`Keep editing`,autoFocus:!0,onClick:()=>o(!1)}),(0,q.jsx)(i,{size:`sm`,variant:`destructive`,label:`Discard changes`,onClick:e})]}),children:t})}function Y(e){switch(e.status){case`in_progress`:return`Started`;case`in_review`:return`In review`;case`done`:return`Completed`;case`planned`:return e.reopened?`Reopened`:`Paused`}}function ae({task:e}){let t=e.timeline.filter(e=>e.reason!==null);return t.length===0?null:(0,q.jsx)(`ol`,{"aria-label":`Reasons of #${e.id}`,className:`mt-1 flex flex-col gap-0.5`,children:t.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,q.jsx)(A,{className:`shrink-0 text-muted-foreground`,at:e.at}),(0,q.jsx)(`span`,{className:`shrink-0 font-medium`,children:Y(e)}),(0,q.jsx)(`span`,{className:`min-w-0 whitespace-pre-line break-words-keep max-md:basis-full`,children:e.reason})]},t))})}var oe={lane:`Lane`,discord:`Discord`,pr:`PR`};function se({value:e}){if(/^https?:\/\//i.test(e)){let t=t=>{t.preventDefault(),R(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,q.jsx)(`a`,{href:e,onClick:t,onAuxClick:t,className:`min-w-0 break-all text-primary underline underline-offset-2 hover:no-underline`,children:e})}let t=e.indexOf(`:`),n=t>0?oe[e.slice(0,t)]:void 0;return n===void 0?(0,q.jsx)(`code`,{className:`min-w-0 break-all`,children:e}):(0,q.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:n}),(0,q.jsx)(`code`,{className:`min-w-0 break-all`,children:e.slice(t+1)})]})}function ce({task:e}){return e.refs.length===0?null:(0,q.jsx)(w,{label:`Refs`,children:(0,q.jsx)(`ul`,{"aria-label":`Refs of #${e.id}`,className:`flex flex-col gap-0.5`,children:e.refs.map(e=>(0,q.jsx)(`li`,{className:`flex min-w-0`,children:(0,q.jsx)(se,{value:e})},e))})})}function le({task:e,detailed:t}){let n=j(e.milestones);return n.length===0?null:t?(0,q.jsxs)(w,{label:`Timeline`,children:[(0,q.jsx)(`dl`,{"aria-label":`Timeline of #${e.id}`,className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:n.map(({label:e,at:t})=>(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(A,{at:t})})]},e))}),(0,q.jsx)(ae,{task:e})]}):(0,q.jsx)(`p`,{"aria-label":`Timeline of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:n.map(({label:e,at:t})=>(0,q.jsx)(A,{at:t,prefix:`${e} `},e))})}function ue({task:e,tasks:t,context:n,navigation:a}){let s=L(),c=ne(),l=N(),u=(s.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),d=t.filter(t=>t.id!==e.id&&!u.includes(t.id)),f=[...new Set([e.workspaceId,...d.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:d.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),p=C(),m=c.isPending||l.isPending||p,h=c.error??l.error;if(u.length===0&&f.length===0)return null;let g=f.length>0&&(0,q.jsx)(E,{label:`Add related task to #${e.id}`,isLabelHidden:!0,size:`sm`,width:192,placeholder:`Add related task...`,value:``,isDisabled:m,options:f.map(e=>({type:`section`,title:n.workspaceName(e.workspaceId),options:e.tasks.map(e=>({value:String(e.id),label:`#${e.id} ${e.title}`}))})),onChange:t=>{t&&c.mutate({taskId:e.id,relatedId:Number(t)})}}),_=h&&(0,q.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:h.message});return u.length===0?(0,q.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[g,_]}):(0,q.jsxs)(w,{label:`Related`,children:[(0,q.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[u.map(t=>{let s=n.byId.get(t),c=v(t,e.workspaceId,n);return(0,q.jsxs)(`li`,{className:`inline-flex min-w-0 items-center max-md:gap-2`,children:[(0,q.jsx)(i,{size:`sm`,variant:`secondary`,label:s===void 0?c:`${c} ${s.title}`,"aria-label":`Open related task ${c}`,tooltip:s?.title,className:`min-w-0 max-w-56 tabular-nums`,isDisabled:a===void 0||!a.canOpen(t),onClick:()=>a?.open(t)}),(0,q.jsx)(r,{size:`sm`,variant:`ghost`,label:`Remove related task #${t} from #${e.id}`,tooltip:`Remove related task`,icon:(0,q.jsx)(o,{}),isDisabled:m,onClick:()=>l.mutate({taskId:e.id,relatedId:t})})]},t)}),g]}),_]})}function de({task:e}){let t=re();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(i,{size:`sm`,variant:e.autopilot?`primary`:`secondary`,changesData:!0,"aria-pressed":e.autopilot,"aria-label":`Autopilot of #${e.id}`,label:e.autopilot?`Autopilot on`:`Autopilot off`,icon:(0,q.jsx)(l,{"aria-hidden":!0}),tooltip:e.autopilot?`Marked for autopilot: an executor may take it up on its own once it is ready. Click to clear.`:`Not marked for autopilot. Click to let an executor take it up on its own once it is ready.`,isDisabled:t.isPending,onClick:()=>t.mutate({status:null,id:e.id,taskType:e.taskType,title:e.title,description:e.description,estimate:e.estimate,dueDate:e.dueDate,autopilot:!e.autopilot,criteria:null}),className:`shrink-0`}),t.error&&(0,q.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:t.error.message})]})}function fe({task:e}){let t=I(),n=ee(),r=C(),i=t.data??[];return i.length<2?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`inline-flex`,title:`Move the task to another workspace; its history, notes, criteria, refs, and links stay`,children:(0,q.jsx)(E,{label:`Workspace of #${e.id}`,isLabelHidden:!0,size:`sm`,width:160,value:String(e.workspaceId),isDisabled:n.isPending||r,options:i.map(e=>({value:String(e.id),label:e.name})),onChange:t=>n.mutate({id:e.id,workspaceId:Number(t)})})}),n.error&&(0,q.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:n.error.message})]})}function pe({task:e}){return(0,q.jsxs)(q.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,q.jsxs)(`p`,{"aria-label":`Plan of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:[e.estimate!==null&&(0,q.jsxs)(`span`,{children:[`Estimate `,c(e.estimate)]}),e.dueDate!==null&&(0,q.jsx)(g,{task:e})]}),(0,q.jsx)(_,{task:e}),(0,q.jsx)(ce,{task:e})]})}var me={progress:`Progress`,blocker:`Blocker`,decision:`Decision`},he={progress:`neutral`,blocker:`warning`,decision:`info`};function X({kind:e}){return(0,q.jsx)(f,{"data-note-kind":e,className:`shrink-0`,variant:he[e],label:me[e]})}function Z({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,q.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:O(t.at),children:[(0,q.jsx)(X,{kind:t.kind}),(0,q.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:m(t.body)}),n.length>1&&(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,q.jsx)(w,{label:`Notes (${n.length})`,children:(0,q.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(X,{kind:e.kind}),(0,q.jsx)(A,{className:`text-muted-foreground`,at:e.at})]}),(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,q.jsx)(b,{source:e.body})})]},t))})})}var ge={pending:`Pending`,met:`Met`,failed:`Failed`},_e={pending:P.neutral,met:P.success,failed:P.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?V:e===`failed`?U:G;return(0,q.jsx)(`span`,{role:`img`,"aria-label":ge[e],className:x(`flex size-4 shrink-0 items-center justify-center`,_e[e]),children:(0,q.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function ve(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${k(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function ye({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,q.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,q.jsx)(be,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,q.jsx)(w,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function be({task:e,criterion:t,detailed:n}){let r=te(),a=C(),[o,c]=(0,K.useState)(!1),[l,m]=(0,K.useState)(``),h=t.kind===`manual`&&e.status!==`done`,g=ve(t),_=d(t.kind)?t.target:null;function v(){c(!1),m(``)}let y=p(l.trim()!==``,v,r.isPending);function b(n){o?v():n?(r.reset(),c(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function S(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:l.trim()||null},{onSuccess:v})}return(0,q.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[g,t.evidence,_].filter(Boolean).join(`
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{n as r,t as i}from"./button-jyacV0rZ.js";import{t as a}from"./details-sheet-fLXbNgUT.js";import{Bt as o,F as s,Ft as c,Gt as l,H as u,I as d,Lt as f,U as p,W as m,at as h,ct as g,dt as _,ft as v,it as y,lt as b,mt as x,ot as S,pt as C,st as w,zt as T}from"./index-83Ne6V12.js";import{t as E,u as D}from"./Selector-B4vDQvaj.js";import{Ft as O,L as ee,Lt as k,Mt as A,Rt as j,S as M,U as N,Zt as P,_ as te,c as ne,dt as re,g as ie,h as F,ht as I,ot as L}from"./queries-X7gjrMUw.js";import{t as R}from"./opener-DWhHPoCL.js";import{t as z}from"./createLucideIcon-DtNDbJdC.js";var B={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};B.node;var V=z(B),H={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};H.node;var U=z(H),W={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};W.node;var G=z(W),K=e(t(),1),q=n();function J({onClose:e,children:t}){let n=(0,K.useRef)(null),[r,o]=(0,K.useState)(!1);function s(){n.current?.querySelector(`form[data-dirty]`)?o(!0):e()}return(0,K.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[aria-haspopup='menu'][aria-expanded='true']`)||(r?o(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select, [role=combobox], [role=listbox]`)||s())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,q.jsx)(a,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:s,banner:r&&(0,q.jsxs)(`div`,{role:`group`,"aria-label":`Unsaved changes`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b bg-muted px-4 py-2 text-xs`,children:[(0,q.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,q.jsx)(i,{size:`sm`,variant:`secondary`,label:`Keep editing`,autoFocus:!0,onClick:()=>o(!1)}),(0,q.jsx)(i,{size:`sm`,variant:`destructive`,label:`Discard changes`,onClick:e})]}),children:t})}function Y(e){switch(e.status){case`in_progress`:return`Started`;case`in_review`:return`In review`;case`done`:return`Completed`;case`planned`:return e.reopened?`Reopened`:`Paused`}}function ae({task:e}){let t=e.timeline.filter(e=>e.reason!==null);return t.length===0?null:(0,q.jsx)(`ol`,{"aria-label":`Reasons of #${e.id}`,className:`mt-1 flex flex-col gap-0.5`,children:t.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,q.jsx)(A,{className:`shrink-0 text-muted-foreground`,at:e.at}),(0,q.jsx)(`span`,{className:`shrink-0 font-medium`,children:Y(e)}),(0,q.jsx)(`span`,{className:`min-w-0 whitespace-pre-line break-words-keep max-md:basis-full`,children:e.reason})]},t))})}var oe={lane:`Lane`,discord:`Discord`,pr:`PR`};function se({value:e}){if(/^https?:\/\//i.test(e)){let t=t=>{t.preventDefault(),R(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,q.jsx)(`a`,{href:e,onClick:t,onAuxClick:t,className:`min-w-0 break-all text-primary underline underline-offset-2 hover:no-underline`,children:e})}let t=e.indexOf(`:`),n=t>0?oe[e.slice(0,t)]:void 0;return n===void 0?(0,q.jsx)(`code`,{className:`min-w-0 break-all`,children:e}):(0,q.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1`,children:[(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:n}),(0,q.jsx)(`code`,{className:`min-w-0 break-all`,children:e.slice(t+1)})]})}function ce({task:e}){return e.refs.length===0?null:(0,q.jsx)(w,{label:`Refs`,children:(0,q.jsx)(`ul`,{"aria-label":`Refs of #${e.id}`,className:`flex flex-col gap-0.5`,children:e.refs.map(e=>(0,q.jsx)(`li`,{className:`flex min-w-0`,children:(0,q.jsx)(se,{value:e})},e))})})}function le({task:e,detailed:t}){let n=j(e.milestones);return n.length===0?null:t?(0,q.jsxs)(w,{label:`Timeline`,children:[(0,q.jsx)(`dl`,{"aria-label":`Timeline of #${e.id}`,className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:n.map(({label:e,at:t})=>(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(A,{at:t})})]},e))}),(0,q.jsx)(ae,{task:e})]}):(0,q.jsx)(`p`,{"aria-label":`Timeline of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:n.map(({label:e,at:t})=>(0,q.jsx)(A,{at:t,prefix:`${e} `},e))})}function ue({task:e,tasks:t,context:n,navigation:a}){let s=L(),c=ne(),l=N(),u=(s.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),d=t.filter(t=>t.id!==e.id&&!u.includes(t.id)),f=[...new Set([e.workspaceId,...d.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:d.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),p=C(),m=c.isPending||l.isPending||p,h=c.error??l.error;if(u.length===0&&f.length===0)return null;let g=f.length>0&&(0,q.jsx)(E,{label:`Add related task to #${e.id}`,isLabelHidden:!0,size:`sm`,width:192,placeholder:`Add related task...`,value:``,isDisabled:m,options:f.map(e=>({type:`section`,title:n.workspaceName(e.workspaceId),options:e.tasks.map(e=>({value:String(e.id),label:`#${e.id} ${e.title}`}))})),onChange:t=>{t&&c.mutate({taskId:e.id,relatedId:Number(t)})}}),_=h&&(0,q.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:h.message});return u.length===0?(0,q.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[g,_]}):(0,q.jsxs)(w,{label:`Related`,children:[(0,q.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[u.map(t=>{let s=n.byId.get(t),c=v(t,e.workspaceId,n);return(0,q.jsxs)(`li`,{className:`inline-flex min-w-0 items-center max-md:gap-2`,children:[(0,q.jsx)(i,{size:`sm`,variant:`secondary`,label:s===void 0?c:`${c} ${s.title}`,"aria-label":`Open related task ${c}`,tooltip:s?.title,className:`min-w-0 max-w-56 tabular-nums`,isDisabled:a===void 0||!a.canOpen(t),onClick:()=>a?.open(t)}),(0,q.jsx)(r,{size:`sm`,variant:`ghost`,label:`Remove related task #${t} from #${e.id}`,tooltip:`Remove related task`,icon:(0,q.jsx)(o,{}),isDisabled:m,onClick:()=>l.mutate({taskId:e.id,relatedId:t})})]},t)}),g]}),_]})}function de({task:e}){let t=re();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(i,{size:`sm`,variant:e.autopilot?`primary`:`secondary`,changesData:!0,"aria-pressed":e.autopilot,"aria-label":`Autopilot of #${e.id}`,label:e.autopilot?`Autopilot on`:`Autopilot off`,icon:(0,q.jsx)(l,{"aria-hidden":!0}),tooltip:e.autopilot?`Marked for autopilot: an executor may take it up on its own once it is ready. Click to clear.`:`Not marked for autopilot. Click to let an executor take it up on its own once it is ready.`,isDisabled:t.isPending,onClick:()=>t.mutate({status:null,id:e.id,taskType:e.taskType,title:e.title,description:e.description,estimate:e.estimate,dueDate:e.dueDate,autopilot:!e.autopilot,criteria:null}),className:`shrink-0`}),t.error&&(0,q.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:t.error.message})]})}function fe({task:e}){let t=I(),n=ee(),r=C(),i=t.data??[];return i.length<2?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`inline-flex`,title:`Move the task to another workspace; its history, notes, criteria, refs, and links stay`,children:(0,q.jsx)(E,{label:`Workspace of #${e.id}`,isLabelHidden:!0,size:`sm`,width:160,value:String(e.workspaceId),isDisabled:n.isPending||r,options:i.map(e=>({value:String(e.id),label:e.name})),onChange:t=>n.mutate({id:e.id,workspaceId:Number(t)})})}),n.error&&(0,q.jsx)(`span`,{role:`alert`,className:`text-xs text-destructive`,children:n.error.message})]})}function pe({task:e}){return(0,q.jsxs)(q.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,q.jsxs)(`p`,{"aria-label":`Plan of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:[e.estimate!==null&&(0,q.jsxs)(`span`,{children:[`Estimate `,c(e.estimate)]}),e.dueDate!==null&&(0,q.jsx)(g,{task:e})]}),(0,q.jsx)(_,{task:e}),(0,q.jsx)(ce,{task:e})]})}var me={progress:`Progress`,blocker:`Blocker`,decision:`Decision`},he={progress:`neutral`,blocker:`warning`,decision:`info`};function X({kind:e}){return(0,q.jsx)(f,{"data-note-kind":e,className:`shrink-0`,variant:he[e],label:me[e]})}function Z({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,q.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:O(t.at),children:[(0,q.jsx)(X,{kind:t.kind}),(0,q.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:m(t.body)}),n.length>1&&(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,q.jsx)(w,{label:`Notes (${n.length})`,children:(0,q.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,q.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,q.jsx)(X,{kind:e.kind}),(0,q.jsx)(A,{className:`text-muted-foreground`,at:e.at})]}),(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,q.jsx)(b,{source:e.body})})]},t))})})}var ge={pending:`Pending`,met:`Met`,failed:`Failed`},_e={pending:P.neutral,met:P.success,failed:P.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?V:e===`failed`?U:G;return(0,q.jsx)(`span`,{role:`img`,"aria-label":ge[e],className:x(`flex size-4 shrink-0 items-center justify-center`,_e[e]),children:(0,q.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function ve(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${k(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function ye({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,q.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,q.jsx)(be,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,q.jsx)(w,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function be({task:e,criterion:t,detailed:n}){let r=te(),a=C(),[o,c]=(0,K.useState)(!1),[l,m]=(0,K.useState)(``),h=t.kind===`manual`&&e.status!==`done`,g=ve(t),_=d(t.kind)?t.target:null;function v(){c(!1),m(``)}let y=p(l.trim()!==``,v,r.isPending);function b(n){o?v():n?(r.reset(),c(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function S(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:l.trim()||null},{onSuccess:v})}return(0,q.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[g,t.evidence,_].filter(Boolean).join(`
|
|
2
2
|
`)||void 0,children:[h?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(T,{size:`sm`,className:`shrink-0`,label:`Check criterion ${t.id} of #${e.id}`,isLabelHidden:!0,value:t.state===`met`||o,isDisabled:r.isPending||a,onChange:b}),t.state===`failed`&&(0,q.jsx)($,{state:`failed`})]}):(0,q.jsx)($,{state:t.state}),(0,q.jsx)(`span`,{className:x(`min-w-0`,n?`break-words-keep`:`truncate`,t.state===`failed`&&P.danger),children:t.text}),t.kind!==`manual`&&(0,q.jsx)(f,{className:`shrink-0`,label:s[t.kind]}),!n&&t.evidence&&(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground`,children:t.evidence})]}),n&&_&&(0,q.jsx)(`code`,{className:`ml-5.5 break-all text-muted-foreground`,children:_}),n&&(t.evidence||g)&&(0,q.jsxs)(`p`,{className:`ml-5.5 whitespace-pre-line break-words-keep text-muted-foreground`,children:[t.evidence,t.evidence&&g&&` · `,t.checkedBy!==null&&(0,q.jsxs)(q.Fragment,{children:[`Checked by `,Q[t.checkedBy],t.checkedAt!==null&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(A,{at:t.checkedAt})]})]})]}),o&&(0,q.jsxs)(`form`,{onSubmit:S,className:`ml-5.5 flex flex-wrap items-center gap-1`,onKeyDown:y.onKeyDown,children:[(0,q.jsx)(D,{size:`sm`,containerClassName:`flex-1 basis-48`,label:`Evidence for criterion ${t.id}`,isLabelHidden:!0,placeholder:`Evidence (optional), e.g. a link or what you checked`,value:l,onChange:m,hasAutoFocus:!0}),y.asking?(0,q.jsx)(u,{label:`Discard evidence for criterion ${t.id}`,question:`Discard the evidence?`,onKeep:y.keep,onDiscard:y.discard}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(i,{type:`submit`,size:`sm`,variant:`primary`,label:r.isPending?`Saving...`:`Save`,isDisabled:r.isPending}),(0,q.jsx)(i,{type:`button`,size:`sm`,variant:`ghost`,label:`Cancel`,onClick:y.request})]})]}),r.isError&&(0,q.jsx)(`p`,{role:`alert`,className:`ml-5.5 text-destructive`,children:r.error.message})]})}function xe({task:e,onCreated:t,onCancel:n}){let r=F(),a=M(),[o,s]=(0,K.useState)(`#${e.id} ${e.title}`),[c,l]=(0,K.useState)(`1`);return(0,q.jsxs)(`form`,{"aria-label":`New thread for #${e.id}`,className:`flex flex-col gap-2 rounded-md border p-2`,onSubmit:n=>{n.preventDefault(),a.mutate({channelId:Number(c),title:o.trim(),taskId:e.id},{onSuccess:e=>t(e.id)})},children:[(0,q.jsx)(D,{label:`Thread title`,size:`sm`,value:o,onChange:s,hasAutoFocus:!0}),(0,q.jsx)(E,{label:`Channel`,size:`sm`,value:c,onChange:l,options:(r.data??[]).map(e=>({value:String(e.id),label:`#${e.name}`}))}),a.isError&&(0,q.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:a.error.message}),(0,q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,q.jsx)(i,{type:`submit`,size:`sm`,label:`Start thread`,changesData:!0,isDisabled:a.isPending||o.trim()===``}),(0,q.jsx)(i,{variant:`ghost`,size:`sm`,label:`Cancel`,onClick:n})]})]})}function Se({task:e}){let t=ie({taskId:e.id,archived:!0}),n=F(),[r,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(!1),c=t.data??[],l=e=>n.data?.find(t=>t.id===e)?.name??String(e);return(0,q.jsxs)(w,{label:`Threads (${c.length})`,children:[(0,q.jsx)(`ul`,{"aria-label":`Threads of #${e.id}`,className:`flex flex-col gap-1`,children:c.map(e=>{let t=r===e.id;return(0,q.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-expanded":t,className:x(`min-w-0 truncate text-left text-sm hover:underline`,t&&`font-semibold`),onClick:()=>a(t?null:e.id),children:e.title}),(0,q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`#${l(e.channelId)}`}),(0,q.jsx)(S,{status:e.status}),e.unread>0&&e.status!==`archived`&&(0,q.jsx)(`span`,{className:`shrink-0 font-medium text-destructive`,children:`${e.unread} unread`}),t&&(0,q.jsx)(`span`,{className:`ml-auto flex shrink-0`,children:(0,q.jsx)(h,{thread:e})})]}),t&&(0,q.jsx)(`div`,{className:`flex h-80 flex-col overflow-hidden rounded-md border`,children:(0,q.jsx)(y,{place:{thread:e.id},label:e.title,open:e.status===`open`},e.id)})]},e.id)})}),o?(0,q.jsx)(xe,{task:e,onCancel:()=>s(!1),onCreated:e=>{s(!1),a(e)}}):(0,q.jsx)(`div`,{children:(0,q.jsx)(i,{variant:`ghost`,size:`sm`,label:`Start a thread`,onClick:()=>s(!0)})})]})}export{de as AutopilotToggle,ue as RelatedTasks,ye as TaskCriteria,J as TaskDetailsSheet,Z as TaskNotes,pe as TaskPlan,Se as TaskThreads,le as TaskTimeline,fe as TaskWorkspace};
|