Files
mermaid-live-editor/_app/immutable/chunks/index-e871a861.js
T
2023-03-15 19:11:24 +00:00

5 lines
12 KiB
JavaScript

function p(){}const ht=t=>t;function mt(t,e){for(const n in e)t[n]=e[n];return t}function tt(t){return t()}function U(){return Object.create(null)}function b(t){t.forEach(tt)}function q(t){return typeof t=="function"}function pt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let C;function Jt(t,e){return C||(C=document.createElement("a")),C.href=e,t===C.href}function gt(t){return Object.keys(t).length===0}function I(t,...e){if(t==null)return p;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Kt(t){let e;return I(t,n=>e=n)(),e}function Qt(t,e,n){t.$$.on_destroy.push(I(e,n))}function Ut(t,e,n,i){if(t){const r=et(t,e,n,i);return t[0](r)}}function et(t,e,n,i){return t[1]&&i?mt(n.ctx.slice(),t[1](i(e))):n.ctx}function Vt(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const u=[],c=Math.max(e.dirty.length,r.length);for(let s=0;s<c;s+=1)u[s]=e.dirty[s]|r[s];return u}return e.dirty|r}return e.dirty}function Xt(t,e,n,i,r,u){if(r){const c=et(e,n,i,u);t.p(c,r)}}function Yt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function Zt(t){return t??""}function te(t,e,n){return t.set(n),e}const nt=typeof window<"u";let yt=nt?()=>window.performance.now():()=>Date.now(),W=nt?t=>requestAnimationFrame(t):p;const E=new Set;function it(t){E.forEach(e=>{e.c(t)||(E.delete(e),e.f())}),E.size!==0&&W(it)}function bt(t){let e;return E.size===0&&W(it),{promise:new Promise(n=>{E.add(e={c:t,f:n})}),abort(){E.delete(e)}}}let D=!1;function $t(){D=!0}function xt(){D=!1}function wt(t,e,n,i){for(;t<e;){const r=t+(e-t>>1);n(r)<=i?t=r+1:e=r}return t}function vt(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const o=[];for(let l=0;l<e.length;l++){const _=e[l];_.claim_order!==void 0&&o.push(_)}e=o}const n=new Int32Array(e.length+1),i=new Int32Array(e.length);n[0]=-1;let r=0;for(let o=0;o<e.length;o++){const l=e[o].claim_order,_=(r>0&&e[n[r]].claim_order<=l?r+1:wt(1,r,h=>e[n[h]].claim_order,l))-1;i[o]=n[_]+1;const f=_+1;n[f]=o,r=Math.max(f,r)}const u=[],c=[];let s=e.length-1;for(let o=n[r]+1;o!=0;o=i[o-1]){for(u.push(e[o-1]);s>=o;s--)c.push(e[s]);s--}for(;s>=0;s--)c.push(e[s]);u.reverse(),c.sort((o,l)=>o.claim_order-l.claim_order);for(let o=0,l=0;o<c.length;o++){for(;l<u.length&&c[o].claim_order>=u[l].claim_order;)l++;const _=l<u.length?u[l]:null;t.insertBefore(c[o],_)}}function Et(t,e){t.appendChild(e)}function rt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Nt(t){const e=J("style");return At(rt(t),e),e.sheet}function At(t,e){return Et(t.head||t,e),e.sheet}function Tt(t,e){if(D){for(vt(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?(e.claim_order!==void 0||e.parentNode!==t)&&t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else(e.parentNode!==t||e.nextSibling!==null)&&t.appendChild(e)}function St(t,e,n){t.insertBefore(e,n||null)}function kt(t,e,n){D&&!n?Tt(t,e):(e.parentNode!==t||e.nextSibling!=n)&&t.insertBefore(e,n||null)}function T(t){t.parentNode&&t.parentNode.removeChild(t)}function ee(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function J(t){return document.createElement(t)}function st(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t){return document.createTextNode(t)}function ne(){return K(" ")}function ie(){return K("")}function re(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function se(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function ce(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function le(t){return t===""?null:+t}function Ct(t){return Array.from(t.childNodes)}function ct(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function lt(t,e,n,i,r=!1){ct(t);const u=(()=>{for(let c=t.claim_info.last_index;c<t.length;c++){const s=t[c];if(e(s)){const o=n(s);return o===void 0?t.splice(c,1):t[c]=o,r||(t.claim_info.last_index=c),s}}for(let c=t.claim_info.last_index-1;c>=0;c--){const s=t[c];if(e(s)){const o=n(s);return o===void 0?t.splice(c,1):t[c]=o,r?o===void 0&&t.claim_info.last_index--:t.claim_info.last_index=c,s}}return i()})();return u.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,u}function ot(t,e,n,i){return lt(t,r=>r.nodeName===e,r=>{const u=[];for(let c=0;c<r.attributes.length;c++){const s=r.attributes[c];n[s.name]||u.push(s.name)}u.forEach(c=>r.removeAttribute(c))},()=>i(e))}function oe(t,e,n){return ot(t,e,n,J)}function ue(t,e,n){return ot(t,e,n,st)}function Mt(t,e){return lt(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>K(e),!0)}function ae(t){return Mt(t," ")}function V(t,e,n){for(let i=n;i<t.length;i+=1){const r=t[i];if(r.nodeType===8&&r.textContent.trim()===e)return i}return t.length}function fe(t,e){const n=V(t,"HTML_TAG_START",0),i=V(t,"HTML_TAG_END",n);if(n===i)return new X(void 0,e);ct(t);const r=t.splice(n,i-n+1);T(r[0]),T(r[r.length-1]);const u=r.slice(1,r.length-1);for(const c of u)c.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1;return new X(u,e)}function _e(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function de(t,e){t.value=e??""}function he(t,e,n,i){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function me(t,e,n){t.classList[n?"add":"remove"](e)}function ut(t,e,{bubbles:n=!1,cancelable:i=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,i,e),r}class jt{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=st(n.nodeName):this.e=J(n.nodeName),this.t=n,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)St(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(T)}}class X extends jt{constructor(e,n=!1){super(n),this.e=this.n=null,this.l=e}c(e){this.l?this.n=this.l:super.c(e)}i(e){for(let n=0;n<this.n.length;n+=1)kt(this.t,this.n[n],e)}}function pe(t,e){return new t(e)}const H=new Map;let L=0;function Ht(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Lt(t,e){const n={stylesheet:Nt(e),rules:{}};return H.set(t,n),n}function Y(t,e,n,i,r,u,c,s=0){const o=16.666/i;let l=`{
`;for(let y=0;y<=1;y+=o){const $=e+(n-e)*u(y);l+=y*100+`%{${c($,1-$)}}
`}const _=l+`100% {${c(n,1-n)}}
}`,f=`__svelte_${Ht(_)}_${s}`,h=rt(t),{stylesheet:a,rules:d}=H.get(h)||Lt(h,t);d[f]||(d[f]=!0,a.insertRule(`@keyframes ${f} ${_}`,a.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${f} ${i}ms linear ${r}ms 1 both`,L+=1,f}function Pt(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?u=>u.indexOf(e)<0:u=>u.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),L-=r,L||qt())}function qt(){W(()=>{L||(H.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&T(e)}),H.clear())})}let S;function A(t){S=t}function Q(){if(!S)throw new Error("Function called outside component initialization");return S}function ge(t){Q().$$.on_mount.push(t)}function ye(t){Q().$$.after_update.push(t)}function be(){const t=Q();return(e,n,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[e];if(r){const u=ut(e,n,{cancelable:i});return r.slice().forEach(c=>{c.call(t,u)}),!u.defaultPrevented}return!0}}function $e(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const v=[],Z=[],M=[],F=[],at=Promise.resolve();let G=!1;function ft(){G||(G=!0,at.then(_t))}function xe(){return ft(),at}function P(t){M.push(t)}function we(t){F.push(t)}const R=new Set;let x=0;function _t(){if(x!==0)return;const t=S;do{try{for(;x<v.length;){const e=v[x];x++,A(e),Dt(e.$$)}}catch(e){throw v.length=0,x=0,e}for(A(null),v.length=0,x=0;Z.length;)Z.pop()();for(let e=0;e<M.length;e+=1){const n=M[e];R.has(n)||(R.add(n),n())}M.length=0}while(v.length);for(;F.length;)F.pop()();G=!1,R.clear(),A(t)}function Dt(t){if(t.fragment!==null){t.update(),b(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}let N;function zt(){return N||(N=Promise.resolve(),N.then(()=>{N=null})),N}function B(t,e,n){t.dispatchEvent(ut(`${e?"intro":"outro"}${n}`))}const j=new Set;let g;function ve(){g={r:0,c:[],p:g}}function Ee(){g.r||b(g.c),g=g.p}function Ot(t,e){t&&t.i&&(j.delete(t),t.i(e))}function Ne(t,e,n,i){if(t&&t.o){if(j.has(t))return;j.add(t),g.c.push(()=>{j.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const Rt={duration:0};function Ae(t,e,n,i){const r={direction:"both"};let u=e(t,n,r),c=i?0:1,s=null,o=null,l=null;function _(){l&&Pt(t,l)}function f(a,d){const m=a.b-c;return d*=Math.abs(m),{a:c,b:a.b,d:m,duration:d,start:a.start,end:a.start+d,group:a.group}}function h(a){const{delay:d=0,duration:m=300,easing:y=ht,tick:$=p,css:z}=u||Rt,O={start:yt()+d,b:a};a||(O.group=g,g.r+=1),s||o?o=O:(z&&(_(),l=Y(t,c,a,m,d,y,z)),a&&$(0,1),s=f(O,m),P(()=>B(t,a,"start")),bt(k=>{if(o&&k>o.start&&(s=f(o,m),o=null,B(t,s.b,"start"),z&&(_(),l=Y(t,c,s.b,s.duration,0,y,u.css))),s){if(k>=s.end)$(c=s.b,1-c),B(t,s.b,"end"),o||(s.b?_():--s.group.r||b(s.group.c)),s=null;else if(k>=s.start){const dt=k-s.start;c=s.a+s.d*y(dt/s.duration),$(c,1-c)}}return!!(s||o)}))}return{run(a){q(u)?zt().then(()=>{u=u(r),h(a)}):h(a)},end(){_(),s=o=null}}}function Te(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Se(t){t&&t.c()}function ke(t,e){t&&t.l(e)}function Bt(t,e,n,i){const{fragment:r,after_update:u}=t.$$;r&&r.m(e,n),i||P(()=>{const c=t.$$.on_mount.map(tt).filter(q);t.$$.on_destroy?t.$$.on_destroy.push(...c):b(c),t.$$.on_mount=[]}),u.forEach(P)}function Ft(t,e){const n=t.$$;n.fragment!==null&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Gt(t,e){t.$$.dirty[0]===-1&&(v.push(t),ft(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Ce(t,e,n,i,r,u,c,s=[-1]){const o=S;A(t);const l=t.$$={fragment:null,ctx:[],props:u,update:p,not_equal:r,bound:U(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:U(),dirty:s,skip_bound:!1,root:e.target||o.$$.root};c&&c(l.root);let _=!1;if(l.ctx=n?n(t,e.props||{},(f,h,...a)=>{const d=a.length?a[0]:h;return l.ctx&&r(l.ctx[f],l.ctx[f]=d)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](d),_&&Gt(t,f)),h}):[],l.update(),_=!0,b(l.before_update),l.fragment=i?i(l.ctx):!1,e.target){if(e.hydrate){$t();const f=Ct(e.target);l.fragment&&l.fragment.l(f),f.forEach(T)}else l.fragment&&l.fragment.c();e.intro&&Ot(t.$$.fragment),Bt(t,e.target,e.anchor,e.customElement),xt(),_t()}A(o)}class Me{$destroy(){Ft(this,1),this.$destroy=p}$on(e,n){if(!q(n))return p;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!gt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const w=[];function It(t,e){return{subscribe:Wt(t,e).subscribe}}function Wt(t,e=p){let n;const i=new Set;function r(s){if(pt(t,s)&&(t=s,n)){const o=!w.length;for(const l of i)l[1](),w.push(l,t);if(o){for(let l=0;l<w.length;l+=2)w[l][0](w[l+1]);w.length=0}}}function u(s){r(s(t))}function c(s,o=p){const l=[s,o];return i.add(l),i.size===1&&(n=e(r)||p),s(t),()=>{i.delete(l),i.size===0&&(n(),n=null)}}return{set:r,update:u,subscribe:c}}function je(t,e,n){const i=!Array.isArray(t),r=i?[t]:t,u=e.length<2;return It(n,c=>{let s=!1;const o=[];let l=0,_=p;const f=()=>{if(l)return;_();const a=e(i?o[0]:o,c);u?c(a):_=q(a)?a:p},h=r.map((a,d)=>I(a,m=>{o[d]=m,l&=~(1<<d),s&&f()},()=>{l|=1<<d}));return s=!0,f(),function(){b(h),_()}})}export{we as $,Ft as A,xe as B,Wt as C,Ut as D,Xt as E,Yt as F,Vt as G,Qt as H,Tt as I,je as J,Kt as K,p as L,st as M,ue as N,ee as O,me as P,re as Q,b as R,Me as S,Jt as T,Zt as U,ht as V,se as W,be as X,P as Y,Ae as Z,Te as _,ne as a,$e as a0,de as a1,le as a2,te as a3,X as a4,fe as a5,kt as b,ae as c,Ee as d,ie as e,Ot as f,ve as g,T as h,Ce as i,ye as j,J as k,oe as l,Ct as m,ce as n,ge as o,he as p,K as q,Mt as r,pt as s,Ne as t,_e as u,Z as v,pe as w,Se as x,ke as y,Bt as z};