chat-logbook 0.18.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,7 @@ The full problem statement, user stories, and direction live in the [PRD](docs/P
33
33
 
34
34
  - **Three-column layout.** Resizable panels for filters, chat list, and conversation — in a Solarized Dark theme that matches Claude Code's terminal.
35
35
  - **Rich rendering.** Markdown, syntax-highlighted code, collapsible tool calls with one-line summaries, and collapsible thinking.
36
- - **Long chats stay fast.** A conversation opens at its latest message and scrolls smoothly however far it runs; a corner button and `⌘↑` / `⌘↓` (or `Home` / `End`) jump to the start or the latest.
36
+ - **Long chats stay fast.** A conversation opens at its latest message and scrolls smoothly however far it runs; a corner button, `⌘↑` / `⌘↓` (`Ctrl` elsewhere), or `Home` / `End` jump to the start or the latest.
37
37
  - **Metadata at a glance.** The ⓘ in the header shows when a chat started and last changed, its agent, project, and IDs — with one-click copy.
38
38
 
39
39
  **Finding & organizing**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chat-logbook",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "A local-first conversation manager for Claude Code",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -20,7 +20,7 @@ Error generating stack: `+e.message+`
20
20
  )`}return(0,H.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Fl(e){return e===`starting`?fi:_n}var Il=v.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=mi,...g}=e,{store:_}=Wc(),y=vl(),b=Va(),x=_.useState(`floatingRootContext`),S=_.useState(`mounted`),C=_.useState(`open`),w=_.useState(`openChangeReason`),T=_.useState(`activeTriggerElement`),E=_.useState(`modal`),D=_.useState(`positionerElement`),O=_.useState(`instantType`),k=_.useState(`transitionStatus`),A=_.useState(`hasViewport`),j=v.useRef(null),M=sc(D,!1,!1),N=Ml({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:y,nodeId:b,collisionAvoidance:h,adaptiveOrigin:A?kl:void 0}),P=v.useMemo(()=>{let e={};return C||(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...N.positionerStyles,...e}}},[C,S,N.positionerStyles]),F=v.useMemo(()=>({props:P,...N}),[P,N]),I=x.useState(`domReferenceElement`);rn(()=>{let e=I,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return M(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,M,_]);let L={open:C,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O},ee=v.useCallback(e=>{_.set(`positionerElement`,e)},[_]),te=wa(`div`,e,{state:L,props:[F.props,Fl(k),g],ref:[t,ee],stateAttributesMapping:ml});return(0,H.jsxs)(xl.Provider,{value:F,children:[S&&E===!0&&w!==`trigger-hover`&&(0,H.jsx)(Pl,{ref:_.context.internalBackdropRef,inert:bl(!C),cutout:T}),(0,H.jsx)(Ha,{id:b,children:te})]})}),Ll=`ArrowUp`,Rl=`ArrowDown`,zl=`ArrowLeft`,Bl=`ArrowRight`,K=`Home`,Vl=new Set([zl,Bl]),Hl=new Set([Ll,Rl]),Ul=new Set([...Vl,...Hl]);new Set([...Ul,K,`End`]);var Wl=new Set([Ll,Rl,zl,Bl,K,`End`]),Gl=v.createContext(void 0);function Kl(e){let t=v.useContext(Gl);if(t===void 0&&!e)throw Error(ia(69));return t}var ql=v.createContext(void 0);function Jl(){let[e,t]=v.useState(0),n=W(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:v.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Yl(e){let{value:t,children:n}=e;return(0,H.jsx)(ql.Provider,{value:t,children:n})}var Xl={...ml,...oc},Zl=v.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=Wc(),c=Sl(),l=Kl(!0)!=null,{context:u,hasClosePart:d}=Jl(),f=s.useState(`open`),p=s.useState(`openMethod`),m=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),y=s.useState(`descriptionElementId`),b=s.useState(`modal`),x=s.useState(`mounted`),S=s.useState(`openChangeReason`),C=s.useState(`activeTriggerElement`),w=s.useState(`floatingRootContext`);cc({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}});let T=s.useState(`disabled`),E=s.useState(`openOnHover`),D=s.useState(`closeDelay`);Dc(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?s.context.popupRef.current:!0}let k=i===void 0?O:i,A={open:f,side:c.side,align:c.align,instant:m,transitionStatus:h},j=b!==!1&&d,M=v.useCallback(e=>{s.set(`popupElement`,e)},[s]),N=wa(`div`,e,{state:A,ref:[t,s.context.popupRef,M],props:[g,{"aria-labelledby":_,"aria-describedby":y,onKeyDown(e){l&&Wl.has(e.key)&&e.stopPropagation()}},Fl(h),o],stateAttributesMapping:Xl});return(0,H.jsx)(eo,{context:w,openInteractionType:p,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:Tt(C)?C:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:(0,H.jsx)(Yl,{value:u,children:N})})});function Ql(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ql(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function $l(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ql(e))&&(r&&(r+=` `),r+=t);return r}var eu=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},tu=(e,t)=>({classGroupId:e,validator:t}),nu=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ru=`-`,iu=[],au=`arbitrary..`,ou=e=>{let t=lu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return cu(e);let n=e.split(ru);return su(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?eu(i,t):t:i||iu}return n[e]||iu}}},su=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=su(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ru):e.slice(t).join(ru),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},cu=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?au+r:void 0})(),lu=e=>{let{theme:t,classGroups:n}=e;return uu(n,t)},uu=(e,t)=>{let n=nu();for(let r in e){let i=e[r];du(i,n,r,t)}return n},du=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];fu(i,t,n,r)}},fu=(e,t,n,r)=>{if(typeof e==`string`){pu(e,t,n);return}if(typeof e==`function`){mu(e,t,n,r);return}hu(e,t,n,r)},pu=(e,t,n)=>{let r=e===``?t:gu(t,e);r.classGroupId=n},mu=(e,t,n,r)=>{if(_u(e)){du(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(tu(n,e))},hu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];du(o,gu(t,a),n,r)}},gu=(e,t)=>{let n=e,r=t.split(ru),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=nu(),n.nextPart.set(t,i)),n=i}return n},_u=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,vu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},yu=`!`,bu=`:`,xu=[],Su=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Cu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===bu){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(yu)?(c=s.slice(0,-1),l=!0):s.startsWith(yu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Su(t,l,c,u)};if(t){let e=t+bu,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Su(xu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},wu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Tu=e=>({cache:vu(e.cacheSize),parseClassName:Cu(e),sortModifiers:wu(e),...ou(e)}),Eu=/\s+/,Du=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Eu),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+yu:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Ou=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ku(n))&&(i&&(i+=` `),i+=r);return i},ku=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ku(e[r]))&&(n&&(n+=` `),n+=t);return n},Au=(e,...t)=>{let n,r,i,a,o=o=>(n=Tu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Du(e,n);return i(e,a),a};return a=o,(...e)=>a(Ou(...e))},ju=[],Mu=e=>{let t=t=>t[e]||ju;return t.isThemeGetter=!0,t},Nu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fu=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ru=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vu=e=>Fu.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),Hu=e=>!!e&&Number.isInteger(Number(e)),Uu=e=>e.endsWith(`%`)&&q(e.slice(0,-1)),Wu=e=>Iu.test(e),Gu=()=>!0,Ku=e=>Lu.test(e)&&!Ru.test(e),qu=()=>!1,Ju=e=>zu.test(e),Yu=e=>Bu.test(e),Xu=e=>!J(e)&&!Y(e),Zu=e=>fd(e,gd,qu),J=e=>Nu.test(e),Qu=e=>fd(e,_d,Ku),$u=e=>fd(e,vd,q),ed=e=>fd(e,bd,Gu),td=e=>fd(e,yd,qu),nd=e=>fd(e,md,qu),rd=e=>fd(e,hd,Yu),id=e=>fd(e,xd,Ju),Y=e=>Pu.test(e),ad=e=>pd(e,_d),od=e=>pd(e,yd),sd=e=>pd(e,md),cd=e=>pd(e,gd),ld=e=>pd(e,hd),ud=e=>pd(e,xd,!0),dd=e=>pd(e,bd,!0),fd=(e,t,n)=>{let r=Nu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pd=(e,t,n=!1)=>{let r=Pu.exec(e);return r?r[1]?t(r[1]):n:!1},md=e=>e===`position`||e===`percentage`,hd=e=>e===`image`||e===`url`,gd=e=>e===`length`||e===`size`||e===`bg-size`,_d=e=>e===`length`,vd=e=>e===`number`,yd=e=>e===`family-name`,bd=e=>e===`number`||e===`weight`,xd=e=>e===`shadow`,X=Au(()=>{let e=Mu(`color`),t=Mu(`font`),n=Mu(`text`),r=Mu(`font-weight`),i=Mu(`tracking`),a=Mu(`leading`),o=Mu(`breakpoint`),s=Mu(`container`),c=Mu(`spacing`),l=Mu(`radius`),u=Mu(`shadow`),d=Mu(`inset-shadow`),f=Mu(`text-shadow`),p=Mu(`drop-shadow`),m=Mu(`blur`),h=Mu(`perspective`),g=Mu(`aspect`),_=Mu(`ease`),v=Mu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[Vu,`full`,`auto`,...w()],E=()=>[Hu,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,Hu,Y,J]},Hu,Y,J],O=()=>[Hu,`auto`,Y,J],k=()=>[`auto`,`min`,`max`,`fr`,Y,J],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Vu,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Vu,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Vu,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Y,J],L=()=>[...b(),sd,nd,{position:[Y,J]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,cd,Zu,{size:[Y,J]}],R=()=>[Uu,ad,Qu],ne=()=>[``,`none`,`full`,l,Y,J],z=()=>[``,q,ad,Qu],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[q,Uu,sd,nd],ie=()=>[``,`none`,m,Y,J],ae=()=>[`none`,q,Y,J],oe=()=>[`none`,q,Y,J],se=()=>[q,Y,J],ce=()=>[Vu,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Wu],breakpoint:[Wu],color:[Gu],container:[Wu],"drop-shadow":[Wu],ease:[`in`,`out`,`in-out`],font:[Xu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Wu],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Wu],shadow:[Wu],spacing:[`px`,q],text:[Wu],"text-shadow":[Wu],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Vu,J,Y,g]}],container:[`container`],columns:[{columns:[q,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Hu,`auto`,Y,J]}],basis:[{basis:[Vu,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[q,Vu,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,q,Y,J]}],shrink:[{shrink:[``,q,Y,J]}],order:[{order:[Hu,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,ad,Qu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,dd,ed]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Uu,J]}],"font-family":[{font:[od,td,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[q,`none`,Y,$u]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[q,`from-font`,`auto`,Y,Qu]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[q,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Hu,Y,J],radial:[``,Y,J],conic:[Hu,Y,J]},ld,rd]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[q,Y,J]}],"outline-w":[{outline:[``,q,ad,Qu]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,ud,id]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,ud,id]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[q,Qu]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,ud,id]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[q,Y,J]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:ie()}],brightness:[{brightness:[q,Y,J]}],contrast:[{contrast:[q,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ud,id]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,q,Y,J]}],"hue-rotate":[{"hue-rotate":[q,Y,J]}],invert:[{invert:[``,q,Y,J]}],saturate:[{saturate:[q,Y,J]}],sepia:[{sepia:[``,q,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[q,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[q,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,q,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,q,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[q,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[q,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,q,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[q,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[q,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[q,ad,Qu,$u]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Sd(...e){return X($l(e))}function Cd({...e}){return(0,H.jsx)(Qc,{"data-slot":`popover`,...e})}function wd({...e}){return(0,H.jsx)(gl,{"data-slot":`popover-trigger`,...e})}function Td({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,H.jsx)(yl,{children:(0,H.jsx)(Il,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,H.jsx)(Zl,{"data-slot":`popover-content`,className:Sd(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var Ed=[`yellow`,`orange`,`red`,`magenta`,`violet`,`blue`,`cyan`,`green`],Dd={yellow:`#b58900`,orange:`#cb4b16`,red:`#dc322f`,magenta:`#d33682`,violet:`#6c71c4`,blue:`#268bd2`,cyan:`#2aa198`,green:`#859900`},Od=`#002b36`,kd=`#ffffff`;function Ad(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function jd(e){let t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return .2126*Ad(t)+.7152*Ad(n)+.0722*Ad(r)}function Md(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}var Nd=jd(Od),Pd=Object.fromEntries(Ed.map(e=>{let t=jd(Dd[e]);return[e,Md(t,1)>=Md(t,Nd)?kd:Od]}));function Fd(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return Ed[Math.abs(t)%Ed.length]}function Id({value:e,onChange:t}){return(0,H.jsx)(`div`,{"data-testid":`color-swatches`,className:`flex items-center gap-1.5`,children:Ed.map(n=>{let r=n===e;return(0,H.jsx)(`button`,{type:`button`,"aria-label":`Color ${n}`,"aria-pressed":r,onClick:()=>t(n),className:`flex h-5 w-5 items-center justify-center rounded-full transition-transform hover:scale-110 ${r?`ring-2 ring-foreground/70 ring-offset-1 ring-offset-popover`:``}`,style:{backgroundColor:Dd[n]},children:r&&(0,H.jsx)($e,{size:12,"aria-hidden":`true`,className:`text-black/70`})},n)})})}function Ld(e){return[...e].sort((e,t)=>e.name.localeCompare(t.name))}function Rd({mode:e,onChange:t}){let n=[`all`,`any`];return(0,H.jsx)(`div`,{"data-testid":`tag-match-control`,role:`group`,"aria-label":`Tag match mode`,className:`flex items-center overflow-hidden rounded-md border border-border text-[11px] font-medium`,children:n.map((r,i)=>(0,H.jsx)(`button`,{type:`button`,"data-testid":`tag-match-${r}`,"aria-pressed":e===r,onClick:()=>t(r),className:`px-2 py-0.5 capitalize transition-colors ${i<n.length-1?`border-r border-border`:``} ${e===r?`bg-primary/15 text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:r},r))})}function zd({tag:e,onCommit:t,onCancel:n}){let[r,i]=(0,v.useState)(e.name),a=()=>{let i=r.trim();i.length>0&&i!==e.name?t(i):n()};return(0,H.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),onBlur:a,onKeyDown:e=>{e.key===`Enter`?a():e.key===`Escape`&&n()},"aria-label":`Rename tag ${e.name}`,className:`min-w-0 flex-1 rounded border border-primary bg-transparent px-1.5 py-0.5 text-sm text-foreground outline-none`})}function Bd({tag:e,count:t,onRenameStart:n,onRecolor:r,onDelete:i}){let[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(`menu`);return(0,H.jsxs)(Cd,{open:a,onOpenChange:e=>{o(e),e||c(`menu`)},children:[(0,H.jsx)(wd,{"aria-label":`Manage tag ${e.name}`,className:`flex h-6 w-6 shrink-0 items-center justify-center rounded bg-card text-muted-foreground opacity-0 transition hover:bg-white/10 hover:text-foreground focus-visible:opacity-100 group-hover/tag:opacity-100 data-popup-open:opacity-100 pointer-events-none focus-visible:pointer-events-auto group-hover/tag:pointer-events-auto data-popup-open:pointer-events-auto`,children:(0,H.jsx)(rt,{size:14,"aria-hidden":`true`})}),(0,H.jsxs)(Td,{"data-testid":`tag-manage-menu`,align:`end`,sideOffset:4,className:`w-56 gap-1 p-1`,children:[s===`menu`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{o(!1),n()},className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-white/6`,children:[(0,H.jsx)(st,{size:14,"aria-hidden":`true`}),`Rename`]}),(0,H.jsxs)(`button`,{type:`button`,"data-testid":`tag-recolor-button`,onClick:()=>c(`recolor`),className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-white/6`,children:[(0,H.jsx)(ot,{size:14,"aria-hidden":`true`}),`Recolor`]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>c(`delete`),className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-destructive transition-colors hover:bg-[#3a1d23]`,children:[(0,H.jsx)(dt,{size:14,"aria-hidden":`true`}),`Delete`]})]}),s===`recolor`&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2 p-1`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>c(`menu`),className:`flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground`,children:[(0,H.jsx)(Xe,{size:12,"aria-hidden":`true`}),`Color`]}),(0,H.jsx)(Id,{value:e.color,onChange:r})]}),s===`delete`&&(0,H.jsxs)(`div`,{"data-testid":`tag-delete-confirm`,className:`p-1.5`,children:[(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 font-medium text-foreground`,children:[(0,H.jsx)(dt,{size:14,"aria-hidden":`true`,className:`text-destructive`}),`Delete tag “`,e.name,`”?`]}),(0,H.jsxs)(`p`,{className:`mt-1.5 text-xs text-muted-foreground`,children:[`It will be removed from`,` `,(0,H.jsxs)(`span`,{className:`font-medium text-foreground`,children:[t,` `,t===1?`chat`:`chats`]}),`. This can’t be undone.`]}),(0,H.jsxs)(`div`,{className:`mt-2.5 flex justify-end gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>c(`menu`),className:`rounded-md border border-border px-2.5 py-1 text-xs text-foreground transition-colors hover:bg-white/6`,children:`Cancel`}),(0,H.jsx)(`button`,{type:`button`,"data-testid":`tag-delete-confirm-button`,onClick:()=>{i(),o(!1)},className:`rounded-md bg-destructive px-2.5 py-1 text-xs font-semibold text-white transition-colors hover:bg-destructive/90`,children:`Delete`})]})]})]})]})}function Vd({tag:e,count:t,isSelected:n,dimmed:r,onToggle:i,onRename:a,onRecolor:o,onDelete:s}){let[c,l]=(0,v.useState)(!1);return c?(0,H.jsxs)(`li`,{"data-testid":`tag-manage-row`,"data-tag-id":e.id,className:`group/tag relative flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-foreground/90`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:Dd[e.color]}}),(0,H.jsx)(zd,{tag:e,onCommit:e=>{a(e),l(!1)},onCancel:()=>l(!1)})]}):(0,H.jsxs)(`li`,{"data-testid":`tag-manage-row`,"data-tag-id":e.id,"data-dimmed":r?`true`:void 0,className:`group/tag relative flex items-center rounded-md pr-2 text-sm transition ${n?`bg-primary/15`:`hover:bg-card`} ${r?`opacity-40 hover:opacity-100`:``}`,children:[(0,H.jsxs)(`button`,{type:`button`,"data-testid":`tag-filter-${e.id}`,"aria-pressed":n,onClick:i,className:`flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-left group-hover/tag:pr-8 ${n?`text-foreground`:`text-foreground/90`}`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:Dd[e.color]}}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),n&&(0,H.jsx)($e,{size:14,"aria-hidden":`true`,className:`shrink-0 text-primary group-hover/tag:hidden`})]}),(0,H.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-muted-foreground group-hover/tag:hidden`,children:t}),(0,H.jsx)(`span`,{className:`absolute right-1.5 top-1/2 -translate-y-1/2`,children:(0,H.jsx)(Bd,{tag:e,count:t,onRenameStart:()=>l(!0),onRecolor:o,onDelete:s})})]})}function Hd({count:e,isSelected:t,onToggle:n}){return(0,H.jsxs)(`li`,{className:`relative flex items-center rounded-md pr-2 text-sm transition-colors ${t?`bg-primary/15`:`hover:bg-card`}`,children:[(0,H.jsxs)(`button`,{type:`button`,"data-testid":`tag-filter-untagged`,"aria-pressed":t,onClick:n,className:`flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-left text-muted-foreground`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`h-2.5 w-2.5 shrink-0 rounded-full border border-muted-foreground/40`}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate italic`,children:`Untagged`}),t&&(0,H.jsx)($e,{size:14,"aria-hidden":`true`,className:`shrink-0 text-primary`})]}),(0,H.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-muted-foreground`,children:e})]})}function Ud({tags:e,countForTag:t,untaggedCount:n,selected:r,tagMode:i,onTagModeChange:a,onToggle:o,onRename:s,onRecolor:c,onDelete:l}){let[u,d]=(0,v.useState)(!1),f=(0,v.useMemo)(()=>Ld(e),[e]),p=r.has(``)&&i===`all`;return(0,H.jsxs)(`div`,{"data-testid":`tags-section`,className:`flex flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between px-2 py-1.5 text-xs font-medium text-muted-foreground`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,"data-testid":`tags-header`,onClick:()=>d(e=>!e),"aria-expanded":!u,className:`transition-colors hover:text-foreground`,children:`Tags`}),f.length>0&&(0,H.jsx)(Rd,{mode:i,onChange:a})]}),(0,H.jsxs)(`button`,{type:`button`,"data-testid":`tags-order-caption`,onClick:()=>d(e=>!e),"aria-expanded":!u,title:`Sorted A–Z`,className:`flex items-center gap-0.5 text-muted-foreground/80 transition-colors hover:text-foreground`,children:[`A–Z`,(0,H.jsx)(et,{size:12,"aria-hidden":`true`,className:`transition-transform ${u?`-rotate-90`:``}`})]})]}),!u&&(f.length===0?(0,H.jsx)(`p`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`No tags yet. Add one from a chat’s header.`}):(0,H.jsxs)(`ul`,{className:`flex flex-col gap-0.5`,children:[f.map(e=>(0,H.jsx)(Vd,{tag:e,count:t(e.id),isSelected:r.has(e.id),dimmed:p,onToggle:()=>o(e.id),onRename:t=>s(e.id,t),onRecolor:t=>c(e.id,t),onDelete:()=>l(e.id)},e.id)),(0,H.jsx)(Hd,{count:n,isSelected:r.has(``),onToggle:()=>o(``)})]}))]})}function Wd({deletedCount:e,onOpenTrash:t,projectFacets:n,selectedProjects:r,onToggleProject:i,onClearFilters:a,tags:o,countForTag:s,untaggedCount:c,selectedTags:l,tagMode:u,onTagModeChange:d,onToggleTag:f,onRenameTag:p,onRecolorTag:m,onDeleteTag:h}){return(0,H.jsxs)(`div`,{"data-testid":`filter-panel`,className:`flex h-full flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm font-semibold text-foreground`,children:[(0,H.jsx)(`div`,{className:`h-4 w-4 rounded bg-primary`}),`Chat Logbook`]}),(0,H.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:[(0,H.jsx)(vt,{activeCount:r.size+l.size,onClear:a}),(0,H.jsx)(_t,{facets:n,selected:r,onToggle:i}),(0,H.jsx)(Ud,{tags:o,countForTag:s,untaggedCount:c,selected:l,tagMode:u,onTagModeChange:d,onToggle:f,onRename:p,onRecolor:m,onDelete:h})]}),(0,H.jsx)(`div`,{className:`flex h-12 shrink-0 items-center border-t border-border px-2`,children:(0,H.jsxs)(`button`,{type:`button`,"data-testid":`trash-link`,onClick:t,className:`flex w-full items-center justify-between gap-2 rounded px-2 py-1.5 text-sm text-foreground transition-colors hover:bg-card`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(dt,{size:14,"aria-hidden":`true`}),`Trash`]}),e>0&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:e})]})})]})}function Gd(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
21
21
  font-size: .6rem;
22
22
  font-weight: bold;
23
- color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function Kd(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var qd=(e,t)=>Math.abs(e-t)<1.01,Jd=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Yd=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Xd=e=>e,Zd=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Qd=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Yd(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Yd(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},$d={passive:!0},ef=typeof window>`u`?!0:`onscrollend`in window,tf=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&ef?()=>void 0:Jd(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,$d);let l=e.options.useScrollendEvent&&ef;return l&&n.addEventListener(`scrollend`,c,$d),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},nf=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},rf=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},af=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Xd,rangeExtractor:Zd,onChange:()=>{},measureElement:nf,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Gd(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Gd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=Gd(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e<s;e++){let t=c[e];t&&(l[t.lane]=e)}for(let i=s;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,u;if(a!==void 0&&this.options.lanes>1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Gd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?sf({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Gd(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=Gd(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return Kd(t[of(0,t.length-1,e=>Kd(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t);this.scrollState={index:null,align:t,behavior:n,startedAt:this.now(),lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e;this.scrollState={index:null,align:`start`,behavior:t,startedAt:this.now(),lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&qd(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},of=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function sf({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=of(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var cf=typeof document<`u`?v.useLayoutEffect:v.useEffect;function lf({useFlushSync:e=!0,...t}){let n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,ka.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=v.useState(()=>new af(r));return i.setOptions(r),cf(()=>i._didMount(),[]),cf(()=>i._willUpdate()),i}function uf(e){return lf({observeElementRect:Qd,observeElementOffset:tf,scrollToFn:rf,...e})}function df({value:e,editing:t,onEditStart:n,onEditEnd:r,onSave:i,displayClassName:a,inputClassName:o,inputAriaLabel:s=`Chat title`,onDisplayClick:c}){let l=(0,v.useRef)(null),u=(0,v.useRef)(!1);(0,v.useEffect)(()=>{t&&l.current&&(l.current.focus(),l.current.select())},[t]);let d=()=>{if(u.current){u.current=!1;return}let t=l.current?.value??e;r(),t!==e&&i(t)},f=()=>{u.current=!0,r()},p=e=>{e.key===`Enter`?(e.preventDefault(),e.stopPropagation(),d()):e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.stopPropagation()};return t?(0,H.jsx)(`input`,{ref:l,"aria-label":s,defaultValue:e,maxLength:200,onKeyDown:p,onClick:e=>e.stopPropagation(),onBlur:d,className:o}):(0,H.jsx)(`span`,{onClick:e=>{c?.(e),!e.defaultPrevented&&n()},className:a,children:e})}function ff({tag:e,onRemove:t}){let n=Dd[e.color],r=Pd[e.color];return(0,H.jsxs)(`span`,{"data-testid":`tag-chip`,"data-tag-id":e.id,className:`group/chip relative inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium`,style:{backgroundColor:n,color:r},children:[(0,H.jsx)(`span`,{className:`max-w-[14ch] truncate`,children:e.name}),t&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Remove tag ${e.name}`,onClick:()=>t(e),style:{color:r},className:`absolute right-0.5 top-1/2 flex h-4 w-4 -translate-y-1/2 items-center justify-center rounded-full bg-black/25 opacity-0 transition-opacity hover:bg-black/40 focus-visible:opacity-100 group-hover/chip:opacity-100`,children:(0,H.jsx)(ft,{size:11,"aria-hidden":`true`})})]})}function pf({tags:e,max:t=3}){if(e.length===0)return null;let n=Ld(e),r=n.slice(0,t),i=n.slice(t);return(0,H.jsxs)(`span`,{"data-testid":`tag-chip-list`,className:`flex items-center gap-1 overflow-hidden`,children:[r.map(e=>(0,H.jsx)(ff,{tag:e},e.id)),i.length>0&&(0,H.jsxs)(`span`,{title:i.map(e=>e.name).join(`, `),className:`shrink-0 rounded-full bg-card px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground`,children:[`+`,i.length]})]})}function mf({chats:e,openId:t,onOpen:n,debounceMs:r=150}){let[i,a]=(0,v.useState)(-1),[o,s]=(0,v.useState)(t);t!==o&&(s(t),a(e.findIndex(e=>e.id===t)));let c=(0,v.useRef)(i);(0,v.useEffect)(()=>{c.current=i},[i]);let l=(0,v.useRef)(n);(0,v.useEffect)(()=>{l.current=n},[n]);let u=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let n=n=>{if(n.key!==`ArrowDown`&&n.key!==`ArrowUp`)return;let i=n.target;if(i?.tagName===`INPUT`||i?.tagName===`TEXTAREA`||i?.isContentEditable===!0||i instanceof Element&&i.closest(`[data-slot="popover-content"]`))return;n.preventDefault();let o=n.key===`ArrowDown`?1:-1,s=c.current,d=s>=0?s:e.findIndex(e=>e.id===t),f=Math.max(0,Math.min(d+o,e.length-1));if(f===s)return;c.current=f,a(f);let p=e[f]?.id;p&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{l.current(p)},r))};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]),(0,v.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]),{cursorId:i>=0?e[i]?.id??null:null,cursorIndex:i}}function hf({label:e,hint:t}){return(0,H.jsxs)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute right-full top-1/2 mr-1.5 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap rounded-md border border-white/10 bg-[#0a0a0a] px-2 py-1 text-xs text-card-foreground opacity-0 shadow-lg transition-opacity duration-100 group-hover/action:opacity-100`,children:[e,t&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:t})]})}var gf=5,_f=5;function vf(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function yf(e){let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24);return a>0?`${a}d ago`:i>0?`${i}h ago`:r>0?`${r}m ago`:`just now`}var bf=`inline-block max-w-full truncate align-middle rounded px-1.5 py-0.5 -mx-1.5 text-sm font-medium text-accent-foreground cursor-text transition-colors group-hover:bg-white/4`,xf=`min-w-[12ch] max-w-full rounded border border-border bg-transparent px-1.5 py-0.5 text-sm font-medium text-accent-foreground outline-none focus:border-primary [field-sizing:content]`;function Sf({icon:e,label:t,hint:n,destructive:r=!1,onClick:i}){return(0,H.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:i,className:`flex w-full items-center justify-between gap-6 rounded-md px-3 py-1.5 text-left transition-colors ${r?`text-destructive hover:bg-[#3a1d23]`:`hover:bg-white/6`}`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e,t]}),(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:n})]})}function Cf({mode:e=`main`,chats:t,selectedId:n,editingId:r,onEditingIdChange:i,onSelect:a,onDelete:o,onRestore:s,onRenameTitle:c,onBack:l,onOpenTrash:u,sortControl:d,total:f,sortSignature:p,hasMore:m=!1,onLoadMore:h,hasPrevious:g=!1,onLoadPrevious:_,selectedIds:y,onToggleSelect:b,onRangeSelect:x,onClearSelection:S,onBatchTrash:C}){let[w,T]=(0,v.useState)(null),E=r===void 0?w:r,D=e=>{T(e),i?.(e)},O=e===`trash`,[k,A]=(0,v.useState)(null),j=(0,v.useRef)(null),M=(0,v.useRef)(p),N=uf({count:t.length,getScrollElement:()=>j.current,estimateSize:()=>84,overscan:8,initialRect:{width:320,height:600},getItemKey:e=>t[e]?.id??e}),{cursorId:P,cursorIndex:F}=mf({chats:t,openId:n,onOpen:a});(0,v.useEffect)(()=>{F<0||N.scrollToIndex(F,{align:`auto`})},[F,N]),(0,v.useEffect)(()=>{if(M.current===p)return;let e=n?t.findIndex(e=>e.id===n):-1;n&&e<0||(M.current=p,e>=0?N.scrollToIndex(e,{align:`auto`}):j.current&&(j.current.scrollTop=0))},[p,n,t,N]);let I=N.getVirtualItems(),L=I[I.length-1]?.index??-1;(0,v.useEffect)(()=>{!m||!h||L>=t.length-1-gf&&h()},[m,h,L,t.length]);let ee=I[0]?.index??-1;(0,v.useEffect)(()=>{!g||!_||ee>=0&&ee<=_f&&_()},[g,_,ee]);let te=(0,v.useRef)(null),R=(0,v.useCallback)(()=>{let e=j.current;if(!e)return;let n=e.scrollTop,r=N.getVirtualItemForOffset(n),i=r?t[r.index]?.id:void 0;r&&i&&(te.current={id:i,index:r.index,delta:n-r.start})},[N,t]);(0,v.useLayoutEffect)(()=>{if(M.current!==p){te.current=null;return}let e=j.current,n=te.current;if(!e||!n)return;let r=t.findIndex(e=>e.id===n.id);if(r<0||r===n.index)return;let i=N.getOffsetForIndex(r,`start`)?.[0];i!==void 0&&(e.scrollTop=i+n.delta,te.current={...n,index:r})},[t,N,p]),(0,v.useEffect)(()=>{if(!k)return;let e=()=>A(null),t=e=>{e.key===`Escape`&&A(null)},n=window.setTimeout(()=>{document.addEventListener(`click`,e)},0);return document.addEventListener(`keydown`,t),()=>{window.clearTimeout(n),document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t)}},[k]);let ne=(e,t)=>{e.preventDefault(),A({chatId:t,x:e.clientX,y:e.clientY})},z=!!b&&!O,B=y?.size??0,re=(e,t)=>{let n=e.metaKey||e.ctrlKey;if(z&&e.shiftKey){e.preventDefault(),x?.(t,n);return}if(z&&n){e.preventDefault(),b?.(t);return}a(t)};return(0,v.useEffect)(()=>{if(B<2||!S)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),S())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[B,S]),(0,H.jsxs)(`div`,{"data-testid":`chat-list`,className:`relative flex h-full flex-col`,children:[(0,H.jsx)(`div`,{className:`flex h-12 shrink-0 items-center justify-between gap-3 border-b border-border px-4 text-sm`,children:O?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 text-xs text-primary transition-colors hover:text-primary/80`,children:[(0,H.jsx)(Xe,{size:14,"aria-hidden":`true`}),`Back`]}),d]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-accent-foreground`,children:`Chats`}),(0,H.jsx)(`span`,{"data-testid":`chat-list-count`,className:`rounded-full bg-card px-2 text-xs font-semibold tabular-nums text-muted-foreground`,children:f??t.length})]}),d]})}),(0,H.jsx)(`div`,{ref:j,"data-testid":`chat-scroll`,className:`flex-1 overflow-y-auto`,onScroll:R,children:t.length===0?(0,H.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center text-sm text-muted-foreground`,children:O?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`font-medium text-foreground`,children:`Trash is empty`}),(0,H.jsx)(`div`,{className:`mt-1 text-xs`,children:`Deleted chats appear here. They stay until you restore them.`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`font-medium text-foreground`,children:`No chats`}),u&&(0,H.jsxs)(`div`,{className:`mt-1 text-xs`,children:[`Check`,` `,(0,H.jsx)(`button`,{type:`button`,onClick:u,className:`text-primary hover:underline`,children:`Trash`}),` `,`to restore deleted ones.`]})]})}):(0,H.jsx)(`div`,{className:`relative w-full`,style:{height:`${N.getTotalSize()}px`},onClick:e=>{z&&B>=2&&e.target===e.currentTarget&&S?.()},children:N.getVirtualItems().map(e=>{let r=t[e.index],i=r.id===n,a=r.id===P,l=y?.has(r.id)??!1,u=i||a,d=l&&!u,f=E===r.id&&!!c,p=`flex w-full flex-col gap-1 border-b border-border px-4 py-3 text-left transition-colors hover:bg-card focus-visible:outline-none ${u?`border-l-2 border-l-primary bg-card`:d?`border-l-2 border-l-transparent bg-primary/10`:`border-l-2 border-l-transparent`}`,m=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`min-w-0`,children:c&&!O?(0,H.jsx)(df,{value:r.title,editing:f,onEditStart:()=>D(r.id),onEditEnd:()=>D(null),onSave:e=>c(r.id,e),onDisplayClick:e=>{i?e.stopPropagation():e.preventDefault()},displayClassName:bf,inputClassName:xf,inputAriaLabel:`Chat title`}):(0,H.jsx)(`span`,{className:bf,children:r.title})}),r.tags&&r.tags.length>0&&(0,H.jsx)(pf,{tags:r.tags}),(0,H.jsxs)(`span`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:vf(r.project)}),(0,H.jsx)(`span`,{className:`ml-2 shrink-0`,children:yf(r.updatedAt)})]})]});return(0,H.jsxs)(`div`,{"data-index":e.index,ref:N.measureElement,"data-testid":`chat-row`,"data-cursor":a||void 0,className:`group absolute left-0 right-0 top-0`,style:{transform:`translateY(${e.start}px)`},onContextMenu:e=>ne(e,r.id),children:[f?(0,H.jsx)(`div`,{className:p,children:m}):(0,H.jsx)(`button`,{onClick:e=>re(e,r.id),className:p,children:m}),(0,H.jsx)(`div`,{className:`absolute top-2 right-2 flex items-center gap-1`,children:O&&s?(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Restore: ${r.title}`,onClick:()=>s(r.id),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground opacity-0 shadow-sm transition-all hover:border-[#5f7a26] hover:bg-[#1f2e15] hover:text-[#859900] group-hover:opacity-100 focus:opacity-100`,children:(0,H.jsx)(lt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Restore`,hint:`⌫`})]}):!f&&(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Move to trash: ${r.title}`,onClick:()=>o(r.id),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground opacity-0 shadow-sm transition-all hover:border-[#a13836] hover:bg-[#3a1d23] hover:text-destructive group-hover:opacity-100 focus:opacity-100`,children:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Move to Trash`,hint:`⌫`})]})})]},r.id)})})}),k&&(0,H.jsxs)(`div`,{role:`menu`,className:`fixed z-50 min-w-50 rounded-md border border-border bg-card p-1 text-sm shadow-lg`,style:{top:k.y,left:k.x},children:[!O&&c&&(0,H.jsx)(Sf,{icon:(0,H.jsx)(st,{size:14,"aria-hidden":`true`}),label:`Rename`,hint:`F2 / ↵`,onClick:()=>{D(k.chatId),A(null)}}),O&&s?(0,H.jsx)(Sf,{icon:(0,H.jsx)(lt,{size:14,"aria-hidden":`true`}),label:`Restore`,hint:`⌫`,onClick:()=>{s(k.chatId),A(null)}}):(0,H.jsx)(Sf,{icon:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`}),label:`Move to Trash`,hint:`⌫`,destructive:!0,onClick:()=>{o(k.chatId),A(null)}})]}),z&&B>=2&&(0,H.jsxs)(`div`,{"data-testid":`batch-bar`,className:`absolute inset-x-4 bottom-4 z-20 flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-3 py-2 text-sm shadow-lg`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,H.jsxs)(`span`,{className:`font-medium tabular-nums text-accent-foreground`,children:[B,` selected`]}),(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Move to Trash`,onClick:()=>C?.(),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground shadow-sm transition-all hover:border-[#a13836] hover:bg-[#3a1d23] hover:text-destructive`,children:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Move to Trash`})]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>S?.(),className:`text-xs text-primary transition-colors hover:text-primary/80`,children:`Clear`})]})]})}function wf({orderedIds:e,primaryId:t,resetKey:n}){let[r,i]=(0,v.useState)(()=>t?new Set([t]):new Set),[a,o]=(0,v.useState)(n);return n!==a&&(o(n),i(t?new Set([t]):new Set)),{selectedIds:r,selectOnly:(0,v.useCallback)(e=>{i(new Set([e]))},[]),toggle:(0,v.useCallback)(e=>{i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),selectRange:(0,v.useCallback)((t,n,r)=>{if(t===null){i(new Set([n]));return}let a=e.indexOf(t),o=e.indexOf(n);if(a===-1||o===-1)return;let[s,c]=a<=o?[a,o]:[o,a],l=e.slice(s,c+1);i(e=>r?new Set([...e,...l]):new Set(l))},[e]),clear:(0,v.useCallback)(()=>{i(new Set)},[])}}function Tf({axes:e,field:t,direction:n,isDefault:r,directionLabels:i,onSelectField:a,onToggleDirection:o,testId:s}){let c=n===`asc`?Qe:Ye;return(0,H.jsxs)(Cd,{children:[(0,H.jsx)(wd,{"aria-label":`Sort chats`,className:Sd(`flex h-7 w-7 shrink-0 items-center justify-center rounded transition-colors hover:bg-white/4 focus-visible:outline-2 focus-visible:outline-ring`,r?`text-muted-foreground`:`text-primary`),children:(0,H.jsx)(Ze,{size:16,"aria-hidden":`true`})}),(0,H.jsxs)(Td,{"data-testid":s,align:`end`,sideOffset:6,className:`w-44 gap-0 overflow-visible p-1`,children:[(0,H.jsx)(`div`,{className:`px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`,children:`Sort by`}),e.map(e=>{let r=e.field===t;return(0,H.jsxs)(`div`,{className:`group/axis relative`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r?o():a(e.field),"aria-current":r?`true`:void 0,title:r?`Click to reverse direction`:void 0,className:Sd(`flex w-full items-center justify-between gap-2 rounded px-2 py-1.5 text-left transition-colors`,r?`bg-primary/10 text-primary`:`text-foreground hover:bg-white/6`),children:[(0,H.jsx)(`span`,{children:e.label}),r&&(0,H.jsx)(c,{size:14,"aria-hidden":`true`})]}),r&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-full top-1/2 ml-3 flex -translate-y-1/2 items-center whitespace-nowrap rounded-md border border-white/10 bg-[#0a0a0a] px-2 py-1 text-xs text-card-foreground opacity-0 shadow-lg transition-opacity duration-100 group-hover/axis:opacity-100`,children:i[e.field][n]})]},e.field)})]})]})}function Ef(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Df=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Of=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kf={};function Af(e,t){return((t||kf).jsx?Of:Df).test(e)}var jf=/[ \t\n\f\r]/g;function Mf(e){return typeof e==`object`?e.type===`text`?Nf(e.value):!1:Nf(e)}function Nf(e){return e.replace(jf,``)===``}var Pf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Pf.prototype.normal={},Pf.prototype.property={},Pf.prototype.space=void 0;function Ff(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Pf(n,r,t)}function If(e){return e.toLowerCase()}var Lf=class{constructor(e,t){this.attribute=t,this.property=e}};Lf.prototype.attribute=``,Lf.prototype.booleanish=!1,Lf.prototype.boolean=!1,Lf.prototype.commaOrSpaceSeparated=!1,Lf.prototype.commaSeparated=!1,Lf.prototype.defined=!1,Lf.prototype.mustUseProperty=!1,Lf.prototype.number=!1,Lf.prototype.overloadedBoolean=!1,Lf.prototype.property=``,Lf.prototype.spaceSeparated=!1,Lf.prototype.space=void 0;var Rf=s({boolean:()=>Z,booleanish:()=>Bf,commaOrSpaceSeparated:()=>Wf,commaSeparated:()=>Uf,number:()=>Q,overloadedBoolean:()=>Vf,spaceSeparated:()=>Hf}),zf=0,Z=Gf(),Bf=Gf(),Vf=Gf(),Q=Gf(),Hf=Gf(),Uf=Gf(),Wf=Gf();function Gf(){return 2**++zf}var Kf=Object.keys(Rf),qf=class extends Lf{constructor(e,t,n,r){let i=-1;if(super(e,t),Jf(this,`space`,r),typeof n==`number`)for(;++i<Kf.length;){let e=Kf[i];Jf(this,Kf[i],(n&Rf[e])===Rf[e])}}};qf.prototype.defined=!0;function Jf(e,t,n){n&&(e[t]=n)}function Yf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new qf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[If(r)]=r,n[If(a.attribute)]=r}return new Pf(t,n,e.space)}var Xf=Yf({properties:{ariaActiveDescendant:null,ariaAtomic:Bf,ariaAutoComplete:null,ariaBusy:Bf,ariaChecked:Bf,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Hf,ariaCurrent:null,ariaDescribedBy:Hf,ariaDetails:null,ariaDisabled:Bf,ariaDropEffect:Hf,ariaErrorMessage:null,ariaExpanded:Bf,ariaFlowTo:Hf,ariaGrabbed:Bf,ariaHasPopup:null,ariaHidden:Bf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Hf,ariaLevel:Q,ariaLive:null,ariaModal:Bf,ariaMultiLine:Bf,ariaMultiSelectable:Bf,ariaOrientation:null,ariaOwns:Hf,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Bf,ariaReadOnly:Bf,ariaRelevant:null,ariaRequired:Bf,ariaRoleDescription:Hf,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Bf,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Zf(e,t){return t in e?e[t]:t}function Qf(e,t){return Zf(e,t.toLowerCase())}var $f=Yf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Uf,acceptCharset:Hf,accessKey:Hf,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:Hf,autoFocus:Z,autoPlay:Z,blocking:Hf,capture:null,charSet:null,checked:Z,cite:null,className:Hf,cols:Q,colSpan:null,content:null,contentEditable:Bf,controls:Z,controlsList:Hf,coords:Q|Uf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Vf,draggable:Bf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:Hf,height:Q,hidden:Vf,high:Q,href:null,hrefLang:null,htmlFor:Hf,httpEquiv:Hf,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:Hf,itemRef:Hf,itemScope:Z,itemType:Hf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:Hf,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:Hf,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:Hf,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Bf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Bf,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Hf,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Bf,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Qf}),ep=Yf({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Wf,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Hf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uf,g2:Uf,glyphName:Uf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Wf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Hf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wf,rev:Wf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wf,requiredFeatures:Wf,requiredFonts:Wf,requiredFormats:Wf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Wf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wf,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Zf}),tp=Yf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),np=Yf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Qf}),rp=Yf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ip={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ap=/[A-Z]/g,op=/-[a-z]/g,sp=/^data[-\w.:]+$/i;function cp(e,t){let n=If(t),r=t,i=Lf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&sp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(op,up);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!op.test(e)){let n=e.replace(ap,lp);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=qf}return new i(r,t)}function lp(e){return`-`+e.toLowerCase()}function up(e){return e.charAt(1).toUpperCase()}var dp=Ff([Xf,$f,tp,np,rp],`html`),fp=Ff([Xf,ep,tp,np,rp],`svg`);function pp(e){return e.join(` `).trim()}var mp=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
23
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function Kd(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var qd=(e,t)=>Math.abs(e-t)<1.01,Jd=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Yd=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Xd=e=>e,Zd=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Qd=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Yd(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Yd(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},$d={passive:!0},ef=typeof window>`u`?!0:`onscrollend`in window,tf=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&ef?()=>void 0:Jd(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,$d);let l=e.options.useScrollendEvent&&ef;return l&&n.addEventListener(`scrollend`,c,$d),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},nf=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},rf=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},af=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Xd,rangeExtractor:Zd,onChange:()=>{},measureElement:nf,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Gd(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Gd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=Gd(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e<s;e++){let t=c[e];t&&(l[t.lane]=e)}for(let i=s;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,u;if(a!==void 0&&this.options.lanes>1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Gd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?sf({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Gd(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=Gd(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return Kd(t[of(0,t.length-1,e=>Kd(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t);this.scrollState={index:null,align:t,behavior:n,startedAt:this.now(),lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e;this.scrollState={index:null,align:`start`,behavior:t,startedAt:this.now(),lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&qd(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},of=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function sf({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=of(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var cf=typeof document<`u`?v.useLayoutEffect:v.useEffect;function lf({useFlushSync:e=!0,...t}){let n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,ka.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=v.useState(()=>new af(r));return i.setOptions(r),cf(()=>i._didMount(),[]),cf(()=>i._willUpdate()),i}function uf(e){return lf({observeElementRect:Qd,observeElementOffset:tf,scrollToFn:rf,...e})}function df({value:e,editing:t,onEditStart:n,onEditEnd:r,onSave:i,displayClassName:a,inputClassName:o,inputAriaLabel:s=`Chat title`,onDisplayClick:c}){let l=(0,v.useRef)(null),u=(0,v.useRef)(!1);(0,v.useEffect)(()=>{t&&l.current&&(l.current.focus(),l.current.select())},[t]);let d=()=>{if(u.current){u.current=!1;return}let t=l.current?.value??e;r(),t!==e&&i(t)},f=()=>{u.current=!0,r()},p=e=>{e.key===`Enter`?(e.preventDefault(),e.stopPropagation(),d()):e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),f()):e.stopPropagation()};return t?(0,H.jsx)(`input`,{ref:l,"aria-label":s,defaultValue:e,maxLength:200,onKeyDown:p,onClick:e=>e.stopPropagation(),onBlur:d,className:o}):(0,H.jsx)(`span`,{onClick:e=>{c?.(e),!e.defaultPrevented&&n()},className:a,children:e})}function ff({tag:e,onRemove:t}){let n=Dd[e.color],r=Pd[e.color];return(0,H.jsxs)(`span`,{"data-testid":`tag-chip`,"data-tag-id":e.id,className:`group/chip relative inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium`,style:{backgroundColor:n,color:r},children:[(0,H.jsx)(`span`,{className:`max-w-[14ch] truncate`,children:e.name}),t&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Remove tag ${e.name}`,onClick:()=>t(e),style:{color:r},className:`absolute right-0.5 top-1/2 flex h-4 w-4 -translate-y-1/2 items-center justify-center rounded-full bg-black/25 opacity-0 transition-opacity hover:bg-black/40 focus-visible:opacity-100 group-hover/chip:opacity-100`,children:(0,H.jsx)(ft,{size:11,"aria-hidden":`true`})})]})}function pf({tags:e,max:t=3}){if(e.length===0)return null;let n=Ld(e),r=n.slice(0,t),i=n.slice(t);return(0,H.jsxs)(`span`,{"data-testid":`tag-chip-list`,className:`flex items-center gap-1 overflow-hidden`,children:[r.map(e=>(0,H.jsx)(ff,{tag:e},e.id)),i.length>0&&(0,H.jsxs)(`span`,{title:i.map(e=>e.name).join(`, `),className:`shrink-0 rounded-full bg-card px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground`,children:[`+`,i.length]})]})}function mf({chats:e,openId:t,onOpen:n,debounceMs:r=150}){let[i,a]=(0,v.useState)(-1),[o,s]=(0,v.useState)(t);t!==o&&(s(t),a(e.findIndex(e=>e.id===t)));let c=(0,v.useRef)(i);(0,v.useEffect)(()=>{c.current=i},[i]);let l=(0,v.useRef)(n);(0,v.useEffect)(()=>{l.current=n},[n]);let u=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let n=n=>{if(n.key!==`ArrowDown`&&n.key!==`ArrowUp`||n.metaKey||n.ctrlKey||n.altKey)return;let i=n.target;if(i?.tagName===`INPUT`||i?.tagName===`TEXTAREA`||i?.isContentEditable===!0||i instanceof Element&&i.closest(`[data-slot="popover-content"]`))return;n.preventDefault();let o=n.key===`ArrowDown`?1:-1,s=c.current,d=s>=0?s:e.findIndex(e=>e.id===t),f=Math.max(0,Math.min(d+o,e.length-1));if(f===s)return;c.current=f,a(f);let p=e[f]?.id;p&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{l.current(p)},r))};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]),(0,v.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]),{cursorId:i>=0?e[i]?.id??null:null,cursorIndex:i}}function hf({label:e,hint:t}){return(0,H.jsxs)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute right-full top-1/2 mr-1.5 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap rounded-md border border-white/10 bg-[#0a0a0a] px-2 py-1 text-xs text-card-foreground opacity-0 shadow-lg transition-opacity duration-100 group-hover/action:opacity-100`,children:[e,t&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:t})]})}var gf=5,_f=5;function vf(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function yf(e){let t=Date.now()-e,n=Math.floor(t/1e3),r=Math.floor(n/60),i=Math.floor(r/60),a=Math.floor(i/24);return a>0?`${a}d ago`:i>0?`${i}h ago`:r>0?`${r}m ago`:`just now`}var bf=`inline-block max-w-full truncate align-middle rounded px-1.5 py-0.5 -mx-1.5 text-sm font-medium text-accent-foreground cursor-text transition-colors group-hover:bg-white/4`,xf=`min-w-[12ch] max-w-full rounded border border-border bg-transparent px-1.5 py-0.5 text-sm font-medium text-accent-foreground outline-none focus:border-primary [field-sizing:content]`;function Sf({icon:e,label:t,hint:n,destructive:r=!1,onClick:i}){return(0,H.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:i,className:`flex w-full items-center justify-between gap-6 rounded-md px-3 py-1.5 text-left transition-colors ${r?`text-destructive hover:bg-[#3a1d23]`:`hover:bg-white/6`}`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e,t]}),(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:n})]})}function Cf({mode:e=`main`,chats:t,selectedId:n,editingId:r,onEditingIdChange:i,onSelect:a,onDelete:o,onRestore:s,onRenameTitle:c,onBack:l,onOpenTrash:u,sortControl:d,total:f,sortSignature:p,hasMore:m=!1,onLoadMore:h,hasPrevious:g=!1,onLoadPrevious:_,selectedIds:y,onToggleSelect:b,onRangeSelect:x,onClearSelection:S,onBatchTrash:C}){let[w,T]=(0,v.useState)(null),E=r===void 0?w:r,D=e=>{T(e),i?.(e)},O=e===`trash`,[k,A]=(0,v.useState)(null),j=(0,v.useRef)(null),M=(0,v.useRef)(p),N=uf({count:t.length,getScrollElement:()=>j.current,estimateSize:()=>84,overscan:8,initialRect:{width:320,height:600},getItemKey:e=>t[e]?.id??e}),{cursorId:P,cursorIndex:F}=mf({chats:t,openId:n,onOpen:a});(0,v.useEffect)(()=>{F<0||N.scrollToIndex(F,{align:`auto`})},[F,N]),(0,v.useEffect)(()=>{if(M.current===p)return;let e=n?t.findIndex(e=>e.id===n):-1;n&&e<0||(M.current=p,e>=0?N.scrollToIndex(e,{align:`auto`}):j.current&&(j.current.scrollTop=0))},[p,n,t,N]);let I=N.getVirtualItems(),L=I[I.length-1]?.index??-1;(0,v.useEffect)(()=>{!m||!h||L>=t.length-1-gf&&h()},[m,h,L,t.length]);let ee=I[0]?.index??-1;(0,v.useEffect)(()=>{!g||!_||ee>=0&&ee<=_f&&_()},[g,_,ee]);let te=(0,v.useRef)(null),R=(0,v.useCallback)(()=>{let e=j.current;if(!e)return;let n=e.scrollTop,r=N.getVirtualItemForOffset(n),i=r?t[r.index]?.id:void 0;r&&i&&(te.current={id:i,index:r.index,delta:n-r.start})},[N,t]);(0,v.useLayoutEffect)(()=>{if(M.current!==p){te.current=null;return}let e=j.current,n=te.current;if(!e||!n)return;let r=t.findIndex(e=>e.id===n.id);if(r<0||r===n.index)return;let i=N.getOffsetForIndex(r,`start`)?.[0];i!==void 0&&(e.scrollTop=i+n.delta,te.current={...n,index:r})},[t,N,p]),(0,v.useEffect)(()=>{if(!k)return;let e=()=>A(null),t=e=>{e.key===`Escape`&&A(null)},n=window.setTimeout(()=>{document.addEventListener(`click`,e)},0);return document.addEventListener(`keydown`,t),()=>{window.clearTimeout(n),document.removeEventListener(`click`,e),document.removeEventListener(`keydown`,t)}},[k]);let ne=(e,t)=>{e.preventDefault(),A({chatId:t,x:e.clientX,y:e.clientY})},z=!!b&&!O,B=y?.size??0,re=(e,t)=>{let n=e.metaKey||e.ctrlKey;if(z&&e.shiftKey){e.preventDefault(),x?.(t,n);return}if(z&&n){e.preventDefault(),b?.(t);return}a(t)};return(0,v.useEffect)(()=>{if(B<2||!S)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),S())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[B,S]),(0,H.jsxs)(`div`,{"data-testid":`chat-list`,className:`relative flex h-full flex-col`,children:[(0,H.jsx)(`div`,{className:`flex h-12 shrink-0 items-center justify-between gap-3 border-b border-border px-4 text-sm`,children:O?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 text-xs text-primary transition-colors hover:text-primary/80`,children:[(0,H.jsx)(Xe,{size:14,"aria-hidden":`true`}),`Back`]}),d]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-accent-foreground`,children:`Chats`}),(0,H.jsx)(`span`,{"data-testid":`chat-list-count`,className:`rounded-full bg-card px-2 text-xs font-semibold tabular-nums text-muted-foreground`,children:f??t.length})]}),d]})}),(0,H.jsx)(`div`,{ref:j,"data-testid":`chat-scroll`,className:`flex-1 overflow-y-auto`,onScroll:R,children:t.length===0?(0,H.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center text-sm text-muted-foreground`,children:O?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`font-medium text-foreground`,children:`Trash is empty`}),(0,H.jsx)(`div`,{className:`mt-1 text-xs`,children:`Deleted chats appear here. They stay until you restore them.`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`font-medium text-foreground`,children:`No chats`}),u&&(0,H.jsxs)(`div`,{className:`mt-1 text-xs`,children:[`Check`,` `,(0,H.jsx)(`button`,{type:`button`,onClick:u,className:`text-primary hover:underline`,children:`Trash`}),` `,`to restore deleted ones.`]})]})}):(0,H.jsx)(`div`,{className:`relative w-full`,style:{height:`${N.getTotalSize()}px`},onClick:e=>{z&&B>=2&&e.target===e.currentTarget&&S?.()},children:N.getVirtualItems().map(e=>{let r=t[e.index],i=r.id===n,a=r.id===P,l=y?.has(r.id)??!1,u=i||a,d=l&&!u,f=E===r.id&&!!c,p=`flex w-full flex-col gap-1 border-b border-border px-4 py-3 text-left transition-colors hover:bg-card focus-visible:outline-none ${u?`border-l-2 border-l-primary bg-card`:d?`border-l-2 border-l-transparent bg-primary/10`:`border-l-2 border-l-transparent`}`,m=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`min-w-0`,children:c&&!O?(0,H.jsx)(df,{value:r.title,editing:f,onEditStart:()=>D(r.id),onEditEnd:()=>D(null),onSave:e=>c(r.id,e),onDisplayClick:e=>{i?e.stopPropagation():e.preventDefault()},displayClassName:bf,inputClassName:xf,inputAriaLabel:`Chat title`}):(0,H.jsx)(`span`,{className:bf,children:r.title})}),r.tags&&r.tags.length>0&&(0,H.jsx)(pf,{tags:r.tags}),(0,H.jsxs)(`span`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:vf(r.project)}),(0,H.jsx)(`span`,{className:`ml-2 shrink-0`,children:yf(r.updatedAt)})]})]});return(0,H.jsxs)(`div`,{"data-index":e.index,ref:N.measureElement,"data-testid":`chat-row`,"data-cursor":a||void 0,className:`group absolute left-0 right-0 top-0`,style:{transform:`translateY(${e.start}px)`},onContextMenu:e=>ne(e,r.id),children:[f?(0,H.jsx)(`div`,{className:p,children:m}):(0,H.jsx)(`button`,{onClick:e=>re(e,r.id),className:p,children:m}),(0,H.jsx)(`div`,{className:`absolute top-2 right-2 flex items-center gap-1`,children:O&&s?(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Restore: ${r.title}`,onClick:()=>s(r.id),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground opacity-0 shadow-sm transition-all hover:border-[#5f7a26] hover:bg-[#1f2e15] hover:text-[#859900] group-hover:opacity-100 focus:opacity-100`,children:(0,H.jsx)(lt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Restore`,hint:`⌫`})]}):!f&&(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Move to trash: ${r.title}`,onClick:()=>o(r.id),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground opacity-0 shadow-sm transition-all hover:border-[#a13836] hover:bg-[#3a1d23] hover:text-destructive group-hover:opacity-100 focus:opacity-100`,children:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Move to Trash`,hint:`⌫`})]})})]},r.id)})})}),k&&(0,H.jsxs)(`div`,{role:`menu`,className:`fixed z-50 min-w-50 rounded-md border border-border bg-card p-1 text-sm shadow-lg`,style:{top:k.y,left:k.x},children:[!O&&c&&(0,H.jsx)(Sf,{icon:(0,H.jsx)(st,{size:14,"aria-hidden":`true`}),label:`Rename`,hint:`F2 / ↵`,onClick:()=>{D(k.chatId),A(null)}}),O&&s?(0,H.jsx)(Sf,{icon:(0,H.jsx)(lt,{size:14,"aria-hidden":`true`}),label:`Restore`,hint:`⌫`,onClick:()=>{s(k.chatId),A(null)}}):(0,H.jsx)(Sf,{icon:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`}),label:`Move to Trash`,hint:`⌫`,destructive:!0,onClick:()=>{o(k.chatId),A(null)}})]}),z&&B>=2&&(0,H.jsxs)(`div`,{"data-testid":`batch-bar`,className:`absolute inset-x-4 bottom-4 z-20 flex items-center justify-between gap-3 rounded-lg border border-border bg-card px-3 py-2 text-sm shadow-lg`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,H.jsxs)(`span`,{className:`font-medium tabular-nums text-accent-foreground`,children:[B,` selected`]}),(0,H.jsxs)(`span`,{className:`group/action relative`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Move to Trash`,onClick:()=>C?.(),className:`rounded-md border border-border/60 bg-card p-1.5 text-muted-foreground shadow-sm transition-all hover:border-[#a13836] hover:bg-[#3a1d23] hover:text-destructive`,children:(0,H.jsx)(dt,{size:14,"aria-hidden":`true`})}),(0,H.jsx)(hf,{label:`Move to Trash`})]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>S?.(),className:`text-xs text-primary transition-colors hover:text-primary/80`,children:`Clear`})]})]})}function wf({orderedIds:e,primaryId:t,resetKey:n}){let[r,i]=(0,v.useState)(()=>t?new Set([t]):new Set),[a,o]=(0,v.useState)(n);return n!==a&&(o(n),i(t?new Set([t]):new Set)),{selectedIds:r,selectOnly:(0,v.useCallback)(e=>{i(new Set([e]))},[]),toggle:(0,v.useCallback)(e=>{i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),selectRange:(0,v.useCallback)((t,n,r)=>{if(t===null){i(new Set([n]));return}let a=e.indexOf(t),o=e.indexOf(n);if(a===-1||o===-1)return;let[s,c]=a<=o?[a,o]:[o,a],l=e.slice(s,c+1);i(e=>r?new Set([...e,...l]):new Set(l))},[e]),clear:(0,v.useCallback)(()=>{i(new Set)},[])}}function Tf({axes:e,field:t,direction:n,isDefault:r,directionLabels:i,onSelectField:a,onToggleDirection:o,testId:s}){let c=n===`asc`?Qe:Ye;return(0,H.jsxs)(Cd,{children:[(0,H.jsx)(wd,{"aria-label":`Sort chats`,className:Sd(`flex h-7 w-7 shrink-0 items-center justify-center rounded transition-colors hover:bg-white/4 focus-visible:outline-2 focus-visible:outline-ring`,r?`text-muted-foreground`:`text-primary`),children:(0,H.jsx)(Ze,{size:16,"aria-hidden":`true`})}),(0,H.jsxs)(Td,{"data-testid":s,align:`end`,sideOffset:6,className:`w-44 gap-0 overflow-visible p-1`,children:[(0,H.jsx)(`div`,{className:`px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`,children:`Sort by`}),e.map(e=>{let r=e.field===t;return(0,H.jsxs)(`div`,{className:`group/axis relative`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r?o():a(e.field),"aria-current":r?`true`:void 0,title:r?`Click to reverse direction`:void 0,className:Sd(`flex w-full items-center justify-between gap-2 rounded px-2 py-1.5 text-left transition-colors`,r?`bg-primary/10 text-primary`:`text-foreground hover:bg-white/6`),children:[(0,H.jsx)(`span`,{children:e.label}),r&&(0,H.jsx)(c,{size:14,"aria-hidden":`true`})]}),r&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-full top-1/2 ml-3 flex -translate-y-1/2 items-center whitespace-nowrap rounded-md border border-white/10 bg-[#0a0a0a] px-2 py-1 text-xs text-card-foreground opacity-0 shadow-lg transition-opacity duration-100 group-hover/axis:opacity-100`,children:i[e.field][n]})]},e.field)})]})]})}function Ef(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Df=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Of=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kf={};function Af(e,t){return((t||kf).jsx?Of:Df).test(e)}var jf=/[ \t\n\f\r]/g;function Mf(e){return typeof e==`object`?e.type===`text`?Nf(e.value):!1:Nf(e)}function Nf(e){return e.replace(jf,``)===``}var Pf=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Pf.prototype.normal={},Pf.prototype.property={},Pf.prototype.space=void 0;function Ff(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Pf(n,r,t)}function If(e){return e.toLowerCase()}var Lf=class{constructor(e,t){this.attribute=t,this.property=e}};Lf.prototype.attribute=``,Lf.prototype.booleanish=!1,Lf.prototype.boolean=!1,Lf.prototype.commaOrSpaceSeparated=!1,Lf.prototype.commaSeparated=!1,Lf.prototype.defined=!1,Lf.prototype.mustUseProperty=!1,Lf.prototype.number=!1,Lf.prototype.overloadedBoolean=!1,Lf.prototype.property=``,Lf.prototype.spaceSeparated=!1,Lf.prototype.space=void 0;var Rf=s({boolean:()=>Z,booleanish:()=>Bf,commaOrSpaceSeparated:()=>Wf,commaSeparated:()=>Uf,number:()=>Q,overloadedBoolean:()=>Vf,spaceSeparated:()=>Hf}),zf=0,Z=Gf(),Bf=Gf(),Vf=Gf(),Q=Gf(),Hf=Gf(),Uf=Gf(),Wf=Gf();function Gf(){return 2**++zf}var Kf=Object.keys(Rf),qf=class extends Lf{constructor(e,t,n,r){let i=-1;if(super(e,t),Jf(this,`space`,r),typeof n==`number`)for(;++i<Kf.length;){let e=Kf[i];Jf(this,Kf[i],(n&Rf[e])===Rf[e])}}};qf.prototype.defined=!0;function Jf(e,t,n){n&&(e[t]=n)}function Yf(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new qf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[If(r)]=r,n[If(a.attribute)]=r}return new Pf(t,n,e.space)}var Xf=Yf({properties:{ariaActiveDescendant:null,ariaAtomic:Bf,ariaAutoComplete:null,ariaBusy:Bf,ariaChecked:Bf,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Hf,ariaCurrent:null,ariaDescribedBy:Hf,ariaDetails:null,ariaDisabled:Bf,ariaDropEffect:Hf,ariaErrorMessage:null,ariaExpanded:Bf,ariaFlowTo:Hf,ariaGrabbed:Bf,ariaHasPopup:null,ariaHidden:Bf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Hf,ariaLevel:Q,ariaLive:null,ariaModal:Bf,ariaMultiLine:Bf,ariaMultiSelectable:Bf,ariaOrientation:null,ariaOwns:Hf,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Bf,ariaReadOnly:Bf,ariaRelevant:null,ariaRequired:Bf,ariaRoleDescription:Hf,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Bf,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Zf(e,t){return t in e?e[t]:t}function Qf(e,t){return Zf(e,t.toLowerCase())}var $f=Yf({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Uf,acceptCharset:Hf,accessKey:Hf,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:Hf,autoFocus:Z,autoPlay:Z,blocking:Hf,capture:null,charSet:null,checked:Z,cite:null,className:Hf,cols:Q,colSpan:null,content:null,contentEditable:Bf,controls:Z,controlsList:Hf,coords:Q|Uf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Vf,draggable:Bf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:Hf,height:Q,hidden:Vf,high:Q,href:null,hrefLang:null,htmlFor:Hf,httpEquiv:Hf,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:Hf,itemRef:Hf,itemScope:Z,itemType:Hf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:Hf,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:Hf,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:Hf,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Bf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Bf,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Hf,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Bf,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Qf}),ep=Yf({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Wf,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Hf,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uf,g2:Uf,glyphName:Uf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Wf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Hf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wf,rev:Wf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wf,requiredFeatures:Wf,requiredFonts:Wf,requiredFormats:Wf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Wf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wf,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Zf}),tp=Yf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),np=Yf({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Qf}),rp=Yf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ip={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ap=/[A-Z]/g,op=/-[a-z]/g,sp=/^data[-\w.:]+$/i;function cp(e,t){let n=If(t),r=t,i=Lf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&sp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(op,up);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!op.test(e)){let n=e.replace(ap,lp);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=qf}return new i(r,t)}function lp(e){return`-`+e.toLowerCase()}function up(e){return e.charAt(1).toUpperCase()}var dp=Ff([Xf,$f,tp,np,rp],`html`),fp=Ff([Xf,ep,tp,np,rp],`svg`);function pp(e){return e.join(` `).trim()}var mp=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
24
24
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),hp=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(mp());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),gp=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),_p=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(hp()),r=gp();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),vp=bp(`end`),yp=bp(`start`);function bp(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function xp(e){let t=yp(e),n=vp(e);if(t&&n)return{start:t,end:n}}function Sp(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?wp(e.position):`start`in e||`end`in e?wp(e):`line`in e||`column`in e?Cp(e):``}function Cp(e){return Tp(e&&e.line)+`:`+Tp(e&&e.column)}function wp(e){return Cp(e&&e.start)+`-`+Cp(e&&e.end)}function Tp(e){return e&&typeof e==`number`?e:1}var Ep=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Sp(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ep.prototype.file=``,Ep.prototype.name=``,Ep.prototype.reason=``,Ep.prototype.message=``,Ep.prototype.stack=``,Ep.prototype.column=void 0,Ep.prototype.line=void 0,Ep.prototype.ancestors=void 0,Ep.prototype.cause=void 0,Ep.prototype.fatal=void 0,Ep.prototype.place=void 0,Ep.prototype.ruleId=void 0,Ep.prototype.source=void 0;var Dp=l(_p(),1),Op={}.hasOwnProperty,kp=new Map,Ap=/[A-Z]/g,jp=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Mp=new Set([`td`,`th`]),Np=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Pp(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Gp(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Wp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?fp:dp,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Fp(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Fp(e,t,n){if(t.type===`element`)return Ip(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Lp(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return zp(e,t,n);if(t.type===`mdxjsEsm`)return Rp(e,t);if(t.type===`root`)return Bp(e,t,n);if(t.type===`text`)return Vp(e,t)}function Ip(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=fp,e.schema=i),e.ancestors.push(t);let a=Zp(e,t.tagName,!1),o=Kp(e,t),s=Jp(e,t);return jp.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Mf(e):!0})),Hp(e,o,a,t),Up(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Lp(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Qp(e,t.position)}function Rp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qp(e,t.position)}function zp(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=fp,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Zp(e,t.name,!0),o=qp(e,t),s=Jp(e,t);return Hp(e,o,a,t),Up(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Bp(e,t,n){let r={};return Up(r,Jp(e,t)),e.create(t,e.Fragment,r,n)}function Vp(e,t){return t.value}function Hp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Up(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Wp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Gp(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=yp(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Kp(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Op.call(t.properties,i)){let a=Yp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Mp.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function qp(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Qp(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Qp(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Jp(e,t){let n=[],r=-1,i=e.passKeys?new Map:kp;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Fp(e,a,o);s!==void 0&&n.push(s)}return n}function Yp(e,t,n){let r=cp(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ef(n):pp(n)),r.property===`style`){let t=typeof n==`object`?n:Xp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=$p(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ip[r.property]||r.property:r.attribute,n]}}function Xp(e,t){try{return(0,Dp.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ep("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Np+`#cannot-parse-style-attribute`,r}}function Zp(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Af(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Af(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Op.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qp(e)}function Qp(e,t){let n=new Ep("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Np+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function $p(e){let t={},n;for(n in e)Op.call(e,n)&&(t[em(n)]=e[n]);return t}function em(e){let t=e.replace(Ap,tm);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function tm(e){return`-`+e.toLowerCase()}var nm={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},rm={};function im(e,t){let n=t||rm;return am(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function am(e,t,n){if(sm(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return om(e.children,t,n)}return Array.isArray(e)?om(e,t,n):``}function om(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=am(e[i],t,n);return r.join(``)}function sm(e){return!!(e&&typeof e==`object`)}var cm=document.createElement(`i`);function lm(e){let t=`&`+e+`;`;cm.innerHTML=t;let n=cm.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function um(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function dm(e,t){return e.length>0?(um(e,e.length,0,t),e):t}var fm={}.hasOwnProperty;function pm(e){let t={},n=-1;for(;++n<e.length;)mm(t,e[n]);return t}function mm(e,t){let n;for(n in t){let r=(fm.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){fm.call(r,a)||(r[a]=[]);let e=i[a];hm(r[a],Array.isArray(e)?e:e?[e]:[])}}}function hm(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);um(e,0,0,r)}function gm(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function _m(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var vm=km(/[A-Za-z]/),ym=km(/[\dA-Za-z]/),bm=km(/[#-'*+\--9=?A-Z^-~]/);function xm(e){return e!==null&&(e<32||e===127)}var Sm=km(/\d/),Cm=km(/[\dA-Fa-f]/),wm=km(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function Tm(e){return e!==null&&(e<0||e===32)}function Em(e){return e===-2||e===-1||e===32}var Dm=km(/\p{P}|\p{S}/u),Om=km(/\s/);function km(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Am(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&ym(e.charCodeAt(n+1))&&ym(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function jm(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Em(r)?(e.enter(n),s(r)):t(r)}function s(r){return Em(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Mm={tokenize:Nm};function Nm(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jm(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Pm={tokenize:Im},Fm={tokenize:Lm};function Im(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return um(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fm,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Fm,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;um(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lm(e,t,n){return jm(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Rm(e){if(e===null||Tm(e)||Om(e))return 1;if(Dm(e))return 2}function zm(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Bm={name:`attention`,resolveAll:Vm,tokenize:Hm};function Vm(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Um(d,-c),Um(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=dm(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=dm(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=dm(l,zm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=dm(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=dm(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,um(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Hm(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rm(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Rm(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Um(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wm={name:`autolink`,tokenize:Gm};function Gm(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return vm(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||ym(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||ym(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||xm(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):bm(t)?(e.consume(t),l):n(t)}function u(e){return ym(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||ym(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Km={partial:!0,tokenize:qm};function qm(e,t,n){return r;function r(t){return Em(t)?jm(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var Jm={continuation:{tokenize:Xm},exit:Zm,name:`blockQuote`,tokenize:Ym};function Ym(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Em(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Xm(e,t,n){let r=this;return i;function i(t){return Em(t)?jm(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Jm,t,n)(r)}}function Zm(e){e.exit(`blockQuote`)}var Qm={name:`characterEscape`,tokenize:$m};function $m(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return wm(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var eh={name:`characterReference`,tokenize:th};function th(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=ym,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Cm,u):(e.enter(`characterReferenceValue`),a=7,o=Sm,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===ym&&!lm(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var nh={partial:!0,tokenize:ah},rh={concrete:!0,name:`codeFenced`,tokenize:ih};function ih(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Em(t)?jm(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(nh,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Em(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),jm(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Em(t)?jm(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(nh,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Em(t)?jm(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Em(t)?jm(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ah(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var oh={name:`codeIndented`,tokenize:ch},sh={partial:!0,tokenize:lh};function ch(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),jm(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(sh,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function lh(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):jm(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var uh={name:`codeText`,previous:fh,resolve:dh,tokenize:ph};function dh(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function fh(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ph(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var mh=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&hh(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),hh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);hh(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hh(this.left,t.reverse())}}};function hh(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gh(e){let t={},n=-1,r,i,a,o,s,c,l,u=new mh(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_h(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return um(e,0,1/0,u.slice(0)),!l}function _h(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var vh={resolve:bh,tokenize:xh},yh={partial:!0,tokenize:Sh};function bh(e){return gh(e),e}function xh(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(yh,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Sh(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jm(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ch(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||xm(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Tm(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||xm(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function wh(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Em(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Th(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),jm(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Eh(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Em(i)?jm(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Dh={name:`definition`,tokenize:kh},Oh={partial:!0,tokenize:Ah};function kh(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return wh.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=_m(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Tm(t)?Eh(e,l)(t):l(t)}function l(t){return Ch(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Oh,d,d)(t)}function d(t){return Em(t)?jm(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ah(e,t,n){return r;function r(t){return Tm(t)?Eh(e,i)(t):n(t)}function i(t){return Th(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Em(t)?jm(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var jh={name:`hardBreakEscape`,tokenize:Mh};function Mh(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Nh={name:`headingAtx`,resolve:Ph,tokenize:Fh};function Ph(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},um(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Fh(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Tm(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):Em(n)?jm(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Tm(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ih=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Lh=[`pre`,`script`,`style`,`textarea`],Rh={concrete:!0,name:`htmlFlow`,resolveTo:Vh,tokenize:Hh},zh={partial:!0,tokenize:Wh},Bh={partial:!0,tokenize:Uh};function Vh(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Hh(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):vm(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):vm(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return vm(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Tm(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Lh.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ih.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ym(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Em(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||vm(t)?(e.consume(t),b):Em(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||ym(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Em(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Em(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Tm(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Em(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):Em(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(zh,ee,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Bh,A,ee)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Lh.includes(n)?(e.consume(t),L):O(t)}return vm(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),L)}function ee(n){return e.exit(`htmlFlow`),t(n)}}function Uh(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Wh(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Km,t,n)}}var Gh={name:`htmlText`,tokenize:Kh};function Kh(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):vm(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):vm(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return vm(t)?(e.consume(t),S):n(t)}function S(t){return t===45||ym(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):Em(t)?(e.consume(t),C):M(t)}function w(t){return t===45||ym(t)?(e.consume(t),w):t===47||t===62||Tm(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||vm(t)?(e.consume(t),E):$(t)?(o=T,N(t)):Em(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||ym(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):Em(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):Em(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Tm(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Tm(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Em(t)?jm(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var qh={name:`labelEnd`,resolveAll:Zh,resolveTo:Qh,tokenize:$h},Jh={tokenize:eg},Yh={tokenize:tg},Xh={tokenize:ng};function Zh(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&um(e,0,e.length,n),e}function Qh(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=dm(s,e.slice(a+1,a+r+3)),s=dm(s,[[`enter`,u,t]]),s=dm(s,zm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=dm(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=dm(s,e.slice(o+1)),s=dm(s,[[`exit`,c,t]]),um(e,a,e.length,s),e}function $h(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(_m(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Jh,u,o?u:d)(t):t===91?e.attempt(Yh,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Xh,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function eg(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Tm(t)?Eh(e,a)(t):a(t)}function a(t){return t===41?u(t):Ch(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Tm(t)?Eh(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Th(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Tm(t)?Eh(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function tg(e,t,n){let r=this;return i;function i(t){return wh.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(_m(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ng(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var rg={name:`labelStartImage`,resolveAll:qh.resolveAll,tokenize:ig};function ig(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ag={name:`labelStartLink`,resolveAll:qh.resolveAll,tokenize:og};function og(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var sg={name:`lineEnding`,tokenize:cg};function cg(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),jm(e,t,`linePrefix`)}}var lg={name:`thematicBreak`,tokenize:ug};function ug(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Em(t)?jm(e,s,`whitespace`)(t):s(t))}}var dg={continuation:{tokenize:hg},exit:_g,name:`list`,tokenize:mg},fg={partial:!0,tokenize:vg},pg={partial:!0,tokenize:gg};function mg(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Sm(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(lg,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Sm(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Km,r.interrupt?n:u,e.attempt(fg,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Em(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function hg(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Km,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,jm(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Em(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pg,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,jm(e,e.attempt(dg,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function gg(e,t,n){let r=this;return jm(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function _g(e){e.exit(this.containerState.type)}function vg(e,t,n){let r=this;return jm(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Em(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var yg={name:`setextUnderline`,resolveTo:bg,tokenize:xg};function bg(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function xg(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Em(t)?jm(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Sg={tokenize:Cg};function Cg(e){let t=this,n=e.attempt(Km,r,e.attempt(this.parser.constructs.flowInitial,i,jm(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vh,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var wg={resolveAll:Og()},Tg=Dg(`string`),Eg=Dg(`text`);function Dg(e){return{resolveAll:Og(e===`text`?kg:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Og(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function kg(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Ag=s({attentionMarkers:()=>Rg,contentInitial:()=>Mg,disable:()=>zg,document:()=>jg,flow:()=>Pg,flowInitial:()=>Ng,insideSpan:()=>Lg,string:()=>Fg,text:()=>Ig}),jg={42:dg,43:dg,45:dg,48:dg,49:dg,50:dg,51:dg,52:dg,53:dg,54:dg,55:dg,56:dg,57:dg,62:Jm},Mg={91:Dh},Ng={[-2]:oh,[-1]:oh,32:oh},Pg={35:Nh,42:lg,45:[yg,lg],60:Rh,61:yg,95:lg,96:rh,126:rh},Fg={38:eh,92:Qm},Ig={[-5]:sg,[-4]:sg,[-3]:sg,33:rg,38:eh,42:Bm,60:[Wm,Gh],91:ag,92:[jh,Qm],93:qh,95:Bm,96:uh},Lg={null:[Bm,wg]},Rg={null:[42,95]},zg={null:[]};function Bg(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=dm(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=zm(a,l.events,l),l.events):[]}function f(e,t){return Hg(p(e),t)}function p(e){return Vg(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&um(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Vg(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Hg(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
25
25
  `;break;case-3:o=`\r
26
26
  `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Ug(e){let t={constructs:pm([Ag,...(e||{}).extensions||[]]),content:n(Mm),defined:[],document:n(Pm),flow:n(Sg),lazy:{},string:n(Tg),text:n(Eg)};return t;function n(e){return n;function n(n){return Bg(t,e,n)}}}function Wg(e){for(;!gh(e););return e}var Gg=/[\0\t\n\r]/g;function Kg(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Gg.lastIndex=u,c=Gg.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var qg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Jg(e){return e.replace(qg,Yg)}function Yg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return gm(n.slice(t?2:1),t?16:10)}return lm(n)||e}var Xg={}.hasOwnProperty;function Zg(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Qg(n)(Wg(Ug(n).document().write(Kg()(e,t,!0))))}function Qg(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(pe),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(le),blockQuote:a(ie),characterEscape:T,characterReference:T,codeFenced:a(ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ae,o),codeText:a(oe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(se),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ce),hardBreakEscape:a(ue),hardBreakTrailing:a(ue),htmlFlow:a(de,o),htmlFlowData:T,htmlText:a(de,o),htmlTextData:T,image:a(fe),label:o,link:a(pe),listItem:a(he),listItemValue:f,listOrdered:a(me,d),listUnordered:a(me),paragraph:a(ge),reference:te,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(le),strong:a(_e),thematicBreak:a(ye)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:V,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:z,characterReference:B,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:R,resourceDestinationString:I,resourceTitleString:L,resource:ee,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};e_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Xg.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||n_).call(a,void 0,e[0])}for(r.position={start:$g(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$g(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:$g(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||n_).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Sp({start:e.start,end:e.end})+`): it’s not open`);n.position.end=$g(e.end)}function u(){return im(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_m(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ve(),n.position={start:$g(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$g(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=$g(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Jg(t),n.identifier=_m(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ee(){this.data.inReference=void 0}function te(){this.data.referenceType=`collapsed`}function R(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=_m(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ne(e){this.data.characterReferenceType=e.type}function z(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=gm(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=lm(t);let i=this.stack[this.stack.length-1];i.value+=r}function B(e){let t=this.stack.pop();t.position.end=$g(e.end)}function re(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function V(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ie(){return{type:`blockquote`,children:[]}}function ae(){return{type:`code`,lang:null,meta:null,value:``}}function oe(){return{type:`inlineCode`,value:``}}function se(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ce(){return{type:`emphasis`,children:[]}}function le(){return{type:`heading`,depth:0,children:[]}}function ue(){return{type:`break`}}function de(){return{type:`html`,value:``}}function fe(){return{type:`image`,title:null,url:``,alt:null}}function pe(){return{type:`link`,title:null,url:``,children:[]}}function me(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function he(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ge(){return{type:`paragraph`,children:[]}}function _e(){return{type:`strong`,children:[]}}function ve(){return{type:`text`,value:``}}function ye(){return{type:`thematicBreak`}}}function $g(e){return{line:e.line,column:e.column,offset:e.offset}}function e_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?e_(e,r):t_(e,r)}}function t_(e,t){let n;for(n in t)if(Xg.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function n_(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Sp({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Sp({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Sp({start:t.start,end:t.end})+`) is still open`)}function r_(e){let t=this;t.parser=n;function n(n){return Zg(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function i_(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function a_(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>web</title>
8
- <script type="module" crossorigin src="/assets/index-Di0FfmZt.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DS6W74rq.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DDRs84W6.css">
10
10
  </head>
11
11
  <body>