deploy: 85290df4ec69294ba52a413cc80790c81bc30dc2
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,a,r)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r,n=(e,t)=>{for(var a in t||(t={}))o.call(t,a)&&i(e,a,t[a]);if(r)for(var a of r(t))s.call(t,a)&&i(e,a,t[a]);return e},c=(e,r)=>t(e,a(r));import{C as l,J as d,K as m,L as p,M as u,N as y,O as g}from"./vendor-d6823437.js";import{_ as f}from"./preload-helper-b2c28c98.js";const h=l({loading:!1}),b=async(e,t)=>{h.set({loading:!0,message:e});const a=await t;return h.set({loading:!1}),a};let O;const v=async()=>{if(!O)try{const{Analytics:e}=await f((()=>import("./analytics.browser.es-d53875b8.js")),[]),t=await f((()=>import("./analytics-plugin-ga.browser.es-1cdb0512.js")),[]);O=e({app:"mermaid-live-editor",plugins:[t.init({trackingId:"UA-153180559-1"})]})}catch{console.info("Analytics blocked ;)")}};let S;const j={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},E=d(l(j),m(),"codeStore"),L=p([E],(([e],t)=>{t(u(JSON.stringify(e),!0))})),_=e=>{let t;try{const a=g(e);console.log(`Trying to load state: ${a}`),t=JSON.parse(a);const r="string"==typeof t.mermaid?JSON.parse(t.mermaid):t.mermaid;r.securityLevel&&"strict"!==r.securityLevel&&confirm(`Removing "securityLevel":"${r.securityLevel}" from the config for safety.\nClick Cancel if you trust the source of this Diagram.`)&&delete r.securityLevel,t.mermaid=JSON.stringify(r,null,2)}catch(a){e&&console.error("Init error",a),t=y(E),console.log(t)}w(c(n({},t),{updateEditor:!0}))},w=e=>{E.update((t=>n(n({},t),e)))};let C=!1;const T=(e,t,a=!1)=>{var r;r=e,O&&(clearTimeout(S),S=setTimeout((function(){const e=r.replace(/^\s*%%.*\n/g,"\n").trimStart().split(" ")[0];console.debug("ga:","send","event","render",e),O.track("render",{graphType:e})}),5e3));if((e.match(/\n/g)||"").length+1>50&&!C&&y(E).autoSync){const e=confirm("Long diagram detected. Turn off Auto Sync? Click the sync logo to manually sync.");C=!0,e&&w({autoSync:!1})}E.update((r=>c(n({},r),{code:e,updateEditor:t,updateDiagram:a})))},k=(e,t)=>{E.update((a=>c(n({},a),{mermaid:e,updateEditor:t})))},J=e=>{E.update((t=>{const a=JSON.parse(t.mermaid);return a.theme&&!["dark","default"].includes(a.theme)||(a.theme=e?"dark":"default"),c(n({},t),{mermaid:JSON.stringify(a,null,2),updateEditor:!0})}))},N=()=>{L.subscribe((e=>{history.replaceState(void 0,void 0,`#${e}`)}))},D=()=>JSON.stringify(y(E));export{O as a,L as b,E as c,k as d,j as e,w as f,D as g,N as h,b as i,v as j,_ as k,h as l,J as t,T as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{J as e,K as s,C as t}from"./vendor-d6823437.js";const a=e(t({isDark:!1,theme:""}),s(),"themeStore"),o=["dark","synthwave","halloween","forest","luxury","black","dracula"],r=e=>{e.includes(" ")&&(e=e.split(" ")[1].trim());const s=o.includes(e);console.log("Setting theme",e),a.set({theme:e,isDark:s})};export{r as s,a as t};
|
||||
@@ -0,0 +1 @@
|
||||
var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(e,a,o)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o,n=(t,e)=>{for(var a in e||(e={}))s.call(e,a)&&i(t,a,e[a]);if(o)for(var a of o(e))r.call(e,a)&&i(t,a,e[a]);return t},c=(t,o)=>e(t,a(o));import{C as l,S as d,i as p,s as u,e as f,c as m,a as h,d as g,b as y,Y as w,f as v,E as b,P as j,I as O,A as E,aa as S,ab as x,R as D,J as $,K as P,L as I,ac as L,N as H}from"./vendor-d6823437.js";import{c as R,e as T,f as J,i as N,h as U,j as V,a as _,k}from"./state-b315426a.js";const M=l(void 0);function z(t){let e,a;return{c(){e=f("div"),a=f("div"),this.h()},l(t){e=m(t,"DIV",{id:!0,class:!0});var o=h(e);a=m(o,"DIV",{id:!0,class:!0}),h(a).forEach(g),o.forEach(g),this.h()},h(){y(a,"id","container"),y(a,"class","flex-1 overflow-auto"),y(e,"id","view"),y(e,"class","p-2 svelte-5ndy2s"),w(e,"error",t[1]),w(e,"outOfSync",t[2])},m(o,s){v(o,e,s),b(e,a),t[3](a)},p(t,[a]){2&a&&w(e,"error",t[1]),4&a&&w(e,"outOfSync",t[2])},i:j,o:j,d(a){a&&g(e),t[3](null)}}}function A(t,e,a){let o;O(t,R,(t=>a(7,o=t)));let s,r="",i="",n=!1,c=!1,l=!0;return E((()=>{R.subscribe((t=>{try{if(s&&t&&(t.updateDiagram||t.autoSync)){if(t.autoSync||S(R,o.updateDiagram=!1,o),a(2,c=!1),l=!0,r===t.code&&i===t.mermaid)return;r=t.code,i=t.mermaid;const e=s.parentElement.parentElement.parentElement.scrollTop;delete s.dataset.processed,x.exports.initialize(Object.assign({},JSON.parse(t.mermaid))),x.exports.render("graph-div",r,(t=>{a(0,s.innerHTML=t,s)})),a(0,s.parentElement.parentElement.parentElement.scrollTop=e,s),a(1,n=!1)}else l?l=!1:a(2,c=!0)}catch(e){console.log("view fail",e),a(1,n=!0)}})),M.subscribe((t=>{void 0===t?a(1,n=!1):(a(1,n=!0),console.log("Error: ",t))}))})),[s,n,c,function(t){D[t?"unshift":"push"]((()=>{s=t,a(0,s)}))}]}class C extends d{constructor(t){super(),p(this,t,A,z,u,{})}}const G=$(l("manual"),P(),"autoHistoryMode"),K=$(l([]),P(),"autoHistoryStore"),Y=$(l([]),P(),"manualHistoryStore"),q=l([]),B=I([G,K,Y,q],(([t,e,a,o],s)=>{s("auto"===t?e:"manual"===t?a:"loader"===t?o:e)})),F=t=>{"loader"!==t.type?(t.name=L(2),"auto"===t.type?K.update((e=>(30===e.length&&e.pop(),[t,...e]))):Y.update((e=>[t,...e]))):q.update((e=>[t,...e]))},Q=t=>{("auto"===H(G)?K:Y).update((e=>("loader"!==H(G)&&(e=e.filter((e=>t&&e.time!=t))),e)))},W=t=>{const e=H(t?K:Y);return e.length>0?JSON.stringify(e[0].state):""},X=async t=>t.truncated?await(await fetch(t.raw_url)).text():t.content,Z=async t=>{const[e,a,o,s]=t.split("github.com").pop().split("/"),{html_url:r,files:i,history:n}=await(await fetch(`https://api.github.com/gists/${o}${s?"/"+s:""}`)).json();if((t=>"code.mmd"in t)(i)){const t=await X(i["code.mmd"]);let e;"config.json"in i&&(e=await X(i["config.json"]));const a=n[0];return{url:`${r}/${a.version}`,code:t,config:e,author:a.user.login,time:new Date(a.committed_at).getTime(),version:a.version.slice(-7)}}throw"Invalid gist provided"},tt=(t,e=t.url)=>{const a=c(n({},T),{code:t.code,loader:{type:"gist",config:{url:e}}});return t.config&&(a.mermaid=t.config),a},et={gist:async t=>{try{const[e,a,o,s]=t.split("github.com").pop().split("/"),{history:r}=await(await fetch(`https://api.github.com/gists/${o}${s?"/"+s:""}`)).json(),i=[];for(const t of r){const e=await Z(t.url).catch((()=>{}));e&&i.push(e)}if(0===i.length)throw"Invalid gist provided";i.reverse();const n=tt(i.slice(-1).pop(),t);for(const t of i)F({state:tt(t),time:t.time,type:"loader",url:t.url,name:`${t.author} v${t.version}`});return n}catch(e){console.error(e)}}},at=()=>{J({updateDiagram:!0})},ot=async()=>{var t;k(window.location.hash.slice(1)),await N("Loading Gist...",(async()=>{const t=new URLSearchParams(window.location.search);let e,a,o=T,s=!1;const r=t.get("code"),i=t.get("config");if(r&&(e=await(await fetch(r)).text(),s=!0),a=i?await(await fetch(i)).text():T.mermaid,e)o={code:e,mermaid:a,loader:{type:"files",config:{codeURL:r,configURL:i}}};else for(const[n,c]of t.entries())if(n in et)try{o=await et[n](c),s=!0;break}catch(l){console.error(l)}s&&J(c(n({},o),{autoSync:!0,updateDiagram:!0,updateEditor:!0}))})().catch(console.error)),at(),U(),await V(),null==(t=_)||t.page()};export{C as V,B as a,F as b,Q as c,M as e,W as g,G as h,ot as i,q as l,at as s};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{S as r,i as s,s as a,e as t,t as e,c as n,a as c,g as o,d as u,f,E as l,h as m,k as p,l as d,n as i,P as h}from"./chunks/vendor-d6823437.js";function E(r){let s,a,p=r[1].frame+"";return{c(){s=t("pre"),a=e(p)},l(r){s=n(r,"PRE",{});var t=c(s);a=o(t,p),t.forEach(u)},m(r,t){f(r,s,t),l(s,a)},p(r,s){2&s&&p!==(p=r[1].frame+"")&&m(a,p)},d(r){r&&u(s)}}}function k(r){let s,a,p=r[1].stack+"";return{c(){s=t("pre"),a=e(p)},l(r){s=n(r,"PRE",{});var t=c(s);a=o(t,p),t.forEach(u)},m(r,t){f(r,s,t),l(s,a)},p(r,s){2&s&&p!==(p=r[1].stack+"")&&m(a,p)},d(r){r&&u(s)}}}function v(r){let s,a,v,P,g,R,x,N,$=r[1].message+"",j=r[1].frame&&E(r),H=r[1].stack&&k(r);return{c(){s=t("h1"),a=e(r[0]),v=p(),P=t("pre"),g=e($),R=p(),j&&j.c(),x=p(),H&&H.c(),N=d()},l(t){s=n(t,"H1",{});var e=c(s);a=o(e,r[0]),e.forEach(u),v=i(t),P=n(t,"PRE",{});var f=c(P);g=o(f,$),f.forEach(u),R=i(t),j&&j.l(t),x=i(t),H&&H.l(t),N=d()},m(r,t){f(r,s,t),l(s,a),f(r,v,t),f(r,P,t),l(P,g),f(r,R,t),j&&j.m(r,t),f(r,x,t),H&&H.m(r,t),f(r,N,t)},p(r,[s]){1&s&&m(a,r[0]),2&s&&$!==($=r[1].message+"")&&m(g,$),r[1].frame?j?j.p(r,s):(j=E(r),j.c(),j.m(x.parentNode,x)):j&&(j.d(1),j=null),r[1].stack?H?H.p(r,s):(H=k(r),H.c(),H.m(N.parentNode,N)):H&&(H.d(1),H=null)},i:h,o:h,d(r){r&&u(s),r&&u(v),r&&u(P),r&&u(R),j&&j.d(r),r&&u(x),H&&H.d(r),r&&u(N)}}}function P({error:r,status:s}){return{props:{error:r,status:s}}}function g(r,s,a){let{status:t}=s,{error:e}=s;return r.$$set=r=>{"status"in r&&a(0,t=r.status),"error"in r&&a(1,e=r.error)},[t,e]}class R extends r{constructor(r){super(),s(this,r,g,v,a,{status:0,error:1})}}export{R as default,P as load};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as s,i as e,s as a,D as t,e as r,k as c,t as o,c as l,a as n,d as i,n as h,g as d,b as m,f as u,E as p,h as f,l as g,F as v,G as k,H as $,x as b,u as x,I as j,A as E}from"../chunks/vendor-d6823437.js";import{b as y}from"../chunks/paths-45dac81d.js";import{l as D,t as I}from"../chunks/state-b315426a.js";import{t as w,s as V}from"../chunks/theme-725c8a60.js";import"../chunks/preload-helper-b2c28c98.js";function A(s){let e,a,t,g,v,k,$=s[0].message+"";return{c(){e=r("div"),a=r("div"),t=r("div"),g=c(),v=r("div"),k=o($),this.h()},l(s){e=l(s,"DIV",{class:!0});var r=n(e);a=l(r,"DIV",{class:!0});var c=n(a);t=l(c,"DIV",{class:!0}),n(t).forEach(i),g=h(c),v=l(c,"DIV",{});var o=n(v);k=d(o,$),o.forEach(i),c.forEach(i),r.forEach(i),this.h()},h(){m(t,"class","loader mx-auto svelte-1ub1m40"),m(a,"class","text-indigo-100 text-4xl font-bold my-auto"),m(e,"class","w-screen h-screen z-50 absolute left-0 top-0 bg-gray-600 opacity-50 flex align-middle justify-center")},m(s,r){u(s,e,r),p(e,a),p(a,t),p(a,g),p(a,v),p(v,k)},p(s,e){1&e&&$!==($=s[0].message+"")&&f(k,$)},d(s){s&&i(e)}}}function N(s){let e,a,o,d;const p=s[2].default,f=t(p,s,s[1],null);let j=s[0].loading&&A(s);return{c(){e=r("main"),f&&f.c(),a=c(),j&&j.c(),o=g(),this.h()},l(s){e=l(s,"MAIN",{class:!0});var t=n(e);f&&f.l(t),t.forEach(i),a=h(s),j&&j.l(s),o=g(),this.h()},h(){m(e,"class","h-screen text-primary-content")},m(s,t){u(s,e,t),f&&f.m(e,null),u(s,a,t),j&&j.m(s,t),u(s,o,t),d=!0},p(s,[e]){f&&f.p&&(!d||2&e)&&v(f,p,s,s[1],d?$(p,s[1],e,null):k(s[1]),null),s[0].loading?j?j.p(s,e):(j=A(s),j.c(),j.m(o.parentNode,o)):j&&(j.d(1),j=null)},i(s){d||(b(f,s),d=!0)},o(s){x(f,s),d=!1},d(s){s&&i(e),f&&f.d(s),s&&i(a),j&&j.d(s),s&&i(o)}}}function M(s,e,a){let t,r;j(s,w,(s=>a(3,t=s))),j(s,D,(s=>a(0,r=s)));let{$$slots:c={},$$scope:o}=e;return E((()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(`${y}/service-worker.js`,{scope:`${y}/`}).then((function(s){console.log("Registration successful, scope is:",s.scope)})).catch((function(s){console.log("Service worker registration failed, error:",s)}));window.matchMedia("(prefers-color-scheme: dark)").matches&&""===t.theme&&V("dark"),w.subscribe((({theme:s,isDark:e})=>{s&&(document.getElementsByTagName("html")[0].setAttribute("data-theme",s),I(e))}))})),s.$$set=s=>{"$$scope"in s&&a(1,o=s.$$scope)},[r,o,c]}class S extends s{constructor(s){super(),e(this,s,M,N,a,{})}}export{S as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{S as t,i as n,s as o,A as s}from"../chunks/vendor-d6823437.js";import{r as e}from"../chunks/singletons-12a22614.js";import{b as i}from"../chunks/paths-45dac81d.js";const a=async function(t,n){return e.goto(t,n,[])};function c(t){var n=this&&this.__awaiter||function(t,n,o,s){return new(o||(o=Promise))((function(e,i){function a(t){try{r(s.next(t))}catch(n){i(n)}}function c(t){try{r(s.throw(t))}catch(n){i(n)}}function r(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}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 a(`${i}/${n}`,{replaceState:!0})})))),[]}class r extends t{constructor(t){super(),n(this,t,c,null,o,{})}}export{r as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as s,i as a,s as t,j as r,m as e,o as n,P as o,x as c,u,v as m,A as i}from"../chunks/vendor-d6823437.js";import{V as f,i as p}from"../chunks/util-3c9ad551.js";import"../chunks/state-b315426a.js";import"../chunks/preload-helper-b2c28c98.js";function $(s){let a,t;return a=new f({}),{c(){r(a.$$.fragment)},l(s){e(a.$$.fragment,s)},m(s,r){n(a,s,r),t=!0},p:o,i(s){t||(c(a.$$.fragment,s),t=!0)},o(s){u(a.$$.fragment,s),t=!1},d(s){m(a,s)}}}function d(s){return i(p),[]}class l extends s{constructor(s){super(),a(this,s,d,$,t,{})}}export{l as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -50,15 +50,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-44575f1f.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-4cf3bda8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-17c288f8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-d6823437.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/preload-helper-b2c28c98.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/singletons-12a22614.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/beta/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-44575f1f.js";
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-17c288f8.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor/beta","assets":"/mermaid-live-editor/beta"},
|
||||
|
||||
+3
-3
@@ -50,15 +50,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-44575f1f.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-4cf3bda8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-17c288f8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-d6823437.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/preload-helper-b2c28c98.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/singletons-12a22614.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/beta/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-44575f1f.js";
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-17c288f8.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor/beta","assets":"/mermaid-live-editor/beta"},
|
||||
|
||||
@@ -50,15 +50,15 @@
|
||||
|
||||
|
||||
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-44575f1f.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-4cf3bda8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/start-17c288f8.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/vendor-d6823437.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/preload-helper-b2c28c98.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/singletons-12a22614.js">
|
||||
<link rel="modulepreload" href="/mermaid-live-editor/beta/_app/chunks/paths-45dac81d.js">
|
||||
<link rel="stylesheet" href="/mermaid-live-editor/beta/_app/assets/start-0826e215.css">
|
||||
|
||||
<script type="module">
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-44575f1f.js";
|
||||
import { start } from "/mermaid-live-editor/beta/_app/start-17c288f8.js";
|
||||
start({
|
||||
target: document.querySelector("#svelte"),
|
||||
paths: {"base":"/mermaid-live-editor/beta","assets":"/mermaid-live-editor/beta"},
|
||||
|
||||
Reference in New Issue
Block a user