@dubusoft/toodo-linux-arm64 1.3.3-dev.66 → 1.3.3-dev.68
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/{details-sheet-BkbfhjmH.js → details-sheet-2P7Bs4GS.js} +1 -1
- package/web/assets/index-BOkyOVaj.css +2 -0
- package/web/assets/index-C8Fh6514.js +16 -0
- package/web/assets/{markdown-BvSlCbQw.js → markdown-DXa63OZ5.js} +1 -1
- package/web/assets/{offline-screen-1jXGEyFA.js → offline-screen-LB4v37wo.js} +1 -1
- package/web/assets/{review-D2l19Z_N.js → review-BKo9LF0U.js} +1 -1
- package/web/assets/{server-access-CQCM9Ulf.js → server-access-Cyp17BzV.js} +1 -1
- package/web/assets/{task-details-Cxh6BM42.js → task-details-BptRjori.js} +1 -1
- package/web/assets/{task-graph-B92qItLx.js → task-graph-jtWINcxg.js} +1 -1
- package/web/index.html +2 -2
- package/web/sw.js +2 -2
- package/web/assets/index-BvuTpyHr.js +0 -16
- package/web/assets/index-QECYQy_u.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./dist-ZmB2kPfR.js";import{Dt as s}from"./index-BvuTpyHr.js";import{t as c}from"./opener-DWhHPoCL.js";var l={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`]};l.node;var u=n(l);function d(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m={};function h(e,t){return((t||m).jsx?p:f).test(e)}var g=/[ \t\n\f\r]/g;function _(e){return typeof e==`object`?e.type===`text`&&v(e.value):v(e)}function v(e){return e.replace(g,``)===``}var y=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};y.prototype.normal={},y.prototype.property={},y.prototype.space=void 0;function b(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new y(n,r,t)}function x(e){return e.toLowerCase()}var S=class{constructor(e,t){this.attribute=t,this.property=e}};S.prototype.attribute=``,S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property=``,S.prototype.spaceSeparated=!1,S.prototype.space=void 0;var C=r({boolean:()=>T,booleanish:()=>E,commaOrSpaceSeparated:()=>j,commaSeparated:()=>A,number:()=>O,overloadedBoolean:()=>D,spaceSeparated:()=>k}),w=0,T=M(),E=M(),D=M(),O=M(),k=M(),A=M(),j=M();function M(){return 2**++w}var N=Object.keys(C),P=class extends S{constructor(e,t,n,r){let i=-1;if(super(e,t),ee(this,`space`,r),typeof n==`number`)for(;++i<N.length;){let e=N[i];ee(this,N[i],(n&C[e])===C[e])}}};P.prototype.defined=!0;function ee(e,t,n){n&&(e[t]=n)}function F(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new P(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[x(r)]=r,n[x(a.attribute)]=r}return new y(t,n,e.space)}var te=F({properties:{ariaActiveDescendant:null,ariaAtomic:E,ariaAutoComplete:null,ariaBusy:E,ariaChecked:E,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:k,ariaCurrent:null,ariaDescribedBy:k,ariaDetails:null,ariaDisabled:E,ariaDropEffect:k,ariaErrorMessage:null,ariaExpanded:E,ariaFlowTo:k,ariaGrabbed:E,ariaHasPopup:null,ariaHidden:E,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k,ariaLevel:O,ariaLive:null,ariaModal:E,ariaMultiLine:E,ariaMultiSelectable:E,ariaOrientation:null,ariaOwns:k,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:E,ariaReadOnly:E,ariaRelevant:null,ariaRequired:E,ariaRoleDescription:k,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:E,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,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=F({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:A,acceptCharset:k,accessKey:k,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alpha:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:k,autoFocus:T,autoPlay:T,blocking:k,capture:null,charSet:null,checked:T,cite:null,className:k,closedBy:null,colorSpace:null,cols:O,colSpan:O,command:null,commandFor:null,content:null,contentEditable:E,controls:T,controlsList:k,coords:O|A,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:D,draggable:E,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:k,height:O,hidden:D,high:O,href:null,hrefLang:null,htmlFor:k,httpEquiv:k,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:k,itemRef:k,itemScope:T,itemType:k,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,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:T,optimum:O,pattern:null,ping:k,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:k,required:T,reversed:T,rows:O,rowSpan:O,sandbox:k,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootCustomElementRegistry:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shadowRootSerializable:T,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:E,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:E,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:E,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:T,disablePictureInPicture:T,disableRemotePlayback:T,exportParts:A,part:k,prefix:null,property:null,results:O,security:null,unselectable:null},space:`html`,transform:re}),ae=F({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:j,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:k,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:A,g2:A,glyphName:A,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,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:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:j,rev:j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:j,requiredFeatures:j,requiredFonts:j,requiredFormats:j,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:j,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),oe=F({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=F({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:re}),ce=F({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=x(t),r=t,i=S;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=P}return new i(r,t)}function me(e){return`-`+e.toLowerCase()}function he(e){return e.charAt(1).toUpperCase()}var ge=b([te,ie,oe,se,ce],`html`),_e=b([te,ae,oe,se,ce],`svg`);function ve(e){return e.join(` `).trim()}var ye=e(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./dist-ZmB2kPfR.js";import{Dt as s}from"./index-C8Fh6514.js";import{t as c}from"./opener-DWhHPoCL.js";var l={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`]};l.node;var u=n(l);function d(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var f=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m={};function h(e,t){return((t||m).jsx?p:f).test(e)}var g=/[ \t\n\f\r]/g;function _(e){return typeof e==`object`?e.type===`text`&&v(e.value):v(e)}function v(e){return e.replace(g,``)===``}var y=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};y.prototype.normal={},y.prototype.property={},y.prototype.space=void 0;function b(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new y(n,r,t)}function x(e){return e.toLowerCase()}var S=class{constructor(e,t){this.attribute=t,this.property=e}};S.prototype.attribute=``,S.prototype.booleanish=!1,S.prototype.boolean=!1,S.prototype.commaOrSpaceSeparated=!1,S.prototype.commaSeparated=!1,S.prototype.defined=!1,S.prototype.mustUseProperty=!1,S.prototype.number=!1,S.prototype.overloadedBoolean=!1,S.prototype.property=``,S.prototype.spaceSeparated=!1,S.prototype.space=void 0;var C=r({boolean:()=>T,booleanish:()=>E,commaOrSpaceSeparated:()=>j,commaSeparated:()=>A,number:()=>O,overloadedBoolean:()=>D,spaceSeparated:()=>k}),w=0,T=M(),E=M(),D=M(),O=M(),k=M(),A=M(),j=M();function M(){return 2**++w}var N=Object.keys(C),P=class extends S{constructor(e,t,n,r){let i=-1;if(super(e,t),ee(this,`space`,r),typeof n==`number`)for(;++i<N.length;){let e=N[i];ee(this,N[i],(n&C[e])===C[e])}}};P.prototype.defined=!0;function ee(e,t,n){n&&(e[t]=n)}function F(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new P(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[x(r)]=r,n[x(a.attribute)]=r}return new y(t,n,e.space)}var te=F({properties:{ariaActiveDescendant:null,ariaAtomic:E,ariaAutoComplete:null,ariaBusy:E,ariaChecked:E,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:k,ariaCurrent:null,ariaDescribedBy:k,ariaDetails:null,ariaDisabled:E,ariaDropEffect:k,ariaErrorMessage:null,ariaExpanded:E,ariaFlowTo:k,ariaGrabbed:E,ariaHasPopup:null,ariaHidden:E,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k,ariaLevel:O,ariaLive:null,ariaModal:E,ariaMultiLine:E,ariaMultiSelectable:E,ariaOrientation:null,ariaOwns:k,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:E,ariaReadOnly:E,ariaRelevant:null,ariaRequired:E,ariaRoleDescription:k,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:E,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,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=F({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:A,acceptCharset:k,accessKey:k,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alpha:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:k,autoFocus:T,autoPlay:T,blocking:k,capture:null,charSet:null,checked:T,cite:null,className:k,closedBy:null,colorSpace:null,cols:O,colSpan:O,command:null,commandFor:null,content:null,contentEditable:E,controls:T,controlsList:k,coords:O|A,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:D,draggable:E,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:k,height:O,hidden:D,high:O,href:null,hrefLang:null,htmlFor:k,httpEquiv:k,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:k,itemRef:k,itemScope:T,itemType:k,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,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:T,optimum:O,pattern:null,ping:k,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:k,required:T,reversed:T,rows:O,rowSpan:O,sandbox:k,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootCustomElementRegistry:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shadowRootSerializable:T,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:E,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:E,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:E,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:T,disablePictureInPicture:T,disableRemotePlayback:T,exportParts:A,part:k,prefix:null,property:null,results:O,security:null,unselectable:null},space:`html`,transform:re}),ae=F({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:j,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:k,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:A,g2:A,glyphName:A,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,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:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:j,rev:j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:j,requiredFeatures:j,requiredFonts:j,requiredFormats:j,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:j,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ne}),oe=F({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=F({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:re}),ce=F({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=x(t),r=t,i=S;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=P}return new i(r,t)}function me(e){return`-`+e.toLowerCase()}function he(e){return e.charAt(1).toUpperCase()}var ge=b([te,ie,oe,se,ce],`html`),_e=b([te,ae,oe,se,ce],`svg`);function ve(e){return e.join(` `).trim()}var ye=e(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
2
2
|
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),be=e((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(ye());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),xe=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Se=e(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(be()),r=xe();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Ce=Te(`end`),we=Te(`start`);function Te(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 Ee(e){let t=we(e),n=Ce(e);if(t&&n)return{start:t,end:n}}function De(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ke(e.position):`start`in e||`end`in e?ke(e):`line`in e||`column`in e?Oe(e):``}function Oe(e){return Ae(e&&e.line)+`:`+Ae(e&&e.column)}function ke(e){return Oe(e&&e.start)+`-`+Oe(e&&e.end)}function Ae(e){return e&&typeof e==`number`?e:1}var I=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&&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=De(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}};I.prototype.file=``,I.prototype.name=``,I.prototype.reason=``,I.prototype.message=``,I.prototype.stack=``,I.prototype.column=void 0,I.prototype.line=void 0,I.prototype.ancestors=void 0,I.prototype.cause=void 0,I.prototype.fatal=void 0,I.prototype.place=void 0,I.prototype.ruleId=void 0,I.prototype.source=void 0;var je=a(Se(),1),Me={}.hasOwnProperty,Ne=new Map,Pe=/[A-Z]/g,Fe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ie=new Set([`td`,`th`]),Le=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Re(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=Ye(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=Je(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 Be(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ve(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ue(e,t,n);if(t.type===`mdxjsEsm`)return He(e,t);if(t.type===`root`)return We(e,t,n);if(t.type===`text`)return Ge(e,t)}function Be(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=tt(e,t.tagName,!1),o=Xe(e,t),s=Qe(e,t);return Fe.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!_(e)})),Ke(e,o,a,t),qe(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ve(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)}nt(e,t.position)}function He(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nt(e,t.position)}function Ue(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:tt(e,t.name,!0),o=Ze(e,t),s=Qe(e,t);return Ke(e,o,a,t),qe(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function We(e,t,n){let r={};return qe(r,Qe(e,t)),e.create(t,e.Fragment,r,n)}function Ge(e,t){return t.value}function Ke(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function qe(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Je(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 Ye(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=we(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 Xe(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Me.call(t.properties,i)){let a=$e(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ie.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 Ze(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 nt(e,t.position)}else{let i=r.name,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 nt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Qe(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ne;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 $e(e,t,n){let r=pe(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?d(n):ve(n)),r.property===`style`){let t=typeof n==`object`?n:et(e,String(n));return e.stylePropertyNameCase===`css`&&(t=rt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?le[r.property]||r.property:r.attribute,n]}}function et(e,t){try{return(0,je.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new I("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=Le+`#cannot-parse-style-attribute`,r}}function tt(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=h(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=h(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Me.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);nt(e)}function nt(e,t){let n=new I("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=Le+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function rt(e){let t={},n;for(n in e)Me.call(e,n)&&(t[it(n)]=e[n]);return t}function it(e){let t=e.replace(Pe,at);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function at(e){return`-`+e.toLowerCase()}var ot={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`]},st={};function ct(e,t){let n=t||st;return lt(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function lt(e,t,n){if(dt(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 ut(e.children,t,n)}return Array.isArray(e)?ut(e,t,n):``}function ut(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=lt(e[i],t,n);return r.join(``)}function dt(e){return!!(e&&typeof e==`object`)}var ft=document.createElement(`i`);function pt(e){let t=`&`+e+`;`;ft.innerHTML=t;let n=ft.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 mt={}.hasOwnProperty;function ht(e){let t={},n=-1;for(;++n<e.length;)gt(t,e[n]);return t}function gt(e,t){let n;for(n in t){let r=(mt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){mt.call(r,a)||(r[a]=[]);let e=i[a];_t(r[a],Array.isArray(e)?e:e?[e]:[])}}}function _t(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 vt(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=K(/[A-Za-z]/),V=K(/[\dA-Za-z]/),yt=K(/[#-'*+\--9=?A-Z^-~]/);function bt(e){return e!==null&&(e<32||e===127)}var xt=K(/\d/),St=K(/[\dA-Fa-f]/),Ct=K(/[!-/:-@[-`{-~]/);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 wt=K(/\p{P}|\p{S}/u),G=K(/\s/);function K(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Tt(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 q(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 Et(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 Dt={tokenize:Ot};function Ot(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`),q(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 kt=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){At(this,e,t,n,!1)}addBefore(e,t,n){At(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 At(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 jt={tokenize:Nt},Mt={tokenize:Pt};function Nt(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 kt;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(Mt,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(Mt,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 kt;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 Pt(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ft(e){if(e===null||U(e)||G(e))return 1;if(wt(e))return 2}function It(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 Lt={name:`attention`,resolveAll:Rt,tokenize:zt};function Rt(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};Bt(o,-a),Bt(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,It(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 zt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ft(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=Ft(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 Bt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Vt={name:`autolink`,tokenize:Ht};function Ht(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||bt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):yt(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 Ut={partial:!0,tokenize:Wt};function Wt(e,t,n){return r;function r(t){return W(t)?q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||H(e)?t(e):n(e)}}var Gt={continuation:{tokenize:qt},exit:Jt,name:`blockQuote`,tokenize:Kt};function Kt(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 qt(e,t,n){let r=this;return i;function i(t){return W(t)?q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Gt,t,n)(r)}}function Jt(e){e.exit(`blockQuote`)}var Yt={name:`characterEscape`,tokenize:Xt};function Xt(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 Ct(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Zt={name:`characterReference`,tokenize:Qt};function Qt(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=St,u):(e.enter(`characterReferenceValue`),a=7,o=xt,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===V&&!pt(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 $t={partial:!0,tokenize:en};function en(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 tn={concrete:!0,name:`codeFenced`,tokenize:nn};function nn(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)?q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||H(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check($t,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`),q(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)?q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||H(t)?e.check($t,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)?q(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)?q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||H(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var rn={name:`codeIndented`,tokenize:on},an={partial:!0,tokenize:sn};function on(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Et(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):H(t)?e.attempt(an,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 sn(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):Et(e,t,a,`linePrefix`,4,4)(o)}function a(e){return H(e)?i(e):n(e)}}var cn={name:`codeText`,previous:un,resolve:ln,tokenize:dn};function ln(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 un(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dn(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 fn=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&&pn(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),pn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pn(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);pn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pn(this.left,t.reverse())}}}};function pn(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 mn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fn(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,hn(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 hn(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 gn={resolve:vn,tokenize:yn},_n={partial:!0,tokenize:bn};function vn(e){return mn(e),e}function yn(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(_n,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 bn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),q(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 xn(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||bt(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||bt(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 Sn(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 Cn(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`),q(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 wn(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)?q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Tn={name:`definition`,tokenize:Dn},En={partial:!0,tokenize:On};function Dn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Sn.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)?wn(e,l)(t):l(t)}function l(t){return xn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(En,d,d)(t)}function d(t){return W(t)?q(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 On(e,t,n){return r;function r(t){return U(t)?wn(e,i)(t):n(t)}function i(t){return Cn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return W(t)?q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||H(e)?t(e):n(e)}}var kn={name:`hardBreakEscape`,tokenize:An};function An(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 jn={name:`headingAtx`,resolve:Mn,tokenize:Nn};function Mn(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 Nn(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)?q(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 Pn=`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(`.`),Fn=[`pre`,`script`,`style`,`textarea`],In={concrete:!0,name:`htmlFlow`,resolveTo:Rn,tokenize:zn},Ln={partial:!0,tokenize:Bn};function Rn(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 zn(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&&Fn.includes(l)?(i=1,r.interrupt?t(s):O(s)):Pn.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),te):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(Ln,ne,k)(t)):t===null||H(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check($t,A,ne)(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 Fn.includes(n)?(e.consume(t),te):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),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||H(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Bn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ut,t,n)}}var Vn={name:`htmlText`,tokenize:Hn};function Hn(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)?q(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 Un={name:`labelEnd`,resolveAll:qn,resolveTo:Jn,tokenize:Yn},Wn={tokenize:Xn},Gn={tokenize:Zn},Kn={tokenize:Qn};function qn(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 Jn(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,It(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 Yn(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(Wn,u,o?u:d)(t):t===91?e.attempt(Gn,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Kn,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Xn(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)?wn(e,a)(t):a(t)}function a(t){return t===41?u(t):xn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return U(t)?wn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Cn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return U(t)?wn(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 Zn(e,t,n){let r=this;return i;function i(t){return Sn.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 Qn(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 $n={name:`labelStartImage`,resolveAll:Un.resolveAll,tokenize:er};function er(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 tr={name:`labelStartLink`,resolveAll:Un.resolveAll,tokenize:nr};function nr(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 rr={name:`lineEnding`,tokenize:ir};function ir(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),q(e,t,`linePrefix`)}}var ar={name:`thematicBreak`,tokenize:or};function or(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)?q(e,s,`whitespace`)(t):s(t))}}var J={continuation:{tokenize:ur},exit:fr,name:`list`,tokenize:lr},sr={partial:!0,tokenize:pr},cr={partial:!0,tokenize:dr};function lr(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:xt(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(ar,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 xt(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(Ut,r.interrupt?n:u,e.attempt(sr,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 ur(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ut,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(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(cr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(J,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function dr(e,t,n){let r=this;return q(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 fr(e){e.exit(this.containerState.type)}function pr(e,t,n){let r=this;return q(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 mr={name:`setextUnderline`,resolveTo:hr,tokenize:gr};function hr(e,t){let n=new kt,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 gr(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)?q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||H(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var _r={tokenize:vr};function vr(e){let t=this,n=e.attempt(Ut,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gn,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 yr={resolveAll:Cr()},br=Sr(`string`),xr=Sr(`text`);function Sr(e){return{resolveAll:Cr(e===`text`?wr: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 Cr(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 wr(e,t){let n=new kt,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 Tr=r({attentionMarkers:()=>Nr,contentInitial:()=>Dr,disable:()=>Pr,document:()=>Er,flow:()=>kr,flowInitial:()=>Or,insideSpan:()=>Mr,string:()=>Ar,text:()=>jr}),Er={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:Gt},Dr={91:Tn},Or={[-2]:rn,[-1]:rn,32:rn},kr={35:jn,42:ar,45:[mr,ar],60:In,61:mr,95:ar,96:tn,126:tn},Ar={38:Zt,92:Yt},jr={[-5]:rr,[-4]:rr,[-3]:rr,33:$n,38:Zt,42:Lt,60:[Vt,Vn],91:tr,92:[kn,Yt],93:Un,95:Lt,96:cn},Mr={null:[Lt,yr]},Nr={null:[42,95]},Pr={null:[]};function Fr(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=It(a,l.events,l),l.events):[]}function f(e,t){return Lr(p(e),t)}function p(e){return Ir(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 Ir(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 Lr(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 Rr(e){let t={constructs:ht([Tr,...(e||{}).extensions||[]]),content:n(Dt),defined:[],document:n(jt),flow:n(_r),lazy:{},string:n(br),text:n(xr)};return t;function n(e){return n;function n(n){return Fr(t,e,n)}}}function zr(e){for(;!mn(e););return e}var Br=/[\0\t\n\r]/g;function Vr(){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;){Br.lastIndex=c;let n=Br.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 Hr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ur(e){return e.replace(Hr,Wr)}function Wr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return vt(n.slice(t?2:1),t?16:10)}return pt(n)||e}var Gr={}.hasOwnProperty;function Kr(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),qr(n)(zr(Rr(n).document().write(Vr()(e,t,!0))))}function qr(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(be),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ge),blockQuote:o(de),characterEscape:E,characterReference:E,codeFenced:o(fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fe,s),codeText:o(pe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(me),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(he),hardBreakEscape:o(_e),hardBreakTrailing:o(_e),htmlFlow:o(ve,s),htmlFlowData:E,htmlText:o(ve,s),htmlTextData:E,image:o(ye),label:s,link:o(be),listItem:o(Se),listItemValue:p,listOrdered:o(xe,f),listUnordered:o(xe),paragraph:o(Ce),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ge),strong:o(we),thematicBreak:o(Ee)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,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:ae,resourceDestinationString:te,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Jr(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]),Gr.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]||Xr).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+"` ("+De({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Xr).call(this,e,r[0])),n.position.end=Y(e.end)}function d(){return ct(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=Te(),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=Ur(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 te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(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 oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=vt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=pt(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Y(e.end)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[],position:void 0}}function fe(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function pe(){return{type:`inlineCode`,value:``,position:void 0}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function he(){return{type:`emphasis`,children:[],position:void 0}}function ge(){return{type:`heading`,depth:0,children:[],position:void 0}}function _e(){return{type:`break`,position:void 0}}function ve(){return{type:`html`,value:``,position:void 0}}function ye(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function be(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function xe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Se(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Ce(){return{type:`paragraph`,children:[],position:void 0}}function we(){return{type:`strong`,children:[],position:void 0}}function Te(){return{type:`text`,value:``,position:void 0}}function Ee(){return{type:`thematicBreak`,position:void 0}}}function Y(e){return{line:e.line,column:e.column,offset:e.offset}}function Jr(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Jr(e,r):Yr(e,r)}}function Yr(e,t){let n;for(n in t)if(Gr.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 Xr(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+De({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+De({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+De({start:t.start,end:t.end})+`) is still open`)}function Zr(e){let t=this;t.parser=n;function n(n){return Kr(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Qr(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 $r(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{i as e,n as t,r as n,s as r}from"./dist-ZmB2kPfR.js";import{g as i,nn as a,rr as o}from"./status-styles-CWr1GU7t.js";import{f as s,g as c,h as l,p as u}from"./event-CwtUqkXR.js";import{xt as d}from"./index-
|
|
1
|
+
import{i as e,n as t,r as n,s as r}from"./dist-ZmB2kPfR.js";import{g as i,nn as a,rr as o}from"./status-styles-CWr1GU7t.js";import{f as s,g as c,h as l,p as u}from"./event-CwtUqkXR.js";import{xt as d}from"./index-C8Fh6514.js";var f={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`}]]};f.node;var p=t(f),m=r(e(),1),h=n();function g({children:e}){let t=(0,m.useSyncExternalStore)(l,s),n=t===`unreachable`||t===`retrying`;return(0,h.jsxs)(h.Fragment,{children:[n&&(0,h.jsx)(_,{retrying:t===`retrying`}),e,n&&(0,h.jsx)(`div`,{"aria-hidden":!0,className:`h-40`})]})}function _({retrying:e}){let t=navigator.onLine?c():`This device is offline.`,n=o().getQueryState(i.tasks)?.dataUpdatedAt;return(0,h.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,h.jsx)(p,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`p`,{className:`font-medium`,children:`Can't reach the Toodo server`}),(0,h.jsxs)(`p`,{className:`text-xs`,children:[t,` `,n?(0,h.jsxs)(h.Fragment,{children:[`Read-only: the tasks shown were loaded `,(0,h.jsx)(d,{at:Math.floor(n/1e3)}),` and may be out of date.`]}):`What you see may be out of date.`,` `,`Changes are paused. Toodo reconnects on its own as soon as the server answers.`]})]}),(0,h.jsx)(a,{size:`sm`,variant:`outline`,disabled:e,onClick:u,children:e?`Trying...`:`Retry now`})]})}export{g as ConnectionGate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{C as a,S as o,Vt as s,_ as c,d as l,ht as ee,nn as u,o as d,s as f,tn as p}from"./status-styles-CWr1GU7t.js";import{_ as te,c as m,g as ne}from"./workspace-list-CT3KgOeR.js";import{A as h,C as g,Ct as _,D as v,E as y,F as b,I as x,J as re,L as S,M as C,N as w,O as T,P as E,R as D,S as O,T as k,V as A,Z as ie,_ as ae,b as j,c as oe,g as M,h as N,j as se,jt as P,k as ce,m as le,q as ue,s as F,v as I,vt as L,w as R,x as z,xt as B,y as V,z as H}from"./index-BvuTpyHr.js";import{t as U}from"./opener-DWhHPoCL.js";var W={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};W.node;var de=t(W),G=r(e(),1),K=n(),fe={completed:l.success,opened_for_review:l.review,started:l.progress,worked_on:l.progress,planned:l.neutral},q=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,d.neutral),pe=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function me(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function he({disabled:e,children:t}){let[n,r]=(0,G.useState)(!1),i=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,K.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,K.jsxs)(u,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,K.jsx)(P,{}),(0,K.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,K.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function J(e,t){return`${e} ${t}${e===1?``:`s`}`}function ge(e,t){let n=e.skipped>0?` Left out ${J(e.skipped,`pull request`)} a task already records.`:``;return e.imported===0?`Found no new pull requests you merged in this ${t}.${n}`:`Imported ${J(e.imported,`merged pull request`)} as done tasks.${n}`}function Y({onSelect:e,children:t}){return(0,K.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function X({onShowTask:e}){let[t,n]=(0,G.useState)(()=>T(`week`,_(Date.now()/1e3))),[r,l]=(0,G.useState)(null),[f,S]=(0,G.useState)(k),[C,w]=(0,G.useState)(null),{start:E,end:O}=v(t),j=ee(E,O),M=s(),N=o(),P=a(),[I,L]=(0,G.useState)([]),R=M.data?.some(e=>e.source===`github`)??!1,z=[...M.data??[],...N.data?.workspaces??[]],V=new Map(z.map(e=>[e.id,e.name])),H=j.data&&ae(j.data,f),U=b(j.data??[]);f.label!==null&&!U.includes(f.label)&&U.push(f.label);let W=[f.workspaceId===null?`across all workspaces`:`in ${V.get(f.workspaceId)??`workspace ${f.workspaceId}`}`,f.label!==null&&`labelled ${f.label}`].filter(Boolean).join(`, `),J=h[t.kind];function X(e){l(null),L([]),n(e)}async function be(){l(null),L([]);try{let e=await P.mutateAsync({start:E,end:O});l(ge(e,J)),L(e.failures)}catch(e){l(`Could not import pull requests: ${e instanceof Error?e.message:String(e)}`)}}function xe(e){e!==t.kind&&X(e===`custom`?{...t,kind:e}:T(e,t.from))}function Q(e){return c(p.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone??null,workspaceId:f.workspaceId,label:f.label}))}async function Se(){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})])}l(`Copied as Markdown.`)}catch(e){l(`Could not copy: ${String(e)}`)}}async function $(e){try{let t=await Q(e);me(t.fileName,t.contents,t.mediaType),l(`Downloaded ${t.fileName}`)}catch(e){l(`Could not export: ${String(e)}`)}}return(0,K.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:se[t.kind]}),(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,t.from,` to `,t.to,` `,W,`.`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:pe.map(({kind:e,label:n})=>(0,K.jsx)(u,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>xe(e),children:n},e))}),t.kind===`week`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,K.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&X(D(e.target.value))})]}),t.kind===`custom`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,K.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&X({...t,from:e.target.value})}),(0,K.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,K.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&X({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,K.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:ce(t)}),(0,K.jsx)(u,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${J}`,title:`Previous ${J}`,onClick:()=>X(x(t,-1)),children:(0,K.jsx)(ne,{})}),(0,K.jsx)(u,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${J}`,title:`Next ${J}`,onClick:()=>X(x(t,1)),children:(0,K.jsx)(te,{})}),t.kind!==`custom`&&(0,K.jsxs)(u,{size:`sm`,variant:`ghost`,onClick:()=>X(T(t.kind,_(Date.now()/1e3))),children:[(0,K.jsx)(de,{className:`md:hidden`,"aria-hidden":!0}),(0,K.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,J]})]}),(0,K.jsx)(`div`,{className:`ml-auto`,children:(0,K.jsx)(he,{disabled:!H,children:e=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Y,{onSelect:()=>{e(),Se()},children:`Copy as Markdown`}),(0,K.jsx)(Y,{onSelect:()=>{e(),$(`markdown`)},children:`Save as Markdown`}),(0,K.jsx)(Y,{onSelect:()=>{e(),$(`csv`)},children:`Save as CSV`}),(0,K.jsx)(Y,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,K.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsxs)(`select`,{"aria-label":`Workspace`,className:i(m,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.workspaceId??``,onChange:e=>S({...f,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,K.jsx)(`option`,{value:``,children:`All workspaces`}),z.map(e=>(0,K.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,K.jsxs)(`select`,{"aria-label":`Label`,className:i(m,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.label??``,onChange:e=>S({...f,label:e.target.value===``?null:e.target.value}),children:[(0,K.jsx)(`option`,{value:``,children:U.length===0?`No labels in this period`:`Any label`}),U.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]}),(f.workspaceId!==null||f.label!==null)&&(0,K.jsx)(u,{size:`sm`,variant:`ghost`,onClick:()=>S(k),children:`Clear filters`})]}),r&&(0,K.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),I.length>0&&(0,K.jsx)(`ul`,{role:`alert`,"aria-label":`Pull requests not imported`,className:`text-xs text-destructive print:hidden`,children:I.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!j.isPending&&`sr-only`),children:j.isPending?`Loading the review...`:H?`Showing ${H.length} ${H.length===1?`task`:`tasks`} with activity in this ${J}.`:``}),j.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,j.error.message]}),H?.length===0&&(0,K.jsx)(F,{title:j.data?.length===0?`No recorded activity in this ${J}.`:`No recorded activity in this ${J} matches the filters.`,hint:j.data?.length===0?`Toodo records each task as it is planned, started, opened for review, and completed, with the commits of its branch, so reviews fill up as you work. Work merged before Toodo tracked it is not here: ${R?`import the pull requests you merged in this ${J} to add it.`:`add a workspace with a GitHub repository to import the pull requests you merged.`}`:`Pick another period or change the filters to look at other work.`,action:(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:[j.data?.length===0&&R&&(0,K.jsx)(u,{size:`sm`,disabled:P.isPending,onClick:()=>void be(),children:P.isPending?`Importing...`:`Import merged pull requests`}),(0,K.jsxs)(u,{size:`sm`,variant:`outline`,onClick:()=>X(x(t,-1)),children:[`Show the `,J,` before`]})]})}),H&&H.length>0&&(0,K.jsx)(ye,{period:t,entries:H,workspaces:z}),H&&(0,K.jsx)(Z,{period:t,entries:H}),t.kind===`year`&&H&&(0,K.jsx)(ve,{entries:H}),H&&g(H).map(t=>(0,K.jsxs)(`section`,{"aria-label":y[t.outcome],className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`h3`,{className:i(`text-sm font-semibold`,fe[t.outcome]),children:[y[t.outcome],` `,(0,K.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,K.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a})=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(A,{type:t.taskType}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,K.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,K.jsx)(`span`,{className:q,children:`Not adopted`}),a&&(0,K.jsx)(`span`,{className:q,children:`Archived`}),t.resolution===`completed`&&(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,d.success),children:`Completed`}),t.pullRequestUrl&&(0,K.jsx)(_e,{url:t.pullRequestUrl,stats:t.pullRequest}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[V.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,K.jsx)(B,{at:n})]})]}),(0,K.jsx)(re,{task:t}),a?null:C?.id===t.id?(0,K.jsx)(oe,{task:t,capabilities:ie(M.data?.find(({id:e})=>e===t.workspaceId)),focusPlan:C.field,onDone:()=>w(null)}):(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,K.jsx)(ue,{task:t,onEdit:e=>w({id:t.id,field:e})})}),t.completionNote&&(0,K.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),r.length>0&&(0,K.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${J}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,K.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,K.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,K.jsx)(`span`,{className:`truncate`,children:le(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function _e({url:e,stats:t}){let n=w(e),r=t=>{t.preventDefault(),U(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,K.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${E(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 ve({entries:e}){let t=H(e);return t===null?null:(0,K.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,K.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,K.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,title:O(t.pullRequests),children:[t.pullRequests.reviews,(0,K.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,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,K.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(A,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:E(t)})]},e.id))})]}),t.research.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,K.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,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?d.success:d.neutral),children:n?`Adopted`:`Not adopted`}),(0,K.jsx)(B,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,K.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,K.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(A,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,j(t),`, `,j(n),` active`]})]},e.id))})]})]})}function Z({period:e,entries:t}){let n=C(e,t,Date.now()/1e3),r=t.filter(({archived:e})=>!e).map(({task:e})=>L(e)),a=r.filter(e=>e.includes(`estimate`)).length,o=r.filter(e=>e.includes(`dueDate`)).length;if(n===null&&a+o===0)return null;let s=(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,K.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,K.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),n===null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,K.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:s})]}):(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,K.jsx)(`dd`,{children:n.time?z(n.time):`No completed task had an estimate`})]}),(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,K.jsx)(`dd`,{children:n.dueDates?V(n.dueDates):`No completed task had a due date`})]}),a+o>0&&s]}),n!==null&&n.late.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,K.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:n.late.map(e=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,K.jsx)(A,{type:e.task.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,K.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,l.danger),children:R(e)})]},e.task.id))})]})]})}function ye({period:e,entries:t,workspaces:n}){let r=S(e,t,n),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,K.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:y[e]}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[N.map(e=>{let t=r[e];return(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:M[e]}),(0,K.jsx)(`dd`,{children:t===null?`No data`:`${j(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,K.jsx)(`dd`,{children:I(r.changes)})]}),r.completedByType.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,K.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,K.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,K.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,f.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,K.jsx)(`span`,{children:t})]},e))})]})]})}export{X as Review};
|
|
1
|
+
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{C as a,S as o,Vt as s,_ as c,d as l,ht as ee,nn as u,o as d,s as f,tn as p}from"./status-styles-CWr1GU7t.js";import{_ as te,c as m,g as ne}from"./workspace-list-CT3KgOeR.js";import{A as h,C as g,Ct as _,D as v,E as y,F as b,I as x,J as re,L as S,M as C,N as w,O as T,P as E,R as D,S as O,T as k,V as A,Z as ie,_ as ae,b as j,c as oe,g as M,h as N,j as se,jt as P,k as ce,m as le,q as ue,s as F,v as I,vt as L,w as R,x as z,xt as B,y as V,z as H}from"./index-C8Fh6514.js";import{t as U}from"./opener-DWhHPoCL.js";var W={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};W.node;var de=t(W),G=r(e(),1),K=n(),fe={completed:l.success,opened_for_review:l.review,started:l.progress,worked_on:l.progress,planned:l.neutral},q=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,d.neutral),pe=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function me(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function he({disabled:e,children:t}){let[n,r]=(0,G.useState)(!1),i=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,K.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,K.jsxs)(u,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,K.jsx)(P,{}),(0,K.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,K.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function J(e,t){return`${e} ${t}${e===1?``:`s`}`}function ge(e,t){let n=e.skipped>0?` Left out ${J(e.skipped,`pull request`)} a task already records.`:``;return e.imported===0?`Found no new pull requests you merged in this ${t}.${n}`:`Imported ${J(e.imported,`merged pull request`)} as done tasks.${n}`}function Y({onSelect:e,children:t}){return(0,K.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function X({onShowTask:e}){let[t,n]=(0,G.useState)(()=>T(`week`,_(Date.now()/1e3))),[r,l]=(0,G.useState)(null),[f,S]=(0,G.useState)(k),[C,w]=(0,G.useState)(null),{start:E,end:O}=v(t),j=ee(E,O),M=s(),N=o(),P=a(),[I,L]=(0,G.useState)([]),R=M.data?.some(e=>e.source===`github`)??!1,z=[...M.data??[],...N.data?.workspaces??[]],V=new Map(z.map(e=>[e.id,e.name])),H=j.data&&ae(j.data,f),U=b(j.data??[]);f.label!==null&&!U.includes(f.label)&&U.push(f.label);let W=[f.workspaceId===null?`across all workspaces`:`in ${V.get(f.workspaceId)??`workspace ${f.workspaceId}`}`,f.label!==null&&`labelled ${f.label}`].filter(Boolean).join(`, `),J=h[t.kind];function X(e){l(null),L([]),n(e)}async function be(){l(null),L([]);try{let e=await P.mutateAsync({start:E,end:O});l(ge(e,J)),L(e.failures)}catch(e){l(`Could not import pull requests: ${e instanceof Error?e.message:String(e)}`)}}function xe(e){e!==t.kind&&X(e===`custom`?{...t,kind:e}:T(e,t.from))}function Q(e){return c(p.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone??null,workspaceId:f.workspaceId,label:f.label}))}async function Se(){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})])}l(`Copied as Markdown.`)}catch(e){l(`Could not copy: ${String(e)}`)}}async function $(e){try{let t=await Q(e);me(t.fileName,t.contents,t.mediaType),l(`Downloaded ${t.fileName}`)}catch(e){l(`Could not export: ${String(e)}`)}}return(0,K.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:se[t.kind]}),(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,t.from,` to `,t.to,` `,W,`.`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:pe.map(({kind:e,label:n})=>(0,K.jsx)(u,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>xe(e),children:n},e))}),t.kind===`week`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,K.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&X(D(e.target.value))})]}),t.kind===`custom`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,K.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&X({...t,from:e.target.value})}),(0,K.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,K.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&X({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,K.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:ce(t)}),(0,K.jsx)(u,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${J}`,title:`Previous ${J}`,onClick:()=>X(x(t,-1)),children:(0,K.jsx)(ne,{})}),(0,K.jsx)(u,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${J}`,title:`Next ${J}`,onClick:()=>X(x(t,1)),children:(0,K.jsx)(te,{})}),t.kind!==`custom`&&(0,K.jsxs)(u,{size:`sm`,variant:`ghost`,onClick:()=>X(T(t.kind,_(Date.now()/1e3))),children:[(0,K.jsx)(de,{className:`md:hidden`,"aria-hidden":!0}),(0,K.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,J]})]}),(0,K.jsx)(`div`,{className:`ml-auto`,children:(0,K.jsx)(he,{disabled:!H,children:e=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Y,{onSelect:()=>{e(),Se()},children:`Copy as Markdown`}),(0,K.jsx)(Y,{onSelect:()=>{e(),$(`markdown`)},children:`Save as Markdown`}),(0,K.jsx)(Y,{onSelect:()=>{e(),$(`csv`)},children:`Save as CSV`}),(0,K.jsx)(Y,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,K.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,K.jsxs)(`select`,{"aria-label":`Workspace`,className:i(m,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.workspaceId??``,onChange:e=>S({...f,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,K.jsx)(`option`,{value:``,children:`All workspaces`}),z.map(e=>(0,K.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,K.jsxs)(`select`,{"aria-label":`Label`,className:i(m,`w-auto max-md:min-w-0 max-md:flex-1`),value:f.label??``,onChange:e=>S({...f,label:e.target.value===``?null:e.target.value}),children:[(0,K.jsx)(`option`,{value:``,children:U.length===0?`No labels in this period`:`Any label`}),U.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))]}),(f.workspaceId!==null||f.label!==null)&&(0,K.jsx)(u,{size:`sm`,variant:`ghost`,onClick:()=>S(k),children:`Clear filters`})]}),r&&(0,K.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),I.length>0&&(0,K.jsx)(`ul`,{role:`alert`,"aria-label":`Pull requests not imported`,className:`text-xs text-destructive print:hidden`,children:I.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!j.isPending&&`sr-only`),children:j.isPending?`Loading the review...`:H?`Showing ${H.length} ${H.length===1?`task`:`tasks`} with activity in this ${J}.`:``}),j.isError&&(0,K.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,j.error.message]}),H?.length===0&&(0,K.jsx)(F,{title:j.data?.length===0?`No recorded activity in this ${J}.`:`No recorded activity in this ${J} matches the filters.`,hint:j.data?.length===0?`Toodo records each task as it is planned, started, opened for review, and completed, with the commits of its branch, so reviews fill up as you work. Work merged before Toodo tracked it is not here: ${R?`import the pull requests you merged in this ${J} to add it.`:`add a workspace with a GitHub repository to import the pull requests you merged.`}`:`Pick another period or change the filters to look at other work.`,action:(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:[j.data?.length===0&&R&&(0,K.jsx)(u,{size:`sm`,disabled:P.isPending,onClick:()=>void be(),children:P.isPending?`Importing...`:`Import merged pull requests`}),(0,K.jsxs)(u,{size:`sm`,variant:`outline`,onClick:()=>X(x(t,-1)),children:[`Show the `,J,` before`]})]})}),H&&H.length>0&&(0,K.jsx)(ye,{period:t,entries:H,workspaces:z}),H&&(0,K.jsx)(Z,{period:t,entries:H}),t.kind===`year`&&H&&(0,K.jsx)(ve,{entries:H}),H&&g(H).map(t=>(0,K.jsxs)(`section`,{"aria-label":y[t.outcome],className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`h3`,{className:i(`text-sm font-semibold`,fe[t.outcome]),children:[y[t.outcome],` `,(0,K.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,K.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a})=>(0,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(A,{type:t.taskType}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,K.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,K.jsx)(`span`,{className:q,children:`Not adopted`}),a&&(0,K.jsx)(`span`,{className:q,children:`Archived`}),t.resolution===`completed`&&(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,d.success),children:`Completed`}),t.pullRequestUrl&&(0,K.jsx)(_e,{url:t.pullRequestUrl,stats:t.pullRequest}),(0,K.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[V.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,K.jsx)(B,{at:n})]})]}),(0,K.jsx)(re,{task:t}),a?null:C?.id===t.id?(0,K.jsx)(oe,{task:t,capabilities:ie(M.data?.find(({id:e})=>e===t.workspaceId)),focusPlan:C.field,onDone:()=>w(null)}):(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,K.jsx)(ue,{task:t,onEdit:e=>w({id:t.id,field:e})})}),t.completionNote&&(0,K.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),r.length>0&&(0,K.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${J}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,K.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,K.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,K.jsx)(`span`,{className:`truncate`,children:le(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function _e({url:e,stats:t}){let n=w(e),r=t=>{t.preventDefault(),U(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,K.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${E(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 ve({entries:e}){let t=H(e);return t===null?null:(0,K.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,K.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,K.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,K.jsxs)(`dd`,{className:`text-lg font-semibold`,title:O(t.pullRequests),children:[t.pullRequests.reviews,(0,K.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,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,K.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(A,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:E(t)})]},e.id))})]}),t.research.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,K.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,K.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?d.success:d.neutral),children:n?`Adopted`:`Not adopted`}),(0,K.jsx)(B,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,K.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,K.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsx)(A,{type:e.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,K.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,j(t),`, `,j(n),` active`]})]},e.id))})]})]})}function Z({period:e,entries:t}){let n=C(e,t,Date.now()/1e3),r=t.filter(({archived:e})=>!e).map(({task:e})=>L(e)),a=r.filter(e=>e.includes(`estimate`)).length,o=r.filter(e=>e.includes(`dueDate`)).length;if(n===null&&a+o===0)return null;let s=(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,K.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,K.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),n===null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,K.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:s})]}):(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,K.jsx)(`dd`,{children:n.time?z(n.time):`No completed task had an estimate`})]}),(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,K.jsx)(`dd`,{children:n.dueDates?V(n.dueDates):`No completed task had a due date`})]}),a+o>0&&s]}),n!==null&&n.late.length>0&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,K.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:n.late.map(e=>(0,K.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,K.jsx)(A,{type:e.task.taskType}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,K.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,l.danger),children:R(e)})]},e.task.id))})]})]})}function ye({period:e,entries:t,workspaces:n}){let r=S(e,t,n),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,K.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,K.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:y[e]}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[(0,K.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,K.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,K.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[N.map(e=>{let t=r[e];return(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:M[e]}),(0,K.jsx)(`dd`,{children:t===null?`No data`:`${j(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,K.jsx)(`dd`,{children:I(r.changes)})]}),r.completedByType.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,K.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,K.jsxs)(`div`,{className:`contents`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,K.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,K.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,K.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,f.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,K.jsx)(`span`,{children:t})]},e))})]})]})}export{X as Review};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t,s as n}from"./dist-ZmB2kPfR.js";import{nn as r}from"./status-styles-CWr1GU7t.js";import{c as i}from"./workspace-list-CT3KgOeR.js";import{c as a,l as o,u as s}from"./event-CwtUqkXR.js";import{a as c,i as l,n as u,o as d,r as f}from"./index-
|
|
1
|
+
import{i as e,r as t,s as n}from"./dist-ZmB2kPfR.js";import{nn as r}from"./status-styles-CWr1GU7t.js";import{c as i}from"./workspace-list-CT3KgOeR.js";import{c as a,l as o,u as s}from"./event-CwtUqkXR.js";import{a as c,i as l,n as u,o as d,r as f}from"./index-C8Fh6514.js";var p=n(e(),1),m=t();function h({children:e}){return(0,p.useSyncExternalStore)(s,a)===null?(0,m.jsx)(g,{}):e}function g(){let[e,t]=(0,p.useState)(``),[n,a]=(0,p.useState)(()=>c(navigator.userAgent)),[s,h]=(0,p.useState)(u.scope),[g,_]=(0,p.useState)(String(u.expiresInDays)),[v,y]=(0,p.useState)(null),[b,x]=(0,p.useState)(!1),[S,C]=(0,p.useState)(!1),w=(0,p.useRef)(null),T=(0,p.useId)(),E=`${T}-help`,D=`${T}-rejected`;async function O(t){t.preventDefault(),C(!0),y(null),x(!1);try{let t=g===`never`?null:Number(g);o(await d(e.trim(),n.trim(),{scope:s,expiresInDays:t}))}catch(e){e instanceof l?(x(!0),w.current?.focus(),w.current?.select()):e instanceof TypeError?y(`Could not reach the server: ${String(e)}`):y(e instanceof Error?e.message:String(e))}finally{C(!1)}}return(0,m.jsx)(`main`,{className:`flex min-h-svh flex-col items-center justify-center gap-4 p-6`,children:(0,m.jsxs)(`form`,{onSubmit:O,"aria-label":`Server access`,className:`flex w-full max-w-sm flex-col gap-3 rounded-lg border p-5`,children:[(0,m.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Toodo server`}),(0,m.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,m.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,m.jsx)(`label`,{htmlFor:`${T}-token`,className:`text-xs text-muted-foreground`,children:`Access token`}),(0,m.jsx)(`input`,{ref:w,id:`${T}-token`,className:`${i} aria-invalid:border-destructive`,type:`password`,autoComplete:`current-password`,value:e,onChange:e=>{t(e.target.value),x(!1)},"aria-invalid":b||void 0,"aria-describedby":b?`${D} ${E}`:E,required:!0}),b&&(0,m.jsxs)(`p`,{id:D,role:`alert`,className:`text-xs text-destructive`,children:[`The server did not accept this token. Paste the whole contents of`,` `,(0,m.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` again; a device token stops working once it is revoked.`]}),(0,m.jsxs)(`p`,{id:E,className:`text-xs text-muted-foreground`,children:[`Copy it from `,(0,m.jsx)(`code`,{className:`text-xs`,children:`web-token`}),` in the server's data directory.`]})]}),(0,m.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Device name`,(0,m.jsx)(`input`,{className:i,maxLength:80,value:n,onChange:e=>a(e.target.value),required:!0})]}),(0,m.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,m.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Access`,(0,m.jsxs)(`select`,{className:i,value:s,onChange:e=>h(e.target.value),children:[(0,m.jsx)(`option`,{value:`full`,children:`Full access`}),(0,m.jsx)(`option`,{value:`read`,children:`Read-only`})]})]}),(0,m.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs text-muted-foreground`,children:[`Token expires after`,(0,m.jsx)(`select`,{className:i,value:g,onChange:e=>_(e.target.value),children:f.map(({label:e,days:t})=>(0,m.jsx)(`option`,{value:t===null?`never`:String(t),children:e},e))})]})]}),(0,m.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Applies when you sign in with `,(0,m.jsx)(`code`,{className:`text-xs`,children:`web-token`}),`. When the token expires, sign in again.`]}),v&&(0,m.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:v}),(0,m.jsx)(r,{type:`submit`,disabled:S||!e.trim()||!n.trim(),children:S?`Checking...`:`Continue`})]})})}export{h as ServerAccess};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{A as a,D as o,O as s,b as c,d as l,jt as u,kt as d,lt as f,nn as p,o as m,y as h}from"./status-styles-CWr1GU7t.js";import{p as g}from"./workspace-list-CT3KgOeR.js";import{At as _,Et as v,G as y,J as ee,K as b,N as x,Nt as S,Ot as C,Pt as w,Tt as T,W as E,X as D,Y as O,_t as k,d as te,f as ne,it as A,kt as re,l as ie,nt as j,p as M,u as N,wt as P,xt as F}from"./index-
|
|
1
|
+
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{A as a,D as o,O as s,b as c,d as l,jt as u,kt as d,lt as f,nn as p,o as m,y as h}from"./status-styles-CWr1GU7t.js";import{p as g}from"./workspace-list-CT3KgOeR.js";import{At as _,Et as v,G as y,J as ee,K as b,N as x,Nt as S,Ot as C,Pt as w,Tt as T,W as E,X as D,Y as O,_t as k,d as te,f as ne,it as A,kt as re,l as ie,nt as j,p as M,u as N,wt as P,xt as F}from"./index-C8Fh6514.js";import{t as I}from"./opener-DWhHPoCL.js";import{t as L}from"./details-sheet-2P7Bs4GS.js";var R={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`]};R.node;var z=t(R),B={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};B.node;var V=t(B),H=r(e(),1),U=n();function W({onClose:e,children:t}){let n=(0,H.useRef)(null),[r,i]=(0,H.useState)(!1);function a(){n.current?.querySelector(`form[data-dirty]`)?i(!0):e()}return(0,H.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[role=menu]`)||(r?i(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select`)||a())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,U.jsx)(L,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:a,banner:r&&(0,U.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,U.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,U.jsx)(p,{size:`xs`,variant:`outline`,autoFocus:!0,onClick:()=>i(!1),children:`Keep editing`}),(0,U.jsx)(p,{size:`xs`,variant:`destructive`,onClick:e,children:`Discard changes`})]}),children:t})}function G({task:e,detailed:t}){let n=v(e.milestones);return n.length===0?null:t?(0,U.jsx)(E,{label:`Timeline`,children:(0,U.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,U.jsxs)(`div`,{className:`contents`,children:[(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,U.jsx)(`dd`,{children:(0,U.jsx)(F,{at:t})})]},e))})}):(0,U.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,U.jsx)(F,{at:t,prefix:`${e} `},e))})}function ae({taskId:e}){let t=o(e,!0),n=`Base freshness of #${e}`,r=(0,U.jsxs)(p,{type:`button`,variant:`ghost`,size:`xs`,className:`ml-1.5 h-5 px-1.5 align-middle`,"aria-label":`Recheck base freshness of #${e}`,title:`Check again whether the branch is behind its base`,disabled:t.isFetching,onClick:()=>void t.refetch(),children:[(0,U.jsx)(C,{className:i(`size-3`,t.isFetching&&`animate-spin`)}),`Recheck`]});if(t.error)return(0,U.jsxs)(`p`,{role:`note`,"aria-label":n,className:`text-xs text-muted-foreground`,title:t.error.message,children:[`Could not check whether the branch is behind its base`,r]});let a=t.data,s=a?j(a):null;if(!a||s===null)return null;let c=a.mergeable===`conflicting`;return(0,U.jsxs)(`p`,{role:`note`,"aria-label":n,"data-conflicting":c||void 0,className:i(`text-xs`,c?l.danger:l.attention),title:[a.fetchError&&`Fetching origin failed: ${a.fetchError}`,a.mergeableError].filter(Boolean).join(`
|
|
2
2
|
`)||void 0,children:[s,a.fetchError&&` (not up to date: fetching origin failed)`,r]})}function K({task:e,mergedWith:t,through:n,detailed:r}){let i=t.pullRequestUrl;if(i===null){let t=`Shipped with task of #${e.id}`;return r?(0,U.jsx)(E,{label:`Shipped with`,children:(0,U.jsx)(`span`,{"aria-label":t,children:n??`A deleted task`})}):(0,U.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[(0,U.jsx)(_,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Shipped with`}),(0,U.jsx)(`span`,{"aria-label":t,children:n??`a deleted task`})]})}let a=`Shipped with pull request of #${e.id}`;return r?(0,U.jsxs)(E,{label:`Shipped with`,children:[(0,U.jsx)(`span`,{"aria-label":a,className:`break-all font-mono select-all`,children:i}),n&&(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Pull request of `,n]})]}):(0,U.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[(0,U.jsx)(_,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Shipped with`}),(0,U.jsx)(`span`,{"aria-label":a,className:`truncate select-all font-mono`,children:i}),n&&(0,U.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[`of `,n]})]})}function q({task:e,tasks:t,context:n,navigation:r}){let a=u(),o=h(),s=f(),c=(a.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),l=t.filter(t=>t.id!==e.id&&!c.includes(t.id)),d=[...new Set([e.workspaceId,...l.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:l.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),p=D(),m=o.isPending||s.isPending||p,_=o.error??s.error;if(c.length===0&&d.length===0)return null;let v=d.length>0&&(0,U.jsxs)(`select`,{"aria-label":`Add related task to #${e.id}`,className:i(`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`,`max-w-48`),value:``,disabled:m,onChange:t=>{t.target.value&&o.mutate({taskId:e.id,relatedId:Number(t.target.value)})},children:[(0,U.jsx)(`option`,{value:``,children:`Add related task...`}),d.map(e=>(0,U.jsx)(`optgroup`,{label:n.workspaceName(e.workspaceId),children:e.tasks.map(e=>(0,U.jsxs)(`option`,{value:e.id,children:[`#`,e.id,` `,e.title]},e.id))},e.workspaceId))]}),y=_&&(0,U.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:_.message});return c.length===0?(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[v,y]}):(0,U.jsxs)(E,{label:`Related`,children:[(0,U.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[c.map(t=>{let i=n.byId.get(t),a=O(t,e.workspaceId,n);return(0,U.jsxs)(`li`,{className:`inline-flex h-6 min-w-0 items-center rounded-md border max-md:h-11 max-md:gap-2 max-md:border-0`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-label":`Open related task ${a}`,title:i?.title,className:`h-full min-w-0 max-w-56 truncate rounded-l-md px-1.5 tabular-nums hover:bg-muted max-md:rounded-md max-md:border max-md:px-3 disabled:cursor-default disabled:hover:bg-transparent`,disabled:r===void 0||!r.canOpen(t),onClick:()=>r?.open(t),children:[a,` `,i?.title]}),(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove related task #${t} from #${e.id}`,title:`Remove related task`,className:`flex h-full items-center justify-center rounded-r-md p-1 text-muted-foreground hover:bg-muted max-md:w-11 max-md:rounded-md max-md:border hover:text-foreground disabled:opacity-50`,disabled:m,onClick:()=>s.mutate({taskId:e.id,relatedId:t}),children:(0,U.jsx)(g,{className:`size-3`})})]},t)}),v]}),y]})}function J({task:e,detailed:t}){let n=e.status!==`planned`||A(e),r=a(e.id,n);if(r.isError)return(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load commits: `,r.error.message]});if(!r.data||r.data.length===0)return null;let o=(0,U.jsx)(`ul`,{"aria-label":`Commits of #${e.id}`,className:i(`flex flex-col gap-0.5`,!t&&`mt-1`),children:r.data.map(e=>(0,U.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,U.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,U.jsx)(`span`,{className:t?`min-w-0 break-words-keep`:`truncate`,children:e.message.split(`
|
|
3
3
|
`,1)[0]})]},e.sha))});return t?(0,U.jsx)(E,{label:`Commits (${r.data.length})`,children:o}):o}function oe({task:e}){return(0,U.jsxs)(U.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,U.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,U.jsxs)(`span`,{children:[`Estimate `,k(e.estimate)]}),e.dueDate!==null&&(0,U.jsx)(y,{task:e})]}),(0,U.jsx)(ee,{task:e})]})}var se={commit:{label:`Commit`,icon:V,tone:`neutral`},pr_opened:{label:`Pull request opened`,icon:re,tone:`review`},checks_passed:{label:`CI passed`,icon:w,tone:`success`},checks_failed:{label:`CI failed`,icon:z,tone:`danger`},pr_merged:{label:`Merged`,icon:_,tone:`success`}};function ce({url:e}){let t=x(e),n=t=>{t.preventDefault(),I(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,U.jsx)(`a`,{href:e,title:e,"aria-label":t?`Pull request #${t}`:`Pull request`,onClick:n,onAuxClick:n,className:`shrink-0 text-primary underline underline-offset-2 hover:no-underline`,children:t?`#${t}`:`PR`})}function le({task:e,capabilities:t}){let n=t.git&&t.merge,r=d(e.id,n&&(e.status!==`planned`||A(e)));return n?r.isError?(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load git activity: `,r.error.message]}):!r.data||r.data.length===0?null:(0,U.jsx)(E,{label:`Git activity`,children:(0,U.jsx)(`ol`,{"aria-label":`Git activity of #${e.id}`,className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 max-md:gap-y-1.5`,children:r.data.map(({kind:e,externalRef:t,title:n,author:r,occurredAt:a})=>{let{label:o,icon:s,tone:c}=se[e];return(0,U.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-baseline`,title:r??void 0,children:[(0,U.jsx)(F,{className:`text-muted-foreground`,at:a}),(0,U.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,U.jsxs)(`span`,{className:i(`inline-flex shrink-0 items-baseline gap-1`,l[c]),children:[(0,U.jsx)(s,{"aria-hidden":!0,className:`size-3 self-center`}),o]}),e===`pr_opened`||e===`pr_merged`?(0,U.jsx)(ce,{url:t}):(0,U.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:t.slice(0,7)}),(0,U.jsx)(`span`,{className:`min-w-0 break-words-keep max-md:basis-full`,children:n})]})]},`${e}:${t}`)})})}):null}var Y={idle:{label:`Idle`,tone:`neutral`},working:{label:`Working`,tone:`info`},blocked:{label:`Needs input`,tone:`attention`},done:{label:`Done`,tone:`success`}};function ue(e,t){return e.reduce((n,{status:r,at:i},a)=>{if(r!==`working`)return n;let o=e[a+1]?.at??t;return n+Math.max(0,o-i)},0)}function de(e){let t=Math.floor(e/60);return t<1?`<1m`:t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function fe({task:e,capabilities:t}){let n=t.herdr,r=c(e.id,n&&(e.status!==`planned`||A(e)));if(!n)return null;if(r.isError)return(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load the agent's history: `,r.error.message]});let i=r.data??[];if(i.length===0)return null;let a=i.slice(-20),o=de(ue(i,Date.now()/1e3));return(0,U.jsxs)(E,{label:`Agent activity`,children:[(0,U.jsxs)(`p`,{"aria-label":`Time the agent of #${e.id} worked`,className:`text-muted-foreground`,children:[`Worked `,o,i.length>a.length&&`; the last ${a.length} of ${i.length} changes:`]}),(0,U.jsx)(`ol`,{"aria-label":`Agent activity of #${e.id}`,className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 max-md:gap-y-1.5`,children:a.map(({status:e,at:t},n)=>(0,U.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-baseline`,children:[(0,U.jsx)(F,{className:`text-muted-foreground`,at:t}),e===null?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`No agent`}):(0,U.jsx)(`span`,{className:l[Y[e].tone],children:Y[e].label})]},n))})]})}var pe={progress:`Progress`,blocker:`Blocker`};function X({kind:e}){return(0,U.jsx)(`span`,{"data-note-kind":e,className:i(`shrink-0 rounded-md px-1.5 font-medium`,e===`blocker`?m.attention:m.neutral),children:pe[e]})}function me({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,U.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:P(t.at),children:[(0,U.jsx)(X,{kind:t.kind}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:M(t.body)}),n.length>1&&(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,U.jsx)(E,{label:`Notes (${n.length})`,children:(0,U.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(X,{kind:e.kind}),(0,U.jsx)(F,{className:`text-muted-foreground`,at:e.at})]}),(0,U.jsx)(H.Suspense,{fallback:(0,U.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,U.jsx)(b,{source:e.body})})]},t))})})}var he={pending:`Pending`,met:`Met`,failed:`Failed`},Z={pending:l.neutral,met:l.success,failed:l.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?w:e===`failed`?z:S;return(0,U.jsx)(`span`,{role:`img`,"aria-label":he[e],className:i(`flex size-4 shrink-0 items-center justify-center`,Z[e]),children:(0,U.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function ge(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${T(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function _e({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,U.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,U.jsx)(ve,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,U.jsx)(E,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function ve({task:e,criterion:t,detailed:n}){let r=s(),a=D(),[o,c]=(0,H.useState)(!1),[u,d]=(0,H.useState)(``),f=t.kind===`manual`&&e.status!==`done`,m=ge(t),h=N(t.kind)?t.target:null;function g(){c(!1),d(``)}let _=ne(u.trim()!==``,g,r.isPending);function v(n){o?g():n?(r.reset(),c(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function y(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:u.trim()||null},{onSuccess:g})}return(0,U.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[m,t.evidence,h].filter(Boolean).join(`
|
|
4
4
|
`)||void 0,children:[f?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`label`,{className:`flex size-4 shrink-0 items-center justify-center max-md:-mx-3.5 max-md:size-11`,children:(0,U.jsx)(`input`,{type:`checkbox`,"aria-label":`Check criterion ${t.id} of #${e.id}`,checked:t.state===`met`||o,disabled:r.isPending||a,onChange:e=>v(e.target.checked)})}),t.state===`failed`&&(0,U.jsx)($,{state:`failed`})]}):(0,U.jsx)($,{state:t.state}),(0,U.jsx)(`span`,{className:i(`min-w-0`,n?`break-words-keep`:`truncate`,t.state===`failed`&&l.danger),children:t.text}),t.kind!==`manual`&&(0,U.jsx)(`span`,{className:`shrink-0 rounded-md bg-muted px-1.5 text-muted-foreground`,children:ie[t.kind]}),!n&&t.evidence&&(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground`,children:t.evidence})]}),n&&h&&(0,U.jsx)(`code`,{className:`ml-5.5 break-all text-muted-foreground`,children:h}),n&&(t.evidence||m)&&(0,U.jsxs)(`p`,{className:`ml-5.5 whitespace-pre-line break-words-keep text-muted-foreground`,children:[t.evidence,t.evidence&&m&&` · `,t.checkedBy!==null&&(0,U.jsxs)(U.Fragment,{children:[`Checked by `,Q[t.checkedBy],t.checkedAt!==null&&(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(F,{at:t.checkedAt})]})]})]}),o&&(0,U.jsxs)(`form`,{onSubmit:y,className:`ml-5.5 flex flex-wrap items-center gap-1`,onKeyDown:_.onKeyDown,children:[(0,U.jsx)(`input`,{className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`h-7 flex-1 basis-48`),"aria-label":`Evidence for criterion ${t.id}`,placeholder:`Evidence (optional), e.g. a link or what you checked`,value:u,onChange:e=>d(e.target.value),autoFocus:!0}),_.asking?(0,U.jsx)(te,{label:`Discard evidence for criterion ${t.id}`,question:`Discard the evidence?`,onKeep:_.keep,onDiscard:_.discard}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p,{type:`submit`,size:`xs`,disabled:r.isPending,children:r.isPending?`Saving...`:`Save`}),(0,U.jsx)(p,{type:`button`,size:`xs`,variant:`ghost`,onClick:_.request,children:`Cancel`})]})]}),r.isError&&(0,U.jsx)(`p`,{role:`alert`,className:`ml-5.5 text-destructive`,children:r.error.message})]})}export{fe as AgentActivity,ae as BranchFreshnessNote,J as CommitList,q as RelatedTasks,K as ShippedWith,le as TaskActivity,_e as TaskCriteria,W as TaskDetailsSheet,me as TaskNotes,oe as TaskPlan,G as TaskTimeline};
|