import{d as qn,U as H,T as $,bk as yt,f as g,c as Ve,a as z,cv as Vn,o as N,h as S,p as Z,aq as zn,b as c,s as Se,bn as cn,t as Ee,a4 as wt,ar as Tn,a6 as Le,bM as bt,W as kt,bd as xt,bq as Ct,aB as Me}from"./index-DSCno0m2.js";import{d as In,f as Yn,T as vn,x as St,R as ee,c as Rn,C as $n,a as fn,b as Mt,$ as Bt,N as Ot,W as jn,z as Et,p as Lt}from"./index-3OlSoxmB.js";import"./chatbot-Dfd2mpvB.js";import"./FormItem-CHgZe7qM.js";import"./Alert-Cm6VlYYh.js";import"./Flex-CK9o7tXW.js";import"./get-slot-Bk_rJcZu.js";import"./assistant-Vu8dw-ko.js";var Pt=Object.defineProperty,Ht=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,Un=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,Wn=(M,y,B)=>y in M?Pt(M,y,{enumerable:!0,configurable:!0,writable:!0,value:B}):M[y]=B,j=(M,y)=>{for(var B in y||(y={}))Dt.call(y,B)&&Wn(M,B,y[B]);if(Un)for(var B of Un(y))Ft.call(y,B)&&Wn(M,B,y[B]);return M},_e=(M,y)=>Ht(M,Nt(y)),U=(M,y,B)=>new Promise((a,le)=>{var W=v=>{try{p(B.next(v))}catch(ue){le(ue)}},O=v=>{try{p(B.throw(v))}catch(ue){le(ue)}},p=v=>v.done?a(v.value):Promise.resolve(v.value).then(W,O);p((B=B.apply(M,y)).next())});const _t={class:"markstream-vue"},zt={class:"html-preview-frame__header"},Tt={class:"html-preview-frame__title"},Rt={class:"html-preview-frame__label"},$t=["srcdoc"],jt=In(qn({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(M){const y=M,{t:B}=Yn(),a=g(()=>{const W=y.code||"",O=W.trim().toLowerCase();return O.startsWith("<!doctype")||O.startsWith("<html")||O.startsWith("<body")?W:`<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style>
      html, body {
        margin: 0;
        padding: 0;
        height: 100%;
        background-color: ${y.isDark?"#020617":"#ffffff"};
        color: ${y.isDark?"#e5e7eb":"#020617"};
      }
      body {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;
      }
    </style>
  </head>
  <body>
    ${W}
  </body>
</html>`});function le(W){var O;W.key!=="Escape"&&W.key!=="Esc"||(O=y.onClose)==null||O.call(y)}return kt(()=>{typeof window<"u"&&window.addEventListener("keydown",le)}),Vn(()=>{typeof window<"u"&&window.removeEventListener("keydown",le)}),(W,O)=>(N(),Ve(Ct,{to:"body"},[c("div",_t,[c("div",{class:Le(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":y.isDark}]),onClick:O[2]||(O[2]=p=>{var v;return(v=y.onClose)==null?void 0:v.call(y)})},[c("div",{class:Le(["html-preview-frame",{"html-preview-frame--dark":y.isDark}]),onClick:O[1]||(O[1]=xt(()=>{},["stop"]))},[c("div",zt,[c("div",Tt,[O[3]||(O[3]=c("span",{class:"html-preview-frame__dot"},null,-1)),c("span",Rt,Ee(y.title||S(B)("common.preview")||"Preview"),1)]),c("button",{type:"button",class:Le(["html-preview-frame__close",{"html-preview-frame__close--dark":y.isDark}]),onClick:O[0]||(O[0]=p=>{var v;return(v=y.onClose)==null?void 0:v.call(y)})}," × ",2)]),c("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:a.value},null,8,$t)],2)],2)])]))}}),[["__scopeId","data-v-296dd89d"]]);let Be=null,mn=null,ze=null,Oe=null,pn=null,hn=null;const gn=new WeakMap;let Ut=0;const Wt=["data-markstream-enhanced"],At={class:"code-header-main"},qt=["innerHTML"],Vt={class:"code-header-copy"},It={class:"code-header-title"},Yt={key:0,class:"code-header-caption"},Xt={class:"code-header-actions"},Gt=["aria-label"],Jt={class:"code-diff-stat removed"},Kt={class:"code-diff-stat added"},Qt=["aria-pressed"],Zt=["disabled"],el=["disabled"],nl=["disabled"],tl=["aria-label"],ll={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"},ol={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"},il=["aria-pressed"],al={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"},rl={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"},ul=["aria-label"],sl={class:"code-editor-layer"},dl={class:"sr-only","aria-live":"polite",role:"status"},An="__markstreamMonacoPassiveTouch__",wl=In(qn({__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(M,{emit:y}){var B;const a=M,le=y,W=bt(),O=g(()=>{const n=W?.vnode.props;return!(!n||!n.onPreviewCode&&!n.onPreviewCode)}),{t:p}=Yn(),v=H(null),ue=H(null),fe=H(!1),J=H(vn(a.node.language)),oe=g(()=>Mt(J.value)),yn=g(()=>oe.value==="plaintext"),P=H(!1),D=H(!1),A=H(!1),Y=H(!1),Pe=H(!1);let T=!1,me=null;const se=H(null);let Ie=0;const Xn=St(),He=H(null),X=H(typeof window>"u");typeof window<"u"&&$(()=>ue.value,n=>{var e;if((e=He.value)==null||e.destroy(),He.value=null,!n)return void(X.value=!1);const t=Xn(n,{rootMargin:"400px"});He.value=t,X.value=t.isVisible.value,t.whenVisible.then(()=>{X.value=!0})},{immediate:!0}),yt(()=>{var n;T=!0,(n=He.value)==null||n.destroy(),He.value=null});let q=null,Te=null,Re=()=>{},Ye=()=>{},$e=()=>null,G=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),R=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Xe=()=>{},pe=()=>{},Ge=()=>{},ie=null,wn=()=>{var n;return String((n=a.node.language)!=null?n:"plaintext")},Je=()=>U(null,null,function*(){});const he=[],Ke=[];let ne=null;const w=g(()=>a.node.diff),ae=H({removed:0,added:0}),Gn=g(()=>`-${ae.value.removed} +${ae.value.added}`),Qe=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function bn(n){var e;if(typeof n=="boolean")return n;if(n&&typeof n=="object"){const t=n;return _e(j(j({},Qe),t),{enabled:(e=t.enabled)==null||e})}return j({},Qe)}const K=g(()=>{var n;const e=a.monacoOptions?j({},a.monacoOptions):{};if(!w.value)return e;const t=e.diffHideUnchangedRegions===void 0?j({},Qe):bn(e.diffHideUnchangedRegions),l=e.hideUnchangedRegions===void 0?void 0:bn(e.hideUnchangedRegions),o=(n=e.diffUnchangedRegionStyle)!=null?n:"line-info";return _e(j(j(j({},{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:o==="line-info"||o==="line-info-basic"||o==="metadata"?22:14},diffHideUnchangedRegions:t,diffLineStyle:"background",diffAppearance:"auto",diffUnchangedRegionStyle:o,diffHunkActionsOnHover:!0,diffHunkHoverHideDelayMs:160}),e),l===void 0?{}:{hideUnchangedRegions:l}),{diffHideUnchangedRegions:t})}),kn=g(()=>w.value?"diff":"single"),Jn=H(kn.value),Ne=H(!1),Kn=g(()=>{var n;const e=(n=a.monacoOptions)==null?void 0:n.wordWrap;return e==null||String(e)!=="off"}),xn=g(()=>!Ne.value&&!Y.value),je=H(!1);typeof window<"u"&&U(null,null,function*(){try{const n=yield Lt();if(T)return;if(!n)return void(Ne.value=!0);const e=n.useMonaco,t=n.detectLanguage;if(typeof t=="function"&&(wn=t),typeof e=="function"){const l=Fe();if(l&&a.themes&&Array.isArray(a.themes)&&!a.themes.includes(l))throw new Error("Preferred theme not in provided themes array");ne=_n();const o=e(ne);q=o.createEditor||q,Te=o.createDiffEditor||Te,Re=o.updateCode||Re,Ye=o.updateDiff||Ye,$e=o.getEditor||$e,G=o.getEditorView||G,R=o.getDiffEditorView||R,Xe=o.cleanupEditor||Xe,pe=o.safeClean||o.cleanupEditor||pe,Ge=o.refreshDiffPresentation||Ge,Je=o.setTheme||Je,Pe.value=!0,!T&&v.value&&(yield ve(v.value))}}catch{if(T)return;Ne.value=!0}});const V=H(typeof((B=a.monacoOptions)==null?void 0:B.fontSize)=="number"?a.monacoOptions.fontSize:Number.NaN),x=H(V.value),Qn=g(()=>{const n=V.value,e=x.value;return typeof n=="number"&&Number.isFinite(n)&&n>0&&typeof e=="number"&&Number.isFinite(e)&&e>0}),Cn=g(()=>{var n;const e=(n=a.monacoOptions)==null?void 0:n.fontSize;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const t=x.value;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:12}),Zn=g(()=>{var n;const e=(n=a.monacoOptions)==null?void 0:n.lineHeight;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Math.round(1.5*Cn.value)}),et=g(()=>{var n;const e=(n=a.monacoOptions)==null?void 0:n.tabSize;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:4}),ge=g(()=>{const n=a.estimatedContentHeightPx;return typeof n=="number"&&Number.isFinite(n)&&n>0?Math.round(n):null}),nt=g(()=>{var n;const e=(n=a.monacoOptions)==null?void 0:n.fontFamily;return j(j({fontSize:`${Cn.value}px`,lineHeight:`${Zn.value}px`,tabSize:et.value},ge.value!=null?{minHeight:`${ge.value}px`}:{}),typeof e=="string"&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})}),tt=g(()=>ge.value!=null&&!Y.value),lt=g(()=>{if(tt.value)return{minHeight:`${ge.value}px`}}),ot=g(()=>{if(ge.value!=null)return{minHeight:`${ge.value}px`}});function Sn(){var n,e,t,l,o;try{const i=w.value?(t=(e=(n=R())==null?void 0:n.getModifiedEditor)==null?void 0:e.call(n))!=null?t:R():G(),r=$e(),u=(l=r?.EditorOption)==null?void 0:l.fontInfo;if(i&&u!=null){const d=(o=i.getOption)==null?void 0:o.call(i,u),s=d?.fontSize;if(typeof s=="number"&&Number.isFinite(s)&&s>0)return s}}catch{}try{const i=v.value;if(i){const r=i.querySelector(".view-lines .view-line");if(r)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const u=window.getComputedStyle(r).fontSize,d=u&&u.match(/^(\d+(?:\.\d+)?)/);if(d)return Number.parseFloat(d[1])}}catch{}}}catch{}return null}function Ze(n){var e,t;try{const i=$e(),r=(e=i?.EditorOption)==null?void 0:e.lineHeight;if(r!=null){const u=(t=n?.getOption)==null?void 0:t.call(n,r);if(typeof u=="number"&&u>0)return u}}catch{}const l=(function(){try{const i=v.value;if(!i)return null;const r=i.querySelector(".view-lines .view-line");if(r){const u=Math.ceil(r.getBoundingClientRect().height);if(u>0)return u}}catch{}return null})();if(l&&l>0)return l;const o=Number.isFinite(x.value)&&x.value>0?x.value:12;return Math.max(12,Math.round(1.35*o))}function Mn(n,e){return typeof n!="number"||typeof e!="number"||n<1||e<n?0:e-n+1}function Bn(n){if(!n)return[];const e=n.split(/\r?\n/);return e.length===1&&e[0]===""?[]:e}function en(){var n,e;w.value?ae.value=(function(t,l){const o=Bn(t),i=Bn(l);let r=0,u=o.length-1,d=i.length-1;for(;r<=u&&r<=d&&o[r]===i[r];)r++;for(;u>=r&&d>=r&&o[u]===i[d];)u--,d--;return{removed:Math.max(0,u-r+1),added:Math.max(0,d-r+1)}})(String((n=a.node.originalCode)!=null?n:""),String((e=a.node.updatedCode)!=null?e:"")):ae.value={removed:0,added:0}}function nn(){var n;if(w.value)try{const e=R(),t=(n=e?.getLineChanges)==null?void 0:n.call(e);if(!Array.isArray(t))return void en();let l=0,o=0;for(const i of t)l+=Mn(i.originalStartLineNumber,i.originalEndLineNumber),o+=Mn(i.modifiedStartLineNumber,i.modifiedEndLineNumber);ae.value={removed:l,added:o}}catch{en()}else ae.value={removed:0,added:0}}function tn(){var n;if(Number.isFinite(x.value)&&x.value>0&&Number.isFinite(V.value))return x.value;const e=Sn();return typeof((n=a.monacoOptions)==null?void 0:n.fontSize)=="number"?(V.value=a.monacoOptions.fontSize,x.value=a.monacoOptions.fontSize,x.value):e&&e>0?(V.value=e,x.value=e,e):(V.value=12,x.value=12,12)}function On(){var n,e,t,l,o,i,r,u,d,s,m,E,b,f;try{const C=w.value?R():null,h=w.value?C:G();if(!h)return null;if(C?.getOriginalEditor&&C?.getModifiedEditor){const L=(n=C.getOriginalEditor)==null?void 0:n.call(C),_=(e=C.getModifiedEditor)==null?void 0:e.call(C);(t=L?.layout)==null||t.call(L),(l=_?.layout)==null||l.call(_);const Ae=((o=L?.getContentHeight)==null?void 0:o.call(L))||0,dn=((i=_?.getContentHeight)==null?void 0:i.call(_))||0,qe=Math.max(Ae,dn);if(qe>0)return Math.ceil(qe+1);const xe=((d=(u=(r=L?.getModel)==null?void 0:r.call(L))==null?void 0:u.getLineCount)==null?void 0:d.call(u))||1,Ce=((E=(m=(s=_?.getModel)==null?void 0:s.call(_))==null?void 0:m.getLineCount)==null?void 0:E.call(m))||1,ht=Math.max(xe,Ce),gt=Math.max(Ze(L),Ze(_));return Math.ceil(ht*(gt+1.5)+0+1)}if(h?.getContentHeight){(b=h?.layout)==null||b.call(h);const L=h.getContentHeight();if(L>0)return Math.ceil(L+1)}const k=(f=h?.getModel)==null?void 0:f.call(h);let re=1;k&&typeof k.getLineCount=="function"&&(re=k.getLineCount());const Q=Ze(h);return Math.ceil(re*(Q+1.5)+0+1)}catch{return null}}function En(n){const e=String(n??"").match(/\d+(?:\.\d+)?/g);if(!e||e.length<3)return null;const[t,l,o]=e.slice(0,3).map(Number);return .2126*t+.7152*l+.0722*o}function ln(){var n,e,t,l,o,i,r,u;const d=v.value,s=ue.value;if(!d||!s)return;if(w.value)return s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--vscode-editor-background"),void s.style.removeProperty("--vscode-editor-selectionBackground");const m=d.querySelector(".monaco-editor")||d,E=m.querySelector(".monaco-editor-background")||m,b=m.querySelector(".view-lines")||m;let f=null,C=null,h=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(f=window.getComputedStyle(m),C=E===m?f:window.getComputedStyle(E),h=b===m?f:window.getComputedStyle(b))}catch{f=null,C=null,h=null}const k=String((n=f?.getPropertyValue("--vscode-editor-foreground"))!=null?n:"").trim(),re=String((e=f?.getPropertyValue("--vscode-editor-background"))!=null?e:"").trim(),Q=String((l=(t=f?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?t:f?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?l:"").trim(),L=k||String((i=(o=h?.color)!=null?o:f?.color)!=null?i:"").trim(),_=re||String((u=(r=C?.backgroundColor)!=null?r:f?.backgroundColor)!=null?u:"").trim();if((function(Ae,dn,qe){if(!yn.value)return!1;const xe=En(Ae),Ce=En(dn);return qe?xe!=null&&xe>170||Ce!=null&&Ce<110:xe!=null&&xe<85||Ce!=null&&Ce>190})(_,L,s.classList.contains("is-dark")))return s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--vscode-editor-background"),void s.style.removeProperty("--vscode-editor-selectionBackground");L&&s.style.setProperty("--vscode-editor-foreground",L),_&&s.style.setProperty("--vscode-editor-background",_),Q&&s.style.setProperty("--vscode-editor-selectionBackground",Q)}const Ln=/auto|scroll|overlay/i;function de(n,e,t){var l;if(typeof window>"u")return;const o=Math.ceil(e),i=Math.ceil(t)-o;if(!i)return;const r=(function(m){var E,b;if(typeof window>"u")return null;const f=(E=m?.ownerDocument)!=null?E:document,C=f.scrollingElement||f.documentElement||f.body;let h=(b=m?.parentElement)!=null?b:null;for(;h&&h!==f.body&&h!==C;){const k=window.getComputedStyle(h),re=(k.overflowY||"").toLowerCase(),Q=(k.overflow||"").toLowerCase();if(Ln.test(re)||Ln.test(Q))return h;h=h.parentElement}return C})(n);if(!r)return;const u=(l=n.ownerDocument)!=null?l:document,d=r===u.body||r===u.documentElement||r===u.scrollingElement,s=d?0:r.getBoundingClientRect().top;n.getBoundingClientRect().top-s>=0||(d&&typeof window.scrollBy=="function"?window.scrollBy(0,i):r.scrollTop+=i)}function te(){try{const n=v.value;if(!n)return;const e=n.getBoundingClientRect().height,t=On();if(t!=null&&t>0){const l=Math.ceil(t);n.style.minHeight="0px",n.style.height=`${l}px`,n.style.maxHeight="none",n.style.overflow="visible",de(n,e,l)}}catch{}}function ye(){for(var n,e;he.length>0;)try{(e=(n=he.pop())==null?void 0:n.dispose)==null||e.call(n)}catch{}me!=null&&(Et(me),me=null)}function we(){for(var n;Ke.length>0;)try{(n=Ke.pop())==null||n()}catch{}}function Pn(){if(we(),!w.value)return;const n=v.value;if(!n)return;const e=n.querySelector(".monaco-diff-editor");if(!e||e.classList.contains("side-by-side"))return;const t=Array.from(e.querySelectorAll(".editor.original .diff-hidden-lines")),l=Array.from(e.querySelectorAll(".editor.modified .diff-hidden-lines")),o=Math.min(t.length,l.length);for(let i=0;i<o;i++){const r=t[i],u=l[i].querySelector("a"),d=r.querySelector(".center > div:first-child");if(!u||!d)continue;const s=document.createElement("button");s.type="button",s.className="markstream-inline-fold-proxy";const m=u.getAttribute("title")||"Show Unchanged Region";s.title=m,s.setAttribute("aria-label",m);const E=u.querySelector(".codicon"),b=document.createElement("span");b.className=E?.className||"codicon codicon-unfold",s.append(b);const f=k=>{k.preventDefault(),k.stopPropagation()},C=k=>{k.preventDefault(),k.stopPropagation(),u.click()},h=k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),k.stopPropagation(),u.click())};s.addEventListener("mousedown",f),s.addEventListener("click",C),s.addEventListener("keydown",h),d.replaceChildren(s),Ke.push(()=>{s.removeEventListener("mousedown",f),s.removeEventListener("click",C),s.removeEventListener("keydown",h),d.contains(s)&&d.replaceChildren()})}}function be(){me==null&&(me=ee(()=>{me=null,ee(()=>{Pn(),D.value||(P.value?te():ce())})}))}function ke(n,e,t){const l=Math.min(e,t),o=e>t+1;return n.style.minHeight="0px",n.style.height=`${Math.ceil(l)}px`,n.style.maxHeight=`${Math.ceil(t)}px`,n.style.overflow=o?"auto":"hidden",Math.ceil(l)}function ce(){var n;try{const e=v.value;if(!e)return;const t=e.getBoundingClientRect().height,l=(function(){var u,d;const s=(d=(u=a.monacoOptions)==null?void 0:u.MAX_HEIGHT)!=null?d:500;if(typeof s=="number")return s;const m=String(s).match(/^(\d+(?:\.\d+)?)/);return m?Number.parseFloat(m[1]):500})();if(Ie>0&&(Ie--,se.value!=null))return void de(e,t,ke(e,se.value,l));const o=On();if(o!=null&&o>0)return void de(e,t,ke(e,o,l));if(se.value!=null)return void de(e,t,ke(e,se.value,l));const i=Math.ceil(((n=e.getBoundingClientRect)==null?void 0:n.call(e).height)||0);if(i>0)return void de(e,t,ke(e,i,l));const r=Number.parseFloat(e.style.height);!Number.isNaN(r)&&r>0?de(e,t,ke(e,r,l)):de(e,t,ke(e,l,l))}catch{}}const on=g(()=>a.isShowPreview&&(J.value==="html"||J.value==="svg"));$(()=>a.node.language,n=>{J.value=vn(n)}),$(()=>[a.node.originalCode,a.node.updatedCode,w.value],()=>{en(),ee(()=>nn())},{immediate:!0}),$(()=>[a.node.originalCode,a.node.updatedCode,oe.value,w.value],n=>U(null,[n],function*([e,t,l,o]){if(a.stream!==!1&&o){if(q&&!A.value&&v.value)try{yield ve(v.value)}catch{}Ye(String(e??""),String(t??""),oe.value),P.value&&ee(()=>te())}})),$(()=>a.node.code,n=>U(null,null,function*(){if(a.stream!==!1&&(J.value||(J.value=vn(wn(n))),!w.value)){if(q&&!A.value&&v.value)try{yield ve(v.value)}catch{}Re(n,oe.value),P.value&&ee(()=>te())}}));const an=g(()=>{const n=J.value;return n?jn[n]||n.charAt(0).toUpperCase()+n.slice(1):jn[""]}),Hn=g(()=>{var n;return(function(e){const t=(function(i){var r,u;const d=(u=(r=String(i??"").split(/\r?\n/,1)[0])==null?void 0:r.trim())!=null?u:"";if(d.length<3)return"";const s=d[0];if(s!=="`"&&s!=="~"||d[1]!==s||d[2]!==s)return"";let m=3;for(;d[m]===s;)m+=1;return d.slice(m).trim()})(e);if(!t)return"";const l=t.split(/\s+/).filter(Boolean);if(!l.length)return"";const o=l[0]==="diff"?l.slice(1):l;for(const i of o){const r=i.includes(":")?i.slice(i.indexOf(":")+1):i;if(r&&/[./\\-]/.test(r))return r}return""})(String((n=a.node.raw)!=null?n:""))}),it=g(()=>Hn.value||an.value),Nn=g(()=>Hn.value?w.value?`Diff / ${an.value}`:an.value:""),at=g(()=>(Ot.value,Bt(J.value||""))),rt=g(()=>{const n={},e=o=>{if(o!=null)return typeof o=="number"?`${o}px`:String(o)},t=e(a.minWidth),l=e(a.maxWidth);return t&&(n.minWidth=t),l&&(n.maxWidth=l),w.value?(n.color="var(--markstream-diff-shell-fg)",n.borderColor="var(--markstream-diff-shell-border)"):(n.color="var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))",n.backgroundColor="var(--vscode-editor-background, var(--markstream-code-fallback-bg))",n.borderColor="var(--markstream-code-border-color)"),n}),ut=g(()=>{if(!w.value)return{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))",backgroundColor:"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}}),De=g(()=>a.showTooltips!==!1);function st(){return U(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(a.node.code)),fe.value=!0,le("copy",a.node.code),setTimeout(()=>{fe.value=!1},1e3)}catch(n){console.error("复制失败:",n)}})}function rn(n){const e=n.currentTarget||n.target;return!e||e.disabled?null:e}function I(n,e,t="top"){if(!De.value)return;const l=rn(n);if(!l)return;const o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;fn(l,e,t,!1,i,a.isDark)}function F(){De.value&&Rn()}function Dn(n){if(!De.value)return;const e=rn(n);if(!e)return;const t=fe.value?p("common.copied")||"Copied":p("common.copy")||"Copy",l=n,o=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;fn(e,t,"top",!1,o,a.isDark)}function dt(){var n,e,t;if(D.value=!D.value,D.value){if(v.value){const l=Math.ceil(((e=(n=v.value).getBoundingClientRect)==null?void 0:e.call(n).height)||0);l>0&&(se.value=l)}Ue(!1)}else{P.value&&Ue(!0),v.value&&se.value!=null&&(v.value.style.height=`${se.value}px`);const l=w.value?R():G();try{(t=l?.layout)==null||t.call(l)}catch{}Ie=2,ee(()=>{P.value?te():ce()})}}function ct(){if(!on.value)return;const n=J.value;if(O.value){const e=n==="html"?"text/html":"image/svg+xml",t=n==="html"?p("artifacts.htmlPreviewTitle")||"HTML Preview":p("artifacts.svgPreviewTitle")||"SVG Preview";return void le("previewCode",{node:a.node,artifactType:e,artifactTitle:t,id:`temp-${n}-${Date.now()}`})}n==="html"&&(je.value=!je.value)}function Ue(n){var e,t;try{if(w.value){const l=R();(e=l?.updateOptions)==null||e.call(l,{automaticLayout:n})}else{const l=G();(t=l?.updateOptions)==null||t.call(l,{automaticLayout:n})}}catch{}}function ve(n){if(!q||T)return null;if((function(){var t;try{const l=window;if(l[An])return;const o=(t=window.Element)==null?void 0:t.prototype,i=o?.addEventListener;if(!o||!i)return;o.addEventListener=function(r,u,d){return r==="touchstart"&&(function(s,m){if(!s)return!1;const E=s;return!(typeof E.closest!="function"||!E.closest(".monaco-editor, .monaco-diff-editor")||m&&typeof m=="object"&&"passive"in m)})(this,d)?i.call(this,r,u,(function(s){return s==null?{passive:!0}:typeof s=="boolean"?{capture:s,passive:!0}:typeof s=="object"?"passive"in s?s:_e(j({},s),{passive:!0}):{passive:!0}})(d)):i.call(this,r,u,d)},l[An]=!0}catch{}})(),ie)return ie;if(A.value&&Y.value)return Promise.resolve();A.value=!0;const e=U(null,null,function*(){yield(function(t){return U(this,null,function*(){var l,o,i;if(!q||T||(ye(),we(),(function(u){u.replaceChildren()})(t),T)||(w.value?(pe(),Te?yield Te(t,String((l=a.node.originalCode)!=null?l:""),String((o=a.node.updatedCode)!=null?o:""),oe.value):yield q(t,a.node.code,oe.value)):yield q(t,a.node.code,oe.value),T))return;const r=w.value?R():G();if(typeof((i=a.monacoOptions)==null?void 0:i.fontSize)=="number")r?.updateOptions({fontSize:a.monacoOptions.fontSize,automaticLayout:!1}),V.value=a.monacoOptions.fontSize,x.value=a.monacoOptions.fontSize;else{const u=Sn();u&&u>0?(V.value=u,x.value=u):(V.value=12,x.value=12)}if(P.value||D.value||ce(),a.loading===!1){if(yield Me(),T)return;ee(()=>{T||(P.value&&!D.value?te():D.value||ce())})}yield Me(),T||(Y.value=!0,(function(){var u,d,s,m,E;if(ye(),w.value){const b=R(),f=(u=b?.getOriginalEditor)==null?void 0:u.call(b),C=(d=b?.getModifiedEditor)==null?void 0:d.call(b),h=(k,re)=>{try{const Q=k?.[re];if(typeof Q!="function")return;const L=Q.call(k,()=>be());L&&he.push(L)}catch{}};try{const k=(s=b?.onDidUpdateDiff)==null?void 0:s.call(b,()=>{be(),ee(()=>nn())});k&&he.push(k)}catch{}h(f,"onDidContentSizeChange"),h(C,"onDidContentSizeChange"),h(f,"onDidLayoutChange"),h(C,"onDidLayoutChange")}else{const b=G();try{const f=(m=b?.onDidContentSizeChange)==null?void 0:m.call(b,()=>be());f&&he.push(f)}catch{}try{const f=(E=b?.onDidLayoutChange)==null?void 0:E.call(b,()=>be());f&&he.push(f)}catch{}}})(),ln(),Pn(),nn(),be())})})(n)}).finally(()=>{ie===e&&(ie=null)});return ie=e,e}$(De,n=>{n||Rn()}),$(()=>x.value,(n,e)=>{const t=w.value?R():G();t&&typeof n=="number"&&Number.isFinite(n)&&n>0&&(t.updateOptions({fontSize:n}),P.value&&!D.value&&te())},{flush:"post",immediate:!1});const vt=$(()=>[v.value,w.value,a.stream,a.loading,Pe.value,X.value],n=>U(null,[n],function*([e,t,l,o,i,r]){if(!e||!q||!r||l===!1&&o!==!1)return;const u=ve(e);if(u){try{yield u}catch{Y.value=!1}vt()}}));function We(n){return typeof n=="string"?n:n&&typeof n=="object"&&"name"in n?String(n.name):null}function Fe(){var n;const e=a.isDark?a.darkTheme:a.lightTheme,t=(n=K.value)==null?void 0:n.theme,l=e??t,o=Array.isArray(a.themes)?a.themes:[];if(!o.length||l==null)return l;const i=We(l),r=o.map(d=>We(d)).filter(d=>!!d);if(!i||r.includes(i))return l;const u=We(t);return t!=null&&u&&r.includes(u)?t:o[0]}$(kn,(n,e)=>U(null,null,function*(){if(n===e||(Jn.value=n,!q||!v.value)||!A.value||a.stream===!1&&a.loading!==!1||!X.value)return;const t=ie;if(t){try{yield t}catch{}if(T||!v.value)return}try{Y.value=!1,A.value=!1,ye(),we(),pe(),yield Me(),yield ve(v.value)}catch{Y.value=!1}}));const Fn=g(()=>(function(n){var e;const t=((e=We(n))!=null?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(l=>t.includes(l))&&!["light","latte","dawn","lotus"].some(l=>t.includes(l)):!!a.isDark})(Fe())),un=g(()=>{var n;if(!w.value)return Fn.value?"dark":"light";const e=(n=K.value)==null?void 0:n.diffAppearance;return e==="light"||e==="dark"?e:a.isDark?"dark":"light"}),ft=g(()=>w.value?un.value==="dark":Fn.value);function _n(){return _e(j(_e(j({wordWrap:"on",wrappingIndent:"same",themes:a.themes},K.value||{}),{theme:Fe()}),w.value?{diffAppearance:un.value}:{}),{onThemeChange(){ln()}})}function sn(){const n=_n();if(!ne)return ne=n,ne;for(const e of Object.keys(ne))e in n||delete ne[e];return Object.assign(ne,n),ne}const mt=g(()=>{var n,e,t,l,o,i,r,u,d,s,m,E,b,f;return JSON.stringify({diffLineStyle:(e=(n=K.value)==null?void 0:n.diffLineStyle)!=null?e:"background",diffUnchangedRegionStyle:(l=(t=K.value)==null?void 0:t.diffUnchangedRegionStyle)!=null?l:"line-info",diffHideUnchangedRegions:(i=(o=K.value)==null?void 0:o.diffHideUnchangedRegions)==null||i,renderSideBySide:(u=(r=K.value)==null?void 0:r.renderSideBySide)==null||u,enableSplitViewResizing:(s=(d=K.value)==null?void 0:d.enableSplitViewResizing)==null||s,ignoreTrimWhitespace:(E=(m=K.value)==null?void 0:m.ignoreTrimWhitespace)==null||E,originalEditable:(f=(b=K.value)==null?void 0:b.originalEditable)!=null&&f})});$(()=>[a.monacoOptions,X.value],()=>{var n,e;if(sn(),!q||!X.value)return;const t=w.value?R():G(),l=typeof((n=a.monacoOptions)==null?void 0:n.fontSize)=="number"?a.monacoOptions.fontSize:Number.isFinite(x.value)?x.value:void 0;typeof l=="number"&&Number.isFinite(l)&&l>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:l})),P.value&&!D.value?te():D.value||ce()},{deep:!0}),$(()=>[Fe(),un.value,Pe.value,A.value,X.value],()=>{Pe.value&&A.value&&X.value&&(function(){sn();const n=Fe(),e=()=>{w.value&&Ge(),ee(()=>{ln(),be()})};n?(function(t,l){const o=(function(i){if(i==null)return null;if(typeof i=="string")return i;if(typeof i=="object"&&"name"in i)return String(i.name);if(typeof i=="object"){const r=gn.get(i);if(r)return r;try{const d=JSON.stringify(i);if(d)return gn.set(i,d),d}catch{}const u="__theme_"+ ++Ut;return gn.set(i,u),u}return String(i)})(l);return o?(hn=t,Be||pn!==o?Be?(Oe===o||mn===o||(ze=l,Oe=o),Be):(ze=l,Oe=o,Be=U(null,null,function*(){for(;Oe&&ze!=null;){const i=ze,r=Oe;if(ze=null,Oe=null,pn!==r)try{mn=r,yield(hn??t)(i),pn=r}catch{}}}).finally(()=>{Be=null,mn=null}),Be):Promise.resolve()):Promise.resolve()})(Je,n).then(e).catch(t=>{}):e()})()},{flush:"post"}),$(()=>[mt.value,Pe.value,X.value],(n,e)=>U(null,[n,e],function*([t,l,o],[i]){if(sn(),!l||!o||!q||!v.value||!A.value||t===i||a.stream===!1&&a.loading!==!1)return;const r=ie;if(r){try{yield r}catch{}if(T||!v.value)return}try{Y.value=!1,A.value=!1,ye(),we(),pe(),yield Me(),yield ve(v.value)}catch{Y.value=!1}}),{flush:"post"});const pt=$(()=>[a.loading,X.value],(n,e)=>U(null,[n,e],function*([t,l],o){if(!l||t)return;const i=o?.[0],r=i!==void 0&&i!==!1;yield Me(),ee(()=>{U(null,null,function*(){var u;try{if(r&&A.value)if(w.value&&v.value){const d=ie;if(d)try{yield d}catch{}Y.value=!1,A.value=!1,ye(),we(),pe(),v.value.replaceChildren(),yield Me(),yield ve(v.value)}else Re(String((u=a.node.code)!=null?u:""),oe.value);D.value||(P.value?te():ce()),pt()}catch{}})})}),{immediate:!0,flush:"post"});return Vn(()=>{ye(),we(),Xe()}),(n,e)=>Ne.value?(N(),Ve(S($n),{key:0,node:a.node,loading:a.loading},null,8,["node","loading"])):(N(),z("div",{key:1,ref_key:"container",ref:ue,style:Se(rt.value),class:Le(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[{"is-rendering":a.loading,"is-dark":ft.value,"is-diff":w.value,"is-plain-text":yn.value}]]),"data-markstream-code-block":"1","data-markstream-enhanced":Y.value&&!Ne.value?"true":"false"},[a.showHeader?(N(),z("div",{key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:Se(ut.value)},[cn(n.$slots,"header-left",{},()=>[c("div",At,[c("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:at.value},null,8,qt),c("div",Vt,[c("div",It,Ee(it.value),1),Nn.value?(N(),z("div",Yt,Ee(Nn.value),1)):Z("",!0)])])],!0),cn(n.$slots,"header-right",{},()=>[c("div",Xt,[w.value?(N(),z("div",{key:0,class:"code-diff-stats","aria-label":Gn.value},[c("span",Jt,"-"+Ee(ae.value.removed),1),c("span",Kt,"+"+Ee(ae.value.added),1)],8,Gt)):Z("",!0),a.showCollapseButton?(N(),z("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":D.value,onClick:dt,onMouseenter:e[0]||(e[0]=t=>I(t,D.value?S(p)("common.expand")||"Expand":S(p)("common.collapse")||"Collapse")),onFocus:e[1]||(e[1]=t=>I(t,D.value?S(p)("common.expand")||"Expand":S(p)("common.collapse")||"Collapse")),onMouseleave:F,onBlur:F},[(N(),z("svg",{style:Se({rotate:D.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"},[...e[18]||(e[18]=[c("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Qt)):Z("",!0),a.showFontSizeButtons&&a.enableFontSizeControl?(N(),z(wt,{key:2},[c("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(x.value)&&x.value<=10,onClick:e[2]||(e[2]=t=>(function(){const l=tn(),o=Math.max(10,l-1);x.value=o})()),onMouseenter:e[3]||(e[3]=t=>I(t,S(p)("common.decrease")||"Decrease")),onFocus:e[4]||(e[4]=t=>I(t,S(p)("common.decrease")||"Decrease")),onMouseleave:F,onBlur:F},[...e[19]||(e[19]=[c("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"},[c("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,Zt),c("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!Qn.value||x.value===V.value,onClick:e[5]||(e[5]=t=>(tn(),void(Number.isFinite(V.value)&&(x.value=V.value)))),onMouseenter:e[6]||(e[6]=t=>I(t,S(p)("common.reset")||"Reset")),onFocus:e[7]||(e[7]=t=>I(t,S(p)("common.reset")||"Reset")),onMouseleave:F,onBlur:F},[...e[20]||(e[20]=[c("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"},[c("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[c("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),c("path",{d:"M3 3v5h5"})])],-1)])],40,el),c("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(x.value)&&x.value>=36,onClick:e[8]||(e[8]=t=>(function(){const l=tn(),o=Math.min(36,l+1);x.value=o})()),onMouseenter:e[9]||(e[9]=t=>I(t,S(p)("common.increase")||"Increase")),onFocus:e[10]||(e[10]=t=>I(t,S(p)("common.increase")||"Increase")),onMouseleave:F,onBlur:F},[...e[21]||(e[21]=[c("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"},[c("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,nl)],64)):Z("",!0),a.showCopyButton?(N(),z("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":fe.value?S(p)("common.copied")||"Copied":S(p)("common.copy")||"Copy",onClick:st,onMouseenter:e[11]||(e[11]=t=>Dn(t)),onFocus:e[12]||(e[12]=t=>Dn(t)),onMouseleave:F,onBlur:F},[fe.value?(N(),z("svg",ol,[...e[23]||(e[23]=[c("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(N(),z("svg",ll,[...e[22]||(e[22]=[c("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[c("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),c("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,tl)):Z("",!0),a.showExpandButton?(N(),z("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":P.value,onClick:e[13]||(e[13]=t=>(function(l){if(P.value=!P.value,l&&De.value){const r=rn(l);if(r){const u=P.value?p("common.collapse")||"Collapse":p("common.expand")||"Expand";fn(r,u,"top",!1,void 0,a.isDark)}}const o=w.value?R():G(),i=v.value;o&&i&&(P.value?(Ue(!0),i.style.maxHeight="none",i.style.overflow="visible",te()):(Ue(!1),i.style.overflow="auto",ce()))})(t)),onMouseenter:e[14]||(e[14]=t=>I(t,P.value?S(p)("common.collapse")||"Collapse":S(p)("common.expand")||"Expand")),onFocus:e[15]||(e[15]=t=>I(t,P.value?S(p)("common.collapse")||"Collapse":S(p)("common.expand")||"Expand")),onMouseleave:F,onBlur:F},[P.value?(N(),z("svg",al,[...e[24]||(e[24]=[c("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)])])):(N(),z("svg",rl,[...e[25]||(e[25]=[c("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,il)):Z("",!0),on.value&&a.showPreviewButton?(N(),z("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":S(p)("common.preview")||"Preview",onClick:ct,onMouseenter:e[16]||(e[16]=t=>I(t,S(p)("common.preview")||"Preview")),onFocus:e[17]||(e[17]=t=>I(t,S(p)("common.preview")||"Preview")),onMouseleave:F,onBlur:F},[...e[26]||(e[26]=[c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[c("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[c("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"}),c("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,ul)):Z("",!0)])],!0)],4)):Z("",!0),zn(c("div",sl,[c("div",{ref_key:"codeEditor",ref:v,class:Le(["code-editor-container",[M.stream?"":"code-height-placeholder",{"is-hidden":xn.value}]]),style:Se(lt.value)},null,6),xn.value?(N(),Ve(S($n),{key:0,class:Le(["code-pre-fallback",{"is-wrap":Kn.value}]),style:Se(nt.value),node:a.node},null,8,["class","style","node"])):Z("",!0)],512),[[Tn,!(D.value||!M.stream&&M.loading)]]),je.value&&!O.value&&on.value&&J.value==="html"?(N(),Ve(jt,{key:1,code:a.node.code,"is-dark":a.isDark,"on-close":()=>je.value=!1},null,8,["code","is-dark","on-close"])):Z("",!0),zn(c("div",{class:"code-loading-placeholder",style:Se(ot.value)},[cn(n.$slots,"loading",{loading:M.loading,stream:M.stream},()=>[e[27]||(e[27]=c("div",{class:"loading-skeleton"},[c("div",{class:"skeleton-line"}),c("div",{class:"skeleton-line"}),c("div",{class:"skeleton-line short"})],-1))],!0)],4),[[Tn,!M.stream&&M.loading]]),c("span",dl,Ee(fe.value?S(p)("common.copied")||"Copied":""),1)],14,Wt))}}),[["__scopeId","data-v-1a55f98f"]]);export{wl as default};
