@openparachute/notes-ui 0.1.3 → 0.1.5-rc.1

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.
Files changed (35) hide show
  1. package/dist/.parachute/info +1 -1
  2. package/dist/CNAME +1 -0
  3. package/dist/assets/{Activity-BiO1mKun.js → Activity-D95uEfl-.js} +1 -1
  4. package/dist/assets/{AddVault-BejrnPnA.js → AddVault-DyLm40Wr.js} +1 -1
  5. package/dist/assets/AttachmentDropZone-BpW24D0t.js +1 -0
  6. package/dist/assets/{Calendar-BiXXgzE_.js → Calendar-BxC8PSFW.js} +1 -1
  7. package/dist/assets/{Capture-ZvHD0u6T.js → Capture-DCy4NMNH.js} +2 -2
  8. package/dist/assets/Import-B7PEdPjZ.js +12 -0
  9. package/dist/assets/NoteEditor-DoAZre6A.js +1 -0
  10. package/dist/assets/NoteNew-modij3mZ.js +1 -0
  11. package/dist/assets/{NoteRenderer-DOCu05JW.js → NoteRenderer-DZG-A0PR.js} +1 -1
  12. package/dist/assets/NoteView-DC4F7Yg0.js +3 -0
  13. package/dist/assets/OAuthCallback-DCVwov9d.js +1 -0
  14. package/dist/assets/PinArchiveButtons-B-J_q8fy.js +1 -0
  15. package/dist/assets/Settings-CV-HhWB9.js +1 -0
  16. package/dist/assets/Tags-C8cO3-Em.js +1 -0
  17. package/dist/assets/{Today-s14qlIMl.js → Today-DZXV6hrm.js} +1 -1
  18. package/dist/assets/{VaultGraph-CbcMA4S9.js → VaultGraph-DRR18im5.js} +2 -2
  19. package/dist/assets/{Vaults-B8nAmi_t.js → Vaults-CE_H2o0k.js} +1 -1
  20. package/dist/assets/{index-BUHugAd8.js → index-CeSJJ5Fs.js} +15 -15
  21. package/dist/assets/index-RxgFsdXJ.css +1 -0
  22. package/dist/assets/{react-force-graph-2d-DQm7mpQp.js → react-force-graph-2d-ByCzo_0U.js} +10 -10
  23. package/dist/assets/{useAttachmentUploader-vAtmWb3K.js → useAttachmentUploader-B1jCiVcW.js} +16 -16
  24. package/dist/index.html +2 -2
  25. package/dist/sw.js +1 -1
  26. package/meta.json +1 -1
  27. package/package.json +12 -5
  28. package/dist/assets/NoteEditor-DSEAQ_XL.js +0 -1
  29. package/dist/assets/NoteNew-DXPvIkGy.js +0 -1
  30. package/dist/assets/NoteView-BSnSuLxa.js +0 -3
  31. package/dist/assets/OAuthCallback-Dk46U1xZ.js +0 -1
  32. package/dist/assets/PinArchiveButtons-R5EYUe6B.js +0 -1
  33. package/dist/assets/Settings-BgN0grKh.js +0 -1
  34. package/dist/assets/Tags-DFQLC8AP.js +0 -1
  35. package/dist/assets/index-D_L2igjK.css +0 -1
@@ -1,4 +1,4 @@
1
- import{p as fr,r as ne,E as jo,x as Cn,L as Wr}from"./index-BUHugAd8.js";const Qo=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g;function Jo(e,n){var i,o;const t=[];let r=0;for(const a of e.matchAll(Qo)){const s=a.index??0;s>r&&t.push({type:"text",value:e.slice(r,s)});const l=((i=a[1])==null?void 0:i.trim())??"",c=(((o=a[2])==null?void 0:o.trim())||l).trim(),u=n(l),d=u?`/n/${encodeURIComponent(u.id)}`:`/n/${encodeURIComponent(l)}`;t.push({type:"link",url:d,title:null,children:[{type:"text",value:c}],data:{hProperties:{className:u?"wikilink wikilink-resolved":"wikilink wikilink-unresolved","data-wikilink-target":l,"data-wikilink-resolved":u?"true":"false"}}}),r=s+a[0].length}return r===0?[{type:"text",value:e}]:(r<e.length&&t.push({type:"text",value:e.slice(r)}),t)}function Xi(e,n){const t=[];for(const r of e.children){if(r.type==="text"){const i=Jo(r.value,n);t.push(...i);continue}if(r.type==="code"||r.type==="inlineCode"){t.push(r);continue}"children"in r&&Array.isArray(r.children)&&Xi(r,n),t.push(r)}e.children=t}const es=({resolve:e})=>n=>{Xi(n,e)};function ns(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ts=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,is={};function Vr(e,n){return(is.jsx?rs:ts).test(e)}const as=/[ \t\n\f\r]/g;function os(e){return typeof e=="object"?e.type==="text"?Yr(e.value):!1:Yr(e)}function Yr(e){return e.replace(as,"")===""}class Zn{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Zn.prototype.normal={};Zn.prototype.property={};Zn.prototype.space=void 0;function ji(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Zn(t,r,n)}function nr(e){return e.toLowerCase()}class Le{constructor(n,t){this.attribute=t,this.property=n}}Le.prototype.attribute="";Le.prototype.booleanish=!1;Le.prototype.boolean=!1;Le.prototype.commaOrSpaceSeparated=!1;Le.prototype.commaSeparated=!1;Le.prototype.defined=!1;Le.prototype.mustUseProperty=!1;Le.prototype.number=!1;Le.prototype.overloadedBoolean=!1;Le.prototype.property="";Le.prototype.spaceSeparated=!1;Le.prototype.space=void 0;let ss=0;const J=_n(),xe=_n(),tr=_n(),A=_n(),be=_n(),On=_n(),Ue=_n();function _n(){return 2**++ss}const rr=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:xe,commaOrSpaceSeparated:Ue,commaSeparated:On,number:A,overloadedBoolean:tr,spaceSeparated:be},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(rr);class gr extends Le{constructor(n,t,r,i){let o=-1;if(super(n,t),Zr(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const a=Dt[o];Zr(this,Dt[o],(r&rr[a])===rr[a])}}}gr.prototype.defined=!0;function Zr(e,n,t){t&&(e[n]=t)}function Rn(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new gr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[nr(r)]=r,t[nr(o.attribute)]=r}return new Zn(n,t,e.space)}const Qi=Rn({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:be,ariaCurrent:null,ariaDescribedBy:be,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:be,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:be,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:be,ariaLevel:A,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:be,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:be,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:xe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ji(e,n){return n in e?e[n]:n}function ea(e,n){return Ji(e,n.toLowerCase())}const ls=Rn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:On,acceptCharset:be,accessKey:be,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:be,autoFocus:J,autoPlay:J,blocking:be,capture:null,charSet:null,checked:J,cite:null,className:be,cols:A,colSpan:null,content:null,contentEditable:xe,controls:J,controlsList:be,coords:A|On,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:tr,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:be,height:A,hidden:tr,high:A,href:null,hrefLang:null,htmlFor:be,httpEquiv:be,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:be,itemRef:be,itemScope:J,itemType:be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:A,pattern:null,ping:be,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:be,required:J,reversed:J,rows:A,rowSpan:A,sandbox:be,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:xe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:be,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:ea}),cs=Rn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ue,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:be,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:On,g2:On,glyphName:On,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:Ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ue,rev:Ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ue,requiredFeatures:Ue,requiredFonts:Ue,requiredFormats:Ue,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:Ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ue,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ji}),na=Rn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),ta=Rn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ea}),ra=Rn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),us={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"},ds=/[A-Z]/g,Xr=/-[a-z]/g,ps=/^data[-\w.:]+$/i;function fs(e,n){const t=nr(n);let r=n,i=Le;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ps.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Xr,hs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Xr.test(o)){let a=o.replace(ds,gs);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}i=gr}return new i(r,n)}function gs(e){return"-"+e.toLowerCase()}function hs(e){return e.charAt(1).toUpperCase()}const ms=ji([Qi,ls,na,ta,ra],"html"),hr=ji([Qi,cs,na,ta,ra],"svg");function bs(e){return e.join(" ").trim()}var Sn={},Pt,jr;function Es(){if(jr)return Pt;jr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
1
+ import{r as fr,t as ne,G as jo,z as Cn,L as Wr}from"./index-CeSJJ5Fs.js";const Qo=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g;function Jo(e,n){var i,o;const t=[];let r=0;for(const a of e.matchAll(Qo)){const s=a.index??0;s>r&&t.push({type:"text",value:e.slice(r,s)});const l=((i=a[1])==null?void 0:i.trim())??"",c=(((o=a[2])==null?void 0:o.trim())||l).trim(),u=n(l),d=u?`/n/${encodeURIComponent(u.id)}`:`/n/${encodeURIComponent(l)}`;t.push({type:"link",url:d,title:null,children:[{type:"text",value:c}],data:{hProperties:{className:u?"wikilink wikilink-resolved":"wikilink wikilink-unresolved","data-wikilink-target":l,"data-wikilink-resolved":u?"true":"false"}}}),r=s+a[0].length}return r===0?[{type:"text",value:e}]:(r<e.length&&t.push({type:"text",value:e.slice(r)}),t)}function Xi(e,n){const t=[];for(const r of e.children){if(r.type==="text"){const i=Jo(r.value,n);t.push(...i);continue}if(r.type==="code"||r.type==="inlineCode"){t.push(r);continue}"children"in r&&Array.isArray(r.children)&&Xi(r,n),t.push(r)}e.children=t}const es=({resolve:e})=>n=>{Xi(n,e)};function ns(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ts=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,is={};function Vr(e,n){return(is.jsx?rs:ts).test(e)}const as=/[ \t\n\f\r]/g;function os(e){return typeof e=="object"?e.type==="text"?Yr(e.value):!1:Yr(e)}function Yr(e){return e.replace(as,"")===""}class Zn{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Zn.prototype.normal={};Zn.prototype.property={};Zn.prototype.space=void 0;function ji(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Zn(t,r,n)}function nr(e){return e.toLowerCase()}class Le{constructor(n,t){this.attribute=t,this.property=n}}Le.prototype.attribute="";Le.prototype.booleanish=!1;Le.prototype.boolean=!1;Le.prototype.commaOrSpaceSeparated=!1;Le.prototype.commaSeparated=!1;Le.prototype.defined=!1;Le.prototype.mustUseProperty=!1;Le.prototype.number=!1;Le.prototype.overloadedBoolean=!1;Le.prototype.property="";Le.prototype.spaceSeparated=!1;Le.prototype.space=void 0;let ss=0;const J=_n(),xe=_n(),tr=_n(),A=_n(),be=_n(),On=_n(),Ue=_n();function _n(){return 2**++ss}const rr=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:xe,commaOrSpaceSeparated:Ue,commaSeparated:On,number:A,overloadedBoolean:tr,spaceSeparated:be},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(rr);class gr extends Le{constructor(n,t,r,i){let o=-1;if(super(n,t),Zr(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const a=Dt[o];Zr(this,Dt[o],(r&rr[a])===rr[a])}}}gr.prototype.defined=!0;function Zr(e,n,t){t&&(e[n]=t)}function Rn(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new gr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[nr(r)]=r,t[nr(o.attribute)]=r}return new Zn(n,t,e.space)}const Qi=Rn({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:be,ariaCurrent:null,ariaDescribedBy:be,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:be,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:be,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:be,ariaLevel:A,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:be,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:be,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:xe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ji(e,n){return n in e?e[n]:n}function ea(e,n){return Ji(e,n.toLowerCase())}const ls=Rn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:On,acceptCharset:be,accessKey:be,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:be,autoFocus:J,autoPlay:J,blocking:be,capture:null,charSet:null,checked:J,cite:null,className:be,cols:A,colSpan:null,content:null,contentEditable:xe,controls:J,controlsList:be,coords:A|On,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:tr,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:be,height:A,hidden:tr,high:A,href:null,hrefLang:null,htmlFor:be,httpEquiv:be,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:be,itemRef:be,itemScope:J,itemType:be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:A,pattern:null,ping:be,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:be,required:J,reversed:J,rows:A,rowSpan:A,sandbox:be,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:xe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:be,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:ea}),cs=Rn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ue,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:be,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:On,g2:On,glyphName:On,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:Ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ue,rev:Ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ue,requiredFeatures:Ue,requiredFonts:Ue,requiredFormats:Ue,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:Ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ue,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ji}),na=Rn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),ta=Rn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ea}),ra=Rn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),us={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"},ds=/[A-Z]/g,Xr=/-[a-z]/g,ps=/^data[-\w.:]+$/i;function fs(e,n){const t=nr(n);let r=n,i=Le;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ps.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Xr,hs);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Xr.test(o)){let a=o.replace(ds,gs);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}i=gr}return new i(r,n)}function gs(e){return"-"+e.toLowerCase()}function hs(e){return e.charAt(1).toUpperCase()}const ms=ji([Qi,ls,na,ta,ra],"html"),hr=ji([Qi,cs,na,ta,ra],"svg");function bs(e){return e.join(" ").trim()}var Sn={},Pt,jr;function Es(){if(jr)return Pt;jr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
2
2
  `,c="/",u="*",d="",f="comment",p="declaration";function g(y,E){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];E=E||{};var N=1,w=1;function O(L){var v=L.match(n);v&&(N+=v.length);var Y=L.lastIndexOf(l);w=~Y?L.length-Y:w+L.length}function R(){var L={line:N,column:w};return function(v){return v.position=new k(L),H(),v}}function k(L){this.start=L,this.end={line:N,column:w},this.source=E.source}k.prototype.content=y;function U(L){var v=new Error(E.source+":"+N+":"+w+": "+L);if(v.reason=L,v.filename=E.source,v.line=N,v.column=w,v.source=y,!E.silent)throw v}function $(L){var v=L.exec(y);if(v){var Y=v[0];return O(Y),y=y.slice(Y.length),v}}function H(){$(t)}function x(L){var v;for(L=L||[];v=P();)v!==!1&&L.push(v);return L}function P(){var L=R();if(!(c!=y.charAt(0)||u!=y.charAt(1))){for(var v=2;d!=y.charAt(v)&&(u!=y.charAt(v)||c!=y.charAt(v+1));)++v;if(v+=2,d===y.charAt(v-1))return U("End of comment missing");var Y=y.slice(2,v-2);return w+=2,O(Y),y=y.slice(v),w+=2,L({type:f,comment:Y})}}function B(){var L=R(),v=$(r);if(v){if(P(),!$(i))return U("property missing ':'");var Y=$(o),se=L({type:p,property:_(v[0].replace(e,d)),value:Y?_(Y[0].replace(e,d)):d});return $(a),se}}function Q(){var L=[];x(L);for(var v;v=B();)v!==!1&&(L.push(v),x(L));return L}return H(),Q()}function _(y){return y?y.replace(s,d):d}return Pt=g,Pt}var Qr;function _s(){if(Qr)return Sn;Qr=1;var e=Sn&&Sn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.default=t;const n=e(Es());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,n.default)(r),s=typeof i=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;s?i(c,u,l):u&&(o=o||{},o[c]=u)}),o}return Sn}var zn={},Jr;function ys(){if(Jr)return zn;Jr=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(c){return!c||t.test(c)||e.test(c)},a=function(c,u){return u.toUpperCase()},s=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,s):c=c.replace(r,s),c.replace(n,a))};return zn.camelCase=l,zn}var Un,ei;function ks(){if(ei)return Un;ei=1;var e=Un&&Un.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(_s()),t=ys();function r(i,o){var a={};return!i||typeof i!="string"||(0,n.default)(i,function(s,l){s&&l&&(a[(0,t.camelCase)(s,o)]=l)}),a}return r.default=r,Un=r,Un}var xs=ks();const ws=fr(xs),ia=aa("end"),mr=aa("start");function aa(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ss(e){const n=mr(e),t=ia(e);if(n&&t)return{start:n,end:t}}function Kn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ni(e.position):"start"in e||"end"in e?ni(e):"line"in e||"column"in e?ir(e):""}function ir(e){return ti(e&&e.line)+":"+ti(e&&e.column)}function ni(e){return ir(e&&e.start)+"-"+ir(e&&e.end)}function ti(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},a=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(a=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Kn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const br={}.hasOwnProperty,Ns=new Map,Ts=/[A-Z]/g,As=new Set(["table","tbody","thead","tfoot","tr"]),vs=new Set(["td","th"]),oa="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Cs(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bs(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ps(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?hr:ms,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=sa(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function sa(e,n,t){if(n.type==="element")return Os(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Is(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ms(e,n,t);if(n.type==="mdxjsEsm")return Rs(e,n);if(n.type==="root")return Ls(e,n,t);if(n.type==="text")return Ds(e,n)}function Os(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=hr,e.schema=i),e.ancestors.push(n);const o=ca(e,n.tagName,!1),a=Fs(e,n);let s=_r(e,n);return As.has(n.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!os(l):!0})),la(e,a,o,n),Er(a,s),e.ancestors.pop(),e.schema=r,e.create(n,o,a,t)}function Is(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Vn(e,n.position)}function Rs(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Vn(e,n.position)}function Ms(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=hr,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:ca(e,n.name,!0),a=zs(e,n),s=_r(e,n);return la(e,a,o,n),Er(a,s),e.ancestors.pop(),e.schema=r,e.create(n,o,a,t)}function Ls(e,n,t){const r={};return Er(r,_r(e,n)),e.create(n,e.Fragment,r,t)}function Ds(e,n){return n.value}function la(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Er(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ps(e,n,t){return r;function r(i,o,a,s){const c=Array.isArray(a.children)?t:n;return s?c(o,a,s):c(o,a)}}function Bs(e,n){return t;function t(r,i,o,a){const s=Array.isArray(o.children),l=mr(r);return n(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Fs(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&br.call(n.properties,i)){const o=Us(e,i,n.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&vs.has(n.tagName)?r=s:t[a]=s}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function zs(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else Vn(e,n.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Vn(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function _r(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Ns;for(;++r<n.children.length;){const o=n.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const s=sa(e,o,a);s!==void 0&&t.push(s)}return t}function Us(e,n,t){const r=fs(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ns(t):bs(t)),r.property==="style"){let i=typeof t=="object"?t:$s(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Hs(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?us[r.property]||r.property:r.attribute,t]}}function $s(e,n){try{return ws(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=oa+"#cannot-parse-style-attribute",i}}function ca(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,a;for(;++o<i.length;){const s=Vr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=Vr(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return br.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Vn(e)}function Vn(e,n){const t=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=oa+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Hs(e){const n={};let t;for(t in e)br.call(e,t)&&(n[Gs(t)]=e[t]);return n}function Gs(e){let n=e.replace(Ts,Ks);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ks(e){return"-"+e.toLowerCase()}const Bt={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"]},qs={};function yr(e,n){const t=qs,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return ua(e,r,i)}function ua(e,n,t){if(Ws(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ri(e.children,n,t)}return Array.isArray(e)?ri(e,n,t):""}function ri(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=ua(e[i],n,t);return r.join("")}function Ws(e){return!!(e&&typeof e=="object")}const ii=document.createElement("i");function kr(e){const n="&"+e+";";ii.innerHTML=n;const t=ii.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function $e(e,n,t,r){const i=e.length;let o=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);o<r.length;)a=r.slice(o,o+1e4),a.unshift(n,0),e.splice(...a),o+=1e4,n+=1e4}function Ge(e,n){return e.length>0?($e(e,e.length,0,n),e):n}const ai={}.hasOwnProperty;function da(e){const n={};let t=-1;for(;++t<e.length;)Vs(n,e[t]);return n}function Vs(e,n){let t;for(t in n){const i=(ai.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let a;if(o)for(a in o){ai.call(i,a)||(i[a]=[]);const s=o[a];Ys(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Ys(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);$e(e,0,0,r)}function pa(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ve(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Re=gn(/[A-Za-z]/),Ae=gn(/[\dA-Za-z]/),Zs=gn(/[#-'*+\--9=?A-Z^-~]/);function mt(e){return e!==null&&(e<32||e===127)}const ar=gn(/\d/),Xs=gn(/[\dA-Fa-f]/),js=gn(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function ge(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}const xt=gn(new RegExp("\\p{P}|\\p{S}","u")),En=gn(/\s/);function gn(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Mn(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let a="";if(o===37&&Ae(e.charCodeAt(t+1))&&Ae(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(t+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+i+1,a=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function ae(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return re(l)?(e.enter(t),s(l)):n(l)}function s(l){return re(l)&&o++<i?(e.consume(l),s):(e.exit(t),n(l))}}const Qs={tokenize:Js};function Js(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ae(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return q(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const el={tokenize:nl},oi={tokenize:tl};function nl(e){const n=this,t=[];let r=0,i,o,a;return s;function s(w){if(r<t.length){const O=t[r];return n.containerState=O[1],e.attempt(O[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&N();const O=n.events.length;let R=O,k;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){k=n.events[R][1].end;break}E(r);let U=O;for(;U<n.events.length;)n.events[U][1].end={...k},U++;return $e(n.events,R+1,0,n.events.slice(O)),n.events.length=U,c(w)}return s(w)}function c(w){if(r===t.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(oi,u,d)(w)}function u(w){return i&&N(),E(r),f(w)}function d(w){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,g(w)}function f(w){return n.containerState={},e.attempt(oi,p,g)(w)}function p(w){return r++,t.push([n.currentConstruct,n.containerState]),f(w)}function g(w){if(w===null){i&&N(),E(0),e.consume(w);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),_(w)}function _(w){if(w===null){y(e.exit("chunkFlow"),!0),E(0),e.consume(w);return}return q(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(w),_)}function y(w,O){const R=n.sliceStream(w);if(O&&R.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(R),n.parser.lazy[w.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const U=n.events.length;let $=U,H,x;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(H){x=n.events[$][1].end;break}H=!0}for(E(r),k=U;k<n.events.length;)n.events[k][1].end={...x},k++;$e(n.events,$+1,0,n.events.slice(U)),n.events.length=k}}function E(w){let O=t.length;for(;O-- >w;){const R=t[O];n.containerState=R[1],R[0].exit.call(n,e)}t.length=w}function N(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function tl(e,n,t){return ae(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function In(e){if(e===null||ge(e)||En(e))return 1;if(xt(e))return 2}function wt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const or={name:"attention",resolveAll:rl,tokenize:il};function rl(e,n){let t=-1,r,i,o,a,s,l,c,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[t][1].start};si(d,-l),si(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[t][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ge(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=Ge(c,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",o,n]]),c=Ge(c,wt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=Ge(c,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,c=Ge(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,$e(e,r-1,t-r+3,c),t=r+c.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function il(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=In(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),u=In(l),d=!u||u===2&&i||t.includes(l),f=!i||i===2&&u||t.includes(r);return c._open=!!(o===42?d:d&&(i||!f)),c._close=!!(o===42?f:f&&(u||!d)),n(l)}}function si(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const al={name:"autolink",tokenize:ol};function ol(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Re(p)?(e.consume(p),a):p===64?t(p):c(p)}function a(p){return p===43||p===45||p===46||Ae(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Ae(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||mt(p)?t(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):Zs(p)?(e.consume(p),c):t(p)}function u(p){return Ae(p)?d(p):t(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):f(p)}function f(p){if((p===45||Ae(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return t(p)}}const Xn={partial:!0,tokenize:sl};function sl(e,n,t){return r;function r(o){return re(o)?ae(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||q(o)?n(o):t(o)}}const fa={continuation:{tokenize:cl},exit:ul,name:"blockQuote",tokenize:ll};function ll(e,n,t){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return t(a)}function o(a){return re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function cl(e,n,t){const r=this;return i;function i(a){return re(a)?ae(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(fa,n,t)(a)}}function ul(e){e.exit("blockQuote")}const ga={name:"characterEscape",tokenize:dl};function dl(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return js(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const ha={name:"characterReference",tokenize:pl};function pl(e,n,t){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=Ae,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Xs,u):(e.enter("characterReferenceValue"),o=7,a=ar,u(d))}function u(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Ae&&!kr(r.sliceSerialize(f))?t(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(d)&&i++<o?(e.consume(d),u):t(d)}}const li={partial:!0,tokenize:gl},ci={concrete:!0,name:"codeFenced",tokenize:fl};function fl(e,n,t){const r=this,i={partial:!0,tokenize:R};let o=0,a=0,s;return l;function l(k){return c(k)}function c(k){const U=r.events[r.events.length-1];return o=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,s=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===s?(a++,e.consume(k),u):a<3?t(k):(e.exit("codeFencedFenceSequence"),re(k)?ae(e,d,"whitespace")(k):d(k))}function d(k){return k===null||q(k)?(e.exit("codeFencedFence"),r.interrupt?n(k):e.check(li,_,O)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||q(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):re(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ae(e,p,"whitespace")(k)):k===96&&k===s?t(k):(e.consume(k),f)}function p(k){return k===null||q(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||q(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===s?t(k):(e.consume(k),g)}function _(k){return e.attempt(i,O,y)(k)}function y(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),E}function E(k){return o>0&&re(k)?ae(e,N,"linePrefix",o+1)(k):N(k)}function N(k){return k===null||q(k)?e.check(li,_,O)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||q(k)?(e.exit("codeFlowValue"),N(k)):(e.consume(k),w)}function O(k){return e.exit("codeFenced"),n(k)}function R(k,U,$){let H=0;return x;function x(v){return k.enter("lineEnding"),k.consume(v),k.exit("lineEnding"),P}function P(v){return k.enter("codeFencedFence"),re(v)?ae(k,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):B(v)}function B(v){return v===s?(k.enter("codeFencedFenceSequence"),Q(v)):$(v)}function Q(v){return v===s?(H++,k.consume(v),Q):H>=a?(k.exit("codeFencedFenceSequence"),re(v)?ae(k,L,"whitespace")(v):L(v)):$(v)}function L(v){return v===null||q(v)?(k.exit("codeFencedFence"),U(v)):$(v)}}}function gl(e,n,t){const r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Ft={name:"codeIndented",tokenize:ml},hl={partial:!0,tokenize:bl};function ml(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),ae(e,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):t(c)}function a(c){return c===null?l(c):q(c)?e.attempt(hl,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||q(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),n(c)}}function bl(e,n,t){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ae(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):q(a)?i(a):t(a)}}const El={name:"codeText",previous:yl,resolve:_l,tokenize:kl};function _l(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function yl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kl(e,n,t){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?t(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,u(d)):q(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||q(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(d)):(o.type="codeTextData",c(d))}}class xl{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$n(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),$n(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),$n(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);$n(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);$n(this.left,t.reverse())}}}function $n(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function ma(e){const n={};let t=-1,r,i,o,a,s,l,c;const u=new xl(e);for(;++t<u.length;){for(;t in n;)t=n[t];if(r=u.get(t),t&&r[1].type==="chunkFlow"&&u.get(t-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,wl(u,t)),t=n[t],c=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(a=u.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,t),s.unshift(r),u.splice(i,t-i+1,s))}}return $e(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function wl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let a=t._tokenizer;a||(a=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=t,g=0,_=0;const y=[_];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=t;++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&&(_=f+1,y.push(_),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),f=y.length;f--;){const E=s.slice(y[f],y[f+1]),N=o.pop();l.push([N,N+E.length-1]),e.splice(N,2,E)}for(l.reverse(),f=-1;++f<l.length;)c[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return c}const Sl={resolve:Tl,tokenize:Al},Nl={partial:!0,tokenize:vl};function Tl(e){return ma(e),e}function Al(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):q(s)?e.check(Nl,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function a(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function vl(e,n,t){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ae(e,o,"linePrefix")}function o(a){if(a===null||q(a))return t(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function ba(e,n,t,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(E){return E===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(E),e.exit(o),f):E===null||E===32||E===41||mt(E)?t(E):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),_(E))}function f(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(s),f(E)):E===null||E===60||q(E)?t(E):(e.consume(E),E===92?g:p)}function g(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function _(E){return!u&&(E===null||E===41||ge(E))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),n(E)):u<c&&E===40?(e.consume(E),u++,_):E===41?(e.consume(E),u--,_):E===null||E===32||E===40||mt(E)?t(E):(e.consume(E),E===92?y:_)}function y(E){return E===40||E===41||E===92?(e.consume(E),_):_(E)}}function Ea(e,n,t,r,i,o){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||q(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!re(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function _a(e,n,t,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):t(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):(e.enter(o),c(f))}function c(f){return f===a?(e.exit(o),l(a)):f===null?t(f):q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ae(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||q(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function qn(e,n){let t;return r;function r(i){return q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):re(i)?ae(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Cl={name:"definition",tokenize:Il},Ol={partial:!0,tokenize:Rl};function Il(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return Ea.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Ve(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):t(p)}function l(p){return ge(p)?qn(e,c)(p):c(p)}function c(p){return ba(e,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Ol,d,d)(p)}function d(p){return re(p)?ae(e,f,"whitespace")(p):f(p)}function f(p){return p===null||q(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Rl(e,n,t){return r;function r(s){return ge(s)?qn(e,i)(s):t(s)}function i(s){return _a(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return re(s)?ae(e,a,"whitespace")(s):a(s)}function a(s){return s===null||q(s)?n(s):t(s)}}const Ml={name:"hardBreakEscape",tokenize:Ll};function Ll(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return q(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const Dl={name:"headingAtx",resolve:Pl,tokenize:Bl};function Pl(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},$e(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function Bl(e,n,t){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ge(u)?(e.exit("atxHeadingSequence"),s(u)):t(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||q(u)?(e.exit("atxHeading"),n(u)):re(u)?ae(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ge(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const Fl=["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"],ui=["pre","script","style","textarea"],zl={concrete:!0,name:"htmlFlow",resolveTo:Hl,tokenize:Gl},Ul={partial:!0,tokenize:ql},$l={partial:!0,tokenize:Kl};function Hl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Gl(e,n,t){const r=this;let i,o,a,s,l;return c;function c(b){return u(b)}function u(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),d}function d(b){return b===33?(e.consume(b),f):b===47?(e.consume(b),o=!0,_):b===63?(e.consume(b),i=3,r.interrupt?n:h):Re(b)?(e.consume(b),a=String.fromCharCode(b),y):t(b)}function f(b){return b===45?(e.consume(b),i=2,p):b===91?(e.consume(b),i=5,s=0,g):Re(b)?(e.consume(b),i=4,r.interrupt?n:h):t(b)}function p(b){return b===45?(e.consume(b),r.interrupt?n:h):t(b)}function g(b){const Ce="CDATA[";return b===Ce.charCodeAt(s++)?(e.consume(b),s===Ce.length?r.interrupt?n:B:g):t(b)}function _(b){return Re(b)?(e.consume(b),a=String.fromCharCode(b),y):t(b)}function y(b){if(b===null||b===47||b===62||ge(b)){const Ce=b===47,He=a.toLowerCase();return!Ce&&!o&&ui.includes(He)?(i=1,r.interrupt?n(b):B(b)):Fl.includes(a.toLowerCase())?(i=6,Ce?(e.consume(b),E):r.interrupt?n(b):B(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(b):o?N(b):w(b))}return b===45||Ae(b)?(e.consume(b),a+=String.fromCharCode(b),y):t(b)}function E(b){return b===62?(e.consume(b),r.interrupt?n:B):t(b)}function N(b){return re(b)?(e.consume(b),N):x(b)}function w(b){return b===47?(e.consume(b),x):b===58||b===95||Re(b)?(e.consume(b),O):re(b)?(e.consume(b),w):x(b)}function O(b){return b===45||b===46||b===58||b===95||Ae(b)?(e.consume(b),O):R(b)}function R(b){return b===61?(e.consume(b),k):re(b)?(e.consume(b),R):w(b)}function k(b){return b===null||b===60||b===61||b===62||b===96?t(b):b===34||b===39?(e.consume(b),l=b,U):re(b)?(e.consume(b),k):$(b)}function U(b){return b===l?(e.consume(b),l=null,H):b===null||q(b)?t(b):(e.consume(b),U)}function $(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||ge(b)?R(b):(e.consume(b),$)}function H(b){return b===47||b===62||re(b)?w(b):t(b)}function x(b){return b===62?(e.consume(b),P):t(b)}function P(b){return b===null||q(b)?B(b):re(b)?(e.consume(b),P):t(b)}function B(b){return b===45&&i===2?(e.consume(b),Y):b===60&&i===1?(e.consume(b),se):b===62&&i===4?(e.consume(b),ue):b===63&&i===3?(e.consume(b),h):b===93&&i===5?(e.consume(b),pe):q(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ul,fe,Q)(b)):b===null||q(b)?(e.exit("htmlFlowData"),Q(b)):(e.consume(b),B)}function Q(b){return e.check($l,L,fe)(b)}function L(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),v}function v(b){return b===null||q(b)?Q(b):(e.enter("htmlFlowData"),B(b))}function Y(b){return b===45?(e.consume(b),h):B(b)}function se(b){return b===47?(e.consume(b),a="",Z):B(b)}function Z(b){if(b===62){const Ce=a.toLowerCase();return ui.includes(Ce)?(e.consume(b),ue):B(b)}return Re(b)&&a.length<8?(e.consume(b),a+=String.fromCharCode(b),Z):B(b)}function pe(b){return b===93?(e.consume(b),h):B(b)}function h(b){return b===62?(e.consume(b),ue):b===45&&i===2?(e.consume(b),h):B(b)}function ue(b){return b===null||q(b)?(e.exit("htmlFlowData"),fe(b)):(e.consume(b),ue)}function fe(b){return e.exit("htmlFlow"),n(b)}}function Kl(e,n,t){const r=this;return i;function i(a){return q(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):t(a)}function o(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function ql(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Xn,n,t)}}const Wl={name:"htmlText",tokenize:Vl};function Vl(e,n,t){const r=this;let i,o,a;return s;function s(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),l}function l(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),R):h===63?(e.consume(h),w):Re(h)?(e.consume(h),$):t(h)}function c(h){return h===45?(e.consume(h),u):h===91?(e.consume(h),o=0,g):Re(h)?(e.consume(h),N):t(h)}function u(h){return h===45?(e.consume(h),p):t(h)}function d(h){return h===null?t(h):h===45?(e.consume(h),f):q(h)?(a=d,se(h)):(e.consume(h),d)}function f(h){return h===45?(e.consume(h),p):d(h)}function p(h){return h===62?Y(h):h===45?f(h):d(h)}function g(h){const ue="CDATA[";return h===ue.charCodeAt(o++)?(e.consume(h),o===ue.length?_:g):t(h)}function _(h){return h===null?t(h):h===93?(e.consume(h),y):q(h)?(a=_,se(h)):(e.consume(h),_)}function y(h){return h===93?(e.consume(h),E):_(h)}function E(h){return h===62?Y(h):h===93?(e.consume(h),E):_(h)}function N(h){return h===null||h===62?Y(h):q(h)?(a=N,se(h)):(e.consume(h),N)}function w(h){return h===null?t(h):h===63?(e.consume(h),O):q(h)?(a=w,se(h)):(e.consume(h),w)}function O(h){return h===62?Y(h):w(h)}function R(h){return Re(h)?(e.consume(h),k):t(h)}function k(h){return h===45||Ae(h)?(e.consume(h),k):U(h)}function U(h){return q(h)?(a=U,se(h)):re(h)?(e.consume(h),U):Y(h)}function $(h){return h===45||Ae(h)?(e.consume(h),$):h===47||h===62||ge(h)?H(h):t(h)}function H(h){return h===47?(e.consume(h),Y):h===58||h===95||Re(h)?(e.consume(h),x):q(h)?(a=H,se(h)):re(h)?(e.consume(h),H):Y(h)}function x(h){return h===45||h===46||h===58||h===95||Ae(h)?(e.consume(h),x):P(h)}function P(h){return h===61?(e.consume(h),B):q(h)?(a=P,se(h)):re(h)?(e.consume(h),P):H(h)}function B(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,Q):q(h)?(a=B,se(h)):re(h)?(e.consume(h),B):(e.consume(h),L)}function Q(h){return h===i?(e.consume(h),i=void 0,v):h===null?t(h):q(h)?(a=Q,se(h)):(e.consume(h),Q)}function L(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||ge(h)?H(h):(e.consume(h),L)}function v(h){return h===47||h===62||ge(h)?H(h):t(h)}function Y(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function se(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Z}function Z(h){return re(h)?ae(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):pe(h)}function pe(h){return e.enter("htmlTextData"),a(h)}}const xr={name:"labelEnd",resolveAll:jl,resolveTo:Ql,tokenize:Jl},Yl={tokenize:ec},Zl={tokenize:nc},Xl={tokenize:tc};function jl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&$e(e,0,e.length,t),e}function Ql(e,n){let t=e.length,r=0,i,o,a,s;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=t);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,n],["enter",c,n]],s=Ge(s,e.slice(o+1,o+r+3)),s=Ge(s,[["enter",u,n]]),s=Ge(s,wt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),n)),s=Ge(s,[["exit",u,n],e[a-2],e[a-1],["exit",c,n]]),s=Ge(s,e.slice(a+1)),s=Ge(s,[["exit",l,n]]),$e(e,o,e.length,s),e}function Jl(e,n,t){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(Ve(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):t(f)}function l(f){return f===40?e.attempt(Yl,u,a?u:d)(f):f===91?e.attempt(Zl,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(Xl,u,d)(f)}function u(f){return n(f)}function d(f){return o._balanced=!0,t(f)}}function ec(e,n,t){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ge(d)?qn(e,o)(d):o(d)}function o(d){return d===41?u(d):ba(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ge(d)?qn(e,l)(d):u(d)}function s(d){return t(d)}function l(d){return d===34||d===39||d===40?_a(e,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ge(d)?qn(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),n):t(d)}}function nc(e,n,t){const r=this;return i;function i(s){return Ea.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Ve(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function a(s){return t(s)}}function tc(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const rc={name:"labelStartImage",resolveAll:xr.resolveAll,tokenize:ic};function ic(e,n,t){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):t(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const ac={name:"labelStartLink",resolveAll:xr.resolveAll,tokenize:oc};function oc(e,n,t){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const zt={name:"lineEnding",tokenize:sc};function sc(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ae(e,n,"linePrefix")}}const ht={name:"thematicBreak",tokenize:lc};function lc(e,n,t){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||q(c))?(e.exit("thematicBreak"),n(c)):t(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),re(c)?ae(e,s,"whitespace")(c):s(c))}}const Me={continuation:{tokenize:pc},exit:gc,name:"list",tokenize:dc},cc={partial:!0,tokenize:hc},uc={partial:!0,tokenize:fc};function dc(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ar(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ht,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return t(p)}function l(p){return ar(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Xn,r.interrupt?t:u,e.attempt(cc,f,d))}function u(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return re(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):t(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function pc(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Xn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ae(e,n,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!re(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uc,n,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ae(e,e.attempt(Me,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function fc(e,n,t){const r=this;return ae(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(o):t(o)}}function gc(e){e.exit(this.containerState.type)}function hc(e,n,t){const r=this;return ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!re(o)&&a&&a[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const di={name:"setextUnderline",resolveTo:mc,tokenize:bc};function mc(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function bc(e,n,t){const r=this;let i;return o;function o(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):t(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),re(c)?ae(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||q(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const Ec={tokenize:_c};function _c(e){const n=this,t=e.attempt(Xn,r,e.attempt(this.parser.constructs.flowInitial,i,ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Sl,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yc={resolveAll:ka()},kc=ya("string"),xc=ya("text");function ya(e){return{resolveAll:ka(e==="text"?wc:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),l}function l(u){return c(u)?(t.exit("data"),o(u)):(t.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function ka(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function wc(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const c={type:t===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}const Sc={42:Me,43:Me,45:Me,48:Me,49:Me,50:Me,51:Me,52:Me,53:Me,54:Me,55:Me,56:Me,57:Me,62:fa},Nc={91:Cl},Tc={[-2]:Ft,[-1]:Ft,32:Ft},Ac={35:Dl,42:ht,45:[di,ht],60:zl,61:di,95:ht,96:ci,126:ci},vc={38:ha,92:ga},Cc={[-5]:zt,[-4]:zt,[-3]:zt,33:rc,38:ha,42:or,60:[al,Wl],91:ac,92:[Ml,ga],93:xr,95:or,96:El},Oc={null:[or,yc]},Ic={null:[42,95]},Rc={null:[]},Mc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ic,contentInitial:Nc,disable:Rc,document:Sc,flow:Ac,flowInitial:Tc,insideSpan:Oc,string:vc,text:Cc},Symbol.toStringTag,{value:"Module"}));function Lc(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:U(R),check:U(k),consume:N,enter:w,exit:O,interrupt:U(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=n.tokenize.call(c,l);return n.resolveAll&&o.push(n),c;function d(P){return a=Ge(a,P),y(),a[a.length-1]!==null?[]:($(n,0),c.events=wt(o,c.events,c),c.events)}function f(P,B){return Pc(p(P),B)}function p(P){return Dc(a,P)}function g(){const{_bufferIndex:P,_index:B,line:Q,column:L,offset:v}=r;return{_bufferIndex:P,_index:B,line:Q,column:L,offset:v}}function _(P){i[P.line]=P.column,x()}function y(){let P;for(;r._index<a.length;){const B=a[r._index];if(typeof B=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<B.length;)E(B.charCodeAt(r._bufferIndex));else E(B)}}function E(P){u=u(P)}function N(P){q(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,x()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function w(P,B){const Q=B||{};return Q.type=P,Q.start=g(),c.events.push(["enter",Q,c]),s.push(Q),Q}function O(P){const B=s.pop();return B.end=g(),c.events.push(["exit",B,c]),B}function R(P,B){$(P,B.from)}function k(P,B){B.restore()}function U(P,B){return Q;function Q(L,v,Y){let se,Z,pe,h;return Array.isArray(L)?fe(L):"tokenize"in L?fe([L]):ue(L);function ue(Ee){return Je;function Je(De){const en=De!==null&&Ee[De],Pe=De!==null&&Ee.null,ln=[...Array.isArray(en)?en:en?[en]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return fe(ln)(De)}}function fe(Ee){return se=Ee,Z=0,Ee.length===0?Y:b(Ee[Z])}function b(Ee){return Je;function Je(De){return h=H(),pe=Ee,Ee.partial||(c.currentConstruct=Ee),Ee.name&&c.parser.constructs.disable.null.includes(Ee.name)?He():Ee.tokenize.call(B?Object.assign(Object.create(c),B):c,l,Ce,He)(De)}}function Ce(Ee){return P(pe,h),v}function He(Ee){return h.restore(),++Z<se.length?b(se[Z]):Y}}}function $(P,B){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&$e(c.events,B,c.events.length-B,P.resolve(c.events.slice(B),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function H(){const P=g(),B=c.previous,Q=c.currentConstruct,L=c.events.length,v=Array.from(s);return{from:L,restore:Y};function Y(){r=P,c.previous=B,c.currentConstruct=Q,c.events.length=L,s=v,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Dc(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let a;if(t===i)a=[e[t].slice(r,o)];else{if(a=e.slice(t,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Pc(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
3
3
  `;break}case-3:{a=`\r
4
4
  `;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Bc(e){const r={constructs:da([Mc,...(e||{}).extensions||[]]),content:i(Qs),defined:[],document:i(el),flow:i(Ec),lazy:{},string:i(kc),text:i(xc)};return r;function i(o){return a;function a(s){return Lc(r,o,s)}}}function Fc(e){for(;!ma(e););return e}const pi=/[\0\t\n\r]/g;function zc(){let e=1,n="",t=!0,r;return i;function i(o,a,s){const l=[];let c,u,d,f,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,n="",t&&(o.charCodeAt(0)===65279&&d++,t=void 0);d<o.length;){if(pi.lastIndex=d,c=pi.exec(o),f=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(f),!c){n=o.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),n&&l.push(n),l.push(null)),l}}const Uc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $c(e){return e.replace(Uc,Hc)}function Hc(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return pa(t.slice(o?2:1),o?16:10)}return kr(t)||e}const xa={}.hasOwnProperty;function Gc(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Kc(t)(Fc(Bc(t).document().write(zc()(e,n,!0))))}function Kc(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(xn),autolinkProtocol:H,autolinkEmail:H,atxHeading:o(kn),blockQuote:o(Pe),characterEscape:H,characterReference:H,codeFenced:o(ln),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(ln,a),codeText:o(Ln,a),codeTextData:H,data:H,codeFlowValue:H,definition:o(Dn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(Pn),hardBreakEscape:o(oe),hardBreakTrailing:o(oe),htmlFlow:o(nn,a),htmlFlowData:H,htmlText:o(nn,a),htmlTextData:H,image:o(tn),label:a,link:o(xn),listItem:o(At),listItemValue:f,listOrdered:o(Bn,d),listUnordered:o(Bn),paragraph:o(vt),reference:b,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(kn),strong:o(Jn),thematicBreak:o(et)},exit:{atxHeading:l(),atxHeadingSequence:R,autolink:l(),autolinkEmail:en,autolinkProtocol:De,blockQuote:l(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:He,characterReferenceMarkerNumeric:He,characterReferenceValue:Ee,characterReference:Je,codeFenced:l(y),codeFencedFence:_,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:l(E),codeText:l(v),codeTextData:x,data:x,definition:l(),definitionDestinationString:O,definitionLabelString:N,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(Q),htmlFlowData:x,htmlText:l(L),htmlTextData:x,image:l(se),label:pe,labelText:Z,lineEnding:P,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ce,resourceDestinationString:h,resourceTitleString:ue,resource:fe,setextHeading:l($),setextHeadingLineSequence:U,setextHeadingText:k,strong:l(),thematicBreak:l()}};wa(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let I={type:"root",children:[]};const W={stack:[I],tokenStack:[],config:n,enter:s,exit:c,buffer:a,resume:u,data:t},te=[];let le=-1;for(;++le<S.length;)if(S[le][1].type==="listOrdered"||S[le][1].type==="listUnordered")if(S[le][0]==="enter")te.push(le);else{const Be=te.pop();le=i(S,Be,le)}for(le=-1;++le<S.length;){const Be=n[S[le][0]];xa.call(Be,S[le][1].type)&&Be[S[le][1].type].call(Object.assign({sliceSerialize:S[le][2].sliceSerialize},W),S[le][1])}if(W.tokenStack.length>0){const Be=W.tokenStack[W.tokenStack.length-1];(Be[1]||fi).call(W,void 0,Be[0])}for(I.position={start:fn(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:fn(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le<n.transforms.length;)I=n.transforms[le](I)||I;return I}function i(S,I,W){let te=I-1,le=-1,Be=!1,an,Ke,cn,hn;for(;++te<=W;){const Oe=S[te];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?le++:le--,hn=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(an&&!hn&&!le&&!cn&&(cn=te),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!le&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||le===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(an){let un=te;for(Ke=void 0;un--;){const Fe=S[un];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;Ke&&(S[Ke][1].type="lineEndingBlank",Be=!0),Fe[1].type="lineEnding",Ke=un}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}cn&&(!Ke||cn<Ke)&&(an._spread=!0),an.end=Object.assign({},Ke?S[Ke][1].start:Oe[1].end),S.splice(Ke||te,0,["exit",an,Oe[2]]),te++,W++}if(Oe[1].type==="listItemPrefix"){const un={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};an=un,S.splice(te,0,["enter",un,Oe[2]]),te++,W++,cn=void 0,hn=!0}}}return S[I][1]._spread=Be,W}function o(S,I){return W;function W(te){s.call(this,S(te),te),I&&I.call(this,te)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(S,I,W){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([I,W||void 0]),S.position={start:fn(I.start),end:void 0}}function l(S){return I;function I(W){S&&S.call(this,W),c.call(this,W)}}function c(S,I){const W=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==S.type&&(I?I.call(this,S,te[0]):(te[1]||fi).call(this,S,te[0]));else throw new Error("Cannot close `"+S.type+"` ("+Kn({start:S.start,end:S.end})+"): it’s not open");W.position.end=fn(S.end)}function u(){return yr(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(S){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function p(){const S=this.resume(),I=this.stack[this.stack.length-1];I.lang=S}function g(){const S=this.resume(),I=this.stack[this.stack.length-1];I.meta=S}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S.replace(/(\r?\n|\r)$/g,"")}function N(S){const I=this.resume(),W=this.stack[this.stack.length-1];W.label=I,W.identifier=Ve(this.sliceSerialize(S)).toLowerCase()}function w(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function O(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function R(S){const I=this.stack[this.stack.length-1];if(!I.depth){const W=this.sliceSerialize(S).length;I.depth=W}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function U(S){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function H(S){const W=this.stack[this.stack.length-1].children;let te=W[W.length-1];(!te||te.type!=="text")&&(te=rn(),te.position={start:fn(S.start),end:void 0},W.push(te)),this.stack.push(te)}function x(S){const I=this.stack.pop();I.value+=this.sliceSerialize(S),I.position.end=fn(S.end)}function P(S){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const W=I.children[I.children.length-1];W.position.end=fn(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(H.call(this,S),x.call(this,S))}function B(){this.data.atHardBreak=!0}function Q(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function L(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function v(){const S=this.resume(),I=this.stack[this.stack.length-1];I.value=S}function Y(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=I,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function se(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=I,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function Z(S){const I=this.sliceSerialize(S),W=this.stack[this.stack.length-2];W.label=$c(I),W.identifier=Ve(I).toLowerCase()}function pe(){const S=this.stack[this.stack.length-1],I=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){const te=S.children;W.children=te}else W.alt=I}function h(){const S=this.resume(),I=this.stack[this.stack.length-1];I.url=S}function ue(){const S=this.resume(),I=this.stack[this.stack.length-1];I.title=S}function fe(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function Ce(S){const I=this.resume(),W=this.stack[this.stack.length-1];W.label=I,W.identifier=Ve(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function He(S){this.data.characterReferenceType=S.type}function Ee(S){const I=this.sliceSerialize(S),W=this.data.characterReferenceType;let te;W?(te=pa(I,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=kr(I);const le=this.stack[this.stack.length-1];le.value+=te}function Je(S){const I=this.stack.pop();I.position.end=fn(S.end)}function De(S){x.call(this,S);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(S)}function en(S){x.call(this,S);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(S)}function Pe(){return{type:"blockquote",children:[]}}function ln(){return{type:"code",lang:null,meta:null,value:""}}function Ln(){return{type:"inlineCode",value:""}}function Dn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pn(){return{type:"emphasis",children:[]}}function kn(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function nn(){return{type:"html",value:""}}function tn(){return{type:"image",title:null,url:"",alt:null}}function xn(){return{type:"link",title:null,url:"",children:[]}}function Bn(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function At(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function vt(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function rn(){return{type:"text",value:""}}function et(){return{type:"thematicBreak"}}}function fn(e){return{line:e.line,column:e.column,offset:e.offset}}function wa(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?wa(e,r):qc(e,r)}}function qc(e,n){let t;for(t in n)if(xa.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function fi(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Kn({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Kn({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Kn({start:n.start,end:n.end})+") is still open")}function Wc(e){const n=this;n.parser=t;function t(r){return Gc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Vc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Yc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./react-force-graph-2d-ByCzo_0U.js","./index-CeSJJ5Fs.js","./index-RxgFsdXJ.css"])))=>i.map(i=>d[i]);
2
+ import{z as c,G as v,t,W as k,_ as y,$ as I,ac as R,X as A,y as E,N as C,L as p,V as L,B as j}from"./index-CeSJJ5Fs.js";import{P as T,D as _}from"./PinArchiveButtons-B-J_q8fy.js";import{b as D,N as $}from"./NoteRenderer-DZG-A0PR.js";const M=1,S=3,U=1;function B(e,s){const a=new Map,n=new Map;for(const d of s.values())for(const r of d.links??[]){if(r.sourceId===r.targetId||!s.has(r.sourceId)||!s.has(r.targetId))continue;const o=`${r.sourceId}|${r.targetId}|${r.relationship}`;a.has(o)||(a.set(o,{source:r.sourceId,target:r.targetId,relationship:r.relationship}),n.set(r.sourceId,(n.get(r.sourceId)??0)+1),n.set(r.targetId,(n.get(r.targetId)??0)+1))}return{nodes:[...s.values()].map(d=>{var r;return{id:d.id,path:d.path,tags:d.tags,summary:typeof((r=d.metadata)==null?void 0:r.summary)=="string"?d.metadata.summary:void 0,isAnchor:d.id===e,linkCount:n.get(d.id)??0}}),edges:[...a.values()]}}async function P(e,s,a,n){const i=new Map;i.set(e.id,e);let d=[e];for(let r=1;r<=s;r++){const o=new Set;for(const u of d)for(const x of u.links??[]){const h=x.sourceId===u.id?x.targetId:x.sourceId;h!==u.id&&(i.has(h)||o.add(h))}if(o.size===0)break;const l=await Promise.all([...o].map(u=>a(u).catch(()=>null)));if(n!=null&&n.cancelled)return i;const m=[];for(const u of l)u&&!i.has(u.id)&&(i.set(u.id,u),m.push(u));d=m}return i}function V(e,s,a){const[n,i]=c.useState(null),[d,r]=c.useState(!1);return c.useEffect(()=>{if(!e||!s){i(null),r(!1);return}const o={cancelled:!1};return r(!0),P(s,a,l=>e.getNote(l,{includeLinks:!0}),o).then(l=>{o.cancelled||(i(B(s.id,l)),r(!1))}).catch(()=>{o.cancelled||r(!1)}),()=>{o.cancelled=!0}},[e,s,a]),{data:n,isLoading:d}}const F=c.lazy(()=>y(()=>import("./react-force-graph-2d-ByCzo_0U.js"),__vite__mapDeps([0,1,2]),import.meta.url));function z({anchor:e}){const[s,a]=c.useState(!0),[n,i]=c.useState(U),d=v(),{data:r,isLoading:o}=V(d,s?e:void 0,n);return t.jsxs("section",{className:"mt-10 border-t border-border pt-6",children:[t.jsxs("header",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("button",{type:"button",onClick:()=>a(l=>!l),"aria-expanded":s,className:"font-serif text-xl text-fg hover:text-accent",children:[s?"▾":"▸"," Neighborhood"]}),s&&r?t.jsxs("span",{className:"text-xs text-fg-dim",children:[r.nodes.length," ",r.nodes.length===1?"note":"notes"]}):null]}),s?t.jsx(G,{depth:n,onChange:i}):null]}),s?t.jsx(O,{data:r,isLoading:o}):null]})}function G({depth:e,onChange:s}){const a=[];for(let n=M;n<=S;n++)a.push(n);return t.jsxs("fieldset",{className:"flex items-center gap-1 text-xs text-fg-dim",children:[t.jsx("legend",{className:"mr-1 inline-block",children:"Hops"}),a.map(n=>t.jsx("button",{type:"button","aria-pressed":n===e,onClick:()=>s(n),className:n===e?"rounded border border-accent bg-accent/10 px-2 py-0.5 text-accent":"rounded border border-border bg-card px-2 py-0.5 hover:text-accent",children:n},n))]})}function O({data:e,isLoading:s}){return!e&&s?t.jsx(w,{}):e?e.nodes.length<=1?t.jsx("div",{className:"rounded-md border border-border bg-card p-6 text-center text-sm text-fg-dim",children:"This note has no neighbors yet."}):t.jsx(H,{data:e}):null}function w(){return t.jsx("div",{"aria-busy":"true",className:"h-[24rem] w-full animate-pulse rounded-md border border-border bg-card"})}function H({data:e}){const s=k(),a=c.useRef(null),[n,i]=c.useState({w:600,h:384});c.useEffect(()=>{const r=a.current;if(!r)return;const o=()=>{const m=r.getBoundingClientRect();i({w:Math.max(320,Math.floor(m.width)),h:384})};o();const l=new ResizeObserver(o);return l.observe(r),()=>l.disconnect()},[]);const d=c.useMemo(()=>({nodes:e.nodes.map(r=>({...r})),links:e.edges.map(r=>({source:r.source,target:r.target,rel:r.relationship}))}),[e]);return t.jsx("div",{ref:a,"data-testid":"neighborhood-graph-canvas",className:"overflow-hidden rounded-md border border-border bg-card",children:t.jsx(c.Suspense,{fallback:t.jsx(w,{}),children:t.jsx(F,{graphData:d,width:n.w,height:n.h,nodeLabel:r=>W(r),nodeVal:r=>{const o=r;return o.isAnchor?8:3+Math.min(o.linkCount,8)},nodeColor:r=>r.isAnchor?"#c9b170":"#8a9a7a",linkColor:()=>"rgba(160, 160, 160, 0.4)",linkDirectionalArrowLength:3,linkDirectionalArrowRelPos:1,cooldownTicks:80,onNodeClick:r=>{s(`/n/${encodeURIComponent(r.id)}`)}})})})}function W(e){const s=[e.path??e.id];return e.tags&&e.tags.length>0&&s.push(`tags: ${e.tags.join(", ")}`),e.summary&&s.push(e.summary),s.join(`
3
+ `)}const K="_Transcript pending._",X="_Transcription unavailable._";function q({content:e}){const s=e.includes(K),a=!s&&e.includes(X);return s?t.jsxs("output",{"aria-live":"polite",className:"mb-4 inline-flex items-center gap-2 rounded-md border border-sky-500/30 bg-sky-500/5 px-3 py-1.5 text-xs text-sky-300",children:[t.jsx("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 animate-pulse rounded-full bg-sky-400"}),"Transcribing…"]}):a?t.jsx("output",{className:"mb-4 inline-flex items-center gap-2 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-1.5 text-xs text-amber-200",children:"Transcription unavailable — open the audio below and add a note by hand."}):null}function ce(){const{id:e}=I(),s=e?decodeURIComponent(e):void 0,a=R(i=>i.getActiveVault()),n=A(s);return c.useEffect(()=>{a&&s&&E(a.id,s)},[a,s]),a?t.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-6 md:py-10",children:[t.jsx("nav",{className:"mb-6 text-sm text-fg-dim",children:t.jsx(p,{to:"/",className:"hover:text-accent",children:"← All notes"})}),n.isPending?t.jsx(ne,{}):n.isError?t.jsx(oe,{error:n.error}):n.data?t.jsx(J,{note:n.data}):t.jsx(ae,{id:s??""})]}):t.jsx(C,{to:"/",replace:!0})}function J({note:e}){var r;const s=c.useMemo(()=>D(e),[e]),a=e.path??e.id,n=typeof((r=e.metadata)==null?void 0:r.summary)=="string"?e.metadata.summary:null,i=c.useMemo(()=>(e.links??[]).filter(o=>o.targetId===e.id&&o.sourceId!==e.id&&o.sourceNote),[e]),d=c.useMemo(()=>{const o=new Set,l=[];for(const m of e.links??[])m.sourceId!==e.id||m.targetId===e.id||m.targetNote&&(o.has(m.targetId)||(o.add(m.targetId),l.push(m)));return l},[e]);return t.jsxs("article",{className:"grid gap-10 lg:grid-cols-[minmax(0,1fr)_18rem]",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsxs("header",{className:"mb-6 border-b border-border pb-4",children:[t.jsx("h1",{className:"font-serif text-3xl tracking-tight",children:e.path?Q(e.path):e.id}),e.tags&&e.tags.length>0?t.jsx(Z,{tags:e.tags}):null,t.jsx("p",{className:"mt-2 font-mono text-xs text-fg-dim break-all",children:a}),n?t.jsx("p",{className:"mt-3 text-fg-muted",children:n}):null,t.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[t.jsx(p,{to:`/n/${encodeURIComponent(e.id)}/edit`,className:"min-h-11 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg-muted hover:text-accent",children:"Edit"}),t.jsx(T,{note:e,keyboard:!0}),t.jsx(_,{note:e})]})]}),t.jsx(q,{content:e.content??""}),t.jsx($,{note:e,resolve:s}),e.attachments&&e.attachments.length>0?t.jsxs("section",{className:"mt-10 border-t border-border pt-6",children:[t.jsx("h2",{className:"mb-3 font-serif text-xl",children:"Attachments"}),t.jsx("div",{className:"space-y-6",children:e.attachments.map(o=>t.jsx(ee,{attachment:o},o.id))})]}):null,t.jsx(z,{anchor:e})]}),t.jsxs("aside",{className:"space-y-6 text-sm lg:sticky lg:top-24 lg:self-start",children:[t.jsx(Y,{note:e}),d.length>0?t.jsx(N,{title:"Outbound",links:d,peer:"target"}):null,i.length>0?t.jsx(N,{title:"Inbound",links:i,peer:"source"}):null]})]})}function Q(e){return(e.split("/").pop()??e).replace(/\.md$/i,"")}function Y({note:e}){const s=e.createdAt,a=e.updatedAt,n=Object.entries(e.metadata??{}).filter(([i])=>i!=="summary");return t.jsxs("section",{className:"rounded-md border border-border bg-card p-4",children:[t.jsx("h2",{className:"mb-2 text-xs uppercase tracking-wider text-fg-dim",children:"Metadata"}),t.jsxs("dl",{className:"space-y-1.5 text-sm",children:[e.path?t.jsx(f,{label:"Title",value:t.jsx("span",{className:"font-mono text-xs break-all",children:e.path})}):null,t.jsx(f,{label:"ID",value:t.jsx("span",{className:"font-mono text-xs break-all",children:e.id})}),t.jsx(f,{label:"Created",value:t.jsx("time",{title:s,children:j(s)})}),a?t.jsx(f,{label:"Updated",value:t.jsx("time",{title:a,children:j(a)})}):null,n.map(([i,d])=>t.jsx(f,{label:i,value:t.jsx("span",{className:"break-all text-fg-muted",children:String(d)})},i))]})]})}function f({label:e,value:s}){return t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("dt",{className:"text-xs uppercase tracking-wider text-fg-dim",children:e}),t.jsx("dd",{children:s})]})}function Z({tags:e}){return t.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5","aria-label":"Tags",children:e.map(s=>t.jsxs(p,{to:`/?tag=${encodeURIComponent(s)}`,className:"max-w-full break-all rounded-full border border-accent/40 bg-accent/10 px-2.5 py-0.5 text-xs font-medium text-accent hover:border-accent hover:bg-accent/20",children:["#",s]},s))})}function N({title:e,links:s,peer:a}){return t.jsxs("section",{className:"rounded-md border border-border bg-card p-4",children:[t.jsxs("h2",{className:"mb-2 text-xs uppercase tracking-wider text-fg-dim",children:[e," (",s.length,")"]}),t.jsx("ul",{className:"space-y-1.5",children:s.map(n=>{var o;const i=a==="source"?n.sourceNote:n.targetNote;if(!i)return null;const d=i.path??i.id,r=typeof((o=i.metadata)==null?void 0:o.summary)=="string"?i.metadata.summary:null;return t.jsx("li",{children:t.jsxs(p,{to:`/n/${encodeURIComponent(i.id)}`,className:"block rounded px-1 py-0.5 hover:bg-bg/50",children:[t.jsx("div",{className:"truncate font-mono text-xs text-fg-muted hover:text-accent",children:d}),r?t.jsx("div",{className:"mt-0.5 line-clamp-2 text-xs text-fg-dim",children:r}):null]})},`${n.sourceId}->${n.targetId}:${n.relationship}`)})})]})}function ee({attachment:e}){const s=(e.mimeType??"").toLowerCase(),a=e.filename??e.id;return t.jsxs("figure",{className:"rounded-md border border-border bg-card p-3",children:[t.jsxs("figcaption",{className:"mb-2 flex items-baseline justify-between gap-3",children:[t.jsx("span",{className:"truncate font-mono text-xs text-fg-muted",children:a}),typeof e.size=="number"?t.jsx("span",{className:"shrink-0 text-xs text-fg-dim",children:re(e.size)}):null]}),t.jsx(te,{attachment:e,mime:s,filename:a})]})}function te({attachment:e,mime:s,filename:a}){const n=v(),[i,d]=c.useState(null),[r,o]=c.useState(null),l=se(s,a),m=l!=="other",u=e.url;if(c.useEffect(()=>{if(!m||!u||!n)return;let h=!1,b=null;return o(null),n.fetchAttachmentBlob(u).then(g=>{h||(b=URL.createObjectURL(g),d(b))}).catch(g=>{h||o(g instanceof Error?g.message:"Failed to load attachment")}),()=>{h=!0,b&&URL.revokeObjectURL(b)}},[m,u,n]),!u)return t.jsx("p",{className:"text-sm text-fg-dim",children:"(no URL)"});if(r)return t.jsx("p",{className:"text-sm text-red-400",children:r});if(m&&!i)return t.jsx("div",{className:"h-32 animate-pulse rounded bg-border/40","aria-busy":"true"});const x=i??u;return l==="image"?t.jsx("img",{src:x,alt:a,className:"max-h-[32rem] rounded"}):l==="audio"?t.jsx("audio",{controls:!0,src:x,className:"w-full"}):l==="video"?t.jsx("video",{controls:!0,src:x,className:"w-full rounded"}):l==="pdf"?t.jsxs(t.Fragment,{children:[t.jsx("iframe",{src:x,title:a,className:"h-[40rem] w-full rounded border border-border"}),t.jsxs("a",{href:x,download:a,className:"mt-2 inline-block text-sm text-accent hover:underline",children:["Download ",a]})]}):t.jsxs("a",{href:x,download:a,className:"text-sm text-accent hover:underline",children:["Download ",a]})}function se(e,s){if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e==="application/pdf")return"pdf";const a=s.toLowerCase().split(".").pop()??"";return["png","jpg","jpeg","gif","webp","svg"].includes(a)?"image":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":["mp4","webm","mov"].includes(a)?"video":a==="pdf"?"pdf":"other"}function re(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function ne(){return t.jsxs("div",{className:"grid gap-10 lg:grid-cols-[minmax(0,1fr)_18rem]","aria-busy":"true",children:[t.jsxs("div",{className:"min-w-0 space-y-3",children:[t.jsx("div",{className:"h-3 w-32 animate-pulse rounded bg-border/40"}),t.jsx("div",{className:"h-8 w-2/3 animate-pulse rounded bg-border/60"}),t.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-border/30"}),t.jsx("div",{className:"mt-6 space-y-2",children:[0,1,2,3,4,5].map(e=>t.jsx("div",{className:"h-3 animate-pulse rounded bg-border/30",style:{width:`${70+e*13%25}%`}},e))})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"h-32 animate-pulse rounded bg-border/30"}),t.jsx("div",{className:"h-24 animate-pulse rounded bg-border/30"})]})]})}function ae({id:e}){return t.jsxs("div",{className:"rounded-md border border-border bg-card p-10 text-center",children:[t.jsx("p",{className:"mb-2 font-serif text-xl",children:"Note not found"}),t.jsxs("p",{className:"mb-4 text-sm text-fg-muted",children:["No note with id ",t.jsx("span",{className:"font-mono",children:e})," in this vault."]}),t.jsx(p,{to:"/",className:"text-sm text-accent hover:underline",children:"Back to all notes"})]})}function oe({error:e}){const s=e instanceof L;return t.jsxs("div",{className:"rounded-md border border-red-500/30 bg-red-500/5 p-6",children:[t.jsx("p",{className:"mb-2 font-medium text-red-400",children:s?"Session expired":"Could not load note"}),t.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:e.message}),s?t.jsx(p,{to:"/add",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Reconnect vault"}):null]})}export{ce as NoteView};
@@ -0,0 +1 @@
1
+ import{a5 as y,W as j,ac as N,z as l,n as w,E,C as V,J as C,b as S,t as e}from"./index-CeSJJ5Fs.js";function R(){const[a]=y(),s=j(),d=N(c=>c.addVault),[n,o]=l.useState({kind:"working"}),u=l.useRef(!1);return l.useEffect(()=>{if(u.current)return;u.current=!0;const c=a.get("code"),p=a.get("state"),x=a.get("error");if(x){o({kind:"error",message:`Vault returned: ${x}`});return}if(!c||!p){o({kind:"error",message:"Missing code or state in callback URL."});return}(async()=>{var m,h,g,v;try{const{pending:t,token:r}=await w(c,p),f=r.vault?`vault:${r.vault}`:void 0,k=(f?(h=(m=r.services)==null?void 0:m[f])==null?void 0:h.url:void 0)??((v=(g=r.services)==null?void 0:g.vault)==null?void 0:v.url)??t.issuerUrl,i=d({url:k,name:r.vault??t.issuer,issuer:t.issuer,tokenEndpoint:t.tokenEndpoint,clientId:t.clientId,scope:r.scope},E(r));r.services&&V(i,r.services);const b=C.getState();b.clearHalt(i),t.priorHaltedVaultId&&t.priorHaltedVaultId!==i&&b.clearHalt(t.priorHaltedVaultId),s("/",{replace:!0})}catch(t){if(t instanceof S){o({kind:"pending-approval",approveUrl:t.approveUrl});return}o({kind:"error",message:t.message})}})()},[a,s,d]),n.kind==="working"?e.jsxs("div",{className:"mx-auto max-w-xl px-6 py-24 text-center",children:[e.jsx("h1",{className:"mb-3 font-serif text-3xl",children:"Connecting…"}),e.jsx("p",{className:"text-fg-muted",children:"Exchanging the authorization code with your vault."})]}):n.kind==="pending-approval"?e.jsxs("div",{className:"mx-auto max-w-xl px-6 py-24 text-center",children:[e.jsx("h1",{className:"mb-3 font-serif text-3xl",children:"Waiting for hub approval"}),e.jsx("p",{className:"mb-8 text-fg-muted",children:"Your hub admin needs to approve this app before sign-in can complete. Open the approval page in your hub, approve, then try again."}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.jsx("a",{href:n.approveUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm text-white hover:bg-accent-hover",children:"Open approval page"}),e.jsx("button",{type:"button",onClick:()=>s("/add",{replace:!0}),className:"inline-block rounded-md border border-border bg-card px-4 py-2 text-sm text-fg-muted hover:text-accent",children:"Retry now"})]})]}):e.jsxs("div",{className:"mx-auto max-w-xl px-6 py-24 text-center",children:[e.jsx("h1",{className:"mb-3 font-serif text-3xl text-red-400",children:"Connection failed"}),e.jsx("p",{className:"mb-8 text-fg-muted",children:n.message}),e.jsx("button",{type:"button",onClick:()=>s("/add",{replace:!0}),className:"rounded-md bg-accent px-4 py-2 text-sm text-white hover:bg-accent-hover",children:"Try again"})]})}export{R as OAuthCallback};
@@ -0,0 +1 @@
1
+ import{z as c,t,W as v,a9 as g,O as w,V as y,ac as j,a7 as E,aa as N}from"./index-CeSJJ5Fs.js";function P({note:a,className:i,label:l="Delete"}){const[r,d]=c.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>d(!0),className:i??"min-h-11 rounded-md border border-red-500/40 bg-transparent px-3 py-1.5 text-sm text-red-400 hover:bg-red-500/10",title:"Delete this note",children:l}),r?t.jsx(k,{note:a,onClose:()=>d(!1)}):null]})}function k({note:a,onClose:i}){const l=v(),r=g(e=>e.push),d=w(),o=a.path??a.id,[m,p]=c.useState(""),[u,b]=c.useState(null),x=c.useRef(null),s=m===o&&!d.isPending;c.useEffect(()=>{var e;(e=x.current)==null||e.focus()},[]),c.useEffect(()=>{const e=f=>{f.key==="Escape"&&i()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[i]);const n=c.useCallback(()=>{s&&(b(null),d.mutate(a.id,{onSuccess:()=>{r(`Deleted ${o}`,"success"),l("/")},onError:e=>{e instanceof y?b("Session expired. Reconnect to delete."):b(e instanceof Error?e.message:"Delete failed")}}))},[s,o,d,l,a.id,r]);return t.jsx("dialog",{open:!0,"aria-labelledby":"confirm-delete-title",className:"fixed inset-0 z-40 m-0 flex h-full max-h-full w-full max-w-full items-center justify-center bg-black/60 p-4",onMouseDown:e=>{e.target===e.currentTarget&&i()},children:t.jsxs("div",{className:"w-full max-w-md rounded-md border border-border bg-card p-6 shadow-xl",children:[t.jsx("h2",{id:"confirm-delete-title",className:"mb-2 font-serif text-xl text-red-400",children:"Delete this note?"}),t.jsx("p",{className:"mb-3 text-sm text-fg-muted",children:"This permanently removes the note, its tags, and its links. This cannot be undone."}),t.jsxs("p",{className:"mb-3 text-sm text-fg-muted",children:["Type"," ",t.jsx("span",{className:"rounded bg-bg/60 px-1 py-0.5 font-mono text-xs text-fg",children:o})," ","to confirm:"]}),t.jsx("input",{ref:x,type:"text",value:m,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key==="Enter"&&s&&n()},"aria-label":"Type note path to confirm",className:"mb-3 w-full rounded-md border border-border bg-bg/40 px-2.5 py-1.5 font-mono text-sm text-fg focus:border-red-400 focus:outline-none",placeholder:o,autoComplete:"off",spellCheck:!1}),u?t.jsx("p",{role:"alert",className:"mb-3 text-sm text-red-400",children:u}):null,t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{type:"button",onClick:i,className:"min-h-11 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg-muted hover:text-fg",children:"Cancel"}),t.jsx("button",{type:"button",onClick:n,disabled:!s,className:"min-h-11 rounded-md bg-red-500 px-4 py-1.5 text-sm font-medium text-white hover:bg-red-600 disabled:opacity-40",children:d.isPending?"Deleting…":"Delete permanently"})]})]})})}function C({note:a,keyboard:i=!1}){var b,x;const l=j(s=>s.getActiveVault()),{roles:r}=E((l==null?void 0:l.id)??null),d=g(s=>s.push),o=N(a.id),m=((b=a.tags)==null?void 0:b.includes(r.pinned))??!1,p=((x=a.tags)==null?void 0:x.includes(r.archived))??!1,u=c.useCallback(s=>{var f;if(o.isPending)return;const n=r[s],e=((f=a.tags)==null?void 0:f.includes(n))??!1;o.mutate({tags:e?{remove:[n]}:{add:[n]}},{onSuccess:()=>{d(s==="pinned"?e?"Unpinned":"Pinned":e?"Unarchived":"Archived","success")},onError:h=>{h instanceof y?d("Session expired. Reconnect.","error"):d(h instanceof Error?h.message:"Update failed","error")}})},[o,a.tags,d,r]);return c.useEffect(()=>{if(!i)return;const s=n=>{if(n.defaultPrevented)return;const e=n.target;if(e){const f=e.tagName;if(f==="INPUT"||f==="TEXTAREA"||e.isContentEditable)return}n.metaKey||n.ctrlKey||n.altKey||(n.key==="p"||n.key==="P"?(n.preventDefault(),u("pinned")):(n.key==="a"||n.key==="A")&&(n.preventDefault(),u("archived")))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[i,u]),t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>u("pinned"),disabled:o.isPending,"aria-pressed":m,title:m?`Unpin (${r.pinned})`:`Pin as #${r.pinned} (P)`,className:m?"min-h-11 rounded-md border border-accent/60 bg-accent/10 px-3 py-1.5 text-sm text-accent hover:bg-accent/20 disabled:opacity-40":"min-h-11 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg-muted hover:text-accent disabled:opacity-40",children:m?"★ Pinned":"☆ Pin"}),t.jsx("button",{type:"button",onClick:()=>u("archived"),disabled:o.isPending,"aria-pressed":p,title:p?`Unarchive (${r.archived})`:`Archive as #${r.archived} (A)`,className:p?"min-h-11 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-1.5 text-sm text-amber-500 hover:bg-amber-500/20 disabled:opacity-40":"min-h-11 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg-muted hover:text-accent disabled:opacity-40",children:p?"Archived":"Archive"})]})}export{P as D,C as P};
@@ -0,0 +1 @@
1
+ import{ac as k,t as e,N as E,L as S,a3 as b,a4 as A,G as C,a9 as w,z as o,A as R,d as z,F as D,a0 as L,P as _,a7 as P,a8 as V,T as v,D as j,s as O,q as I,ad as F,j as M}from"./index-CeSJJ5Fs.js";function X(){const t=k(s=>s.getActiveVault());return t?e.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-7 md:px-6 md:py-12",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("nav",{className:"mb-3 text-sm text-fg-dim",children:e.jsx(S,{to:"/",className:"hover:text-accent",children:"← Home"})}),e.jsx("h1",{className:"font-serif text-2xl tracking-tight md:text-3xl",children:"Settings"}),e.jsxs("p",{className:"mt-1 text-sm text-fg-muted",children:["Configuring ",e.jsx("span",{className:"text-fg",children:t.name}),"."]})]}),e.jsx(B,{vaultId:t.id}),e.jsx($,{}),e.jsx(q,{}),e.jsx(Y,{vaultId:t.id}),e.jsx(K,{vaultId:t.id}),e.jsx(U,{})]}):e.jsx(E,{to:"/",replace:!0})}function $(){return e.jsxs("section",{className:"mb-8 rounded-md border border-border bg-card p-4",children:[e.jsx("h2",{className:"font-serif text-lg",children:"Import notes"}),e.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:"Bring in an Obsidian vault zip or a folder of markdown files. Parsed in your browser; previewed before any note lands in the vault."}),e.jsx("div",{className:"mt-3",children:e.jsx(S,{to:"/import",className:"inline-block min-h-11 rounded-md bg-accent px-4 py-1.5 text-sm font-medium text-white hover:bg-accent-hover",children:"Open importer"})})]})}function B({vaultId:t}){const s=b(l=>l.byVault[t]??null),r=b(l=>l.refresh),n=b(l=>l.set),h=A(l=>l.clearDismissed),i=C(),d=w(l=>l.push),[x,u]=o.useState(!1),f=async()=>{i&&await r(t,i)},g=async()=>{var l;if(i){u(!0);try{await I(t,i);const m=(l=s==null?void 0:s.result)==null?void 0:l.rows.map(T=>({...T,status:"ok",differences:[]}));m&&n(t,{ok:!0,missing:[],misaligned:[],rows:m}),h(t),d("Schema updated.","success")}catch(m){d(m instanceof Error?`Schema fix failed: ${m.message}`:"Schema fix failed.","error")}finally{u(!1)}}},p=(s==null?void 0:s.loading)??!s,a=(s==null?void 0:s.result)??null,c=(s==null?void 0:s.error)??null;return e.jsxs("section",{className:"mt-6 space-y-4 rounded-xl border border-border bg-card p-6",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-serif text-xl text-fg",children:"Vault schema"}),e.jsxs("p",{className:"mt-1 text-xs text-fg-dim",children:["Notes declares three tags it uses to classify captures: ",e.jsx("code",{children:"capture"}),","," ",e.jsx("code",{children:"capture/text"}),", ",e.jsx("code",{children:"capture/voice"}),". This panel confirms the active vault has them set up; one click writes any missing or misaligned rows. Doesn't touch your Tag Role choices below."]})]}),e.jsx("button",{type:"button",onClick:()=>void f(),disabled:p||!i,className:"shrink-0 text-xs text-fg-dim hover:text-accent disabled:cursor-not-allowed disabled:opacity-60",children:p?"Checking…":"Refresh"})]}),c?e.jsxs("p",{className:"rounded-md border border-red-500/30 bg-red-500/5 px-3 py-2 text-xs text-red-300",children:["Audit failed: ",c]}):null,!a&&!c?e.jsx("p",{className:"text-xs text-fg-dim",children:"Loading audit…"}):null,a?e.jsxs(e.Fragment,{children:[e.jsx(H,{ok:a.ok}),e.jsx("ul",{className:"space-y-2",children:a.rows.map(l=>e.jsx(G,{row:l},l.name))}),a.ok?null:e.jsx("button",{type:"button",onClick:()=>void g(),disabled:x||!i,className:"min-h-11 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent-hover disabled:cursor-not-allowed disabled:opacity-60",children:x?"Setting up…":"Set up missing tags"})]}):null]})}function H({ok:t}){return e.jsxs("p",{className:`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${t?"bg-emerald-500/20 text-emerald-300":"bg-amber-500/20 text-amber-300"}`,children:[e.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${t?"bg-emerald-400":"bg-amber-400"}`}),t?"Matches Notes' schema":"Needs setup"]})}function G({row:t}){const s=t.status==="ok"?"ok":t.status==="missing"?"missing":"misaligned",r=t.status==="ok"?"text-emerald-300":"text-amber-300";return e.jsxs("li",{className:"rounded-md border border-border bg-bg/40 px-3 py-2 text-xs",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("code",{className:"font-mono text-sm text-fg",children:t.name}),e.jsx("span",{className:`text-xs ${r}`,children:s})]}),t.status==="misaligned"?e.jsxs("p",{className:"mt-1 text-fg-dim",children:["Differs in: ",t.differences.join(", ")]}):null,e.jsx("p",{className:"mt-1 text-fg-dim",children:t.expected.description}),t.expected.parent_names?e.jsxs("p",{className:"text-fg-dim",children:["Parent: ",e.jsx("code",{className:"font-mono",children:t.expected.parent_names.join(", ")})]}):null]})}function q(){const[t,s]=o.useState(()=>R()),r=n=>{s(n),F(n),M(n)};return e.jsxs("section",{className:"mt-6 space-y-4 rounded-xl border border-border bg-card p-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-serif text-xl text-fg",children:"Text size"}),e.jsx("p",{className:"mt-1 text-xs text-fg-dim",children:"Affects the editor and rendered notes on this device. Your markdown isn't changed."})]}),e.jsxs("fieldset",{className:"space-y-2",children:[e.jsx("legend",{className:"sr-only",children:"View text size"}),z.map(n=>e.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[e.jsx("input",{type:"radio",name:"text-size",value:n,checked:t===n,onChange:()=>r(n),className:"mt-1 accent-accent"}),e.jsx("span",{className:"text-fg",children:D(n)})]},n))]})]})}function U(){const[t,s]=o.useState(!1);return o.useEffect(()=>{s(O())},[]),t?e.jsx("section",{className:"mt-6 rounded-md border border-border bg-card p-4 text-sm",children:e.jsxs("p",{className:"text-fg-muted",children:[e.jsx("span",{className:"mr-2 inline-block rounded-full bg-emerald-500/20 px-2 py-0.5 text-xs font-medium text-emerald-300",children:"Installed"}),"Parachute Notes is running as an installed app on this device."]})}):null}const y={auto:{title:"Auto",help:"Show the tree only when the vault has enough folders to make it worth the space."},always:{title:"Always",help:"Always show the tree, even on a tag-flat vault."},never:{title:"Never",help:"Hide the tree. The path-prefix text input still works."}};function Y({vaultId:t}){const{mode:s,setMode:r}=L(t);return e.jsxs("section",{className:"mt-6 space-y-4 rounded-xl border border-border bg-card p-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-serif text-xl text-fg",children:"Folder tree (Notes sidebar)"}),e.jsx("p",{className:"mt-1 text-xs text-fg-dim",children:"Controls the collapsible folder tree on the notes list page. Auto-detect renders the tree when the vault has at least five top-level folders or twenty notes in folders."})]}),e.jsxs("fieldset",{className:"space-y-2",children:[e.jsx("legend",{className:"sr-only",children:"Path tree visibility"}),_.map(n=>e.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[e.jsx("input",{type:"radio",name:"path-tree-mode",value:n,checked:s===n,onChange:()=>r(n),className:"mt-1 accent-accent"}),e.jsxs("span",{children:[e.jsx("span",{className:"text-fg",children:y[n].title}),e.jsx("span",{className:"ml-2 text-xs text-fg-dim",children:y[n].help})]})]},n))]})]})}const N={pinned:{title:"Pinned",help:"Tag for notes you want at the top of views."},archived:{title:"Archived",help:"Tag for notes you've moved out of the way."},captureVoice:{title:"Voice capture",help:"Default tag for new voice memos."},captureText:{title:"Text capture",help:"Default tag for quick typed notes."},view:{title:"Saved view",help:"Tag the saved-view notes carry. Used to list them in the notes sidebar."}};function K({vaultId:t}){const{roles:s,setRoles:r}=P(t),n=V(),h=w(a=>a.push),i=o.useId(),[d,x]=o.useState(s);o.useEffect(()=>x(s),[s]);const u=o.useMemo(()=>{const a=(n.data??[]).map(c=>c.name);return[...new Set(a)].sort((c,l)=>c.localeCompare(l))},[n.data]),f=v.some(a=>d[a].trim()!==s[a]),g=()=>{r(d),h("Tag roles saved.","success")},p=()=>{r(null),x(j),h("Tag roles reset to defaults.","success")};return e.jsxs("section",{className:"mt-6 space-y-4 rounded-xl border border-border bg-card p-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-serif text-xl text-fg",children:"Tag roles"}),e.jsx("p",{className:"mt-1 text-xs text-fg-dim",children:"Point each role at whatever tag your vault already uses. Changes apply to future notes only — existing notes keep their current tags."})]}),e.jsx("datalist",{id:i,children:u.map(a=>e.jsx("option",{value:a},a))}),e.jsx("div",{className:"space-y-3",children:v.map(a=>e.jsxs("label",{className:"block text-sm",children:[e.jsxs("span",{className:"mb-1 flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-fg-muted",children:N[a].title}),e.jsxs("span",{className:"text-xs text-fg-dim",children:["default: #",j[a]]})]}),e.jsx("input",{type:"text",value:d[a],onChange:c=>x(l=>({...l,[a]:c.target.value})),list:i,placeholder:j[a],"aria-label":`${N[a].title} tag role`,spellCheck:!1,autoCapitalize:"none",autoCorrect:"off",className:"w-full rounded-md border border-border bg-bg px-3 py-2 text-sm text-fg placeholder:text-fg-dim focus:border-accent focus:outline-none"}),e.jsx("span",{className:"mt-1 block text-xs text-fg-dim",children:N[a].help})]},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:g,disabled:!f,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover disabled:opacity-40",children:"Save"}),e.jsx("button",{type:"button",onClick:p,className:"text-sm text-fg-muted hover:text-accent",children:"Reset to defaults"})]})]})}export{X as Settings};
@@ -0,0 +1 @@
1
+ import{a9 as P,z as l,h as O,V as R,t as e,ac as L,a8 as z,a6 as F,a1 as I,a2 as V,U as D,N as U,L as E}from"./index-CeSJJ5Fs.js";const $=a=>Object.values(a).reduce((n,x)=>n+x,0);function A({mode:a,sources:n,tagOptions:x,onClose:c,onRun:d,onRunMerge:o,pending:i,offline:m}){const p=P(t=>t.push),g=l.useId(),[S,j]=l.useState(a==="rename"?n[0]??"":""),[T,h]=l.useState(null),[u,y]=l.useState(null),[b,N]=l.useState(!1),v=l.useRef(null);l.useEffect(()=>{var t,r;(t=v.current)==null||t.focus(),(r=v.current)==null||r.select()},[]),l.useEffect(()=>{const t=r=>{r.key==="Escape"&&c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[c]);const w=S.trim().replace(/^#/,""),f=!i&&!m&&!b&&w.length>0&&!(a==="rename"&&w===n[0]),C=l.useCallback(async()=>{if(f){h(null),y(null);try{const t=await d(w);if("renamed"in t)p(`Renamed on ${t.renamed} note${t.renamed===1?"":"s"}.`,"success");else{const r=$(t.merged);p(`Merged into #${t.target} on ${r} note${r===1?"":"s"}.`,"success")}c()}catch(t){if(t instanceof O&&a==="rename"&&o){y(t.target);return}t instanceof R?h("Session expired. Reconnect to retry."):h(t instanceof Error?t.message:"Operation failed.")}}},[f,w,a,c,d,o,p]),k=l.useCallback(async()=>{if(!(!u||!o)){h(null),N(!0);try{const t=await o(u),r=$(t.merged);p(`Merged into #${t.target} on ${r} note${r===1?"":"s"}.`,"success"),c()}catch(t){t instanceof R?h("Session expired. Reconnect to retry."):h(t instanceof Error?t.message:"Merge failed."),N(!1)}}},[u,c,o,p]),s=a==="rename"?"Rename tag":`Merge ${n.length} tags`;return e.jsx("dialog",{open:!0,"aria-labelledby":"tag-op-title",className:"fixed inset-0 z-40 m-0 flex h-full max-h-full w-full max-w-full items-center justify-center bg-black/60 p-4",onMouseDown:t=>{t.target===t.currentTarget&&c()},children:e.jsxs("div",{className:"w-full max-w-md rounded-md border border-border bg-card p-6 shadow-xl",children:[e.jsx("h2",{id:"tag-op-title",className:"mb-2 font-serif text-xl text-fg",children:s}),e.jsxs("p",{className:"mb-3 text-sm text-fg-muted",children:[a==="rename"?e.jsxs(e.Fragment,{children:["Rename ",e.jsx(M,{children:n[0]})," on every note that carries it. Notes that already have the new tag will end up with one copy."]}):e.jsxs(e.Fragment,{children:["Combine"," ",n.map((t,r)=>e.jsxs("span",{children:[e.jsx(M,{children:t}),r<n.length-1?", ":""]},t))," ","into one tag. The originals are removed."]})," ","Changes apply atomically on the vault."]}),e.jsxs("label",{className:"mb-3 block text-sm",children:[e.jsx("span",{className:"mb-1 block text-fg-muted",children:a==="rename"?"New tag name":"Target tag"}),e.jsx("input",{ref:v,type:"text",value:S,onChange:t=>{j(t.target.value),u&&y(null)},onKeyDown:t=>{t.key==="Enter"&&f&&C()},list:g,"aria-label":a==="rename"?"New tag name":"Merge target tag",spellCheck:!1,autoCapitalize:"none",autoCorrect:"off",className:"w-full rounded-md border border-border bg-bg/40 px-2.5 py-1.5 font-mono text-sm text-fg focus:border-accent focus:outline-none",autoComplete:"off"}),e.jsx("datalist",{id:g,children:x.map(t=>e.jsx("option",{value:t},t))})]}),m?e.jsx("p",{className:"mb-3 text-sm text-amber-300",children:"Offline — tag operations need a live vault connection."}):null,u?e.jsxs("div",{role:"alert",className:"mb-3 rounded-md border border-amber-500/40 bg-amber-500/5 p-3 text-sm",children:[e.jsxs("p",{className:"mb-2 text-amber-300",children:["A tag named ",e.jsx(M,{children:u})," already exists."]}),e.jsxs("p",{className:"mb-3 text-fg-muted",children:["Merge ",e.jsx(M,{children:n[0]})," into ",e.jsx(M,{children:u})," instead? Notes that carry both end up with one copy."]}),e.jsx("button",{type:"button",onClick:()=>void k(),disabled:b,className:"rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent-hover disabled:opacity-40",children:b?"Merging…":`Merge into #${u}`})]}):null,T?e.jsx("p",{role:"alert",className:"mb-3 text-sm text-red-400",children:T}):null,e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:c,className:"min-h-11 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg-muted hover:text-fg",children:"Cancel"}),e.jsx("button",{type:"button",onClick:()=>void C(),disabled:!f,className:"min-h-11 rounded-md bg-accent px-4 py-1.5 text-sm font-medium text-white hover:bg-accent-hover disabled:opacity-40",children:i?a==="rename"?"Renaming…":"Merging…":a==="rename"?"Rename":"Merge"})]})]})})}function M({children:a}){return e.jsxs("span",{className:"rounded bg-bg/60 px-1 py-0.5 font-mono text-xs text-fg",children:["#",a]})}function J(){const a=L(s=>s.getActiveVault()),n=z(),{isOnline:x}=F(),{isPinned:c,togglePin:d}=I((a==null?void 0:a.id)??null),[o,i]=l.useState(""),[m,p]=l.useState("count"),[g,S]=l.useState(new Set),[j,T]=l.useState(null),[h,u]=l.useState(!1),y=V(),b=D(),N=l.useMemo(()=>K(n.data??[],o,m),[n.data,o,m]),v=l.useMemo(()=>(n.data??[]).map(s=>s.name),[n.data]),w=s=>{S(t=>{const r=new Set(t);return r.has(s)?r.delete(s):r.add(s),r})},f=()=>S(new Set);if(!a)return e.jsx(U,{to:"/",replace:!0});const C=g.size,k=!x;return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-6 md:py-10",children:[e.jsxs("header",{className:"mb-5 flex flex-wrap items-baseline justify-between gap-x-4 gap-y-3 md:mb-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-fg-dim",children:a.name}),e.jsx("h1",{className:"font-serif text-2xl tracking-tight md:text-3xl",children:"Tags"})]}),e.jsxs("button",{type:"button",onClick:()=>p(s=>s==="count"?"alpha":"count"),className:"text-sm text-fg-muted hover:text-accent","aria-label":"Toggle tag sort",children:["Sort: ",m==="count"?"most used":"A–Z"]})]}),e.jsx("input",{type:"search",placeholder:"Filter tags…",value:o,onChange:s=>i(s.target.value),"aria-label":"Filter tags",className:"mb-4 w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-fg focus:border-accent focus:outline-none"}),C>0?e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3 rounded-md border border-accent/30 bg-accent/5 px-3 py-2 text-sm","aria-label":"Tag selection actions",children:[e.jsxs("span",{className:"text-fg-muted",children:[C," selected: ",Array.from(g).join(", ")]}),e.jsx("button",{type:"button",onClick:()=>u(!0),disabled:C<2||k,className:"rounded-md bg-accent px-3 py-1 text-xs font-medium text-white hover:bg-accent-hover disabled:opacity-40",children:"Merge into…"}),e.jsx("button",{type:"button",onClick:f,className:"text-xs text-fg-muted hover:text-accent",children:"Clear"})]}):null,n.isPending?e.jsx(Z,{}):n.isError?e.jsx(q,{error:n.error}):N.length===0?e.jsx(G,{filtering:o.trim().length>0,hasAny:(n.data??[]).length>0}):e.jsx("ul",{className:"divide-y divide-border rounded-md border border-border bg-card","aria-label":"Tag list",children:N.map(s=>e.jsx(B,{tag:s,selected:g.has(s.name),onToggle:()=>w(s.name),onRename:()=>T(s.name),pinned:c(s.name),onTogglePin:()=>d(s.name),offline:k},s.name))}),n.data&&n.data.length>0?e.jsxs("p",{className:"mt-6 text-xs text-fg-dim",children:[N.length," / ",n.data.length," tag",n.data.length===1?"":"s"]}):null,j!==null?e.jsx(A,{mode:"rename",sources:[j],tagOptions:v,onClose:()=>T(null),pending:y.isPending||b.isPending,offline:k,onRun:s=>y.mutateAsync({oldName:j,newName:s}),onRunMerge:s=>b.mutateAsync({sources:[j],target:s})}):null,h?e.jsx(A,{mode:"merge",sources:Array.from(g),tagOptions:v,onClose:()=>u(!1),pending:b.isPending,offline:k,onRun:async s=>{const t=await b.mutateAsync({sources:Array.from(g),target:s});return f(),t}}):null]})}function B({tag:a,selected:n,onToggle:x,onRename:c,pinned:d,onTogglePin:o,offline:i}){return e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:x,"aria-label":`Select tag ${a.name}`,className:"accent-accent"}),e.jsxs(E,{to:`/?tag=${encodeURIComponent(a.name)}`,className:"flex flex-1 items-baseline gap-2 text-fg hover:text-accent focus-visible:outline-2 focus-visible:outline-accent",children:[e.jsxs("span",{className:"font-mono",children:["#",a.name]}),e.jsx("span",{className:"text-xs text-fg-dim",children:a.count})]}),e.jsx("button",{type:"button",onClick:o,className:d?"text-xs font-medium text-accent hover:text-accent-hover":"text-xs text-fg-muted hover:text-accent","aria-label":d?`Unpin tag ${a.name}`:`Pin tag ${a.name}`,"aria-pressed":d,title:d?"Pinned to home strip — click to unpin":"Pin to home strip",children:d?"★ Pinned":"☆ Pin"}),e.jsx("button",{type:"button",onClick:c,disabled:i,className:"text-xs text-fg-muted hover:text-accent disabled:opacity-40","aria-label":`Rename tag ${a.name}`,children:"Rename"})]})}function K(a,n,x){const c=n.trim().toLowerCase(),o=[...c?a.filter(i=>i.name.toLowerCase().includes(c)):a];return x==="alpha"?o.sort((i,m)=>i.name.localeCompare(m.name)):o.sort((i,m)=>m.count-i.count||i.name.localeCompare(m.name)),o}function Z(){return e.jsx("div",{className:"divide-y divide-border rounded-md border border-border bg-card","aria-busy":"true",children:[0,1,2,3,4].map(a=>e.jsx("div",{className:"h-10 animate-pulse bg-card/60"},a))})}function q({error:a}){const n=a instanceof R;return e.jsxs("div",{className:"rounded-md border border-red-500/30 bg-red-500/5 p-6",children:[e.jsx("p",{className:"mb-2 font-medium text-red-400",children:n?"Session expired":"Could not load tags"}),e.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:a.message}),n?e.jsx(E,{to:"/add",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Reconnect vault"}):null]})}function G({filtering:a,hasAny:n}){return a&&n?e.jsx("div",{className:"rounded-md border border-border bg-card p-10 text-center",children:e.jsx("p",{className:"text-fg-muted",children:"No tags match your filter."})}):e.jsxs("div",{className:"rounded-md border border-border bg-card p-10 text-center",children:[e.jsx("p",{className:"mb-3 text-fg-muted",children:"No tags in this vault yet."}),e.jsx(E,{to:"/new",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Create a note"})]})}export{J as Tags};
@@ -1 +1 @@
1
- import{aa as w,a3 as $,W as A,x as D,r as e,N as E,L as d,z as C,V as S}from"./index-BUHugAd8.js";import{e as V,b as N,t as g,f as K,p as f}from"./dates-BGZoWpL2.js";function F(){const a=w(i=>i.getActiveVault()),[s]=$(),t=s.get("date"),u=V(),r=t??u,x=N(r),n=A(),c=D.useMemo(()=>{const i=[],m=[];if(!n.data||!x)return{created:i,edited:m};for(const l of n.data){const b=g(l.createdAt),k=g(l.updatedAt??l.createdAt);b===r&&i.push(l),k===r&&b!==r&&m.push(l)}return{created:i,edited:m}},[n.data,x,r]);if(!a)return e.jsx(E,{to:"/",replace:!0});if(!x)return e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6 md:py-10",children:[e.jsxs("p",{className:"text-sm text-red-400",children:["Invalid date in URL: ",r]}),e.jsx(d,{to:"/today",className:"text-sm text-accent hover:underline",children:"Back to today"})]});const o=r===u,p=j(r,-1),h=j(r,1),v=r.slice(0,7);return e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6 md:py-10",children:[e.jsxs("header",{className:"mb-6 flex flex-wrap items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-fg-dim",children:o?"Today":"On"}),e.jsx("h1",{className:"font-serif text-2xl tracking-tight md:text-3xl",children:K(r)})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[e.jsxs(d,{to:`/today?date=${p}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent","aria-label":"Previous day",children:["← ",p]}),o?null:e.jsx(d,{to:"/today",className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent",children:"Today"}),e.jsxs(d,{to:`/today?date=${h}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent","aria-label":"Next day",children:[h," →"]}),e.jsx(d,{to:`/calendar?month=${v}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent",children:"Calendar"}),e.jsx(d,{to:"/capture",className:"rounded-md bg-accent px-3 py-1.5 font-medium text-white hover:bg-accent-hover",children:"+ Capture"})]})]}),n.isPending?e.jsx(L,{}):n.isError?e.jsx(R,{error:n.error}):c.created.length===0&&c.edited.length===0?e.jsx(P,{isToday:o,targetKey:r}):e.jsxs("div",{className:"space-y-8",children:[c.created.length>0?e.jsx(y,{title:o?"Created today":`Created on ${r}`,notes:c.created}):null,c.edited.length>0?e.jsx(y,{title:o?"Edited today":`Edited on ${r}`,notes:c.edited}):null]})]})}function j(a,s){const t=N(a);return t?(t.setDate(t.getDate()+s),`${t.getFullYear()}-${f(t.getMonth()+1)}-${f(t.getDate())}`):a}function y({title:a,notes:s}){return e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-2 text-xs uppercase tracking-wider text-fg-dim",children:[a," (",s.length,")"]}),e.jsx("ol",{className:"divide-y divide-border rounded-md border border-border bg-card",children:s.map(t=>e.jsx("li",{children:e.jsxs(d,{to:`/n/${encodeURIComponent(t.id)}`,className:"block px-4 py-3 hover:bg-bg/60 focus:bg-bg/60 focus:outline-none",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[e.jsx("span",{className:"truncate font-mono text-sm text-fg",children:t.path??t.id}),e.jsx("span",{className:"shrink-0 text-xs text-fg-dim",children:C(t.updatedAt??t.createdAt)})]}),t.preview?e.jsx("p",{className:"mt-1 truncate text-sm text-fg-muted",children:t.preview}):null]})},t.id))})]})}function P({isToday:a,targetKey:s}){return e.jsxs("div",{className:"rounded-md border border-border bg-card p-10 text-center",children:[e.jsx("p",{className:"mb-4 text-fg-muted",children:a?"Nothing yet today — start capturing.":`Nothing on ${s}.`}),a?e.jsx(d,{to:"/capture",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Open capture"}):null]})}function L(){return e.jsx("div",{className:"space-y-3","aria-busy":"true",children:[0,1,2,3].map(a=>e.jsx("div",{className:"h-14 animate-pulse rounded-md bg-border/30"},a))})}function R({error:a}){const s=a instanceof S;return e.jsxs("div",{className:"rounded-md border border-red-500/30 bg-red-500/5 p-6",children:[e.jsx("p",{className:"mb-2 font-medium text-red-400",children:s?"Session expired":"Could not load notes"}),e.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:a.message}),s?e.jsx(d,{to:"/add",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Reconnect vault"}):null]})}export{F as Today};
1
+ import{ac as w,a5 as $,Y as A,z as D,t as e,N as E,L as d,B as C,V as S}from"./index-CeSJJ5Fs.js";import{e as V,b as N,t as g,f as K,p as f}from"./dates-BGZoWpL2.js";function F(){const a=w(i=>i.getActiveVault()),[s]=$(),t=s.get("date"),u=V(),r=t??u,x=N(r),n=A(),c=D.useMemo(()=>{const i=[],m=[];if(!n.data||!x)return{created:i,edited:m};for(const l of n.data){const b=g(l.createdAt),k=g(l.updatedAt??l.createdAt);b===r&&i.push(l),k===r&&b!==r&&m.push(l)}return{created:i,edited:m}},[n.data,x,r]);if(!a)return e.jsx(E,{to:"/",replace:!0});if(!x)return e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6 md:py-10",children:[e.jsxs("p",{className:"text-sm text-red-400",children:["Invalid date in URL: ",r]}),e.jsx(d,{to:"/today",className:"text-sm text-accent hover:underline",children:"Back to today"})]});const o=r===u,p=j(r,-1),h=j(r,1),v=r.slice(0,7);return e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6 md:py-10",children:[e.jsxs("header",{className:"mb-6 flex flex-wrap items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-fg-dim",children:o?"Today":"On"}),e.jsx("h1",{className:"font-serif text-2xl tracking-tight md:text-3xl",children:K(r)})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[e.jsxs(d,{to:`/today?date=${p}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent","aria-label":"Previous day",children:["← ",p]}),o?null:e.jsx(d,{to:"/today",className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent",children:"Today"}),e.jsxs(d,{to:`/today?date=${h}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent","aria-label":"Next day",children:[h," →"]}),e.jsx(d,{to:`/calendar?month=${v}`,className:"rounded-md border border-border bg-card px-3 py-1.5 text-fg-muted hover:text-accent",children:"Calendar"}),e.jsx(d,{to:"/capture",className:"rounded-md bg-accent px-3 py-1.5 font-medium text-white hover:bg-accent-hover",children:"+ Capture"})]})]}),n.isPending?e.jsx(B,{}):n.isError?e.jsx(L,{error:n.error}):c.created.length===0&&c.edited.length===0?e.jsx(P,{isToday:o,targetKey:r}):e.jsxs("div",{className:"space-y-8",children:[c.created.length>0?e.jsx(y,{title:o?"Created today":`Created on ${r}`,notes:c.created}):null,c.edited.length>0?e.jsx(y,{title:o?"Edited today":`Edited on ${r}`,notes:c.edited}):null]})]})}function j(a,s){const t=N(a);return t?(t.setDate(t.getDate()+s),`${t.getFullYear()}-${f(t.getMonth()+1)}-${f(t.getDate())}`):a}function y({title:a,notes:s}){return e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-2 text-xs uppercase tracking-wider text-fg-dim",children:[a," (",s.length,")"]}),e.jsx("ol",{className:"divide-y divide-border rounded-md border border-border bg-card",children:s.map(t=>e.jsx("li",{children:e.jsxs(d,{to:`/n/${encodeURIComponent(t.id)}`,className:"block px-4 py-3 hover:bg-bg/60 focus:bg-bg/60 focus:outline-none",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[e.jsx("span",{className:"truncate font-mono text-sm text-fg",children:t.path??t.id}),e.jsx("span",{className:"shrink-0 text-xs text-fg-dim",children:C(t.updatedAt??t.createdAt)})]}),t.preview?e.jsx("p",{className:"mt-1 truncate text-sm text-fg-muted",children:t.preview}):null]})},t.id))})]})}function P({isToday:a,targetKey:s}){return e.jsxs("div",{className:"rounded-md border border-border bg-card p-10 text-center",children:[e.jsx("p",{className:"mb-4 text-fg-muted",children:a?"Nothing yet today — start capturing.":`Nothing on ${s}.`}),a?e.jsx(d,{to:"/capture",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Open capture"}):null]})}function B(){return e.jsx("div",{className:"space-y-3","aria-busy":"true",children:[0,1,2,3].map(a=>e.jsx("div",{className:"h-14 animate-pulse rounded-md bg-border/30"},a))})}function L({error:a}){const s=a instanceof S;return e.jsxs("div",{className:"rounded-md border border-red-500/30 bg-red-500/5 p-6",children:[e.jsx("p",{className:"mb-2 font-medium text-red-400",children:s?"Session expired":"Could not load notes"}),e.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:a.message}),s?e.jsx(d,{to:"/add",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Reconnect vault"}):null]})}export{F as Today};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./react-force-graph-2d-DQm7mpQp.js","./index-BUHugAd8.js","./index-D_L2igjK.css"])))=>i.map(i=>d[i]);
2
- import{aa as w,F as N,x as f,r as s,N as k,L as v,Q as C,V as I,_ as M}from"./index-BUHugAd8.js";const S={search:"",tags:[]};function T(e){const t=new Map;for(const i of e)t.set(i.id,i);const a=new Map,o=new Map;for(const i of e)for(const n of i.links??[]){if(n.sourceId===n.targetId||!t.has(n.sourceId)||!t.has(n.targetId))continue;const c=`${n.sourceId}|${n.targetId}|${n.relationship}`;a.has(c)||(a.set(c,{source:n.sourceId,target:n.targetId,relationship:n.relationship}),o.set(n.sourceId,(o.get(n.sourceId)??0)+1),o.set(n.targetId,(o.get(n.targetId)??0)+1))}return{nodes:e.map(i=>{var c;const n=i.tags??[];return{id:i.id,path:i.path,title:A(i),tags:n,topTag:n[0],degree:o.get(i.id)??0,summary:typeof((c=i.metadata)==null?void 0:c.summary)=="string"?i.metadata.summary:void 0}}),edges:[...a.values()]}}function A(e){return e.path?(e.path.split("/").pop()??e.path).replace(/\.md$/i,""):e.id}function R(e,t){const a=t.search.trim().toLowerCase();return!(a&&![e.path??"",e.title,e.id].join(" ").toLowerCase().includes(a)||t.tags.length>0&&!t.tags.some(d=>e.tags.includes(d)))}function E(e){const t=new Map;for(const a of e)for(const o of a.tags)t.set(o,(t.get(o)??0)+1);return[...t.entries()].sort((a,o)=>o[1]-a[1]||a[0].localeCompare(o[0])).map(([a])=>a)}function F(e){if(!e)return"#8a9a7a";let t=0;for(let o=0;o<e.length;o++)t=t*31+e.charCodeAt(o)&16777215;return`hsl(${t%360}, 40%, 55%)`}const _=f.lazy(()=>M(()=>import("./react-force-graph-2d-DQm7mpQp.js"),__vite__mapDeps([0,1,2]),import.meta.url)),L=20;function O(){const e=w(c=>c.getActiveVault()),t=N(),[a,o]=f.useState(S),d=f.useMemo(()=>t.data?T(t.data):null,[t.data]),i=f.useMemo(()=>d?E(d.nodes):[],[d]),n=f.useMemo(()=>d?new Set(d.nodes.filter(c=>R(c,a)).map(c=>c.id)):new Set,[d,a]);return e?s.jsxs("div",{className:"flex h-[calc(100dvh-5rem)] flex-col",children:[s.jsx("div",{className:"border-b border-border bg-card/40 px-6 py-3",children:s.jsxs("div",{className:"mx-auto flex max-w-6xl flex-wrap items-center gap-4",children:[s.jsx("input",{type:"search",value:a.search,onChange:c=>o(m=>({...m,search:c.target.value})),placeholder:"Search nodes…","aria-label":"Search graph nodes",className:"min-w-48 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg focus:border-accent focus:outline-none"}),s.jsx($,{allTags:i,selected:a.tags,onChange:c=>o(m=>({...m,tags:c}))}),d?s.jsxs("span",{className:"text-xs text-fg-dim",children:[n.size," / ",d.nodes.length," notes"]}):null]})}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(P,{query:t,graph:d,matched:n})})]}):s.jsx(k,{to:"/",replace:!0})}function P({query:e,graph:t,matched:a}){return e.isPending?s.jsx(y,{message:"Loading vault…"}):e.isError?s.jsx(B,{error:e.error}):!t||t.nodes.length===0?s.jsx("div",{className:"flex h-full items-center justify-center p-10",children:s.jsxs("div",{className:"max-w-sm rounded-md border border-border bg-card p-8 text-center",children:[s.jsx("p",{className:"mb-2 font-serif text-xl",children:"No notes yet"}),s.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:"This vault is empty. Start by creating the first note."}),s.jsx(v,{to:"/new",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Create a note"})]})}):s.jsx(z,{graph:t,matched:a})}function $({allTags:e,selected:t,onChange:a}){const o=e.slice(0,L);if(o.length===0)return null;const d=i=>a(t.includes(i)?t.filter(n=>n!==i):[...t,i]);return s.jsxs("fieldset",{"aria-label":"Filter by tag",className:"flex flex-wrap items-center gap-1 text-xs text-fg-dim",children:[s.jsx("legend",{className:"mr-1 inline-block",children:"Tags"}),o.map(i=>{const n=t.includes(i);return s.jsx("button",{type:"button","aria-pressed":n,onClick:()=>d(i),className:n?"max-w-full break-all rounded-full border border-accent bg-accent/10 px-2 py-0.5 text-accent":"max-w-full break-all rounded-full border border-border bg-card px-2 py-0.5 hover:text-accent",children:i},i)}),t.length>0?s.jsx("button",{type:"button",onClick:()=>a([]),className:"ml-1 text-xs text-fg-dim hover:text-accent",children:"Clear"}):null]})}function y({message:e}){return s.jsx("div",{"aria-busy":"true",className:"flex h-full animate-pulse items-center justify-center bg-card/30 text-sm text-fg-dim",children:e})}function z({graph:e,matched:t}){const a=C(),o=f.useRef(null),d=f.useRef(null),[i,n]=f.useState({w:800,h:600});f.useEffect(()=>{const r=o.current;if(!r)return;const l=()=>{const u=r.getBoundingClientRect();n({w:Math.max(320,Math.floor(u.width)),h:Math.max(320,Math.floor(u.height))})};l();const h=new ResizeObserver(l);return h.observe(r),()=>h.disconnect()},[]);const c=()=>{var r,l;(l=(r=d.current)==null?void 0:r.zoomToFit)==null||l.call(r,400,40)},m=f.useMemo(()=>({nodes:e.nodes.map(r=>({...r})),links:e.edges.map(r=>({source:r.source,target:r.target,rel:r.relationship}))}),[e]),g=t.size!==e.nodes.length,j=r=>!g||t.has(r)?1:.15;return s.jsxs("div",{ref:o,"data-testid":"vault-graph-canvas",className:"relative h-full w-full touch-none",children:[s.jsx(f.Suspense,{fallback:s.jsx(y,{message:"Rendering graph…"}),children:s.jsx(_,{ref:d,graphData:m,width:i.w,height:i.h,backgroundColor:"rgba(0,0,0,0)",nodeLabel:r=>V(r),nodeRelSize:5,nodeVal:r=>2+Math.min(r.degree,12),nodeColor:r=>{const l=r,h=F(l.topTag);return g&&!t.has(l.id)?G(h):h},nodePointerAreaPaint:(r,l,h)=>{const u=r;if(u.x==null||u.y==null)return;const x=2+Math.min(u.degree,12),p=Math.max(Math.sqrt(x)*5,10);h.fillStyle=l,h.beginPath(),h.arc(u.x,u.y,p,0,2*Math.PI),h.fill()},linkColor:r=>{const l=r,h=b(l.source),u=b(l.target);return g&&(!t.has(h)||!t.has(u))?"rgba(160, 160, 160, 0.08)":"rgba(160, 160, 160, 0.35)"},linkDirectionalArrowLength:2.5,linkDirectionalArrowRelPos:1,cooldownTicks:100,onEngineStop:()=>c(),nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(r,l,h)=>{const u=r;if(u.x==null||u.y==null||j(u.id)<.5)return;const p=10/h;l.font=`${p}px sans-serif`,l.fillStyle="rgba(220, 220, 220, 0.8)",l.textAlign="left",l.textBaseline="middle",l.fillText(u.title,u.x+6,u.y)},onNodeClick:r=>{a(`/n/${encodeURIComponent(r.id)}`)}})}),s.jsx("button",{type:"button",onClick:c,className:"absolute right-3 bottom-3 rounded-md border border-border bg-card/90 px-3 py-1.5 text-xs text-fg-muted shadow-sm backdrop-blur hover:text-accent",children:"Fit to screen"})]})}function V(e){const t=[e.path??e.id,`${e.degree} link${e.degree===1?"":"s"}`];return e.tags.length>0&&t.push(`tags: ${e.tags.join(", ")}`),e.summary&&t.push(e.summary),t.join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./react-force-graph-2d-ByCzo_0U.js","./index-CeSJJ5Fs.js","./index-RxgFsdXJ.css"])))=>i.map(i=>d[i]);
2
+ import{ac as w,H as N,z as f,t as s,N as k,L as v,W as C,V as I,_ as M}from"./index-CeSJJ5Fs.js";const S={search:"",tags:[]};function T(e){const t=new Map;for(const i of e)t.set(i.id,i);const a=new Map,o=new Map;for(const i of e)for(const n of i.links??[]){if(n.sourceId===n.targetId||!t.has(n.sourceId)||!t.has(n.targetId))continue;const c=`${n.sourceId}|${n.targetId}|${n.relationship}`;a.has(c)||(a.set(c,{source:n.sourceId,target:n.targetId,relationship:n.relationship}),o.set(n.sourceId,(o.get(n.sourceId)??0)+1),o.set(n.targetId,(o.get(n.targetId)??0)+1))}return{nodes:e.map(i=>{var c;const n=i.tags??[];return{id:i.id,path:i.path,title:A(i),tags:n,topTag:n[0],degree:o.get(i.id)??0,summary:typeof((c=i.metadata)==null?void 0:c.summary)=="string"?i.metadata.summary:void 0}}),edges:[...a.values()]}}function A(e){return e.path?(e.path.split("/").pop()??e.path).replace(/\.md$/i,""):e.id}function R(e,t){const a=t.search.trim().toLowerCase();return!(a&&![e.path??"",e.title,e.id].join(" ").toLowerCase().includes(a)||t.tags.length>0&&!t.tags.some(d=>e.tags.includes(d)))}function E(e){const t=new Map;for(const a of e)for(const o of a.tags)t.set(o,(t.get(o)??0)+1);return[...t.entries()].sort((a,o)=>o[1]-a[1]||a[0].localeCompare(o[0])).map(([a])=>a)}function _(e){if(!e)return"#8a9a7a";let t=0;for(let o=0;o<e.length;o++)t=t*31+e.charCodeAt(o)&16777215;return`hsl(${t%360}, 40%, 55%)`}const z=f.lazy(()=>M(()=>import("./react-force-graph-2d-ByCzo_0U.js"),__vite__mapDeps([0,1,2]),import.meta.url)),F=20;function O(){const e=w(c=>c.getActiveVault()),t=N(),[a,o]=f.useState(S),d=f.useMemo(()=>t.data?T(t.data):null,[t.data]),i=f.useMemo(()=>d?E(d.nodes):[],[d]),n=f.useMemo(()=>d?new Set(d.nodes.filter(c=>R(c,a)).map(c=>c.id)):new Set,[d,a]);return e?s.jsxs("div",{className:"flex h-[calc(100dvh-5rem)] flex-col",children:[s.jsx("div",{className:"border-b border-border bg-card/40 px-6 py-3",children:s.jsxs("div",{className:"mx-auto flex max-w-6xl flex-wrap items-center gap-4",children:[s.jsx("input",{type:"search",value:a.search,onChange:c=>o(m=>({...m,search:c.target.value})),placeholder:"Search nodes…","aria-label":"Search graph nodes",className:"min-w-48 rounded-md border border-border bg-card px-3 py-1.5 text-sm text-fg focus:border-accent focus:outline-none"}),s.jsx(P,{allTags:i,selected:a.tags,onChange:c=>o(m=>({...m,tags:c}))}),d?s.jsxs("span",{className:"text-xs text-fg-dim",children:[n.size," / ",d.nodes.length," notes"]}):null]})}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(L,{query:t,graph:d,matched:n})})]}):s.jsx(k,{to:"/",replace:!0})}function L({query:e,graph:t,matched:a}){return e.isPending?s.jsx(y,{message:"Loading vault…"}):e.isError?s.jsx(B,{error:e.error}):!t||t.nodes.length===0?s.jsx("div",{className:"flex h-full items-center justify-center p-10",children:s.jsxs("div",{className:"max-w-sm rounded-md border border-border bg-card p-8 text-center",children:[s.jsx("p",{className:"mb-2 font-serif text-xl",children:"No notes yet"}),s.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:"This vault is empty. Start by creating the first note."}),s.jsx(v,{to:"/new",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Create a note"})]})}):s.jsx($,{graph:t,matched:a})}function P({allTags:e,selected:t,onChange:a}){const o=e.slice(0,F);if(o.length===0)return null;const d=i=>a(t.includes(i)?t.filter(n=>n!==i):[...t,i]);return s.jsxs("fieldset",{"aria-label":"Filter by tag",className:"flex flex-wrap items-center gap-1 text-xs text-fg-dim",children:[s.jsx("legend",{className:"mr-1 inline-block",children:"Tags"}),o.map(i=>{const n=t.includes(i);return s.jsx("button",{type:"button","aria-pressed":n,onClick:()=>d(i),className:n?"max-w-full break-all rounded-full border border-accent bg-accent/10 px-2 py-0.5 text-accent":"max-w-full break-all rounded-full border border-border bg-card px-2 py-0.5 hover:text-accent",children:i},i)}),t.length>0?s.jsx("button",{type:"button",onClick:()=>a([]),className:"ml-1 text-xs text-fg-dim hover:text-accent",children:"Clear"}):null]})}function y({message:e}){return s.jsx("div",{"aria-busy":"true",className:"flex h-full animate-pulse items-center justify-center bg-card/30 text-sm text-fg-dim",children:e})}function $({graph:e,matched:t}){const a=C(),o=f.useRef(null),d=f.useRef(null),[i,n]=f.useState({w:800,h:600});f.useEffect(()=>{const r=o.current;if(!r)return;const l=()=>{const u=r.getBoundingClientRect();n({w:Math.max(320,Math.floor(u.width)),h:Math.max(320,Math.floor(u.height))})};l();const h=new ResizeObserver(l);return h.observe(r),()=>h.disconnect()},[]);const c=()=>{var r,l;(l=(r=d.current)==null?void 0:r.zoomToFit)==null||l.call(r,400,40)},m=f.useMemo(()=>({nodes:e.nodes.map(r=>({...r})),links:e.edges.map(r=>({source:r.source,target:r.target,rel:r.relationship}))}),[e]),g=t.size!==e.nodes.length,j=r=>!g||t.has(r)?1:.15;return s.jsxs("div",{ref:o,"data-testid":"vault-graph-canvas",className:"relative h-full w-full touch-none",children:[s.jsx(f.Suspense,{fallback:s.jsx(y,{message:"Rendering graph…"}),children:s.jsx(z,{ref:d,graphData:m,width:i.w,height:i.h,backgroundColor:"rgba(0,0,0,0)",nodeLabel:r=>V(r),nodeRelSize:5,nodeVal:r=>2+Math.min(r.degree,12),nodeColor:r=>{const l=r,h=_(l.topTag);return g&&!t.has(l.id)?G(h):h},nodePointerAreaPaint:(r,l,h)=>{const u=r;if(u.x==null||u.y==null)return;const x=2+Math.min(u.degree,12),p=Math.max(Math.sqrt(x)*5,10);h.fillStyle=l,h.beginPath(),h.arc(u.x,u.y,p,0,2*Math.PI),h.fill()},linkColor:r=>{const l=r,h=b(l.source),u=b(l.target);return g&&(!t.has(h)||!t.has(u))?"rgba(160, 160, 160, 0.08)":"rgba(160, 160, 160, 0.35)"},linkDirectionalArrowLength:2.5,linkDirectionalArrowRelPos:1,cooldownTicks:100,onEngineStop:()=>c(),nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(r,l,h)=>{const u=r;if(u.x==null||u.y==null||j(u.id)<.5)return;const p=10/h;l.font=`${p}px sans-serif`,l.fillStyle="rgba(220, 220, 220, 0.8)",l.textAlign="left",l.textBaseline="middle",l.fillText(u.title,u.x+6,u.y)},onNodeClick:r=>{a(`/n/${encodeURIComponent(r.id)}`)}})}),s.jsx("button",{type:"button",onClick:c,className:"absolute right-3 bottom-3 rounded-md border border-border bg-card/90 px-3 py-1.5 text-xs text-fg-muted shadow-sm backdrop-blur hover:text-accent",children:"Fit to screen"})]})}function V(e){const t=[e.path??e.id,`${e.degree} link${e.degree===1?"":"s"}`];return e.tags.length>0&&t.push(`tags: ${e.tags.join(", ")}`),e.summary&&t.push(e.summary),t.join(`
3
3
  `)}function G(e){return e.startsWith("hsl(")?e.replace("hsl(","hsla(").replace(")",", 0.2)"):e}function b(e){return typeof e=="string"?e:e&&typeof e=="object"&&"id"in e?String(e.id):""}function B({error:e}){const t=e instanceof I;return s.jsx("div",{className:"flex h-full items-center justify-center p-10",children:s.jsxs("div",{className:"max-w-md rounded-md border border-red-500/30 bg-red-500/5 p-6",children:[s.jsx("p",{className:"mb-2 font-medium text-red-400",children:t?"Session expired":"Could not load vault"}),s.jsx("p",{className:"mb-4 text-sm text-fg-muted",children:e.message}),t?s.jsx(v,{to:"/add",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Reconnect vault"}):null]})})}export{O as VaultGraph};
@@ -1 +1 @@
1
- import{aa as r,r as e,L as i}from"./index-BUHugAd8.js";function m(c){let s;try{s=new URL(c)}catch{return!1}const a=s.pathname.split("/").filter(Boolean);return!(a.length>=2&&a[0]==="vault")}function u(){const c=r(t=>t.vaults),s=r(t=>t.activeVaultId),a=r(t=>t.removeVault),o=r(t=>t.setActiveVault),l=Object.values(c).sort((t,n)=>t.name.localeCompare(n.name));return e.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-16",children:[e.jsxs("div",{className:"mb-8 flex items-center justify-between",children:[e.jsx("h1",{className:"font-serif text-4xl tracking-tight",children:"Vaults"}),e.jsx(i,{to:"/add",className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Add vault"})]}),l.length===0?e.jsx("p",{className:"text-fg-muted",children:"No vaults connected yet."}):e.jsx("ul",{className:"space-y-3",children:l.map(t=>{const n=t.id===s,d=m(t.url);return e.jsxs("li",{className:"rounded-lg border border-border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-serif text-lg text-fg",children:t.name}),n?e.jsx("span",{className:"rounded bg-accent/10 px-2 py-0.5 text-xs text-accent",children:"active"}):null,e.jsx("span",{className:"rounded border border-border px-2 py-0.5 text-xs text-fg-dim",children:t.scope}),d?e.jsx("span",{className:"rounded border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-xs text-amber-500",children:"needs reconnect"}):null]}),e.jsx("p",{className:"mt-1 truncate font-mono text-xs text-fg-muted",children:t.url})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-4 text-sm",children:[n?null:e.jsx("button",{type:"button",onClick:()=>o(t.id),className:"text-fg-muted hover:text-accent",children:"Make active"}),e.jsx("button",{type:"button",onClick:()=>{confirm(`Remove ${t.name}? The access token will be deleted.`)&&a(t.id)},className:"text-red-400 hover:text-red-300",children:"Remove"})]})]}),d?e.jsxs("p",{className:"mt-3 rounded border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-xs text-amber-500",children:["Vault now serves under ",e.jsx("code",{children:"/vault/<name>/"}),". This stored URL is from the older scheme and won't reach the new endpoints. Remove this entry and"," ",e.jsx(i,{to:"/add",className:"underline",children:"add it again"})," ","— discovery will pick the right URL automatically."]}):null]},t.id)})})]})}export{u as Vaults};
1
+ import{ac as r,t as e,L as i}from"./index-CeSJJ5Fs.js";function m(c){let s;try{s=new URL(c)}catch{return!1}const a=s.pathname.split("/").filter(Boolean);return!(a.length>=2&&a[0]==="vault")}function u(){const c=r(t=>t.vaults),s=r(t=>t.activeVaultId),a=r(t=>t.removeVault),o=r(t=>t.setActiveVault),l=Object.values(c).sort((t,n)=>t.name.localeCompare(n.name));return e.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-16",children:[e.jsxs("div",{className:"mb-8 flex items-center justify-between",children:[e.jsx("h1",{className:"font-serif text-4xl tracking-tight",children:"Vaults"}),e.jsx(i,{to:"/add",className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent-hover",children:"Add vault"})]}),l.length===0?e.jsx("p",{className:"text-fg-muted",children:"No vaults connected yet."}):e.jsx("ul",{className:"space-y-3",children:l.map(t=>{const n=t.id===s,d=m(t.url);return e.jsxs("li",{className:"rounded-lg border border-border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-serif text-lg text-fg",children:t.name}),n?e.jsx("span",{className:"rounded bg-accent/10 px-2 py-0.5 text-xs text-accent",children:"active"}):null,e.jsx("span",{className:"rounded border border-border px-2 py-0.5 text-xs text-fg-dim",children:t.scope}),d?e.jsx("span",{className:"rounded border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-xs text-amber-500",children:"needs reconnect"}):null]}),e.jsx("p",{className:"mt-1 truncate font-mono text-xs text-fg-muted",children:t.url})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-4 text-sm",children:[n?null:e.jsx("button",{type:"button",onClick:()=>o(t.id),className:"text-fg-muted hover:text-accent",children:"Make active"}),e.jsx("button",{type:"button",onClick:()=>{confirm(`Remove ${t.name}? The access token will be deleted.`)&&a(t.id)},className:"text-red-400 hover:text-red-300",children:"Remove"})]})]}),d?e.jsxs("p",{className:"mt-3 rounded border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-xs text-amber-500",children:["Vault now serves under ",e.jsx("code",{children:"/vault/<name>/"}),". This stored URL is from the older scheme and won't reach the new endpoints. Remove this entry and"," ",e.jsx(i,{to:"/add",className:"underline",children:"add it again"})," ","— discovery will pick the right URL automatically."]}):null]},t.id)})})]})}export{u as Vaults};