markstream-vue 1.0.7-beta.2 → 1.0.7-beta.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.
- package/dist/exports.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index11.js +1 -1
- package/dist/index6.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/tailwind.js +0 -0
- package/package.json +2 -2
package/dist/index11.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=Math.pow,i=(t,n,l)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,u=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&i(e,n,t[n]);if(l)for(var n of l(t))r.call(t,n)&&i(e,n,t[n]);return e},s=(e,t,n)=>new Promise((l,o)=>{var r=e=>{try{i(n.next(e))}catch(t){o(t)}},a=e=>{try{i(n.throw(e))}catch(t){o(t)}},i=e=>e.done?l(e.value):Promise.resolve(e.value).then(r,a);i((n=n.apply(e,t)).next())});import{defineComponent as c,ref as d,computed as v,useAttrs as m,inject as f,watch as h,onBeforeUnmount as g,nextTick as p,onMounted as w,onUnmounted as y,openBlock as k,createElementBlock as x,normalizeClass as b,renderSlot as M,createElementVNode as T,unref as C,toDisplayString as B,createCommentVNode as O,normalizeStyle as P,withDirectives as E,mergeProps as S,toHandlers as D,createBlock as F,Teleport as R,createVNode as $,Transition as j,withCtx as z,withModifiers as A,vShow as H}from"vue";import{ao as L,as as _,ap as N,ar as X,ag as I,a6 as Y,al as W,z as q}from"./exports.js";import{p as V,b as Z,g as U,a as K}from"./diagramHeight.js";import{e as G}from"./mermaidSequenceSemicolons.js";import{M as J}from"./index2.js";import{safeRaf as Q}from"./utils/safeRaf.js";import{c as ee,g as te,f as ne}from"./workers-mermaidWorkerClient.js";import{toSafeSvgElement as le}from"stream-markdown-parser";const oe=["data-markstream-mode","data-markstream-pending"],re={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},ae={key:0},ie={key:1,class:"flex items-center gap-x-2 overflow-hidden"},ue=["innerHTML"],se={key:2},ce={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},de={class:"flex items-center gap-x-1"},ve={class:"flex items-center gap-x-1"},me={key:4},fe={key:5,class:"mermaid-header-actions flex items-center"},he=["aria-pressed"],ge={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:"action-icon"},pe={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:"action-icon"},we=["aria-label","disabled"],ye=["aria-label","disabled"],ke={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:"action-icon"},xe={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:"action-icon"},be={key:0,class:"mermaid-source-panel"},Me={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Te={key:1,class:"relative"},Ce={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Be={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Oe={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Pe={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},Ee="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",Se=/* @__PURE__ */q(/* @__PURE__ */c({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:l}){var o,r;const i=e,c=l,q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},Se=d(!1),De=d("undefined"==typeof window),Fe=L(),Re=_(),$e=v(()=>i.isStrict?"strict":"loose"),je=v(()=>({startOnLoad:!1,securityLevel:$e.value,dompurifyConfig:"strict"===$e.value?q:void 0,flowchart:"strict"===$e.value?{htmlLabels:!1}:void 0}));function ze(e){if(e)try{e.replaceChildren()}catch(t){e.innerHTML=""}}function Ae(e,t,n={}){if(!e)return null;const l=function(e,t){if(!e)return null;const n=le(t);if(!n)return null;const l=function(e,t){const n=Array.from(e.childNodes),l=document.createElement("div");return l.dataset.mermaidSvgLayer="1",l.style.zIndex="1",l.appendChild(t),e.insertBefore(l,e.firstChild),n.length>0&&function(e){const t=()=>{var t;for(const n of e)null==(t=n.parentNode)||t.removeChild(n)};"function"==typeof requestAnimationFrame?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),l}(e,n);return{svg:n.outerHTML,bindTarget:l}}(e,t);return l||n.keepPreviousOnFailure||ze(e),l}let He=null;function Le(e){if(i.enableMermaidInteractions&&(null==e?void 0:e.querySelector("svg")))try{null==He||He(e)}catch(t){}}const{t:_e}=N();let Ne=!1,Xe=0;function Ie(){return s(this,null,function*(){try{const e=yield te();return Ne?null:(Se.value=!!e,e)}catch(e){throw Ne||(Se.value=!1),e}finally{Ne||(De.value=!0)}})}const Ye=d(!1),We=d(!1),qe=d(),Ve=d(),Ze=d(),Ue=d(),Ke=d(null),Ge=X(),Je=d(null),Qe=d("undefined"==typeof window||!Fe.value),et=m(),tt=f(J,null);let nt="",lt=0,ot=0;const rt=v(()=>I(i,et));function at(){const e=rt.value;e&&(nt&&nt!==e&&(null==tt||tt.markSettled(nt),lt=0),nt=e,lt+=1,ot+=1,1===lt&&(null==tt||tt.markPending(e)))}function it(){return s(this,null,function*(){const e=nt;if(!e)return;if(lt=Math.max(0,lt-1),lt>0)return;nt="";const t=++ot;yield p(),t===ot&&(function(e=rt.value){e&&qe.value&&(null==tt||tt.reportHeight(e,qe.value.offsetHeight))}(e),null==tt||tt.markSettled(e))})}function ut(){const e=nt;e&&(nt="",lt=0,ot+=1,null==tt||tt.markSettled(e))}const st=d(),ct=v(()=>i.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function dt(e,t=ct.value){const n=t,l={theme:"dark"===e?"dark":"default"};"strict"===$e.value&&(l.flowchart={htmlLabels:!1});const o=`%%{init: ${JSON.stringify(l)}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}function vt(){var e;return function(e){const t=function(){var e;const t=Ve.value?getComputedStyle(Ve.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return null!=(e=V(t))?e:360}(),n=An();return K(e,t,n)}(null!=(e=V(i.estimatedPreviewHeightPx))?e:Z(ct.value))}function mt(){return`${vt()}px`}const ft=d(null);function ht(){var e;return!!(null==(e=Ze.value)?void 0:e.querySelector("svg"))}function gt(){return!1!==i.loading&&(ht()||!!ft.value)}const pt=d(1),wt=d(0),yt=d(0),kt=d(!1),xt=d({x:0,y:0}),bt=d(!0),Mt=d(!1),Tt=d(!1),Ct=d(null);let Bt="",Ot=!1,Pt="";const Et=d(0),St=d(!1),Dt=v(()=>{var e;return Math.max(0,null!=(e=i.renderDebounceMs)?e:300)}),Ft=v(()=>{var e;return Math.max(0,null!=(e=i.contentStableDelayMs)?e:500)}),Rt=v(()=>{var e;return Math.max(120,null!=(e=i.previewPollDelayMs)?e:800)}),$t=v(()=>{var e;return Math.max(Rt.value,null!=(e=i.previewPollMaxDelayMs)?e:4e3)}),jt=v(()=>{var e;return Math.max(1,Math.trunc(null!=(e=i.previewPollMaxAttempts)?e:12))}),zt=v(()=>!1!==i.loading);let At=null,Ht=null,Lt=null,_t=null,Nt=0;const Xt=null!=(o=globalThis.requestIdleCallback)?o:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),It=null!=(r=globalThis.cancelIdleCallback)?r:e=>clearTimeout(e);function Yt(e=Xe){return!Ne&&e===Xe}function Wt(){return Yt()&&Qe.value&&!We.value}function qt(){null!=Lt&&(globalThis.clearTimeout(Lt),Lt=null),null!=_t&&(It(_t),_t=null)}function Vt(){Ne||(qt(),Lt=globalThis.setTimeout(()=>{Lt=null,Wt()&&(_t=Xt(()=>{_t=null,Wt()&&il()},{timeout:500}))},Dt.value))}function Zt(){null!=Ht&&(globalThis.clearTimeout(Ht),Ht=null)}function Ut(e=600){if("undefined"==typeof globalThis||Ne)return;const t=Math.max(0,e);Zt(),Ht=globalThis.setTimeout(()=>{if(Ht=null,!Ne){if(i.loading||Tt.value||!Wt())return void Ut(Math.min(1200,Math.max(300,1.2*t)));Vt()}},t)}const Kt=d(mt()),Gt=d(Kt.value);let Jt=null;const Qt=d(!1),en=d(!1),tn=d({}),nn=d(0);let ln=null,on=null;const rn=d(!1),an=v(()=>{var e,t;return!(We.value||bt.value||De.value&&!Tt.value&&!Ct.value&&(Qt.value||rn.value&&Boolean(null==(t=null==(e=Ze.value)?void 0:e.textContent)?void 0:t.trim())))}),un=d({zoom:1,translateX:0,translateY:0,containerHeight:Kt.value}),sn=v(()=>i.enableWheelZoom?{wheel:Kn}:{}),cn=v(()=>{var e,t,n,l;return{worker:null!=(e=i.workerTimeoutMs)?e:1400,parse:null!=(t=i.parseTimeoutMs)?t:1800,render:null!=(n=i.renderTimeoutMs)?n:2500,fullRender:null!=(l=i.fullRenderTimeoutMs)?l:4e3}});let dn=null,vn=null,mn=!1,fn=Rt.value,hn=null,gn=0,pn=!0,wn=0;function yn(e,t){const n=null==t?void 0:t.timeoutMs,l=null==t?void 0:t.signal;if(null==l?void 0:l.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let o=null,r=!1,a=null;return new Promise((t,i)=>{const u=()=>{null!=o&&clearTimeout(o),a&&l&&l.removeEventListener("abort",a)};n&&n>0&&(o=globalThis.setTimeout(()=>{r||(r=!0,u(),i(new Error("Operation timed out")))},n)),l&&(a=()=>{r||(r=!0,u(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",a)),e().then(e=>{r||(r=!0,u(),t(e))}).catch(e=>{r||(r=!0,u(),i(e))})})}function kn(e){if("undefined"==typeof document)return;if(!Ze.value)return;if("function"==typeof i.onRenderError&&!0===i.onRenderError(e,ct.value,Ze.value))return rn.value=!0,void ul();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),ze(Ze.value),Ze.value.appendChild(t);const l=Ze.value?getComputedStyle(Ze.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";Kt.value=l||"360px",Gt.value=Kt.value,rn.value=!0,ul()}function xn(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function bn(e){return"AbortError"===(null==e?void 0:e.name)}function Mn(e){return!xn(e)&&!bn(e)}"undefined"!=typeof window&&h([()=>qe.value,Fe],([e,t])=>{var n;if(null==(n=Je.value)||n.destroy(),Je.value=null,!t||Qe.value)return void(Qe.value=!0);if(!e)return void(Qe.value=!1);const l=Ge(e,{rootMargin:null==Re?void 0:Re.value.heavyBlockMargin,allowIdle:!1});Je.value=l,Qe.value=l.isVisible.value,l.whenVisible.then(()=>{Qe.value=!0})},{immediate:!0}),g(()=>{var e;Ne=!0,Xe+=1,nn.value+=1,null==(e=Je.value)||e.destroy(),Je.value=null,ut(),qt()});const Tn=v(()=>!1!==i.showTooltips);function Cn(e){return!e||e.disabled}function Bn(e,t,n="top"){if(!Tn.value)return;if(Cn(e.currentTarget))return;const l=e,o=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;W(e.currentTarget,t,n,!1,o,i.isDark)}function On(){Tn.value&&Y()}function Pn(e){if(!Tn.value)return;if(Cn(e.currentTarget))return;const t=Ye.value?_e("common.copied")||"Copied":_e("common.copy")||"Copy",n=e,l=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;W(e.currentTarget,t,"top",!1,l,i.isDark)}function En(e,t){const n={theme:"dark"===t?"dark":"default"};"strict"===$e.value&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith("%%{")?e:l+e}function Sn(){return pn&&!bt.value&&!Qt.value&&!rn.value}function Dn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Fn(e){if("gantt"===U(e))return function(e){var t;const n=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&n.length>0&&n.pop();n.length>0;){const e=null==(t=n[n.length-1])?void 0:t.trim();if(e&&!e.startsWith("%%")){if(Dn(e))break;n.pop()}else n.pop()}return n.some(Dn)?n.join("\n"):""}(e);const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Rn(e,t,n,l){return s(this,null,function*(){try{return yield yn(()=>e.render(t,n),{timeoutMs:l})}catch(o){if(!Mn(o))throw o;const a=G(n);if(a===n)throw o;try{return yield yn(()=>e.render(`${t}-retry`,a),{timeoutMs:l})}catch(r){throw o}}})}function $n(e,t,n){return s(this,null,function*(){var l;try{return yield ee(e,t,null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.worker,null==n?void 0:n.signal)}catch(o){if("AbortError"===(null==o?void 0:o.name))throw o;if("WORKER_INIT_ERROR"===((null==o?void 0:o.code)||(null==o?void 0:o.name))||(null==o?void 0:o.fallbackToRenderer))return yield function(e,t,n){return s(this,null,function*(){var l,r,a,i;const u=yield Ie();if(!u)return;const s=u,c=En(e,t);if("function"==typeof s.parse){try{yield yn(()=>s.parse(c),{timeoutMs:null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.parse,signal:null==n?void 0:n.signal})}catch(o){if(!Mn(o))throw o;const t=G(c);if(t===c)throw o;try{yield yn(()=>s.parse(t),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:cn.value.parse,signal:null==n?void 0:n.signal})}catch(v){throw o}}return!0}const d=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;try{yield yn(()=>u.render(d,c),{timeoutMs:null!=(a=null==n?void 0:n.timeoutMs)?a:cn.value.render,signal:null==n?void 0:n.signal})}catch(o){if(!Mn(o))throw o;const t=G(c);if(t===c)throw o;try{yield yn(()=>u.render(`${d}-retry`,t),{timeoutMs:null!=(i=null==n?void 0:n.timeoutMs)?i:cn.value.render,signal:null==n?void 0:n.signal})}catch(v){throw o}}return!0})}(e,t,n);throw o}})}function jn(e,t,n){return s(this,null,function*(){var l;if("gantt"===U(e)){const l=Fn(e);if(!l.trim())return{fullOk:!1,prefixOk:!1};try{if(yield $n(l,t,n))return l===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:l}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}return{fullOk:!1,prefixOk:!1}}try{if(yield $n(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}let o=Fn(e);if(o&&o.trim()&&o!==e)try{try{const r=yield ne(e,t,null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.worker,null==n?void 0:n.signal);r&&r.trim()&&(o=r)}catch(r){}if(yield $n(o,t,n))return{fullOk:!1,prefixOk:!0,prefix:o}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}return{fullOk:!1,prefixOk:!1}})}const zn=v(()=>bt.value||Tt.value||We.value);function An(){if("none"===i.maxHeight)return null;if(null!=i.maxHeight){const e=Number.parseFloat(String(i.maxHeight));if(Number.isFinite(e))return e}const e=Ve.value;if(e){const t=getComputedStyle(e).getPropertyValue("--ms-size-code-max-height").trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function Hn(e,t){if(!Ve.value||!Ze.value)return;const n=!(null==t?void 0:t.force)&&!1!==i.loading&&ht(),l=Ze.value.querySelector("svg");if(!l)return;let o=0,r=0;const a=l.getAttribute("viewBox"),u=l.getAttribute("width"),s=l.getAttribute("height");if(a){const e=a.split(" ");4===e.length&&(o=Number.parseFloat(e[2]),r=Number.parseFloat(e[3]))}if(o&&r||u&&s&&(o=Number.parseFloat(u),r=Number.parseFloat(s)),Number.isNaN(o)||Number.isNaN(r)||o<=0||r<=0)try{const e=l.getBBox();e&&e.width>0&&e.height>0&&(o=e.width,r=e.height)}catch(c){return void console.error("Failed to get SVG BBox:",c)}if(o>0&&r>0){const t=r/o,a=null!=e?e:Ve.value.clientWidth,u=l.getBoundingClientRect().width,s=u>0?u:a,c=An(),d=s*t,v=null==c?d:Math.min(d,c),m=Math.max(v,vt());Gt.value=`${Math.max(d,m)}px`,n||null!=V(i.estimatedPreviewHeightPx)||(Kt.value=`${m}px`)}}const Ln=d(!1),_n=v(()=>({transform:`translate(${wt.value}px, ${yt.value}px) scale(${pt.value})`}));function Nn(e){"Escape"===e.key&&Ln.value&&In()}function Xn(){var e;if(!Ve.value||!Ue.value)return!1;if("1"===(null==(e=Ue.value.firstElementChild)?void 0:e.getAttribute("data-mermaid-modal-clone")))return!0;const t=Ve.value.cloneNode(!0);t.dataset.mermaidModalClone="1",t.classList.add("fullscreen"),t.style.height="100%",t.style.maxHeight="100%";const n=t.querySelector("[data-mermaid-wrapper]");return n&&(Ke.value=n,n.style.transform=_n.value.transform),ze(Ue.value),Ue.value.appendChild(t),Le(t),!0}function In(){if(Ln.value=!1,Ue.value&&ze(Ue.value),Ke.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(e){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",Nn)}catch(e){}}function Yn(){pt.value<3&&(pt.value+=.1)}function Wn(){pt.value>.5&&(pt.value-=.1)}function qn(){pt.value=1,wt.value=0,yt.value=0}function Vn(e){kt.value=!0,e instanceof MouseEvent?xt.value={x:e.clientX-wt.value,y:e.clientY-yt.value}:xt.value={x:e.touches[0].clientX-wt.value,y:e.touches[0].clientY-yt.value}}function Zn(e){if(!kt.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),wt.value=t-xt.value.x,yt.value=n-xt.value.y}function Un(){kt.value=!1}function Kn(e){if(i.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!Ve.value)return;const t=Ve.value.getBoundingClientRect(),n=e.clientX-t.left,l=e.clientY-t.top,o=n-t.width/2,r=l-t.height/2,a=(o-wt.value)/pt.value,i=(r-yt.value)/pt.value,u=.01,s=-e.deltaY*u,c=Math.min(Math.max(pt.value+s,.5),3);c!==pt.value&&(wt.value=o-a*c,yt.value=r-i*c,pt.value=c)}}function Gn(){return s(this,null,function*(){try{const e=ct.value,t={payload:{type:"copy",text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(c("copy",t),t.defaultPrevented)return;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),Ye.value=!0,setTimeout(()=>{Ye.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})}function Jn(){var e;const t=null==(e=Ze.value)?void 0:e.querySelector("svg");if(!t)return void console.error("SVG element not found");const n=(new XMLSerializer).serializeToString(t),l={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:t,svgString:n};c("export",l),l.defaultPrevented||function(e,t=null){s(this,null,function*(){try{const l=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([l],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(n){}URL.revokeObjectURL(r)}}catch(l){console.error("Failed to export SVG:",l)}})}(t,n)}function Qn(){var e,t;const n=null!=(t=null==(e=Ze.value)?void 0:e.querySelector("svg"))?t:null,l=n?(new XMLSerializer).serializeToString(n):null,o={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:l};c("openModal",o),o.defaultPrevented||function(){if(Ln.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(e){}if("undefined"!=typeof window)try{window.addEventListener("keydown",Nn)}catch(e){}p(()=>{Xn()||p(Xn)})}()}function el(e){const t={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};c("toggleMode",e,t),t.defaultPrevented||tl(e)}function tl(e){return s(this,null,function*(){const t=st.value;if(!t)return Mt.value=!0,void(bt.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",Mt.value=!0,bt.value="source"===e,yield p();const l=t.scrollHeight;t.style.transition="height var(--ms-duration-standard) var(--ms-ease-standard)",t.offsetHeight,t.style.height=`${l}px`;const o=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",r)};function r(){o()}t.addEventListener("transitionend",r),setTimeout(()=>o(),220)})}function nl(e=ct.value,t=(i.isDark?"dark":"light"),n=!1===i.loading){return{codeWithTheme:dt(t,e),final:n,signature:`${t}\0${e}`,theme:t}}function ll(e){return e.signature===nl().signature}function ol(){return s(this,arguments,function*(e=nl()){const l=Xe;if(!Yt(l)||!ll(e))return!1;if(Tt.value){const t=Ct.value,n=Ot,o=Bt;if(!t)return!1;const r=yield t;return!(!Yt(l)||!ll(e))&&(o===e.signature?!(!r||Pt!==e.signature)||!(!e.final||!1!==i.loading||n)&&ol(e):ol(e))}if(!Ze.value){if(yield p(),!Yt(l))return!1;if(!Ze.value)return console.warn("Mermaid container not ready"),!1}return!(!Yt(l)||!ll(e))&&(Tt.value=!0,Ot=e.final,Bt=e.signature,at(),Ct.value=s(null,null,function*(){var o,r,a,s;try{const c=yield Ie();if(!Yt(l)||!c)return!1;const d=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;Qt.value||en.value||null==(o=c.initialize)||o.call(c,(a=u({},je.value),s={dompurifyConfig:u({},q)},t(a,n(s))));const v=yield Rn(c,d,e.codeWithTheme,cn.value.fullRender);if(!Yt(l)||!ll(e))return en.value&&(en.value=!1),!1;if(!Ze.value)return!1;const m=Ae(Ze.value,null==v?void 0:v.svg,{keepPreviousOnFailure:!e.final||!1!==i.loading});if(!m)return en.value&&(en.value=!1),!1;const f=null!=(r=null==v?void 0:v.bindFunctions)?r:null;return He=f,Le(m.bindTarget),Qt.value||en.value||(Q(()=>Hn()),Qt.value=!0,un.value={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value}),tn.value[e.theme]={svg:m.svg,bindFunctions:f},en.value&&(en.value=!1),Pt=e.signature,ft.value=Ze.value.innerHTML,rn.value=!1,Nt=0,Zt(),!0}catch(c){if(!Yt(l)||!ll(e))return en.value&&(en.value=!1),!1;const t=xn(c),n=Nt+1;return t&&n<=3?(Nt=n,Ut(Math.min(1200,600*n))):(Nt=0,Zt(),e.final&&!1===i.loading&&console.error("Failed to render mermaid diagram:",c),e.final&&!1===i.loading&&kn(c)),!1}finally{Ot=!1,Bt="",Tt.value=!1,Ct.value=null,Yt(l)&&it()}}),Ct.value)})}function rl(){return s(this,null,function*(){var e;const t=ct.value;if(!t.trim()){if(gt())return;return Ze.value&&ze(Ze.value),ft.value=null,Pt="",void(rn.value=!1)}if(!Se.value||!Wt())return;const n=nl(t);Qt.value&&n.signature===Pt&&(null==(e=Ze.value)?void 0:e.querySelector("svg"))||(yield ol(n))&&(rn.value=!1)})}function al(e,t,n,l){return s(this,null,function*(){const o=Xe;if(!Yt(o)||!Sn())return;if(!Ze.value&&(yield p(),!Yt(o)||!Ze.value))return;if(Tt.value)return;Tt.value=!0,at();const r=nl(t,n),a=s(null,null,function*(){var t;try{const a=yield Ie();if(!Yt(o)||!a)return!1;const u=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,s=Fn(e),c=s&&s.trim()?s:e,d=yield Rn(a,u,En(c,n),cn.value.render);if(!Yt(o)||nn.value!==l||!1===i.loading||!Sn()||!ll(r))return!1;const v=null==d?void 0:d.svg;if(!Ze.value||!v)return!1;const m=Ae(Ze.value,v,{keepPreviousOnFailure:!0});return!!m&&(He=null!=(t=null==d?void 0:d.bindFunctions)?t:null,Le(m.bindTarget),Q(()=>Hn()),!1)}catch(u){return!1}finally{Ct.value===a&&(Tt.value=!1,Ct.value=null),Yt(o)&&it()}});return Ct.value=a,a})}function il(){return s(this,null,function*(){var e;if(!Wt())return;const t=Xe,n=Date.now(),l=++nn.value;at();try{ln&&ln.abort(),ln=new AbortController;const r=ln.signal,a=i.isDark?"dark":"light",u=ct.value;if(!u.trim()){if(gt())return;return Ze.value&&ze(Ze.value),ft.value=null,Pt="",void(rn.value=!1)}if(nl(u,a).signature===Pt)return;try{const e=yield jn(u,a,{signal:r,timeoutMs:cn.value.worker});if(!Yt(t))return;if(e.fullOk){if(r.aborted||nn.value!==l)return;if(!(yield ol(nl(u,a))))return;return void(Yt(t)&&nn.value===l&&(rn.value=!1))}const o=gn&&n<=gn;if(e.prefixOk&&e.prefix&&!r.aborted&&nn.value===l&&Sn()&&!o)return void(yield al(e.prefix,u,a,l))}catch(o){if("AbortError"===(null==o?void 0:o.name))return}if(!Yt(t)||nn.value!==l)return;if(rn.value)return;const s=tn.value[a];if(s&&Ze.value){const t=Ae(Ze.value,s.svg);t&&(He=null!=(e=s.bindFunctions)?e:null,Le(t.bindTarget))}}finally{Yt(t)&&it()}})}function ul(){mn&&(mn=!1,fn=Rt.value,pn=!1,hn&&(hn.abort(),hn=null),dn&&(globalThis.clearTimeout(dn),dn=null),vn&&(It(vn),vn=null),gn=Date.now())}function sl(){if(ul(),qt(),ln){try{ln.abort()}catch(e){}ln=null}if(hn){try{hn.abort()}catch(e){}hn=null}Zt(),Nt=0}function cl(){null==on||on.abort(),on=null}function dl(e=Rt.value){mn&&(wn>=jt.value?ul():(dn&&globalThis.clearTimeout(dn),dn=globalThis.setTimeout(()=>{vn=Xt(()=>s(null,null,function*(){if(!mn)return;if(!Wt())return void ul();if(bt.value||Qt.value)return void ul();const e=i.isDark?"dark":"light",t=ct.value;if(!t.trim())return!1===i.loading?void ul():void dl(fn);if(wn++,wn>jt.value)ul();else{hn&&hn.abort(),hn=new AbortController;try{const n=yield jn(t,e,{signal:hn.signal,timeoutMs:cn.value.worker});if(n.fullOk){if((yield ol(nl(t,e)))&&Qt.value)return void ul()}else n.prefixOk&&n.prefix&&Sn()&&(yield al(n.prefix,t,e,nn.value))}catch(n){}fn=Math.min(Math.floor(1.5*fn),$t.value),dl(fn)}}),{timeout:500})},e)))}function vl(){mn||zt.value&&Se.value&&Wt()&&(bt.value||Qt.value||(mn=!0,gn=0,pn=!0,wn=0,fn=Rt.value,dl(fn)))}function ml(){return s(this,null,function*(){const e=Xe;Yt(e)&&(yield Ie().catch(t=>{Yt(e)&&(Se.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t))}),Yt(e)&&(yield p(),Yt(e)&&(Mt.value||(bt.value=!Se.value),Wt()&&(zt.value?(Vt(),Et.value=ct.value.length):bt.value||rl()))))})}return h(Ue,e=>{Ln.value&&e&&Xn()}),h(_n,e=>{Ln.value&&Ke.value&&(Ke.value.style.transform=e.transform)},{immediate:!0}),h(Tn,e=>{e||Y()}),h(()=>ct.value,e=>{if((e.trim()||!1===i.loading)&&(Qt.value=!1,tn.value={}),!zt.value)return ul(),void(Wt()&&!bt.value&&rl());Wt()&&Vt(),!bt.value&&Se.value&&Wt()?vl():ul(),function(){if(!zt.value)return;if(!bt.value)return;if(!Se.value)return;const e=ct.value.length;e!==Et.value&&(St.value=!0,Et.value=e,At&&clearTimeout(At),At=setTimeout(()=>{St.value&&bt.value&&ct.value.trim()&&(St.value=!1,tl("preview"))},Ft.value))}()}),h(()=>i.isDark,()=>s(null,null,function*(){var e;if(rn.value)return;const t=i.isDark?"dark":"light",n=tn.value[t];if(n){if(Ze.value){const t=Ae(Ze.value,n.svg);t&&(He=null!=(e=n.bindFunctions)?e:null,Le(t.bindTarget))}return}const l={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value},o=1!==pt.value||0!==wt.value||0!==yt.value;en.value=!0,o&&(pt.value=1,wt.value=0,yt.value=0,yield p()),yield ol(),o&&(yield p(),pt.value=l.zoom,wt.value=l.translateX,yt.value=l.translateY,Kt.value=l.containerHeight,un.value=l)})),h(()=>bt.value,e=>s(null,null,function*(){var t;if(e)ul(),Qt.value&&(un.value={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value});else{if(rn.value)return;const e=i.isDark?"dark":"light";if(Qt.value&&tn.value[e]){if(yield p(),Ze.value){const n=tn.value[e],l=Ae(Ze.value,n.svg);l&&(He=null!=(t=n.bindFunctions)?t:null,Le(l.bindTarget))}return pt.value=un.value.zoom,wt.value=un.value.translateX,yt.value=un.value.translateY,void(Kt.value=un.value.containerHeight)}if(yield p(),!Se.value||!Wt())return;if(!zt.value)return ul(),void(yield rl());vl(),yield il()}})),h(()=>i.loading,(e,t)=>s(null,null,function*(){var n;if(e)cl();else if(!0===t){cl();const e=ct.value,t=e.trim();if(!t)return Ze.value&&ze(Ze.value),ft.value=null,Pt="",rn.value=!1,sl();if(!Wt())return void sl();const r=i.isDark?"dark":"light",u=nl(e,r);if(Qt.value&&u.signature===Pt){if(yield p(),Ze.value&&!Ze.value.querySelector("svg")&&tn.value[r]){const e=tn.value[r],t=Ae(Ze.value,e.svg);t&&(He=null!=(n=e.bindFunctions)?n:null,Le(t.bindTarget))}return Hn(void 0,{force:!0}),void sl()}const s=new AbortController;on=s;try{let e=0;for(;;)try{yield $n(t,r,{signal:s.signal,timeoutMs:cn.value.worker});break}catch(l){const t="WORKER_BUSY"===(null==l?void 0:l.code)||"WORKER_TIMEOUT"===(null==l?void 0:l.code),n="WORKER_TIMEOUT"===(null==l?void 0:l.code)?2:8;if(!t||e>=n)throw l;const o=Math.min(50*a(2,e),400);e++,yield yn(()=>new Promise(e=>setTimeout(e,o)),{signal:s.signal})}if(!(yield ol(u)))return;rn.value=!1,sl()}catch(o){if(bn(o))return;sl(),kn(o)}finally{on===s&&(on=null)}}})),h(Ve,e=>{Jt&&Jt.disconnect(),e&&(Jt=new ResizeObserver(e=>{e&&e.length>0&&!bt.value&&!We.value&&Q(()=>{Hn(e[0].contentRect.width)})}),Jt.observe(e))},{immediate:!0}),w(()=>{Fe.value&&!Wt()||ml()}),h(()=>Se.value,e=>{Mt.value||(bt.value=!e)}),h(()=>i.maxHeight,()=>{p(()=>{Hn()})}),h([()=>i.estimatedPreviewHeightPx,()=>ct.value],()=>{Qt.value||ht()||bt.value||(Kt.value=mt(),Gt.value=Kt.value)}),h(()=>Qe.value,e=>s(null,null,function*(){e&&(De.value?(Qt.value||(zt.value?(Vt(),Et.value=ct.value.length):rl()),i.loading||Qt.value||rl(),!bt.value&&Se.value&&zt.value&&vl()):yield ml())}),{immediate:!1}),y(()=>{At&&clearTimeout(At),qt(),Jt&&Jt.disconnect(),ln&&(ln.abort(),ln=null),cl(),ul(),Zt(),ut()}),h(()=>We.value,e=>s(null,null,function*(){e?(ul(),ln&&ln.abort()):Wt()&&!Qt.value&&(yield p(),zt.value?(Vt(),vl()):bt.value||rl())}),{immediate:!1}),(e,t)=>(k(),x("div",{ref_key:"blockContainer",ref:qe,class:b(["mermaid-block-container rounded-lg border overflow-hidden",[{"is-rendering":i.loading,dark:i.isDark}]]),"data-markstream-mermaid":"1","data-markstream-mode":bt.value?"fallback":Qt.value?"preview":"pending","data-markstream-pending":an.value?"true":void 0},[i.showHeader?(k(),x("div",re,[e.$slots["header-left"]?(k(),x("div",ae,[M(e.$slots,"header-left",{},void 0,!0)])):(k(),x("div",ie,[T("span",{class:"icon-slot action-icon shrink-0",innerHTML:C('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />\n</svg>\n')},null,8,ue),t[21]||(t[21]=T("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate"},"Mermaid",-1))])),e.$slots["header-center"]?(k(),x("div",se,[M(e.$slots,"header-center",{},void 0,!0)])):i.showModeToggle&&Se.value?(k(),x("div",ce,[T("button",{class:b(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[bt.value?"":"is-active"]]),onClick:t[0]||(t[0]=()=>el("preview")),onMouseenter:t[1]||(t[1]=e=>Bn(e,C(_e)("common.preview")||"Preview")),onFocus:t[2]||(t[2]=e=>Bn(e,C(_e)("common.preview")||"Preview")),onMouseleave:On,onBlur:On},[T("div",de,[t[22]||(t[22]=T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),T("circle",{cx:"12",cy:"12",r:"3"})])],-1)),T("span",null,B(C(_e)("common.preview")||"Preview"),1)])],34),T("button",{class:b(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[bt.value?"is-active":""]]),onClick:t[3]||(t[3]=()=>el("source")),onMouseenter:t[4]||(t[4]=e=>Bn(e,C(_e)("common.source")||"Source")),onFocus:t[5]||(t[5]=e=>Bn(e,C(_e)("common.source")||"Source")),onMouseleave:On,onBlur:On},[T("div",ve,[t[23]||(t[23]=T("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:"action-icon"},[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),T("span",null,B(C(_e)("common.source")||"Source"),1)])],34)])):O("",!0),e.$slots["header-right"]?(k(),x("div",me,[M(e.$slots,"header-right",{},void 0,!0)])):(k(),x("div",fe,[i.showCollapseButton?(k(),x("button",{key:0,class:b(Ee),"aria-pressed":We.value,onClick:t[6]||(t[6]=e=>We.value=!We.value),onMouseenter:t[7]||(t[7]=e=>Bn(e,We.value?C(_e)("common.expand")||"Expand":C(_e)("common.collapse")||"Collapse")),onFocus:t[8]||(t[8]=e=>Bn(e,We.value?C(_e)("common.expand")||"Expand":C(_e)("common.collapse")||"Collapse")),onMouseleave:On,onBlur:On},[(k(),x("svg",{style:P({rotate:We.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:"action-icon"},[...t[24]||(t[24]=[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,he)):O("",!0),i.showCopyButton?(k(),x("button",{key:1,class:b(Ee),onClick:Gn,onMouseenter:t[9]||(t[9]=e=>Pn(e)),onFocus:t[10]||(t[10]=e=>Pn(e)),onMouseleave:On,onBlur:On},[Ye.value?(k(),x("svg",pe,[...t[26]||(t[26]=[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(k(),x("svg",ge,[...t[25]||(t[25]=[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),T("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):O("",!0),i.showExportButton&&Se.value?(k(),x("button",{key:2,class:b(`${Ee} ${zn.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":C(_e)("common.export")||"Export",disabled:zn.value,onClick:Jn,onMouseenter:t[11]||(t[11]=e=>Bn(e,C(_e)("common.export")||"Export")),onFocus:t[12]||(t[12]=e=>Bn(e,C(_e)("common.export")||"Export")),onMouseleave:On,onBlur:On},[...t[27]||(t[27]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),T("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,we)):O("",!0),i.showFullscreenButton&&Se.value?(k(),x("button",{key:3,class:b(`${Ee} ${zn.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open",disabled:zn.value,onClick:Qn,onMouseenter:t[13]||(t[13]=e=>Bn(e,Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open")),onFocus:t[14]||(t[14]=e=>Bn(e,Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open")),onMouseleave:On,onBlur:On},[Ln.value?(k(),x("svg",xe,[...t[29]||(t[29]=[T("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)])])):(k(),x("svg",ke,[...t[28]||(t[28]=[T("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)])]))],42,ye)):O("",!0)]))])):O("",!0),E(T("div",{ref_key:"modeContainerRef",ref:st},[bt.value?(k(),x("div",be,[T("pre",Me,B(ct.value),1)])):(k(),x("div",Te,[i.showZoomControls?(k(),x("div",Ce,[T("div",Be,[T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yn,onMouseenter:t[15]||(t[15]=e=>Bn(e,C(_e)("common.zoomIn")||"Zoom in")),onFocus:t[16]||(t[16]=e=>Bn(e,C(_e)("common.zoomIn")||"Zoom in")),onMouseleave:On,onBlur:On},[...t[30]||(t[30]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Wn,onMouseenter:t[17]||(t[17]=e=>Bn(e,C(_e)("common.zoomOut")||"Zoom out")),onFocus:t[18]||(t[18]=e=>Bn(e,C(_e)("common.zoomOut")||"Zoom out")),onMouseleave:On,onBlur:On},[...t[31]||(t[31]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:qn,onMouseenter:t[19]||(t[19]=e=>Bn(e,C(_e)("common.resetZoom")||"Reset zoom")),onFocus:t[20]||(t[20]=e=>Bn(e,C(_e)("common.resetZoom")||"Reset zoom")),onMouseleave:On,onBlur:On},B(Math.round(100*pt.value))+"% ",33)])])):O("",!0),T("div",S({ref_key:"mermaidContainer",ref:Ve,class:"mermaid-preview-area relative overflow-hidden block transition-[height] ease-out",style:{height:Kt.value}},D(sn.value,!0),{onMousedown:Vn,onMousemove:Zn,onMouseup:Un,onMouseleave:Un,onTouchstartPassive:Vn,onTouchmovePassive:Zn,onTouchendPassive:Un}),[T("div",{"data-mermaid-wrapper":"",class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":kt.value}]),style:P(_n.value)},[T("div",{ref_key:"mermaidContent",ref:Ze,class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:P({height:Gt.value})},null,4)],6)],16),(k(),F(R,{to:"body"},[T("div",{class:b(["markstream-vue",{dark:i.isDark}])},[$(j,{name:"mermaid-dialog",appear:""},{default:z(()=>[Ln.value?(k(),x("div",{key:0,class:"mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:A(In,["self"])},[T("div",Oe,[T("div",Pe,[T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yn},[...t[32]||(t[32]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Wn},[...t[33]||(t[33]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:qn},B(Math.round(100*pt.value))+"% ",1),T("button",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:In},[...t[34]||(t[34]=[T("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:"action-icon"},[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),T("div",S({ref_key:"modalContent",ref:Ue,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},D(sn.value,!0),{onMousedown:Vn,onMousemove:Zn,onMouseup:Un,onMouseleave:Un,onTouchstartPassive:Vn,onTouchmovePassive:Zn,onTouchendPassive:Un}),null,16)])])):O("",!0)]),_:1})],2)]))]))],512),[[H,!We.value]])],10,oe))}}),[["__scopeId","data-v-4bb0e77b"]]);Se.install=e=>{e.component(Se.__name,Se)};export{Se as default};
|
|
1
|
+
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=Math.pow,i=(t,n,l)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,u=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&i(e,n,t[n]);if(l)for(var n of l(t))r.call(t,n)&&i(e,n,t[n]);return e},s=(e,t,n)=>new Promise((l,o)=>{var r=e=>{try{i(n.next(e))}catch(t){o(t)}},a=e=>{try{i(n.throw(e))}catch(t){o(t)}},i=e=>e.done?l(e.value):Promise.resolve(e.value).then(r,a);i((n=n.apply(e,t)).next())});import{defineComponent as c,ref as d,computed as v,useAttrs as m,inject as f,watch as h,onBeforeUnmount as g,nextTick as p,onMounted as w,onUnmounted as y,openBlock as k,createElementBlock as x,normalizeClass as b,renderSlot as M,createElementVNode as T,unref as C,toDisplayString as B,createCommentVNode as O,normalizeStyle as P,withDirectives as E,mergeProps as S,toHandlers as D,createBlock as F,Teleport as R,createVNode as $,Transition as j,withCtx as z,withModifiers as A,vShow as H}from"vue";import{ao as L,as as _,ap as N,ar as X,ag as I,a6 as Y,al as W,z as q}from"./exports.js";import{p as V,b as Z,g as U,a as K}from"./diagramHeight.js";import{e as G}from"./mermaidSequenceSemicolons.js";import{M as J}from"./index2.js";import{safeRaf as Q}from"./utils/safeRaf.js";import{c as ee,g as te,f as ne}from"./workers-mermaidWorkerClient.js";import{toSafeSvgElement as le}from"stream-markdown-parser";const oe=["data-markstream-mode","data-markstream-pending"],re={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},ae={key:0},ie={key:1,class:"flex items-center gap-x-2 overflow-hidden"},ue=["innerHTML"],se={key:2},ce={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},de={class:"flex items-center gap-x-1"},ve={class:"flex items-center gap-x-1"},me={key:4},fe={key:5,class:"mermaid-header-actions flex items-center"},he=["aria-pressed"],ge={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:"action-icon"},pe={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:"action-icon"},we=["aria-label","disabled"],ye=["aria-label","disabled"],ke={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:"action-icon"},xe={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:"action-icon"},be={key:0,class:"mermaid-source-panel"},Me={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Te={key:1,class:"relative"},Ce={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Be={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Oe={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Pe={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},Ee="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",Se=/* @__PURE__ */q(/* @__PURE__ */c({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:l}){var o,r;const i=e,c=l,q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},Se=d(!1),De=d("undefined"==typeof window),Fe=L(),Re=_(),$e=v(()=>i.isStrict?"strict":"loose"),je=v(()=>({startOnLoad:!1,securityLevel:$e.value,dompurifyConfig:"strict"===$e.value?q:void 0,flowchart:"strict"===$e.value?{htmlLabels:!1}:void 0}));function ze(e){if(e)try{e.replaceChildren()}catch(t){e.innerHTML=""}}function Ae(e,t,n={}){if(!e)return null;const l=function(e,t){if(!e)return null;const n=le(t);if(!n)return null;const l=function(e,t){const n=Array.from(e.childNodes),l=document.createElement("div");return l.dataset.mermaidSvgLayer="1",l.style.zIndex="1",l.appendChild(t),e.insertBefore(l,e.firstChild),n.length>0&&function(e){const t=()=>{var t;for(const n of e)null==(t=n.parentNode)||t.removeChild(n)};"function"==typeof requestAnimationFrame?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),l}(e,n);return{svg:n.outerHTML,bindTarget:l}}(e,t);return l||n.keepPreviousOnFailure||ze(e),l}let He=null;function Le(e){if(i.enableMermaidInteractions&&(null==e?void 0:e.querySelector("svg")))try{null==He||He(e)}catch(t){}}const{t:_e}=N();let Ne=!1,Xe=0;function Ie(){return s(this,null,function*(){try{const e=yield te();return Ne?null:(Se.value=!!e,e)}catch(e){throw Ne||(Se.value=!1),e}finally{Ne||(De.value=!0)}})}const Ye=d(!1),We=d(!1),qe=d(),Ve=d(),Ze=d(),Ue=d(),Ke=d(null),Ge=X(),Je=d(null),Qe=d("undefined"==typeof window||!Fe.value),et=m(),tt=f(J,null);let nt="",lt=0,ot=0;const rt=v(()=>I(i,et));function at(){const e=rt.value;e&&(nt&&nt!==e&&(null==tt||tt.markSettled(nt),lt=0),nt=e,lt+=1,ot+=1,1===lt&&(null==tt||tt.markPending(e)))}function it(){return s(this,null,function*(){const e=nt;if(!e)return;if(lt=Math.max(0,lt-1),lt>0)return;nt="";const t=++ot;yield p(),t===ot&&(function(e=rt.value){e&&qe.value&&(null==tt||tt.reportHeight(e,qe.value.offsetHeight))}(e),null==tt||tt.markSettled(e))})}function ut(){const e=nt;e&&(nt="",lt=0,ot+=1,null==tt||tt.markSettled(e))}const st=d(),ct=v(()=>i.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function dt(e,t=ct.value){const n=t,l={theme:"dark"===e?"dark":"default"};"strict"===$e.value&&(l.flowchart={htmlLabels:!1});const o=`%%{init: ${JSON.stringify(l)}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}function vt(){var e;return function(e){const t=function(){var e;const t=Ve.value?getComputedStyle(Ve.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return null!=(e=V(t))?e:360}(),n=An();return K(e,t,n)}(null!=(e=V(i.estimatedPreviewHeightPx))?e:Z(ct.value))}function mt(){return`${vt()}px`}const ft=d(null);function ht(){var e;return!!(null==(e=Ze.value)?void 0:e.querySelector("svg"))}function gt(){return!1!==i.loading&&(ht()||!!ft.value)}const pt=d(1),wt=d(0),yt=d(0),kt=d(!1),xt=d({x:0,y:0}),bt=d(!0),Mt=d(!1),Tt=d(!1),Ct=d(null);let Bt="",Ot=!1,Pt="";const Et=d(0),St=d(!1),Dt=v(()=>{var e;return Math.max(0,null!=(e=i.renderDebounceMs)?e:300)}),Ft=v(()=>{var e;return Math.max(0,null!=(e=i.contentStableDelayMs)?e:500)}),Rt=v(()=>{var e;return Math.max(120,null!=(e=i.previewPollDelayMs)?e:800)}),$t=v(()=>{var e;return Math.max(Rt.value,null!=(e=i.previewPollMaxDelayMs)?e:4e3)}),jt=v(()=>{var e;return Math.max(1,Math.trunc(null!=(e=i.previewPollMaxAttempts)?e:12))}),zt=v(()=>!1!==i.loading);let At=null,Ht=null,Lt=null,_t=null,Nt=0;const Xt=null!=(o=globalThis.requestIdleCallback)?o:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),It=null!=(r=globalThis.cancelIdleCallback)?r:e=>clearTimeout(e);function Yt(e=Xe){return!Ne&&e===Xe}function Wt(){return Yt()&&Qe.value&&!We.value}function qt(){null!=Lt&&(globalThis.clearTimeout(Lt),Lt=null),null!=_t&&(It(_t),_t=null)}function Vt(){Ne||null==Lt&&null==_t&&(Lt=globalThis.setTimeout(()=>{Lt=null,Wt()&&(_t=Xt(()=>{_t=null,Wt()&&il()},{timeout:500}))},Dt.value))}function Zt(){null!=Ht&&(globalThis.clearTimeout(Ht),Ht=null)}function Ut(e=600){if("undefined"==typeof globalThis||Ne)return;const t=Math.max(0,e);Zt(),Ht=globalThis.setTimeout(()=>{if(Ht=null,!Ne){if(i.loading||Tt.value||!Wt())return void Ut(Math.min(1200,Math.max(300,1.2*t)));Vt()}},t)}const Kt=d(mt()),Gt=d(Kt.value);let Jt=null;const Qt=d(!1),en=d(!1),tn=d({}),nn=d(0);let ln=null,on=null;const rn=d(!1),an=v(()=>{var e,t;return!(We.value||bt.value||De.value&&!Tt.value&&!Ct.value&&(Qt.value||rn.value&&Boolean(null==(t=null==(e=Ze.value)?void 0:e.textContent)?void 0:t.trim())))}),un=d({zoom:1,translateX:0,translateY:0,containerHeight:Kt.value}),sn=v(()=>i.enableWheelZoom?{wheel:Kn}:{}),cn=v(()=>{var e,t,n,l;return{worker:null!=(e=i.workerTimeoutMs)?e:1400,parse:null!=(t=i.parseTimeoutMs)?t:1800,render:null!=(n=i.renderTimeoutMs)?n:2500,fullRender:null!=(l=i.fullRenderTimeoutMs)?l:4e3}});let dn=null,vn=null,mn=!1,fn=Rt.value,hn=null,gn=0,pn=!0,wn=0;function yn(e,t){const n=null==t?void 0:t.timeoutMs,l=null==t?void 0:t.signal;if(null==l?void 0:l.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let o=null,r=!1,a=null;return new Promise((t,i)=>{const u=()=>{null!=o&&clearTimeout(o),a&&l&&l.removeEventListener("abort",a)};n&&n>0&&(o=globalThis.setTimeout(()=>{r||(r=!0,u(),i(new Error("Operation timed out")))},n)),l&&(a=()=>{r||(r=!0,u(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",a)),e().then(e=>{r||(r=!0,u(),t(e))}).catch(e=>{r||(r=!0,u(),i(e))})})}function kn(e){if("undefined"==typeof document)return;if(!Ze.value)return;if("function"==typeof i.onRenderError&&!0===i.onRenderError(e,ct.value,Ze.value))return rn.value=!0,void ul();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),ze(Ze.value),Ze.value.appendChild(t);const l=Ze.value?getComputedStyle(Ze.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";Kt.value=l||"360px",Gt.value=Kt.value,rn.value=!0,ul()}function xn(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function bn(e){return"AbortError"===(null==e?void 0:e.name)}function Mn(e){return!xn(e)&&!bn(e)}"undefined"!=typeof window&&h([()=>qe.value,Fe],([e,t])=>{var n;if(null==(n=Je.value)||n.destroy(),Je.value=null,!t||Qe.value)return void(Qe.value=!0);if(!e)return void(Qe.value=!1);const l=Ge(e,{rootMargin:null==Re?void 0:Re.value.heavyBlockMargin,allowIdle:!1});Je.value=l,Qe.value=l.isVisible.value,l.whenVisible.then(()=>{Qe.value=!0})},{immediate:!0}),g(()=>{var e;Ne=!0,Xe+=1,nn.value+=1,null==(e=Je.value)||e.destroy(),Je.value=null,ut(),qt()});const Tn=v(()=>!1!==i.showTooltips);function Cn(e){return!e||e.disabled}function Bn(e,t,n="top"){if(!Tn.value)return;if(Cn(e.currentTarget))return;const l=e,o=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;W(e.currentTarget,t,n,!1,o,i.isDark)}function On(){Tn.value&&Y()}function Pn(e){if(!Tn.value)return;if(Cn(e.currentTarget))return;const t=Ye.value?_e("common.copied")||"Copied":_e("common.copy")||"Copy",n=e,l=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;W(e.currentTarget,t,"top",!1,l,i.isDark)}function En(e,t){const n={theme:"dark"===t?"dark":"default"};"strict"===$e.value&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith("%%{")?e:l+e}function Sn(){return pn&&!bt.value&&!Qt.value&&!rn.value}function Dn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Fn(e){if("gantt"===U(e))return function(e){var t;const n=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&n.length>0&&n.pop();n.length>0;){const e=null==(t=n[n.length-1])?void 0:t.trim();if(e&&!e.startsWith("%%")){if(Dn(e))break;n.pop()}else n.pop()}return n.some(Dn)?n.join("\n"):""}(e);const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Rn(e,t,n,l){return s(this,null,function*(){try{return yield yn(()=>e.render(t,n),{timeoutMs:l})}catch(o){if(!Mn(o))throw o;const a=G(n);if(a===n)throw o;try{return yield yn(()=>e.render(`${t}-retry`,a),{timeoutMs:l})}catch(r){throw o}}})}function $n(e,t,n){return s(this,null,function*(){var l;try{return yield ee(e,t,null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.worker,null==n?void 0:n.signal)}catch(o){if("AbortError"===(null==o?void 0:o.name))throw o;if("WORKER_INIT_ERROR"===((null==o?void 0:o.code)||(null==o?void 0:o.name))||(null==o?void 0:o.fallbackToRenderer)||function(e){const t="string"==typeof(null==e?void 0:e.message)?e.message:String(null!=e?e:"");return/(?:DOM)?purify\.(?:sanitize|addHook) is not a function/i.test(t)}(o))return yield function(e,t,n){return s(this,null,function*(){var l,r,a,i;const u=yield Ie();if(!u)return;const s=u,c=En(e,t);if("function"==typeof s.parse){try{yield yn(()=>s.parse(c),{timeoutMs:null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.parse,signal:null==n?void 0:n.signal})}catch(o){if(!Mn(o))throw o;const t=G(c);if(t===c)throw o;try{yield yn(()=>s.parse(t),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:cn.value.parse,signal:null==n?void 0:n.signal})}catch(v){throw o}}return!0}const d=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;try{yield yn(()=>u.render(d,c),{timeoutMs:null!=(a=null==n?void 0:n.timeoutMs)?a:cn.value.render,signal:null==n?void 0:n.signal})}catch(o){if(!Mn(o))throw o;const t=G(c);if(t===c)throw o;try{yield yn(()=>u.render(`${d}-retry`,t),{timeoutMs:null!=(i=null==n?void 0:n.timeoutMs)?i:cn.value.render,signal:null==n?void 0:n.signal})}catch(v){throw o}}return!0})}(e,t,n);throw o}})}function jn(e,t,n){return s(this,null,function*(){var l;if("gantt"===U(e)){const l=Fn(e);if(!l.trim())return{fullOk:!1,prefixOk:!1};try{if(yield $n(l,t,n))return l===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:l}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}return{fullOk:!1,prefixOk:!1}}try{if(yield $n(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}let o=Fn(e);if(o&&o.trim()&&o!==e)try{try{const r=yield ne(e,t,null!=(l=null==n?void 0:n.timeoutMs)?l:cn.value.worker,null==n?void 0:n.signal);r&&r.trim()&&(o=r)}catch(r){}if(yield $n(o,t,n))return{fullOk:!1,prefixOk:!0,prefix:o}}catch(r){if("AbortError"===(null==r?void 0:r.name))throw r}return{fullOk:!1,prefixOk:!1}})}const zn=v(()=>bt.value||Tt.value||We.value);function An(){if("none"===i.maxHeight)return null;if(null!=i.maxHeight){const e=Number.parseFloat(String(i.maxHeight));if(Number.isFinite(e))return e}const e=Ve.value;if(e){const t=getComputedStyle(e).getPropertyValue("--ms-size-code-max-height").trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function Hn(e,t){if(!Ve.value||!Ze.value)return;const n=!(null==t?void 0:t.force)&&!1!==i.loading&&ht(),l=Ze.value.querySelector("svg");if(!l)return;let o=0,r=0;const a=l.getAttribute("viewBox"),u=l.getAttribute("width"),s=l.getAttribute("height");if(a){const e=a.split(" ");4===e.length&&(o=Number.parseFloat(e[2]),r=Number.parseFloat(e[3]))}if(o&&r||u&&s&&(o=Number.parseFloat(u),r=Number.parseFloat(s)),Number.isNaN(o)||Number.isNaN(r)||o<=0||r<=0)try{const e=l.getBBox();e&&e.width>0&&e.height>0&&(o=e.width,r=e.height)}catch(c){return void console.error("Failed to get SVG BBox:",c)}if(o>0&&r>0){const t=r/o,a=null!=e?e:Ve.value.clientWidth,u=l.getBoundingClientRect().width,s=u>0?u:a,c=An(),d=s*t,v=null==c?d:Math.min(d,c),m=Math.max(v,vt());Gt.value=`${Math.max(d,m)}px`,n||null!=V(i.estimatedPreviewHeightPx)||(Kt.value=`${m}px`)}}const Ln=d(!1),_n=v(()=>({transform:`translate(${wt.value}px, ${yt.value}px) scale(${pt.value})`}));function Nn(e){"Escape"===e.key&&Ln.value&&In()}function Xn(){var e;if(!Ve.value||!Ue.value)return!1;if("1"===(null==(e=Ue.value.firstElementChild)?void 0:e.getAttribute("data-mermaid-modal-clone")))return!0;const t=Ve.value.cloneNode(!0);t.dataset.mermaidModalClone="1",t.classList.add("fullscreen"),t.style.height="100%",t.style.maxHeight="100%";const n=t.querySelector("[data-mermaid-wrapper]");return n&&(Ke.value=n,n.style.transform=_n.value.transform),ze(Ue.value),Ue.value.appendChild(t),Le(t),!0}function In(){if(Ln.value=!1,Ue.value&&ze(Ue.value),Ke.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(e){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",Nn)}catch(e){}}function Yn(){pt.value<3&&(pt.value+=.1)}function Wn(){pt.value>.5&&(pt.value-=.1)}function qn(){pt.value=1,wt.value=0,yt.value=0}function Vn(e){kt.value=!0,e instanceof MouseEvent?xt.value={x:e.clientX-wt.value,y:e.clientY-yt.value}:xt.value={x:e.touches[0].clientX-wt.value,y:e.touches[0].clientY-yt.value}}function Zn(e){if(!kt.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),wt.value=t-xt.value.x,yt.value=n-xt.value.y}function Un(){kt.value=!1}function Kn(e){if(i.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!Ve.value)return;const t=Ve.value.getBoundingClientRect(),n=e.clientX-t.left,l=e.clientY-t.top,o=n-t.width/2,r=l-t.height/2,a=(o-wt.value)/pt.value,i=(r-yt.value)/pt.value,u=.01,s=-e.deltaY*u,c=Math.min(Math.max(pt.value+s,.5),3);c!==pt.value&&(wt.value=o-a*c,yt.value=r-i*c,pt.value=c)}}function Gn(){return s(this,null,function*(){try{const e=ct.value,t={payload:{type:"copy",text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(c("copy",t),t.defaultPrevented)return;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),Ye.value=!0,setTimeout(()=>{Ye.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})}function Jn(){var e;const t=null==(e=Ze.value)?void 0:e.querySelector("svg");if(!t)return void console.error("SVG element not found");const n=(new XMLSerializer).serializeToString(t),l={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:t,svgString:n};c("export",l),l.defaultPrevented||function(e,t=null){s(this,null,function*(){try{const l=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([l],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(n){}URL.revokeObjectURL(r)}}catch(l){console.error("Failed to export SVG:",l)}})}(t,n)}function Qn(){var e,t;const n=null!=(t=null==(e=Ze.value)?void 0:e.querySelector("svg"))?t:null,l=n?(new XMLSerializer).serializeToString(n):null,o={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:l};c("openModal",o),o.defaultPrevented||function(){if(Ln.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(e){}if("undefined"!=typeof window)try{window.addEventListener("keydown",Nn)}catch(e){}p(()=>{Xn()||p(Xn)})}()}function el(e){const t={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};c("toggleMode",e,t),t.defaultPrevented||tl(e)}function tl(e){return s(this,null,function*(){const t=st.value;if(!t)return Mt.value=!0,void(bt.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",Mt.value=!0,bt.value="source"===e,yield p();const l=t.scrollHeight;t.style.transition="height var(--ms-duration-standard) var(--ms-ease-standard)",t.offsetHeight,t.style.height=`${l}px`;const o=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",r)};function r(){o()}t.addEventListener("transitionend",r),setTimeout(()=>o(),220)})}function nl(e=ct.value,t=(i.isDark?"dark":"light"),n=!1===i.loading){return{code:e,codeWithTheme:dt(t,e),final:n,signature:`${t}\0${e}`,theme:t}}function ll(e){return e.signature===nl().signature}function ol(){return s(this,arguments,function*(e=nl()){const l=Xe;if(!Yt(l)||!ll(e))return!1;if(Tt.value){const t=Ct.value,n=Ot,o=Bt;if(!t)return!1;const r=yield t;return!(!Yt(l)||!ll(e))&&(o===e.signature?!(!r||Pt!==e.signature)||!(!e.final||!1!==i.loading||n)&&ol(e):ol(e))}if(!Ze.value){if(yield p(),!Yt(l))return!1;if(!Ze.value)return console.warn("Mermaid container not ready"),!1}return!(!Yt(l)||!ll(e))&&(Tt.value=!0,Ot=e.final,Bt=e.signature,at(),Ct.value=s(null,null,function*(){var o,r,a,s;try{const c=yield Ie();if(!Yt(l)||!c)return!1;const d=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;Qt.value||en.value||null==(o=c.initialize)||o.call(c,(a=u({},je.value),s={dompurifyConfig:u({},q)},t(a,n(s))));const v=yield Rn(c,d,e.codeWithTheme,cn.value.fullRender);if(!Yt(l)||!function(e){return ll(e)||!e.final&&!1!==i.loading&&ct.value.startsWith(e.code)}(e))return en.value&&(en.value=!1),!1;if(!Ze.value)return!1;const m=Ae(Ze.value,null==v?void 0:v.svg,{keepPreviousOnFailure:!e.final||!1!==i.loading});if(!m)return en.value&&(en.value=!1),!1;const f=null!=(r=null==v?void 0:v.bindFunctions)?r:null;return He=f,Le(m.bindTarget),Qt.value||en.value||(Q(()=>Hn()),Qt.value=!0,un.value={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value}),tn.value[e.theme]={svg:m.svg,bindFunctions:f},en.value&&(en.value=!1),Pt=e.signature,ft.value=Ze.value.innerHTML,rn.value=!1,Nt=0,Zt(),!0}catch(c){if(!Yt(l)||!ll(e))return en.value&&(en.value=!1),!1;const t=xn(c),n=Nt+1;return t&&n<=3?(Nt=n,Ut(Math.min(1200,600*n))):(Nt=0,Zt(),e.final&&!1===i.loading&&console.error("Failed to render mermaid diagram:",c),e.final&&!1===i.loading&&kn(c)),!1}finally{Ot=!1,Bt="",Tt.value=!1,Ct.value=null,Yt(l)&&it()}}),Ct.value)})}function rl(){return s(this,null,function*(){var e;const t=ct.value;if(!t.trim()){if(gt())return;return Ze.value&&ze(Ze.value),ft.value=null,Pt="",void(rn.value=!1)}if(!Se.value||!Wt())return;const n=nl(t);Qt.value&&n.signature===Pt&&(null==(e=Ze.value)?void 0:e.querySelector("svg"))||(yield ol(n))&&(rn.value=!1)})}function al(e,t,n,l){return s(this,null,function*(){const o=Xe;if(!Yt(o)||!Sn())return;if(!Ze.value&&(yield p(),!Yt(o)||!Ze.value))return;if(Tt.value)return;Tt.value=!0,at();const r=nl(t,n),a=s(null,null,function*(){var t;try{const a=yield Ie();if(!Yt(o)||!a)return!1;const u=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,s=Fn(e),c=s&&s.trim()?s:e,d=yield Rn(a,u,En(c,n),cn.value.render);if(!Yt(o)||nn.value!==l||!1===i.loading||!Sn()||!ll(r))return!1;const v=null==d?void 0:d.svg;if(!Ze.value||!v)return!1;const m=Ae(Ze.value,v,{keepPreviousOnFailure:!0});return!!m&&(He=null!=(t=null==d?void 0:d.bindFunctions)?t:null,Le(m.bindTarget),Q(()=>Hn()),!1)}catch(u){return!1}finally{Ct.value===a&&(Tt.value=!1,Ct.value=null),Yt(o)&&it()}});return Ct.value=a,a})}function il(){return s(this,null,function*(){var e;if(!Wt())return;const t=Xe,n=Date.now(),l=++nn.value;at();try{ln&&ln.abort(),ln=new AbortController;const r=ln.signal,a=i.isDark?"dark":"light",u=ct.value;if(!u.trim()){if(gt())return;return Ze.value&&ze(Ze.value),ft.value=null,Pt="",void(rn.value=!1)}if(nl(u,a).signature===Pt)return;try{const e=yield jn(u,a,{signal:r,timeoutMs:cn.value.worker});if(!Yt(t))return;if(e.fullOk){if(r.aborted||nn.value!==l)return;if(!(yield ol(nl(u,a))))return;return void(Yt(t)&&nn.value===l&&(rn.value=!1))}const o=gn&&n<=gn;if(e.prefixOk&&e.prefix&&!r.aborted&&nn.value===l&&Sn()&&!o)return void(yield al(e.prefix,u,a,l))}catch(o){if("AbortError"===(null==o?void 0:o.name))return}if(!Yt(t)||nn.value!==l)return;if(rn.value)return;const s=tn.value[a];if(s&&Ze.value){const t=Ae(Ze.value,s.svg);t&&(He=null!=(e=s.bindFunctions)?e:null,Le(t.bindTarget))}}finally{Yt(t)&&it()}})}function ul(){mn&&(mn=!1,fn=Rt.value,pn=!1,hn&&(hn.abort(),hn=null),dn&&(globalThis.clearTimeout(dn),dn=null),vn&&(It(vn),vn=null),gn=Date.now())}function sl(){if(ul(),qt(),ln){try{ln.abort()}catch(e){}ln=null}if(hn){try{hn.abort()}catch(e){}hn=null}Zt(),Nt=0}function cl(){null==on||on.abort(),on=null}function dl(e=Rt.value){mn&&(wn>=jt.value?ul():(dn&&globalThis.clearTimeout(dn),dn=globalThis.setTimeout(()=>{vn=Xt(()=>s(null,null,function*(){if(!mn)return;if(!Wt())return void ul();if(bt.value||Qt.value)return void ul();const e=i.isDark?"dark":"light",t=ct.value;if(!t.trim())return!1===i.loading?void ul():void dl(fn);if(wn++,wn>jt.value)ul();else{hn&&hn.abort(),hn=new AbortController;try{const n=yield jn(t,e,{signal:hn.signal,timeoutMs:cn.value.worker});if(n.fullOk){if((yield ol(nl(t,e)))&&Qt.value)return void ul()}else n.prefixOk&&n.prefix&&Sn()&&(yield al(n.prefix,t,e,nn.value))}catch(n){}fn=Math.min(Math.floor(1.5*fn),$t.value),dl(fn)}}),{timeout:500})},e)))}function vl(){mn||zt.value&&Se.value&&Wt()&&(bt.value||Qt.value||(mn=!0,gn=0,pn=!0,wn=0,fn=Rt.value,dl(fn)))}function ml(){return s(this,null,function*(){const e=Xe;Yt(e)&&(yield Ie().catch(t=>{Yt(e)&&(Se.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t))}),Yt(e)&&(yield p(),Yt(e)&&(Mt.value||(bt.value=!Se.value),Wt()&&(zt.value?(Vt(),Et.value=ct.value.length):bt.value||rl()))))})}return h(Ue,e=>{Ln.value&&e&&Xn()}),h(_n,e=>{Ln.value&&Ke.value&&(Ke.value.style.transform=e.transform)},{immediate:!0}),h(Tn,e=>{e||Y()}),h(()=>ct.value,e=>{if((e.trim()||!1===i.loading)&&(Qt.value=!1,tn.value={}),!zt.value)return ul(),void(Wt()&&!bt.value&&rl());Wt()&&Vt(),!bt.value&&Se.value&&Wt()?vl():ul(),function(){if(!zt.value)return;if(!bt.value)return;if(!Se.value)return;const e=ct.value.length;e!==Et.value&&(St.value=!0,Et.value=e,At&&clearTimeout(At),At=setTimeout(()=>{St.value&&bt.value&&ct.value.trim()&&(St.value=!1,tl("preview"))},Ft.value))}()}),h(()=>i.isDark,()=>s(null,null,function*(){var e;if(rn.value)return;const t=i.isDark?"dark":"light",n=tn.value[t];if(n){if(Ze.value){const t=Ae(Ze.value,n.svg);t&&(He=null!=(e=n.bindFunctions)?e:null,Le(t.bindTarget))}return}const l={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value},o=1!==pt.value||0!==wt.value||0!==yt.value;en.value=!0,o&&(pt.value=1,wt.value=0,yt.value=0,yield p()),yield ol(),o&&(yield p(),pt.value=l.zoom,wt.value=l.translateX,yt.value=l.translateY,Kt.value=l.containerHeight,un.value=l)})),h(()=>bt.value,e=>s(null,null,function*(){var t;if(e)ul(),Qt.value&&(un.value={zoom:pt.value,translateX:wt.value,translateY:yt.value,containerHeight:Kt.value});else{if(rn.value)return;const e=i.isDark?"dark":"light";if(Qt.value&&tn.value[e]){if(yield p(),Ze.value){const n=tn.value[e],l=Ae(Ze.value,n.svg);l&&(He=null!=(t=n.bindFunctions)?t:null,Le(l.bindTarget))}return pt.value=un.value.zoom,wt.value=un.value.translateX,yt.value=un.value.translateY,void(Kt.value=un.value.containerHeight)}if(yield p(),!Se.value||!Wt())return;if(!zt.value)return ul(),void(yield rl());vl(),yield il()}})),h(()=>i.loading,(e,t)=>s(null,null,function*(){var n;if(e)cl();else if(!0===t){cl();const e=ct.value,t=e.trim();if(!t)return Ze.value&&ze(Ze.value),ft.value=null,Pt="",rn.value=!1,sl();if(!Wt())return void sl();const r=i.isDark?"dark":"light",u=nl(e,r);if(Qt.value&&u.signature===Pt){if(yield p(),Ze.value&&!Ze.value.querySelector("svg")&&tn.value[r]){const e=tn.value[r],t=Ae(Ze.value,e.svg);t&&(He=null!=(n=e.bindFunctions)?n:null,Le(t.bindTarget))}return Hn(void 0,{force:!0}),void sl()}const s=new AbortController;on=s;try{let e=0;for(;;)try{yield $n(t,r,{signal:s.signal,timeoutMs:cn.value.worker});break}catch(l){const t="WORKER_BUSY"===(null==l?void 0:l.code)||"WORKER_TIMEOUT"===(null==l?void 0:l.code),n="WORKER_TIMEOUT"===(null==l?void 0:l.code)?2:8;if(!t||e>=n)throw l;const o=Math.min(50*a(2,e),400);e++,yield yn(()=>new Promise(e=>setTimeout(e,o)),{signal:s.signal})}if(!(yield ol(u)))return;rn.value=!1,sl()}catch(o){if(bn(o))return;sl(),kn(o)}finally{on===s&&(on=null)}}})),h(Ve,e=>{Jt&&Jt.disconnect(),e&&(Jt=new ResizeObserver(e=>{e&&e.length>0&&!bt.value&&!We.value&&Q(()=>{Hn(e[0].contentRect.width)})}),Jt.observe(e))},{immediate:!0}),w(()=>{Fe.value&&!Wt()||ml()}),h(()=>Se.value,e=>{Mt.value||(bt.value=!e)}),h(()=>i.maxHeight,()=>{p(()=>{Hn()})}),h([()=>i.estimatedPreviewHeightPx,()=>ct.value],()=>{Qt.value||ht()||bt.value||(Kt.value=mt(),Gt.value=Kt.value)}),h(()=>Qe.value,e=>s(null,null,function*(){e&&(De.value?(Qt.value||(zt.value?(Vt(),Et.value=ct.value.length):rl()),i.loading||Qt.value||rl(),!bt.value&&Se.value&&zt.value&&vl()):yield ml())}),{immediate:!1}),y(()=>{At&&clearTimeout(At),qt(),Jt&&Jt.disconnect(),ln&&(ln.abort(),ln=null),cl(),ul(),Zt(),ut()}),h(()=>We.value,e=>s(null,null,function*(){e?(ul(),ln&&ln.abort()):Wt()&&!Qt.value&&(yield p(),zt.value?(Vt(),vl()):bt.value||rl())}),{immediate:!1}),(e,t)=>(k(),x("div",{ref_key:"blockContainer",ref:qe,class:b(["mermaid-block-container rounded-lg border overflow-hidden",[{"is-rendering":i.loading,dark:i.isDark}]]),"data-markstream-mermaid":"1","data-markstream-mode":bt.value?"fallback":Qt.value?"preview":"pending","data-markstream-pending":an.value?"true":void 0},[i.showHeader?(k(),x("div",re,[e.$slots["header-left"]?(k(),x("div",ae,[M(e.$slots,"header-left",{},void 0,!0)])):(k(),x("div",ie,[T("span",{class:"icon-slot action-icon shrink-0",innerHTML:C('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />\n</svg>\n')},null,8,ue),t[21]||(t[21]=T("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate"},"Mermaid",-1))])),e.$slots["header-center"]?(k(),x("div",se,[M(e.$slots,"header-center",{},void 0,!0)])):i.showModeToggle&&Se.value?(k(),x("div",ce,[T("button",{class:b(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[bt.value?"":"is-active"]]),onClick:t[0]||(t[0]=()=>el("preview")),onMouseenter:t[1]||(t[1]=e=>Bn(e,C(_e)("common.preview")||"Preview")),onFocus:t[2]||(t[2]=e=>Bn(e,C(_e)("common.preview")||"Preview")),onMouseleave:On,onBlur:On},[T("div",de,[t[22]||(t[22]=T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),T("circle",{cx:"12",cy:"12",r:"3"})])],-1)),T("span",null,B(C(_e)("common.preview")||"Preview"),1)])],34),T("button",{class:b(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[bt.value?"is-active":""]]),onClick:t[3]||(t[3]=()=>el("source")),onMouseenter:t[4]||(t[4]=e=>Bn(e,C(_e)("common.source")||"Source")),onFocus:t[5]||(t[5]=e=>Bn(e,C(_e)("common.source")||"Source")),onMouseleave:On,onBlur:On},[T("div",ve,[t[23]||(t[23]=T("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:"action-icon"},[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),T("span",null,B(C(_e)("common.source")||"Source"),1)])],34)])):O("",!0),e.$slots["header-right"]?(k(),x("div",me,[M(e.$slots,"header-right",{},void 0,!0)])):(k(),x("div",fe,[i.showCollapseButton?(k(),x("button",{key:0,class:b(Ee),"aria-pressed":We.value,onClick:t[6]||(t[6]=e=>We.value=!We.value),onMouseenter:t[7]||(t[7]=e=>Bn(e,We.value?C(_e)("common.expand")||"Expand":C(_e)("common.collapse")||"Collapse")),onFocus:t[8]||(t[8]=e=>Bn(e,We.value?C(_e)("common.expand")||"Expand":C(_e)("common.collapse")||"Collapse")),onMouseleave:On,onBlur:On},[(k(),x("svg",{style:P({rotate:We.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:"action-icon"},[...t[24]||(t[24]=[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,he)):O("",!0),i.showCopyButton?(k(),x("button",{key:1,class:b(Ee),onClick:Gn,onMouseenter:t[9]||(t[9]=e=>Pn(e)),onFocus:t[10]||(t[10]=e=>Pn(e)),onMouseleave:On,onBlur:On},[Ye.value?(k(),x("svg",pe,[...t[26]||(t[26]=[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(k(),x("svg",ge,[...t[25]||(t[25]=[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),T("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):O("",!0),i.showExportButton&&Se.value?(k(),x("button",{key:2,class:b(`${Ee} ${zn.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":C(_e)("common.export")||"Export",disabled:zn.value,onClick:Jn,onMouseenter:t[11]||(t[11]=e=>Bn(e,C(_e)("common.export")||"Export")),onFocus:t[12]||(t[12]=e=>Bn(e,C(_e)("common.export")||"Export")),onMouseleave:On,onBlur:On},[...t[27]||(t[27]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),T("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,we)):O("",!0),i.showFullscreenButton&&Se.value?(k(),x("button",{key:3,class:b(`${Ee} ${zn.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open",disabled:zn.value,onClick:Qn,onMouseenter:t[13]||(t[13]=e=>Bn(e,Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open")),onFocus:t[14]||(t[14]=e=>Bn(e,Ln.value?C(_e)("common.minimize")||"Minimize":C(_e)("common.open")||"Open")),onMouseleave:On,onBlur:On},[Ln.value?(k(),x("svg",xe,[...t[29]||(t[29]=[T("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)])])):(k(),x("svg",ke,[...t[28]||(t[28]=[T("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)])]))],42,ye)):O("",!0)]))])):O("",!0),E(T("div",{ref_key:"modeContainerRef",ref:st},[bt.value?(k(),x("div",be,[T("pre",Me,B(ct.value),1)])):(k(),x("div",Te,[i.showZoomControls?(k(),x("div",Ce,[T("div",Be,[T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yn,onMouseenter:t[15]||(t[15]=e=>Bn(e,C(_e)("common.zoomIn")||"Zoom in")),onFocus:t[16]||(t[16]=e=>Bn(e,C(_e)("common.zoomIn")||"Zoom in")),onMouseleave:On,onBlur:On},[...t[30]||(t[30]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Wn,onMouseenter:t[17]||(t[17]=e=>Bn(e,C(_e)("common.zoomOut")||"Zoom out")),onFocus:t[18]||(t[18]=e=>Bn(e,C(_e)("common.zoomOut")||"Zoom out")),onMouseleave:On,onBlur:On},[...t[31]||(t[31]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:qn,onMouseenter:t[19]||(t[19]=e=>Bn(e,C(_e)("common.resetZoom")||"Reset zoom")),onFocus:t[20]||(t[20]=e=>Bn(e,C(_e)("common.resetZoom")||"Reset zoom")),onMouseleave:On,onBlur:On},B(Math.round(100*pt.value))+"% ",33)])])):O("",!0),T("div",S({ref_key:"mermaidContainer",ref:Ve,class:"mermaid-preview-area relative overflow-hidden block transition-[height] ease-out",style:{height:Kt.value}},D(sn.value,!0),{onMousedown:Vn,onMousemove:Zn,onMouseup:Un,onMouseleave:Un,onTouchstartPassive:Vn,onTouchmovePassive:Zn,onTouchendPassive:Un}),[T("div",{"data-mermaid-wrapper":"",class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":kt.value}]),style:P(_n.value)},[T("div",{ref_key:"mermaidContent",ref:Ze,class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:P({height:Gt.value})},null,4)],6)],16),(k(),F(R,{to:"body"},[T("div",{class:b(["markstream-vue",{dark:i.isDark}])},[$(j,{name:"mermaid-dialog",appear:""},{default:z(()=>[Ln.value?(k(),x("div",{key:0,class:"mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:A(In,["self"])},[T("div",Oe,[T("div",Pe,[T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yn},[...t[32]||(t[32]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Wn},[...t[33]||(t[33]=[T("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:"action-icon"},[T("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[T("circle",{cx:"11",cy:"11",r:"8"}),T("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),T("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:qn},B(Math.round(100*pt.value))+"% ",1),T("button",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:In},[...t[34]||(t[34]=[T("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:"action-icon"},[T("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),T("div",S({ref_key:"modalContent",ref:Ue,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},D(sn.value,!0),{onMousedown:Vn,onMousemove:Zn,onMouseup:Un,onMouseleave:Un,onTouchstartPassive:Vn,onTouchmovePassive:Zn,onTouchendPassive:Un}),null,16)])])):O("",!0)]),_:1})],2)]))]))],512),[[H,!We.value]])],10,oe))}}),[["__scopeId","data-v-0bd32e60"]]);Se.install=e=>{e.component(Se.__name,Se)};export{Se as default};
|
package/dist/index6.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=(e,n,
|
|
1
|
+
var e=(e,n,t)=>new Promise((l,a)=>{var o=e=>{try{u(t.next(e))}catch(n){a(n)}},r=e=>{try{u(t.throw(e))}catch(n){a(n)}},u=e=>e.done?l(e.value):Promise.resolve(e.value).then(o,r);u((t=t.apply(e,n)).next())});import{defineComponent as n,ref as t,inject as l,computed as a,getCurrentInstance as o,watch as r,onMounted as u,onBeforeUnmount as i,openBlock as d,createElementBlock as c,normalizeStyle as v,createVNode as s,Transition as f,withCtx as m,createElementVNode as h,createCommentVNode as g,normalizeClass as k,toDisplayString as p,nextTick as x}from"vue";import{ag as y,an as b,z as _}from"./exports.js";import{M as w}from"./index2.js";import{n as S,f as R,k as T,j as E,b as M,W as O}from"./workers-katexWorkerClient.js";const H=["data-markstream-mode","data-markstream-pending"],K={key:0,class:"math-loading-overlay"},I=["innerHTML"],j={key:1,class:"math-block__fallback text-left"},W=/* @__PURE__ */_(/* @__PURE__ */n({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(n){var _,W;const $=n,z=t(null),A=l(w,null),L=a(()=>S($.node.content)),N=1===(null==(W=null==(_=o())?void 0:_.vnode.el)?void 0:W.nodeType),P=a(()=>y($,{})),B=function(){if(!$.node.content)return{html:"",text:$.node.raw,loading:!1};if($.node.loading)return{html:"",text:"",loading:!0};const e=R();if(!e){const e="undefined"==typeof window||N;return{html:"",text:e?$.node.raw:"",loading:!e}}try{const n=e.renderToString(L.value,{throwOnError:!1,displayMode:!0});return T(L.value,!0,n),{html:n,text:"",loading:!1}}catch(n){return{html:"",text:$.node.loading?"":$.node.raw,loading:$.node.loading}}}(),C=t(B.html),D=t(B.text);let F=!1,U=0,X=!1,q=null;const G=b();let J=null,Q="";const V=t(B.loading),Y=t(!1),Z=t(te());function ee(e){null!=e&&e!==U||(Y.value=!1)}function ne(){var e;if(null==$.indexKey)return"";const n=null!=(e=$.cacheScope)?e:null==G?void 0:G.scope;return`${null!=n&&String(n).length>0?`${String(n)}:`:""}math-block:${String($.indexKey)}`}function te(){var e;const n=ne();return n&&null!=(e=null==G?void 0:G.cache.get(n))?e:0}function le(){if(0===Z.value)return;Z.value=0;const e=ne();e&&(null==G||G.cache.set(e,0))}function ae(e){if(C.value)return void le();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(Z.value,e);if(n===Z.value)return;Z.value=n;const t=ne();t&&(null==G||G.cache.set(t,n))}function oe(){x(()=>{var e,n;ae(null!=(n=null==(e=z.value)?void 0:e.offsetHeight)?n:0)})}function re(){const e=Q;A&&e&&(Q="",A.markSettled(e))}function ue(){return e(this,null,function*(){if(X)return re(),void ee();q&&(q.abort(),q=null);const n=++U;if(!$.node.content)return re(),ee(),V.value=!1,C.value="",D.value=$.node.raw,F=!1,void oe();const t=new AbortController;q=t,Y.value=!0,X||n!==U||t.signal.aborted?X||ee(n):(function(){const e=P.value;A&&e&&Q!==e&&(Q&&A.markSettled(Q),Q=e,A.markPending(e))}(),E(L.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:t.signal}).then(e=>{X||n!==U||(C.value=e,D.value="",F=!0,V.value=!1,le(),oe())}).catch(t=>e(null,null,function*(){if(X||n!==U)return;const e=(null==t?void 0:t.code)||(null==t?void 0:t.name),l="KATEX_DISABLED"===e;if("WORKER_INIT_ERROR"===e||(null==t?void 0:t.fallbackToRenderer)||(e===O||"WORKER_TIMEOUT"===e)&&!$.node.loading){const e=yield M();if(X||n!==U)return;if(e){try{const n=e.renderToString(L.value,{throwOnError:$.node.loading,displayMode:!0});C.value=n,D.value="",F=!0,V.value=!1,le(),oe(),T(L.value,!0,n)}catch(a){}return}}if(l||!$.node.loading)return V.value=!1,C.value="",D.value=$.node.raw,void oe();F||(V.value=!0)})).finally(()=>{X||n!==U||(ee(n),function(){const e=Q;A&&e&&(Q="",x(()=>{var n,t;if(!X){const l=null!=(t=null==(n=z.value)?void 0:n.offsetHeight)?t:0;l>0&&A.reportHeight(e,l)}A.markSettled(e)}))}())}))})}return B.html&&(F=!0),B.html&&le(),r(()=>[$.node.content,$.node.loading,$.node.raw],()=>{ue()},{flush:"post"}),r([()=>$.indexKey,()=>$.cacheScope],()=>{Z.value=te(),oe()}),u(()=>{"undefined"!=typeof ResizeObserver&&z.value&&(J=new ResizeObserver(()=>{var e,n;ae(null!=(n=null==(e=z.value)?void 0:e.offsetHeight)?n:0)}),J.observe(z.value)),oe(),C.value||ue()}),i(()=>{X=!0,re(),q&&(q.abort(),q=null),null==J||J.disconnect(),J=null}),(e,n)=>(d(),c("div",{ref_key:"containerEl",ref:z,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":C.value?"katex":D.value?"fallback":"loading","data-markstream-pending":Y.value?"true":void 0,style:v(Z.value?{minHeight:`${Z.value}px`}:void 0)},[s(f,{name:"math-fade"},{default:m(()=>[!V.value||C.value||D.value?g("",!0):(d(),c("div",K,[...n[0]||(n[0]=[h("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),C.value?(d(),c("div",{key:0,class:k(["math-block__content",{"math-rendering":V.value}]),innerHTML:C.value},null,10,I)):D.value?(d(),c("pre",j,p(D.value),1)):(d(),c("div",{key:2,class:k(["math-block__content",{"math-rendering":V.value}])},null,2))],12,H))}}),[["__scopeId","data-v-7c2a8207"]]);W.install=e=>{e.component(W.__name,W)};export{W as default};
|
package/dist/index7.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=(e,a
|
|
1
|
+
var e=(e,n,a)=>new Promise((l,t)=>{var o=e=>{try{i(a.next(e))}catch(n){t(n)}},r=e=>{try{i(a.throw(e))}catch(n){t(n)}},i=e=>e.done?l(e.value):Promise.resolve(e.value).then(o,r);i((a=a.apply(e,n)).next())});import{defineComponent as n,ref as a,computed as l,getCurrentInstance as t,watch as o,onMounted as r,onBeforeUnmount as i,openBlock as d,createElementBlock as u,toDisplayString as s,createBlock as v,Transition as m,withCtx as c,createElementVNode as p,renderSlot as f,createCommentVNode as g}from"vue";import{n as h,f as k,k as w,j as y,b as _,W as x}from"./workers-katexWorkerClient.js";import{z as T}from"./exports.js";const b=["data-markstream-mode","data-markstream-pending"],E=["innerHTML"],R={key:1,class:"math-inline math-inline--fallback"},I={class:"math-inline__loading",role:"status","aria-live":"polite"},M=/* @__PURE__ */T(/* @__PURE__ */n({__name:"MathInlineNode",props:{node:{}},setup(n){var T,M;const O=n,L=a(null),W=l(()=>"$$"===O.node.markup),j=l(()=>h(O.node.content)),A=1===(null==(M=null==(T=t())?void 0:T.vnode.el)?void 0:M.nodeType),K=function(){if(!O.node.content)return{html:"",text:O.node.loading?"":O.node.raw,loading:O.node.loading};if(O.node.loading)return{html:"",text:"",loading:!0};const e=k();if(!e){const e="undefined"==typeof window||A;return{html:"",text:e?O.node.raw:"",loading:!e}}try{const n=e.renderToString(j.value,{throwOnError:!1,displayMode:W.value});return w(j.value,W.value,n),{html:n,text:"",loading:!1}}catch(n){return{html:"",text:O.node.loading?"":O.node.raw,loading:O.node.loading}}}(),S=a(K.html),$=a(K.text);let C=!1,D=0,H=!1,N=null;const P=a(K.loading),z=a(!1);function B(e){null!=e&&e!==D||(z.value=!1)}function U(){return e(this,null,function*(){if(H)return;N&&(N.abort(),N=null);const n=++D;if(!O.node.content)return B(),S.value="",$.value=O.node.loading?"":O.node.raw,P.value=O.node.loading,void(C=!1);const a=new AbortController;N=a,z.value=!0,H||n!==D||a.signal.aborted?B(n):y(j.value,W.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:a.signal}).then(e=>{H||n!==D||(S.value=e,$.value="",P.value=!1,C=!0)}).catch(a=>e(null,null,function*(){if(H||n!==D)return;const e=(null==a?void 0:a.code)||(null==a?void 0:a.name),l="KATEX_DISABLED"===e;if("WORKER_INIT_ERROR"===e||(null==a?void 0:a.fallbackToRenderer)||(e===x||"WORKER_TIMEOUT"===e)&&!O.node.loading){const e=yield _();if(H||n!==D)return;if(e){try{const n=e.renderToString(j.value,{throwOnError:O.node.loading,displayMode:W.value});S.value=n,$.value="",P.value=!1,C=!0,w(j.value,W.value,n)}catch(t){}return}}if(l||!O.node.loading)return P.value=!1,S.value="",void($.value=O.node.raw);C||(P.value=!0)})).finally(()=>{H||B(n)})})}return K.html&&(C=!0),o(()=>[O.node.content,O.node.loading,O.node.raw,O.node.markup],()=>{U()}),r(()=>{S.value||U()}),i(()=>{H=!0,N&&(N.abort(),N=null)}),(e,n)=>(d(),u("span",{ref_key:"containerEl",ref:L,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":S.value?"katex":$.value?"fallback":"loading","data-markstream-pending":z.value?"true":void 0},[S.value?(d(),u("span",{key:0,class:"math-inline",innerHTML:S.value},null,8,E)):$.value?(d(),u("span",R,s($.value),1)):P.value?(d(),v(m,{key:2,name:"table-node-fade"},{default:c(()=>[p("span",I,[f(e.$slots,"loading",{isLoading:P.value},()=>[n[0]||(n[0]=p("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=p("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):g("",!0)],8,b))}}),[["__scopeId","data-v-6c556261"]]);M.install=e=>{e.component(M.__name,M)};export{M as default};
|
package/dist/tailwind.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.7-beta.
|
|
4
|
+
"version": "1.0.7-beta.3",
|
|
5
5
|
"description": "Vue/Nuxt streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, long documents, Mermaid, KaTeX, Shiki, and Monaco.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"dependencies": {
|
|
147
147
|
"@chenglou/pretext": "^0.0.8",
|
|
148
148
|
"@floating-ui/dom": "^1.8.0",
|
|
149
|
-
"stream-markdown-parser": "1.1.
|
|
149
|
+
"stream-markdown-parser": "1.1.3",
|
|
150
150
|
"markstream-core": "1.0.3"
|
|
151
151
|
},
|
|
152
152
|
"devDependencies": {
|