@markusylisiurunen/tau 0.3.112 → 0.3.114
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/dist/core/code_mode/history.js +3 -1
- package/dist/core/code_mode/history.js.map +1 -1
- package/dist/core/history/history_manager.js +17 -14
- package/dist/core/history/history_manager.js.map +1 -1
- package/dist/core/history/local_history_store.js +53 -38
- package/dist/core/history/local_history_store.js.map +1 -1
- package/dist/core/history/remote_history_client.js +25 -3
- package/dist/core/history/remote_history_client.js.map +1 -1
- package/dist/core/personas.js +3 -2
- package/dist/core/personas.js.map +1 -1
- package/dist/core/runtime/model_prompt_notes.js +1 -1
- package/dist/core/runtime/model_prompt_notes.js.map +1 -1
- package/dist/core/static/code_mode/docs/history.md +3 -2
- package/dist/core/subagents/claude_code_runner.mjs +58 -58
- package/dist/core/utils/context_builder.js +1 -1
- package/dist/core/version.js +2 -2
- package/dist/diff_tool/app/dist/assets/{core-BfpRGcqe.js → core-CEX1B8U5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/engine-oniguruma-DEI4DY_o.js +1 -0
- package/dist/diff_tool/app/dist/assets/{highlights-CLc_g6m8.js → highlights-Ct-rVULM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{index-bu2WOD1Y.js → index-wTs3AdOj.js} +7 -7
- package/dist/diff_tool/app/dist/assets/langs-Dr3LSnZI.js +1 -0
- package/dist/diff_tool/app/dist/assets/{lib-BKZ5ZaMU.js → lib-DHaWRzOq.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shiki-r9Q4gIo6.js → shiki-NEnG1qil.js} +2 -2
- package/dist/diff_tool/app/dist/assets/{stream-tokenizer-bgeDT4xc.js → stream-tokenizer-C793Xkmg.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{themes-h4OE3MIe.js → themes-DrbXSZTP.js} +2 -2
- package/dist/diff_tool/app/dist/index.html +2 -2
- package/dist/history/worker/index.js +60 -35
- package/dist/history/worker/index.js.map +1 -1
- package/dist/history/worker/viewer.js +17 -1
- package/dist/host/local_session_host.js +2 -0
- package/dist/host/local_session_host.js.map +1 -1
- package/dist/tui/ui/chat_container.js +6 -4
- package/dist/tui/ui/chat_container.js.map +1 -1
- package/package.json +8 -8
- package/dist/diff_tool/app/dist/assets/engine-oniguruma-D_AXpl2k.js +0 -1
- package/dist/diff_tool/app/dist/assets/langs-DO7BJV2U.js +0 -1
|
@@ -20,7 +20,7 @@ Skills, AGENTS.md files, and documentation that Tau or a tool tells you to read
|
|
|
20
20
|
- Your text is how you communicate with the user. Tool calls show up for them at most as brief cards without the full output, so put anything they need to know in your text. Text you write between tool calls reaches the user as an update while you keep working. During longer work, write a sentence or two when something changes the picture, such as a finding, a change of direction, or a blocker.
|
|
21
21
|
- Your final reply ends your turn, so put questions that need an answer there. A question in an update goes unanswered while you keep working.
|
|
22
22
|
- The final reply is often read on its own, so write it for a reader who has not followed your work, without shorthand or labels you coined along the way. Start with the outcome, then add only what the user needs to know or act on, such as a failure, a check that could not run, a risk, a decision you made without guidance, or work left undone. Checking your work is part of finishing it, so leave out routine steps and checks that passed unless the user asks. Never present a failed, skipped, or unverified step as done.
|
|
23
|
-
- When
|
|
23
|
+
- When a useful next step follows naturally and needs the user's go-ahead, end with a short, specific offer, such as "Want me to commit these changes?", "Should I run the slow integration tests too?", or "Want me to draft a reply to the reviewer?" If the request already covers the step, do it instead of offering it. Leave out generic offers and follow-ups that would not help the user reach their goal.
|
|
24
24
|
|
|
25
25
|
## Tool calls and long sessions
|
|
26
26
|
|
package/dist/core/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const APP_VERSION = "0.3.
|
|
2
|
-
export const PI_AI_VERSION = "1.
|
|
1
|
+
export const APP_VERSION = "0.3.114";
|
|
2
|
+
export const PI_AI_VERSION = "1.6.0";
|
|
3
3
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{W as ShikiError,t as addClassToHast,T as applyColorReplacements,n as codeToHast,r as codeToHtml,i as codeToTokens,a as codeToTokensBase,E as codeToTokensWithThemes,o as createBundledHighlighter,s as createCssVariablesTheme,c as createHighlighterCore,l as createHighlighterCoreSync,u as createPositionConverter,D as createShikiInternal,O as createShikiInternalSync,k as createShikiPrimitive,A as createShikiPrimitiveAsync,d as createSingletonShorthands,f as flatTokenVariants,j as getLastGrammarState,p as getSingletonHighlighterCore,m as getTokenStyleObject,h as guessEmbeddedLanguages,g as hastToHtml,M as isNoneTheme,N as isPlainLang,P as isSpecialLang,F as isSpecialTheme,_ as makeSingletonHighlighter,v as makeSingletonHighlighterCore,I as normalizeGetter,L as normalizeTheme,R as resolveColorReplacements,z as splitLines,y as splitToken,b as splitTokens,x as stringifyTokenStyle,B as toArray,S as tokenizeAnsiWithTheme,V as tokenizeWithTheme,C as tokensToHast,w as transformerDecorations}from"./index-
|
|
1
|
+
export{W as ShikiError,t as addClassToHast,T as applyColorReplacements,n as codeToHast,r as codeToHtml,i as codeToTokens,a as codeToTokensBase,E as codeToTokensWithThemes,o as createBundledHighlighter,s as createCssVariablesTheme,c as createHighlighterCore,l as createHighlighterCoreSync,u as createPositionConverter,D as createShikiInternal,O as createShikiInternalSync,k as createShikiPrimitive,A as createShikiPrimitiveAsync,d as createSingletonShorthands,f as flatTokenVariants,j as getLastGrammarState,p as getSingletonHighlighterCore,m as getTokenStyleObject,h as guessEmbeddedLanguages,g as hastToHtml,M as isNoneTheme,N as isPlainLang,P as isSpecialLang,F as isSpecialTheme,_ as makeSingletonHighlighter,v as makeSingletonHighlighterCore,I as normalizeGetter,L as normalizeTheme,R as resolveColorReplacements,z as splitLines,y as splitToken,b as splitTokens,x as stringifyTokenStyle,B as toArray,S as tokenizeAnsiWithTheme,V as tokenizeWithTheme,C as tokensToHast,w as transformerDecorations}from"./index-wTs3AdOj.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{G as createOnigurumaEngine}from"./index-wTs3AdOj.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{nt as e,rt as t,tt as n}from"./index-bu2WOD1Y.js";import{n as r,t as i}from"./stream-tokenizer-bgeDT4xc.js";var a=`none,attribute,attribute.jsx,boolean,comment,comment.doc,constant,constant.builtin,constructor,diff.minus,diff.plus,embedded,emphasis,emphasis.strong,function,function.definition,function.method,keyword,keyword.control,keyword.declaration,keyword.import,keyword.operator,label,namespace,number,operator,predictive,preproc,primary,property,property.json_key,punctuation,punctuation.bracket,punctuation.bracket.html,punctuation.bracket.jsx,punctuation.delimiter,punctuation.delimiter.html,punctuation.delimiter.jsx,punctuation.list_marker,punctuation.markup,punctuation.special,selector,selector.class,selector.id,string,string.escape,string.regex,string.special,string.special.symbol,tag,tag.doctype,tag.jsx,text.jsx,text.literal,title,type,type.builtin,type.class,variable,variable.parameter,variable.special,enum,hint,keyword.jsdoc,link_text,link_uri,selector.pseudo,tag.component.jsx,type.jsdoc,variable.jsdoc,variant,background,foreground`.split(`,`),o=`--hls-`,s=new TextEncoder,c=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,l=/^color\(display-p3\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:\s*\/\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+))?\s*\)$/i;function u(e){return typeof e==`string`&&(c.test(e.trim())||l.test(e.trim()))}function d(e){return e[`editor.foreground`]??e.text??e.foreground}function f(e){return e[`editor.background`]??e.background}var p=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`bright_black`,`bright_red`,`bright_green`,`bright_yellow`,`bright_blue`,`bright_magenta`,`bright_cyan`,`bright_white`],m=[`#000000`,`#cd3131`,`#0dbc79`,`#e5e510`,`#2472c8`,`#bc3fbc`,`#11a8cd`,`#e5e5e5`,`#666666`,`#f14c4c`,`#23d18b`,`#f5f543`,`#3b8eea`,`#d670d6`,`#29b8db`,`#ffffff`];function h(e){return p.map((t,n)=>ne({foreground:e[`terminal.ansi.${t}`]},`foreground`).color??m[n])}function g(e){return e===null?`null`:e===void 0?`undefined`:typeof e==`string`?`the string ${JSON.stringify(e)} (theme ids are not supported; import the theme object from "@pierre/highlights/themes")`:Array.isArray(e)?`an array`:typeof e==`object`?`themes`in e&&Array.isArray(e.themes)?`a ThemeFamily whose first member is ${g(e.themes[0])}`:"an object without a `name`":`a ${typeof e}`}function ee(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`&&e.name!==``}function te(e){let t=typeof e==`object`&&e&&`themes`in e&&e.themes!=null?e.themes[0]:e;if(!ee(t))throw TypeError(`invalid theme: expected a Theme or ThemeFamily object, received ${g(e)}`);return t}function _(e,t){let n;for(let r=t;r!==``;){let t=e[r];if(typeof t==`string`)return{...n,color:t};if(typeof t==`object`&&t&&(n??=t,t.color!=null))return{...n,color:t.color};let i=r.lastIndexOf(`.`);r=i<0?``:r.slice(0,i)}return n}function ne(e,t){let n,r,i;return t===`background`?n=f(e):t===`foreground`?n=d(e):({color:n,font_style:r,font_weight:i}=_(e.syntax??{},t)??{},(r!=null||i!=null)&&(n??=d(e))),u(n)?(n=n.trim().toLowerCase(),n.startsWith(`#`)&&(n.length<=5&&(n=n.replace(/[^#]/g,`$&$&`)),n.length===9&&n.endsWith(`ff`)&&(n=n.slice(0,7)),n===`#00000000`&&(n=void 0))):n=void 0,{color:n,italic:r===`italic`,weight:i!=null&&i>=100&&i<=900?Math.round(i/100)*100:0}}function v(e,t){return`var(${t}${e.replace(/[._]/g,`-`)})`}function y(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function b(e){let t=e.map(e=>s.encode(e)),n=4+8*t.length,r=new Uint8Array(n+t.reduce((e,t)=>e+t.length,0)),i=new DataView(r.buffer),a=32;for(let e=0;e<t.length;e++)i.setUint32(4+8*e,n,!0),i.setUint32(8+8*e,t[e].length,!0),r.set(t[e],n),n+=t[e].length,e!==0&&(a=Math.max(a,t[e].length+32));return i.setUint32(0,a,!0),r}var x=new WeakMap;function S(e,t=o){let n=te(e),r=n.cssVariables===!0?t:``,i=x.get(n),a=i?.get(r);if(a!==void 0)return a;let s=n.cssVariables===!0?ie(n.name,t):typeof n.cssVariables==`object`?re(n):oe(n);return i===void 0&&(i=new Map,x.set(n,i)),i.set(r,s),s}function re(e){let t=e.cssVariables;if(typeof t!=`object`)throw Error(`Expected CSS palette`);let n=t.prefix??`--hls-`,r=e=>{let r=t.defaults?.[e];return`var(${n}${e}${r?`, ${r}`:``})`},i=Array(a.length).fill(null),o=e.style.syntax??{};for(let e=1;e<a.length;e++){let t=_(o,a[e]);i[e]={color:r(t?.color??`foreground`),italic:t?.font_style===`italic`,weight:t?.font_weight===void 0?0:Math.round(t.font_weight/100)*100}}let s=r(d(e.style)??`foreground`),c=r(f(e.style)??`background`),l,u;return{name:e.name,styles:i,fg:s,bg:c,table:void 0,get htmlOpeners(){return l??=se(i,s,c)},get ansi(){return u??=p.map(t=>{let n=e.style[`terminal.ansi.${t}`];return r(typeof n==`string`?n:`terminal-ansi-${t.replace(`_`,`-`)}`)})}}}function ie(e,t){let n,r=()=>n??=ae(t),i;return{name:e,get styles(){return r().styles},get fg(){return r().fg},get bg(){return r().bg},table:void 0,htmlOpeners:void 0,get ansi(){return i??=p.map(e=>v(`terminal.ansi.${e}`,t))}}}function ae(e){let t=Array(a.length).fill(null);for(let n=1;n<a.length;n++)t[n]={color:v(a[n],e),italic:!1,weight:0};return{styles:t,fg:v(`foreground`,e),bg:v(`background`,e)}}function oe(e){let t=e.style??{},n=Array(a.length).fill(null),r=new Uint8Array(a.length*5),i,o,s=!1;for(let e=1;e<a.length;e++){let c=a[e],l=ne(t,c),{color:u,italic:d,weight:f}=l,p=e*5;if(u!==void 0){if(u.startsWith(`#`)){let e=parseInt(u.slice(1,7),16);r[p]=e>>16,r[p+1]=e>>8&255,r[p+2]=e&255,r[p+3]=u.length===9?parseInt(u.slice(7),16):255}else s=!0}r[p+4]=(d?16:0)|f/100,(u!==void 0||d||f!==0)&&(c===`foreground`?i=u:c===`background`?o=u:n[e]=l)}let c,l;return{name:e.name,styles:n,fg:i,bg:o,table:s?void 0:r,get htmlOpeners(){if(s)return c??=se(n,i,o)},get ansi(){return l??=h(t)}}}function se(e,t,n){let r=[`<pre class="highlights" style="${y((n===void 0?``:`background-color:${n};`)+(t===void 0?``:`color:${t}`))}"><code>`];for(let t=1;t<a.length;t++){let n=e[t],i=`color:${n?.color??`inherit`}`+(n?.italic===!0?`;font-style:italic`:``)+(n!=null&&n.weight!==0?`;font-weight:${n.weight}`:``);r.push(`<span style="${y(i)}">`)}return b(r)}var ce=new TextEncoder,C=new Uint8Array(a.length);for(let e=0;e<a.length;e++){let t=a[e];t===`string.regex`?C[e]=3:t===`comment`||t.startsWith(`comment.`)?C[e]=1:(t===`string`||t.startsWith(`string.`))&&(C[e]=2)}var le=new WeakMap,ue=new WeakMap,de=1,fe=new WeakMap,pe=new WeakMap,me=new WeakMap,he=0;function ge(e){let t=me.get(e);return t===void 0&&(t=he++,me.set(e,t)),t}function _e(e,t,n){let{name:r,styles:i,fg:a,bg:o,table:s}=e;return{color:t,role:n,name:r,styles:i,fg:a,bg:o,table:s,get ansi(){return e.ansi}}}function w(e){let{cssVariablePrefix:t}=e;if(e.themes==null)return[_e(S(e.theme,t),null,`single`)];let n=Object.entries(e.themes).filter(([,e])=>e!=null).sort(([e],[t])=>e<t?-1:1);if(n.length===0)throw TypeError(`themes must not be empty`);let r=e.defaultColor??`light`,i;if(r===`light-dark()`){let e=n.find(([e])=>e===`light`),t=n.find(([e])=>e===`dark`);if(e===void 0||t===void 0)throw TypeError("`themes` must contain `light` and `dark` when defaultColor is 'light-dark()'");n.splice(0,n.length,e,t),i=[`light-dark`,`light-dark`]}else{if(r!==!1){let e=n.findIndex(([e])=>e===r);if(e<0)throw TypeError(`\`themes\` must contain the defaultColor key \`${r}\``);n.unshift(...n.splice(e,1))}i=n.map((e,t)=>r!==!1&&t===0?`default`:`variable`)}let a=n.map(([,e])=>S(e,t)),o=JSON.stringify(n.map(([e],t)=>[ge(a[t]),i[t],e])),s=pe.get(a[0]),c=s?.get(o);if(c!==void 0)return c;let l=n.map(([e],t)=>_e(a[t],e,i[t]));if(s===void 0&&(s=new Map,pe.set(a[0],s)),s.set(o,l),s.size>128){let e=s.keys().next().value;e!==void 0&&s.delete(e)}return l}function T(e,t,n,r,i,a,o=0){let s={content:e.slice(t,n),offset:t+o};if(i[0].role===`single`){let{styles:e,fg:t}=i[0],n=e[r];s.color=n?.color??t;let a=0;n?.italic===!0&&(a|=1),(n?.weight??0)>=600&&(a|=2),s.fontStyle=a}else s.htmlStyle=D(i,r,a);let c=C[r];return c!==0&&(s.type=c),s}function E(e,t){let n=le.get(e);n===void 0&&(n=new Map,le.set(e,n));let r=n.get(t);return r===void 0&&(r=[],n.set(t,r)),r}function D(e,t,n){let r=E(e,n),i=r[t];if(i===void 0){if(e[0].role===`light-dark`)i=be(e,t,n);else{i={};for(let{color:r,role:a,styles:o,fg:s}of e){let e=o[t],c=a==="default";i[c?`color`:n+r]=e?.color??s??`inherit`,e?.italic===!0&&(i[c?`font-style`:`${n}${r}-font-style`]=`italic`),e!=null&&e.weight!==0&&(i[c?`font-weight`:`${n}${r}-font-weight`]=String(e.weight))}}r[t]=i}return i}function ve(e,t){let n=ue.get(e);n===void 0&&(n=new Map,ue.set(e,n));let r=n.get(t);if(r!==void 0)return r??void 0;let i=e.length;if(!(i<=255&&e.every(e=>e.table!==void 0))){n.set(t,null);return}let a=e.map(e=>e.role==="default"?new Uint8Array:ce.encode(y(`${t}${e.color}`))),o=32+16*i,s=o+384*i,c=64,l=128,u=0;for(let{length:e}of a)c+=64+3*e,l+=48+2*e,u+=e;let d=new Uint8Array(s+u),f=new DataView(d.buffer);d[0]=i,d[1]=+(e[0].role===`light-dark`),f.setUint32(4,o,!0),f.setUint32(8,c,!0),f.setUint32(12,l,!0),f.setUint32(16,de++,!0);let p=s;for(let t=0;t<i;t++){let n=32+16*t;f.setUint32(n,p,!0),f.setUint32(n+4,a[t].length,!0),f.setUint32(n+8,+(e[t].role==="default"),!0),d.set(e[t].table,o+384*t),d.set(a[t],p),p+=a[t].length}return n.set(t,d),d}function ye(e,t){let n=fe.get(e);n===void 0&&(n=new Map,fe.set(e,n));let r=n.get(t);if(r!==void 0)return r;let{fg:i,bg:o,rootStyle:s}=O(e,t),c=[`<pre class="highlights" style="${y(s??`background-color:${o};color:${i}`)}"><code>`];for(let n=1;n<a.length;n++){let r=D(e,n,t),i=``;for(let e in r)i+=`${i===``?``:`;`}${e}:${r[e]}`;c.push(`<span style="${y(i)}">`)}let l=b(c);return n.set(t,l),l}function be(e,t,n){let[r,i]=e,a=r.styles[t],o=i.styles[t],s=a?.color??r.fg??`currentcolor`,c=o?.color??i.fg??`currentcolor`,l={color:s===c?s:`light-dark(${s}, ${c})`},u=a?.italic===!0,d=o?.italic===!0;u&&d?l[`font-style`]=`italic`:(u&&(l[`${n}light-font-style`]=`italic`),d&&(l[`${n}dark-font-style`]=`italic`));let f=a?.weight??0,p=o?.weight??0;return f!==0&&f===p?l[`font-weight`]=String(f):(f!==0&&(l[`${n}light-font-weight`]=String(f)),p!==0&&(l[`${n}dark-font-weight`]=String(p))),l}function xe(e,t,n,r,i,a=0){let o=[],s=i??0,{styles:c,fg:l,role:u}=n[0],d=u===`single`?void 0:E(n,r),f=0;for(let i=0;;i+=2){let u=i;for(;i<t.length&&t[i+1]!==4294967295;)i+=2;let p=i===u?f:t[i-2],m;if(s>0&&p-f>=s)m=[T(e,f,p,0,n,r,a)];else{m=Array((i-u)/2);let o=0;for(let s=u;s<i;s+=2){let i=t[s];if(i>f){let u=t[s+1],p;if(d===void 0){let t=c[u];p={content:e.slice(f,i),offset:f+a,color:t?.color??l,fontStyle:+(t?.italic===!0)|((t?.weight??0)>=600?2:0)}}else p={content:e.slice(f,i),offset:f+a,htmlStyle:d[u]??D(n,u,r)};let h=C[u];h!==0&&(p.type=h),m[o++]=p,f=i}}m.length=o}if(o.push(m),i===t.length)break;f=t[i]}return o}function O(e,t){if(e[0].role===`single`)return{fg:e[0].fg,bg:e[0].bg,themeName:e[0].name};let n=`highlights-themes ${e.map(e=>e.name).join(` `)}`;if(e[0].role===`light-dark`){let t=(e,t,n)=>{let r=e??n,i=t??n;return r===i?r:`light-dark(${r}, ${i})`};return{fg:t(e[0].fg,e[1].fg,`currentcolor`),bg:t(e[0].bg,e[1].bg,`transparent`),themeName:n}}let r=e.map(e=>e.role==="default"?e.fg??`inherit`:`${t}${e.color}:${e.fg??`inherit`}`).join(`;`),i=e.map(e=>e.role==="default"?e.bg??`inherit`:`${t}${e.color}-bg:${e.bg??`inherit`}`).join(`;`);return{fg:r,bg:i,themeName:n,rootStyle:e[0].role==="default"?void 0:`${r};${i}`}}var k=1,A=2,j=4,M=8,N=16,P=32,F=[0,k,A,j,M,0,0,N,0,P],I=[0,95,135,175,215,255],L=/\x1b(?:\[([0-?]*)[ -/]*([@-~])|\][^\x07\x1b\n]*(?:\x07|\x1b\\)|[ -/]*[0-~])/y,Se=class{fg=-1;bg=-1;flags=0;styles=new Map};function R(e){return String(e).toLowerCase()===`ansi`}function z(e,t){if(t<16)return e.ansi[t];let n=t&16777215;if(t<232){let e=t-16;n=I[e/36|0]<<16|I[(e/6|0)%6]<<8|I[e%6]}else t<256&&(n=(8+(t-232)*10)*65793);return`#${n.toString(16).padStart(6,`0`)}`}function B(e,t,n,r,i=new Se,a=0){let o=[],s=r??0,c=[],l,u,d,f=e.indexOf(`\x1B`),p=0;for(;;){let r=e.indexOf(`
|
|
1
|
+
import{nt as e,rt as t,tt as n}from"./index-wTs3AdOj.js";import{n as r,t as i}from"./stream-tokenizer-C793Xkmg.js";var a=`none,attribute,attribute.jsx,boolean,comment,comment.doc,constant,constant.builtin,constructor,diff.minus,diff.plus,embedded,emphasis,emphasis.strong,function,function.definition,function.method,keyword,keyword.control,keyword.declaration,keyword.import,keyword.operator,label,namespace,number,operator,predictive,preproc,primary,property,property.json_key,punctuation,punctuation.bracket,punctuation.bracket.html,punctuation.bracket.jsx,punctuation.delimiter,punctuation.delimiter.html,punctuation.delimiter.jsx,punctuation.list_marker,punctuation.markup,punctuation.special,selector,selector.class,selector.id,string,string.escape,string.regex,string.special,string.special.symbol,tag,tag.doctype,tag.jsx,text.jsx,text.literal,title,type,type.builtin,type.class,variable,variable.parameter,variable.special,enum,hint,keyword.jsdoc,link_text,link_uri,selector.pseudo,tag.component.jsx,type.jsdoc,variable.jsdoc,variant,background,foreground`.split(`,`),o=`--hls-`,s=new TextEncoder,c=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,l=/^color\(display-p3\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:\s*\/\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+))?\s*\)$/i;function u(e){return typeof e==`string`&&(c.test(e.trim())||l.test(e.trim()))}function d(e){return e[`editor.foreground`]??e.text??e.foreground}function f(e){return e[`editor.background`]??e.background}var p=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`bright_black`,`bright_red`,`bright_green`,`bright_yellow`,`bright_blue`,`bright_magenta`,`bright_cyan`,`bright_white`],m=[`#000000`,`#cd3131`,`#0dbc79`,`#e5e510`,`#2472c8`,`#bc3fbc`,`#11a8cd`,`#e5e5e5`,`#666666`,`#f14c4c`,`#23d18b`,`#f5f543`,`#3b8eea`,`#d670d6`,`#29b8db`,`#ffffff`];function h(e){return p.map((t,n)=>ne({foreground:e[`terminal.ansi.${t}`]},`foreground`).color??m[n])}function g(e){return e===null?`null`:e===void 0?`undefined`:typeof e==`string`?`the string ${JSON.stringify(e)} (theme ids are not supported; import the theme object from "@pierre/highlights/themes")`:Array.isArray(e)?`an array`:typeof e==`object`?`themes`in e&&Array.isArray(e.themes)?`a ThemeFamily whose first member is ${g(e.themes[0])}`:"an object without a `name`":`a ${typeof e}`}function ee(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`&&e.name!==``}function te(e){let t=typeof e==`object`&&e&&`themes`in e&&e.themes!=null?e.themes[0]:e;if(!ee(t))throw TypeError(`invalid theme: expected a Theme or ThemeFamily object, received ${g(e)}`);return t}function _(e,t){let n;for(let r=t;r!==``;){let t=e[r];if(typeof t==`string`)return{...n,color:t};if(typeof t==`object`&&t&&(n??=t,t.color!=null))return{...n,color:t.color};let i=r.lastIndexOf(`.`);r=i<0?``:r.slice(0,i)}return n}function ne(e,t){let n,r,i;return t===`background`?n=f(e):t===`foreground`?n=d(e):({color:n,font_style:r,font_weight:i}=_(e.syntax??{},t)??{},(r!=null||i!=null)&&(n??=d(e))),u(n)?(n=n.trim().toLowerCase(),n.startsWith(`#`)&&(n.length<=5&&(n=n.replace(/[^#]/g,`$&$&`)),n.length===9&&n.endsWith(`ff`)&&(n=n.slice(0,7)),n===`#00000000`&&(n=void 0))):n=void 0,{color:n,italic:r===`italic`,weight:i!=null&&i>=100&&i<=900?Math.round(i/100)*100:0}}function v(e,t){return`var(${t}${e.replace(/[._]/g,`-`)})`}function y(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function b(e){let t=e.map(e=>s.encode(e)),n=4+8*t.length,r=new Uint8Array(n+t.reduce((e,t)=>e+t.length,0)),i=new DataView(r.buffer),a=32;for(let e=0;e<t.length;e++)i.setUint32(4+8*e,n,!0),i.setUint32(8+8*e,t[e].length,!0),r.set(t[e],n),n+=t[e].length,e!==0&&(a=Math.max(a,t[e].length+32));return i.setUint32(0,a,!0),r}var x=new WeakMap;function S(e,t=o){let n=te(e),r=n.cssVariables===!0?t:``,i=x.get(n),a=i?.get(r);if(a!==void 0)return a;let s=n.cssVariables===!0?ie(n.name,t):typeof n.cssVariables==`object`?re(n):oe(n);return i===void 0&&(i=new Map,x.set(n,i)),i.set(r,s),s}function re(e){let t=e.cssVariables;if(typeof t!=`object`)throw Error(`Expected CSS palette`);let n=t.prefix??`--hls-`,r=e=>{let r=t.defaults?.[e];return`var(${n}${e}${r?`, ${r}`:``})`},i=Array(a.length).fill(null),o=e.style.syntax??{};for(let e=1;e<a.length;e++){let t=_(o,a[e]);i[e]={color:r(t?.color??`foreground`),italic:t?.font_style===`italic`,weight:t?.font_weight===void 0?0:Math.round(t.font_weight/100)*100}}let s=r(d(e.style)??`foreground`),c=r(f(e.style)??`background`),l,u;return{name:e.name,styles:i,fg:s,bg:c,table:void 0,get htmlOpeners(){return l??=se(i,s,c)},get ansi(){return u??=p.map(t=>{let n=e.style[`terminal.ansi.${t}`];return r(typeof n==`string`?n:`terminal-ansi-${t.replace(`_`,`-`)}`)})}}}function ie(e,t){let n,r=()=>n??=ae(t),i;return{name:e,get styles(){return r().styles},get fg(){return r().fg},get bg(){return r().bg},table:void 0,htmlOpeners:void 0,get ansi(){return i??=p.map(e=>v(`terminal.ansi.${e}`,t))}}}function ae(e){let t=Array(a.length).fill(null);for(let n=1;n<a.length;n++)t[n]={color:v(a[n],e),italic:!1,weight:0};return{styles:t,fg:v(`foreground`,e),bg:v(`background`,e)}}function oe(e){let t=e.style??{},n=Array(a.length).fill(null),r=new Uint8Array(a.length*5),i,o,s=!1;for(let e=1;e<a.length;e++){let c=a[e],l=ne(t,c),{color:u,italic:d,weight:f}=l,p=e*5;if(u!==void 0){if(u.startsWith(`#`)){let e=parseInt(u.slice(1,7),16);r[p]=e>>16,r[p+1]=e>>8&255,r[p+2]=e&255,r[p+3]=u.length===9?parseInt(u.slice(7),16):255}else s=!0}r[p+4]=(d?16:0)|f/100,(u!==void 0||d||f!==0)&&(c===`foreground`?i=u:c===`background`?o=u:n[e]=l)}let c,l;return{name:e.name,styles:n,fg:i,bg:o,table:s?void 0:r,get htmlOpeners(){if(s)return c??=se(n,i,o)},get ansi(){return l??=h(t)}}}function se(e,t,n){let r=[`<pre class="highlights" style="${y((n===void 0?``:`background-color:${n};`)+(t===void 0?``:`color:${t}`))}"><code>`];for(let t=1;t<a.length;t++){let n=e[t],i=`color:${n?.color??`inherit`}`+(n?.italic===!0?`;font-style:italic`:``)+(n!=null&&n.weight!==0?`;font-weight:${n.weight}`:``);r.push(`<span style="${y(i)}">`)}return b(r)}var ce=new TextEncoder,C=new Uint8Array(a.length);for(let e=0;e<a.length;e++){let t=a[e];t===`string.regex`?C[e]=3:t===`comment`||t.startsWith(`comment.`)?C[e]=1:(t===`string`||t.startsWith(`string.`))&&(C[e]=2)}var le=new WeakMap,ue=new WeakMap,de=1,fe=new WeakMap,pe=new WeakMap,me=new WeakMap,he=0;function ge(e){let t=me.get(e);return t===void 0&&(t=he++,me.set(e,t)),t}function _e(e,t,n){let{name:r,styles:i,fg:a,bg:o,table:s}=e;return{color:t,role:n,name:r,styles:i,fg:a,bg:o,table:s,get ansi(){return e.ansi}}}function w(e){let{cssVariablePrefix:t}=e;if(e.themes==null)return[_e(S(e.theme,t),null,`single`)];let n=Object.entries(e.themes).filter(([,e])=>e!=null).sort(([e],[t])=>e<t?-1:1);if(n.length===0)throw TypeError(`themes must not be empty`);let r=e.defaultColor??`light`,i;if(r===`light-dark()`){let e=n.find(([e])=>e===`light`),t=n.find(([e])=>e===`dark`);if(e===void 0||t===void 0)throw TypeError("`themes` must contain `light` and `dark` when defaultColor is 'light-dark()'");n.splice(0,n.length,e,t),i=[`light-dark`,`light-dark`]}else{if(r!==!1){let e=n.findIndex(([e])=>e===r);if(e<0)throw TypeError(`\`themes\` must contain the defaultColor key \`${r}\``);n.unshift(...n.splice(e,1))}i=n.map((e,t)=>r!==!1&&t===0?`default`:`variable`)}let a=n.map(([,e])=>S(e,t)),o=JSON.stringify(n.map(([e],t)=>[ge(a[t]),i[t],e])),s=pe.get(a[0]),c=s?.get(o);if(c!==void 0)return c;let l=n.map(([e],t)=>_e(a[t],e,i[t]));if(s===void 0&&(s=new Map,pe.set(a[0],s)),s.set(o,l),s.size>128){let e=s.keys().next().value;e!==void 0&&s.delete(e)}return l}function T(e,t,n,r,i,a,o=0){let s={content:e.slice(t,n),offset:t+o};if(i[0].role===`single`){let{styles:e,fg:t}=i[0],n=e[r];s.color=n?.color??t;let a=0;n?.italic===!0&&(a|=1),(n?.weight??0)>=600&&(a|=2),s.fontStyle=a}else s.htmlStyle=D(i,r,a);let c=C[r];return c!==0&&(s.type=c),s}function E(e,t){let n=le.get(e);n===void 0&&(n=new Map,le.set(e,n));let r=n.get(t);return r===void 0&&(r=[],n.set(t,r)),r}function D(e,t,n){let r=E(e,n),i=r[t];if(i===void 0){if(e[0].role===`light-dark`)i=be(e,t,n);else{i={};for(let{color:r,role:a,styles:o,fg:s}of e){let e=o[t],c=a==="default";i[c?`color`:n+r]=e?.color??s??`inherit`,e?.italic===!0&&(i[c?`font-style`:`${n}${r}-font-style`]=`italic`),e!=null&&e.weight!==0&&(i[c?`font-weight`:`${n}${r}-font-weight`]=String(e.weight))}}r[t]=i}return i}function ve(e,t){let n=ue.get(e);n===void 0&&(n=new Map,ue.set(e,n));let r=n.get(t);if(r!==void 0)return r??void 0;let i=e.length;if(!(i<=255&&e.every(e=>e.table!==void 0))){n.set(t,null);return}let a=e.map(e=>e.role==="default"?new Uint8Array:ce.encode(y(`${t}${e.color}`))),o=32+16*i,s=o+384*i,c=64,l=128,u=0;for(let{length:e}of a)c+=64+3*e,l+=48+2*e,u+=e;let d=new Uint8Array(s+u),f=new DataView(d.buffer);d[0]=i,d[1]=+(e[0].role===`light-dark`),f.setUint32(4,o,!0),f.setUint32(8,c,!0),f.setUint32(12,l,!0),f.setUint32(16,de++,!0);let p=s;for(let t=0;t<i;t++){let n=32+16*t;f.setUint32(n,p,!0),f.setUint32(n+4,a[t].length,!0),f.setUint32(n+8,+(e[t].role==="default"),!0),d.set(e[t].table,o+384*t),d.set(a[t],p),p+=a[t].length}return n.set(t,d),d}function ye(e,t){let n=fe.get(e);n===void 0&&(n=new Map,fe.set(e,n));let r=n.get(t);if(r!==void 0)return r;let{fg:i,bg:o,rootStyle:s}=O(e,t),c=[`<pre class="highlights" style="${y(s??`background-color:${o};color:${i}`)}"><code>`];for(let n=1;n<a.length;n++){let r=D(e,n,t),i=``;for(let e in r)i+=`${i===``?``:`;`}${e}:${r[e]}`;c.push(`<span style="${y(i)}">`)}let l=b(c);return n.set(t,l),l}function be(e,t,n){let[r,i]=e,a=r.styles[t],o=i.styles[t],s=a?.color??r.fg??`currentcolor`,c=o?.color??i.fg??`currentcolor`,l={color:s===c?s:`light-dark(${s}, ${c})`},u=a?.italic===!0,d=o?.italic===!0;u&&d?l[`font-style`]=`italic`:(u&&(l[`${n}light-font-style`]=`italic`),d&&(l[`${n}dark-font-style`]=`italic`));let f=a?.weight??0,p=o?.weight??0;return f!==0&&f===p?l[`font-weight`]=String(f):(f!==0&&(l[`${n}light-font-weight`]=String(f)),p!==0&&(l[`${n}dark-font-weight`]=String(p))),l}function xe(e,t,n,r,i,a=0){let o=[],s=i??0,{styles:c,fg:l,role:u}=n[0],d=u===`single`?void 0:E(n,r),f=0;for(let i=0;;i+=2){let u=i;for(;i<t.length&&t[i+1]!==4294967295;)i+=2;let p=i===u?f:t[i-2],m;if(s>0&&p-f>=s)m=[T(e,f,p,0,n,r,a)];else{m=Array((i-u)/2);let o=0;for(let s=u;s<i;s+=2){let i=t[s];if(i>f){let u=t[s+1],p;if(d===void 0){let t=c[u];p={content:e.slice(f,i),offset:f+a,color:t?.color??l,fontStyle:+(t?.italic===!0)|((t?.weight??0)>=600?2:0)}}else p={content:e.slice(f,i),offset:f+a,htmlStyle:d[u]??D(n,u,r)};let h=C[u];h!==0&&(p.type=h),m[o++]=p,f=i}}m.length=o}if(o.push(m),i===t.length)break;f=t[i]}return o}function O(e,t){if(e[0].role===`single`)return{fg:e[0].fg,bg:e[0].bg,themeName:e[0].name};let n=`highlights-themes ${e.map(e=>e.name).join(` `)}`;if(e[0].role===`light-dark`){let t=(e,t,n)=>{let r=e??n,i=t??n;return r===i?r:`light-dark(${r}, ${i})`};return{fg:t(e[0].fg,e[1].fg,`currentcolor`),bg:t(e[0].bg,e[1].bg,`transparent`),themeName:n}}let r=e.map(e=>e.role==="default"?e.fg??`inherit`:`${t}${e.color}:${e.fg??`inherit`}`).join(`;`),i=e.map(e=>e.role==="default"?e.bg??`inherit`:`${t}${e.color}-bg:${e.bg??`inherit`}`).join(`;`);return{fg:r,bg:i,themeName:n,rootStyle:e[0].role==="default"?void 0:`${r};${i}`}}var k=1,A=2,j=4,M=8,N=16,P=32,F=[0,k,A,j,M,0,0,N,0,P],I=[0,95,135,175,215,255],L=/\x1b(?:\[([0-?]*)[ -/]*([@-~])|\][^\x07\x1b\n]*(?:\x07|\x1b\\)|[ -/]*[0-~])/y,Se=class{fg=-1;bg=-1;flags=0;styles=new Map};function R(e){return String(e).toLowerCase()===`ansi`}function z(e,t){if(t<16)return e.ansi[t];let n=t&16777215;if(t<232){let e=t-16;n=I[e/36|0]<<16|I[(e/6|0)%6]<<8|I[e%6]}else t<256&&(n=(8+(t-232)*10)*65793);return`#${n.toString(16).padStart(6,`0`)}`}function B(e,t,n,r,i=new Se,a=0){let o=[],s=r??0,c=[],l,u,d,f=e.indexOf(`\x1B`),p=0;for(;;){let r=e.indexOf(`
|
|
2
2
|
`,p),m=r<0?e.length:r;r>p&&e.charCodeAt(r-1)===13&&m--;let h=s>0&&m-p>=s;for(;p<m;){f>=0&&f<p&&(f=e.indexOf(`\x1B`,p));let r=f>=0&&f<m?f:m,o=r,s;if(r<m){L.lastIndex=r;let t=L.exec(e);t===null?o=++r:(o=L.lastIndex,t[2]===`m`&&!(t[1].charCodeAt(0)>=60)&&(s=t[1]))}if(r>p&&h)u===void 0?(u=T(e,p,r,0,t,n,a),c.push(u)):u.content+=e.slice(p,r);else if(r>p){if(l===void 0){let{fg:e,bg:r,flags:a}=i,o=`${e},${r},${a}`;if(l=i.styles.get(o),l===void 0){let s=((a&j)===0?0:1)|((a&k)===0?0:2)|((a&M)===0?0:4)|((a&P)===0?0:8),c=t.map(t=>{let n=e<0?t.fg:z(t,e),i=r<0?void 0:z(t,r);return(a&N)!==0&&(i=n,n=r<0?t.bg:z(t,r)),(a&A)!==0&&n!==void 0&&(n=n.startsWith(`#`)?n.length===9?n.slice(0,7)+Math.round(parseInt(n.slice(7),16)/2).toString(16).padStart(2,`0`):`${n}80`:`color-mix(in srgb, ${n} 50%, transparent)`),[n,i]});if(t[0].role===`single`){let[e,t]=c[0];l=t===void 0?{color:e,fontStyle:s}:{color:e,bgColor:t,fontStyle:s}}else{let e=[];s&1&&e.push([`font-style`,`italic`]),s&2&&e.push([`font-weight`,`bold`]),s&12&&e.push([`text-decoration`,(s&12)==12?`underline line-through`:s&4?`underline`:`line-through`]);let r={};if(t[0].role===`light-dark`){let[[t,n],[i,a]]=c,o=t??`currentcolor`,s=i??`currentcolor`;if(r.color=o===s?o:`light-dark(${o}, ${s})`,n!==void 0||a!==void 0){let e=n??`transparent`,t=a??`transparent`;r[`background-color`]=e===t?e:`light-dark(${e}, ${t})`}for(let[t,n]of e)r[t]=n}else for(let i=0;i<t.length;i++){let[a,o]=c[i],s=t[i].role==="default",l=`${n}${t[i].color}`;r[s?`color`:l]=a??`inherit`,o!==void 0&&(r[s?`background-color`:`${l}-bg`]=o);for(let[t,n]of e)r[s?t:`${l}-${t}`]=n}l={htmlStyle:r}}i.styles.set(o,l)}}u!==void 0&&d===l?u.content+=e.slice(p,r):(u={content:e.slice(p,r),offset:p+a,...l},d=l,c.push(u))}if(s!==void 0){let e=s.split(`;`);for(let t=0;t<e.length;t++){let n=Number(e[t]);if(n===0)i.fg=-1,i.bg=-1,i.flags=0;else if(n<10)i.flags|=F[n]??0;else if(n>20&&n<30)i.flags&=~((F[n-20]??0)|(n===22?k:0));else if(n>=30&&n<38)i.fg=n-30;else if(n===39)i.fg=-1;else if(n>=40&&n<48)i.bg=n-40;else if(n===49)i.bg=-1;else if(n>=90&&n<98)i.fg=n-82;else if(n>=100&&n<108)i.bg=n-92;else if(n===38||n===48){let r=e[++t],a=-1;if(r===`5`){let n=Number(e[++t]);Number.isInteger(n)&&n<256&&(a=n)}else if(r===`2`){let n=Number(e[t+1]),r=Number(e[t+2]),i=Number(e[t+3]);t+=3,n>=0&&r>=0&&i>=0&&(a=16777216|Math.min(n,255)<<16|Math.min(r,255)<<8|Math.min(i,255))}a>=0&&(n===38?i.fg=a:i.bg=a)}}l=void 0}p=o}if(o.push(c),r<0)return o;p=r+1,c=[],u=void 0}}var Ce={plain:0,plaintext:0,text:0,txt:0,abap:1,ada:2,adb:2,ads:2,"angular-html":3,apache:4,apacheconf:4,htaccess:4,apex:5,applescript:6,adoc:7,asciidoc:7,asm:8,assembly:8,mips:8,mipsasm:8,riscv:8,s:8,astro:9,awk:10,bash:11,sh:11,shell:11,shellscript:11,shellsession:11,zsh:11,bat:12,batch:12,batchfile:12,cmd:12,dos:12,bib:13,bibtex:13,bicep:14,blade:15,c:16,h:16,c3:17,clj:18,cljc:18,cljs:18,clojure:18,edn:18,cmake:19,cbl:20,cob:20,cobol:20,codeowners:21,codeql:22,ql:22,coffee:23,coffeescript:23,coq:24,rocq:24,"c++":25,cc:25,cpp:25,cxx:25,hh:25,hpp:25,hxx:25,"c#":26,cs:26,csharp:26,css:27,postcss:27,qss:27,csv:28,cu:29,cuda:29,cuh:29,cql:30,cypher:30,d:31,dart:32,dax:33,diff:34,"git-commit":34,"git-rebase":34,patch:34,containerfile:35,docker:35,dockerfile:35,dotenv:36,env:36,elixir:37,ex:37,exs:37,elm:38,erb:39,erl:40,erlang:40,hrl:40,fish:41,f03:42,f08:42,f90:42,f95:42,fortran:42,"fortran-free-form":42,f:43,f77:43,for:43,"fortran-fixed-form":43,"f#":44,fs:44,fsharp:44,fsi:44,fsx:44,gdresource:45,"godot-resource":45,tres:45,tscn:45,gd:46,gdscript:46,gdshader:47,gdshaderinc:47,"godot-shader":47,cucumber:48,feature:48,gherkin:48,gleam:49,comp:50,frag:50,geom:50,glsl:50,vert:50,gnuplot:51,gp:51,go:52,golang:52,gql:53,graphql:53,groq:54,gradle:55,groovy:55,gsh:55,gvy:55,gy:55,nextflow:55,"nextflow-groovy":55,nf:55,hack:56,haml:57,handlebars:58,hbs:58,mustache:58,haskell:59,hs:59,haxe:60,hx:60,hlsl:61,htm:62,html:62,"html-derivative":62,http:63,desktop:64,ini:64,properties:64,systemd:64,java:65,j2:66,jinja:66,jinja2:66,cjs:67,javascript:67,js:67,mjs:67,json:68,jsonc:68,json5:69,jsonl:70,jsonnet:71,libsonnet:71,jsx:72,jl:73,julia:73,just:74,justfile:74,kdl:75,kotlin:76,kt:76,kts:76,latex:77,tex:77,lean:78,lean4:78,less:79,liquid:80,cl:81,el:81,elisp:81,"emacs-lisp":81,lisp:81,lsp:81,racket:81,rkt:81,scheme:81,scm:81,llvm:82,log:83,lua:84,luau:85,make:86,makefile:86,mk:86,markdown:87,md:87,mdc:87,matlab:88,octave:88,mdx:89,mermaid:90,mmd:90,mbt:91,moonbit:91,nginx:92,nim:93,nix:94,m:95,mm:95,objc:95,objcpp:95,"objective-c":95,"objective-cpp":95,objectivec:95,ml:96,mli:96,ocaml:96,odin:97,openscad:98,scad:98,delphi:99,dpk:99,dpr:99,lpr:99,"object-pascal":99,objectpascal:99,pas:99,pascal:99,pp:99,perl:100,pl:100,pm:100,php:101,plsql:102,po:103,pot:103,potx:103,powerquery:104,pq:104,powershell:105,ps:105,ps1:105,psd1:105,psm1:105,pwsh:105,prisma:106,prolog:107,promql:108,proto:109,protobuf:109,jade:110,pug:110,puppet:111,py:112,python:112,qml:113,r:114,rscript:114,cshtml:115,razor:115,reg:116,rosmsg:117,restructuredtext:118,rst:118,rb:119,ruby:119,rs:120,rust:120,sas:121,sass:122,sbt:123,sc:123,scala:123,scss:124,shader:125,shaderlab:125,sol:126,solidity:126,sparql:127,sql:128,stata:129,styl:130,stylus:130,svelte:131,swift:132,tcl:133,hcl:134,terraform:134,tf:134,tfvars:134,toml:135,"angular-ts":136,cts:136,lit:136,mts:136,ts:136,"ts-tags":136,typescript:136,tsrx:137,tsv:138,tsx:139,ttl:140,turtle:140,twig:141,typ:142,typst:142,sv:143,svh:143,"system-verilog":143,systemverilog:143,verilog:143,vhd:144,vhdl:144,vim:145,viml:145,vimscript:145,vue:146,"vue-html":146,wasm:147,wat:147,wgsl:148,mathematica:149,wl:149,wolfram:149,svg:150,xml:150,xsd:150,xsl:150,xslt:150,yaml:151,yml:151,zig:152,zon:152},V=new TextEncoder,we=new TextDecoder(`utf-8`,{ignoreBOM:!0}),H=65536,Te=64,U=81920,Ee=[/^\p{ID_Start}$/u,/^[\u200C\u200D\p{ID_Continue}]$/u],W,De=Ce;function G(e){let t=De[String(e).toLowerCase()];if(typeof t!=`number`)throw RangeError(`unknown lang: ${e}`);return t}function Oe(e){return typeof De[String(e).toLowerCase()]==`number`||R(e)}var K=class{#e;#t;#n;#r;#i=new Uint8Array;wasmModule;instance;memory;buffer;dv;pageN;constructor(e){this.wasmModule=e;let t=new WebAssembly.Instance(e,{env:{is_id_start:(e,t)=>this.#s(e,t,0),is_id_continue:(e,t)=>this.#s(e,t,2)}});this.instance=t,this.memory=t.exports.memory,this.#e=t.exports.highlight,this.#t=t.exports.highlightStream,this.pageN=this.memory.buffer.byteLength/H,this.buffer=new Uint8Array(this.memory.buffer),this.dv=new DataView(this.memory.buffer)}writeInput(e,t=0){if(typeof e==`string`){this.#o(t+e.length+96);let{read:n,written:r}=V.encodeInto(e,this.buffer.subarray(U+t,this.buffer.length-96));if(n<e.length){let i=e.slice(n);this.#o(t+r+i.length*3+96),r+=V.encodeInto(i,this.buffer.subarray(U+t+r,this.buffer.length-96)).written}return r}if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e instanceof Uint8Array))throw TypeError(`input must be a string, Uint8Array, or ArrayBuffer`);return this.#o(t+e.length+96),this.buffer.set(e,U+t),e.length}#a(e,t,n,r){this.dv.setUint8(0,e),this.dv.setUint8(1,t),this.dv.setUint32(2,n,!0),this.buffer[U+n]=0;try{r===void 0?this.#e():this.#t(r)}finally{this.bindMemory()}}codeToHtml(e,t){let n=t.cssVariablePrefix??`--hls-`;if(R(t.lang)){let r=w(t),{fg:i,bg:a,rootStyle:o}=O(r,n),s=ke(e),c=B(s,r[0].role===`single`?[{...r[0],role:`default`}]:r,n),l=`<pre class="highlights" style="${y(o??(a===void 0?``:`background-color:${a};`)+(i===void 0?``:`color:${i}`))}"><code>`;for(let e=0,t=-1;e<c.length;e++){e>0&&(t=s.indexOf(`
|
|
3
3
|
`,t+1),l+=s.charCodeAt(t-1)===13?`\r
|
|
4
4
|
`:`
|