netstar-ai-chat 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{CodeBlockNode-uCRw2qdH.js → CodeBlockNode-CBF9Wys1.js} +1 -1
  2. package/dist/{CodeBlockNode-nxaZO8pn.cjs → CodeBlockNode-DAo61g1R.cjs} +1 -1
  3. package/dist/{dist-CCXt4qM3.cjs → dist-CPyTkG8r.cjs} +1 -1
  4. package/dist/{dist-CS9eMk17.js → dist-v6nlIdy5.js} +1 -1
  5. package/dist/{exports-DQNCykpa.js → exports-Duk5bF8U.js} +8 -8
  6. package/dist/{exports-CUDnphqD.cjs → exports-arka-E9j.cjs} +2 -2
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/{index2-DVVXKht2.cjs → index2-B6bq_gT5.cjs} +1 -1
  10. package/dist/{index2-6XNXmD9D.js → index2-D0G_wi0X.js} +1 -1
  11. package/dist/{index3-m__wi4Tc.js → index3-B7VD0bp5.js} +1 -1
  12. package/dist/{index3-i-YcvOOM.cjs → index3-zcICi2UD.cjs} +1 -1
  13. package/dist/{index4-ChGJejaH.cjs → index4-Bz-HXO_t.cjs} +1 -1
  14. package/dist/{index4-a76eTE_l.js → index4-DP46yPWR.js} +1 -1
  15. package/dist/{index5-CGyUxkgz.js → index5-DKkNi-Gi.js} +1 -1
  16. package/dist/{index5-C3svTHtx.cjs → index5-DvsLxpPM.cjs} +1 -1
  17. package/dist/{index6-DnR2b9_0.cjs → index6-9652i-rR.cjs} +1 -1
  18. package/dist/{index6-CDHKjY4q.js → index6-uf4qLQF-.js} +1 -1
  19. package/dist/{index7-C7UxGaDK.js → index7-DMt42BW9.js} +1 -1
  20. package/dist/index7-DOS0ydZt.cjs +1 -0
  21. package/dist/shiki-langs-6yxXN7qk.js +6396 -0
  22. package/dist/shiki-langs-CgHqCFaJ.cjs +12 -0
  23. package/package.json +1 -1
  24. package/dist/dist-BtUTYFnJ.js +0 -6360
  25. package/dist/dist-Cu0Z5KOd.cjs +0 -12
  26. package/dist/index7-CR5-JEQ4.cjs +0 -1
  27. package/dist/wasm-B9xa8Mue.js +0 -4
  28. package/dist/wasm-DcRxl4j_.cjs +0 -1
  29. /package/dist/{netstar-ai-chat.css → style.css} +0 -0
@@ -1,4 +1,4 @@
1
- import { C as e, D as t, E as n, O as r, T as i, a, b as o, d as s, h as ee, m as c, n as te, r as l, s as u, y as ne } from "./exports-DQNCykpa.js";
1
+ import { C as e, D as t, E as n, O as r, T as i, a, b as o, d as s, h as ee, m as c, n as te, r as l, s as u, y as ne } from "./exports-Duk5bF8U.js";
2
2
  import { Fragment as re, Teleport as ie, computed as d, createBlock as ae, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, getCurrentInstance as oe, nextTick as se, normalizeClass as g, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, onUnmounted as de, openBlock as _, ref as v, renderSlot as fe, toDisplayString as pe, unref as y, vShow as me, watch as b, withDirectives as he, withModifiers as ge } from "vue";
3
3
  //#region ../../node_modules/.pnpm/markstream-vue@0.0.10_katex@0.16.47_mermaid@11.16.0_shiki@2.5.0_stream-markdown@0.0.16__933418433302c8f1097502413881496d/node_modules/markstream-vue/dist/CodeBlockNode.js
4
4
  var _e = Object.defineProperty, x = Object.defineProperties, S = Object.getOwnPropertyDescriptors, ve = Object.getOwnPropertySymbols, C = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable, T = (e, t, n) => t in e ? _e(e, t, {
@@ -1 +1 @@
1
- const e=require("./exports-CUDnphqD.cjs");let t=require("vue");var n=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var n in t||={})o.call(t,n)&&c(e,n,t[n]);if(a)for(var n of a(t))s.call(t,n)&&c(e,n,t[n]);return e},u=(e,t)=>r(e,i(t)),d=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),f={class:`markstream-vue`},p={class:`html-preview-frame__header`},m={class:`html-preview-frame__title`},h={class:`html-preview-frame__label`},g=[`srcdoc`],ee=e.E((0,t.defineComponent)({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(n){let r=n,{t:i}=e.T(),a=(0,t.computed)(()=>{let e=r.code||``,t=e.trim().toLowerCase();return t.startsWith(`<!doctype`)||t.startsWith(`<html`)||t.startsWith(`<body`)?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${r.isDark?`#020617`:`#ffffff`};\n color: ${r.isDark?`#e5e7eb`:`#020617`};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function o(e){var t;e.key!==`Escape`&&e.key!==`Esc`||(t=r.onClose)==null||t.call(r)}return(0,t.onMounted)(()=>{typeof window<`u`&&window.addEventListener(`keydown`,o)}),(0,t.onUnmounted)(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,o)}),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,f,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`html-preview-frame__backdrop`,{"html-preview-frame__backdrop--dark":r.isDark}]),onClick:n[2]||=e=>r.onClose?.call(r)},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`html-preview-frame`,{"html-preview-frame--dark":r.isDark}]),onClick:n[1]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,p,[(0,t.createElementVNode)(`div`,m,[n[3]||=(0,t.createElementVNode)(`span`,{class:`html-preview-frame__dot`},null,-1),(0,t.createElementVNode)(`span`,h,(0,t.toDisplayString)(r.title||(0,t.unref)(i)(`common.preview`)||`Preview`),1)]),(0,t.createElementVNode)(`button`,{type:`button`,class:(0,t.normalizeClass)([`html-preview-frame__close`,{"html-preview-frame__close--dark":r.isDark}]),onClick:n[0]||=e=>r.onClose?.call(r)},` × `,2)]),(0,t.createElementVNode)(`iframe`,{class:`html-preview-frame__iframe`,sandbox:`allow-scripts allow-same-origin`,srcdoc:a.value},null,8,g)],2)],2)])]))}}),[[`__scopeId`,`data-v-296dd89d`]]),_=null,te=null,v=null,y=null,ne=null,re=null,ie=new WeakMap,ae=0,oe=[`data-markstream-enhanced`],se={class:`code-header-main`},ce=[`innerHTML`],le={class:`code-header-copy`},ue={class:`code-header-title`},de={key:0,class:`code-header-caption`},fe={class:`code-header-actions`},pe=[`aria-label`],me={class:`code-diff-stat removed`},he={class:`code-diff-stat added`},ge=[`aria-pressed`],_e=[`disabled`],ve=[`disabled`],ye=[`disabled`],be=[`aria-label`],xe={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Se={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Ce=[`aria-pressed`],we={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Te={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Ee=[`aria-label`],De={class:`code-editor-layer`},Oe={class:`sr-only`,"aria-live":`polite`,role:`status`},ke=`__markstreamMonacoPassiveTouch__`,Ae=e.E((0,t.defineComponent)({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},customId:{},estimatedHeightPx:{},estimatedContentHeightPx:{}},emits:[`previewCode`,`copy`],setup(n,{emit:r}){let i=n,a=r,o=(0,t.getCurrentInstance)(),s=(0,t.computed)(()=>{let e=o?.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:c}=e.T(),f=(0,t.ref)(null),p=(0,t.ref)(null),m=(0,t.ref)(!1),h=(0,t.ref)(e.r(i.node.language)),g=(0,t.computed)(()=>e.a(h.value)),Ae=(0,t.computed)(()=>g.value===`plaintext`),b=(0,t.ref)(!1),x=(0,t.ref)(!1),S=(0,t.ref)(!1),C=(0,t.ref)(!1),je=(0,t.ref)(!1),w=!1,T=null,E=(0,t.ref)(null),Me=0,Ne=e.y(),D=(0,t.ref)(null),O=(0,t.ref)(typeof window>`u`);typeof window<`u`&&(0,t.watch)(()=>p.value,e=>{var t;if((t=D.value)==null||t.destroy(),D.value=null,!e)return void(O.value=!1);let n=Ne(e,{rootMargin:`400px`});D.value=n,O.value=n.isVisible.value,n.whenVisible.then(()=>{O.value=!0})},{immediate:!0}),(0,t.onBeforeUnmount)(()=>{var e;w=!0,(e=D.value)==null||e.destroy(),D.value=null});let k=null,Pe=null,Fe=()=>{},Ie=()=>{},Le=()=>null,A=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Re=()=>{},M=()=>{},ze=()=>{},N=null,Be=()=>String(i.node.language??`plaintext`),Ve=()=>d(null,null,function*(){}),P=[],He=[],F=null,I=(0,t.computed)(()=>i.node.diff),L=(0,t.ref)({removed:0,added:0}),Ue=(0,t.computed)(()=>`-${L.value.removed} +${L.value.added}`),We=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Ge(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return u(l(l({},We),n),{enabled:(t=n.enabled)==null||t})}return l({},We)}let R=(0,t.computed)(()=>{let e=i.monacoOptions?l({},i.monacoOptions):{};if(!I.value)return e;let t=e.diffHideUnchangedRegions===void 0?l({},We):Ge(e.diffHideUnchangedRegions),n=e.hideUnchangedRegions===void 0?void 0:Ge(e.hideUnchangedRegions),r=e.diffUnchangedRegionStyle??`line-info`;return u(l(l(l({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:12,lineNumbersMinChars:2,glyphMargin:!1,fontSize:13,lineHeight:30,renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,padding:{top:10,bottom:r===`line-info`||r===`line-info-basic`||r===`metadata`?22:14},diffHideUnchangedRegions:t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:r,diffHunkActionsOnHover:!0,diffHunkHoverHideDelayMs:160}),e),n===void 0?{}:{hideUnchangedRegions:n}),{diffHideUnchangedRegions:t})}),Ke=(0,t.computed)(()=>I.value?`diff`:`single`),qe=(0,t.ref)(Ke.value),z=(0,t.ref)(!1),Je=(0,t.computed)(()=>{let e=i.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),Ye=(0,t.computed)(()=>!z.value&&!C.value),Xe=(0,t.ref)(!1);typeof window<`u`&&d(null,null,function*(){try{let t=yield e.D();if(w)return;if(!t)return void(z.value=!0);let n=t.useMonaco,r=t.detectLanguage;if(typeof r==`function`&&(Be=r),typeof n==`function`){let e=Nt();if(e&&i.themes&&Array.isArray(i.themes)&&!i.themes.includes(e))throw Error(`Preferred theme not in provided themes array`);F=Lt();let t=n(F);k=t.createEditor||k,Pe=t.createDiffEditor||Pe,Fe=t.updateCode||Fe,Ie=t.updateDiff||Ie,Le=t.getEditor||Le,A=t.getEditorView||A,j=t.getDiffEditorView||j,Re=t.cleanupEditor||Re,M=t.safeClean||t.cleanupEditor||M,ze=t.refreshDiffPresentation||ze,Ve=t.setTheme||Ve,je.value=!0,!w&&f.value&&(yield $(f.value))}}catch{if(w)return;z.value=!0}});let B=(0,t.ref)(typeof i.monacoOptions?.fontSize==`number`?i.monacoOptions.fontSize:NaN),V=(0,t.ref)(B.value),Ze=(0,t.computed)(()=>{let e=B.value,t=V.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),Qe=(0,t.computed)(()=>{let e=i.monacoOptions?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=V.value;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:12}),$e=(0,t.computed)(()=>{let e=i.monacoOptions?.lineHeight;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:Math.round(1.5*Qe.value)}),et=(0,t.computed)(()=>{let e=i.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),H=(0,t.computed)(()=>{let e=i.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}),tt=(0,t.computed)(()=>{let e=i.monacoOptions?.fontFamily;return l(l({fontSize:`${Qe.value}px`,lineHeight:`${$e.value}px`,tabSize:et.value},H.value==null?{}:{minHeight:`${H.value}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})}),nt=(0,t.computed)(()=>H.value!=null&&!C.value),rt=(0,t.computed)(()=>{if(nt.value)return{minHeight:`${H.value}px`}}),it=(0,t.computed)(()=>{if(H.value!=null)return{minHeight:`${H.value}px`}});function at(){var e;try{let t=I.value?((e=j())?.getModifiedEditor)?.call(e)??j():A(),n=Le()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=f.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function ot(e){try{let t=Le()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=function(){try{let e=f.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}();if(t&&t>0)return t;let n=Number.isFinite(V.value)&&V.value>0?V.value:12;return Math.max(12,Math.round(1.35*n))}function st(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t<e?0:t-e+1}function ct(e){if(!e)return[];let t=e.split(/\r?\n/);return t.length===1&&t[0]===``?[]:t}function lt(){I.value?L.value=function(e,t){let n=ct(e),r=ct(t),i=0,a=n.length-1,o=r.length-1;for(;i<=a&&i<=o&&n[i]===r[i];)i++;for(;a>=i&&o>=i&&n[a]===r[o];)a--,o--;return{removed:Math.max(0,a-i+1),added:Math.max(0,o-i+1)}}(String(i.node.originalCode??``),String(i.node.updatedCode??``)):L.value={removed:0,added:0}}function ut(){if(I.value)try{let e=j(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void lt();let n=0,r=0;for(let e of t)n+=st(e.originalStartLineNumber,e.originalEndLineNumber),r+=st(e.modifiedStartLineNumber,e.modifiedEndLineNumber);L.value={removed:n,added:r}}catch{lt()}else L.value={removed:0,added:0}}function dt(){if(Number.isFinite(V.value)&&V.value>0&&Number.isFinite(B.value))return V.value;let e=at();return typeof i.monacoOptions?.fontSize==`number`?(B.value=i.monacoOptions.fontSize,V.value=i.monacoOptions.fontSize,V.value):e&&e>0?(B.value=e,V.value=e,e):(B.value=12,V.value=12,12)}function ft(){var e,t,n,r,i;try{let a=I.value?j():null,o=I.value?a:A();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l+1);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(ot(i),ot(o));return Math.ceil(f*(p+1.5)+0+1)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return Math.ceil(e+1)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=ot(o);return Math.ceil(c*(l+1.5)+0+1)}catch{return null}}function pt(e){let t=String(e??``).match(/\d+(?:\.\d+)?/g);if(!t||t.length<3)return null;let[n,r,i]=t.slice(0,3).map(Number);return .2126*n+.7152*r+.0722*i}function mt(){let e=f.value,t=p.value;if(!e||!t)return;if(I.value)return t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),void t.style.removeProperty(`--vscode-editor-selectionBackground`);let n=e.querySelector(`.monaco-editor`)||e,r=n.querySelector(`.monaco-editor-background`)||n,i=n.querySelector(`.view-lines`)||n,a=null,o=null,s=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(a=window.getComputedStyle(n),o=r===n?a:window.getComputedStyle(r),s=i===n?a:window.getComputedStyle(i))}catch{a=null,o=null,s=null}let c=String(a?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),l=String(a?.getPropertyValue(`--vscode-editor-background`)??``).trim(),u=String(a?.getPropertyValue(`--vscode-editor-selectionBackground`)??a?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),d=c||String(s?.color??a?.color??``).trim(),m=l||String(o?.backgroundColor??a?.backgroundColor??``).trim();if(function(e,t,n){if(!Ae.value)return!1;let r=pt(e),i=pt(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(m,d,t.classList.contains(`is-dark`)))return t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),void t.style.removeProperty(`--vscode-editor-selectionBackground`);d&&t.style.setProperty(`--vscode-editor-foreground`,d),m&&t.style.setProperty(`--vscode-editor-background`,m),u&&t.style.setProperty(`--vscode-editor-selectionBackground`,u)}let ht=/auto|scroll|overlay/i;function U(e,t,n){if(typeof window>`u`)return;let r=Math.ceil(n)-Math.ceil(t);if(!r)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(ht.test(t)||ht.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function W(){try{let e=f.value;if(!e)return;let t=e.getBoundingClientRect().height,n=ft();if(n!=null&&n>0){let r=Math.ceil(n);e.style.minHeight=`0px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,U(e,t,r)}}catch{}}function G(){for(var t,n;P.length>0;)try{(n=(t=P.pop())?.dispose)==null||n.call(t)}catch{}T!=null&&(e.s(T),T=null)}function K(){for(var e;He.length>0;)try{(e=He.pop())==null||e()}catch{}}function gt(){if(K(),!I.value)return;let e=f.value;if(!e)return;let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return;let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=n[e],i=r[e].querySelector(`a`),a=t.querySelector(`.center > div:first-child`);if(!i||!a)continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`;let s=i.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=i.querySelector(`.codicon`),l=document.createElement(`span`);l.className=c?.className||`codicon codicon-unfold`,o.append(l);let u=e=>{e.preventDefault(),e.stopPropagation()},d=e=>{e.preventDefault(),e.stopPropagation(),i.click()},f=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),i.click())};o.addEventListener(`mousedown`,u),o.addEventListener(`click`,d),o.addEventListener(`keydown`,f),a.replaceChildren(o),He.push(()=>{o.removeEventListener(`mousedown`,u),o.removeEventListener(`click`,d),o.removeEventListener(`keydown`,f),a.contains(o)&&a.replaceChildren()})}}function q(){T??=e.O(()=>{T=null,e.O(()=>{gt(),x.value||(b.value?W():Y())})})}function J(e,t,n){let r=Math.min(t,n),i=t>n+1;return e.style.minHeight=`0px`,e.style.height=`${Math.ceil(r)}px`,e.style.maxHeight=`${Math.ceil(n)}px`,e.style.overflow=i?`auto`:`hidden`,Math.ceil(r)}function Y(){try{let e=f.value;if(!e)return;let t=e.getBoundingClientRect().height,n=function(){let e=i.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}();if(Me>0&&(Me--,E.value!=null))return void U(e,t,J(e,E.value,n));let r=ft();if(r!=null&&r>0)return void U(e,t,J(e,r,n));if(E.value!=null)return void U(e,t,J(e,E.value,n));let a=Math.ceil(e.getBoundingClientRect?.call(e).height||0);if(a>0)return void U(e,t,J(e,a,n));let o=Number.parseFloat(e.style.height);!Number.isNaN(o)&&o>0?U(e,t,J(e,o,n)):U(e,t,J(e,n,n))}catch{}}let _t=(0,t.computed)(()=>i.isShowPreview&&(h.value===`html`||h.value===`svg`));(0,t.watch)(()=>i.node.language,t=>{h.value=e.r(t)}),(0,t.watch)(()=>[i.node.originalCode,i.node.updatedCode,I.value],()=>{lt(),e.O(()=>ut())},{immediate:!0}),(0,t.watch)(()=>[i.node.originalCode,i.node.updatedCode,g.value,I.value],t=>d(null,[t],function*([t,n,r,a]){if(!1!==i.stream&&a){if(k&&!S.value&&f.value)try{yield $(f.value)}catch{}Ie(String(t??``),String(n??``),g.value),b.value&&e.O(()=>W())}})),(0,t.watch)(()=>i.node.code,t=>d(null,null,function*(){if(!1!==i.stream&&(h.value||=e.r(Be(t)),!I.value)){if(k&&!S.value&&f.value)try{yield $(f.value)}catch{}Fe(t,g.value),b.value&&e.O(()=>W())}}));let vt=(0,t.computed)(()=>{let t=h.value;return t?e.d[t]||t.charAt(0).toUpperCase()+t.slice(1):e.d[``]||`Plain Text`}),yt=(0,t.computed)(()=>function(e){let t=function(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(String(i.node.raw??``))),bt=(0,t.computed)(()=>yt.value||vt.value),xt=(0,t.computed)(()=>yt.value?I.value?`Diff / ${vt.value}`:vt.value:``),St=(0,t.computed)(()=>(e.n.value,e.h(h.value||``))),Ct=(0,t.computed)(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},n=t(i.minWidth),r=t(i.maxWidth);return n&&(e.minWidth=n),r&&(e.maxWidth=r),I.value?(e.color=`var(--markstream-diff-shell-fg)`,e.borderColor=`var(--markstream-diff-shell-border)`):(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),wt=(0,t.computed)(()=>{if(!I.value)return{color:`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,backgroundColor:`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`}}),X=(0,t.computed)(()=>!1!==i.showTooltips);function Tt(){return d(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(i.node.code)),m.value=!0,a(`copy`,i.node.code),setTimeout(()=>{m.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function Et(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}function Z(t,n,r=`top`){if(!X.value)return;let a=Et(t);if(!a)return;let o=t;e.b(a,n,r,!1,o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0,i.isDark)}function Q(){X.value&&e.C()}function Dt(t){if(!X.value)return;let n=Et(t);if(!n)return;let r=m.value?c(`common.copied`)||`Copied`:c(`common.copy`)||`Copy`,a=t;e.b(n,r,`top`,!1,a?.clientX!=null&&a?.clientY!=null?{x:a.clientX,y:a.clientY}:void 0,i.isDark)}function Ot(){var t,n;if(x.value=!x.value,x.value){if(f.value){let e=Math.ceil((t=f.value).getBoundingClientRect?.call(t).height||0);e>0&&(E.value=e)}At(!1)}else{b.value&&At(!0),f.value&&E.value!=null&&(f.value.style.height=`${E.value}px`);let t=I.value?j():A();try{(n=t?.layout)==null||n.call(t)}catch{}Me=2,e.O(()=>{b.value?W():Y()})}}function kt(){if(!_t.value)return;let e=h.value;if(s.value){let t=e===`html`?`text/html`:`image/svg+xml`,n=e===`html`?c(`artifacts.htmlPreviewTitle`)||`HTML Preview`:c(`artifacts.svgPreviewTitle`)||`SVG Preview`;a(`previewCode`,{node:i.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(Xe.value=!Xe.value)}function At(e){var t,n;try{if(I.value){let n=j();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=A();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function $(n){if(!k||w)return null;if(function(){try{let e=window;if(e[ke])return;let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return;t.addEventListener=function(e,t,r){return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,r)?n.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:u(l({},e),{passive:!0}):{passive:!0}}(r)):n.call(this,e,t,r)},e[ke]=!0}catch{}}(),N)return N;if(S.value&&C.value)return Promise.resolve();S.value=!0;let r=d(null,null,function*(){yield function(n){return d(this,null,function*(){if(!k||w||(G(),K(),function(e){e.replaceChildren()}(n),w)||(I.value?(M(),Pe?yield Pe(n,String(i.node.originalCode??``),String(i.node.updatedCode??``),g.value):yield k(n,i.node.code,g.value)):yield k(n,i.node.code,g.value),w))return;let r=I.value?j():A();if(typeof i.monacoOptions?.fontSize==`number`)r?.updateOptions({fontSize:i.monacoOptions.fontSize,automaticLayout:!1}),B.value=i.monacoOptions.fontSize,V.value=i.monacoOptions.fontSize;else{let e=at();e&&e>0?(B.value=e,V.value=e):(B.value=12,V.value=12)}if(b.value||x.value||Y(),!1===i.loading){if(yield(0,t.nextTick)(),w)return;e.O(()=>{w||(b.value&&!x.value?W():x.value||Y())})}yield(0,t.nextTick)(),w||(C.value=!0,function(){if(G(),I.value){let t=j(),n=(t?.getOriginalEditor)?.call(t),r=(t?.getModifiedEditor)?.call(t),i=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>q());r&&P.push(r)}catch{}};try{let n=(t?.onDidUpdateDiff)?.call(t,()=>{q(),e.O(()=>ut())});n&&P.push(n)}catch{}i(n,`onDidContentSizeChange`),i(r,`onDidContentSizeChange`),i(n,`onDidLayoutChange`),i(r,`onDidLayoutChange`)}else{let e=A();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>q());t&&P.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>q());t&&P.push(t)}catch{}}}(),mt(),gt(),ut(),q())})}(n)}).finally(()=>{N===r&&(N=null)});return N=r,r}(0,t.watch)(X,t=>{t||e.C()}),(0,t.watch)(()=>V.value,(e,t)=>{let n=I.value?j():A();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),b.value&&!x.value&&W())},{flush:`post`,immediate:!1});let jt=(0,t.watch)(()=>[f.value,I.value,i.stream,i.loading,je.value,O.value],e=>d(null,[e],function*([e,t,n,r,i,a]){if(!e||!k||!a||!1===n&&!1!==r)return;let o=$(e);if(o){try{yield o}catch{C.value=!1}jt()}}));function Mt(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Nt(){let e=i.isDark?i.darkTheme:i.lightTheme,t=R.value?.theme,n=e??t,r=Array.isArray(i.themes)?i.themes:[];if(!r.length||n==null)return n;let a=Mt(n),o=r.map(e=>Mt(e)).filter(e=>!!e);if(!a||o.includes(a))return n;let s=Mt(t);return t!=null&&s&&o.includes(s)?t:r[0]}(0,t.watch)(Ke,(e,n)=>d(null,null,function*(){if(e===n||(qe.value=e,!k||!f.value)||!S.value||!1===i.stream&&!1!==i.loading||!O.value)return;let r=N;if(r){try{yield r}catch{}if(w||!f.value)return}try{C.value=!1,S.value=!1,G(),K(),M(),yield(0,t.nextTick)(),yield $(f.value)}catch{C.value=!1}}));let Pt=(0,t.computed)(()=>function(e){let t=(Mt(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!i.isDark}(Nt())),Ft=(0,t.computed)(()=>{if(!I.value)return Pt.value?`dark`:`light`;let e=R.value?.diffAppearance;return e===`light`||e===`dark`?e:i.isDark?`dark`:`light`}),It=(0,t.computed)(()=>I.value?Ft.value===`dark`:Pt.value);function Lt(){return u(l(u(l({wordWrap:`on`,wrappingIndent:`same`,themes:i.themes},R.value||{}),{theme:Nt()}),I.value?{diffAppearance:Ft.value}:{}),{onThemeChange(){mt()}})}function Rt(){let e=Lt();if(!F)return F=e,F;for(let t of Object.keys(F))t in e||delete F[t];return Object.assign(F,e),F}let zt=(0,t.computed)(()=>{var e,t,n,r,i;return JSON.stringify({diffLineStyle:R.value?.diffLineStyle??`background`,diffUnchangedRegionStyle:R.value?.diffUnchangedRegionStyle??`line-info`,diffHideUnchangedRegions:(e=R.value?.diffHideUnchangedRegions)==null||e,renderSideBySide:(t=R.value?.renderSideBySide)==null||t,enableSplitViewResizing:(n=R.value?.enableSplitViewResizing)==null||n,ignoreTrimWhitespace:(r=R.value?.ignoreTrimWhitespace)==null||r,originalEditable:(i=R.value?.originalEditable)!=null&&i})});(0,t.watch)(()=>[i.monacoOptions,O.value],()=>{var e;if(Rt(),!k||!O.value)return;let t=I.value?j():A(),n=typeof i.monacoOptions?.fontSize==`number`?i.monacoOptions.fontSize:Number.isFinite(V.value)?V.value:void 0;typeof n==`number`&&Number.isFinite(n)&&n>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:n})),b.value&&!x.value?W():x.value||Y()},{deep:!0}),(0,t.watch)(()=>[Nt(),Ft.value,je.value,S.value,O.value],()=>{je.value&&S.value&&O.value&&function(){Rt();let t=Nt(),n=()=>{I.value&&ze(),e.O(()=>{mt(),q()})};t?function(e,t){let n=function(e){if(e==null)return null;if(typeof e==`string`)return e;if(typeof e==`object`&&`name`in e)return String(e.name);if(typeof e==`object`){let t=ie.get(e);if(t)return t;try{let t=JSON.stringify(e);if(t)return ie.set(e,t),t}catch{}let n=`__theme_`+ ++ae;return ie.set(e,n),n}return String(e)}(t);return n?(re=e,_||ne!==n?_?(y===n||te===n||(v=t,y=n),_):(v=t,y=n,_=d(null,null,function*(){for(;y&&v!=null;){let t=v,n=y;if(v=null,y=null,ne!==n)try{te=n,yield(re??e)(t),ne=n}catch{}}}).finally(()=>{_=null,te=null}),_):Promise.resolve()):Promise.resolve()}(Ve,t).then(n).catch(e=>{}):n()}()},{flush:`post`}),(0,t.watch)(()=>[zt.value,je.value,O.value],(e,n)=>d(null,[e,n],function*([e,n,r],[a]){if(Rt(),!n||!r||!k||!f.value||!S.value||e===a||!1===i.stream&&!1!==i.loading)return;let o=N;if(o){try{yield o}catch{}if(w||!f.value)return}try{C.value=!1,S.value=!1,G(),K(),M(),yield(0,t.nextTick)(),yield $(f.value)}catch{C.value=!1}}),{flush:`post`});let Bt=(0,t.watch)(()=>[i.loading,O.value],(n,r)=>d(null,[n,r],function*([n,r],a){if(!r||n)return;let o=a?.[0],s=o!==void 0&&!1!==o;yield(0,t.nextTick)(),e.O(()=>{d(null,null,function*(){try{if(s&&S.value)if(I.value&&f.value){let e=N;if(e)try{yield e}catch{}C.value=!1,S.value=!1,G(),K(),M(),f.value.replaceChildren(),yield(0,t.nextTick)(),yield $(f.value)}else Fe(String(i.node.code??``),g.value);x.value||(b.value?W():Y()),Bt()}catch{}})})}),{immediate:!0,flush:`post`});return(0,t.onUnmounted)(()=>{G(),K(),Re()}),(r,a)=>z.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(e.m),{key:0,node:i.node,loading:i.loading},null,8,[`node`,`loading`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`container`,ref:p,style:(0,t.normalizeStyle)(Ct.value),class:(0,t.normalizeClass)([`code-block-container my-4 rounded-lg border overflow-hidden shadow-sm`,[{"is-rendering":i.loading,"is-dark":It.value,"is-diff":I.value,"is-plain-text":Ae.value}]]),"data-markstream-code-block":`1`,"data-markstream-enhanced":C.value&&!z.value?`true`:`false`},[i.showHeader?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5`,style:(0,t.normalizeStyle)(wt.value)},[(0,t.renderSlot)(r.$slots,`header-left`,{},()=>[(0,t.createElementVNode)(`div`,se,[(0,t.createElementVNode)(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:St.value},null,8,ce),(0,t.createElementVNode)(`div`,le,[(0,t.createElementVNode)(`div`,ue,(0,t.toDisplayString)(bt.value),1),xt.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,de,(0,t.toDisplayString)(xt.value),1)):(0,t.createCommentVNode)(``,!0)])])],!0),(0,t.renderSlot)(r.$slots,`header-right`,{},()=>[(0,t.createElementVNode)(`div`,fe,[I.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`code-diff-stats`,"aria-label":Ue.value},[(0,t.createElementVNode)(`span`,me,`-`+(0,t.toDisplayString)(L.value.removed),1),(0,t.createElementVNode)(`span`,he,`+`+(0,t.toDisplayString)(L.value.added),1)],8,pe)):(0,t.createCommentVNode)(``,!0),i.showCollapseButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-pressed":x.value,onClick:Ot,onMouseenter:a[0]||=e=>Z(e,x.value?(0,t.unref)(c)(`common.expand`)||`Expand`:(0,t.unref)(c)(`common.collapse`)||`Collapse`),onFocus:a[1]||=e=>Z(e,x.value?(0,t.unref)(c)(`common.expand`)||`Expand`:(0,t.unref)(c)(`common.collapse`)||`Collapse`),onMouseleave:Q,onBlur:Q},[((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,{style:(0,t.normalizeStyle)({rotate:x.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[...a[18]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,ge)):(0,t.createCommentVNode)(``,!0),i.showFontSizeButtons&&i.enableFontSizeControl?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!!Number.isFinite(V.value)&&V.value<=10,onClick:a[2]||=e=>function(){let e=dt();V.value=Math.max(10,e-1)}(),onMouseenter:a[3]||=e=>Z(e,(0,t.unref)(c)(`common.decrease`)||`Decrease`),onFocus:a[4]||=e=>Z(e,(0,t.unref)(c)(`common.decrease`)||`Decrease`),onMouseleave:Q,onBlur:Q},[...a[19]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1)]],40,_e),(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!Ze.value||V.value===B.value,onClick:a[5]||=e=>(dt(),void(Number.isFinite(B.value)&&(V.value=B.value))),onMouseenter:a[6]||=e=>Z(e,(0,t.unref)(c)(`common.reset`)||`Reset`),onFocus:a[7]||=e=>Z(e,(0,t.unref)(c)(`common.reset`)||`Reset`),onMouseleave:Q,onBlur:Q},[...a[20]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[(0,t.createElementVNode)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,t.createElementVNode)(`path`,{d:`M3 3v5h5`})])],-1)]],40,ve),(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!!Number.isFinite(V.value)&&V.value>=36,onClick:a[8]||=e=>function(){let e=dt();V.value=Math.min(36,e+1)}(),onMouseenter:a[9]||=e=>Z(e,(0,t.unref)(c)(`common.increase`)||`Increase`),onFocus:a[10]||=e=>Z(e,(0,t.unref)(c)(`common.increase`)||`Increase`),onMouseleave:Q,onBlur:Q},[...a[21]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1)]],40,ye)],64)):(0,t.createCommentVNode)(``,!0),i.showCopyButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:3,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":m.value?(0,t.unref)(c)(`common.copied`)||`Copied`:(0,t.unref)(c)(`common.copy`)||`Copy`,onClick:Tt,onMouseenter:a[11]||=e=>Dt(e),onFocus:a[12]||=e=>Dt(e),onMouseleave:Q,onBlur:Q},[m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,Se,[...a[23]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,xe,[...a[22]||=[(0,t.createElementVNode)(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[(0,t.createElementVNode)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,t.createElementVNode)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,be)):(0,t.createCommentVNode)(``,!0),i.showExpandButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:4,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-pressed":b.value,onClick:a[13]||=t=>function(t){if(b.value=!b.value,t&&X.value){let n=Et(t);n&&e.b(n,b.value?c(`common.collapse`)||`Collapse`:c(`common.expand`)||`Expand`,`top`,!1,void 0,i.isDark)}let n=I.value?j():A(),r=f.value;n&&r&&(b.value?(At(!0),r.style.maxHeight=`none`,r.style.overflow=`visible`,W()):(At(!1),r.style.overflow=`auto`,Y()))}(t),onMouseenter:a[14]||=e=>Z(e,b.value?(0,t.unref)(c)(`common.collapse`)||`Collapse`:(0,t.unref)(c)(`common.expand`)||`Expand`),onFocus:a[15]||=e=>Z(e,b.value?(0,t.unref)(c)(`common.collapse`)||`Collapse`:(0,t.unref)(c)(`common.expand`)||`Expand`),onMouseleave:Q,onBlur:Q},[b.value?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,we,[...a[24]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,Te,[...a[25]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],40,Ce)):(0,t.createCommentVNode)(``,!0),_t.value&&i.showPreviewButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:5,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":(0,t.unref)(c)(`common.preview`)||`Preview`,onClick:kt,onMouseenter:a[16]||=e=>Z(e,(0,t.unref)(c)(`common.preview`)||`Preview`),onFocus:a[17]||=e=>Z(e,(0,t.unref)(c)(`common.preview`)||`Preview`),onMouseleave:Q,onBlur:Q},[...a[26]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`},[(0,t.createElementVNode)(`g`,{fill:`currentColor`,"fill-rule":`evenodd`,"clip-rule":`evenodd`},[(0,t.createElementVNode)(`path`,{d:`M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496`}),(0,t.createElementVNode)(`path`,{d:`M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23`})])],-1)]],40,Ee)):(0,t.createCommentVNode)(``,!0)])],!0)],4)):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,De,[(0,t.createElementVNode)(`div`,{ref_key:`codeEditor`,ref:f,class:(0,t.normalizeClass)([`code-editor-container`,[n.stream?``:`code-height-placeholder`,{"is-hidden":Ye.value}]]),style:(0,t.normalizeStyle)(rt.value)},null,6),Ye.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(e.m),{key:0,class:(0,t.normalizeClass)([`code-pre-fallback`,{"is-wrap":Je.value}]),style:(0,t.normalizeStyle)(tt.value),node:i.node},null,8,[`class`,`style`,`node`])):(0,t.createCommentVNode)(``,!0)],512),[[t.vShow,!(x.value||!n.stream&&n.loading)]]),Xe.value&&!s.value&&_t.value&&h.value===`html`?((0,t.openBlock)(),(0,t.createBlock)(ee,{key:1,code:i.node.code,"is-dark":i.isDark,"on-close":()=>Xe.value=!1},null,8,[`code`,`is-dark`,`on-close`])):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`code-loading-placeholder`,style:(0,t.normalizeStyle)(it.value)},[(0,t.renderSlot)(r.$slots,`loading`,{loading:n.loading,stream:n.stream},()=>[a[27]||=(0,t.createElementVNode)(`div`,{class:`loading-skeleton`},[(0,t.createElementVNode)(`div`,{class:`skeleton-line`}),(0,t.createElementVNode)(`div`,{class:`skeleton-line`}),(0,t.createElementVNode)(`div`,{class:`skeleton-line short`})],-1)],!0)],4),[[t.vShow,!n.stream&&n.loading]]),(0,t.createElementVNode)(`span`,Oe,(0,t.toDisplayString)(m.value?(0,t.unref)(c)(`common.copied`)||`Copied`:``),1)],14,oe))}}),[[`__scopeId`,`data-v-1a55f98f`]]);exports.default=Ae;
1
+ const e=require("./exports-arka-E9j.cjs");let t=require("vue");var n=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var n in t||={})o.call(t,n)&&c(e,n,t[n]);if(a)for(var n of a(t))s.call(t,n)&&c(e,n,t[n]);return e},u=(e,t)=>r(e,i(t)),d=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),f={class:`markstream-vue`},p={class:`html-preview-frame__header`},m={class:`html-preview-frame__title`},h={class:`html-preview-frame__label`},g=[`srcdoc`],ee=e.E((0,t.defineComponent)({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(n){let r=n,{t:i}=e.T(),a=(0,t.computed)(()=>{let e=r.code||``,t=e.trim().toLowerCase();return t.startsWith(`<!doctype`)||t.startsWith(`<html`)||t.startsWith(`<body`)?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${r.isDark?`#020617`:`#ffffff`};\n color: ${r.isDark?`#e5e7eb`:`#020617`};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function o(e){var t;e.key!==`Escape`&&e.key!==`Esc`||(t=r.onClose)==null||t.call(r)}return(0,t.onMounted)(()=>{typeof window<`u`&&window.addEventListener(`keydown`,o)}),(0,t.onUnmounted)(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,o)}),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,f,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`html-preview-frame__backdrop`,{"html-preview-frame__backdrop--dark":r.isDark}]),onClick:n[2]||=e=>r.onClose?.call(r)},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`html-preview-frame`,{"html-preview-frame--dark":r.isDark}]),onClick:n[1]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createElementVNode)(`div`,p,[(0,t.createElementVNode)(`div`,m,[n[3]||=(0,t.createElementVNode)(`span`,{class:`html-preview-frame__dot`},null,-1),(0,t.createElementVNode)(`span`,h,(0,t.toDisplayString)(r.title||(0,t.unref)(i)(`common.preview`)||`Preview`),1)]),(0,t.createElementVNode)(`button`,{type:`button`,class:(0,t.normalizeClass)([`html-preview-frame__close`,{"html-preview-frame__close--dark":r.isDark}]),onClick:n[0]||=e=>r.onClose?.call(r)},` × `,2)]),(0,t.createElementVNode)(`iframe`,{class:`html-preview-frame__iframe`,sandbox:`allow-scripts allow-same-origin`,srcdoc:a.value},null,8,g)],2)],2)])]))}}),[[`__scopeId`,`data-v-296dd89d`]]),_=null,te=null,v=null,y=null,ne=null,re=null,ie=new WeakMap,ae=0,oe=[`data-markstream-enhanced`],se={class:`code-header-main`},ce=[`innerHTML`],le={class:`code-header-copy`},ue={class:`code-header-title`},de={key:0,class:`code-header-caption`},fe={class:`code-header-actions`},pe=[`aria-label`],me={class:`code-diff-stat removed`},he={class:`code-diff-stat added`},ge=[`aria-pressed`],_e=[`disabled`],ve=[`disabled`],ye=[`disabled`],be=[`aria-label`],xe={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Se={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Ce=[`aria-pressed`],we={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Te={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},Ee=[`aria-label`],De={class:`code-editor-layer`},Oe={class:`sr-only`,"aria-live":`polite`,role:`status`},ke=`__markstreamMonacoPassiveTouch__`,Ae=e.E((0,t.defineComponent)({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},customId:{},estimatedHeightPx:{},estimatedContentHeightPx:{}},emits:[`previewCode`,`copy`],setup(n,{emit:r}){let i=n,a=r,o=(0,t.getCurrentInstance)(),s=(0,t.computed)(()=>{let e=o?.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:c}=e.T(),f=(0,t.ref)(null),p=(0,t.ref)(null),m=(0,t.ref)(!1),h=(0,t.ref)(e.r(i.node.language)),g=(0,t.computed)(()=>e.a(h.value)),Ae=(0,t.computed)(()=>g.value===`plaintext`),b=(0,t.ref)(!1),x=(0,t.ref)(!1),S=(0,t.ref)(!1),C=(0,t.ref)(!1),je=(0,t.ref)(!1),w=!1,T=null,E=(0,t.ref)(null),Me=0,Ne=e.y(),D=(0,t.ref)(null),O=(0,t.ref)(typeof window>`u`);typeof window<`u`&&(0,t.watch)(()=>p.value,e=>{var t;if((t=D.value)==null||t.destroy(),D.value=null,!e)return void(O.value=!1);let n=Ne(e,{rootMargin:`400px`});D.value=n,O.value=n.isVisible.value,n.whenVisible.then(()=>{O.value=!0})},{immediate:!0}),(0,t.onBeforeUnmount)(()=>{var e;w=!0,(e=D.value)==null||e.destroy(),D.value=null});let k=null,Pe=null,Fe=()=>{},Ie=()=>{},Le=()=>null,A=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Re=()=>{},M=()=>{},ze=()=>{},N=null,Be=()=>String(i.node.language??`plaintext`),Ve=()=>d(null,null,function*(){}),P=[],He=[],F=null,I=(0,t.computed)(()=>i.node.diff),L=(0,t.ref)({removed:0,added:0}),Ue=(0,t.computed)(()=>`-${L.value.removed} +${L.value.added}`),We=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function Ge(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return u(l(l({},We),n),{enabled:(t=n.enabled)==null||t})}return l({},We)}let R=(0,t.computed)(()=>{let e=i.monacoOptions?l({},i.monacoOptions):{};if(!I.value)return e;let t=e.diffHideUnchangedRegions===void 0?l({},We):Ge(e.diffHideUnchangedRegions),n=e.hideUnchangedRegions===void 0?void 0:Ge(e.hideUnchangedRegions),r=e.diffUnchangedRegionStyle??`line-info`;return u(l(l(l({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:12,lineNumbersMinChars:2,glyphMargin:!1,fontSize:13,lineHeight:30,renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,padding:{top:10,bottom:r===`line-info`||r===`line-info-basic`||r===`metadata`?22:14},diffHideUnchangedRegions:t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:r,diffHunkActionsOnHover:!0,diffHunkHoverHideDelayMs:160}),e),n===void 0?{}:{hideUnchangedRegions:n}),{diffHideUnchangedRegions:t})}),Ke=(0,t.computed)(()=>I.value?`diff`:`single`),qe=(0,t.ref)(Ke.value),z=(0,t.ref)(!1),Je=(0,t.computed)(()=>{let e=i.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),Ye=(0,t.computed)(()=>!z.value&&!C.value),Xe=(0,t.ref)(!1);typeof window<`u`&&d(null,null,function*(){try{let t=yield e.D();if(w)return;if(!t)return void(z.value=!0);let n=t.useMonaco,r=t.detectLanguage;if(typeof r==`function`&&(Be=r),typeof n==`function`){let e=Nt();if(e&&i.themes&&Array.isArray(i.themes)&&!i.themes.includes(e))throw Error(`Preferred theme not in provided themes array`);F=Lt();let t=n(F);k=t.createEditor||k,Pe=t.createDiffEditor||Pe,Fe=t.updateCode||Fe,Ie=t.updateDiff||Ie,Le=t.getEditor||Le,A=t.getEditorView||A,j=t.getDiffEditorView||j,Re=t.cleanupEditor||Re,M=t.safeClean||t.cleanupEditor||M,ze=t.refreshDiffPresentation||ze,Ve=t.setTheme||Ve,je.value=!0,!w&&f.value&&(yield $(f.value))}}catch{if(w)return;z.value=!0}});let B=(0,t.ref)(typeof i.monacoOptions?.fontSize==`number`?i.monacoOptions.fontSize:NaN),V=(0,t.ref)(B.value),Ze=(0,t.computed)(()=>{let e=B.value,t=V.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),Qe=(0,t.computed)(()=>{let e=i.monacoOptions?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=V.value;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:12}),$e=(0,t.computed)(()=>{let e=i.monacoOptions?.lineHeight;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:Math.round(1.5*Qe.value)}),et=(0,t.computed)(()=>{let e=i.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),H=(0,t.computed)(()=>{let e=i.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}),tt=(0,t.computed)(()=>{let e=i.monacoOptions?.fontFamily;return l(l({fontSize:`${Qe.value}px`,lineHeight:`${$e.value}px`,tabSize:et.value},H.value==null?{}:{minHeight:`${H.value}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})}),nt=(0,t.computed)(()=>H.value!=null&&!C.value),rt=(0,t.computed)(()=>{if(nt.value)return{minHeight:`${H.value}px`}}),it=(0,t.computed)(()=>{if(H.value!=null)return{minHeight:`${H.value}px`}});function at(){var e;try{let t=I.value?((e=j())?.getModifiedEditor)?.call(e)??j():A(),n=Le()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=f.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function ot(e){try{let t=Le()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=function(){try{let e=f.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}();if(t&&t>0)return t;let n=Number.isFinite(V.value)&&V.value>0?V.value:12;return Math.max(12,Math.round(1.35*n))}function st(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t<e?0:t-e+1}function ct(e){if(!e)return[];let t=e.split(/\r?\n/);return t.length===1&&t[0]===``?[]:t}function lt(){I.value?L.value=function(e,t){let n=ct(e),r=ct(t),i=0,a=n.length-1,o=r.length-1;for(;i<=a&&i<=o&&n[i]===r[i];)i++;for(;a>=i&&o>=i&&n[a]===r[o];)a--,o--;return{removed:Math.max(0,a-i+1),added:Math.max(0,o-i+1)}}(String(i.node.originalCode??``),String(i.node.updatedCode??``)):L.value={removed:0,added:0}}function ut(){if(I.value)try{let e=j(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void lt();let n=0,r=0;for(let e of t)n+=st(e.originalStartLineNumber,e.originalEndLineNumber),r+=st(e.modifiedStartLineNumber,e.modifiedEndLineNumber);L.value={removed:n,added:r}}catch{lt()}else L.value={removed:0,added:0}}function dt(){if(Number.isFinite(V.value)&&V.value>0&&Number.isFinite(B.value))return V.value;let e=at();return typeof i.monacoOptions?.fontSize==`number`?(B.value=i.monacoOptions.fontSize,V.value=i.monacoOptions.fontSize,V.value):e&&e>0?(B.value=e,V.value=e,e):(B.value=12,V.value=12,12)}function ft(){var e,t,n,r,i;try{let a=I.value?j():null,o=I.value?a:A();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l+1);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(ot(i),ot(o));return Math.ceil(f*(p+1.5)+0+1)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return Math.ceil(e+1)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=ot(o);return Math.ceil(c*(l+1.5)+0+1)}catch{return null}}function pt(e){let t=String(e??``).match(/\d+(?:\.\d+)?/g);if(!t||t.length<3)return null;let[n,r,i]=t.slice(0,3).map(Number);return .2126*n+.7152*r+.0722*i}function mt(){let e=f.value,t=p.value;if(!e||!t)return;if(I.value)return t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),void t.style.removeProperty(`--vscode-editor-selectionBackground`);let n=e.querySelector(`.monaco-editor`)||e,r=n.querySelector(`.monaco-editor-background`)||n,i=n.querySelector(`.view-lines`)||n,a=null,o=null,s=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(a=window.getComputedStyle(n),o=r===n?a:window.getComputedStyle(r),s=i===n?a:window.getComputedStyle(i))}catch{a=null,o=null,s=null}let c=String(a?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),l=String(a?.getPropertyValue(`--vscode-editor-background`)??``).trim(),u=String(a?.getPropertyValue(`--vscode-editor-selectionBackground`)??a?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),d=c||String(s?.color??a?.color??``).trim(),m=l||String(o?.backgroundColor??a?.backgroundColor??``).trim();if(function(e,t,n){if(!Ae.value)return!1;let r=pt(e),i=pt(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(m,d,t.classList.contains(`is-dark`)))return t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),void t.style.removeProperty(`--vscode-editor-selectionBackground`);d&&t.style.setProperty(`--vscode-editor-foreground`,d),m&&t.style.setProperty(`--vscode-editor-background`,m),u&&t.style.setProperty(`--vscode-editor-selectionBackground`,u)}let ht=/auto|scroll|overlay/i;function U(e,t,n){if(typeof window>`u`)return;let r=Math.ceil(n)-Math.ceil(t);if(!r)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(ht.test(t)||ht.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function W(){try{let e=f.value;if(!e)return;let t=e.getBoundingClientRect().height,n=ft();if(n!=null&&n>0){let r=Math.ceil(n);e.style.minHeight=`0px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,U(e,t,r)}}catch{}}function G(){for(var t,n;P.length>0;)try{(n=(t=P.pop())?.dispose)==null||n.call(t)}catch{}T!=null&&(e.s(T),T=null)}function K(){for(var e;He.length>0;)try{(e=He.pop())==null||e()}catch{}}function gt(){if(K(),!I.value)return;let e=f.value;if(!e)return;let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return;let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=n[e],i=r[e].querySelector(`a`),a=t.querySelector(`.center > div:first-child`);if(!i||!a)continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`;let s=i.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=i.querySelector(`.codicon`),l=document.createElement(`span`);l.className=c?.className||`codicon codicon-unfold`,o.append(l);let u=e=>{e.preventDefault(),e.stopPropagation()},d=e=>{e.preventDefault(),e.stopPropagation(),i.click()},f=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),i.click())};o.addEventListener(`mousedown`,u),o.addEventListener(`click`,d),o.addEventListener(`keydown`,f),a.replaceChildren(o),He.push(()=>{o.removeEventListener(`mousedown`,u),o.removeEventListener(`click`,d),o.removeEventListener(`keydown`,f),a.contains(o)&&a.replaceChildren()})}}function q(){T??=e.O(()=>{T=null,e.O(()=>{gt(),x.value||(b.value?W():Y())})})}function J(e,t,n){let r=Math.min(t,n),i=t>n+1;return e.style.minHeight=`0px`,e.style.height=`${Math.ceil(r)}px`,e.style.maxHeight=`${Math.ceil(n)}px`,e.style.overflow=i?`auto`:`hidden`,Math.ceil(r)}function Y(){try{let e=f.value;if(!e)return;let t=e.getBoundingClientRect().height,n=function(){let e=i.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}();if(Me>0&&(Me--,E.value!=null))return void U(e,t,J(e,E.value,n));let r=ft();if(r!=null&&r>0)return void U(e,t,J(e,r,n));if(E.value!=null)return void U(e,t,J(e,E.value,n));let a=Math.ceil(e.getBoundingClientRect?.call(e).height||0);if(a>0)return void U(e,t,J(e,a,n));let o=Number.parseFloat(e.style.height);!Number.isNaN(o)&&o>0?U(e,t,J(e,o,n)):U(e,t,J(e,n,n))}catch{}}let _t=(0,t.computed)(()=>i.isShowPreview&&(h.value===`html`||h.value===`svg`));(0,t.watch)(()=>i.node.language,t=>{h.value=e.r(t)}),(0,t.watch)(()=>[i.node.originalCode,i.node.updatedCode,I.value],()=>{lt(),e.O(()=>ut())},{immediate:!0}),(0,t.watch)(()=>[i.node.originalCode,i.node.updatedCode,g.value,I.value],t=>d(null,[t],function*([t,n,r,a]){if(!1!==i.stream&&a){if(k&&!S.value&&f.value)try{yield $(f.value)}catch{}Ie(String(t??``),String(n??``),g.value),b.value&&e.O(()=>W())}})),(0,t.watch)(()=>i.node.code,t=>d(null,null,function*(){if(!1!==i.stream&&(h.value||=e.r(Be(t)),!I.value)){if(k&&!S.value&&f.value)try{yield $(f.value)}catch{}Fe(t,g.value),b.value&&e.O(()=>W())}}));let vt=(0,t.computed)(()=>{let t=h.value;return t?e.d[t]||t.charAt(0).toUpperCase()+t.slice(1):e.d[``]||`Plain Text`}),yt=(0,t.computed)(()=>function(e){let t=function(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(String(i.node.raw??``))),bt=(0,t.computed)(()=>yt.value||vt.value),xt=(0,t.computed)(()=>yt.value?I.value?`Diff / ${vt.value}`:vt.value:``),St=(0,t.computed)(()=>(e.n.value,e.h(h.value||``))),Ct=(0,t.computed)(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},n=t(i.minWidth),r=t(i.maxWidth);return n&&(e.minWidth=n),r&&(e.maxWidth=r),I.value?(e.color=`var(--markstream-diff-shell-fg)`,e.borderColor=`var(--markstream-diff-shell-border)`):(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),wt=(0,t.computed)(()=>{if(!I.value)return{color:`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,backgroundColor:`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`}}),X=(0,t.computed)(()=>!1!==i.showTooltips);function Tt(){return d(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(i.node.code)),m.value=!0,a(`copy`,i.node.code),setTimeout(()=>{m.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function Et(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}function Z(t,n,r=`top`){if(!X.value)return;let a=Et(t);if(!a)return;let o=t;e.b(a,n,r,!1,o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0,i.isDark)}function Q(){X.value&&e.C()}function Dt(t){if(!X.value)return;let n=Et(t);if(!n)return;let r=m.value?c(`common.copied`)||`Copied`:c(`common.copy`)||`Copy`,a=t;e.b(n,r,`top`,!1,a?.clientX!=null&&a?.clientY!=null?{x:a.clientX,y:a.clientY}:void 0,i.isDark)}function Ot(){var t,n;if(x.value=!x.value,x.value){if(f.value){let e=Math.ceil((t=f.value).getBoundingClientRect?.call(t).height||0);e>0&&(E.value=e)}At(!1)}else{b.value&&At(!0),f.value&&E.value!=null&&(f.value.style.height=`${E.value}px`);let t=I.value?j():A();try{(n=t?.layout)==null||n.call(t)}catch{}Me=2,e.O(()=>{b.value?W():Y()})}}function kt(){if(!_t.value)return;let e=h.value;if(s.value){let t=e===`html`?`text/html`:`image/svg+xml`,n=e===`html`?c(`artifacts.htmlPreviewTitle`)||`HTML Preview`:c(`artifacts.svgPreviewTitle`)||`SVG Preview`;a(`previewCode`,{node:i.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(Xe.value=!Xe.value)}function At(e){var t,n;try{if(I.value){let n=j();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=A();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function $(n){if(!k||w)return null;if(function(){try{let e=window;if(e[ke])return;let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return;t.addEventListener=function(e,t,r){return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,r)?n.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:u(l({},e),{passive:!0}):{passive:!0}}(r)):n.call(this,e,t,r)},e[ke]=!0}catch{}}(),N)return N;if(S.value&&C.value)return Promise.resolve();S.value=!0;let r=d(null,null,function*(){yield function(n){return d(this,null,function*(){if(!k||w||(G(),K(),function(e){e.replaceChildren()}(n),w)||(I.value?(M(),Pe?yield Pe(n,String(i.node.originalCode??``),String(i.node.updatedCode??``),g.value):yield k(n,i.node.code,g.value)):yield k(n,i.node.code,g.value),w))return;let r=I.value?j():A();if(typeof i.monacoOptions?.fontSize==`number`)r?.updateOptions({fontSize:i.monacoOptions.fontSize,automaticLayout:!1}),B.value=i.monacoOptions.fontSize,V.value=i.monacoOptions.fontSize;else{let e=at();e&&e>0?(B.value=e,V.value=e):(B.value=12,V.value=12)}if(b.value||x.value||Y(),!1===i.loading){if(yield(0,t.nextTick)(),w)return;e.O(()=>{w||(b.value&&!x.value?W():x.value||Y())})}yield(0,t.nextTick)(),w||(C.value=!0,function(){if(G(),I.value){let t=j(),n=(t?.getOriginalEditor)?.call(t),r=(t?.getModifiedEditor)?.call(t),i=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>q());r&&P.push(r)}catch{}};try{let n=(t?.onDidUpdateDiff)?.call(t,()=>{q(),e.O(()=>ut())});n&&P.push(n)}catch{}i(n,`onDidContentSizeChange`),i(r,`onDidContentSizeChange`),i(n,`onDidLayoutChange`),i(r,`onDidLayoutChange`)}else{let e=A();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>q());t&&P.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>q());t&&P.push(t)}catch{}}}(),mt(),gt(),ut(),q())})}(n)}).finally(()=>{N===r&&(N=null)});return N=r,r}(0,t.watch)(X,t=>{t||e.C()}),(0,t.watch)(()=>V.value,(e,t)=>{let n=I.value?j():A();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),b.value&&!x.value&&W())},{flush:`post`,immediate:!1});let jt=(0,t.watch)(()=>[f.value,I.value,i.stream,i.loading,je.value,O.value],e=>d(null,[e],function*([e,t,n,r,i,a]){if(!e||!k||!a||!1===n&&!1!==r)return;let o=$(e);if(o){try{yield o}catch{C.value=!1}jt()}}));function Mt(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Nt(){let e=i.isDark?i.darkTheme:i.lightTheme,t=R.value?.theme,n=e??t,r=Array.isArray(i.themes)?i.themes:[];if(!r.length||n==null)return n;let a=Mt(n),o=r.map(e=>Mt(e)).filter(e=>!!e);if(!a||o.includes(a))return n;let s=Mt(t);return t!=null&&s&&o.includes(s)?t:r[0]}(0,t.watch)(Ke,(e,n)=>d(null,null,function*(){if(e===n||(qe.value=e,!k||!f.value)||!S.value||!1===i.stream&&!1!==i.loading||!O.value)return;let r=N;if(r){try{yield r}catch{}if(w||!f.value)return}try{C.value=!1,S.value=!1,G(),K(),M(),yield(0,t.nextTick)(),yield $(f.value)}catch{C.value=!1}}));let Pt=(0,t.computed)(()=>function(e){let t=(Mt(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!i.isDark}(Nt())),Ft=(0,t.computed)(()=>{if(!I.value)return Pt.value?`dark`:`light`;let e=R.value?.diffAppearance;return e===`light`||e===`dark`?e:i.isDark?`dark`:`light`}),It=(0,t.computed)(()=>I.value?Ft.value===`dark`:Pt.value);function Lt(){return u(l(u(l({wordWrap:`on`,wrappingIndent:`same`,themes:i.themes},R.value||{}),{theme:Nt()}),I.value?{diffAppearance:Ft.value}:{}),{onThemeChange(){mt()}})}function Rt(){let e=Lt();if(!F)return F=e,F;for(let t of Object.keys(F))t in e||delete F[t];return Object.assign(F,e),F}let zt=(0,t.computed)(()=>{var e,t,n,r,i;return JSON.stringify({diffLineStyle:R.value?.diffLineStyle??`background`,diffUnchangedRegionStyle:R.value?.diffUnchangedRegionStyle??`line-info`,diffHideUnchangedRegions:(e=R.value?.diffHideUnchangedRegions)==null||e,renderSideBySide:(t=R.value?.renderSideBySide)==null||t,enableSplitViewResizing:(n=R.value?.enableSplitViewResizing)==null||n,ignoreTrimWhitespace:(r=R.value?.ignoreTrimWhitespace)==null||r,originalEditable:(i=R.value?.originalEditable)!=null&&i})});(0,t.watch)(()=>[i.monacoOptions,O.value],()=>{var e;if(Rt(),!k||!O.value)return;let t=I.value?j():A(),n=typeof i.monacoOptions?.fontSize==`number`?i.monacoOptions.fontSize:Number.isFinite(V.value)?V.value:void 0;typeof n==`number`&&Number.isFinite(n)&&n>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:n})),b.value&&!x.value?W():x.value||Y()},{deep:!0}),(0,t.watch)(()=>[Nt(),Ft.value,je.value,S.value,O.value],()=>{je.value&&S.value&&O.value&&function(){Rt();let t=Nt(),n=()=>{I.value&&ze(),e.O(()=>{mt(),q()})};t?function(e,t){let n=function(e){if(e==null)return null;if(typeof e==`string`)return e;if(typeof e==`object`&&`name`in e)return String(e.name);if(typeof e==`object`){let t=ie.get(e);if(t)return t;try{let t=JSON.stringify(e);if(t)return ie.set(e,t),t}catch{}let n=`__theme_`+ ++ae;return ie.set(e,n),n}return String(e)}(t);return n?(re=e,_||ne!==n?_?(y===n||te===n||(v=t,y=n),_):(v=t,y=n,_=d(null,null,function*(){for(;y&&v!=null;){let t=v,n=y;if(v=null,y=null,ne!==n)try{te=n,yield(re??e)(t),ne=n}catch{}}}).finally(()=>{_=null,te=null}),_):Promise.resolve()):Promise.resolve()}(Ve,t).then(n).catch(e=>{}):n()}()},{flush:`post`}),(0,t.watch)(()=>[zt.value,je.value,O.value],(e,n)=>d(null,[e,n],function*([e,n,r],[a]){if(Rt(),!n||!r||!k||!f.value||!S.value||e===a||!1===i.stream&&!1!==i.loading)return;let o=N;if(o){try{yield o}catch{}if(w||!f.value)return}try{C.value=!1,S.value=!1,G(),K(),M(),yield(0,t.nextTick)(),yield $(f.value)}catch{C.value=!1}}),{flush:`post`});let Bt=(0,t.watch)(()=>[i.loading,O.value],(n,r)=>d(null,[n,r],function*([n,r],a){if(!r||n)return;let o=a?.[0],s=o!==void 0&&!1!==o;yield(0,t.nextTick)(),e.O(()=>{d(null,null,function*(){try{if(s&&S.value)if(I.value&&f.value){let e=N;if(e)try{yield e}catch{}C.value=!1,S.value=!1,G(),K(),M(),f.value.replaceChildren(),yield(0,t.nextTick)(),yield $(f.value)}else Fe(String(i.node.code??``),g.value);x.value||(b.value?W():Y()),Bt()}catch{}})})}),{immediate:!0,flush:`post`});return(0,t.onUnmounted)(()=>{G(),K(),Re()}),(r,a)=>z.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(e.m),{key:0,node:i.node,loading:i.loading},null,8,[`node`,`loading`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`container`,ref:p,style:(0,t.normalizeStyle)(Ct.value),class:(0,t.normalizeClass)([`code-block-container my-4 rounded-lg border overflow-hidden shadow-sm`,[{"is-rendering":i.loading,"is-dark":It.value,"is-diff":I.value,"is-plain-text":Ae.value}]]),"data-markstream-code-block":`1`,"data-markstream-enhanced":C.value&&!z.value?`true`:`false`},[i.showHeader?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5`,style:(0,t.normalizeStyle)(wt.value)},[(0,t.renderSlot)(r.$slots,`header-left`,{},()=>[(0,t.createElementVNode)(`div`,se,[(0,t.createElementVNode)(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:St.value},null,8,ce),(0,t.createElementVNode)(`div`,le,[(0,t.createElementVNode)(`div`,ue,(0,t.toDisplayString)(bt.value),1),xt.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,de,(0,t.toDisplayString)(xt.value),1)):(0,t.createCommentVNode)(``,!0)])])],!0),(0,t.renderSlot)(r.$slots,`header-right`,{},()=>[(0,t.createElementVNode)(`div`,fe,[I.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`code-diff-stats`,"aria-label":Ue.value},[(0,t.createElementVNode)(`span`,me,`-`+(0,t.toDisplayString)(L.value.removed),1),(0,t.createElementVNode)(`span`,he,`+`+(0,t.toDisplayString)(L.value.added),1)],8,pe)):(0,t.createCommentVNode)(``,!0),i.showCollapseButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-pressed":x.value,onClick:Ot,onMouseenter:a[0]||=e=>Z(e,x.value?(0,t.unref)(c)(`common.expand`)||`Expand`:(0,t.unref)(c)(`common.collapse`)||`Collapse`),onFocus:a[1]||=e=>Z(e,x.value?(0,t.unref)(c)(`common.expand`)||`Expand`:(0,t.unref)(c)(`common.collapse`)||`Collapse`),onMouseleave:Q,onBlur:Q},[((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,{style:(0,t.normalizeStyle)({rotate:x.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[...a[18]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,ge)):(0,t.createCommentVNode)(``,!0),i.showFontSizeButtons&&i.enableFontSizeControl?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!!Number.isFinite(V.value)&&V.value<=10,onClick:a[2]||=e=>function(){let e=dt();V.value=Math.max(10,e-1)}(),onMouseenter:a[3]||=e=>Z(e,(0,t.unref)(c)(`common.decrease`)||`Decrease`),onFocus:a[4]||=e=>Z(e,(0,t.unref)(c)(`common.decrease`)||`Decrease`),onMouseleave:Q,onBlur:Q},[...a[19]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1)]],40,_e),(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!Ze.value||V.value===B.value,onClick:a[5]||=e=>(dt(),void(Number.isFinite(B.value)&&(V.value=B.value))),onMouseenter:a[6]||=e=>Z(e,(0,t.unref)(c)(`common.reset`)||`Reset`),onFocus:a[7]||=e=>Z(e,(0,t.unref)(c)(`common.reset`)||`Reset`),onMouseleave:Q,onBlur:Q},[...a[20]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[(0,t.createElementVNode)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,t.createElementVNode)(`path`,{d:`M3 3v5h5`})])],-1)]],40,ve),(0,t.createElementVNode)(`button`,{type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,disabled:!!Number.isFinite(V.value)&&V.value>=36,onClick:a[8]||=e=>function(){let e=dt();V.value=Math.min(36,e+1)}(),onMouseenter:a[9]||=e=>Z(e,(0,t.unref)(c)(`common.increase`)||`Increase`),onFocus:a[10]||=e=>Z(e,(0,t.unref)(c)(`common.increase`)||`Increase`),onMouseleave:Q,onBlur:Q},[...a[21]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`w-3 h-3`},[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1)]],40,ye)],64)):(0,t.createCommentVNode)(``,!0),i.showCopyButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:3,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":m.value?(0,t.unref)(c)(`common.copied`)||`Copied`:(0,t.unref)(c)(`common.copy`)||`Copy`,onClick:Tt,onMouseenter:a[11]||=e=>Dt(e),onFocus:a[12]||=e=>Dt(e),onMouseleave:Q,onBlur:Q},[m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,Se,[...a[23]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,xe,[...a[22]||=[(0,t.createElementVNode)(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[(0,t.createElementVNode)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,t.createElementVNode)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,be)):(0,t.createCommentVNode)(``,!0),i.showExpandButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:4,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-pressed":b.value,onClick:a[13]||=t=>function(t){if(b.value=!b.value,t&&X.value){let n=Et(t);n&&e.b(n,b.value?c(`common.collapse`)||`Collapse`:c(`common.expand`)||`Expand`,`top`,!1,void 0,i.isDark)}let n=I.value?j():A(),r=f.value;n&&r&&(b.value?(At(!0),r.style.maxHeight=`none`,r.style.overflow=`visible`,W()):(At(!1),r.style.overflow=`auto`,Y()))}(t),onMouseenter:a[14]||=e=>Z(e,b.value?(0,t.unref)(c)(`common.collapse`)||`Collapse`:(0,t.unref)(c)(`common.expand`)||`Expand`),onFocus:a[15]||=e=>Z(e,b.value?(0,t.unref)(c)(`common.collapse`)||`Collapse`:(0,t.unref)(c)(`common.expand`)||`Expand`),onMouseleave:Q,onBlur:Q},[b.value?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,we,[...a[24]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,Te,[...a[25]||=[(0,t.createElementVNode)(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],40,Ce)):(0,t.createCommentVNode)(``,!0),_t.value&&i.showPreviewButton?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:5,type:`button`,class:`code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":(0,t.unref)(c)(`common.preview`)||`Preview`,onClick:kt,onMouseenter:a[16]||=e=>Z(e,(0,t.unref)(c)(`common.preview`)||`Preview`),onFocus:a[17]||=e=>Z(e,(0,t.unref)(c)(`common.preview`)||`Preview`),onMouseleave:Q,onBlur:Q},[...a[26]||=[(0,t.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`},[(0,t.createElementVNode)(`g`,{fill:`currentColor`,"fill-rule":`evenodd`,"clip-rule":`evenodd`},[(0,t.createElementVNode)(`path`,{d:`M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496`}),(0,t.createElementVNode)(`path`,{d:`M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23`})])],-1)]],40,Ee)):(0,t.createCommentVNode)(``,!0)])],!0)],4)):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,De,[(0,t.createElementVNode)(`div`,{ref_key:`codeEditor`,ref:f,class:(0,t.normalizeClass)([`code-editor-container`,[n.stream?``:`code-height-placeholder`,{"is-hidden":Ye.value}]]),style:(0,t.normalizeStyle)(rt.value)},null,6),Ye.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(e.m),{key:0,class:(0,t.normalizeClass)([`code-pre-fallback`,{"is-wrap":Je.value}]),style:(0,t.normalizeStyle)(tt.value),node:i.node},null,8,[`class`,`style`,`node`])):(0,t.createCommentVNode)(``,!0)],512),[[t.vShow,!(x.value||!n.stream&&n.loading)]]),Xe.value&&!s.value&&_t.value&&h.value===`html`?((0,t.openBlock)(),(0,t.createBlock)(ee,{key:1,code:i.node.code,"is-dark":i.isDark,"on-close":()=>Xe.value=!1},null,8,[`code`,`is-dark`,`on-close`])):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`code-loading-placeholder`,style:(0,t.normalizeStyle)(it.value)},[(0,t.renderSlot)(r.$slots,`loading`,{loading:n.loading,stream:n.stream},()=>[a[27]||=(0,t.createElementVNode)(`div`,{class:`loading-skeleton`},[(0,t.createElementVNode)(`div`,{class:`skeleton-line`}),(0,t.createElementVNode)(`div`,{class:`skeleton-line`}),(0,t.createElementVNode)(`div`,{class:`skeleton-line short`})],-1)],!0)],4),[[t.vShow,!n.stream&&n.loading]]),(0,t.createElementVNode)(`span`,Oe,(0,t.toDisplayString)(m.value?(0,t.unref)(c)(`common.copied`)||`Copied`:``),1)],14,oe))}}),[[`__scopeId`,`data-v-1a55f98f`]]);exports.default=Ae;
@@ -1,4 +1,4 @@
1
- var e=new WeakMap;function t(t){return e.get(t)??0}function n(n){let r=t(n)+1;return e.set(n,r),r}function r(t){e.delete(t)}var i=30,a=new WeakMap;function o(e){a.delete(e)}function s(e){let t=a.get(e);return t||(t=new Map,a.set(e,t)),t}function c(e){return typeof e?.htmlCacheMaxEntries==`number`?Math.max(0,Math.floor(e.htmlCacheMaxEntries)):i}function l(e,t,n){let r=n?.htmlCache!==!1,i=c(n);if(!r||i<=0)return;let a=s(e),o=a.get(t);return o&&(a.delete(t),a.set(t,o)),o}function u(e,t,n,r){let i=r?.htmlCache!==!1,a=c(r);if(!i||a<=0)return;let o=s(e);if(o.set(t,n),o.size>a){let e=o.keys().next().value;e!==void 0&&o.delete(e)}}var d=50,f=new WeakMap;function p(e){let t=f.get(e);return t||(t=new Map,f.set(e,t)),t}function m(e){f.delete(e)}function h(e,n,r,i,a){let o=a?.tokenCache!==!1,s=typeof a?.tokenCacheMaxEntries==`number`?Math.max(0,Math.floor(a.tokenCacheMaxEntries)):d,c=e,l=()=>{if(typeof c.codeToThemedTokens==`function`)return c.codeToThemedTokens(n,r,i);if(typeof c.codeToTokens==`function`)return c.codeToTokens(n,{lang:r,theme:i}).tokens;throw TypeError(`Highlighter does not support token APIs: codeToThemedTokens/codeToTokens`)};if(!o||s<=0)return l();let u=p(e),f=JSON.stringify([`stream-markdown-token-v2`,t(e),r,i,n]),m=u.get(f);if(m)return u.delete(f),u.set(f,m),m;let h=l();if(u.set(f,h),u.size>s){let e=u.keys().next().value;e!==void 0&&u.delete(e)}return h}var g=`jsx.tsx.vue.csharp.python.java.c.cpp.rust.go.powershell.sql.json.html.javascript.typescript.css.markdown.xml.yaml.toml.dockerfile.kotlin.objective-c.objective-cpp.php.ruby.scala.svelte.swift.erlang.angular-html.angular-ts.dart.lua.mermaid.cmake.nginx`.split(`.`),_=[`vitesse-dark`,`vitesse-light`],v=null,y=null,b=new Set,x=[],S=new Set,C=new Set,w=new WeakMap,T=new Map,E=Promise.resolve(),D=0,O=[`loadLanguage`,`loadTheme`],k=new WeakMap;function A(e){n(e),m(e),o(e)}function j(e,t){let n=k.get(e)?.[t];if(n)return n;let r=e[t];return typeof r==`function`?r:void 0}function M(e,t){return!!j(e,t)}async function ee(e,t,...n){let r=j(e,t);r&&await r.apply(e,n)}function te(e,t,n){if(v===e){if(t===`loadLanguage`){for(let e of n)typeof e==`string`&&S.add(e);return}for(let e of n)ae(e)}}function ne(e,t,n){te(e,t,n),A(e)}function re(e){if(k.has(e))return;let t={},n=e;for(let r of O){let i=n[r];typeof i==`function`&&(t[r]=i,n[r]=(...t)=>{let n;try{n=i.apply(e,t)}catch(t){throw A(e),t}return n&&typeof n.then==`function`?n.then(n=>(ne(e,r,t),n),t=>{throw A(e),t}):(ne(e,r,t),n)})}k.set(e,t)}function N(e,t){return D===t&&v===e}function P(e){try{let t=e.dispose?.();t&&typeof t.catch==`function`&&t.catch(()=>void 0)}catch{}}function F(e){if(typeof e==`string`)return e;try{let t=e?.name;return typeof t==`string`?t:void 0}catch{return}}function I(e){return!!e&&typeof e==`object`}function L(e,t){return t===void 0?{__streamMarkdownType:e}:{__streamMarkdownType:e,value:t}}function R(e,t=new WeakSet){if(e===null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:L(`number`,String(e));if(e===void 0)return L(`undefined`);if(typeof e==`bigint`)return L(`bigint`,e.toString());if(typeof e==`symbol`)return L(`symbol`,String(e));if(typeof e==`function`)return L(`function`,e.name||``);if(typeof e!=`object`)return L(typeof e);if(t.has(e))return L(`circular`);t.add(e);try{if(Array.isArray(e))return e.map(e=>R(e,t));let n=e,r={};for(let e of Object.keys(n).sort())r[e]=R(n[e],t);return r}finally{t.delete(e)}}function z(e){if(I(e))try{return JSON.stringify(R(e))}catch{return}}function ie(e){if(!I(e))return;let t=F(e),n=t?T.get(t):w.get(e);return n?.generation===D?n.fingerprint:void 0}function B(e){if(typeof e==`string`)return C.has(e);let t=z(e);return t!==void 0&&ie(e)===t}function ae(e){if(typeof e==`string`){C.add(e),T.delete(e);return}if(!I(e))return;let t=F(e),n=z(e);if(n!==void 0){let r={generation:D,fingerprint:n};t?T.set(t,r):w.set(e,r)}t&&C.delete(t)}function oe(e,t){for(let t of e)S.add(t);for(let e of t)ae(e)}function se(e){let t=new Set,n=new Set;for(let r of e){if(typeof r==`string`){t.add(r);continue}I(r)&&n.add(r)}x=x.filter(e=>typeof e==`string`?!t.has(e):!(I(e)&&n.has(e)))}function ce(e){for(let t of e)S.has(t)||b.add(t)}function le(e){return x.findIndex(t=>F(t)===e)}function ue(e){return x.includes(e)}function de(e){for(let t of e){let e=F(t);if(e){let n=le(e);if(n!==-1){B(t)?x.splice(n,1):x[n]=t;continue}}else if(I(t)&&ue(t))continue;B(t)||x.push(t)}}function fe(e){for(let t of e){if(B(t))continue;let e=F(t);e&&le(e)!==-1||!e&&I(t)&&ue(t)||x.push(t)}}async function pe(e,t){if(!N(e,t))return;let n=Array.from(b).filter(e=>!S.has(e)),r=x.filter(e=>!B(e));b.clear(),x=[];let i=!1,a=!1,o=!1,s=0,c=0;try{if(n.length>0&&M(e,`loadLanguage`))for(;s<n.length;s++){let r=n[s];if(!S.has(r)){if(a=!0,await ee(e,`loadLanguage`,r),!N(e,t))return;S.add(r),i=!0}}if(r.length>0&&M(e,`loadTheme`))for(;c<r.length;c++){let n=r[c];if(!B(n)){if(a=!0,await ee(e,`loadTheme`,n),!N(e,t))return;ae(n),i=!0}}}catch(i){if(!N(e,t))return;a&&(A(e),o=!0);let l=n.slice(s),u=r.slice(c);for(let e of l)S.has(e)||b.add(e);throw fe(u),i}finally{i&&!o&&N(e,t)&&A(e)}}async function me(e,t=D){let n=E.catch(()=>void 0).then(()=>{if(N(e,t))return pe(e,t)});return E=n.catch(()=>void 0),n}async function V(e={}){let t=!e.langs||e.langs.length===0?g:e.langs,n=!e.themes||e.themes.length===0?_:e.themes;ce(t),de(n);let r=D;if(v){let t=v;return await me(t,r),r!==D||v!==t?V(e):t}if(!y){let e=D,t=(async()=>{let{createHighlighter:t}=await Promise.resolve().then(()=>require("./dist-Cu0Z5KOd.cjs")),n=x.length>0?x.slice():_,r=b.size>0?Array.from(b):g,i=await t({themes:n,langs:r});if(e!==D)return P(i),i;re(i),oe(r,n);for(let e of r)b.delete(e);return se(n),v=i,await me(i,e),i})().finally(()=>{y===t&&(y=null)});y=t}let i=await y;return r!==D||(await me(i,r),r!==D||v!==i)?V(e):i}function he(){D++;let e=v;v=null,y=null,e&&(r(e),m(e),o(e),P(e)),b.clear(),x=[],S.clear(),C.clear(),T.clear(),E=Promise.resolve()}var ge=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i,_e=/^[a-z][a-z0-9-]*$/i,ve=/^--[\w-]+$/,ye=new Set([`rgb`,`rgba`,`hsl`,`hsla`,`hwb`,`lab`,`lch`,`oklab`,`oklch`,`color`,`color-mix`,`light-dark`,`var`,`calc`,`min`,`max`,`clamp`]),be=/([a-z][\w-]*)\s*\(/gi;function xe(e){if(e==null||!Number.isFinite(e)||e<=0)return``;let t=[];return e&1&&t.push(`font-style: italic;`),e&2&&t.push(`font-weight: 600;`),e&4&&t.push(`text-decoration: underline; text-underline-offset: 0.15em;`),t.join(` `)}var Se=new Map,Ce=new Map,we=new Map,Te=[],Ee=3,H=0,De=``,Oe=-1,ke=new WeakMap;function Ae(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127||`!;"'{}<>\\`.includes(e[t]))return!0}return!1}function je(e){return!e||Ae(e)||/url\s*\(|\/\*|@/i.test(e)||!Me(e)?!1:Ne(e)}function Me(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r===`(`){t++;continue}if(r===`)`&&(t--,t<0))return!1}return t===0}function Ne(e){be.lastIndex=0;let t;for(;t=be.exec(e);){let e=t[1].toLowerCase();if(!ye.has(e))return!1}return!0}function Pe(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return!1;let n=e.slice(0,t).trim().toLowerCase();if(!ye.has(n))return!1;if(n!==`var`)return!0;let r=e.slice(t+1,-1).trim(),i=r.indexOf(`,`),a=(i===-1?r:r.slice(0,i)).trim();return ve.test(a)}function Fe(e){return ge.test(e)||_e.test(e)||Pe(e)}function Ie(e){if(typeof e!=`string`)return``;let t=e.trim();return!t||!je(t)?``:Fe(t)?t:``}function Le(e,t){let n=Ie(e),r=`${n}|${t??0}`,i=Ce.get(r);if(i!==void 0)return i;let a=`${n?`color: ${n};`:``}${xe(t)}`;return Ce.set(r,a),a}function Re(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`)}function ze(e,t){return Le(e,t)}function Be(e){let t=2166136261,n=5381;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t^=i,t=Math.imul(t,16777619),n=Math.imul(n,33)^i}return`${(t>>>0).toString(36)}-${(n>>>0).toString(36)}`}function Ve(e){return Array.from({length:Ee},()=>`.${e}`).join(``)}function He(e){if(!e)return``;let t=Se.get(e);if(t)return t;let n=`smd-token-${Be(e)}`,r=n,i=1;for(;;){let t=we.get(r);if(!t)return Se.set(e,r),we.set(r,e),Te.push(`${Ve(r)}{${e}}`),H++,r;if(t===e)return Se.set(e,r),r;r=`${n}-${i++}`}}function Ue(e,t){let n=Le(e,t);return n?` style="${Re(n)}"`:``}function We(e,t){let n=Le(e,t);if(!n)return``;let r=He(n);return r?` class="${r}"`:``}function U(e,t,n=`inline`){return n===`class`?We(e,t):Ue(e,t)}function Ge(e,t,n,r=`inline`){let i=Le(t,n);if(i){if(r===`class`){let t=He(i);if(t){e.className=t;return}return}e.setAttribute(`style`,i)}}function W(e){return e.nodeType===9}function Ke(e){return e.nodeType===11&&`host`in e}function qe(e){if(e===null)return null;if(e!==void 0){if(W(e)||Ke(e))return e;if(e.isConnected===!1)return null;let t=typeof e.getRootNode==`function`?e.getRootNode():null;return t&&(W(t)||Ke(t))?t:e.ownerDocument??null}return typeof document<`u`?document:null}function Je(e){return qe(e)!=null}function Ye(e,t,n=`inline`){let r=e??n;return(r===`auto`||r===`class`)&&Je(t)?`class`:`inline`}function Xe(e){return W(e)?e:e.ownerDocument}function Ze(e,t){if(W(e)){(e.head??e.documentElement).appendChild(t);return}e.appendChild(t)}function Qe(e,t){if(typeof t.getRootNode==`function`)return t.getRootNode()===e;let n=e.contains;return typeof n==`function`?n.call(e,t):t.ownerDocument===e&&t.isConnected===!0}function $e(e,t){return t.ownerDocument===Xe(e)?W(e)?Qe(e,t):t.parentNode===e:!1}function et(){return Oe!==H&&(De=Te.join(`
1
+ var e=new WeakMap;function t(t){return e.get(t)??0}function n(n){let r=t(n)+1;return e.set(n,r),r}function r(t){e.delete(t)}var i=30,a=new WeakMap;function o(e){a.delete(e)}function s(e){let t=a.get(e);return t||(t=new Map,a.set(e,t)),t}function c(e){return typeof e?.htmlCacheMaxEntries==`number`?Math.max(0,Math.floor(e.htmlCacheMaxEntries)):i}function l(e,t,n){let r=n?.htmlCache!==!1,i=c(n);if(!r||i<=0)return;let a=s(e),o=a.get(t);return o&&(a.delete(t),a.set(t,o)),o}function u(e,t,n,r){let i=r?.htmlCache!==!1,a=c(r);if(!i||a<=0)return;let o=s(e);if(o.set(t,n),o.size>a){let e=o.keys().next().value;e!==void 0&&o.delete(e)}}var d=50,f=new WeakMap;function p(e){let t=f.get(e);return t||(t=new Map,f.set(e,t)),t}function m(e){f.delete(e)}function h(e,n,r,i,a){let o=a?.tokenCache!==!1,s=typeof a?.tokenCacheMaxEntries==`number`?Math.max(0,Math.floor(a.tokenCacheMaxEntries)):d,c=e,l=()=>{if(typeof c.codeToThemedTokens==`function`)return c.codeToThemedTokens(n,r,i);if(typeof c.codeToTokens==`function`)return c.codeToTokens(n,{lang:r,theme:i}).tokens;throw TypeError(`Highlighter does not support token APIs: codeToThemedTokens/codeToTokens`)};if(!o||s<=0)return l();let u=p(e),f=JSON.stringify([`stream-markdown-token-v2`,t(e),r,i,n]),m=u.get(f);if(m)return u.delete(f),u.set(f,m),m;let h=l();if(u.set(f,h),u.size>s){let e=u.keys().next().value;e!==void 0&&u.delete(e)}return h}var g=`jsx.tsx.vue.csharp.python.java.c.cpp.rust.go.powershell.sql.json.html.javascript.typescript.css.markdown.xml.yaml.toml.dockerfile.kotlin.objective-c.objective-cpp.php.ruby.scala.svelte.swift.erlang.angular-html.angular-ts.dart.lua.mermaid.cmake.nginx`.split(`.`),_=[`vitesse-dark`,`vitesse-light`],v=null,y=null,b=new Set,x=[],S=new Set,C=new Set,w=new WeakMap,T=new Map,E=Promise.resolve(),D=0,O=[`loadLanguage`,`loadTheme`],k=new WeakMap;function A(e){n(e),m(e),o(e)}function j(e,t){let n=k.get(e)?.[t];if(n)return n;let r=e[t];return typeof r==`function`?r:void 0}function M(e,t){return!!j(e,t)}async function ee(e,t,...n){let r=j(e,t);r&&await r.apply(e,n)}function te(e,t,n){if(v===e){if(t===`loadLanguage`){for(let e of n)typeof e==`string`&&S.add(e);return}for(let e of n)ae(e)}}function ne(e,t,n){te(e,t,n),A(e)}function re(e){if(k.has(e))return;let t={},n=e;for(let r of O){let i=n[r];typeof i==`function`&&(t[r]=i,n[r]=(...t)=>{let n;try{n=i.apply(e,t)}catch(t){throw A(e),t}return n&&typeof n.then==`function`?n.then(n=>(ne(e,r,t),n),t=>{throw A(e),t}):(ne(e,r,t),n)})}k.set(e,t)}function N(e,t){return D===t&&v===e}function P(e){try{let t=e.dispose?.();t&&typeof t.catch==`function`&&t.catch(()=>void 0)}catch{}}function F(e){if(typeof e==`string`)return e;try{let t=e?.name;return typeof t==`string`?t:void 0}catch{return}}function I(e){return!!e&&typeof e==`object`}function L(e,t){return t===void 0?{__streamMarkdownType:e}:{__streamMarkdownType:e,value:t}}function R(e,t=new WeakSet){if(e===null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:L(`number`,String(e));if(e===void 0)return L(`undefined`);if(typeof e==`bigint`)return L(`bigint`,e.toString());if(typeof e==`symbol`)return L(`symbol`,String(e));if(typeof e==`function`)return L(`function`,e.name||``);if(typeof e!=`object`)return L(typeof e);if(t.has(e))return L(`circular`);t.add(e);try{if(Array.isArray(e))return e.map(e=>R(e,t));let n=e,r={};for(let e of Object.keys(n).sort())r[e]=R(n[e],t);return r}finally{t.delete(e)}}function z(e){if(I(e))try{return JSON.stringify(R(e))}catch{return}}function ie(e){if(!I(e))return;let t=F(e),n=t?T.get(t):w.get(e);return n?.generation===D?n.fingerprint:void 0}function B(e){if(typeof e==`string`)return C.has(e);let t=z(e);return t!==void 0&&ie(e)===t}function ae(e){if(typeof e==`string`){C.add(e),T.delete(e);return}if(!I(e))return;let t=F(e),n=z(e);if(n!==void 0){let r={generation:D,fingerprint:n};t?T.set(t,r):w.set(e,r)}t&&C.delete(t)}function oe(e,t){for(let t of e)S.add(t);for(let e of t)ae(e)}function se(e){let t=new Set,n=new Set;for(let r of e){if(typeof r==`string`){t.add(r);continue}I(r)&&n.add(r)}x=x.filter(e=>typeof e==`string`?!t.has(e):!(I(e)&&n.has(e)))}function ce(e){for(let t of e)S.has(t)||b.add(t)}function le(e){return x.findIndex(t=>F(t)===e)}function ue(e){return x.includes(e)}function de(e){for(let t of e){let e=F(t);if(e){let n=le(e);if(n!==-1){B(t)?x.splice(n,1):x[n]=t;continue}}else if(I(t)&&ue(t))continue;B(t)||x.push(t)}}function fe(e){for(let t of e){if(B(t))continue;let e=F(t);e&&le(e)!==-1||!e&&I(t)&&ue(t)||x.push(t)}}async function pe(e,t){if(!N(e,t))return;let n=Array.from(b).filter(e=>!S.has(e)),r=x.filter(e=>!B(e));b.clear(),x=[];let i=!1,a=!1,o=!1,s=0,c=0;try{if(n.length>0&&M(e,`loadLanguage`))for(;s<n.length;s++){let r=n[s];if(!S.has(r)){if(a=!0,await ee(e,`loadLanguage`,r),!N(e,t))return;S.add(r),i=!0}}if(r.length>0&&M(e,`loadTheme`))for(;c<r.length;c++){let n=r[c];if(!B(n)){if(a=!0,await ee(e,`loadTheme`,n),!N(e,t))return;ae(n),i=!0}}}catch(i){if(!N(e,t))return;a&&(A(e),o=!0);let l=n.slice(s),u=r.slice(c);for(let e of l)S.has(e)||b.add(e);throw fe(u),i}finally{i&&!o&&N(e,t)&&A(e)}}async function me(e,t=D){let n=E.catch(()=>void 0).then(()=>{if(N(e,t))return pe(e,t)});return E=n.catch(()=>void 0),n}async function V(e={}){let t=!e.langs||e.langs.length===0?g:e.langs,n=!e.themes||e.themes.length===0?_:e.themes;ce(t),de(n);let r=D;if(v){let t=v;return await me(t,r),r!==D||v!==t?V(e):t}if(!y){let e=D,t=(async()=>{let{createHighlighter:t}=await Promise.resolve().then(()=>require("./shiki-langs-CgHqCFaJ.cjs")).then(e=>e.t),n=x.length>0?x.slice():_,r=b.size>0?Array.from(b):g,i=await t({themes:n,langs:r});if(e!==D)return P(i),i;re(i),oe(r,n);for(let e of r)b.delete(e);return se(n),v=i,await me(i,e),i})().finally(()=>{y===t&&(y=null)});y=t}let i=await y;return r!==D||(await me(i,r),r!==D||v!==i)?V(e):i}function he(){D++;let e=v;v=null,y=null,e&&(r(e),m(e),o(e),P(e)),b.clear(),x=[],S.clear(),C.clear(),T.clear(),E=Promise.resolve()}var ge=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i,_e=/^[a-z][a-z0-9-]*$/i,ve=/^--[\w-]+$/,ye=new Set([`rgb`,`rgba`,`hsl`,`hsla`,`hwb`,`lab`,`lch`,`oklab`,`oklch`,`color`,`color-mix`,`light-dark`,`var`,`calc`,`min`,`max`,`clamp`]),be=/([a-z][\w-]*)\s*\(/gi;function xe(e){if(e==null||!Number.isFinite(e)||e<=0)return``;let t=[];return e&1&&t.push(`font-style: italic;`),e&2&&t.push(`font-weight: 600;`),e&4&&t.push(`text-decoration: underline; text-underline-offset: 0.15em;`),t.join(` `)}var Se=new Map,Ce=new Map,we=new Map,Te=[],Ee=3,H=0,De=``,Oe=-1,ke=new WeakMap;function Ae(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127||`!;"'{}<>\\`.includes(e[t]))return!0}return!1}function je(e){return!e||Ae(e)||/url\s*\(|\/\*|@/i.test(e)||!Me(e)?!1:Ne(e)}function Me(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r===`(`){t++;continue}if(r===`)`&&(t--,t<0))return!1}return t===0}function Ne(e){be.lastIndex=0;let t;for(;t=be.exec(e);){let e=t[1].toLowerCase();if(!ye.has(e))return!1}return!0}function Pe(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return!1;let n=e.slice(0,t).trim().toLowerCase();if(!ye.has(n))return!1;if(n!==`var`)return!0;let r=e.slice(t+1,-1).trim(),i=r.indexOf(`,`),a=(i===-1?r:r.slice(0,i)).trim();return ve.test(a)}function Fe(e){return ge.test(e)||_e.test(e)||Pe(e)}function Ie(e){if(typeof e!=`string`)return``;let t=e.trim();return!t||!je(t)?``:Fe(t)?t:``}function Le(e,t){let n=Ie(e),r=`${n}|${t??0}`,i=Ce.get(r);if(i!==void 0)return i;let a=`${n?`color: ${n};`:``}${xe(t)}`;return Ce.set(r,a),a}function Re(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`)}function ze(e,t){return Le(e,t)}function Be(e){let t=2166136261,n=5381;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t^=i,t=Math.imul(t,16777619),n=Math.imul(n,33)^i}return`${(t>>>0).toString(36)}-${(n>>>0).toString(36)}`}function Ve(e){return Array.from({length:Ee},()=>`.${e}`).join(``)}function He(e){if(!e)return``;let t=Se.get(e);if(t)return t;let n=`smd-token-${Be(e)}`,r=n,i=1;for(;;){let t=we.get(r);if(!t)return Se.set(e,r),we.set(r,e),Te.push(`${Ve(r)}{${e}}`),H++,r;if(t===e)return Se.set(e,r),r;r=`${n}-${i++}`}}function Ue(e,t){let n=Le(e,t);return n?` style="${Re(n)}"`:``}function We(e,t){let n=Le(e,t);if(!n)return``;let r=He(n);return r?` class="${r}"`:``}function U(e,t,n=`inline`){return n===`class`?We(e,t):Ue(e,t)}function Ge(e,t,n,r=`inline`){let i=Le(t,n);if(i){if(r===`class`){let t=He(i);if(t){e.className=t;return}return}e.setAttribute(`style`,i)}}function W(e){return e.nodeType===9}function Ke(e){return e.nodeType===11&&`host`in e}function qe(e){if(e===null)return null;if(e!==void 0){if(W(e)||Ke(e))return e;if(e.isConnected===!1)return null;let t=typeof e.getRootNode==`function`?e.getRootNode():null;return t&&(W(t)||Ke(t))?t:e.ownerDocument??null}return typeof document<`u`?document:null}function Je(e){return qe(e)!=null}function Ye(e,t,n=`inline`){let r=e??n;return(r===`auto`||r===`class`)&&Je(t)?`class`:`inline`}function Xe(e){return W(e)?e:e.ownerDocument}function Ze(e,t){if(W(e)){(e.head??e.documentElement).appendChild(t);return}e.appendChild(t)}function Qe(e,t){if(typeof t.getRootNode==`function`)return t.getRootNode()===e;let n=e.contains;return typeof n==`function`?n.call(e,t):t.ownerDocument===e&&t.isConnected===!0}function $e(e,t){return t.ownerDocument===Xe(e)?W(e)?Qe(e,t):t.parentNode===e:!1}function et(){return Oe!==H&&(De=Te.join(`
2
2
  `),Oe=H),De}function tt(e){if(Te.length===0)return;let t=qe(e);if(!t)return;let n=ke.get(t);if(!n||!$e(t,n.element)){let e=Xe(t).createElement(`style`);e.dataset.streamMarkdownTokenStyles=``,Ze(t,e),n={element:e,generation:-1},ke.set(t,n)}let r=et();n.generation===H&&n.element.textContent===r||(n.element.textContent=r,n.generation=H)}function nt(e){let t=1;for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function rt(e,t,n=!1){let r=nt(t),i=n?e.map(e=>e.slice()):e;return i.length>r&&(i=i.slice(0,r)),i.length<r&&(i=i.concat(Array.from({length:r-i.length},()=>[]))),i}function it(e){return e.replace(/\r/g,``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function at(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function ot(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.trunc(e)}function st(e){return e.styleRoot===void 0?typeof document<`u`?document:void 0:e.styleRoot}function ct(e,n,r){let{lang:i,theme:a,preClass:o=`shiki`,codeClass:s=``,lineClass:c=`line`,showLineNumbers:d=!1,startingLineNumber:f=1}=r,p=ot(f),m=st(r),g=Ye(r.tokenStyleMode,m,`inline`),_;try{_=e.getTheme?.(a)?.bg}catch{}let v=Ie(_),y=JSON.stringify([`stream-markdown-html-v3`,t(e),g,v,i,a,o,s,c,d,p,n]),b=r.tokenLines==null;if(b){let t=l(e,y,{htmlCache:r.htmlCache,htmlCacheMaxEntries:r.htmlCacheMaxEntries});if(t)return g===`class`&&tt(m),t}let x=r.tokenLines?rt(r.tokenLines,n,!0):rt(h(e,n,i,a,{tokenCache:r.tokenCache,tokenCacheMaxEntries:r.tokenCacheMaxEntries}),n),S=p,C=x.map(e=>{let t=g===`class`?(()=>{let t=``,n=0;for(;n<e.length;){let r=e[n],i=U(r.color,r.fontStyle,g),a=r.content;for(n++;n<e.length;){let t=e[n];if(U(t.color,t.fontStyle,g)!==i)break;a+=t.content,n++}t+=`<span${i}>${it(a)}</span>`}return t})():e.map(e=>`<span${U(e.color,e.fontStyle,g)}>${it(e.content)}</span>`).join(``),n=d?`<span class="line-number" data-line="${S++}"></span>`:``;return`<span class="${at(c)}">${n}${t}</span>`}).join(`
3
3
  `),w=v?` style="background-color: ${at(v)};"`:``,T=`<pre class="${at(o)}"${w}><code${s?` class="${at(s)}"`:``}>${C}</code></pre>`;return g===`class`&&tt(m),b&&u(e,y,T,{htmlCache:r.htmlCache,htmlCacheMaxEntries:r.htmlCacheMaxEntries}),T}var G=new WeakMap,lt=new WeakMap,ut=new WeakMap,dt=new WeakMap,ft=new WeakMap;function pt(e){let t=1;for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function mt(e,t,n=!1){let r=pt(t),i=n?e.map(e=>e.slice()):e;return i.length>r&&(i=i.slice(0,r)),i.length<r&&(i=i.concat(Array.from({length:r-i.length},()=>[]))),i}function ht(e){return e?.map(e=>e.map(e=>({...e})))}function gt(e){return typeof e!=`number`||!Number.isFinite(e)?1:Math.trunc(e)}function _t(e){let t=pt(e),n=Math.ceil(e.length/6);return Math.min(8e3,t+n)}function vt(e){return typeof e!=`number`||!Number.isFinite(e)||e<=0?0:e}function yt(e,t=50){if(typeof e?.timeRemaining!=`function`)return t;let n=e.timeRemaining();return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:t}function K(e){return e.replace(/\r/g,``)}function bt(e){return K(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function xt(e){return JSON.stringify([e.lang,e.theme,e.backgroundColor,e.highlighterRevision,e.tokenStyleMode,e.preClass,e.codeClass,e.lineClass,e.showLineNumbers,e.startingLineNumber])}function St(e,t){try{let n=e.getTheme?.(t);return Ie(n?.bg)}catch{return``}}function Ct(e){return e.getAttribute(`class`)??``}function wt(e){return e?`background-color: ${e};`:``}function Tt(e,t){if(!t)return``;let n=e.createElement(`pre`);return n.setAttribute(`style`,t),n.style.cssText.trim()}function Et(e,t){let n=e.getAttribute(`style`)??``,r=wt(t);return n===r?!0:Tt(e.ownerDocument,n)===Tt(e.ownerDocument,r)}function Dt(e,t,n){let r=t.parentElement;return!!r&&r.tagName.toLowerCase()===`pre`&&r.parentElement===e&&e.childNodes.length===1&&e.firstChild===r&&r.childNodes.length===1&&r.firstChild===t&&Ct(r)===n.preClass&&Ct(t)===n.codeClass&&Et(r,n.backgroundColor)}function Ot(e){dt.delete(e),G.delete(e),ft.delete(e)}function kt(e,t,n){dt.set(e,t),G.set(e,n);let r=e.querySelector(`code`);r?ft.set(e,r.innerHTML):ft.delete(e)}function At(e,t){lt.set(e,t),ut.set(e,e.innerHTML)}function jt(e){let t=lt.get(e);if(t){if(ut.get(e)!==e.innerHTML){lt.delete(e),ut.delete(e);return}return t}}function Mt(e,t){return ft.get(e)===t.innerHTML}function Nt(e,t){return e.styleRoot===void 0?t:e.styleRoot}function Pt(e,t){return Ye(e.tokenStyleMode,t,`class`)}function q(e,t){t===`class`&&tt(e)}function Ft(e){return e.trim().split(/\s+/).filter(Boolean)}function It(e,t){let n=Array.from(e.children),r=Ft(t);return r.length===0?n:n.filter(e=>r.every(t=>e.classList.contains(t)))}function Lt(e){return K(e).split(`
4
4
  `)}function Rt(e,t){return e.tagName.toLowerCase()===`span`&&Ct(e)===t}function zt(e,t){if(t.length===0)return e.childNodes.length===0;if(e.childNodes.length!==t.length*2-1)return!1;for(let n=0;n<t.length;n++){let r=n*2;if(e.childNodes[r]!==t[n])return!1;if(n<t.length-1){let t=e.childNodes[r+1];if(!t||t.nodeType!==3||t.textContent!==`
@@ -286,7 +286,7 @@ async function V(e = {}) {
286
286
  }
287
287
  if (!y) {
288
288
  let e = D, t = (async () => {
289
- let { createHighlighter: t } = await import("./dist-BtUTYFnJ.js"), n = x.length > 0 ? x.slice() : _, r = b.size > 0 ? Array.from(b) : g, i = await t({
289
+ let { createHighlighter: t } = await import("./shiki-langs-6yxXN7qk.js").then((e) => e.t), n = x.length > 0 ? x.slice() : _, r = b.size > 0 ? Array.from(b) : g, i = await t({
290
290
  themes: n,
291
291
  langs: r
292
292
  });
@@ -12524,7 +12524,7 @@ var nh = d(() => X(null, null, function* () {
12524
12524
  raw: e.node.raw ?? `$${e.node.content ?? ""}$`
12525
12525
  } }));
12526
12526
  try {
12527
- if (yield Qm()) return (yield import("./index2-6XNXmD9D.js")).default;
12527
+ if (yield Qm()) return (yield import("./index2-D0G_wi0X.js")).default;
12528
12528
  } catch (e) {
12529
12529
  console.warn("[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install \"katex\".", e);
12530
12530
  }
@@ -12535,7 +12535,7 @@ var nh = d(() => X(null, null, function* () {
12535
12535
  } }));
12536
12536
  })), rh = d(() => X(null, null, function* () {
12537
12537
  try {
12538
- if (yield Qm()) return (yield import("./index3-m__wi4Tc.js")).default;
12538
+ if (yield Qm()) return (yield import("./index3-B7VD0bp5.js")).default;
12539
12539
  } catch (e) {
12540
12540
  console.warn("[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install \"katex\".", e);
12541
12541
  }
@@ -15070,7 +15070,7 @@ var X_ = {
15070
15070
  return X(this, null, function* () {
15071
15071
  if (!xe) return we || (we = X(null, null, function* () {
15072
15072
  try {
15073
- let e = yield import("./dist-CS9eMk17.js");
15073
+ let e = yield import("./dist-v6nlIdy5.js");
15074
15074
  xe = e.createShikiStreamRenderer, F = e.registerHighlight;
15075
15075
  let t = Array.isArray(e.defaultLanguages) ? e.defaultLanguages : void 0;
15076
15076
  Se = t ? new Set(t.map((e) => e.toLowerCase())) : void 0, Ee(i.themes);
@@ -15755,7 +15755,7 @@ var mv = ["data-custom-id"], hv = { class: "m-0 p-0" }, gv = ["data-probe"], _v
15755
15755
  }
15756
15756
  let Rt = d(() => X(null, null, function* () {
15757
15757
  try {
15758
- return (yield import("./CodeBlockNode-uCRw2qdH.js")).default;
15758
+ return (yield import("./CodeBlockNode-CBF9Wys1.js")).default;
15759
15759
  } catch (e) {
15760
15760
  return console.warn("[markstream-vue] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install \"stream-monaco\".", e), Jh;
15761
15761
  }
@@ -16336,19 +16336,19 @@ var mv = ["data-custom-id"], hv = { class: "m-0 p-0" }, gv = ["data-probe"], _v
16336
16336
  });
16337
16337
  let yn = d(() => X(null, null, function* () {
16338
16338
  try {
16339
- return (yield import("./index4-a76eTE_l.js")).default;
16339
+ return (yield import("./index4-DP46yPWR.js")).default;
16340
16340
  } catch (e) {
16341
16341
  return console.warn("[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install \"mermaid\".", e), Jh;
16342
16342
  }
16343
16343
  })), bn = d(() => X(null, null, function* () {
16344
16344
  try {
16345
- return (yield import("./index5-CGyUxkgz.js")).default;
16345
+ return (yield import("./index5-DKkNi-Gi.js")).default;
16346
16346
  } catch (e) {
16347
16347
  return console.warn("[markstream-vue] Optional peer dependencies for InfographicBlockNode are missing. Falling back to preformatted code rendering. To enable Infographic rendering, please install \"@antv/infographic\".", e), Jh;
16348
16348
  }
16349
16349
  })), xn = d(() => X(null, null, function* () {
16350
16350
  try {
16351
- return (yield import("./index6-CDHKjY4q.js")).default;
16351
+ return (yield import("./index6-uf4qLQF-.js")).default;
16352
16352
  } catch (e) {
16353
16353
  return console.warn("[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install \"@terrastruct/d2\".", e), Jh;
16354
16354
  }
@@ -16985,6 +16985,6 @@ function ay() {
16985
16985
  Xv = null;
16986
16986
  }
16987
16987
  }
16988
- d(() => import("./index7-C7UxGaDK.js")), d(() => import("./index3-m__wi4Tc.js")), d(() => import("./index2-6XNXmD9D.js")), d(() => import("./index4-a76eTE_l.js")), d(() => import("./index5-CGyUxkgz.js")), d(() => import("./index6-CDHKjY4q.js"));
16988
+ d(() => import("./index7-DMt42BW9.js")), d(() => import("./index3-B7VD0bp5.js")), d(() => import("./index2-D0G_wi0X.js")), d(() => import("./index4-DP46yPWR.js")), d(() => import("./index5-DKkNi-Gi.js")), d(() => import("./index6-uf4qLQF-.js"));
16989
16989
  //#endregion
16990
16990
  export { Pm as C, j_ as D, Z as E, J_ as O, pv as S, Im as T, iy as _, U_ as a, Nm as b, ry as c, G_ as d, Iv as f, Gv as g, W_ as h, rm as i, ay as l, Jh as m, R_ as n, Zm as o, tm as p, H_ as r, Y_ as s, Qm as t, kv as u, Yv as v, Kv as w, vv as x, zh as y };