dimcode 0.0.7 → 0.0.9
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/assets/gui/200.html +1 -1
- package/assets/gui/404.html +1 -1
- package/assets/gui/_nuxt/{CctfDgzL.js → 0b551Iup.js} +1 -1
- package/assets/gui/_nuxt/{waGmH_zw.js → 4plqNI3E.js} +1 -1
- package/assets/gui/_nuxt/{B41oyhUX.js → B2yiF0dP.js} +1 -1
- package/assets/gui/_nuxt/{Cx8lgPkP.js → B8sXOwue.js} +1 -1
- package/assets/gui/_nuxt/BAAwCcKi.js +1 -0
- package/assets/gui/_nuxt/{BHBA7_9A.js → BE4JB3YQ.js} +1 -1
- package/assets/gui/_nuxt/{zPZrJS7V.js → BGp_FwD9.js} +1 -1
- package/assets/gui/_nuxt/{DQcJWYOz.js → BIM4RUHw.js} +1 -1
- package/assets/gui/_nuxt/{WbTodJZi.js → BJmxWypQ.js} +1 -1
- package/assets/gui/_nuxt/{BAsEomiL.js → BKMTnum7.js} +1 -1
- package/assets/gui/_nuxt/{CgCvTYUb.js → BPM3vi7L.js} +1 -1
- package/assets/gui/_nuxt/{CxrwCJPS.js → BloQGtiP.js} +1 -1
- package/assets/gui/_nuxt/{C2r5gH2d.js → BnC2hR_I.js} +1 -1
- package/assets/gui/_nuxt/{DCBWnvUv.js → BtMqZKeb.js} +1 -1
- package/assets/gui/_nuxt/BtYWoTeV.js +1 -0
- package/assets/gui/_nuxt/{a4I2nS0P.js → Bu7UbN50.js} +1 -1
- package/assets/gui/_nuxt/{DDwo0uwT.js → C11b51Ac.js} +1 -1
- package/assets/gui/_nuxt/{BtytU9Nc.js → C1yhW14G.js} +2 -2
- package/assets/gui/_nuxt/{BJgShMaj.js → C5cXMF-A.js} +1 -1
- package/assets/gui/_nuxt/{Fi3JZ7gi.js → C6Po8woU.js} +1 -1
- package/assets/gui/_nuxt/C6lP39IU.js +4 -0
- package/assets/gui/_nuxt/{m1p94B0o.js → C8BqVsjE.js} +1 -1
- package/assets/gui/_nuxt/{FdVDP1dJ.js → C8FO969Z.js} +48 -48
- package/assets/gui/_nuxt/C8tOkigv.js +1 -0
- package/assets/gui/_nuxt/{Dgtmkgv6.js → CILJ3eP4.js} +1 -1
- package/assets/gui/_nuxt/{fGWXVeDl.js → CJeKOH-v.js} +2 -2
- package/assets/gui/_nuxt/CKgPEzpl.js +1 -0
- package/assets/gui/_nuxt/{C_nwuZOL.js → CNpnPA49.js} +1 -1
- package/assets/gui/_nuxt/{DLps5vLc.js → CSea6CJ5.js} +1 -1
- package/assets/gui/_nuxt/{Be9sogz8.js → CU5WgS48.js} +1 -1
- package/assets/gui/_nuxt/{gw8YJBUN.js → CZ1LJRt8.js} +1 -1
- package/assets/gui/_nuxt/{4latAK5N.js → CfQJsi7e.js} +3 -3
- package/assets/gui/_nuxt/{DuPuI2eK.js → Cgg1My-l.js} +1 -1
- package/assets/gui/_nuxt/{CR-veSvi.js → ChaLjQbU.js} +1 -1
- package/assets/gui/_nuxt/CmKTTxBW.js +1 -0
- package/assets/gui/_nuxt/{QrFbBF0x.js → Conicgba.js} +1 -1
- package/assets/gui/_nuxt/{B-ocCvqj.js → CupMKq6u.js} +1 -1
- package/assets/gui/_nuxt/{1fcVKlQD.js → D0ya9d-G.js} +1 -1
- package/assets/gui/_nuxt/{DJ0FGiPu.js → D2lZokPL.js} +1 -1
- package/assets/gui/_nuxt/{BHmwI27Q.js → D5KI-6FL.js} +2 -2
- package/assets/gui/_nuxt/{BCdCHJrs.js → DCxOw3GV.js} +2 -2
- package/assets/gui/_nuxt/{I4qJV1od.js → DCyR-K5m.js} +4 -4
- package/assets/gui/_nuxt/DLnSW1IF.js +1 -0
- package/assets/gui/_nuxt/{FmGx3-yC.js → DUsPre0P.js} +1 -1
- package/assets/gui/_nuxt/{DNM2C9RQ.js → DX6XiGOO.js} +1 -1
- package/assets/gui/_nuxt/{CM2Ru5jE.js → DXsty2qm.js} +1 -1
- package/assets/gui/_nuxt/{CvBv_9Ii.js → DZ0NWvbi.js} +1 -1
- package/assets/gui/_nuxt/{VvxifOG2.js → DaWfUpsD.js} +68 -68
- package/assets/gui/_nuxt/{BIK3UA9H.js → DlL1-BJh.js} +1 -1
- package/assets/gui/_nuxt/Dn4y6C2r.js +1 -0
- package/assets/gui/_nuxt/{B-QRPBiU.js → DpTvXhMN.js} +1 -1
- package/assets/gui/_nuxt/{C5QU6AII.js → DzzoB_Be.js} +1 -1
- package/assets/gui/_nuxt/{BMPUUilT.js → GsNec5dh.js} +1 -1
- package/assets/gui/_nuxt/{JhHowHQY.js → _RKv1NgS.js} +1 -1
- package/assets/gui/_nuxt/{eM4IBQGT.js → _mPeMGlT.js} +1 -1
- package/assets/gui/_nuxt/builds/latest.json +1 -1
- package/assets/gui/_nuxt/builds/meta/899e1dcf-7a7e-4c41-8525-c1d394dec180.json +1 -0
- package/assets/gui/_nuxt/{entry.DKEE1mdx.css → entry.PbPm020F.css} +1 -1
- package/assets/gui/_nuxt/error-404.DF6r4GP7.css +1 -0
- package/assets/gui/_nuxt/error-500.Bo5pzFPU.css +1 -0
- package/assets/gui/_nuxt/{CYh22N6Z.js → gpkmuIcl.js} +1 -1
- package/assets/gui/_nuxt/{0OuYuFdd.js → kTUG9xEK.js} +1 -1
- package/assets/gui/_nuxt/{moIhOSp_.js → nJjJxbsW.js} +3 -3
- package/assets/gui/index.html +1 -1
- package/dist/aihubmix.json +1 -1
- package/dist/anthropic.json +1 -1
- package/dist/cli.mjs +468 -468
- package/dist/deepseek.json +1 -1
- package/dist/google.json +1 -1
- package/dist/kimi-for-coding.json +1 -1
- package/dist/minimax-cn-coding-plan.json +1 -1
- package/dist/minimax-cn.json +1 -1
- package/dist/minimax-coding-plan.json +1 -1
- package/dist/minimax.json +1 -1
- package/dist/models/aihubmix.json +1 -1
- package/dist/models/openrouter.json +1 -1
- package/dist/models/siliconflow-com.json +1 -1
- package/dist/models/siliconflow.json +1 -1
- package/dist/models/zenmux.json +1 -1
- package/dist/moonshot-ai.json +1 -1
- package/dist/moonshot.json +1 -1
- package/dist/openai.json +1 -1
- package/dist/ppinfra.json +1 -1
- package/dist/xai.json +1 -1
- package/dist/zai-coding-plan.json +1 -1
- package/dist/zai.json +1 -1
- package/dist/zenmux.json +1 -1
- package/dist/zhipuai-coding-plan.json +1 -1
- package/dist/zhipuai.json +1 -1
- package/package.json +2 -2
- package/assets/gui/_nuxt/5tCQ9P9x.js +0 -1
- package/assets/gui/_nuxt/CRt9G2a3.js +0 -1
- package/assets/gui/_nuxt/CW5-BTm0.js +0 -1
- package/assets/gui/_nuxt/CjaZXJmO.js +0 -1
- package/assets/gui/_nuxt/DGBBJ9Xx.js +0 -1
- package/assets/gui/_nuxt/DYanJOYX.js +0 -1
- package/assets/gui/_nuxt/DhXJpUyf.js +0 -261
- package/assets/gui/_nuxt/DhgdKvf3.js +0 -4
- package/assets/gui/_nuxt/Dr-RzAtV.js +0 -1
- package/assets/gui/_nuxt/builds/meta/ec7f63c2-1217-4402-b8e2-236e5db0f71a.json +0 -1
- package/assets/gui/_nuxt/error-404.BAwq3L4-.css +0 -1
- package/assets/gui/_nuxt/error-500.DFXMopWe.css +0 -1
- package/assets/native/build.zig +0 -16
- package/assets/native/src/lib.zig +0 -23
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e as $t,d as At,A as Ft,c as Ht,w as V,f as Rt,o as Nt,C as Xt,g,j as w,z as y,r as Je,l as r,D as h,F as xe,p as Q,H as xt,k as _t,v as Yt,S as kt,U as bt,m as Vt,y as Zt,n as qt,O as Ut,T as It,P as Wt,q as d,J as ee,L as Mt,M as Gt,R as A,V as Kt,W as Jt,X as Qt}from"./FdVDP1dJ.js";import{e as el}from"./DvJDa2y1.js";var tl=Object.defineProperty,ll=Object.defineProperties,nl=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,rl=Object.prototype.hasOwnProperty,ol=Object.prototype.propertyIsEnumerable,Ct=($,P,M)=>P in $?tl($,P,{enumerable:!0,configurable:!0,writable:!0,value:M}):$[P]=M,Qe=($,P)=>{for(var M in P||(P={}))rl.call(P,M)&&Ct($,M,P[M]);if(Tt)for(var M of Tt(P))ol.call(P,M)&&Ct($,M,P[M]);return $},D=($,P,M)=>new Promise((ke,o)=>{var ne=F=>{try{j(M.next(F))}catch(re){o(re)}},be=F=>{try{j(M.throw(F))}catch(re){o(re)}},j=F=>F.done?ke(F.value):Promise.resolve(F.value).then(ne,be);j((M=M.apply($,P)).next())});const al={key:0},il={key:1,class:"flex items-center gap-x-2 overflow-hidden"},ul=["src"],sl={key:2},cl={class:"flex items-center gap-x-1"},dl={class:"flex items-center gap-x-1"},vl={key:4},ml={key:5,class:"flex items-center gap-x-1"},fl=["aria-pressed"],hl={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"},gl={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"},pl=["disabled"],wl=["disabled"],yl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},xl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},kl={key:1,class:"relative"},bl={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Ml={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Tl={class:"markstream-vue"},Cl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},et=$t(At({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},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:!1}},emits:["copy","export","openModal","toggleMode"],setup($,{emit:P}){var M,ke;const o=$,ne=P,be={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},j=d(!1),F=ee(()=>o.isStrict?"strict":"loose"),re=ee(()=>({startOnLoad:!1,securityLevel:F.value,dompurifyConfig:F.value==="strict"?be:void 0,flowchart:F.value==="strict"?{htmlLabels:!1}:void 0})),Dt=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Bt=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function St(t){if(!t)return"";const e=t.trim();return Bt.test(e)?e:""}function Me(t){if(t)try{t.replaceChildren()}catch{t.innerHTML=""}}function oe(t,e){if(!t)return"";if(F.value==="strict")return(function(l,n){if(!l)return"";try{l.replaceChildren()}catch{l.innerHTML=""}const c=(function(a){if(typeof window>"u"||typeof DOMParser>"u"||!a)return null;const s=a.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),i=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;if(!i||i.nodeName.toLowerCase()!=="svg")return null;const m=i;return(function(v){const p=new Set(["script"]),L=[v,...Array.from(v.querySelectorAll("*"))];for(const C of L){if(p.has(C.tagName.toLowerCase())){C.remove();continue}const Y=Array.from(C.attributes);for(const N of Y){const b=N.name;if(/^on/i.test(b))C.removeAttribute(b);else{if(b==="style"&&N.value){const k=N.value;if(Dt.some(Ye=>Ye.test(k))){C.removeAttribute(b);continue}}if((b==="href"||b==="xlink:href")&&N.value){const k=St(N.value);if(!k){C.removeAttribute(b);continue}k!==N.value&&C.setAttribute(b,k)}}}}})(m),m})(n);return c?(l.appendChild(c),l.innerHTML):""})(t,e);try{t.replaceChildren()}catch{t.innerHTML=""}if(e)try{t.insertAdjacentHTML("afterbegin",e)}catch{t.innerHTML=e}return t.innerHTML}const{t:f}=Ft();function Te(){return D(this,null,function*(){try{const t=yield Qt();return j.value=!!t,t}catch(t){throw j.value=!1,t}})}typeof window<"u"&&D(null,null,function*(){var t;try{const e=yield Te();if(!e)return;(t=e?.initialize)==null||t.call(e,Qe({},re.value))}catch(e){j.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",e)}});const Ce=d(!1),Z=d(!1),q=d(),u=d(),ae=d(),De=d(null),Et=Ht(),me=d(null),ie=d(typeof window>"u"),tt=d(),R=ee(()=>o.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode")),x=d(1),O=d(0),z=d(0),Be=d(!1),Se=d({x:0,y:0}),S=d(!1),Ee=d(!1),W=d(!1),Pe=d(null),je=d(0),Ve=d(!1);let fe=null,he=null,ge=0;const lt=(M=globalThis.requestIdleCallback)!=null?M:(t,e)=>setTimeout(()=>t({didTimeout:!0}),16),ue=(function(){let t=null;return(...e)=>{t&&clearTimeout(t),t=setTimeout(()=>(()=>{lt(()=>{wt()},{timeout:500})})(...e),300)}})();function pe(){he!=null&&(globalThis.clearTimeout(he),he=null)}function nt(t=600){if(typeof globalThis>"u")return;const e=Math.max(0,t);pe(),he=globalThis.setTimeout(()=>{he=null,o.loading||W.value||!ie.value?nt(Math.min(1200,Math.max(300,1.2*e))):ue()},e)}const G=d("360px");let se=null;const B=d(!1),te=d(!1),K=d({}),rt=d(null),we=d(""),Ze=d(0);let H=null;const U=d(!1),le=d({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ot=ee(()=>o.enableWheelZoom?{wheel:jt}:{}),I=ee(()=>{var t,e,l,n;return{worker:(t=o.workerTimeoutMs)!=null?t:1400,parse:(e=o.parseTimeoutMs)!=null?e:1800,render:(l=o.renderTimeoutMs)!=null?l:2500,fullRender:(n=o.fullRenderTimeoutMs)!=null?n:4e3}}),Pt=(ke=globalThis.cancelIdleCallback)!=null?ke:t=>clearTimeout(t);let ce=null,Oe=null,de=!1,ye=800,X=null,ze=0,qe=!0,Le=0;function $e(t,e){const l=e?.timeoutMs,n=e?.signal;if(n?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let c=null,a=!1,s=null;return new Promise((i,m)=>{const v=()=>{c!=null&&clearTimeout(c),s&&n&&n.removeEventListener("abort",s)};l&&l>0&&(c=globalThis.setTimeout(()=>{a||(a=!0,v(),m(new Error("Operation timed out")))},l)),n&&(s=()=>{a||(a=!0,v(),m(new DOMException("Aborted","AbortError")))},n.addEventListener("abort",s)),t().then(p=>{a||(a=!0,v(),i(p))}).catch(p=>{a||(a=!0,v(),m(p))})})}function at(t){if(typeof document>"u"||!u.value)return;const e=document.createElement("div");e.className="text-red-500 p-4",e.textContent="Failed to render diagram: ";const l=document.createElement("span");l.textContent=t instanceof Error?t.message:"Unknown error",e.appendChild(l),Me(u.value),u.value.appendChild(e),G.value="360px",U.value=!0,_()}function it(t){return!t||t.disabled}function E(t,e,l="top"){if(it(t.currentTarget))return;const n=t,c=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;Mt(t.currentTarget,e,l,!1,c,o.isDark)}function T(){Gt()}function ut(t){if(it(t.currentTarget))return;const e=Ce.value?f("common.copied")||"Copied":f("common.copy")||"Copy",l=t,n=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;Mt(t.currentTarget,e,"top",!1,n,o.isDark)}function st(t,e){const l=`%%{init: {"theme": "${e==="dark"?"dark":"default"}"}}%%
|
|
2
|
-
`;return t.trimStart().startsWith("%%{")?t:l+t}function ct(){return qe&&!S.value&&!B.value&&!U.value}function dt(t){const e=t.split(/\r?\n/);for(;e.length>0;){const l=e[e.length-1].trimEnd();if(l!==""){if(!(/^[-=~>|<\s]+$/.test(l.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(l)||/[-|><]$/.test(l)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(l)))break;e.pop()}else e.pop()}return e.join(`
|
|
3
|
-
`)}function Ae(t,e,l){return D(this,null,function*(){var n;try{return yield Jt(t,e,(n=l?.timeoutMs)!=null?n:I.value.worker)}catch{return yield(function(a,s,i){return D(this,null,function*(){var m,v;const p=yield Te();if(!p)return;const L=p,C=st(a,s);if(typeof L.parse=="function")return yield $e(()=>L.parse(C),{timeoutMs:(m=i?.timeoutMs)!=null?m:I.value.parse,signal:i?.signal}),!0;const Y=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield $e(()=>p.render(Y,C),{timeoutMs:(v=i?.timeoutMs)!=null?v:I.value.render,signal:i?.signal}),!0})})(t,e,l)}})}typeof window<"u"&&V(()=>q.value,t=>{var e;if((e=me.value)==null||e.destroy(),me.value=null,!t)return void(ie.value=!1);const l=Et(t,{rootMargin:"400px"});me.value=l,ie.value=l.isVisible.value,l.whenVisible.then(()=>{ie.value=!0})},{immediate:!0}),Rt(()=>{var t;(t=me.value)==null||t.destroy(),me.value=null});const Fe=ee(()=>S.value||W.value||Z.value);function Ue(t){if(!q.value||!u.value)return;const e=u.value.querySelector("svg");if(!e)return;let l=0,n=0;const c=e.getAttribute("viewBox"),a=e.getAttribute("width"),s=e.getAttribute("height");if(c){const i=c.split(" ");i.length===4&&(l=Number.parseFloat(i[2]),n=Number.parseFloat(i[3]))}if(l&&n||a&&s&&(l=Number.parseFloat(a),n=Number.parseFloat(s)),Number.isNaN(l)||Number.isNaN(n)||l<=0||n<=0)try{const i=e.getBBox();i&&i.width>0&&i.height>0&&(l=i.width,n=i.height)}catch(i){return void console.error("Failed to get SVG BBox:",i)}if(l>0&&n>0){const i=n/l;let m=(t??q.value.clientWidth)*i;m>n&&(m=n),G.value=`${m}px`}}const J=d(!1),Ie=ee(()=>({transform:`translate(${O.value}px, ${z.value}px) scale(${x.value})`}));function vt(t){t.key==="Escape"&&J.value&&We()}function We(){if(J.value=!1,ae.value&&Me(ae.value),De.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",vt)}catch{}}function mt(){x.value<3&&(x.value+=.1)}function ft(){x.value>.5&&(x.value-=.1)}function ht(){x.value=1,O.value=0,z.value=0}function He(t){Be.value=!0,t instanceof MouseEvent?Se.value={x:t.clientX-O.value,y:t.clientY-z.value}:Se.value={x:t.touches[0].clientX-O.value,y:t.touches[0].clientY-z.value}}function Re(t){if(!Be.value)return;let e,l;t instanceof MouseEvent?(e=t.clientX,l=t.clientY):(e=t.touches[0].clientX,l=t.touches[0].clientY),O.value=e-Se.value.x,z.value=l-Se.value.y}function ve(){Be.value=!1}function jt(t){if(o.enableWheelZoom&&(t.ctrlKey||t.metaKey)){if(t.preventDefault(),!q.value)return;const e=q.value.getBoundingClientRect(),l=t.clientX-e.left,n=t.clientY-e.top,c=l-e.width/2,a=n-e.height/2,s=(c-O.value)/x.value,i=(a-z.value)/x.value,m=.01,v=-t.deltaY*m,p=Math.min(Math.max(x.value+v,.5),3);p!==x.value&&(O.value=c-s*p,z.value=a-i*p,x.value=p)}}function Ot(){return D(this,null,function*(){try{const t=R.value,e={payload:{type:"copy",text:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(ne("copy",e),e.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),Ce.value=!0,setTimeout(()=>{Ce.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function zt(){var t;const e=(t=u.value)==null?void 0:t.querySelector("svg");if(!e)return void console.error("SVG element not found");const l=new XMLSerializer().serializeToString(e),n={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:l};ne("export",n),n.defaultPrevented||(function(c,a=null){D(this,null,function*(){try{const s=a??new XMLSerializer().serializeToString(c),i=new Blob([s],{type:"image/svg+xml;charset=utf-8"}),m=URL.createObjectURL(i);if(typeof document<"u"){const v=document.createElement("a");v.href=m,v.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(v),v.click(),document.body.removeChild(v)}catch{}URL.revokeObjectURL(m)}}catch(s){console.error("Failed to export SVG:",s)}})})(e,l)}function Lt(){var t,e;const l=(e=(t=u.value)==null?void 0:t.querySelector("svg"))!=null?e:null,n=l?new XMLSerializer().serializeToString(l):null,c={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:l,svgString:n};ne("openModal",c),c.defaultPrevented||(function(){if(J.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",vt)}catch{}A(()=>{if(q.value&&ae.value){const a=q.value.cloneNode(!0);a.classList.add("fullscreen");const s=a.querySelector("[data-mermaid-wrapper]");s&&(De.value=s,s.style.transform=Ie.value.transform),Me(ae.value),ae.value.appendChild(a)}})})()}function gt(t){const e={payload:{type:"toggle-mode",target:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};ne("toggleMode",t,e),e.defaultPrevented||pt(t)}function pt(t){return D(this,null,function*(){const e=tt.value;if(!e)return Ee.value=!0,void(S.value=t==="source");const l=e.getBoundingClientRect().height;e.style.height=`${l}px`,e.style.overflow="hidden",Ee.value=!0,S.value=t==="source",yield A();const n=e.scrollHeight;e.style.transition="height 180ms ease",e.offsetHeight,e.style.height=`${n}px`;const c=()=>{e.style.transition="",e.style.height="",e.style.overflow="",e.removeEventListener("transitionend",a)};function a(){c()}e.addEventListener("transitionend",a),setTimeout(()=>c(),220)})}function Ne(){return D(this,null,function*(){return W.value?Pe.value:u.value||(yield A(),u.value)?(W.value=!0,Pe.value=D(null,null,function*(){var t,e,l;u.value&&(u.value.style.opacity="0");try{const n=yield Te();if(!n)return;const c=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;B.value||te.value||(t=n.initialize)==null||t.call(n,(e=Qe({},re.value),l={dompurifyConfig:Qe({},be)},ll(e,nl(l))));const a=(function(m,v=R.value){const p=v,L=`%%{init: {"theme": "${m==="dark"?"dark":"default"}"}}%%
|
|
4
|
-
`;return p.trim().startsWith("%%{")?p:L+p})(o.isDark?"dark":"light"),s=yield $e(()=>n.render(c,a),{timeoutMs:I.value.fullRender}),i=s?.svg;if(u.value){const m=oe(u.value,i);B.value||te.value||(Ue(),B.value=!0,le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});const v=o.isDark?"dark":"light";m&&(K.value[v]=m),te.value&&(te.value=!1),U.value=!1,ge=0,pe()}}catch(n){const c=(function(s){const i=typeof s=="string"?s:typeof s?.message=="string"?s.message:"";return typeof i=="string"&&/timed out/i.test(i)})(n),a=ge+1;c&&a<=3?(ge=a,nt(Math.min(1200,600*a))):(ge=0,pe(),console.error("Failed to render mermaid diagram:",n),o.loading===!1&&at(n))}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1,Pe.value=null}}),Pe.value):void console.warn("Mermaid container not ready")})}function wt(){return D(this,null,function*(){var t,e;const l=Date.now(),n=++Ze.value;H&&H.abort(),H=new AbortController;const c=H.signal,a=o.isDark?"dark":"light",s=R.value,i=s.replace(/\s+/g,"");if(!s.trim())return u.value&&Me(u.value),rt.value=null,we.value="",void(U.value=!1);if(i===we.value)return;try{const v=yield(function(L,C,Y){return D(this,null,function*(){var N;try{if(yield Ae(L,C,Y))return{fullOk:!0,prefixOk:!1}}catch(k){if(k?.name==="AbortError")throw k}let b=dt(L);if(b&&b.trim()&&b!==L)try{try{const k=yield Kt(L,C,(N=Y?.timeoutMs)!=null?N:I.value.worker);k&&k.trim()&&(b=k)}catch{}if(yield Ae(b,C,Y))return{fullOk:!1,prefixOk:!0,prefix:b}}catch(k){if(k?.name==="AbortError")throw k}return{fullOk:!1,prefixOk:!1}})})(s,a,{signal:c,timeoutMs:I.value.worker});if(v.fullOk)return yield Ne(),void(Ze.value===n&&(rt.value=(e=(t=u.value)==null?void 0:t.innerHTML)!=null?e:null,we.value=i,U.value=!1));const p=ze&&l<=ze;if(v.prefixOk&&v.prefix&&ct()&&!p)return void(yield(function(L){return D(this,null,function*(){if(ct()&&(u.value||(yield A(),u.value))&&!W.value){W.value=!0;try{const C=yield Te();if(!C)return;const Y=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,N=o.isDark?"dark":"light",b=dt(L),k=st(b&&b.trim()?b:L,N);u.value&&(u.value.style.opacity="0");const Ye=yield $e(()=>C.render(Y,k),{timeoutMs:I.value.render}),yt=Ye?.svg;u.value&&yt&&(oe(u.value,yt),Ue())}catch{}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1}}})})(v.prefix))}catch(v){if(v?.name==="AbortError")return}if(Ze.value!==n||U.value)return;const m=K.value[a];m&&u.value&&oe(u.value,m)})}function _(){de&&(de=!1,ye=800,qe=!1,X&&(X.abort(),X=null),ce&&(globalThis.clearTimeout(ce),ce=null),Oe&&(Pt(Oe),Oe=null),ze=Date.now())}function Xe(){if(_(),H){try{H.abort()}catch{}H=null}if(X){try{X.abort()}catch{}X=null}pe(),ge=0}function Ge(t=800){de&&(Le>=12?_():(ce&&globalThis.clearTimeout(ce),ce=globalThis.setTimeout(()=>{Oe=lt(()=>D(null,null,function*(){if(!de)return;if(S.value||B.value)return void _();const e=o.isDark?"dark":"light",l=R.value;if(!l.trim())return o.loading===!1?void _():void Ge(ye);if(Le++,Le>12)_();else{X&&X.abort(),X=new AbortController;try{if((yield Ae(l,e,{signal:X.signal,timeoutMs:I.value.worker}))&&(yield Ne(),B.value))return void _()}catch{}ye=Math.min(Math.floor(1.5*ye),4e3),Ge(ye)}}),{timeout:500})},t)))}function Ke(){de||S.value||B.value||(de=!0,ze=0,qe=!0,Le=0,Ge(500))}V(Ie,t=>{J.value&&De.value&&(De.value.style.transform=t.transform)},{immediate:!0}),V(()=>R.value,()=>{B.value=!1,K.value={},ue(),!S.value&&j.value&&Ke(),(function(){if(!S.value||!j.value)return;const t=R.value.length;t!==je.value&&(Ve.value=!0,je.value=t,fe&&clearTimeout(fe),fe=setTimeout(()=>{Ve.value&&S.value&&R.value.trim()&&(Ve.value=!1,pt("preview"))},500))})()}),V(()=>o.isDark,()=>D(null,null,function*(){if(!B.value||U.value)return;const t=o.isDark?"dark":"light",e=K.value[t];if(e)return void(u.value&&oe(u.value,e));const l={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value},n=x.value!==1||O.value!==0||z.value!==0;te.value=!0,n&&(x.value=1,O.value=0,z.value=0,yield A()),yield Ne(),n&&(yield A(),x.value=l.zoom,O.value=l.translateX,z.value=l.translateY,G.value=l.containerHeight,le.value=l)})),V(()=>S.value,t=>D(null,null,function*(){if(t)_(),B.value&&(le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});else{if(U.value)return;const e=o.isDark?"dark":"light";if(B.value&&K.value[e])return yield A(),u.value&&oe(u.value,K.value[e]),x.value=le.value.zoom,O.value=le.value.translateX,z.value=le.value.translateY,void(G.value=le.value.containerHeight);if(yield A(),!j.value)return;yield wt(),Ke()}})),V(()=>o.loading,(t,e)=>D(null,null,function*(){if(e===!0&&t===!1){const l=R.value.trim();if(!l)return Xe();const n=o.isDark?"dark":"light",c=l.replace(/\s+/g,"");if(B.value&&c===we.value)return yield A(),u.value&&!u.value.querySelector("svg")&&K.value[n]&&oe(u.value,K.value[n]),void Xe();try{yield Ae(l,n,{timeoutMs:I.value.worker}),yield Ne(),we.value=c,U.value=!1,Xe()}catch(a){Xe(),at(a)}}})),V(q,t=>{se&&se.disconnect(),!t||B.value||te.value||(se=new ResizeObserver(e=>{e&&e.length>0&&!B.value&&!te.value&&el(()=>{Ue(e[0].contentRect.width)})}),se.observe(t))},{immediate:!0}),Nt(()=>D(null,null,function*(){yield A(),Ee.value||(S.value=!j.value),ie.value&&(ue(),je.value=R.value.length)})),V(()=>j.value,t=>{Ee.value||(S.value=!t)}),V(()=>ie.value,t=>{t&&(B.value||(ue(),je.value=R.value.length),o.loading||B.value||ue())},{immediate:!1}),Xt(()=>{fe&&clearTimeout(fe),se&&se.disconnect(),H&&(H.abort(),H=null),_(),pe()}),V(()=>Z.value,t=>D(null,null,function*(){t?(_(),H&&H.abort()):B.value||(yield A(),ue(),S.value||Ke())}),{immediate:!1});const _e=ee(()=>o.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return(t,e)=>(g(),w("div",{class:y(["my-4 rounded-lg border overflow-hidden shadow-sm",[o.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":o.loading}]])},[o.showHeader?(g(),w("div",{key:0,class:y(["mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",o.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"])},[t.$slots["header-left"]?(g(),w("div",al,[Je(t.$slots,"header-left",{},void 0,!0)])):(g(),w("div",il,[r("img",{src:h("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cpath%20fill='none'%20stroke='%23ca9ee6'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M1.5%202.5c0%206%202.25%205.75%204%207%20.83.67%201.17%202%201%204h3c-.17-2%20.17-3.33%201-4%201.75-1.25%204-1%204-7C12%202.5%2010%203%208%207%206%203%204%202.5%201.5%202.5'%20/%3e%3c/svg%3e"),class:"w-4 h-4 my-0",alt:"Mermaid"},null,8,ul),r("span",{class:y(["text-sm font-medium font-mono truncate",o.isDark?"text-gray-400":"text-gray-600"])},"Mermaid",2)])),t.$slots["header-center"]?(g(),w("div",sl,[Je(t.$slots,"header-center",{},void 0,!0)])):o.showModeToggle&&j.value?(g(),w("div",{key:3,class:y(["flex items-center gap-x-1 rounded-md p-0.5",o.isDark?"bg-gray-700":"bg-gray-100"])},[r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"]]),onClick:e[0]||(e[0]=()=>gt("preview")),onMouseenter:e[1]||(e[1]=l=>E(l,h(f)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=l=>E(l,h(f)("common.preview")||"Preview")),onMouseleave:T,onBlur:T},[r("div",cl,[e[21]||(e[21]=r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("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"}),r("circle",{cx:"12",cy:"12",r:"3"})])],-1)),r("span",null,xe(h(f)("common.preview")||"Preview"),1)])],34),r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"]]),onClick:e[3]||(e[3]=()=>gt("source")),onMouseenter:e[4]||(e[4]=l=>E(l,h(f)("common.source")||"Source")),onFocus:e[5]||(e[5]=l=>E(l,h(f)("common.source")||"Source")),onMouseleave:T,onBlur:T},[r("div",dl,[e[22]||(e[22]=r("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"},[r("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)),r("span",null,xe(h(f)("common.source")||"Source"),1)])],34)],2)):Q("",!0),t.$slots["header-right"]?(g(),w("div",vl,[Je(t.$slots,"header-right",{},void 0,!0)])):(g(),w("div",ml,[o.showCollapseButton?(g(),w("button",{key:0,class:y(_e.value),"aria-pressed":Z.value,onClick:e[6]||(e[6]=l=>Z.value=!Z.value),onMouseenter:e[7]||(e[7]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onMouseleave:T,onBlur:T},[(g(),w("svg",{style:xt({rotate:Z.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[23]||(e[23]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],42,fl)):Q("",!0),o.showCopyButton?(g(),w("button",{key:1,class:y(_e.value),onClick:Ot,onMouseenter:e[9]||(e[9]=l=>ut(l)),onFocus:e[10]||(e[10]=l=>ut(l)),onMouseleave:T,onBlur:T},[Ce.value?(g(),w("svg",gl,[...e[25]||(e[25]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(g(),w("svg",hl,[...e[24]||(e[24]=[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],34)):Q("",!0),o.showExportButton&&j.value?(g(),w("button",{key:2,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:zt,onMouseenter:e[11]||(e[11]=l=>E(l,h(f)("common.export")||"Export")),onFocus:e[12]||(e[12]=l=>E(l,h(f)("common.export")||"Export")),onMouseleave:T,onBlur:T},[...e[26]||(e[26]=[r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,pl)):Q("",!0),o.showFullscreenButton&&j.value?(g(),w("button",{key:3,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:Lt,onMouseenter:e[13]||(e[13]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onFocus:e[14]||(e[14]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onMouseleave:T,onBlur:T},[J.value?(g(),w("svg",xl,[...e[28]||(e[28]=[r("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)])])):(g(),w("svg",yl,[...e[27]||(e[27]=[r("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,wl)):Q("",!0)]))],2)):Q("",!0),_t(r("div",{ref_key:"modeContainerRef",ref:tt},[S.value?(g(),w("div",{key:0,class:y(["p-4",o.isDark?"bg-gray-900":"bg-gray-50"])},[r("pre",{class:y(["text-sm font-mono whitespace-pre-wrap",o.isDark?"text-gray-300":"text-gray-700"])},xe(R.value),3)],2)):(g(),w("div",kl,[o.showZoomControls?(g(),w("div",bl,[r("div",Ml,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt,onMouseenter:e[15]||(e[15]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onMouseleave:T,onBlur:T},[...e[29]||(e[29]=[r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft,onMouseenter:e[17]||(e[17]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onMouseleave:T,onBlur:T},[...e[30]||(e[30]=[r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht,onMouseenter:e[19]||(e[19]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onMouseleave:T,onBlur:T},xe(Math.round(100*x.value))+"% ",35)])])):Q("",!0),r("div",kt({ref_key:"mermaidContainer",ref:q,class:["min-h-[360px] relative transition-all duration-100 overflow-hidden block",o.isDark?"bg-gray-900":"bg-gray-50"],style:{height:G.value}},bt(ot.value),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),[r("div",{"data-mermaid-wrapper":"",class:y(["absolute inset-0 cursor-grab",{"cursor-grabbing":Be.value}]),style:xt(Ie.value)},[r("div",{ref_key:"mermaidContent",ref:u,class:"_mermaid w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],16),(g(),Vt(Wt,{to:"body"},[r("div",Tl,[Zt(It,{name:"mermaid-dialog",appear:""},{default:qt(()=>[J.value?(g(),w("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:Ut(We,["self"])},[r("div",{class:y(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",o.isDark?"bg-gray-900":"bg-white"])},[r("div",Cl,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt},[...e[31]||(e[31]=[r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft},[...e[32]||(e[32]=[r("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"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht},xe(Math.round(100*x.value))+"% ",3),r("button",{class:y(["inline-flex items-center justify-center p-2 rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:We},[...e[33]||(e[33]=[r("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"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])],2)]),r("div",kt({ref_key:"modalContent",ref:ae,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},bt(ot.value,!0),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),null,16)],2)])):Q("",!0)]),_:1})])]))]))],512),[[Yt,!Z.value]])],2))}}),[["__scopeId","data-v-2ff46cc8"]]);et.install=$=>{$.component(et.__name,et)};export{et as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./FmGx3-yC.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"ec7f63c2-1217-4402-b8e2-236e5db0f71a","timestamp":1770821419646,"prerendered":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-029d9aeb]{display:grid}.mb-2[data-v-029d9aeb]{margin-bottom:.5rem}.mb-4[data-v-029d9aeb]{margin-bottom:1rem}.max-w-520px[data-v-029d9aeb]{max-width:520px}.min-h-screen[data-v-029d9aeb]{min-height:100vh}.w-full[data-v-029d9aeb]{width:100%}.flex[data-v-029d9aeb]{display:flex}.place-content-center[data-v-029d9aeb]{place-content:center}.items-center[data-v-029d9aeb]{align-items:center}.justify-center[data-v-029d9aeb]{justify-content:center}.overflow-hidden[data-v-029d9aeb]{overflow:hidden}.bg-white[data-v-029d9aeb]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-029d9aeb]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-029d9aeb]{text-align:center}.text-\[80px\][data-v-029d9aeb]{font-size:80px}.text-2xl[data-v-029d9aeb]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-029d9aeb]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-029d9aeb]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-029d9aeb]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-029d9aeb]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-029d9aeb]{font-weight:500}.font-semibold[data-v-029d9aeb]{font-weight:600}.leading-none[data-v-029d9aeb]{line-height:1}.tracking-wide[data-v-029d9aeb]{letter-spacing:.025em}.font-sans[data-v-029d9aeb]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-029d9aeb]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-029d9aeb]{text-decoration-line:underline}.underline-offset-3[data-v-029d9aeb]{text-underline-offset:3px}.antialiased[data-v-029d9aeb]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-029d9aeb]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-029d9aeb]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-029d9aeb]{font-size:110px}.sm\:text-3xl[data-v-029d9aeb]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-fd7d7560]{display:grid}.mb-2[data-v-fd7d7560]{margin-bottom:.5rem}.mb-4[data-v-fd7d7560]{margin-bottom:1rem}.max-w-520px[data-v-fd7d7560]{max-width:520px}.min-h-screen[data-v-fd7d7560]{min-height:100vh}.place-content-center[data-v-fd7d7560]{place-content:center}.overflow-hidden[data-v-fd7d7560]{overflow:hidden}.bg-white[data-v-fd7d7560]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-fd7d7560]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-fd7d7560]{text-align:center}.text-\[80px\][data-v-fd7d7560]{font-size:80px}.text-2xl[data-v-fd7d7560]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-fd7d7560]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-fd7d7560]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-fd7d7560]{font-weight:600}.leading-none[data-v-fd7d7560]{line-height:1}.tracking-wide[data-v-fd7d7560]{letter-spacing:.025em}.font-sans[data-v-fd7d7560]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-fd7d7560]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-fd7d7560]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-fd7d7560]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-fd7d7560]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-fd7d7560]{font-size:110px}.sm\:text-3xl[data-v-fd7d7560]{font-size:1.875rem;line-height:2.25rem}}
|
package/assets/native/build.zig
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const std = @import("std");
|
|
2
|
-
|
|
3
|
-
pub fn build(b: *std.Build) void {
|
|
4
|
-
const target = b.standardTargetOptions(.{});
|
|
5
|
-
const optimize = b.standardOptimizeOption(.{});
|
|
6
|
-
|
|
7
|
-
const lib = b.addSharedLibrary(.{
|
|
8
|
-
.name = "goatchain_tui_renderer",
|
|
9
|
-
.root_source_file = .{ .path = "src/lib.zig" },
|
|
10
|
-
.target = target,
|
|
11
|
-
.optimize = optimize,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
lib.linkLibC();
|
|
15
|
-
b.installArtifact(lib);
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const std = @import("std");
|
|
2
|
-
|
|
3
|
-
const ModeStream: u32 = 0;
|
|
4
|
-
const ModeSync: u32 = 1;
|
|
5
|
-
const ModeChunked: u32 = 2;
|
|
6
|
-
|
|
7
|
-
export fn goatchain_renderer_write(ptr: [*]const u8, len: usize, mode: u32, chunk_size: u32) callconv(.C) i32 {
|
|
8
|
-
if (len == 0) return 0;
|
|
9
|
-
const data = ptr[0..len];
|
|
10
|
-
const stdout_file = std.io.getStdOut();
|
|
11
|
-
|
|
12
|
-
var offset: usize = 0;
|
|
13
|
-
const use_chunked = mode == ModeChunked and chunk_size > 0;
|
|
14
|
-
while (offset < len) {
|
|
15
|
-
const remaining = len - offset;
|
|
16
|
-
const take = if (use_chunked) @min(remaining, @as(usize, chunk_size)) else remaining;
|
|
17
|
-
const slice = data[offset .. offset + take];
|
|
18
|
-
stdout_file.writeAll(slice) catch return -1;
|
|
19
|
-
offset += take;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return 0;
|
|
23
|
-
}
|