Release 2.0.12
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
var e=Object.defineProperty,a=Object.defineProperties,t=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(a,t,n)=>t in a?e(a,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[t]=n,i=(e,a)=>{for(var t in a||(a={}))r.call(a,t)&&s(e,t,a[t]);if(n)for(var t of n(a))o.call(a,t)&&s(e,t,a[t]);return e},c=(e,n)=>a(e,t(n));import{a2 as l,a3 as d,C as p,a4 as u,a0 as m,a6 as f,a8 as y,S as g,i as h,s as v,e as b,c as w,a as O,d as E,b as S,N as T,f as _,F as D,G as j,H as x,z as P,a7 as C,J as A}from"./vendor-28987c6c.js";import{_ as I}from"./preload-helper-9f12a5fd.js";let J;let N;const L=l(p({code:"graph TD\n A[Christmas] --\x3e|Get money| B(Go shopping)\n B --\x3e C{Let me think}\n C --\x3e|One| D[Laptop]\n C --\x3e|Two| E[iPhone]\n C --\x3e|Three| F[fa:fa-car Car]\n ",mermaid:JSON.stringify({theme:"default"},null,2),updateEditor:!1,autoSync:!0,updateDiagram:!0}),d(),"codeStore"),k=u([L],(([e],a)=>{a(m(JSON.stringify(e),!0))})),V=e=>{L.update((a=>i(i({},a),e)))};let G=!1;const z=(e,a,t=!1)=>{var n;n=e,J&&(clearTimeout(N),N=setTimeout((function(){const e=n.replace(/^\s*%%.*\n/g,"\n").trimStart().split(" ")[0];console.debug("ga:","send","event","render",e),J.track("render",{graphType:e})}),5e3));if((e.match(/\n/g)||"").length+1>50&&!G&&f(L).autoSync){const e=confirm("Long diagram deteced. Turn off Auto Sync? Click the sync logo to manually sync.");G=!0,e&&V({autoSync:!1})}L.update((n=>c(i({},n),{code:e,updateEditor:a,updateDiagram:t})))},B=(e,a)=>{L.update((t=>c(i({},t),{mermaid:e,updateEditor:a})))},F=()=>JSON.stringify(f(L)),H=p(void 0);function R(e){let a,t;return{c(){a=b("div"),t=b("div"),this.h()},l(e){a=w(e,"DIV",{id:!0,class:!0});var n=O(a);t=w(n,"DIV",{id:!0,class:!0}),O(t).forEach(E),n.forEach(E),this.h()},h(){S(t,"id","container"),S(t,"class","flex-1 overflow-auto"),S(a,"id","view"),S(a,"class","p-2 svelte-7vvt6c"),T(a,"error",e[1]),T(a,"outOfSync",e[2])},m(n,r){_(n,a,r),D(a,t),e[3](t)},p(e,[t]){2&t&&T(a,"error",e[1]),4&t&&T(a,"outOfSync",e[2])},i:j,o:j,d(t){t&&E(a),e[3](null)}}}function M(e,a,t){let n;x(e,L,(e=>t(6,n=e)));var r=this&&this.__awaiter||function(e,a,t,n){return new(t||(t=Promise))((function(r,o){function s(e){try{c(n.next(e))}catch(a){o(a)}}function i(e){try{c(n.throw(e))}catch(a){o(a)}}function c(e){var a;e.done?r(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(s,i)}c((n=n.apply(e,a||[])).next())}))};const o=window.mermaid;let s,i="",c=!1,l=!1,d=!0;return P((()=>r(void 0,void 0,void 0,(function*(){L.subscribe((e=>{try{if(s&&e&&(e.updateDiagram||e.autoSync)){e.autoSync||C(L,n.updateDiagram=!1,n),t(2,l=!1),d=!0,i=e.code;const a=s.parentElement.parentElement.parentElement.scrollTop;t(0,s.innerHTML=i,s),delete s.dataset.processed,o.initialize(Object.assign({},JSON.parse(e.mermaid))),o.init(s),o.render("graph-div",i),t(0,s.parentElement.parentElement.parentElement.scrollTop=a,s)}else d?d=!1:t(2,l=!0)}catch(a){console.log("view fail",a),t(1,c=!0)}})),H.subscribe((e=>{void 0===e?t(1,c=!1):(t(1,c=!0),console.log("Error: ",e))}))})))),[s,c,l,function(e){A[e?"unshift":"push"]((()=>{s=e,t(0,s)}))}]}class U extends g{constructor(e){super(),h(this,e,M,R,v,{})}}const $=()=>{(e=>{let a;try{const t=y(e);console.log(`Tring to load state: ${t}`),a=JSON.parse(t),"string"!=typeof a.mermaid&&(a.mermaid=JSON.stringify(a.mermaid,null,2))}catch(t){e&&console.error("Init error",t),a=f(L),console.log(a)}V(c(i({},a),{updateEditor:!0}))})(window.location.hash.slice(1))},q=()=>{V({updateDiagram:!0})},K=async()=>{$(),q(),k.subscribe((e=>{window.location.hash=e})),await(async()=>{if(!J)try{const{Analytics:e}=await I((()=>import("./analytics.browser.es-eaddcc60.js")),void 0),a=await I((()=>import("./analytics-plugin-ga.browser.es-9bc8c1dc.js")),void 0);J=e({app:"mermaid-live-editor",plugins:[a.init({trackingId:"UA-153180559-1"})]})}catch{console.info("Analytics blocked ;)")}})(),null==J||J.page()};export{U as V,J as a,k as b,L as c,B as d,H as e,F as g,K as i,q as s,z as u};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{S as s,i as r,s as a,e as t,t as e,c as o,a as c,g as n,d as u,f as p,F as l,h as f,k as i,l as d,n as m,G as h}from"./chunks/vendor-28987c6c.js";function k(s){let r,a,i=s[1].stack+"";return{c(){r=t("pre"),a=e(i)},l(s){r=o(s,"PRE",{});var t=c(r);a=n(t,i),t.forEach(u)},m(s,t){p(s,r,t),l(r,a)},p(s,r){2&r&&i!==(i=s[1].stack+"")&&f(a,i)},d(s){s&&u(r)}}}function v(s){let r,a,v,E,g,x,P,$=s[1].message+"",j=s[1].stack&&k(s);return{c(){r=t("h1"),a=e(s[0]),v=i(),E=t("p"),g=e($),x=i(),j&&j.c(),P=d()},l(t){r=o(t,"H1",{});var e=c(r);a=n(e,s[0]),e.forEach(u),v=m(t),E=o(t,"P",{});var p=c(E);g=n(p,$),p.forEach(u),x=m(t),j&&j.l(t),P=d()},m(s,t){p(s,r,t),l(r,a),p(s,v,t),p(s,E,t),l(E,g),p(s,x,t),j&&j.m(s,t),p(s,P,t)},p(s,[r]){1&r&&f(a,s[0]),2&r&&$!==($=s[1].message+"")&&f(g,$),s[1].stack?j?j.p(s,r):(j=k(s),j.c(),j.m(P.parentNode,P)):j&&(j.d(1),j=null)},i:h,o:h,d(s){s&&u(r),s&&u(v),s&&u(E),s&&u(x),j&&j.d(s),s&&u(P)}}}function E({error:s,status:r}){return{props:{error:s,status:r}}}function g(s,r,a){let{status:t}=r,{error:e}=r;return s.$$set=s=>{"status"in s&&a(0,t=s.status),"error"in s&&a(1,e=s.error)},[t,e]}export default class extends s{constructor(s){super(),r(this,s,g,v,a,{status:0,error:1})}}export{E as load};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as s,i as a,s as c,D as t,e,c as l,a as n,d as o,b as r,f as u,E as i,v as $,r as h}from"../chunks/vendor-28987c6c.js";function p(s){let a,c;const p=s[1].default,d=t(p,s,s[0],null);return{c(){a=e("main"),d&&d.c(),this.h()},l(s){a=l(s,"MAIN",{class:!0});var c=n(a);d&&d.l(c),c.forEach(o),this.h()},h(){r(a,"class","h-screen")},m(s,t){u(s,a,t),d&&d.m(a,null),c=!0},p(s,[a]){d&&d.p&&(!c||1&a)&&i(d,p,s,s[0],a,null,null)},i(s){c||($(d,s),c=!0)},o(s){h(d,s),c=!1},d(s){s&&o(a),d&&d.d(s)}}}function d(s,a,c){let{$$slots:t={},$$scope:e}=a;return s.$$set=s=>{"$$scope"in s&&c(0,e=s.$$scope)},[e,t]}export default class extends s{constructor(s){super(),a(this,s,d,p,c,{})}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{S as t,i as n,s as o,z as s}from"../chunks/vendor-28987c6c.js";import{g as i}from"../chunks/navigation-20968cc5.js";import{b as c}from"../chunks/paths-45dac81d.js";import"../chunks/singletons-bb9012b7.js";function e(t){var n=this&&this.__awaiter||function(t,n,o,s){return new(o||(o=Promise))((function(i,c){function e(t){try{r(s.next(t))}catch(n){c(n)}}function a(t){try{r(s.throw(t))}catch(n){c(n)}}function r(t){var n;t.done?i(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(e,a)}r((s=s.apply(t,n||[])).next())}))};return s((()=>n(void 0,void 0,void 0,(function*(){const t=window.location.hash.split("/");let n="edit";t.length>2&&(n=`${t[1]}#${t[2]}`),yield i(`${c}/${n}`,{replaceState:!0})})))),[]}export default class extends t{constructor(t){super(),n(this,t,e,null,o,{})}}
|
||||
@@ -0,0 +1 @@
|
||||
import{S as s,i as a,s as r,j as e,m as t,o as n,G as o,v as c,r as f,w as m,z as u}from"../chunks/vendor-28987c6c.js";import{V as i,i as p}from"../chunks/util-e742e627.js";import"../chunks/preload-helper-9f12a5fd.js";function $(s){let a,r;return a=new i({}),{c(){e(a.$$.fragment)},l(s){t(a.$$.fragment,s)},m(s,e){n(a,s,e),r=!0},p:o,i(s){r||(c(a.$$.fragment,s),r=!0)},o(s){f(a.$$.fragment,s),r=!1},d(s){m(a,s)}}}function l(s){return u(p),[]}export default class extends s{constructor(s){super(),a(this,s,l,$,r,{})}}
|
||||
File diff suppressed because one or more lines are too long
@@ -58,15 +58,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-16e7597e.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-1d5f1e16.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-76672d45.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-28987c6c.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/preload-helper-9f12a5fd.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/_app/start-16e7597e.js";
|
||||
import { start } from "/mermaid-live-editor/_app/start-76672d45.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
|
||||
|
||||
+3
-3
@@ -58,15 +58,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-16e7597e.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-1d5f1e16.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-76672d45.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-28987c6c.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/preload-helper-9f12a5fd.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/_app/start-16e7597e.js";
|
||||
import { start } from "/mermaid-live-editor/_app/start-76672d45.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
|
||||
|
||||
@@ -58,15 +58,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-16e7597e.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-1d5f1e16.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/start-76672d45.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/vendor-28987c6c.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/preload-helper-9f12a5fd.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/_app/start-16e7597e.js";
|
||||
import { start } from "/mermaid-live-editor/_app/start-76672d45.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor","assets":"/mermaid-live-editor"},
|
||||
|
||||
Reference in New Issue
Block a user