mcp-memory-bucket 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();/**
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const X=globalThis,me=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ke=Symbol(),Le=new WeakMap;let at=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(me&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Le.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Le.set(t,e))}return e}toString(){return this.cssText}};const Et=r=>new at(typeof r=="string"?r:r+"",void 0,ke),q=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,n)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new at(t,r,ke)},zt=(r,e)=>{if(me)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=X.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},Oe=me?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Et(t)})(r):r;/**
5
+ */const ee=globalThis,ke=ee.ShadowRoot&&(ee.ShadyCSS===void 0||ee.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ve=Symbol(),Ie=new WeakMap;let at=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ve)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ke&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Ie.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Ie.set(t,e))}return e}toString(){return this.cssText}};const zt=r=>new at(typeof r=="string"?r:r+"",void 0,ve),O=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new at(t,r,ve)},Pt=(r,e)=>{if(ke)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=ee.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},Oe=ke?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return zt(t)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Pt,defineProperty:Dt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Ot,getOwnPropertySymbols:Mt,getPrototypeOf:It}=Object,re=globalThis,Me=re.trustedTypes,Nt=Me?Me.emptyScript:"",qt=re.reactiveElementPolyfillSupport,K=(r,e)=>r,de={toAttribute(r,e){switch(e){case Boolean:r=r?Nt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},ot=(r,e)=>!Pt(r,e),Ie={attribute:!0,type:String,converter:de,reflect:!1,useDefault:!1,hasChanged:ot};Symbol.metadata??=Symbol("metadata"),re.litPropertyMetadata??=new WeakMap;let I=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ie){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Dt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=Lt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const o=i?.call(this);n?.call(this,a),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ie}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;const e=It(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){const t=this.properties,s=[...Ot(t),...Mt(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Oe(i))}else e!==void 0&&t.push(Oe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:de).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:de;this._$Em=i;const o=a.fromAttribute(t,n.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,s,i=!1,n){if(e!==void 0){const a=this.constructor;if(i===!1&&(n=this[e]),s??=a.getPropertyOptions(e),!((s.hasChanged??ot)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),n!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:a}=n,o=this[i];a!==!0||this._$AL.has(i)||o===void 0||this.C(i,void 0,n,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[K("elementProperties")]=new Map,I[K("finalized")]=new Map,qt?.({ReactiveElement:I}),(re.reactiveElementVersions??=[]).push("2.1.2");/**
9
+ */const{is:Lt,defineProperty:Dt,getOwnPropertyDescriptor:It,getOwnPropertyNames:Ot,getOwnPropertySymbols:Mt,getPrototypeOf:Nt}=Object,ne=globalThis,Me=ne.trustedTypes,qt=Me?Me.emptyScript:"",Ut=ne.reactiveElementPolyfillSupport,Q=(r,e)=>r,ue={toAttribute(r,e){switch(e){case Boolean:r=r?qt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},lt=(r,e)=>!Lt(r,e),Ne={attribute:!0,type:String,converter:ue,reflect:!1,useDefault:!1,hasChanged:lt};Symbol.metadata??=Symbol("metadata"),ne.litPropertyMetadata??=new WeakMap;let q=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ne){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Dt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=It(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const a=i?.call(this);n?.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ne}static _$Ei(){if(this.hasOwnProperty(Q("elementProperties")))return;const e=Nt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Q("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Q("properties"))){const t=this.properties,s=[...Ot(t),...Mt(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Oe(i))}else e!==void 0&&t.push(Oe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:ue).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:ue;this._$Em=i;const a=o.fromAttribute(t,n.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,s,i=!1,n){if(e!==void 0){const o=this.constructor;if(i===!1&&(n=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??lt)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:o}=n,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};q.elementStyles=[],q.shadowRootOptions={mode:"open"},q[Q("elementProperties")]=new Map,q[Q("finalized")]=new Map,Ut?.({ReactiveElement:q}),(ne.reactiveElementVersions??=[]).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const ve=globalThis,Ne=r=>r,ee=ve.trustedTypes,qe=ee?ee.createPolicy("lit-html",{createHTML:r=>r}):void 0,lt="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,ct="?"+C,Ut=`<${ct}>`,P=document,Q=()=>P.createComment(""),V=r=>r===null||typeof r!="object"&&typeof r!="function",$e=Array.isArray,Ft=r=>$e(r)||typeof r?.[Symbol.iterator]=="function",ce=`[
14
- \f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ue=/-->/g,Fe=/>/g,R=RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),He=/'/g,Be=/"/g,ht=/^(?:script|style|textarea|title)$/i,Ht=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),h=Ht(1),D=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),je=new WeakMap,z=P.createTreeWalker(P,129);function pt(r,e){if(!$e(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return qe!==void 0?qe.createHTML(e):e}const Bt=(r,e)=>{const t=r.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",a=B;for(let o=0;o<t;o++){const l=r[o];let c,d,p=-1,g=0;for(;g<l.length&&(a.lastIndex=g,d=a.exec(l),d!==null);)g=a.lastIndex,a===B?d[1]==="!--"?a=Ue:d[1]!==void 0?a=Fe:d[2]!==void 0?(ht.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=R):d[3]!==void 0&&(a=R):a===R?d[0]===">"?(a=i??B,p=-1):d[1]===void 0?p=-2:(p=a.lastIndex-d[2].length,c=d[1],a=d[3]===void 0?R:d[3]==='"'?Be:He):a===Be||a===He?a=R:a===Ue||a===Fe?a=B:(a=R,i=void 0);const k=a===R&&r[o+1].startsWith("/>")?" ":"";n+=a===B?l+Ut:p>=0?(s.push(c),l.slice(0,p)+lt+l.slice(p)+C+k):l+C+(p===-2?o:k)}return[pt(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let ue=class dt{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,a=0;const o=e.length-1,l=this.parts,[c,d]=Bt(e,t);if(this.el=dt.createElement(c,s),z.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=z.nextNode())!==null&&l.length<o;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(lt)){const g=d[a++],k=i.getAttribute(p).split(C),b=/([.?@])?(.*)/.exec(g);l.push({type:1,index:n,name:b[2],strings:k,ctor:b[1]==="."?Zt:b[1]==="?"?Kt:b[1]==="@"?Qt:ne}),i.removeAttribute(p)}else p.startsWith(C)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(ht.test(i.tagName)){const p=i.textContent.split(C),g=p.length-1;if(g>0){i.textContent=ee?ee.emptyScript:"";for(let k=0;k<g;k++)i.append(p[k],Q()),z.nextNode(),l.push({type:2,index:++n});i.append(p[g],Q())}}}else if(i.nodeType===8)if(i.data===ct)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(C,p+1))!==-1;)l.push({type:7,index:n}),p+=C.length-1}n++}}static createElement(e,t){const s=P.createElement("template");return s.innerHTML=e,s}};function N(r,e,t=r,s){if(e===D)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const n=V(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=N(r,i._$AS(r,e.values),i,s)),e}let jt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??P).importNode(t,!0);z.currentNode=i;let n=z.nextNode(),a=0,o=0,l=s[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new W(n,n.nextSibling,this,e):l.type===1?c=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(c=new Vt(n,this,e)),this._$AV.push(c),l=s[++o]}a!==l?.index&&(n=z.nextNode(),a++)}return z.currentNode=P,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class W{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=N(this,e,t),V(e)?e===x||e==null||e===""?(this._$AH!==x&&this._$AR(),this._$AH=x):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ft(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==x&&V(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ue.createElement(pt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new jt(i,this),a=n.u(this.options);n.p(t),this.T(a),this._$AH=n}}_$AC(e){let t=je.get(e.strings);return t===void 0&&je.set(e.strings,t=new ue(e)),t}k(e){$e(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new W(this.O(Q()),this.O(Q()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=Ne(e).nextSibling;Ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=x,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}_$AI(e,t=this,s,i){const n=this.strings;let a=!1;if(n===void 0)e=N(this,e,t,0),a=!V(e)||e!==this._$AH&&e!==D,a&&(this._$AH=e);else{const o=e;let l,c;for(e=n[0],l=0;l<n.length-1;l++)c=N(this,o[s+l],t,l),c===D&&(c=this._$AH[l]),a||=!V(c)||c!==this._$AH[l],c===x?e=x:e!==x&&(e+=(c??"")+n[l+1]),this._$AH[l]=c}a&&!i&&this.j(e)}j(e){e===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Zt=class extends ne{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===x?void 0:e}},Kt=class extends ne{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==x)}},Qt=class extends ne{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=N(this,e,t,0)??x)===D)return;const s=this._$AH,i=e===x&&s!==x||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==x&&(s===x||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Vt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){N(this,e)}};const Wt=ve.litHtmlPolyfillSupport;Wt?.(ue,W),(ve.litHtmlVersions??=[]).push("3.3.3");const Yt=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=t?.renderBefore??null;s._$litPart$=i=new W(e.insertBefore(Q(),n),n,void 0,t??{})}return i._$AI(r),i};/**
13
+ */const $e=globalThis,qe=r=>r,te=$e.trustedTypes,Ue=te?te.createPolicy("lit-html",{createHTML:r=>r}):void 0,ct="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+R,Ft=`<${ht}>`,L=document,W=()=>L.createComment(""),V=r=>r===null||typeof r!="object"&&typeof r!="function",ye=Array.isArray,Ht=r=>ye(r)||typeof r?.[Symbol.iterator]=="function",he=`[
14
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,He=/>/g,E=RegExp(`>|${he}(?:([^\\s"'>=/]+)(${he}*=${he}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,je=/"/g,pt=/^(?:script|style|textarea|title)$/i,Bt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),h=Bt(1),D=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Ze=new WeakMap,P=L.createTreeWalker(L,129);function dt(r,e){if(!ye(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(e):e}const jt=(r,e)=>{const t=r.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=j;for(let a=0;a<t;a++){const l=r[a];let c,d,p=-1,g=0;for(;g<l.length&&(o.lastIndex=g,d=o.exec(l),d!==null);)g=o.lastIndex,o===j?d[1]==="!--"?o=Fe:d[1]!==void 0?o=He:d[2]!==void 0?(pt.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=E):d[3]!==void 0&&(o=E):o===E?d[0]===">"?(o=i??j,p=-1):d[1]===void 0?p=-2:(p=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?E:d[3]==='"'?je:Be):o===je||o===Be?o=E:o===Fe||o===He?o=j:(o=E,i=void 0);const k=o===E&&r[a+1].startsWith("/>")?" ":"";n+=o===j?l+Ft:p>=0?(s.push(c),l.slice(0,p)+ct+l.slice(p)+R+k):l+R+(p===-2?a:k)}return[dt(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let ge=class ut{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[c,d]=jt(e,t);if(this.el=ut.createElement(c,s),P.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=P.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ct)){const g=d[o++],k=i.getAttribute(p).split(R),b=/([.?@])?(.*)/.exec(g);l.push({type:1,index:n,name:b[2],strings:k,ctor:b[1]==="."?Kt:b[1]==="?"?Qt:b[1]==="@"?Wt:oe}),i.removeAttribute(p)}else p.startsWith(R)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(pt.test(i.tagName)){const p=i.textContent.split(R),g=p.length-1;if(g>0){i.textContent=te?te.emptyScript:"";for(let k=0;k<g;k++)i.append(p[k],W()),P.nextNode(),l.push({type:2,index:++n});i.append(p[g],W())}}}else if(i.nodeType===8)if(i.data===ht)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(R,p+1))!==-1;)l.push({type:7,index:n}),p+=R.length-1}n++}}static createElement(e,t){const s=L.createElement("template");return s.innerHTML=e,s}};function U(r,e,t=r,s){if(e===D)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const n=V(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=U(r,i._$AS(r,e.values),i,s)),e}let Zt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??L).importNode(t,!0);P.currentNode=i;let n=P.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new Y(n,n.nextSibling,this,e):l.type===1?c=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(c=new Vt(n,this,e)),this._$AV.push(c),l=s[++a]}o!==l?.index&&(n=P.nextNode(),o++)}return P.currentNode=L,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=U(this,e,t),V(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ht(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&V(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ge.createElement(dt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new Zt(i,this),o=n.u(this.options);n.p(t),this.T(o),this._$AH=n}}_$AC(e){let t=Ze.get(e.strings);return t===void 0&&Ze.set(e.strings,t=new ge(e)),t}k(e){ye(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new Y(this.O(W()),this.O(W()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=qe(e).nextSibling;qe(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let oe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(n===void 0)e=U(this,e,t,0),o=!V(e)||e!==this._$AH&&e!==D,o&&(this._$AH=e);else{const a=e;let l,c;for(e=n[0],l=0;l<n.length-1;l++)c=U(this,a[s+l],t,l),c===D&&(c=this._$AH[l]),o||=!V(c)||c!==this._$AH[l],c===m?e=m:e!==m&&(e+=(c??"")+n[l+1]),this._$AH[l]=c}o&&!i&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Kt=class extends oe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}},Qt=class extends oe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}},Wt=class extends oe{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=U(this,e,t,0)??m)===D)return;const s=this._$AH,i=e===m&&s!==m||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==m&&(s===m||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Vt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}};const Yt=$e.litHtmlPolyfillSupport;Yt?.(ge,Y),($e.litHtmlVersions??=[]).push("3.3.3");const Gt=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=t?.renderBefore??null;s._$litPart$=i=new Y(e.insertBefore(W(),n),n,void 0,t??{})}return i._$AI(r),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const ye=globalThis;let S=class extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Yt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};S._$litElement$=!0,S.finalized=!0,ye.litElementHydrateSupport?.({LitElement:S});const Gt=ye.litElementPolyfillSupport;Gt?.({LitElement:S});(ye.litElementVersions??=[]).push("4.2.2");var ut;let he=0;const Ze=new Set;function Jt(r){he++;try{r()}finally{he--,he===0&&Xt()}}function Xt(){const r=new Set(Ze);Ze.clear();for(const e of r)e()}function es(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ts(r){return r&&typeof r.deref=="function"}class we{static#e=0;#t;#s;#r=new Set;#i=ut.#e++;name;constructor(e,t){this.#t=e,this.#s=e,this.name=t}_get(){return u.activeConsumer&&u.activeConsumer.track(this),this.#t}_set(e){return es(e,this.#t)?(this.#s=this.#t,this.#t=e,this._notify(),!0):!1}subscribe(e,t=!1){let s=e;return t&&(s=new WeakRef(e)),this.#r.add(s),()=>this.#r.delete(s)}_notify(){const e=[...this.#r];for(const t of e){let s;if(ts(t)){if(s=t.deref(),!s){this.#r.delete(t);continue}}else s=t;s()}}get id(){return this.#i}get previousValue(){return this.#s}toString(){return this.name?`${this.constructor.name}(${this.name})`:`${this.constructor.name}#${this.id}`}}ut=we;class u extends we{static#e=[];constructor(e,t){super(e,t)}static get activeConsumer(){return this.#e[this.#e.length-1]}static push(e){this.#e.push(e)}static pop(){this.#e.pop()}get(){return this._get()}set(e){Jt(()=>{this._set(e)})}get value(){return this.get()}set value(e){this.set(e)}update(e){this.set(e(this.get()))}}class ss extends we{#e;#t=!0;#s=!1;#r=new Map;_debugParent;#i;#d=()=>{this.#t||(this.#t=!0,this._notify())};constructor(e,t,s){super(void 0,t),this.#e=e,this.#i=s?.weak??!0}track(e){if(this.#r.has(e))return;const t=e.subscribe(this.#d,this.#i);this.#r.set(e,t)}dispose(){this.#a()}#a(){for(const e of this.#r.values())e();this.#r.clear()}get(){if(u.activeConsumer&&u.activeConsumer.track(this),!this.#t)return this._get();if(this.#s)throw new Error(`Cycle detected in ${this}
20
- ↳ while computing ${this._debugParent??"root"}`);this.#s=!0,this.#a(),u.push(this);try{const e=this.#e();this._set(e)}finally{u.pop(),this.#t=!1,this.#s=!1}return this._get()}get value(){return this.get()}set value(e){throw new Error(`Cannot set value of Computed ${this}. Computed values are read-only.`)}subscribe(e,t=!1){const s=super.subscribe(e,t);return u.activeConsumer||this.get(),s}}class ae{#e;#t=new Map;_debugParent;constructor(e){this.#e=e,e.addController(this);const t=e,s=t.update,i=this;t.update=function(n){u.push(i);try{s.call(this,n)}finally{u.pop()}}}track(e){this.#t.has(e)||this.#t.set(e,e.subscribe(this.#s,!0))}#s=()=>{this.#e.requestUpdate()};hostUpdate(){for(const e of this.#t.values())e();this.#t.clear()}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}toString(){const e=this.#e;return`SignalWatcher(${e?.localName??e?.tagName??e?.constructor?.name??"unknown"})`}}const is=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"});function rs(r){if(!r)return"unknown age";const e=new Date(r);return Number.isNaN(e.getTime())?"unknown age":is.format(e)}class ns extends S{static{this.properties={results:{attribute:!1},showRoot:{attribute:!1},onSelect:{attribute:!1},selectedIds:{attribute:!1},onToggleSelect:{attribute:!1}}}static{this.styles=q`
19
+ */const we=globalThis;let _=class extends q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Gt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};_._$litElement$=!0,_.finalized=!0,we.litElementHydrateSupport?.({LitElement:_});const Jt=we.litElementPolyfillSupport;Jt?.({LitElement:_});(we.litElementVersions??=[]).push("4.2.2");var gt;let pe=0;const Ke=new Set;function Xt(r){pe++;try{r()}finally{pe--,pe===0&&es()}}function es(){const r=new Set(Ke);Ke.clear();for(const e of r)e()}function ts(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ss(r){return r&&typeof r.deref=="function"}class _e{static#e=0;#t;#s;#r=new Set;#i=gt.#e++;name;constructor(e,t){this.#t=e,this.#s=e,this.name=t}_get(){return u.activeConsumer&&u.activeConsumer.track(this),this.#t}_set(e){return ts(e,this.#t)?(this.#s=this.#t,this.#t=e,this._notify(),!0):!1}subscribe(e,t=!1){let s=e;return t&&(s=new WeakRef(e)),this.#r.add(s),()=>this.#r.delete(s)}_notify(){const e=[...this.#r];for(const t of e){let s;if(ss(t)){if(s=t.deref(),!s){this.#r.delete(t);continue}}else s=t;s()}}get id(){return this.#i}get previousValue(){return this.#s}toString(){return this.name?`${this.constructor.name}(${this.name})`:`${this.constructor.name}#${this.id}`}}gt=_e;class u extends _e{static#e=[];constructor(e,t){super(e,t)}static get activeConsumer(){return this.#e[this.#e.length-1]}static push(e){this.#e.push(e)}static pop(){this.#e.pop()}get(){return this._get()}set(e){Xt(()=>{this._set(e)})}get value(){return this.get()}set value(e){this.set(e)}update(e){this.set(e(this.get()))}}class is extends _e{#e;#t=!0;#s=!1;#r=new Map;_debugParent;#i;#d=()=>{this.#t||(this.#t=!0,this._notify())};constructor(e,t,s){super(void 0,t),this.#e=e,this.#i=s?.weak??!0}track(e){if(this.#r.has(e))return;const t=e.subscribe(this.#d,this.#i);this.#r.set(e,t)}dispose(){this.#o()}#o(){for(const e of this.#r.values())e();this.#r.clear()}get(){if(u.activeConsumer&&u.activeConsumer.track(this),!this.#t)return this._get();if(this.#s)throw new Error(`Cycle detected in ${this}
20
+ ↳ while computing ${this._debugParent??"root"}`);this.#s=!0,this.#o(),u.push(this);try{const e=this.#e();this._set(e)}finally{u.pop(),this.#t=!1,this.#s=!1}return this._get()}get value(){return this.get()}set value(e){throw new Error(`Cannot set value of Computed ${this}. Computed values are read-only.`)}subscribe(e,t=!1){const s=super.subscribe(e,t);return u.activeConsumer||this.get(),s}}class ae{#e;#t=new Map;_debugParent;constructor(e){this.#e=e,e.addController(this);const t=e,s=t.update,i=this;t.update=function(n){u.push(i);try{s.call(this,n)}finally{u.pop()}}}track(e){this.#t.has(e)||this.#t.set(e,e.subscribe(this.#s,!0))}#s=()=>{this.#e.requestUpdate()};hostUpdate(){for(const e of this.#t.values())e();this.#t.clear()}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}toString(){const e=this.#e;return`SignalWatcher(${e?.localName??e?.tagName??e?.constructor?.name??"unknown"})`}}const rs=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"});function ns(r){if(!r)return"unknown age";const e=new Date(r);return Number.isNaN(e.getTime())?"unknown age":rs.format(e)}class os extends _{static{this.properties={results:{attribute:!1},showRoot:{attribute:!1},onSelect:{attribute:!1},selectedIds:{attribute:!1},onToggleSelect:{attribute:!1}}}static{this.styles=O`
21
21
  :host { display: block; }
22
22
  .count-header {
23
23
  padding: 8px 14px;
@@ -70,7 +70,7 @@
70
70
  <div class="row-body">
71
71
  <div class="top">
72
72
  <span class="name">${e.name}</span>
73
- <span class="meta">${rs(e.created_at)} · ${e.owner??"—"} · ${e.status}</span>
73
+ <span class="meta">${ns(e.created_at)} · ${e.owner??"—"} · ${e.status}</span>
74
74
  </div>
75
75
  <div class="desc">${e.description}</div>
76
76
  <div class="tags">
@@ -83,83 +83,85 @@
83
83
  </div>
84
84
  </div>
85
85
  `})}
86
- `}}customElements.define("result-list",ns);function _e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=_e();function gt(r){O=r}var E={exec:()=>null};function M(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),i=e[s];return i||(i=r(s),e[s]=i),i}}function f(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(i,n)=>{let a=typeof n=="string"?n:n.source;return a=a.replace(v.caret,"$1"),t=t.replace(i,a),s},getRegex:()=>new RegExp(t,e)};return s}var as=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),v={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:M(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:M(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:M(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:M(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:M(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:M(r=>new RegExp(`^ {0,${r}}>`))},os=/^(?:[ \t]*(?:\n|$))+/,ls=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Se=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ft=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bt=f(ft).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ps=f(ft).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ae=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ds=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,us=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gs=f(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Se).getRegex(),oe="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ce=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fs=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ce).replace("tag",oe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xt=r=>f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex(),bs=xt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),xs=xt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ms=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xs).getRegex(),Re={blockquote:ms,code:ls,def:us,fences:cs,heading:hs,hr:Y,html:fs,lheading:bt,list:gs,newline:os,paragraph:bs,table:E,text:ds},Ke=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex(),ks={...Re,lheading:ps,table:Ke,paragraph:f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ke).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex()},vs={...Re,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(Ae).replace("hr",Y).replace("heading",` *#{1,6} *[^
87
- ]`).replace("lheading",bt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$s=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ys=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mt=/^( {2,}|\\)\n(?!\s*$)/,ws=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,A=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,G=/[^\s\p{P}\p{S}]/u,_s=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),Ss=/[\p{Pi}\p{Ps}"']/u,kt=/(?!~)[\p{P}\p{S}]/u,As=/(?!~)[\s\p{P}\p{S}]/u,Ts=/(?:[^\s\p{P}\p{S}]|~)/u,Cs=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",as?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rs=f(vt,"u").replace(/punct/g,A).getRegex(),Es=f(vt,"u").replace(/punct/g,kt).getRegex(),zs=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ps=f(zs,"u").replace(/openQuote/g,Ss).replace(/punct/g,A).getRegex(),$t="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ds=f($t,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Ls=f($t,"gu").replace(/notPunctSpace/g,Ts).replace(/punctSpace/g,As).replace(/punct/g,kt).getRegex(),Os="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ms=f(Os,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Is=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Ns="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",qs=f(Ns,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Us=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,A).getRegex(),Fs="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Hs=f(Fs,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Bs=f(/\\(punct)/,"gu").replace(/punct/g,A).getRegex(),js=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zs=f(Ce).replace("(?:-->|$)","-->").getRegex(),Ks=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Zs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Qs=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yt=f(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),wt=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Vs=f("reflink|nolink(?!\\()","g").replace("reflink",yt).replace("nolink",wt).getRegex(),Qe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ee={_backpedal:E,anyPunctuation:Bs,autolink:js,blockSkip:Cs,br:mt,code:ys,del:E,delLDelim:E,delRDelim:E,emStrongLDelim:Rs,emStrongRDelimAst:Ds,emStrongRDelimUnd:Is,escape:$s,link:Qs,nolink:wt,punctuation:_s,reflink:yt,reflinkSearch:Vs,tag:Ks,text:ws,url:E},Ws={...Ee,emStrongLDelim:Ps,emStrongRDelimAst:Ms,emStrongRDelimUnd:qs,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},ge={...Ee,emStrongRDelimAst:Ls,emStrongLDelim:Es,delLDelim:Us,delRDelim:Hs,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qe).getRegex()},Ys={...ge,br:f(mt).replace("{2,}","*").getRegex(),text:f(ge.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J={normal:Re,gfm:ks,pedantic:vs},j={normal:Ee,gfm:ge,breaks:Ys,pedantic:Ws},Gs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve=r=>Gs[r];function _(r,e){if(e){if(v.escapeTest.test(r))return r.replace(v.escapeReplace,Ve)}else if(v.escapeTestNoEncode.test(r))return r.replace(v.escapeReplaceNoEncode,Ve);return r}function We(r){try{r=encodeURI(r).replace(v.percentDecode,"%")}catch{return null}return r}function Ye(r,e){let t=r.replace(v.findPipe,(n,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(v.splitPipe),i=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;i<s.length;i++)s[i]=s[i].trim().replace(v.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let i=0;for(;i<s&&r.charAt(s-i-1)===e;)i++;return r.slice(0,s-i)}function Ge(r){let e=r.split(`
86
+ `}}customElements.define("result-list",os);function Se(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var M=Se();function ft(r){M=r}var z={exec:()=>null};function N(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),i=e[s];return i||(i=r(s),e[s]=i),i}}function f(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(i,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(v.caret,"$1"),t=t.replace(i,o),s},getRegex:()=>new RegExp(t,e)};return s}var as=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),v={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:N(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:N(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:N(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:N(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:N(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:N(r=>new RegExp(`^ {0,${r}}>`))},ls=/^(?:[ \t]*(?:\n|$))+/,cs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,G=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ps=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,bt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mt=f(bt).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ds=f(bt).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Te=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,us=/^[^\n]+/,Ce=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,gs=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ce).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fs=f(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),le="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Re=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bs=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Re).replace("tag",le).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xt=r=>f(Te).replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",le).getRegex(),ms=xt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),xs=xt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ks=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xs).getRegex(),Ee={blockquote:ks,code:cs,def:gs,fences:hs,heading:ps,hr:G,html:bs,lheading:mt,list:fs,newline:ls,paragraph:ms,table:z,text:us},Qe=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",le).getRegex(),vs={...Ee,lheading:ds,table:Qe,paragraph:f(Te).replace("hr",G).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Qe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",le).getRegex()},$s={...Ee,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(Te).replace("hr",G).replace("heading",` *#{1,6} *[^
87
+ ]`).replace("lheading",mt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ys=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ws=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kt=/^( {2,}|\\)\n(?!\s*$)/,_s=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,F=/[\s\p{P}\p{S}]/u,J=/[^\s\p{P}\p{S}]/u,Ss=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,F).getRegex(),As=/[\p{Pi}\p{Ps}"']/u,vt=/(?!~)[\p{P}\p{S}]/u,Ts=/(?!~)[\s\p{P}\p{S}]/u,Cs=/(?:[^\s\p{P}\p{S}]|~)/u,Rs=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",as?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),$t=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Es=f($t,"u").replace(/punct/g,T).getRegex(),zs=f($t,"u").replace(/punct/g,vt).getRegex(),Ps=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ls=f(Ps,"u").replace(/openQuote/g,As).replace(/punct/g,T).getRegex(),yt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ds=f(yt,"gu").replace(/notPunctSpace/g,J).replace(/punctSpace/g,F).replace(/punct/g,T).getRegex(),Is=f(yt,"gu").replace(/notPunctSpace/g,Cs).replace(/punctSpace/g,Ts).replace(/punct/g,vt).getRegex(),Os="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ms=f(Os,"gu").replace(/notPunctSpace/g,J).replace(/punctSpace/g,F).replace(/punct/g,T).getRegex(),Ns=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,J).replace(/punctSpace/g,F).replace(/punct/g,T).getRegex(),qs="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Us=f(qs,"gu").replace(/notPunctSpace/g,J).replace(/punctSpace/g,F).replace(/punct/g,T).getRegex(),Fs=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,T).getRegex(),Hs="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Bs=f(Hs,"gu").replace(/notPunctSpace/g,J).replace(/punctSpace/g,F).replace(/punct/g,T).getRegex(),js=f(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Zs=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ks=f(Re).replace("(?:-->|$)","-->").getRegex(),Qs=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ks).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),se=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ws=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wt=f(/^!?\[(label)\]\[(ref)\]/).replace("label",se).replace("ref",Ce).getRegex(),_t=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ce).getRegex(),Vs=f("reflink|nolink(?!\\()","g").replace("reflink",wt).replace("nolink",_t).getRegex(),We=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ze={_backpedal:z,anyPunctuation:js,autolink:Zs,blockSkip:Rs,br:kt,code:ws,del:z,delLDelim:z,delRDelim:z,emStrongLDelim:Es,emStrongRDelimAst:Ds,emStrongRDelimUnd:Ns,escape:ys,link:Ws,nolink:_t,punctuation:Ss,reflink:wt,reflinkSearch:Vs,tag:Qs,text:_s,url:z},Ys={...ze,emStrongLDelim:Ls,emStrongRDelimAst:Ms,emStrongRDelimUnd:Us,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",se).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se).getRegex()},fe={...ze,emStrongRDelimAst:Is,emStrongLDelim:zs,delLDelim:Fs,delRDelim:Bs,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",We).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",We).getRegex()},Gs={...fe,br:f(kt).replace("{2,}","*").getRegex(),text:f(fe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},X={normal:Ee,gfm:vs,pedantic:$s},Z={normal:ze,gfm:fe,breaks:Gs,pedantic:Ys},Js={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve=r=>Js[r];function A(r,e){if(e){if(v.escapeTest.test(r))return r.replace(v.escapeReplace,Ve)}else if(v.escapeTestNoEncode.test(r))return r.replace(v.escapeReplaceNoEncode,Ve);return r}function Ye(r){try{r=encodeURI(r).replace(v.percentDecode,"%")}catch{return null}return r}function Ge(r,e){let t=r.replace(v.findPipe,(n,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(v.splitPipe),i=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;i<s.length;i++)s[i]=s[i].trim().replace(v.slashPipe,"|");return s}function C(r,e,t){let s=r.length;if(s===0)return"";let i=0;for(;i<s&&r.charAt(s-i-1)===e;)i++;return r.slice(0,s-i)}function Je(r){let e=r.split(`
88
88
  `),t=e.length-1;for(;t>=0&&v.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
89
- `)}function Js(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Xs(r,e=0){let t=e,s="";for(let i of r)if(i===" "){let n=4-t%4;s+=" ".repeat(n),t+=n}else s+=i,t++;return s}function Je(r,e,t,s,i){let n=e.href,a=e.title||null,o=r[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:a,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,l}function ei(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let i=s[1];return e.split(`
90
- `).map(n=>{let a=n.match(t.other.beginningSpace);if(a===null)return n;let[o]=a;return o.length>=i.length?n.slice(i.length):n}).join(`
91
- `)}var se=class{options;rules;lexer;constructor(r){this.options=r||O}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Ge(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ei(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=T(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:T(e[0],`
92
- `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:T(e[0],`
93
- `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=T(e[0],`
89
+ `)}function Xs(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function ei(r,e=0){let t=e,s="";for(let i of r)if(i===" "){let n=4-t%4;s+=" ".repeat(n),t+=n}else s+=i,t++;return s}function Xe(r,e,t,s,i){let n=e.href,o=e.title||null,a=r[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function ti(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let i=s[1];return e.split(`
90
+ `).map(n=>{let o=n.match(t.other.beginningSpace);if(o===null)return n;let[a]=o;return a.length>=i.length?n.slice(i.length):n}).join(`
91
+ `)}var ie=class{options;rules;lexer;constructor(r){this.options=r||M}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Je(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ti(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=C(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:C(e[0],`
92
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:C(e[0],`
93
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=C(e[0],`
94
94
  `).split(`
95
- `),s="",i="",n=[];for(;t.length>0;){let a=!1,o=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))o.push(t[l]),a=!0;else if(!a)o.push(t[l]);else break;t=t.slice(l);let c=o.join(`
95
+ `),s="",i="",n=[];for(;t.length>0;){let o=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),o=!0;else if(!o)a.push(t[l]);else break;t=t.slice(l);let c=a.join(`
96
96
  `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
97
97
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
98
98
  ${c}`:c,i=i?`${i}
99
99
  ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=p,t.length===0)break;let g=n.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let k=g,b=t.join(`
100
- `),w=k.raw+`
101
- `+b.replace(this.rules.other.blockquoteSetextReplace2,""),F=this.blockquote(w);n[n.length-1]=F,s=`${s}
102
- ${b}`,i=i.substring(0,i.length-k.text.length)+F.text;break}else if(g?.type==="list"){let k=g,b=k.raw+`
100
+ `),S=k.raw+`
101
+ `+b.replace(this.rules.other.blockquoteSetextReplace2,""),H=this.blockquote(S);n[n.length-1]=H,s=`${s}
102
+ ${b}`,i=i.substring(0,i.length-k.text.length)+H.text;break}else if(g?.type==="list"){let k=g,b=k.raw+`
103
103
  `+t.join(`
104
- `),w=this.list(b);n[n.length-1]=w,s=s.substring(0,s.length-g.raw.length)+w.raw,i=i.substring(0,i.length-k.raw.length)+w.raw,t=b.substring(n.at(-1).raw.length).split(`
105
- `);continue}}return{type:"blockquote",raw:s,tokens:n,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,i={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let n=this.rules.other.listItemRegex(t),a=!1;for(;r;){let l=!1,c="",d="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;c=e[0],r=r.substring(c.length);let p=Xs(e[2].split(`
104
+ `),S=this.list(b);n[n.length-1]=S,s=s.substring(0,s.length-g.raw.length)+S.raw,i=i.substring(0,i.length-k.raw.length)+S.raw,t=b.substring(n.at(-1).raw.length).split(`
105
+ `);continue}}return{type:"blockquote",raw:s,tokens:n,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,i={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let n=this.rules.other.listItemRegex(t),o=!1;for(;r;){let l=!1,c="",d="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;c=e[0],r=r.substring(c.length);let p=ei(e[2].split(`
106
106
  `,1)[0],e[1].length),g=r.split(`
107
107
  `,1)[0],k=!p.trim(),b=0;if(this.options.pedantic?(b=2,d=p.trimStart()):k?b=e[1].length+1:(b=p.search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=p.slice(b),b+=e[1].length),k&&this.rules.other.blankLine.test(g)&&(c+=g+`
108
- `,r=r.substring(g.length+1),l=!0),!l){let w=this.rules.other.nextBulletRegex(b),F=this.rules.other.hrRegex(b),Pe=this.rules.other.fencesBeginRegex(b),De=this.rules.other.headingBeginRegex(b),Ct=this.rules.other.htmlBeginRegex(b),Rt=this.rules.other.blockquoteBeginRegex(b);for(;r;){let le=r.split(`
109
- `,1)[0],H;if(g=le,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),H=g):H=g.replace(this.rules.other.tabCharGlobal," "),Pe.test(g)||De.test(g)||Ct.test(g)||Rt.test(g)||w.test(g)||F.test(g))break;if(H.search(this.rules.other.nonSpaceChar)>=b||!g.trim())d+=`
110
- `+H.slice(b);else{if(k||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Pe.test(p)||De.test(p)||F.test(p))break;d+=`
111
- `+g}k=!g.trim(),c+=le+`
112
- `,r=r.substring(le.length+1),p=H.slice(b)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let c=l.tokens.filter(p=>p.type==="space"),d=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=d}for(let l of i.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=p.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Ge(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
113
- `),href:s,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Ye(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
114
- `):[],n={type:"table",raw:T(e[0],`
115
- `),header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let a=0;a<t.length;a++)n.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:n.align[a]});for(let a of i)n.rows.push(Ye(a,n.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:n.align[l]})));return n}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:T(e[0],`
108
+ `,r=r.substring(g.length+1),l=!0),!l){let S=this.rules.other.nextBulletRegex(b),H=this.rules.other.hrRegex(b),Le=this.rules.other.fencesBeginRegex(b),De=this.rules.other.headingBeginRegex(b),Rt=this.rules.other.htmlBeginRegex(b),Et=this.rules.other.blockquoteBeginRegex(b);for(;r;){let ce=r.split(`
109
+ `,1)[0],B;if(g=ce,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),B=g):B=g.replace(this.rules.other.tabCharGlobal," "),Le.test(g)||De.test(g)||Rt.test(g)||Et.test(g)||S.test(g)||H.test(g))break;if(B.search(this.rules.other.nonSpaceChar)>=b||!g.trim())d+=`
110
+ `+B.slice(b);else{if(k||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Le.test(p)||De.test(p)||H.test(p))break;d+=`
111
+ `+g}k=!g.trim(),c+=ce+`
112
+ `,r=r.substring(ce.length+1),p=B.slice(b)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=c}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let c=l.tokens.filter(p=>p.type==="space"),d=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=d}for(let l of i.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=p.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Je(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:C(e[0],`
113
+ `),href:s,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Ge(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
114
+ `):[],n={type:"table",raw:C(e[0],`
115
+ `),header:[],align:[],rows:[]};if(t.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<t.length;o++)n.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:n.align[o]});for(let o of i)n.rows.push(Ge(o,n.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[l]})));return n}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:C(e[0],`
116
116
  `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
117
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=T(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=Js(e[2],"()");if(n===-2)return;if(n>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Je(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Je(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=0,c=s[0][0],d=t===c,p=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*r.length+i);(s=p.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(a=[...n].length,s[3]||s[4]){o+=a;continue}else if(s[5]||s[6]){if(i%3&&!((i+a)%3)){l+=a;continue}if(d)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let g=[...s[0]][0].length,k=r.slice(0,i+s.index+g+a);if(Math.min(i,a)%2){let w=k.slice(1,-1);return{type:"em",raw:k,text:w,tokens:this.lexer.inlineTokens(w)}}let b=k.slice(2,-2);return{type:"strong",raw:k,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(a=[...n].length,a!==i))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let c=[...s[0]][0].length,d=r.slice(0,i+s.index+c+a),p=d.slice(i,-i);return{type:"del",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$=class fe{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||O,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:v,block:J.normal,inline:j.normal};this.options.pedantic?(t.block=J.pedantic,t.inline=j.pedantic):this.options.gfm&&(t.block=J.gfm,this.options.breaks?t.inline=j.breaks:t.inline=j.gfm),this.tokenizer.rules=t}static get rules(){return{block:J,inline:j}}static lex(e,t){return new fe(t).lex(e)}static lexInline(e,t){return new fe(t).inlineTokens(e)}lex(e){e=e.replace(v.carriageReturn,`
118
- `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(v.tabCharGlobal," ").replace(v.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let o=t.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
119
- `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
117
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=C(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=Xs(e[2],"()");if(n===-2)return;if(n>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Xe(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Xe(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=0,c=s[0][0],d=t===c,p=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*r.length+i);(s=p.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){a+=o;continue}else if(s[5]||s[6]){if(i%3&&!((i+o)%3)){l+=o;continue}if(d)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let g=[...s[0]][0].length,k=r.slice(0,i+s.index+g+o);if(Math.min(i,o)%2){let S=k.slice(1,-1);return{type:"em",raw:k,text:S,tokens:this.lexer.inlineTokens(S)}}let b=k.slice(2,-2);return{type:"strong",raw:k,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,o,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(o=[...n].length,o!==i))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...s[0]][0].length,d=r.slice(0,i+s.index+c+o),p=d.slice(i,-i);return{type:"del",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},y=class be{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new ie,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:v,block:X.normal,inline:Z.normal};this.options.pedantic?(t.block=X.pedantic,t.inline=Z.pedantic):this.options.gfm&&(t.block=X.gfm,this.options.breaks?t.inline=Z.breaks:t.inline=Z.gfm),this.tokenizer.rules=t}static get rules(){return{block:X,inline:Z}}static lex(e,t){return new be(t).lex(e)}static lexInline(e,t){return new be(t).inlineTokens(e)}lex(e){e=e.replace(v.carriageReturn,`
118
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(v.tabCharGlobal," ").replace(v.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let a=t.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
119
+ `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
120
120
  `)?"":`
121
- `)+n.raw,o.text+=`
122
- `+n.text,this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
121
+ `)+n.raw,a.text+=`
122
+ `+n.text,this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
123
123
  `)?"":`
124
- `)+n.raw,o.text+=`
125
- `+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let o=t.at(-1);s&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
124
+ `)+n.raw,a.text+=`
125
+ `+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){let a=t.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
126
126
  `)?"":`
127
- `)+n.raw,o.text+=`
128
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n),s=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
127
+ `)+n.raw,a.text+=`
128
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
129
129
  `)?"":`
130
- `)+n.raw,o.text+=`
131
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e;if(this.tokens.links){let o=Object.keys(this.tokens.links);o.length>0&&(s=s.replace(this.tokenizer.rules.inline.reflinkSearch,l=>o.includes(l.slice(l.lastIndexOf("[")+1,-1))?"["+"a".repeat(l.length-2)+"]":l))}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,o=>"+".repeat(o.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(o,l,c)=>{let d=c?c.length:0;return o.slice(0,d)+"["+"a".repeat(o.length-d-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,n="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(n=""),i=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=t.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(n=o.raw.slice(-1)),i=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},ie=class{options;parser;constructor(r){this.options=r||O}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(v.notSpaceStart)?.[0],i=r.replace(v.endingNewline,"")+`
132
- `;return s?'<pre><code class="language-'+_(s)+'">'+(t?i:_(i,!0))+`</code></pre>
133
- `:"<pre><code>"+(t?i:_(i,!0))+`</code></pre>
130
+ `)+n.raw,a.text+=`
131
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e;if(this.tokens.links){let a=Object.keys(this.tokens.links);a.length>0&&(s=s.replace(this.tokenizer.rules.inline.reflinkSearch,l=>a.includes(l.slice(l.lastIndexOf("[")+1,-1))?"["+"a".repeat(l.length-2)+"]":l))}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(a,l,c)=>{let d=c?c.length:0;return a.slice(0,d)+"["+"a".repeat(a.length-d-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,n="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(n=""),i=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=t.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,s,n)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e,s,n)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(n=a.raw.slice(-1)),i=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},re=class{options;parser;constructor(r){this.options=r||M}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(v.notSpaceStart)?.[0],i=r.replace(v.endingNewline,"")+`
132
+ `;return s?'<pre><code class="language-'+A(s)+'">'+(t?i:A(i,!0))+`</code></pre>
133
+ `:"<pre><code>"+(t?i:A(i,!0))+`</code></pre>
134
134
  `}blockquote({tokens:r}){return`<blockquote>
135
135
  ${this.parser.parse(r)}</blockquote>
136
136
  `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
137
137
  `}hr(r){return`<hr>
138
- `}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let o=r.items[a];s+=this.listitem(o)}let i=e?"ol":"ul",n=e&&t!==1?' start="'+t+'"':"";return"<"+i+n+`>
138
+ `}list(r){let e=r.ordered,t=r.start,s="";for(let o=0;o<r.items.length;o++){let a=r.items[o];s+=this.listitem(a)}let i=e?"ol":"ul",n=e&&t!==1?' start="'+t+'"':"";return"<"+i+n+`>
139
139
  `+s+"</"+i+`>
140
140
  `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
141
141
  `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
142
- `}table(r){let e="",t="";for(let i=0;i<r.header.length;i++)t+=this.tablecell(r.header[i]);e+=this.tablerow({text:t});let s="";for(let i=0;i<r.rows.length;i++){let n=r.rows[i];t="";for(let a=0;a<n.length;a++)t+=this.tablecell(n[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
142
+ `}table(r){let e="",t="";for(let i=0;i<r.header.length;i++)t+=this.tablecell(r.header[i]);e+=this.tablerow({text:t});let s="";for(let i=0;i<r.rows.length;i++){let n=r.rows[i];t="";for(let o=0;o<n.length;o++)t+=this.tablecell(n[o]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
143
143
  <thead>
144
144
  `+e+`</thead>
145
145
  `+s+`</table>
146
146
  `}tablerow({text:r}){return`<tr>
147
147
  ${r}</tr>
148
148
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
149
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${_(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=We(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+_(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=We(r);if(i===null)return _(t);r=i;let n=`<img src="${r}" alt="${_(t)}"`;return e&&(n+=` title="${_(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:_(r.text)}},ze=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},y=class be{options;renderer;textRenderer;constructor(e){this.options=e||O,this.options.renderer=this.options.renderer||new ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ze}static parse(e,t){return new be(t).parse(e)}static parseInline(e,t){return new be(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=o||"";continue}}let n=i;switch(n.type){case"space":{t+=this.renderer.space(n);break}case"hr":{t+=this.renderer.hr(n);break}case"heading":{t+=this.renderer.heading(n);break}case"code":{t+=this.renderer.code(n);break}case"table":{t+=this.renderer.table(n);break}case"blockquote":{t+=this.renderer.blockquote(n);break}case"list":{t+=this.renderer.list(n);break}case"checkbox":{t+=this.renderer.checkbox(n);break}case"html":{t+=this.renderer.html(n);break}case"def":{t+=this.renderer.def(n);break}case"paragraph":{t+=this.renderer.paragraph(n);break}case"text":{t+=this.renderer.text(n);break}default:{let a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){s+=o||"";continue}}let a=n;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},Z=class{options;block;constructor(r){this.options=r||O}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$.lex:$.lexInline}provideParser(r=this.block){return r?y.parse:y.parseInline}},ti=class{defaults=_e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=ie;TextRenderer=ze;Lexer=$;Tokenizer=se;Hooks=Z;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let a of n)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=s;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let a=i[n].flat(1/0);t=t.concat(this.walkTokens(a,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=n.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),t.renderer){let i=this.defaults.renderer||new ie(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,o=t.renderer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d||""}}s.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new se(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,o=t.tokenizer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Z;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,o=t.hooks[a],l=i[a];Z.passThroughHooks.has(n)?i[a]=c=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await o.call(i,c);return l.call(i,p)})();let d=o.call(i,c);return l.call(i,d)}:i[a]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(i,c);return p===!1&&(p=await l.apply(i,c)),p})();let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;s.walkTokens=function(a){let o=[];return o.push(n.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return $.lex(r,e??this.defaults)}parser(r,e){return y.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},i={...this.defaults,...s},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?$.lex:$.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser(r):r?y.parse:y.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?$.lex:$.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?y.parse:y.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return n(a)}}}onError(r,e){return t=>{if(t.message+=`
150
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+_(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},L=new ti;function m(r,e){return L.parse(r,e)}m.options=m.setOptions=function(r){return L.setOptions(r),m.defaults=L.defaults,gt(m.defaults),m};m.getDefaults=_e;m.defaults=O;function si(...r){return L.use(...r),m.defaults=L.defaults,gt(m.defaults),m}m.use=si;m.walkTokens=function(r,e){return L.walkTokens(r,e)};m.parseInline=L.parseInline;m.Parser=y;m.parser=y.parse;m.Renderer=ie;m.TextRenderer=ze;m.Lexer=$;m.lexer=$.lex;m.Tokenizer=se;m.Hooks=Z;m.parse=m;m.options;m.setOptions;m.walkTokens;m.parseInline;y.parse;$.lex;/**
149
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${A(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=Ye(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+A(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=Ye(r);if(i===null)return A(t);r=i;let n=`<img src="${r}" alt="${A(t)}"`;return e&&(n+=` title="${A(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:A(r.text)}},Pe=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},w=class me{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pe}static parse(e,t){return new me(t).parse(e)}static parseInline(e,t){return new me(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let o=i,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){t+=a||"";continue}}let n=i;switch(n.type){case"space":{t+=this.renderer.space(n);break}case"hr":{t+=this.renderer.hr(n);break}case"heading":{t+=this.renderer.heading(n);break}case"code":{t+=this.renderer.code(n);break}case"table":{t+=this.renderer.table(n);break}case"blockquote":{t+=this.renderer.blockquote(n);break}case"list":{t+=this.renderer.list(n);break}case"checkbox":{t+=this.renderer.checkbox(n);break}case"html":{t+=this.renderer.html(n);break}case"def":{t+=this.renderer.def(n);break}case"paragraph":{t+=this.renderer.paragraph(n);break}case"text":{t+=this.renderer.text(n);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){s+=a||"";continue}}let o=n;switch(o.type){case"escape":{s+=t.text(o);break}case"html":{s+=t.html(o);break}case"link":{s+=t.link(o);break}case"image":{s+=t.image(o);break}case"checkbox":{s+=t.checkbox(o);break}case"strong":{s+=t.strong(o);break}case"em":{s+=t.em(o);break}case"codespan":{s+=t.codespan(o);break}case"br":{s+=t.br(o);break}case"del":{s+=t.del(o);break}case"text":{s+=t.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},K=class{options;block;constructor(r){this.options=r||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?y.lex:y.lexInline}provideParser(r=this.block){return r?w.parse:w.parseInline}},si=class{defaults=Se();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w;Renderer=re;TextRenderer=Pe;Lexer=y;Tokenizer=ie;Hooks=K;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let o of n)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let i=s;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let o=i[n].flat(1/0);t=t.concat(this.walkTokens(o,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=n.apply(this,o)),a}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),t.renderer){let i=this.defaults.renderer||new re(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,a=t.renderer[o],l=i[o];i[o]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=l.apply(i,c)),d||""}}s.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new ie(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,a=t.tokenizer[o],l=i[o];i[o]=(...c)=>{let d=a.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new K;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,a=t.hooks[o],l=i[o];K.passThroughHooks.has(n)?i[o]=c=>{if(this.defaults.async&&K.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await a.call(i,c);return l.call(i,p)})();let d=a.call(i,c);return l.call(i,d)}:i[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(i,c);return p===!1&&(p=await l.apply(i,c)),p})();let d=a.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;s.walkTokens=function(o){let a=[];return a.push(n.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return y.lex(r,e??this.defaults)}parser(r,e){return w.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},i={...this.defaults,...s},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(e):e,a=await(i.hooks?await i.hooks.provideLexer(r):r?y.lex:y.lexInline)(o,i),l=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser(r):r?w.parse:w.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let o=(i.hooks?i.hooks.provideLexer(r):r?y.lex:y.lexInline)(e,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let a=(i.hooks?i.hooks.provideParser(r):r?w.parse:w.parseInline)(o,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(o){return n(o)}}}onError(r,e){return t=>{if(t.message+=`
150
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+A(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},I=new si;function x(r,e){return I.parse(r,e)}x.options=x.setOptions=function(r){return I.setOptions(r),x.defaults=I.defaults,ft(x.defaults),x};x.getDefaults=Se;x.defaults=M;function ii(...r){return I.use(...r),x.defaults=I.defaults,ft(x.defaults),x}x.use=ii;x.walkTokens=function(r,e){return I.walkTokens(r,e)};x.parseInline=I.parseInline;x.Parser=w;x.parser=w.parse;x.Renderer=re;x.TextRenderer=Pe;x.Lexer=y;x.lexer=y.lex;x.Tokenizer=ie;x.Hooks=K;x.parse=x;x.options;x.setOptions;x.walkTokens;x.parseInline;w.parse;y.lex;/**
151
151
  * @license
152
152
  * Copyright 2017 Google LLC
153
153
  * SPDX-License-Identifier: BSD-3-Clause
154
- */const ii={CHILD:2},ri=r=>(...e)=>({_$litDirective$:r,values:e});class ni{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
154
+ */const ri={CHILD:2},ni=r=>(...e)=>({_$litDirective$:r,values:e});class oi{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
155
155
  * @license
156
156
  * Copyright 2017 Google LLC
157
157
  * SPDX-License-Identifier: BSD-3-Clause
158
- */class xe extends ni{constructor(e){if(super(e),this.it=x,e.type!==ii.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===D)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}xe.directiveName="unsafeHTML",xe.resultType=1;const ai=ri(xe);let Xe=0;class oi extends S{static{this.properties={tags:{attribute:!1},active:{attribute:!1},onToggle:{attribute:!1},allowCreate:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=q`
158
+ */class xe extends oi{constructor(e){if(super(e),this.it=m,e.type!==ri.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===D)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}xe.directiveName="unsafeHTML",xe.resultType=1;const ai=ni(xe);let et=0;class li extends _{static{this.properties={tags:{attribute:!1},active:{attribute:!1},onToggle:{attribute:!1},allowCreate:{attribute:!1},width:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=O`
159
159
  :host {
160
160
  display: inline-block;
161
161
  position: relative;
162
- width: 260px;
162
+ width: fit-content;
163
+ min-width: 200px;
164
+ max-width: 100%;
163
165
  font: inherit;
164
166
  font-size: 13px;
165
167
  }
@@ -267,7 +269,7 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
267
269
  .option input { margin: 0; pointer-events: none; }
268
270
  .empty { padding: 6px 8px; opacity: 0.6; font-style: italic; font-size: 12px; }
269
271
  .create-option { color: var(--accent); font-style: italic; }
270
- `}constructor(){super(),new ae(this),this.tags=[],this.active=[],this.onToggle=()=>{},this.allowCreate=!1,this.#r=`--tag-multiselect-${++Xe}`,this.#i=`tag-multiselect-listbox-${Xe}`}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#a(){const e=this.#e.value.trim().toLowerCase();return e?this.tags.filter(t=>t.toLowerCase().includes(e)):this.tags}#o(){this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#o(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#o()}#p(e){this.onToggle(e),this.#e.set(""),this.#s.set(-1)}get#u(){if(!this.allowCreate)return!1;const e=this.#e.value.trim();return e.length>0&&!this.tags.includes(e)&&!this.active.includes(e)}#f(e){e.stopPropagation(),this.active.forEach(t=>this.onToggle(t)),this.#e.set(""),this.renderRoot.querySelector(".input")?.focus(),this.#o()}#b(e){const t=this.#a;if(e.key==="ArrowDown")e.preventDefault(),this.#o(),t.length&&this.#s.set((this.#s.value+1)%t.length);else if(e.key==="ArrowUp")e.preventDefault(),this.#o(),t.length&&this.#s.set((this.#s.value-1+t.length)%t.length);else if(e.key==="Enter"||this.allowCreate&&e.key===","){const s=t[this.#s.value];s!==void 0?(e.preventDefault(),this.#p(s)):this.#u&&(e.preventDefault(),this.#p(this.#e.value.trim()))}else if(e.key==="Backspace"&&!this.#e.value&&this.active.length>0){const s=this.active[this.active.length-1];s!==void 0&&this.onToggle(s)}else e.key==="Escape"&&this.#c()}render(){const e=this.active,t=this.#a,s=this.#t.value,i=this.#s.value;return h`
272
+ `}constructor(){super(),new ae(this),this.tags=[],this.active=[],this.onToggle=()=>{},this.allowCreate=!1,this.#r=`--tag-multiselect-${++et}`,this.#i=`tag-multiselect-listbox-${et}`}willUpdate(){this.style.width=this.width??""}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#o(){const e=this.#e.value.trim().toLowerCase();return e?this.tags.filter(t=>t.toLowerCase().includes(e)):this.tags}#a(){this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#a(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#a()}#p(e){this.onToggle(e),this.#e.set(""),this.#s.set(-1)}get#u(){if(!this.allowCreate)return!1;const e=this.#e.value.trim();return e.length>0&&!this.tags.includes(e)&&!this.active.includes(e)}#f(e){e.stopPropagation(),this.active.forEach(t=>this.onToggle(t)),this.#e.set(""),this.renderRoot.querySelector(".input")?.focus(),this.#a()}#b(e){const t=this.#o;if(e.key==="ArrowDown")e.preventDefault(),this.#a(),t.length&&this.#s.set((this.#s.value+1)%t.length);else if(e.key==="ArrowUp")e.preventDefault(),this.#a(),t.length&&this.#s.set((this.#s.value-1+t.length)%t.length);else if(e.key==="Enter"||this.allowCreate&&e.key===","){const s=t[this.#s.value];s!==void 0?(e.preventDefault(),this.#p(s)):this.#u&&(e.preventDefault(),this.#p(this.#e.value.trim()))}else if(e.key==="Backspace"&&!this.#e.value&&this.active.length>0){const s=this.active[this.active.length-1];s!==void 0&&this.onToggle(s)}else e.key==="Escape"&&this.#c()}render(){const e=this.active,t=this.#o,s=this.#t.value,i=this.#s.value;return h`
271
273
  <div class="field" style=${`anchor-name: ${this.#r}`}>
272
274
  <div class="chips-and-input">
273
275
  ${e.map(n=>h`
@@ -286,8 +288,8 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
286
288
  placeholder=${e.length===0?"Filter by tag…":""}
287
289
  .value=${this.#e.value}
288
290
  @input=${n=>this.#n(n)}
289
- @focus=${()=>this.#o()}
290
- @click=${()=>this.#o()}
291
+ @focus=${()=>this.#a()}
292
+ @click=${()=>this.#a()}
291
293
  @keydown=${n=>this.#b(n)}
292
294
  />
293
295
  </div>
@@ -310,13 +312,13 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
310
312
  popover="manual"
311
313
  style=${`position-anchor: ${this.#r}`}
312
314
  >
313
- ${t.length?t.map((n,a)=>h`
315
+ ${t.length?t.map((n,o)=>h`
314
316
  <li
315
- id=${`${this.#i}-opt-${a}`}
317
+ id=${`${this.#i}-opt-${o}`}
316
318
  role="option"
317
319
  aria-selected=${e.includes(n)}
318
- class=${a===i?"option highlighted":"option"}
319
- @mousedown=${o=>o.preventDefault()}
320
+ class=${o===i?"option highlighted":"option"}
321
+ @mousedown=${a=>a.preventDefault()}
320
322
  @click=${()=>this.#p(n)}
321
323
  >
322
324
  <input type="checkbox" .checked=${e.includes(n)} tabindex="-1" />
@@ -332,7 +334,7 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
332
334
  </li>
333
335
  `:h`<li class="empty">${this.allowCreate?"Type to create a tag":"No matches"}</li>`}
334
336
  </ul>
335
- `}}customElements.define("tag-multiselect",oi);let et=0;class li extends S{static{this.properties={options:{attribute:!1},value:{attribute:!1},onChange:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=q`
337
+ `}}customElements.define("tag-multiselect",li);let tt=0;class ci extends _{static{this.properties={options:{attribute:!1},value:{attribute:!1},onChange:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=O`
336
338
  :host {
337
339
  display: inline-block;
338
340
  position: relative;
@@ -419,7 +421,7 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
419
421
  .option.selected { font-weight: 600; }
420
422
  .empty { padding: 6px 8px; opacity: 0.6; font-style: italic; font-size: 12px; }
421
423
  .create-option { color: var(--accent); font-style: italic; }
422
- `}constructor(){super(),new ae(this),this.options=[],this.value="",this.onChange=()=>{},this.#r=`--status-select-${++et}`,this.#i=`status-select-listbox-${et}`}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#a(){const e=this.#e.value.trim().toLowerCase();return!e||e===this.value.trim().toLowerCase()?this.options:this.options.filter(t=>t.toLowerCase().includes(e))}#o(){this.#e.set(this.value),this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.#e.set(this.value),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#o(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#t.value||this.#o()}#p(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}#u(e){const t=this.#p(e);if(!t)return this.#c();this.onChange(t),this.#e.set(t),this.#s.set(-1),this.#c()}get#f(){const e=this.#p(this.#e.value);return e.length>0&&!this.options.some(t=>t.toLowerCase()===e)}get#b(){return this.#a.length+(this.#f?1:0)}#x(e){const t=this.#b;if(e.key==="ArrowDown")e.preventDefault(),this.#o(),t&&this.#s.set((this.#s.value+1)%t);else if(e.key==="ArrowUp")e.preventDefault(),this.#o(),t&&this.#s.set((this.#s.value-1+t)%t);else if(e.key==="Enter"){e.preventDefault();const s=this.#a,i=s[this.#s.value];i!==void 0?this.#u(i):this.#s.value===s.length&&this.#f?this.#u(this.#e.value):this.#e.value.trim()&&this.#u(this.#e.value)}else e.key==="Escape"&&(e.preventDefault(),this.#c())}render(){const e=this.value,t=this.#a,s=this.#t.value,i=this.#s.value;return h`
424
+ `}constructor(){super(),new ae(this),this.options=[],this.value="",this.onChange=()=>{},this.#r=`--status-select-${++tt}`,this.#i=`status-select-listbox-${tt}`}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#o(){const e=this.#e.value.trim().toLowerCase();return!e||e===this.value.trim().toLowerCase()?this.options:this.options.filter(t=>t.toLowerCase().includes(e))}#a(){this.#e.set(this.value),this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.#e.set(this.value),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#a(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#t.value||this.#a()}#p(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}#u(e){const t=this.#p(e);if(!t)return this.#c();this.onChange(t),this.#e.set(t),this.#s.set(-1),this.#c()}get#f(){const e=this.#p(this.#e.value);return e.length>0&&!this.options.some(t=>t.toLowerCase()===e)}get#b(){return this.#o.length+(this.#f?1:0)}#m(e){const t=this.#b;if(e.key==="ArrowDown")e.preventDefault(),this.#a(),t&&this.#s.set((this.#s.value+1)%t);else if(e.key==="ArrowUp")e.preventDefault(),this.#a(),t&&this.#s.set((this.#s.value-1+t)%t);else if(e.key==="Enter"){e.preventDefault();const s=this.#o,i=s[this.#s.value];i!==void 0?this.#u(i):this.#s.value===s.length&&this.#f?this.#u(this.#e.value):this.#e.value.trim()&&this.#u(this.#e.value)}else e.key==="Escape"&&(e.preventDefault(),this.#c())}render(){const e=this.value,t=this.#o,s=this.#t.value,i=this.#s.value;return h`
423
425
  <div class="field" style=${`anchor-name: ${this.#r}`}>
424
426
  <input
425
427
  class="input"
@@ -430,9 +432,9 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
430
432
  aria-activedescendant=${i>=0?`${this.#i}-opt-${i}`:""}
431
433
  .value=${s?this.#e.value:e}
432
434
  @input=${n=>this.#n(n)}
433
- @focus=${()=>this.#o()}
434
- @click=${()=>this.#o()}
435
- @keydown=${n=>this.#x(n)}
435
+ @focus=${()=>this.#a()}
436
+ @click=${()=>this.#a()}
437
+ @keydown=${n=>this.#m(n)}
436
438
  @blur=${()=>{this.#t.value&&this.#e.value.trim()&&this.#p(this.#e.value)!==e?this.#u(this.#e.value):this.#c()}}
437
439
  />
438
440
  <button
@@ -452,13 +454,13 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
452
454
  popover="manual"
453
455
  style=${`position-anchor: ${this.#r}`}
454
456
  >
455
- ${t.map((n,a)=>h`
457
+ ${t.map((n,o)=>h`
456
458
  <li
457
- id=${`${this.#i}-opt-${a}`}
459
+ id=${`${this.#i}-opt-${o}`}
458
460
  role="option"
459
461
  aria-selected=${n===e}
460
- class=${`option ${n===e?"selected":""} ${a===i?"highlighted":""}`}
461
- @mousedown=${o=>o.preventDefault()}
462
+ class=${`option ${n===e?"selected":""} ${o===i?"highlighted":""}`}
463
+ @mousedown=${a=>a.preventDefault()}
462
464
  @click=${()=>this.#u(n)}
463
465
  >
464
466
  ${n}
@@ -477,7 +479,113 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
477
479
  `:""}
478
480
  ${!t.length&&!this.#f?h`<li class="empty">No options</li>`:""}
479
481
  </ul>
480
- `}}customElements.define("status-select",li);const tt="mem-bucket-detail-view-mode";function ci(r){return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(r))}const hi=["stable","beta","unreviewed"],pi=["active","shipped","abandoned"],st=["plan","spec","sql","testing-todo","discovery","session-summary","other"],di=["ticket","freeform"];function it(r){return{description:r.description??"",tags:r.tags??[],status:r.status??"",name:r.name??"",owner:r.owner??"",extends:r.extends??"",trigger_phrases:r.trigger_phrases??[],key:r.key??"",key_type:r.key_type??"",doc_type:r.doc_type??"",related_to:r.related_to??""}}class ui extends S{constructor(){super(...arguments),this._viewMode=localStorage.getItem(tt)??"markdown",this._editing=!1,this._draft=null,this._addingFrontmatter=!1,this._renaming=!1,this._renameValue=""}static{this.properties={selected:{attribute:!1},onChanged:{attribute:!1},facets:{attribute:!1},onTagClick:{attribute:!1},onRootClick:{attribute:!1},onDateClick:{attribute:!1},_doc:{state:!0},_viewMode:{state:!0},_editing:{state:!0},_draft:{state:!0},_addingFrontmatter:{state:!0},_renaming:{state:!0},_renameValue:{state:!0}}}static{this.styles=q`
482
+ `}}customElements.define("status-select",ci);let hi=0;const pi={top:"top: auto; bottom: anchor(top); left: anchor(center); right: auto; translate: -50% 0; margin-top: 0; margin-bottom: 6px;",bottom:"top: anchor(bottom); bottom: auto; left: anchor(center); right: auto; translate: -50% 0; margin-top: 6px; margin-bottom: 0;",left:"top: anchor(center); bottom: auto; left: auto; right: anchor(left); translate: 0 -50%; margin-right: 6px;",right:"top: anchor(center); bottom: auto; left: anchor(right); right: auto; translate: 0 -50%; margin-left: 6px;"},di=["top","bottom","left","right"];class ui extends _{static{this.properties={text:{attribute:!1},placement:{attribute:!1}}}#e;#t=null;static{this.styles=O`
483
+ :host {
484
+ display: inline-flex;
485
+ position: relative;
486
+ vertical-align: middle;
487
+ }
488
+ .icon {
489
+ display: inline-flex;
490
+ align-items: center;
491
+ justify-content: center;
492
+ width: 14px;
493
+ height: 14px;
494
+ border-radius: 50%;
495
+ border: 1px solid var(--border-strong);
496
+ background: transparent;
497
+ color: inherit;
498
+ opacity: 0.55;
499
+ font-size: 10px;
500
+ line-height: 1;
501
+ cursor: help;
502
+ padding: 0;
503
+ }
504
+ .icon:hover, .icon:focus-visible {
505
+ opacity: 1;
506
+ border-color: var(--accent);
507
+ color: var(--accent);
508
+ }
509
+
510
+ .bubble {
511
+ /* Primary position (top/bottom/left/right + translate + margin) and
512
+ position-try-fallbacks are both set inline per-instance from the placement property —
513
+ see PRIMARY_POSITION/#fallbackNames and the inline style in render() below. */
514
+ position: fixed;
515
+ inset: auto;
516
+ border: 1px solid var(--border);
517
+ border-radius: 6px;
518
+ background: var(--bg);
519
+ color: inherit;
520
+ box-shadow: 0 6px 20px var(--shadow);
521
+ padding: 6px 9px;
522
+ max-width: 240px;
523
+ width: max-content;
524
+ font-size: 12px;
525
+ line-height: 1.4;
526
+ font-weight: 400;
527
+ text-align: left;
528
+ }
529
+ .bubble[popover] { display: none; }
530
+ .bubble:popover-open { display: block; }
531
+
532
+ /* One @position-try block per side. Named per-side (not per-placement-order) so any
533
+ placement's fallback list can reference the same four blocks in a different order. */
534
+ @position-try --bubble-top {
535
+ top: auto;
536
+ bottom: anchor(top);
537
+ left: anchor(center);
538
+ right: auto;
539
+ translate: -50% 0;
540
+ margin: 0 0 6px;
541
+ }
542
+ @position-try --bubble-bottom {
543
+ top: anchor(bottom);
544
+ bottom: auto;
545
+ left: anchor(center);
546
+ right: auto;
547
+ translate: -50% 0;
548
+ margin: 6px 0 0;
549
+ }
550
+ @position-try --bubble-left {
551
+ top: anchor(center);
552
+ bottom: auto;
553
+ left: auto;
554
+ right: anchor(left);
555
+ translate: 0 -50%;
556
+ margin: 0 6px 0 0;
557
+ }
558
+ @position-try --bubble-right {
559
+ top: anchor(center);
560
+ bottom: auto;
561
+ left: anchor(right);
562
+ right: auto;
563
+ translate: 0 -50%;
564
+ margin: 0 0 0 6px;
565
+ }
566
+ `}constructor(){super(),this.text="",this.placement="top",this.#e=`--help-tooltip-${++hi}`}get#s(){const e=di.filter(t=>t!==this.placement);return[this.placement,...e].map(t=>`--bubble-${t}`).join(", ")}disconnectedCallback(){this.#t&&clearTimeout(this.#t),super.disconnectedCallback()}#r(){this.#t&&(clearTimeout(this.#t),this.#t=null);const e=this.renderRoot.querySelector(".bubble");e&&!e.matches(":popover-open")&&e.showPopover()}#i(){this.#t=setTimeout(()=>{this.renderRoot.querySelector(".bubble")?.hidePopover()},100)}render(){return h`
567
+ <button
568
+ type="button"
569
+ class="icon"
570
+ style=${`anchor-name: ${this.#e}`}
571
+ aria-describedby="bubble"
572
+ @mouseenter=${()=>this.#r()}
573
+ @mouseleave=${()=>this.#i()}
574
+ @focus=${()=>this.#r()}
575
+ @blur=${()=>this.#i()}
576
+ >?</button>
577
+ <div
578
+ id="bubble"
579
+ role="tooltip"
580
+ class="bubble"
581
+ popover="manual"
582
+ style=${`position-anchor: ${this.#e}; position-try-fallbacks: ${this.#s}; ${pi[this.placement]}`}
583
+ @mouseenter=${()=>this.#r()}
584
+ @mouseleave=${()=>this.#i()}
585
+ >
586
+ ${this.text}
587
+ </div>
588
+ `}}customElements.define("help-tooltip",ui);const st="mem-bucket-detail-view-mode";function gi(r){return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(r))}const fi=["stable","beta","unreviewed"],bi=["active","shipped","abandoned"],it=["plan","spec","sql","testing-todo","discovery","session-summary","other"],mi=["ticket","freeform"],$={description:"What this doc is / does, shown in search results and list views. For skills, this is also the only thing an agent sees before deciding whether to load the full body — so state both what it does and when to use it.",tags:"Free-form keywords used to filter and search. Not the only thing matched during full-text search, but the fastest way to narrow a list view.",status:`Lifecycle state — stable/beta/unreviewed for skills, active/shipped/abandoned for memory docs. Skills default to "unreviewed" if left unset, so low-trust content doesn't read as equivalent to a reviewed pattern.`,name:"The skill's identifier — becomes its containing folder name on disk. Lowercase letters, numbers, and hyphens only.",owner:"Who authored or maintains this skill — a person or team name, free text.",extends:"Name of another skill this one builds on or specializes, if any. Leave blank if it doesn't extend anything.",trigger_phrases:"Extra keyword phrases beyond the description that should surface this skill in search — phrasings a user might type that don't literally appear in the description text.",key:"The lookup handle for this memory doc — usually a ticket ID, sometimes a free-form name. One key can have several docs attached (a plan, a spec, session notes) all retrievable together.",key_type:'"ticket" if the key is a real ticket ID, "freeform" for a name like "Spot Chart Design".',doc_type:"What kind of content this is — shapes how it should be read (a plan reads differently than raw SQL or a session summary).",related_to:"Another key this doc relates to, if any — free text, not validated against existing keys."};function rt(r){return{description:r.description??"",tags:r.tags??[],status:r.status??"",name:r.name??"",owner:r.owner??"",extends:r.extends??"",trigger_phrases:r.trigger_phrases??[],key:r.key??"",key_type:r.key_type??"",doc_type:r.doc_type??"",related_to:r.related_to??""}}class xi extends _{constructor(){super(...arguments),this._viewMode=localStorage.getItem(st)??"markdown",this._editing=!1,this._draft=null,this._addingFrontmatter=!1,this._renaming=!1,this._renameValue=""}static{this.properties={selected:{attribute:!1},onChanged:{attribute:!1},facets:{attribute:!1},onTagClick:{attribute:!1},onRootClick:{attribute:!1},onDateClick:{attribute:!1},_doc:{state:!0},_viewMode:{state:!0},_editing:{state:!0},_draft:{state:!0},_addingFrontmatter:{state:!0},_renaming:{state:!0},_renameValue:{state:!0}}}static{this.styles=O`
481
589
  :host { display: block; padding: 16px; }
482
590
  h2 { margin: 0 0 4px; font-size: 16px; }
483
591
  .title-row {
@@ -662,6 +770,9 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
662
770
  font-size: 11px;
663
771
  font-weight: 600;
664
772
  opacity: 0.7;
773
+ display: inline-flex;
774
+ align-items: center;
775
+ gap: 4px;
665
776
  }
666
777
  .field input[type='text'],
667
778
  .field select,
@@ -723,18 +834,18 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
723
834
  color: inherit;
724
835
  }
725
836
  .hint { font-size: 11px; opacity: 0.6; }
726
- `}updated(e){e.has("selected")&&this.selected&&(this._editing=!1,this._addingFrontmatter=!1,this._renaming=!1,this.#e(),this.scrollTop=0)}async#e(){const{table:e,id:t}=this.selected,s=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`);this._doc=s.ok?await s.json():null,await this.updateComplete,this.shadowRoot?.querySelector(".markdown-body")?.scrollTo(0,0),this.shadowRoot?.querySelector("pre")?.scrollTo(0,0)}#t(){this._doc?.source_path&&navigator.clipboard?.writeText(this._doc.source_path)}#s(e){this._viewMode=e,localStorage.setItem(tt,e)}async#r(){const{table:e,id:t}=this.selected,s=!this._doc?.deprecated;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/deprecated`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({deprecated:s})}),await this.#e(),this.onChanged?.()}async#i(){const{table:e,id:t}=this.selected,s=!this._doc?.paused;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/paused`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({paused:s})}),await this.#e(),this.onChanged?.()}async#d(){if(!window.confirm("Delete this doc? This can't be undone."))return;const{table:e,id:t}=this.selected;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"DELETE"}),this._doc=null,this.onChanged?.()}#a(){this._doc&&(this._draft=it(this._doc),this._editing=!0,this._addingFrontmatter=!1)}#o(){this._doc&&(this._draft=it(this._doc),this._addingFrontmatter=!0,this._editing=!1)}#c(e){this._draft&&(this._draft={...this._draft,doc_type:e},this._addingFrontmatter=!1,this._editing=!0)}#h(){this._editing=!1,this._addingFrontmatter=!1,this._draft=null}#n(e){this._draft&&(this._draft={...this._draft,...e})}#p(e){if(!this._draft)return;const t=this._draft.tags.includes(e)?this._draft.tags.filter(s=>s!==e):[...this._draft.tags,e];this.#n({tags:t})}#u(e){if(!this._draft)return;const t=this._draft.trigger_phrases.includes(e)?this._draft.trigger_phrases.filter(s=>s!==e):[...this._draft.trigger_phrases,e];this.#n({trigger_phrases:t})}async#f(){if(!this._draft||!this.selected)return;const{table:e,id:t}=this.selected,s=e==="skills",i={description:this._draft.description,tags:this._draft.tags,status:this._draft.status};s?(i.owner=this._draft.owner||null,i.extends=this._draft.extends||null,i.trigger_phrases=this._draft.trigger_phrases):(i.key=this._draft.key,i.key_type=this._draft.key_type,i.doc_type=this._draft.doc_type,i.related_to=this._draft.related_to||null);const n=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({frontmatter:i})});if(!n.ok){const a=await n.json().catch(()=>({}));window.alert(`Save failed: ${a.error??n.statusText}`);return}this._editing=!1,this._draft=null,await this.#e(),this.onChanged?.()}async#b(){if(!this.selected||!this._doc||this.selected.table!=="memory_docs")return;const{table:e,id:t}=this.selected;if(!window.confirm(`Delete frontmatter for "${this._doc.key}"?
837
+ `}updated(e){e.has("selected")&&this.selected&&(this._editing=!1,this._addingFrontmatter=!1,this._renaming=!1,this.#e(),this.scrollTop=0)}async#e(){const{table:e,id:t}=this.selected,s=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`);this._doc=s.ok?await s.json():null,await this.updateComplete,this.shadowRoot?.querySelector(".markdown-body")?.scrollTo(0,0),this.shadowRoot?.querySelector("pre")?.scrollTo(0,0)}#t(){this._doc?.source_path&&navigator.clipboard?.writeText(this._doc.source_path)}#s(e){this._viewMode=e,localStorage.setItem(st,e)}async#r(){const{table:e,id:t}=this.selected,s=!this._doc?.deprecated;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/deprecated`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({deprecated:s})}),await this.#e(),this.onChanged?.()}async#i(){const{table:e,id:t}=this.selected,s=!this._doc?.paused;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/paused`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({paused:s})}),await this.#e(),this.onChanged?.()}async#d(){if(!window.confirm("Delete this doc? This can't be undone."))return;const{table:e,id:t}=this.selected;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"DELETE"}),this._doc=null,this.onChanged?.()}#o(){this._doc&&(this._draft=rt(this._doc),this._editing=!0,this._addingFrontmatter=!1)}#a(){this._doc&&(this._draft=rt(this._doc),this._addingFrontmatter=!0,this._editing=!1)}#c(e){this._draft&&(this._draft={...this._draft,doc_type:e},this._addingFrontmatter=!1,this._editing=!0)}#h(){this._editing=!1,this._addingFrontmatter=!1,this._draft=null}#n(e){this._draft&&(this._draft={...this._draft,...e})}#p(e){if(!this._draft)return;const t=this._draft.tags.includes(e)?this._draft.tags.filter(s=>s!==e):[...this._draft.tags,e];this.#n({tags:t})}#u(e){if(!this._draft)return;const t=this._draft.trigger_phrases.includes(e)?this._draft.trigger_phrases.filter(s=>s!==e):[...this._draft.trigger_phrases,e];this.#n({trigger_phrases:t})}async#f(){if(!this._draft||!this.selected)return;const{table:e,id:t}=this.selected,s=e==="skills",i={description:this._draft.description,tags:this._draft.tags,status:this._draft.status};s?(i.owner=this._draft.owner||null,i.extends=this._draft.extends||null,i.trigger_phrases=this._draft.trigger_phrases):(i.key=this._draft.key,i.key_type=this._draft.key_type,i.doc_type=this._draft.doc_type,i.related_to=this._draft.related_to||null);const n=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({frontmatter:i})});if(!n.ok){const o=await n.json().catch(()=>({}));window.alert(`Save failed: ${o.error??n.statusText}`);return}this._editing=!1,this._draft=null,await this.#e(),this.onChanged?.()}async#b(){if(!this.selected||!this._doc||this.selected.table!=="memory_docs")return;const{table:e,id:t}=this.selected;if(!window.confirm(`Delete frontmatter for "${this._doc.key}"?
727
838
 
728
- This removes the doc's key, tags, and status — it drops out of key-based lookup and full-text search, and becomes a plain unmanaged file, until frontmatter is added again.`))return;const i=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/frontmatter`,{method:"DELETE"});if(!i.ok){const n=await i.json().catch(()=>({}));window.alert(`Delete failed: ${n.error??i.statusText}`);return}this._doc=null,this.selected=null,this.onChanged?.()}#x(){this._doc&&(this._renameValue=this._doc.name??"",this._renaming=!0)}async#k(){if(!this._doc||!this._renameValue.trim())return;const e=this._renameValue.trim();if(e===this._doc.name){this._renaming=!1;return}const t=await fetch(`/api/entries/skills/${encodeURIComponent(this._doc.name)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({new_name:e})});if(!t.ok){const s=await t.json().catch(()=>({}));window.alert(`Rename failed: ${s.error??t.statusText}`);return}this._renaming=!1,this.selected={table:"skills",id:e},await this.#e(),this.onChanged?.()}#m(){return h`
839
+ This removes the doc's key, tags, and status — it drops out of key-based lookup and full-text search, and becomes a plain unmanaged file, until frontmatter is added again.`))return;const i=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/frontmatter`,{method:"DELETE"});if(!i.ok){const n=await i.json().catch(()=>({}));window.alert(`Delete failed: ${n.error??i.statusText}`);return}this._doc=null,this.selected=null,this.onChanged?.()}#m(){this._doc&&(this._renameValue=this._doc.name??"",this._renaming=!0)}async#k(){if(!this._doc||!this._renameValue.trim())return;const e=this._renameValue.trim();if(e===this._doc.name){this._renaming=!1;return}const t=await fetch(`/api/entries/skills/${encodeURIComponent(this._doc.name)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({new_name:e})});if(!t.ok){const s=await t.json().catch(()=>({}));window.alert(`Rename failed: ${s.error??t.statusText}`);return}this._renaming=!1,this.selected={table:"skills",id:e},await this.#e(),this.onChanged?.()}#x(){return h`
729
840
  <div class="edit-form">
730
841
  <div class="hint">What kind of doc is this? This shapes which fields apply next.</div>
731
842
  <div class="field">
732
- <label>doc_type</label>
843
+ <label>doc_type <help-tooltip .text=${$.doc_type}></help-tooltip></label>
733
844
  <select
734
845
  @change=${e=>this.#c(e.target.value)}
735
846
  >
736
847
  <option value="" selected disabled>Choose…</option>
737
- ${st.map(e=>h`<option value=${e}>${e}</option>`)}
848
+ ${it.map(e=>h`<option value=${e}>${e}</option>`)}
738
849
  </select>
739
850
  </div>
740
851
  <div class="form-actions">
@@ -745,13 +856,13 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
745
856
  <div class="edit-form">
746
857
  ${e?h`
747
858
  <div class="field">
748
- <label>name</label>
859
+ <label>name <help-tooltip .text=${$.name}></help-tooltip></label>
749
860
  <div class="hint">Renaming moves the skill's folder on disk — kept as a separate action.</div>
750
861
  </div>
751
862
  `:h`
752
863
  <div class="field-row">
753
864
  <div class="field">
754
- <label>key</label>
865
+ <label>key <help-tooltip .text=${$.key}></help-tooltip></label>
755
866
  <input
756
867
  type="text"
757
868
  .value=${t.key}
@@ -759,34 +870,34 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
759
870
  />
760
871
  </div>
761
872
  <div class="field">
762
- <label>key_type</label>
873
+ <label>key_type <help-tooltip .text=${$.key_type}></help-tooltip></label>
763
874
  <select
764
875
  .value=${t.key_type}
765
876
  @change=${i=>this.#n({key_type:i.target.value})}
766
877
  >
767
- ${di.map(i=>h`<option value=${i} ?selected=${i===t.key_type}>${i}</option>`)}
878
+ ${mi.map(i=>h`<option value=${i} ?selected=${i===t.key_type}>${i}</option>`)}
768
879
  </select>
769
880
  </div>
770
881
  </div>
771
882
  <div class="field">
772
- <label>doc_type</label>
883
+ <label>doc_type <help-tooltip .text=${$.doc_type}></help-tooltip></label>
773
884
  <select
774
885
  .value=${t.doc_type}
775
886
  @change=${i=>this.#n({doc_type:i.target.value})}
776
887
  >
777
- ${st.map(i=>h`<option value=${i} ?selected=${i===t.doc_type}>${i}</option>`)}
888
+ ${it.map(i=>h`<option value=${i} ?selected=${i===t.doc_type}>${i}</option>`)}
778
889
  </select>
779
890
  </div>
780
891
  `}
781
892
  <div class="field">
782
- <label>description</label>
893
+ <label>description <help-tooltip .text=${$.description}></help-tooltip></label>
783
894
  <textarea
784
895
  .value=${t.description}
785
896
  @input=${i=>this.#n({description:i.target.value})}
786
897
  ></textarea>
787
898
  </div>
788
899
  <div class="field">
789
- <label>tags</label>
900
+ <label>tags <help-tooltip .text=${$.tags}></help-tooltip></label>
790
901
  <tag-multiselect
791
902
  .tags=${s?.tags??[]}
792
903
  .active=${t.tags}
@@ -795,9 +906,9 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
795
906
  ></tag-multiselect>
796
907
  </div>
797
908
  <div class="field">
798
- <label>status</label>
909
+ <label>status <help-tooltip .text=${$.status}></help-tooltip></label>
799
910
  <status-select
800
- .options=${[...new Set([...e?hi:pi,...s?.statuses??[]])]}
911
+ .options=${[...new Set([...e?fi:bi,...s?.statuses??[]])]}
801
912
  .value=${t.status}
802
913
  .onChange=${i=>this.#n({status:i})}
803
914
  ></status-select>
@@ -805,7 +916,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
805
916
  ${e?h`
806
917
  <div class="field-row">
807
918
  <div class="field">
808
- <label>owner</label>
919
+ <label>owner <help-tooltip .text=${$.owner}></help-tooltip></label>
809
920
  <input
810
921
  type="text"
811
922
  .value=${t.owner}
@@ -813,7 +924,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
813
924
  />
814
925
  </div>
815
926
  <div class="field">
816
- <label>extends</label>
927
+ <label>extends <help-tooltip .text=${$.extends}></help-tooltip></label>
817
928
  <input
818
929
  type="text"
819
930
  .value=${t.extends}
@@ -822,7 +933,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
822
933
  </div>
823
934
  </div>
824
935
  <div class="field">
825
- <label>trigger_phrases</label>
936
+ <label>trigger_phrases <help-tooltip .text=${$.trigger_phrases}></help-tooltip></label>
826
937
  <tag-multiselect
827
938
  .tags=${[]}
828
939
  .active=${t.trigger_phrases}
@@ -832,7 +943,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
832
943
  </div>
833
944
  `:h`
834
945
  <div class="field">
835
- <label>related_to</label>
946
+ <label>related_to <help-tooltip .text=${$.related_to}></help-tooltip></label>
836
947
  <input
837
948
  type="text"
838
949
  .value=${t.related_to}
@@ -852,7 +963,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
852
963
  ${e.root}
853
964
  </button>
854
965
  </div>
855
- `}#y(e,t){const s=e.created_at?ci(e.created_at):null;return h`
966
+ `}#y(e,t){const s=e.created_at?gi(e.created_at):null;return h`
856
967
  <dl class="info-grid">
857
968
  <dt>Description</dt>
858
969
  <dd class="description">${e.description||"—"}</dd>
@@ -868,16 +979,16 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
868
979
  ${e.deprecated||e.paused?h`
869
980
  <dt>Flags</dt>
870
981
  <dd>
871
- ${e.deprecated?h`<span class="pill warn-pill">deprecated</span>`:x}
872
- ${e.paused?h`<span class="pill muted-pill">paused</span>`:x}
982
+ ${e.deprecated?h`<span class="pill warn-pill">deprecated</span>`:m}
983
+ ${e.paused?h`<span class="pill muted-pill">paused</span>`:m}
873
984
  </dd>
874
- `:x}
985
+ `:m}
875
986
 
876
987
  ${t?h`
877
988
  ${e.owner?h`<dt>Owner</dt>
878
- <dd>${e.owner}</dd>`:x}
989
+ <dd>${e.owner}</dd>`:m}
879
990
  ${e.extends?h`<dt>Extends</dt>
880
- <dd>${e.extends}</dd>`:x}
991
+ <dd>${e.extends}</dd>`:m}
881
992
  `:h`
882
993
  <dt>Key</dt>
883
994
  <dd>${e.key}</dd>
@@ -889,7 +1000,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
889
1000
  <dd>${e.doc_type}</dd>
890
1001
 
891
1002
  ${e.related_to?h`<dt>Related to</dt>
892
- <dd>${e.related_to}</dd>`:x}
1003
+ <dd>${e.related_to}</dd>`:m}
893
1004
  `}
894
1005
 
895
1006
  <dt>Created</dt>
@@ -899,17 +1010,17 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
899
1010
  >`:h`<span class="hint">unknown</span>`}
900
1011
  </dd>
901
1012
  </dl>
902
- `}render(){if(!this.selected)return h`<div class="empty">Select an entry to view its details.</div>`;if(!this._doc)return x;const e=this._doc,t=this.selected.table==="skills",s=t&&e.root==="builtin",i=!t&&e.has_frontmatter===!1;return this._addingFrontmatter?h`${this.#g(e)}${this.#m()}`:this._editing&&this._draft?h`${this.#g(e)}${this.#v(t)}`:h`
1013
+ `}render(){if(!this.selected)return h`<div class="empty">Select an entry to view its details.</div>`;if(!this._doc)return m;const e=this._doc,t=this.selected.table==="skills",s=t&&e.root==="builtin",i=!t&&e.has_frontmatter===!1;return this._addingFrontmatter?h`${this.#g(e)}${this.#x()}`:this._editing&&this._draft?h`${this.#g(e)}${this.#v(t)}`:h`
903
1014
  ${this.#g(e)}
904
1015
  ${i?h`<div class="bare-notice">No frontmatter — this is a plain, unmanaged file.</div>`:this.#y(e,t)}
905
- ${s?x:h`
1016
+ ${s?m:h`
906
1017
  <div class="actions">
907
- ${i?h`<button class="primary" @click=${()=>this.#o()}>Add frontmatter</button>`:h`
908
- <button @click=${()=>this.#a()}>Edit</button>
909
- ${t?h`<button @click=${()=>this.#x()}>Rename</button>`:x}
1018
+ ${i?h`<button class="primary" @click=${()=>this.#a()}>Add frontmatter</button>`:h`
1019
+ <button @click=${()=>this.#o()}>Edit</button>
1020
+ ${t?h`<button @click=${()=>this.#m()}>Rename</button>`:m}
910
1021
  <button @click=${()=>this.#r()}>${e.deprecated?"Un-deprecate":"Mark deprecated"}</button>
911
1022
  <button @click=${()=>this.#i()}>${e.paused?"Resume":"Pause"}</button>
912
- ${t?x:h`<button class="danger" @click=${()=>this.#b()}>Delete frontmatter</button>`}
1023
+ ${t?m:h`<button class="danger" @click=${()=>this.#b()}>Delete frontmatter</button>`}
913
1024
  `}
914
1025
  <button class="danger" @click=${()=>this.#d()}>Delete</button>
915
1026
  </div>
@@ -924,7 +1035,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
924
1035
  <button @click=${()=>this.#k()}>Save</button>
925
1036
  <button @click=${()=>this._renaming=!1}>Cancel</button>
926
1037
  </div>
927
- `:x}
1038
+ `:m}
928
1039
  `}
929
1040
  <div class="view-toggle">
930
1041
  <button
@@ -940,9 +1051,9 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
940
1051
  Raw
941
1052
  </button>
942
1053
  </div>
943
- ${this._viewMode==="markdown"?h`<div class="markdown-body">${ai(m.parse(e.body??"",{async:!1}))}</div>`:h`<pre>${e.raw_file??e.body}</pre>`}
1054
+ ${this._viewMode==="markdown"?h`<div class="markdown-body">${ai(x.parse(e.body??"",{async:!1}))}</div>`:h`<pre>${e.raw_file??e.body}</pre>`}
944
1055
  <div class="source-path" title="click to copy" @click=${()=>this.#t()}>${e.source_path}</div>
945
- `}}customElements.define("detail-panel",ui);class gi extends S{static{this.properties={defaultKind:{attribute:!1},lockKind:{attribute:!1},onAdded:{attribute:!1},onCancel:{attribute:!1}}}#e=new u("skill");#t=new u("");#s=new u([]);#r=new u(null);#i=new u("");#d=new u("");#a=new u("");#o=new u(!1);#c=new u(!1);#h=new u(!1);#n=new u("");static{this.styles=q`
1056
+ `}}customElements.define("detail-panel",xi);class ki extends _{static{this.properties={defaultKind:{attribute:!1},lockKind:{attribute:!1},onAdded:{attribute:!1},onCancel:{attribute:!1}}}#e=new u("skill");#t=new u("");#s=new u([]);#r=new u(null);#i=new u("");#d=new u("");#o=new u("");#a=new u(!1);#c=new u(!1);#h=new u(!1);#n=new u("");static{this.styles=O`
946
1057
  :host { display: block; }
947
1058
  .backdrop {
948
1059
  position: fixed; inset: 0; background: var(--overlay);
@@ -1025,7 +1136,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1025
1136
  border-radius: 6px; cursor: pointer; font-size: 13px;
1026
1137
  }
1027
1138
  .error { color: var(--danger); font-size: 12px; }
1028
- `}constructor(){super(),new ae(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#p()}async#p(e){const t=new URLSearchParams;e&&t.set("path",e),this.#c.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#a.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#t.set(i.path),this.#r.set(i.parent),this.#s.set(i.entries),this.#a.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#u(){this.#c.set(!this.#c.value),this.#p(this.#t.value)}#f(){this.#n.set(""),this.#h.set(!0)}#b(){this.#h.set(!1),this.#n.set("")}async#x(){const e=this.#n.value.trim();if(e){this.#a.set("");try{const t=await fetch("/api/fs/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:this.#t.value,name:e})}),s=await t.json();if(!t.ok){this.#a.set(s.error??"failed to create folder");return}this.#h.set(!1),this.#n.set(""),await this.#p(this.#t.value)}catch(t){this.#a.set(t.message)}}}#k(){this.#i.set(this.#t.value),this.#d.value||this.#d.set(this.#t.value.split("/").filter(Boolean).pop()??"")}async#m(){const e=this.#i.value||this.#t.value;if(e){this.#o.set(!0),this.#a.set("");try{const t=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#d.value||void 0,path:e})}),s=await t.json();if(!t.ok){this.#a.set(s.error??"failed to add root");return}this.onAdded()}finally{this.#o.set(!1)}}}render(){const e=this.#s.value;return h`
1139
+ `}constructor(){super(),new ae(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#p()}async#p(e){const t=new URLSearchParams;e&&t.set("path",e),this.#c.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#o.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#t.set(i.path),this.#r.set(i.parent),this.#s.set(i.entries),this.#o.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#u(){this.#c.set(!this.#c.value),this.#p(this.#t.value)}#f(){this.#n.set(""),this.#h.set(!0)}#b(){this.#h.set(!1),this.#n.set("")}async#m(){const e=this.#n.value.trim();if(e){this.#o.set("");try{const t=await fetch("/api/fs/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:this.#t.value,name:e})}),s=await t.json();if(!t.ok){this.#o.set(s.error??"failed to create folder");return}this.#h.set(!1),this.#n.set(""),await this.#p(this.#t.value)}catch(t){this.#o.set(t.message)}}}#k(){this.#i.set(this.#t.value),this.#d.value||this.#d.set(this.#t.value.split("/").filter(Boolean).pop()??"")}async#x(){const e=this.#i.value||this.#t.value;if(e){this.#a.set(!0),this.#o.set("");try{const t=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#d.value||void 0,path:e})}),s=await t.json();if(!t.ok){this.#o.set(s.error??"failed to add root");return}this.onAdded()}finally{this.#a.set(!1)}}}render(){const e=this.#s.value;return h`
1029
1140
  <div class="backdrop" @click=${t=>t.target===t.currentTarget&&this.onCancel()}>
1030
1141
  <div class="modal">
1031
1142
  <div class="header"><h2>Add a root</h2></div>
@@ -1060,9 +1171,9 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1060
1171
  placeholder="Folder name"
1061
1172
  .value=${this.#n.value}
1062
1173
  @input=${t=>this.#n.set(t.target.value)}
1063
- @keydown=${t=>{t.key==="Enter"&&this.#x(),t.key==="Escape"&&this.#b()}}
1174
+ @keydown=${t=>{t.key==="Enter"&&this.#m(),t.key==="Escape"&&this.#b()}}
1064
1175
  />
1065
- <button @click=${()=>this.#x()}>Create</button>
1176
+ <button @click=${()=>this.#m()}>Create</button>
1066
1177
  <button @click=${()=>this.#b()}>Cancel</button>
1067
1178
  </div>
1068
1179
  `:""}
@@ -1088,21 +1199,21 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1088
1199
  @input=${t=>this.#d.set(t.target.value)}
1089
1200
  />
1090
1201
  </div>
1091
- ${this.#a.value?h`<div class="error">${this.#a.value}</div>`:""}
1202
+ ${this.#o.value?h`<div class="error">${this.#o.value}</div>`:""}
1092
1203
  <div class="actions">
1093
1204
  <button class="secondary" @click=${()=>this.onCancel()}>Cancel</button>
1094
1205
  <button
1095
1206
  class="primary"
1096
- ?disabled=${!this.#i.value||this.#o.value}
1097
- @click=${()=>this.#m()}
1207
+ ?disabled=${!this.#i.value||this.#a.value}
1208
+ @click=${()=>this.#x()}
1098
1209
  >
1099
- ${this.#o.value?"Adding…":"Add root"}
1210
+ ${this.#a.value?"Adding…":"Add root"}
1100
1211
  </button>
1101
1212
  </div>
1102
1213
  </div>
1103
1214
  </div>
1104
1215
  </div>
1105
- `}}customElements.define("add-root-modal",gi);const fi=[{value:"all",label:"All"},{value:"skill",label:"Skills"},{value:"memory",label:"Memories"}],rt=[{value:"all",label:"Show all"},{value:"hide",label:"Hide"},{value:"only",label:"Only"}],bi={tags:[],statuses:[],owners:[],doc_types:[],key_types:[],roots:[]},xi={skill:[],memory:[]},_t="mem-bucket-split-pct",St=20,At=80;function mi(){const r=Number(localStorage.getItem(_t));return Number.isFinite(r)&&r>=St&&r<=At?r:40}const Tt="mem-bucket-theme",pe=["system","light","dark"],ki={system:"◐",light:"☀",dark:"☾"},vi={system:"Auto",light:"Light",dark:"Dark"};function $i(){const r=localStorage.getItem(Tt);return r==="light"||r==="dark"?r:"system"}function nt(r){r==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",r)}function yi(){const r=location.hash.slice(1);if(!r)return{};const e=new URLSearchParams(r),t={},s=e.get("q");s&&(t.query=s);const i=e.get("type");(i==="skill"||i==="memory"||i==="all")&&(t.typeFilter=i);const n=e.getAll("tag");n.length&&(t.activeTags=n);const a=e.getAll("root");a.length&&(t.activeRoots=a);const o=e.get("sort");o&&(t.sort=o);const l=e.get("deprecated");l==="0"?t.deprecatedFilter="hide":l==="1"&&(t.deprecatedFilter="only");const c=e.get("paused");c==="0"?t.pausedFilter="hide":c==="1"&&(t.pausedFilter="only");const d=e.get("date_from");d&&(t.dateFrom=d);const p=e.get("date_to");return p&&(t.dateTo=p),t}class wi extends S{static{this.styles=q`
1216
+ `}}customElements.define("add-root-modal",ki);const vi=[{value:"all",label:"All"},{value:"skill",label:"Skills"},{value:"memory",label:"Memories"}],nt=[{value:"all",label:"Show all"},{value:"hide",label:"Hide"},{value:"only",label:"Only"}],$i={tags:[],statuses:[],owners:[],doc_types:[],key_types:[],roots:[]},yi={skill:[],memory:[]},St="mem-bucket-split-pct",At=20,Tt=80;function wi(){const r=Number(localStorage.getItem(St));return Number.isFinite(r)&&r>=At&&r<=Tt?r:40}const Ct="mem-bucket-theme",de=["system","light","dark"],_i={system:"◐",light:"☀",dark:"☾"},Si={system:"Auto",light:"Light",dark:"Dark"};function Ai(){const r=localStorage.getItem(Ct);return r==="light"||r==="dark"?r:"system"}function ot(r){r==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",r)}function Ti(){const r=location.hash.slice(1);if(!r)return{};const e=new URLSearchParams(r),t={},s=e.get("q");s&&(t.query=s);const i=e.get("type");(i==="skill"||i==="memory"||i==="all")&&(t.typeFilter=i);const n=e.getAll("tag");n.length&&(t.activeTags=n);const o=e.getAll("root");o.length&&(t.activeRoots=o);const a=e.get("sort");a&&(t.sort=a);const l=e.get("deprecated");l==="0"?t.deprecatedFilter="hide":l==="1"&&(t.deprecatedFilter="only");const c=e.get("paused");c==="0"?t.pausedFilter="hide":c==="1"&&(t.pausedFilter="only");const d=e.get("date_from");d&&(t.dateFrom=d);const p=e.get("date_to");return p&&(t.dateTo=p),t}class Ci extends _{static{this.styles=O`
1106
1217
  :host { display: flex; flex-direction: column; height: 100vh; }
1107
1218
  .theme-toggle {
1108
1219
  position: fixed;
@@ -1307,26 +1418,26 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1307
1418
  cursor: pointer;
1308
1419
  }
1309
1420
  .bulk-bar button.danger { border-color: var(--danger); color: var(--danger); }
1310
- `}#e=yi();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#r=new u(this.#e.activeTags??[]);#i=new u(this.#e.activeRoots??[]);#d=new u([]);#a=new u(bi);#o=new u(null);#c=new u(xi);#h=new u(!1);#n=new u("");#p=new u(!1);#u=new u(mi());#f=new u(!1);#b=new u(this.#e.sort??"mtime_desc");#x=new u(this.#e.deprecatedFilter??"all");#k=new u(this.#e.pausedFilter??"all");#m=new u(this.#e.dateFrom??"");#v=new u(this.#e.dateTo??"");#g=new u(new Set);#y=new u($i());#_=new u(!1);#T=e=>this.#I(e);#C=()=>this.#N();constructor(){super(),new ae(this),nt(this.#y.value)}#D(e){this.#y.set(e),localStorage.setItem(Tt,e),nt(e)}#L(){const e=pe[(pe.indexOf(this.#y.value)+1)%pe.length];this.#D(e)}async#O(){if(!this.#_.value){this.#_.set(!0);try{await fetch("/api/rebuild-cache",{method:"POST"}),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#_.set(!1)}}}#M(e){e.preventDefault(),this.#f.set(!0),document.addEventListener("pointermove",this.#T),document.addEventListener("pointerup",this.#C)}#I(e){const t=this.renderRoot.querySelector(".body-region");if(!t)return;const s=t.getBoundingClientRect(),i=(e.clientX-s.left)/s.width*100;this.#u.set(Math.min(At,Math.max(St,i)))}#N(){this.#f.set(!1),document.removeEventListener("pointermove",this.#T),document.removeEventListener("pointerup",this.#C),localStorage.setItem(_t,String(this.#u.value))}#q=new ss(()=>{const e=new URLSearchParams;this.#s.value!=="all"&&e.set("type",this.#s.value),this.#t.value.trim()&&e.set("q",this.#t.value.trim());for(const t of this.#r.value)e.append("tag",t);for(const t of this.#i.value)e.append("root",t);return this.#b.value!=="mtime_desc"&&e.set("sort",this.#b.value),this.#x.value==="hide"?e.set("deprecated","0"):this.#x.value==="only"&&e.set("deprecated","1"),this.#k.value==="hide"?e.set("paused","0"):this.#k.value==="only"&&e.set("paused","1"),this.#m.value&&e.set("date_from",this.#m.value),this.#v.value&&e.set("date_to",this.#v.value),e.toString()});#S=()=>this.#U();connectedCallback(){super.connectedCallback(),this.#l(),this.#$(),this.#w(),window.addEventListener("focus",this.#S),document.addEventListener("visibilitychange",this.#S)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("focus",this.#S),document.removeEventListener("visibilitychange",this.#S)}#U(){document.visibilityState==="visible"&&(this.#l(),this.#$(),this.#w())}async#l(){const e=this.#q.value;history.replaceState(null,"",e?`#${e}`:location.pathname+location.search);const t=await fetch(`/api/entries?${e}`);this.#d.set(await t.json()),this.renderRoot.querySelector("result-list")?.scrollTo(0,0)}async#$(){const e=this.#s.value==="all"?"":`?type=${this.#s.value}`,t=await fetch(`/api/facets${e}`);this.#a.set(await t.json())}async#w(){const e=await fetch("/api/roots");this.#c.set(await e.json()),this.#p.set(!0)}#F(e){const t=this.#i.value;this.#i.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}async#H(e,t){if(t.stopPropagation(),window.prompt(`Type "${e.name}" to remove this ${e.kind} root (files on disk are untouched):`)===e.name){this.#n.set(e.name);try{await fetch(`/api/roots/${e.kind}/${encodeURIComponent(e.name)}`,{method:"DELETE"}),this.#i.set(this.#i.value.filter(i=>i!==e.name)),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#n.set("")}}}#R(){this.#h.set(!1),this.#w(),this.#$(),this.#l()}#B(){return[...this.#c.value.skill,...this.#c.value.memory]}#j(e){this.#s.set(e),this.#r.set([]),this.#$(),this.#l()}#Z(e){const t=this.#r.value;this.#r.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}#K(e){this.#r.value.includes(e)||this.#r.set([...this.#r.value,e]),this.#l()}#Q(e){this.#i.value.includes(e)||this.#i.set([...this.#i.value,e]),this.#l()}#V(e){this.#m.set(e),this.#v.set(e),this.#l()}#W(e){this.#t.set(e.target.value),this.#l()}#Y(){this.#t.set(""),this.#l()}#G(e){this.#o.set({table:e._table,id:e.id})}#J(e){this.#b.set(e.target.value),this.#l()}#X(e){this.#x.set(e.target.value),this.#l()}#ee(e){this.#k.set(e.target.value),this.#l()}#te(e){this.#m.set(e.target.value),this.#l()}#se(e){this.#v.set(e.target.value),this.#l()}#ie(){this.#m.set(""),this.#v.set(""),this.#l()}#re(e){const t=new Set(this.#g.value);t.has(e.id)?t.delete(e.id):t.add(e.id),this.#g.set(t)}#ne(){return new Map(this.#d.value.map(e=>[e.id,e]))}#A(){const e=new Map,t=this.#ne();for(const s of this.#g.value){const i=t.get(s);if(!i)continue;const n=e.get(i._table)??[];n.push(s),e.set(i._table,n)}return e}async#E(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/deprecated`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,deprecated:e})}))),this.#g.set(new Set),await this.#l()}async#z(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/paused`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,paused:e})}))),this.#g.set(new Set),await this.#l()}async#ae(){if(!window.confirm(`Delete ${this.#g.value.size} doc(s)? This can't be undone.`))return;const e=this.#A();await Promise.all([...e.entries()].map(([t,s])=>fetch(`/api/entries/${t}/bulk/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s})}))),this.#g.set(new Set),await this.#l()}#P(){const e=this.#y.value;return h`
1421
+ `}#e=Ti();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#r=new u(this.#e.activeTags??[]);#i=new u(this.#e.activeRoots??[]);#d=new u([]);#o=new u($i);#a=new u(null);#c=new u(yi);#h=new u(!1);#n=new u("");#p=new u(!1);#u=new u(wi());#f=new u(!1);#b=new u(this.#e.sort??"mtime_desc");#m=new u(this.#e.deprecatedFilter??"all");#k=new u(this.#e.pausedFilter??"all");#x=new u(this.#e.dateFrom??"");#v=new u(this.#e.dateTo??"");#g=new u(new Set);#y=new u(Ai());#_=new u(!1);#T=e=>this.#M(e);#C=()=>this.#N();constructor(){super(),new ae(this),ot(this.#y.value)}#L(e){this.#y.set(e),localStorage.setItem(Ct,e),ot(e)}#D(){const e=de[(de.indexOf(this.#y.value)+1)%de.length];this.#L(e)}async#I(){if(!this.#_.value){this.#_.set(!0);try{await fetch("/api/rebuild-cache",{method:"POST"}),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#_.set(!1)}}}#O(e){e.preventDefault(),this.#f.set(!0),document.addEventListener("pointermove",this.#T),document.addEventListener("pointerup",this.#C)}#M(e){const t=this.renderRoot.querySelector(".body-region");if(!t)return;const s=t.getBoundingClientRect(),i=(e.clientX-s.left)/s.width*100;this.#u.set(Math.min(Tt,Math.max(At,i)))}#N(){this.#f.set(!1),document.removeEventListener("pointermove",this.#T),document.removeEventListener("pointerup",this.#C),localStorage.setItem(St,String(this.#u.value))}#q=new is(()=>{const e=new URLSearchParams;this.#s.value!=="all"&&e.set("type",this.#s.value),this.#t.value.trim()&&e.set("q",this.#t.value.trim());for(const t of this.#r.value)e.append("tag",t);for(const t of this.#i.value)e.append("root",t);return this.#b.value!=="mtime_desc"&&e.set("sort",this.#b.value),this.#m.value==="hide"?e.set("deprecated","0"):this.#m.value==="only"&&e.set("deprecated","1"),this.#k.value==="hide"?e.set("paused","0"):this.#k.value==="only"&&e.set("paused","1"),this.#x.value&&e.set("date_from",this.#x.value),this.#v.value&&e.set("date_to",this.#v.value),e.toString()});#S=()=>this.#U();connectedCallback(){super.connectedCallback(),this.#l(),this.#$(),this.#w(),window.addEventListener("focus",this.#S),document.addEventListener("visibilitychange",this.#S)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("focus",this.#S),document.removeEventListener("visibilitychange",this.#S)}#U(){document.visibilityState==="visible"&&(this.#l(),this.#$(),this.#w())}async#l(){const e=this.#q.value;history.replaceState(null,"",e?`#${e}`:location.pathname+location.search);const t=await fetch(`/api/entries?${e}`);this.#d.set(await t.json()),this.renderRoot.querySelector("result-list")?.scrollTo(0,0)}async#$(){const e=this.#s.value==="all"?"":`?type=${this.#s.value}`,t=await fetch(`/api/facets${e}`);this.#o.set(await t.json())}async#w(){const e=await fetch("/api/roots");this.#c.set(await e.json()),this.#p.set(!0)}#F(e){const t=this.#i.value;this.#i.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}async#H(e,t){if(t.stopPropagation(),window.prompt(`Type "${e.name}" to remove this ${e.kind} root (files on disk are untouched):`)===e.name){this.#n.set(e.name);try{await fetch(`/api/roots/${e.kind}/${encodeURIComponent(e.name)}`,{method:"DELETE"}),this.#i.set(this.#i.value.filter(i=>i!==e.name)),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#n.set("")}}}#R(){this.#h.set(!1),this.#w(),this.#$(),this.#l()}#B(){return[...this.#c.value.skill,...this.#c.value.memory]}#j(e){this.#s.set(e),this.#r.set([]),this.#$(),this.#l()}#Z(e){const t=this.#r.value;this.#r.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}#K(e){this.#r.value.includes(e)||this.#r.set([...this.#r.value,e]),this.#l()}#Q(e){this.#i.value.includes(e)||this.#i.set([...this.#i.value,e]),this.#l()}#W(e){this.#x.set(e),this.#v.set(e),this.#l()}#V(e){this.#t.set(e.target.value),this.#l()}#Y(){this.#t.set(""),this.#l()}#G(e){this.#a.set({table:e._table,id:e.id})}#J(e){this.#b.set(e.target.value),this.#l()}#X(e){this.#m.set(e.target.value),this.#l()}#ee(e){this.#k.set(e.target.value),this.#l()}#te(e){this.#x.set(e.target.value),this.#l()}#se(e){this.#v.set(e.target.value),this.#l()}#ie(){this.#x.set(""),this.#v.set(""),this.#l()}#re(e){const t=new Set(this.#g.value);t.has(e.id)?t.delete(e.id):t.add(e.id),this.#g.set(t)}#ne(){return new Map(this.#d.value.map(e=>[e.id,e]))}#A(){const e=new Map,t=this.#ne();for(const s of this.#g.value){const i=t.get(s);if(!i)continue;const n=e.get(i._table)??[];n.push(s),e.set(i._table,n)}return e}async#E(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/deprecated`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,deprecated:e})}))),this.#g.set(new Set),await this.#l()}async#z(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/paused`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,paused:e})}))),this.#g.set(new Set),await this.#l()}async#oe(){if(!window.confirm(`Delete ${this.#g.value.size} doc(s)? This can't be undone.`))return;const e=this.#A();await Promise.all([...e.entries()].map(([t,s])=>fetch(`/api/entries/${t}/bulk/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s})}))),this.#g.set(new Set),await this.#l()}#P(){const e=this.#y.value;return h`
1311
1422
  <button
1312
1423
  class="theme-toggle"
1313
- title=${`Theme: ${vi[e]} (click to change)`}
1424
+ title=${`Theme: ${Si[e]} (click to change)`}
1314
1425
  aria-label="Toggle color theme"
1315
- @click=${()=>this.#L()}
1426
+ @click=${()=>this.#D()}
1316
1427
  >
1317
- ${ki[e]}
1428
+ ${_i[e]}
1318
1429
  </button>
1319
- `}#oe(){const e=this.#_.value;return h`
1430
+ `}#ae(){const e=this.#_.value;return h`
1320
1431
  <button
1321
1432
  class=${`reindex-toggle${e?" spinning":""}`}
1322
1433
  title=${e?"Reindexing…":"Rebuild cache from disk"}
1323
1434
  aria-label="Rebuild cache from disk"
1324
1435
  ?disabled=${e}
1325
- @click=${()=>this.#O()}
1436
+ @click=${()=>this.#I()}
1326
1437
  >
1327
1438
 
1328
1439
  </button>
1329
- `}render(){const e=this.#a.value,t=this.#B();return this.#p.value&&t.length===0&&!this.#h.value?h`
1440
+ `}render(){const e=this.#o.value,t=this.#B();return this.#p.value&&t.length===0&&!this.#h.value?h`
1330
1441
  ${this.#P()}
1331
1442
  <div class="first-run">
1332
1443
  <h1>No roots configured yet</h1>
@@ -1343,7 +1454,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1343
1454
  .onCancel=${()=>this.#h.set(!1)}
1344
1455
  ></add-root-modal>`:""}
1345
1456
  `:h`
1346
- ${this.#oe()}
1457
+ ${this.#ae()}
1347
1458
  ${this.#P()}
1348
1459
  <div class="roots-bar">
1349
1460
  <span class="filter-label">Roots:</span>
@@ -1371,7 +1482,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1371
1482
  type="search"
1372
1483
  placeholder="Search descriptions, bodies, tags..."
1373
1484
  .value=${this.#t.value}
1374
- @input=${s=>this.#W(s)}
1485
+ @input=${s=>this.#V(s)}
1375
1486
  />
1376
1487
  ${this.#t.value?h`
1377
1488
  <button
@@ -1385,7 +1496,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1385
1496
  `:""}
1386
1497
  </div>
1387
1498
  <div class="row type-toggle">
1388
- ${fi.map(s=>h`
1499
+ ${vi.map(s=>h`
1389
1500
  <button
1390
1501
  class=${this.#s.value===s.value?"active":""}
1391
1502
  @click=${()=>this.#j(s.value)}
@@ -1399,6 +1510,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1399
1510
  .tags=${e.tags}
1400
1511
  .active=${this.#r.value}
1401
1512
  .onToggle=${s=>this.#Z(s)}
1513
+ .width=${"260px"}
1402
1514
  ></tag-multiselect>
1403
1515
  `}
1404
1516
  <span class="filter-label">Dates:</span>
@@ -1406,7 +1518,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1406
1518
  <input
1407
1519
  type="date"
1408
1520
  aria-label="From date"
1409
- .value=${this.#m.value}
1521
+ .value=${this.#x.value}
1410
1522
  @change=${s=>this.#te(s)}
1411
1523
  />
1412
1524
  <span class="date-range-sep">–</span>
@@ -1416,7 +1528,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1416
1528
  .value=${this.#v.value}
1417
1529
  @change=${s=>this.#se(s)}
1418
1530
  />
1419
- ${this.#m.value||this.#v.value?h`
1531
+ ${this.#x.value||this.#v.value?h`
1420
1532
  <button
1421
1533
  class="date-range-clear"
1422
1534
  title="Clear date range"
@@ -1435,12 +1547,12 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1435
1547
  <option value="name_asc">Name</option>
1436
1548
  </select>
1437
1549
  <span class="filter-label">Deprecated:</span>
1438
- <select .value=${this.#x.value} @change=${s=>this.#X(s)}>
1439
- ${rt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1550
+ <select .value=${this.#m.value} @change=${s=>this.#X(s)}>
1551
+ ${nt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1440
1552
  </select>
1441
1553
  <span class="filter-label">Paused:</span>
1442
1554
  <select .value=${this.#k.value} @change=${s=>this.#ee(s)}>
1443
- ${rt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1555
+ ${nt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1444
1556
  </select>
1445
1557
  </div>
1446
1558
  </div>
@@ -1451,7 +1563,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1451
1563
  <button @click=${()=>this.#E(!1)}>Un-deprecate</button>
1452
1564
  <button @click=${()=>this.#z(!0)}>Pause</button>
1453
1565
  <button @click=${()=>this.#z(!1)}>Resume</button>
1454
- <button class="danger" @click=${()=>this.#ae()}>Delete</button>
1566
+ <button class="danger" @click=${()=>this.#oe()}>Delete</button>
1455
1567
  <button @click=${()=>this.#g.set(new Set)}>Clear</button>
1456
1568
  </div>
1457
1569
  `:""}
@@ -1466,15 +1578,15 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1466
1578
  ></result-list>
1467
1579
  <div
1468
1580
  class="splitter ${this.#f.value?"dragging":""}"
1469
- @pointerdown=${s=>this.#M(s)}
1581
+ @pointerdown=${s=>this.#O(s)}
1470
1582
  ></div>
1471
1583
  <detail-panel
1472
- .selected=${this.#o.value}
1584
+ .selected=${this.#a.value}
1473
1585
  .facets=${e}
1474
1586
  .onChanged=${()=>{this.#l(),this.#$()}}
1475
1587
  .onTagClick=${s=>this.#K(s)}
1476
1588
  .onRootClick=${s=>this.#Q(s)}
1477
- .onDateClick=${s=>this.#V(s)}
1589
+ .onDateClick=${s=>this.#W(s)}
1478
1590
  ></detail-panel>
1479
1591
  </div>
1480
1592
  ${this.#h.value?h`<add-root-modal
@@ -1483,4 +1595,4 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1483
1595
  .onAdded=${()=>this.#R()}
1484
1596
  .onCancel=${()=>this.#h.set(!1)}
1485
1597
  ></add-root-modal>`:""}
1486
- `}}customElements.define("mem-bucket-app",wi);
1598
+ `}}customElements.define("mem-bucket-app",Ci);
@@ -27,7 +27,7 @@
27
27
  :root[data-theme='dark'] { color-scheme: dark; }
28
28
  body { font-family: system-ui, sans-serif; margin: 0; background: var(--bg); color: var(--fg); }
29
29
  </style>
30
- <script type="module" crossorigin src="/assets/index-DPkF4wtg.js"></script>
30
+ <script type="module" crossorigin src="/assets/index-CqgDoHFV.js"></script>
31
31
  </head>
32
32
  <body>
33
33
  <mem-bucket-app></mem-bucket-app>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-memory-bucket",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "description": "MCP server exposing skill_* (reusable coding patterns) and memory_* (point-in-time working context) tools over a markdown+frontmatter source, cached into SQLite at runtime.",
6
6
  "repository": {