book/mermaid.min.js

1283 lines
1.0 MiB
JavaScript
Raw Normal View History

2023-04-17 21:23:10 +00:00
/* MIT Licensed. Copyright (c) 2014 - 2022 Knut Sveidqvist */
/* For license information please see https://github.com/mermaid-js/mermaid/blob/v9.2.2/LICENSE */
(function(jr,wn){typeof exports=="object"&&typeof module<"u"?module.exports=wn():typeof define=="function"&&define.amd?define(wn):(jr=typeof globalThis<"u"?globalThis:jr||self,jr.mermaid=wn())})(this,function(){"use strict";var Ost=Object.defineProperty;var Fst=(jr,wn,fn)=>wn in jr?Ost(jr,wn,{enumerable:!0,configurable:!0,writable:!0,value:fn}):jr[wn]=fn;var vl=(jr,wn,fn)=>(Fst(jr,typeof wn!="symbol"?wn+"":wn,fn),fn);var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function fn(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var y_={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(jr,function(){var r;function n(){return r.apply(null,arguments)}function i(g){return g instanceof Array||Object.prototype.toString.call(g)==="[object Array]"}function a(g){return g!=null&&Object.prototype.toString.call(g)==="[object Object]"}function s(g,E){return Object.prototype.hasOwnProperty.call(g,E)}function o(g){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(g).length===0;for(var E in g)if(s(g,E))return;return 1}function l(g){return g===void 0}function u(g){return typeof g=="number"||Object.prototype.toString.call(g)==="[object Number]"}function h(g){return g instanceof Date||Object.prototype.toString.call(g)==="[object Date]"}function d(g,E){for(var I=[],O=g.length,G=0;G<O;++G)I.push(E(g[G],G));return I}function f(g,E){for(var I in E)s(E,I)&&(g[I]=E[I]);return s(E,"toString")&&(g.toString=E.toString),s(E,"valueOf")&&(g.valueOf=E.valueOf),g}function p(g,E,I,O){return Dr(g,E,I,O,!0).utc()}function m(g){return g._pf==null&&(g._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),g._pf}function _(g){if(g._isValid==null){var E=m(g),I=b.call(E.parsedDateParts,function(O){return O!=null}),I=!isNaN(g._d.getTime())&&E.overflow<0&&!E.empty&&!E.invalidEra&&!E.invalidMonth&&!E.invalidWeekday&&!E.weekdayMismatch&&!E.nullInput&&!E.invalidFormat&&!E.userInvalidated&&(!E.meridiem||E.meridiem&&I);if(g._strict&&(I=I&&E.charsLeftOver===0&&E.unusedTokens.length===0&&E.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(g))return I;g._isValid=I}return g._isValid}function y(g){var E=p(NaN);return g!=null?f(m(E),g):m(E).userInvalidated=!0,E}var b=Array.prototype.some||function(g){for(var E=Object(this),I=E.length>>>0,O=0;O<I;O++)if(O in E&&g.call(this,E[O],O,E))return!0;return!1},x=n.momentProperties=[],k=!1;function T(g,E){var I,O,G,ht=x.length;if(l(E._isAMomentObject)||(g._isAMomentObject=E._isAMomentObject),l(E._i)||(g._i=E._i),l(E._f)||(g._f=E._f),l(E._l)||(g._l=E._l),l(E._strict)||(g._strict=E._strict),l(E._tzm)||(g._tzm=E._tzm),l(E._isUTC)||(g._isUTC=E._isUTC),l(E._offset)||(g._offset=E._offset),l(E._pf)||(g._pf=m(E)),l(E._locale)||(g._locale=E._locale),0<ht)for(I=0;I<ht;I++)l(G=E[O=x[I]])||(g[O]=G);return g}function C(g){T(this,g),this._d=new Date(g._d!=null?g._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),k===!1&&(k=!0,n.updateOffset(this),k=!1)}function M(g){return g instanceof C||g!=null&&g._isAMomentObject!=null}function S(g){n.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+g)}function R(g,E){var I=!0;return f(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,g),I){for(var O,G,ht=[],xt=arguments.length,Mt=0;Mt<xt;Mt++){if(O="",typeof arguments[Mt]=="object"){for(G in O+=`
[`+Mt+"] ",arguments[0])s(arguments[0],G)&&(O+=G+": "+arguments[0][G]+", ");O=O.slice(0,-2)}else O=arguments[Mt];ht.push(O)}S(g+`
Arguments: `+Array.prototype.slice.call(ht).join("")+`
`+new Error().stack),I=!1}return E.apply(this,arguments)},E)}var A={};function L(g,E){n.deprecationHandler!=null&&n.deprecationHandler(g,E),A[g]||(S(E),A[g]=!0)}function v(g){return typeof Function<"u"&&g instanceof Function||Object.prototype.toString.call(g)==="[object Function]"}function B(g,E){var I,O=f({},g);for(I in E)s(E,I)&&(a(g[I])&&a(E[I])?(O[I]={},f(O[I],g[I]),f(O[I],E[I])):E[I]!=null?O[I]=E[I]:delete O[I]);for(I in g)s(g,I)&&!s(E,I)&&a(g[I])&&(O[I]=f({},O[I]));return O}function w(g){g!=null&&this.set(g)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var D=Object.keys||function(g){var E,I=[];for(E in g)s(g,E)&&I.push(E);return I};function N(g,E,I){var O=""+Math.abs(g);return(0<=g?I?"+":"":"-")+Math.pow(10,Math.max(0,E-O.length)).toString().substr(1)+O}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,X=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ct={},J={};function Y(g,E,I,O){var G=typeof O=="string"?function(){return this[O]()}:O;g&&(J[g]=G),E&&(J[E[0]]=function(){return N(G.apply(this,arguments),E[1],E[2])}),I&&(J[I]=function(){return this.localeData().ordinal(G.apply(this,arguments),g)})}function $(g,E){return g.isValid()?(E=lt(E,g.localeData()),ct[E]=ct[E]||function(I){for(var O,G=I.match(z),ht=0,xt=G.length;ht<xt;ht++)J[G[ht]]?G[ht]=J[G[ht]]:G[ht]=(O=G[ht]).match(/\[[\s\S]/)?O.replace(/^\[|\]$/g,""):O.replace(/\\/g,"");return function(Mt){for(var Vt="",Ot=0;Ot<xt;Ot++)Vt+=v(G[Ot])?G[Ot].call(Mt,I):G[Ot];return Vt}}(E),ct[E](g)):g.localeData().invalidDate()}function lt(g,E){var I=5;function O(G){return E.longDateFormat(G)||G}for(X.lastIndex=0;0<=I&&X.test(g);)g=g.replace(X,O),X.lastIndex=0,--I;return g}var ut={};function W(g,E){var I=g.toLowerCase();ut[I]=ut[I+"s"]=ut[E]=g}function tt(g){return typeof g=="string"?ut[g]||ut[g.toLowerCase()]:void 0}function K(g){var E,I,O={};for(I in g)s(g,I)&&(E=tt(I))&&(O[E]=g[I]);return O}var it={};function Z(g,E){it[g]=E}function V(g){return g%4==0&&g%100!=0||g%400==0}function Q(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function q(E){var E=+E,I=0;return I=E!=0&&isFinite(E)?Q(E):I}function U(g,E){return function(I){return I!=null?(j(this,g,I),n.updateOffset(this,E),this):F(this,g)}}function F(g,E){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+E]():NaN}function j(g,E,I){g.isValid()&&!isNaN(I)&&(E==="FullYear"&&V(g.year())&&g.month()===1&&g.date()===29?(I=q(I),g._d["set"+(g._isUTC?"UTC":"")+E](I,g.month(),yt(I,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+E](I))}var P=/\d/,fe=/\d\d/,et=/\d{3}/,to=/\d{4}/,os=/[+-]?\d{6}/,at=/\d\d?/,It=/\d\d\d\d?/,Lt=/\d\d\d\d\d\d?/,Rt=/\d{1,3}/,ls=/\d{1,4}/,ss=/[+-]?\d{1,6}/,Ct=/\d+/,pt=/[+-]?\d+/,mt=/Z|[+-]\d\d:?\d\d/gi,vt=/Z|[+-]\d\d(?::?\d\d)?/gi,Tt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ft(g,E,I){Gt[g]=v(E)?E:function(O,G){return O&&I?I:E}}function le(g,E){return s(Gt,g)?Gt[g](E._strict,E._locale):new RegExp(Dt(g.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(I,O,G,ht,xt){return O||G||ht||xt})))}function Dt(g){return g.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Gt={},$t={};function Qt(g,E){var I,O,G=E;for(typeof g=="string"&&(g=[g]),u(E)&&(G=function(ht,xt){xt[E]=q(ht)}),O=g.length,I=0;I<O;I++)$t[g[I]]=G}function we(g,E){Qt(g,function(I,O,G,ht){G._w=G._w||{},E(I,G._w,G,ht)})}var jt,Ft=0,zt=1,wt=2,bt=3,Et=4,kt=5,Ut=6,gt=7,he=8;function yt(g,E){if(isNaN(g)||isNaN(E))return NaN;var I=(E%(I=12)+I)%I;return g+=(E-I)/12,I==1?V(g)?29:28:31-I%7%2}jt=Array.prototype.indexOf||function(g){for(var E=0;E<this.length;++E)if(this[E]===g)return E;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(g){return this.localeData().monthsShort(this,g)}),Y("MMMM",0,0,function(g){return this.localeData().months(this,g)}),W("month","M"),Z("month",8),ft("M",at),ft("MM",at,fe),ft("MMM",function(g,E){return E.months
\r]`),r=t.charCodeAt(0);function n(d,f){var p,m,_=i(d,function(y,b){if(p)return p(y,b-1);m=y,p=f?UF(y,f):Dv(y)});return _.columns=m||[],_}function i(d,f){var p=[],m=d.length,_=0,y=0,b,x=m<=0,k=!1;d.charCodeAt(m-1)===Wl&&--m,d.charCodeAt(m-1)===Kd&&--m;function T(){if(x)return $d;if(k)return k=!1,Bv;var M,S=_,R;if(d.charCodeAt(S)===Xd){for(;_++<m&&d.charCodeAt(_)!==Xd||d.charCodeAt(++_)===Xd;);return(M=_)>=m?x=!0:(R=d.charCodeAt(_++))===Wl?k=!0:R===Kd&&(k=!0,d.charCodeAt(_)===Wl&&++_),d.slice(S+1,M-1).replace(/""/g,'"')}for(;_<m;){if((R=d.charCodeAt(M=_++))===Wl)k=!0;else if(R===Kd)k=!0,d.charCodeAt(_)===Wl&&++_;else if(R!==r)continue;return d.slice(S,M)}return x=!0,d.slice(S,m)}for(;(b=T())!==$d;){for(var C=[];b!==Bv&&b!==$d;)C.push(b),b=T();f&&(C=f(C,y++))==null||p.push(C)}return p}function a(d,f){return d.map(function(p){return f.map(function(m){return h(p[m])}).join(t)})}function s(d,f){return f==null&&(f=Ov(d)),[f.map(h).join(t)].concat(a(d,f)).join(`
`)}function o(d,f){return f==null&&(f=Ov(d)),a(d,f).join(`
`)}function l(d){return d.map(u).join(`
`)}function u(d){return d.map(h).join(t)}function h(d){return d==null?"":d instanceof Date?HF(d):e.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:n,parseRows:i,format:s,formatBody:o,formatRows:l,formatRow:u,formatValue:h}}var Ts=uh(","),Fv=Ts.parse,GF=Ts.parseRows,jF=Ts.format,$F=Ts.formatBody,XF=Ts.formatRows,KF=Ts.formatRow,ZF=Ts.formatValue,Es=uh(" "),Pv=Es.parse,QF=Es.parseRows,JF=Es.format,tP=Es.formatBody,eP=Es.formatRows,rP=Es.formatRow,nP=Es.formatValue;function iP(t){for(var e in t){var r=t[e].trim(),n,i;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(n=+r))r=n;else if(i=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))aP&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;t[e]=r}return t}const aP=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function sP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function oP(t,e){return fetch(t,e).then(sP)}function lP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function cP(t,e){return fetch(t,e).then(lP)}function uP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function hh(t,e){return fetch(t,e).then(uP)}function qv(t){return function(e,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),hh(e,r).then(function(i){return t(i,n)})}}function hP(t,e,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=uh(t);return hh(e,r).then(function(a){return i.parse(a,n)})}var fP=qv(Fv),dP=qv(Pv);function pP(t,e){return new Promise(function(r,n){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=n,i.onload=function(){r(i)},i.src=t})}function gP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function yP(t,e){return fetch(t,e).then(gP)}function Zd(t){return(e,r)=>hh(e,r).then(n=>new DOMParser().parseFromString(n,t))}const mP=Zd("application/xml");var bP=Zd("text/html"),_P=Zd("image/svg+xml");function vP(t,e){var r,n=1;t==null&&(t=0),e==null&&(e=0);function i(){var a,s=r.length,o,l=0,u=0;for(a=0;a<s;++a)o=r[a],l+=o.x,u+=o.y;for(l=(l/s-t)*n,u=(u/s-e)*n,a=0;a<s;++a)o=r[a],o.x-=l,o.y-=u}return i.initialize=function(a){r=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(n=+a,i):n},i}function xP(t){const e=+this._x.call(null,t),r=+this._y.call(null,t);return Vv(this.cover(e,r),e,r,t)}function Vv(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a=t._root,s={data:n},o=t._x0,l=t._y0,u=t._x1,h=t._y1,d,f,p,m,_,y,b,x;if(!a)return t._root=s,t;for(;a.length;)if((_=e>=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f,i=a,!(a=a[b=y<<1|_]))return i[b]=s,t;if(p=+t._x.call(null,a.data),m=+t._y.call(null,a.data),e===p&&r===m)return s.next=a,i?i[b]=s:t._root=s,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(_=e>=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f;while((b=y<<1|_)===(x=(m>=f)<<1|p>=d));return i[x]=a,i[b]=s,t}function kP(t){var e,r,n=t.length,i,a,s=new Array(n),o=new Array(n),l=1/0,u=1/0,h=-1/0,d=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,e=t[r]))||isNaN(a=+this._y.call(null,e))||(s[r]=i,o[r]=a,i<l&&(l=i),i>h&&(h=i),a<u&&(u=a),a>d&&(d=a));if(l>h||u>d)return this;for(this.cover(l,u).cover(h,d),r=0;r<n;++r)Vv(this,s[r],o[r],t[r]);return this}function wP(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{for(var s=i-r||1,o=this._root,l,u;r>t||t>=i||n>e||e>=a;)switch(u=(e<n)<<1|t<r,l=new Array(4),l[u]=o,o=l,s*=2,u){case 0:i=r+s,a=n+s;break;case 1:r=i-s,a=n+s;break;case 2:i=r+s,n=a-s;break;case 3:r=i-s,n=a-s;break}this._root&&this._root.length&&(this._root=o)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this}function TP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function EP(t){return argument
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var IH=Object.hasOwnProperty,Rk=Object.setPrototypeOf,NH=Object.isFrozen,BH=Object.getPrototypeOf,DH=Object.getOwnPropertyDescriptor,sn=Object.freeze,Ii=Object.seal,OH=Object.create,Ik=typeof Reflect<"u"&&Reflect,Af=Ik.apply,Up=Ik.construct;Af||(Af=function(e,r,n){return e.apply(r,n)}),sn||(sn=function(e){return e}),Ii||(Ii=function(e){return e}),Up||(Up=function(e,r){return Sf(e,ni(r))});var FH=ii(Array.prototype.forEach),Nk=ii(Array.prototype.pop),Tc=ii(Array.prototype.push),Mf=ii(String.prototype.toLowerCase),PH=ii(String.prototype.match),Ga=ii(String.prototype.replace),qH=ii(String.prototype.indexOf),VH=ii(String.prototype.trim),on=ii(RegExp.prototype.test),Wp=zH(TypeError);function ii(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Af(t,e,n)}}function zH(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Up(t,r)}}function Me(t,e,r){r=r||Mf,Rk&&Rk(t,null);for(var n=e.length;n--;){var i=e[n];if(typeof i=="string"){var a=r(i);a!==i&&(NH(e)||(e[n]=a),i=a)}t[i]=!0}return t}function Fs(t){var e=OH(null),r;for(r in t)Af(IH,t,[r])&&(e[r]=t[r]);return e}function Lf(t,e){for(;t!==null;){var r=DH(t,e);if(r){if(r.get)return ii(r.get);if(typeof r.value=="function")return ii(r.value)}t=BH(t)}function n(i){return console.warn("fallback value for",i),null}return n}var Bk=sn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Hp=sn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gp=sn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YH=sn(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jp=sn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),UH=sn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dk=sn(["#text"]),Ok=sn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","co
`+Ve),q&&(Ve=Ga(Ve,D," "),Ve=Ga(Ve,N," ")),T&&at?T.createHTML(Ve):Ve},e.setConfig=function(qt){he(qt),F=!0},e.clearConfig=function(){kt=null,F=!1},e.isValidAttribute=function(qt,st,At){kt||he({});var Nt=Et(qt),Jt=Et(st);return Ke(Nt,Jt,At)},e.addHook=function(qt,st){typeof st=="function"&&(w[qt]=w[qt]||[],Tc(w[qt],st))},e.removeHook=function(qt){if(w[qt])return Nk(w[qt])},e.removeHooks=function(qt){w[qt]&&(w[qt]=[])},e.removeAllHooks=function(){w={}},e}var Ec=Pk();const tG=t=>t?zk(t).replace(/\\n/g,"#br#").split("#br#"):[""],qk=t=>Ec.sanitize(t),Vk=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=qk(t):n!=="loose"&&(t=zk(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=iG(t))}return t},ai=(t,e)=>t&&(e.dompurifyConfig?t=Ec.sanitize(Vk(t,e),e.dompurifyConfig).toString():t=Ec.sanitize(Vk(t,e)),t),eG=(t,e)=>typeof t=="string"?ai(t,e):t.flat().map(r=>ai(r,e)),If=/<br\s*\/?>/gi,rG=t=>If.test(t),nG=t=>t.split(If),iG=t=>t.replace(/#br#/g,"<br/>"),zk=t=>t.replace(If,"#br#"),aG=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Mr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),ja=function(t){let e=t;return t.indexOf("~")!==-1?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),ja(e)):e},pe={getRows:tG,sanitizeText:ai,sanitizeTextOrArray:eG,hasBreaks:rG,splitBreaks:nG,lineBreakRegex:If,removeScript:qk,getUrl:aG,evaluate:Mr},Nf={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Nf.hue2rgb(a,i,t+1/3)*255;case"g":return Nf.hue2rgb(a,i,t)*255;case"b":return Nf.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},ke={channel:Nf,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},$a={};for(let t=0;t<=255;t++)$a[t]=ke.unit.dec2hex(t);const zr={ALL:0,RGB:1,HSL:2};class sG{constructor(){this.type=zr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=zr.ALL}is(e){return this.type===e}}const oG=sG;class lG{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new oG}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=zr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=ke.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ke.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=ke.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=ke.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ke.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=ke.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(zr.RGB)&&r!==void 0?r:
`);for(const[r,{detector:n}]of Object.entries(zf))if(n(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},$k=(t,e,r)=>{if(zf[t])throw new Error(`Detector with key ${t} already exists`);zf[t]={detector:e,loader:r},H.debug(`Detector with key ${t} added${r?" with loader":""}`)},wG=t=>zf[t].loader,fr=function(t,e,r){const{depth:n,clobber:i}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>fr(t,a,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.indexOf(a)===-1&&t.push(a)}),t):typeof t>"u"||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(typeof e<"u"&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=fr(t[a],e[a],{depth:n-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)};var TG=typeof jr=="object"&&jr&&jr.Object===Object&&jr,Xk=TG,EG=Xk,CG=typeof self=="object"&&self&&self.Object===Object&&self,SG=EG||CG||Function("return this")(),si=SG,AG=si,MG=AG.Symbol,zo=MG,Kk=zo,Zk=Object.prototype,LG=Zk.hasOwnProperty,RG=Zk.toString,Ac=Kk?Kk.toStringTag:void 0;function IG(t){var e=LG.call(t,Ac),r=t[Ac];try{t[Ac]=void 0;var n=!0}catch{}var i=RG.call(t);return n&&(e?t[Ac]=r:delete t[Ac]),i}var NG=IG,BG=Object.prototype,DG=BG.toString;function OG(t){return DG.call(t)}var FG=OG,Qk=zo,PG=NG,qG=FG,VG="[object Null]",zG="[object Undefined]",Jk=Qk?Qk.toStringTag:void 0;function YG(t){return t==null?t===void 0?zG:VG:Jk&&Jk in Object(t)?PG(t):qG(t)}var Ps=YG;function UG(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Vn=UG,WG=Ps,HG=Vn,GG="[object AsyncFunction]",jG="[object Function]",$G="[object GeneratorFunction]",XG="[object Proxy]";function KG(t){if(!HG(t))return!1;var e=WG(t);return e==jG||e==$G||e==GG||e==XG}var Yo=KG,ZG=si,QG=ZG["__core-js_shared__"],JG=QG,Kp=JG,tw=function(){var t=/[^.]+$/.exec(Kp&&Kp.keys&&Kp.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function tj(t){return!!tw&&tw in t}var ej=tj,rj=Function.prototype,nj=rj.toString;function ij(t){if(t!=null){try{return nj.call(t)}catch{}try{return t+""}catch{}}return""}var ew=ij,aj=Yo,sj=ej,oj=Vn,lj=ew,cj=/[\\^$.*+?()[\]{}|]/g,uj=/^\[object .+?Constructor\]$/,hj=Function.prototype,fj=Object.prototype,dj=hj.toString,pj=fj.hasOwnProperty,gj=RegExp("^"+dj.call(pj).replace(cj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yj(t){if(!oj(t)||sj(t))return!1;var e=aj(t)?gj:uj;return e.test(lj(t))}var mj=yj;function bj(t,e){return t==null?void 0:t[e]}var _j=bj,vj=mj,xj=_j;function kj(t,e){var r=xj(t,e);return vj(r)?r:void 0}var qs=kj,wj=qs,Tj=wj(Object,"create"),Yf=Tj,rw=Yf;function Ej(){this.__data__=rw?rw(null):{},this.size=0}var Cj=Ej;function Sj(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Aj=Sj,Mj=Yf,Lj="__lodash_hash_undefined__",Rj=Object.prototype,Ij=Rj.hasOwnProperty;function Nj(t){var e=this.__data__;if(Mj){var r=e[t];return r===Lj?void 0:r}return Ij.call(e,t)?e[t]:void 0}var Bj=Nj,Dj=Yf,Oj=Object.prototype,Fj=Oj.hasOwnProperty;function Pj(t){var e=this.__data__;return Dj?e[t]!==void 0:Fj.call(e,t)}var qj=Pj,Vj=Yf,zj="__lodash_hash_undefined__";function Yj(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Vj&&e===void 0?zj:e,this}var Uj=Yj,Wj=Cj,Hj=Aj,Gj=Bj,jj=qj,$j=Uj;function Uo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Uo.prototype.clear=Wj,Uo.prototype.delete=Hj,Uo.prototype.get=Gj,Uo.prototype.has=jj,Uo.prototype.set=$j;var Xj=Uo;function Kj(){this.__data__=[],this.size=0}var Zj=Kj;function Qj(t,e){return t===e||t!==t&&e!==e}var Wo=Qj,Jj=Wo;function t$(t,e){for(var r=t.length;r--;)if(Jj(t[r][0],e))return r;return-1}var Uf=t$,e$=Uf,r$=Array.prototype,n$=r$.splice;function i$(t){var e=this.__data__,r=e$(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():n$.call(e,r,1),--this.size,!0}var a$=i$,s$=Uf;function o$(t){var e=this.__data__,r=s$(e,t)
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n;const i=[];for(;(n=tg.exec(t))!==null;)if(n.index===tg.lastIndex&&tg.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0&&i.push({type:t,args:null}),i.length===1?i[0]:i}catch(r){return H.error(`ERROR: ${r.message} - Unable to parse directive
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},Q$=function(t,e){for(let r=0;r<e.length;r++)if(e[r].match(t))return r;return-1},Ni=(t,e)=>{if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return X$[r]||e},J$=(t,e)=>{const r=t.trim();if(r)return e.securityLevel!=="loose"?ki(r):r},tX=(t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a)return;a[i](...e)},Mc=(t,e)=>t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0,eX=t=>{let e,r=0;t.forEach(a=>{r+=Mc(a,e),e=a});let n=r/2,i;return e=void 0,t.forEach(a=>{if(e&&!i){const s=Mc(a,e);if(s<n)n-=s;else{const o=n/s;o<=0&&(i=e),o>=1&&(i={x:a.x,y:a.y}),o>0&&o<1&&(i={x:(1-o)*e.x+o*a.x,y:(1-o)*e.y+o*a.y})}}e=a}),i},rX=t=>t.length===1?t[0]:eX(t),nX=(t,e,r)=>{let n;H.info("our points",e),e[0]!==r&&(e=e.reverse()),e.forEach(h=>{totalDistance+=Mc(h,n),n=h});let a=25,s;n=void 0,e.forEach(h=>{if(n&&!s){const d=Mc(h,n);if(d<a)a-=d;else{const f=a/d;f<=0&&(s=n),f>=1&&(s={x:h.x,y:h.y}),f>0&&f<1&&(s={x:(1-f)*n.x+f*h.x,y:(1-f)*n.y+f*h.y})}}n=h});const o=t?10:5,l=Math.atan2(e[0].y-s.y,e[0].x-s.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+s.x)/2,u.y=-Math.cos(l)*o+(e[0].y+s.y)/2,u},iX=(t,e,r)=>{let n=JSON.parse(JSON.stringify(r)),i;H.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(d=>{i=d});let s=25+t,o;i=void 0,n.forEach(d=>{if(i&&!o){const f=Mc(d,i);if(f<s)s-=f;else{const p=s/f;p<=0&&(o=i),p>=1&&(o={x:d.x,y:d.y}),p>0&&p<1&&(o={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const l=10+t*.5,u=Math.atan2(n[0].y-o.y,n[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(u)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2,e==="start_left"&&(h.x=Math.sin(u+Math.PI)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u+Math.PI)*l+(n[0].y+o.y)/2),e==="end_right"&&(h.x=Math.sin(u-Math.PI)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u-Math.PI)*l+(n[0].y+o.y)/2-5),e==="end_left"&&(h.x=Math.sin(u)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2-5),h},Ka=t=>{let e="",r="";for(let n=0;n<t.length;n++)typeof t[n]<"u"&&(t[n].startsWith("color:")||t[n].startsWith("text-align:")?r=r+t[n]+";":e=e+t[n]+";");return{style:e,labelStyle:r}};let sw=0;const ow=()=>(sw++,"id-"+Math.random().toString(36).substr(2,12)+"-"+sw);function aX(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}const lw=t=>aX(t.length),sX=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},oX=function(t,e){const r=e.text.replace(pe.lineBreakRegex," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",e.fontSize),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),typeof e.class<"u"&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(r),n},cw=Gf((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),pe.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let a="";return n.forEach((s,o)=>{const l=Bi(`${s} `,r),u=Bi(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=lX(s,e,"-",r);i.push(a,...f),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),lX=Gf((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=t.split(""),a=[];let s="";return i.forEach((o,l)=>{const u=`${s}${o}`;if(Bi(u,n)>=e){const d=l+1,f=i.length===d,p=`${u}${r}`;a.push(f?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`),eg=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),rg(t,e).height},Bi=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),rg(t,e).width},rg=G
fill: ${t.nodeBorder};
fill: ${t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
}
`,Sw=t=>`
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
`,Aw=()=>"",a1=t=>`.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.label text,span {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
`,Mw=t=>`
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
// font-size: ${t.ganttFontSize};
// text-height: 14px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
// .taskText:not([font-size]) {
// font-size: ${t.ganttFontSize};
// }
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
// font-size: ${t.ganttFontSize};
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
// font-size: ${t.ganttFontSize};
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor} ;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
`,Lw=()=>"",Rw=t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,Iw=t=>`
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 100%;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 100%;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
`,Nw=t=>`.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`,s1=t=>`
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground||t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg||t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder||t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground||t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground?t.altBackground:"#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground?t.altBackground:"#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
`,Bw=t=>`.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?`fill: ${t.fillType0}`:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?`fill: ${t.fillType1}`:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?`fill: ${t.fillType2}`:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?`fill: ${t.fillType3}`:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?`fill: ${t.fillType4}`:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?`fill: ${t.fillType5}`:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?`fill: ${t.fillType6}`:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?`fill: ${t.fillType7}`:""};
}
.actor-0 {
${t.actor0?`fill: ${t.actor0}`:""};
}
.actor-1 {
${t.actor1?`fill: ${t.actor1}`:""};
}
.actor-2 {
${t.actor2?`fill: ${t.actor2}`:""};
}
.actor-3 {
${t.actor3?`fill: ${t.actor3}`:""};
}
.actor-4 {
${t.actor4?`fill: ${t.actor4}`:""};
}
.actor-5 {
${t.actor5?`fill: ${t.actor5}`:""};
}
`,Dw=t=>`.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`,o1={flowchart:a1,"flowchart-v2":a1,sequence:Nw,gantt:Mw,classDiagram:Nc,"classDiagram-v2":Nc,class:Nc,stateDiagram:s1,state:s1,info:Lw,pie:Rw,er:Sw,error:Aw,journey:Bw,requirement:Iw,c4:Dw},Ow=(t,e,r)=>{let n="";return t in o1&&o1[t]?n=o1[t](r):H.warn(`No theme found for ${t}`),` {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
.error-icon {
fill: ${r.errorBkgColor};
}
.error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
.edge-thickness-normal {
stroke-width: 2px;
}
.edge-thickness-thick {
stroke-width: 3.5px
}
.edge-pattern-solid {
stroke-dasharray: 0;
}
.edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
.marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
.marker.cross {
stroke: ${r.lineColor};
}
svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${n}
${e}
`},RX=(t,e)=>{o1[t]=e},Bc=H,IX=D0,Zo=nt,NX=t=>ai(t,Zo()),Fw=i1,Qo={},Lr=(t,e,r)=>{Bc.debug(`Registering diagram ${t}`),Qo[t]&&Bc.warn(`Diagram ${t} already registered.`),Qo[t]=e,r&&$k(t,r),RX(t,e.styles),e.injectUtils&&e.injectUtils(Bc,IX,Zo,NX,Fw),Bc.debug(`Registered diagram ${t}. ${Object.keys(Qo).join(", ")} diagrams registered.`)},Pw=t=>{if(Bc.debug(`Getting diagram ${t}. ${Object.keys(Qo).join(", ")} diagrams registered.`),t in Qo)return Qo[t];throw new qw(t)};class qw extends Error{constructor(e){super(`Diagram ${e} not found.`)}}var hg=function(){var t=function(C,M,S,R){for(S=S||{},R=C.length;R--;S[C[R]]=M);return S},e=[1,4],r=[1,7],n=[1,5],i=[1,9],a=[1,6],s=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,54],u=[8,14,20,22,24,25,27,29,32,37,40],h=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],f=[6,8,14,50,54],p=[8,14,54],m=[1,65],_=[1,66],y=[1,67],b=[8,14,33,35,42,54],x={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,";":54,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",28:"ID",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[4,1],[4,1],[4,1]],performAction:function(M,S,R,A,L,v,B){var w=v.length-1;switch(L){case 3:return v[w];case 4:return v[w-1];case 5:return A.setDirection(v[w-3]),v[w-1];case 7:A.setOptions(v[w-1]),this.$=v[w];break;case 8:v[w-1]+=v[w],this.$=v[w-1];break;case 10:this.$=[];break;case 11:v[w-1].push(v[w]),this.$=v[w-1];break;case 12:this.$=v[w-1];break;case 17:this.$=v[w].trim(),A.setAccTitle(this.$);break;case 18:case 19:this.$=v[w].trim(),A.setAccDescription(this.$);break;case 20:A.addSection(v[w].substr(8)),this.$=v[w].substr(8);break;case 22:A.checkout(v[w]);break;case 23:A.branch(v[w]);break;case 24:A.branch(v[w-2],v[w]);break;case 25:A.cherryPick(v[w],"",void 0);break;case 26:A.cherryPick(v[w-2],"",v[w]);break;case 27:case 29:A.cherryPick(v[w-2],"","");break;case 28:A.cherryPick(v[w],"",v[w-2]);break;case 30:A.merge(v[w],"","","");break;case 31:A.merge(v[w-2],v[w],"","");break;case 32:A.merge(v[w-2],"",v[w],"");break;case 33:A.merge(v[w-2],"","",v[w]);break;case 34:A.merge(v[w-4],v[w],"",v[w-2]);break;case 35:A.merge(v[w-4],"",v[w],v[w-2]);break;case 36:A.merge(v[w-4],"",v[w-2],v[w]);break;case 37:A.merge(v[w
`+J.showPosition()+`
Expecting `+F.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":j="Parse error on line "+(D+1)+": Unexpected "+(tt==X?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(j,{text:J.match,token:this.terminals_[tt]||tt,line:J.yylineno,loc:lt,expected:F})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+tt);switch(it[0]){case 1:R.push(tt),L.push(J.yytext),v.push(J.yylloc),R.push(it[1]),tt=null,N=J.yyleng,w=J.yytext,D=J.yylineno,lt=J.yylloc;break;case 2:if(q=this.productions_[it[1]][1],V.$=L[L.length-q],V._$={first_line:v[v.length-(q||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(q||1)].first_column,last_column:v[v.length-1].last_column},ut&&(V._$.range=[v[v.length-(q||1)].range[0],v[v.length-1].range[1]]),Z=this.performAction.apply(V,[w,N,D,Y.yy,it[1],L,v].concat(ct)),typeof Z<"u")return Z;q&&(R=R.slice(0,-1*q*2),L=L.slice(0,-1*q),v=v.slice(0,-1*q)),R.push(this.productions_[it[1]][0]),L.push(V.$),v.push(V._$),U=B[R[R.length-2]][R[R.length-1]],R.push(U);break;case 3:return!0}}return!0}},k=function(){var C={EOF:1,parseError:function(S,R){if(this.yy.parser)this.yy.parser.parseError(S,R);else throw new Error(S)},setInput:function(M,S){return this.yy=S||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var S=M.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},unput:function(M){var S=M.length,R=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),R.length-1&&(this.yylineno-=R.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:R?(R.length===A.length?this.yylloc.first_column:0)+A[A.length-R.length].length-R[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(M){this.unput(this.match.slice(M))},pastInput:function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var M=this.pastInput(),S=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
`+S+"^"},test_match:function(M,S){var R,A,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),A=M[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],R=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var v in L)this[v]=L[v];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,S,R,A;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),v=0;v<L.length;v++)if(R=this._input.match(this.rules[L[v]]),R&&(!S||R[0].length>S[0].length)){if(S=R,A=v,this.options.backtrack_lexer){if(M=this.test_match(R,L[v]),M!==!1)return M;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(M=this.test_match(S,L[A]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,R,A,L){switch(A){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return C}();x.lexer=k;function T(){this.yy={}}return T.prototype=x,x.Parser=T,new T}();hg.parser=hg;const BX=t=>t.match(/^\s*gitGraph/)!==null;let fg="",l1="",dg="";const pg=t=>ai(t,nt()),ci=function(){fg="",dg="",l1=""},Yn=function(t){fg=pg(t).replace(/^\s+/g,"")},ui=function(){return fg||l1},hi=function(t){dg=pg(t).replace(/\n\s+/g,`
`)},fi=function(){return dg},c1=function(t){l1=pg(t)},u1=function(){return l1};let h1=nt().gitGraph.mainBranchName,DX=nt().gitGraph.mainBranchOrder,kr={},cn=null,Dc={};Dc[h1]={name:h1,order:DX};let pr={};pr[h1]=cn;let Rr=h1,Vw="LR",Ys=0;function gg(){return lw({length:7})}const OX=function(t,e,r){Xe.parseDirective(this,t,e,r)};function FX(t,e){const r=Object.create(null);return t.reduce((n,i)=>{const a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}const PX=function(t){Vw=t};let zw={};const qX=function(t){H.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{zw=JSON.parse(t)}catch(e){H.error("error while parsing gitGraph options",e.message)}},VX=function(){return zw},zX=function(t,e,r,n){H.debug("Entering commit:",t,e,r,n),e=pe.sanitizeText(e,nt()),t=pe.sanitizeText(t,nt()),n=pe.sanitizeText(n,nt());const i={id:e||Ys+"-"+gg(),message:t,seq:Ys++,type:r||Oc.NORMAL,tag:n||"",parents:cn==null?[]:[cn.id],branch:Rr};cn=i,kr[i.id]=i,pr[Rr]=i.id,H.debug("in pushCommit "+i.id)},YX=function(t,e){if(t=pe.sanitizeText(t,nt()),typeof pr[t]>"u")pr[t]=cn!=null?cn.id:null,Dc[t]={name:t,order:e?parseInt(e,10):null},Yw(t),H.debug("in createBranch");else{let r=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},UX=function(t,e,r,n){t=pe.sanitizeText(t,nt()),e=pe.sanitizeText(e,nt());const i=kr[pr[Rr]],a=kr[pr[t]];if(Rr===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(typeof i>"u"||!i){let o=new Error('Incorrect usage of "merge". Current branch ('+Rr+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(typeof pr[t]>"u"){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(typeof a>"u"||!a){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(i===a){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&typeof kr[e]<"u"){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+n,token:"merge "+t+e+r+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+n]},o}const s={id:e||Ys+"-"+gg(),message:"merged branch "+t+" into "+Rr,seq:Ys++,parents:[cn==null?null:cn.id,pr[t]],branch:Rr,type:Oc.MERGE,customType:r,customId:!!e,tag:n||""};cn=s,kr[s.id]=s,pr[Rr]=s.id,H.debug(pr),H.debug("in mergeBranch")},WX=function(t,e,r){if(H.debug("Entering cherryPick:",t,e,r),t=pe.sanitizeText(t,nt()),e=pe.sanitizeText(e,nt()),r=pe.sanitizeText(r,nt()),!t||typeof kr[t]>"u"){let a=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw a.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},a}let n=kr[t],i=n.branch;if(n.type===Oc.MERGE){let a=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw a.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},a}if(!e||typeof kr[e
${s-x.width/2-4/2},${T+2}
${s-x.width/2-4/2},${T-2}
${s+10-x.width/2-4},${T-k-2}
${s+10+x.width/2+4},${T-k-2}
${s+10+x.width/2+4},${T+k+2}
${s+10-x.width/2-4},${T+k+2}`),y.attr("cx",s-x.width/2+4/2).attr("cy",T).attr("r",1.5).attr("class","tag-hole")}}s+=50,s>d1&&(d1=s)})},rK=(t,e,r)=>Object.keys(r).filter(a=>r[a].branch===e.branch&&r[a].seq>t.seq&&r[a].seq<e.seq).length>0,yg=(t,e,r)=>{const n=r||0,i=t+Math.abs(t-e)/2;if(n>5)return i;let a=!0;for(let o=0;o<Pc.length;o++)Math.abs(Pc[o]-i)<10&&(a=!1);if(a)return Pc.push(i),i;const s=Math.abs(t-e);return yg(t,e-s/5,n+1)},nK=(t,e,r,n)=>{const i=f1[e.id],a=f1[r.id],s=rK(e,r,n);let o="",l="",u=0,h=0,d=_n[r.branch].index,f;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10,d=_n[r.branch].index;const p=i.y<a.y?yg(i.y,a.y):yg(a.y,i.y);i.y<a.y?f=`M ${i.x} ${i.y} L ${i.x} ${p-u} ${o} ${i.x+h} ${p} L ${a.x-u} ${p} ${l} ${a.x} ${p+h} L ${a.x} ${a.y}`:f=`M ${i.x} ${i.y} L ${i.x} ${p+u} ${l} ${i.x+h} ${p} L ${a.x-u} ${p} ${o} ${a.x} ${p-h} L ${a.x} ${a.y}`}else i.y<a.y&&(o="A 20 20, 0, 0, 0,",u=20,h=20,d=_n[r.branch].index,f=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(o="A 20 20, 0, 0, 0,",u=20,h=20,d=_n[e.branch].index,f=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.y===a.y&&(d=_n[e.branch].index,f=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`);t.append("path").attr("d",f).attr("class","arrow arrow"+d%Us)},iK=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(n=>{const i=e[n];i.parents&&i.parents.length>0&&i.parents.forEach(a=>{nK(r,e[a],i,e)})})},aK=(t,e)=>{const r=Zo().gitGraph,n=t.append("g");e.forEach((i,a)=>{const s=a%Us,o=_n[i.name].pos,l=n.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",d1),l.attr("y2",o),l.attr("class","branch branch"+s),Pc.push(o);let u=i.name;const h=eK(u),d=n.insert("rect"),p=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+s);p.node().appendChild(h);let m=h.getBBox();d.attr("class","branchLabelBkg label"+s).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),d.attr("transform","translate("+-19+", "+(o-m.height/2)+")")})},sK={draw:function(t,e,r,n){tK();const i=Zo(),a=Zo().gitGraph;H.debug("in gitgraph renderer",t+`
`,"id:",e,r),Fc=n.db.getCommits();const s=n.db.getBranchesAsObjArray();let o=0;s.forEach((u,h)=>{_n[u.name]={pos:o,index:h},o+=50+(a.rotateCommitLabel?40:0)});const l=St(`[id="${e}"]`);bn(n.db,l,e),Gw(l,Fc,!1),a.showBranches&&aK(l,s),iK(l,Fc),Gw(l,Fc,!0),Fw(void 0,l,a.diagramPadding,i.useMaxWidth)}},oK=t=>`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0,1,2,3,4,5,6,7].map(e=>`
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
.label${e} { fill: ${t["git"+e]}; }
.arrow${e} { stroke: ${t["git"+e]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${t.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
.tag-hole { fill: ${t.textColor}; }
.commit-merge {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.commit-reverse {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
}
`;var qc=function(){var t=function(zt,wt,bt,Et){for(bt=bt||{},Et=zt.length;Et--;bt[zt[Et]]=wt);return bt},e=[1,6],r=[1,7],n=[1,8],i=[1,9],a=[1,16],s=[1,11],o=[1,12],l=[1,13],u=[1,14],h=[1,15],d=[1,27],f=[1,33],p=[1,34],m=[1,35],_=[1,36],y=[1,37],b=[1,72],x=[1,73],k=[1,74],T=[1,75],C=[1,76],M=[1,77],S=[1,78],R=[1,38],A=[1,39],L=[1,40],v=[1,41],B=[1,42],w=[1,43],D=[1,44],N=[1,45],z=[1,46],X=[1,47],ct=[1,48],J=[1,49],Y=[1,50],$=[1,51],lt=[1,52],ut=[1,53],W=[1,54],tt=[1,55],K=[1,56],it=[1,57],Z=[1,59],V=[1,60],Q=[1,61],q=[1,62],U=[1,63],F=[1,64],j=[1,65],P=[1,66],et=[1,67],at=[1,68],It=[1,69],Lt=[24,52],Rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],Ct=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],pt=[1,94],mt=[1,95],vt=[1,96],Tt=[1,97],ft=[15,24,52],le=[7,8,9,10,18,22,25,26,27,28],Dt=[15,24,43,52],Gt=[15,24,43,52,86,87,89,90],$t=[15,43],Qt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],we={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2]
`+Wt.showPosition()+`
Expecting `+At.join(", ")+", got '"+(this.terminals_[Ie]||Ie)+"'":Nt="Parse error on line "+(ne+1)+": Unexpected "+(Ie==be?"end of input":"'"+(this.terminals_[Ie]||Ie)+"'"),this.parseError(Nt,{text:Wt.match,token:this.terminals_[Ie]||Ie,line:Wt.yylineno,loc:ue,expected:At})}if(Ke[0]instanceof Array&&Ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+Ie);switch(Ke[0]){case 1:Et.push(Ie),Ut.push(Wt.yytext),gt.push(Wt.yylloc),Et.push(Ke[1]),Ie=null,ve=Wt.yyleng,yt=Wt.yytext,ne=Wt.yylineno,ue=Wt.yylloc;break;case 2:if(qt=this.productions_[Ke[1]][1],Ge.$=Ut[Ut.length-qt],Ge._$={first_line:gt[gt.length-(qt||1)].first_line,last_line:gt[gt.length-1].last_line,first_column:gt[gt.length-(qt||1)].first_column,last_column:gt[gt.length-1].last_column},_a&&(Ge._$.range=[gt[gt.length-(qt||1)].range[0],gt[gt.length-1].range[1]]),wr=this.performAction.apply(Ge,[yt,ve,ne,se.yy,Ke[1],Ut,gt].concat(Te)),typeof wr<"u")return wr;qt&&(Et=Et.slice(0,-1*qt*2),Ut=Ut.slice(0,-1*qt),gt=gt.slice(0,-1*qt)),Et.push(this.productions_[Ke[1]][0]),Ut.push(Ge.$),gt.push(Ge._$),st=he[Et[Et.length-2]][Et[Et.length-1]],Et.push(st);break;case 3:return!0}}return!0}},jt=function(){var zt={EOF:1,parseError:function(bt,Et){if(this.yy.parser)this.yy.parser.parseError(bt,Et);else throw new Error(bt)},setInput:function(wt,bt){return this.yy=bt||this.yy||{},this._input=wt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var wt=this._input[0];this.yytext+=wt,this.yyleng++,this.offset++,this.match+=wt,this.matched+=wt;var bt=wt.match(/(?:\r\n?|\n).*/g);return bt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),wt},unput:function(wt){var bt=wt.length,Et=wt.split(/(?:\r\n?|\n)/g);this._input=wt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-bt),this.offset-=bt;var kt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Et.length-1&&(this.yylineno-=Et.length-1);var Ut=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Et?(Et.length===kt.length?this.yylloc.first_column:0)+kt[kt.length-Et.length].length-Et[0].length:this.yylloc.first_column-bt},this.options.ranges&&(this.yylloc.range=[Ut[0],Ut[0]+this.yyleng-bt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(wt){this.unput(this.match.slice(wt))},pastInput:function(){var wt=this.matched.substr(0,this.matched.length-this.match.length);return(wt.length>20?"...":"")+wt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var wt=this.match;return wt.length<20&&(wt+=this._input.substr(0,20-wt.length)),(wt.substr(0,20)+(wt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var wt=this.pastInput(),bt=new Array(wt.length+1).join("-");return wt+this.upcomingInput()+`
`+bt+"^"},test_match:function(wt,bt){var Et,kt,Ut;if(this.options.backtrack_lexer&&(Ut={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ut.yylloc.range=this.yylloc.range.slice(0))),kt=wt[0].match(/(?:\r\n?|\n).*/g),kt&&(this.yylineno+=kt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:kt?kt[kt.length-1].length-kt[kt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+wt[0].length},this.yytext+=wt[0],this.match+=wt[0],this.matches=wt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(wt[0].length),this.matched+=wt[0],Et=this.performAction.call(this,this.yy,this,bt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Et)return Et;if(this._backtrack){for(var gt in Ut)this[gt]=Ut[gt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var wt,bt,Et,kt;this._more||(this.yytext="",this.match="");for(var Ut=this._currentRules(),gt=0;gt<Ut.length;gt++)if(Et=this._input.match(this.rules[Ut[gt]]),Et&&(!bt||Et[0].length>bt[0].length)){if(bt=Et,kt=gt,this.options.backtrack_lexer){if(wt=this.test_match(Et,Ut[gt]),wt!==!1)return wt;if(this._backtrack){bt=!1;continue}else return!1}else if(!this.options.flex)break}return bt?(wt=this.test_match(bt,Ut[kt]),wt!==!1?wt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var bt=this.next();return bt||this.lex()},begin:function(bt){this.conditionStack.push(bt)},popState:function(){var bt=this.conditionStack.length-1;return bt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(bt){return bt=this.conditionStack.length-1-Math.abs(bt||0),bt>=0?this.conditionStack[bt]:"INITIAL"},pushState:function(bt){this.begin(bt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(bt,Et,kt,Ut){switch(kt){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.
`+pt.showPosition()+`
Expecting `+wt.join(", ")+", got '"+(this.terminals_[Dt]||Dt)+"'":bt="Parse error on line "+(at+1)+": Unexpected "+(Dt==Rt?"end of input":"'"+(this.terminals_[Dt]||Dt)+"'"),this.parseError(bt,{text:pt.match,token:this.terminals_[Dt]||Dt,line:pt.yylineno,loc:Tt,expected:wt})}if($t[0]instanceof Array&&$t.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Gt+", token: "+Dt);switch($t[0]){case 1:q.push(Dt),F.push(pt.yytext),j.push(pt.yylloc),q.push($t[1]),Dt=null,It=pt.yyleng,et=pt.yytext,at=pt.yylineno,Tt=pt.yylloc;break;case 2:if(Ft=this.productions_[$t[1]][1],we.$=F[F.length-Ft],we._$={first_line:j[j.length-(Ft||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(Ft||1)].first_column,last_column:j[j.length-1].last_column},ft&&(we._$.range=[j[j.length-(Ft||1)].range[0],j[j.length-1].range[1]]),Qt=this.performAction.apply(we,[et,It,at,mt.yy,$t[1],F,j].concat(Ct)),typeof Qt<"u")return Qt;Ft&&(q=q.slice(0,-1*Ft*2),F=F.slice(0,-1*Ft),j=j.slice(0,-1*Ft)),q.push(this.productions_[$t[1]][0]),F.push(we.$),j.push(we._$),zt=P[q[q.length-2]][q[q.length-1]],q.push(zt);break;case 3:return!0}}return!0}},K=function(){var Z={EOF:1,parseError:function(Q,q){if(this.yy.parser)this.yy.parser.parseError(Q,q);else throw new Error(Q)},setInput:function(V,Q){return this.yy=Q||this.yy||{},this._input=V,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var Q=V.match(/(?:\r\n?|\n).*/g);return Q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},unput:function(V){var Q=V.length,q=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Q),this.offset-=Q;var U=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),q.length-1&&(this.yylineno-=q.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:q?(q.length===U.length?this.yylloc.first_column:0)+U[U.length-q.length].length-q[0].length:this.yylloc.first_column-Q},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-Q]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(V){this.unput(this.match.slice(V))},pastInput:function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var V=this.pastInput(),Q=new Array(V.length+1).join("-");return V+this.upcomingInput()+`
`+Q+"^"},test_match:function(V,Q){var q,U,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),U=V[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(V[0].length),this.matched+=V[0],q=this.performAction.call(this,this.yy,this,Q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var j in F)this[j]=F[j];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,Q,q,U;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),j=0;j<F.length;j++)if(q=this._input.match(this.rules[F[j]]),q&&(!Q||q[0].length>Q[0].length)){if(Q=q,U=j,this.options.backtrack_lexer){if(V=this.test_match(q,F[j]),V!==!1)return V;if(this._backtrack){Q=!1;continue}else return!1}else if(!this.options.flex)break}return Q?(V=this.test_match(Q,F[U]),V!==!1?V:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Q=this.next();return Q||this.lex()},begin:function(Q){this.conditionStack.push(Q)},popState:function(){var Q=this.conditionStack.length-1;return Q>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Q){return Q=this.conditionStack.length-1-Math.abs(Q||0),Q>=0?this.conditionStack[Q]:"INITIAL"},pushState:function(Q){this.begin(Q)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Q,q,U,F){switch(U){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),47;case 27:break;case 28:return"MEMBER";case 29:return 43;case 30:return 70;case 31:return 63;case 32:return 64;case 33:return 66;case 34:return 48;case 35:return 49;case 36:this.begin("generic");break;case 37:this.popState();break;case 38:return"GENERICTYPE";case 39:this.begin("string");break;case 40:this.popState();break;case 41:return"STR";case 42:this.begin("bqstring");break;case 43:this.popState();break;case 44:return"BQUOTE_STR";case 45:this.begin("href");break;case 46:this.popState();break;case 47:return 69;case 48:this.begin("callback_name");break;case 49:this.popState();break;case 50:this.popState(),this.begin("callback_args");break;case 51:return 67;case 52:this.popState();break;case 53:return 68;case 54:return 65;case 55:return 65;case 56:return 65;case 57:return 65;case 58:return 57;case 59:return 57;case 60:return 59;case 61:return 59;case 62:return 58;case 63:return 56;case 64:return 60;case 65:return 61;case 66:return 62;case 67:return 32;case 68:return 44;case 69:return 82;case 70:return"DOT";case 71:return"PLUS";case 72:return 79;case 73:return"EQUALS";case 74:return"EQUALS";case 75:return 86;case 76:return"PUNCTUATION";case 77:return 85;case 78:return 84;case 79:return 81;case 80:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.x<e.x?s-a:s+a;const l=t.height/2,u=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*l){let d=r.y<e.y?e.y-l-i:i-l-e.y;o=h*d/u;const f={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+u-d:r.y-u+d};return o===0&&(f.x=e.x,f.y=e.y),h===0&&(f.x=e.x),u===0&&(f.y=e.y),H.warn(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${o}`,f),f}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let d=u*o/h,f=r.x<e.x?r.x+h-o:r.x-h+o,p=r.y<e.y?r.y+d:r.y-d;return H.warn(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${o}`,{_x:f,_y:p}),o===0&&(f=e.x,p=e.y),h===0&&(f=e.x),u===0&&(p=e.y),{x:f,y:p}}},QA=(t,e)=>{H.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(H.info("abc88 checking point",a,e),!Aet(e,a)&&!i){const s=Met(e,n,a);H.warn("abc88 inside",a,n,s),H.warn("abc88 intersection",s);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.find(l=>l.x===s.x&&l.y===s.y)?H.warn("abc88 no intersect",s,r):r.push(s),i=!0}else H.warn("abc88 outside",a,n),n=a,i||r.push(a)}),H.warn("abc88 returning points",r),r},Let=function(t,e,r,n,i,a){let s=r.points,o=!1;const l=a.node(e.v);var u=a.node(e.w);H.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(s=s.slice(1,r.points.length-1),s.unshift(l.intersect(s[0])),H.info("Last point",s[s.length-1],u,u.intersect(s[s.length-1])),s.push(u.intersect(s[s.length-1]))),r.toCluster&&(H.info("to cluster abc88",n[r.toCluster]),s=QA(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(H.info("from cluster abc88",n[r.fromCluster]),s=QA(s.reverse(),n[r.fromCluster].node).reverse(),o=!0);const h=s.filter(b=>!Number.isNaN(b.y));let d;i==="graph"||i==="flowchart"?d=r.curve||Os:d=Os;const f=Ua().x(function(b){return b.x}).y(function(b){return b.y}).curve(d);let p;switch(r.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;case"invisible":p="edge-thickness-thick";break;default:p=""}switch(r.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const m=t.append("path").attr("d",f(h)).attr("id",r.id).attr("class"," "+p+(r.classes?" "+r.classes:"")).attr("style",r.style);let _="";switch((nt().flowchart.arrowMarkerAbsolute||nt().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),H.info("arrowTypeStart",r.arrowTypeStart),H.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":m.attr("marker-start","url("+_+"#"+i+"-crossStart)");break;case"arrow_point":m.attr("marker-start","url("+_+"#"+i+"-pointStart)");break;case"arrow_barb":m.attr("marker-start","url("+_+"#"+i+"-barbStart)");break;case"arrow_circle":m.attr("marker-start","url("+_+"#"+i+"-circleStart)");break;case"aggregation":m.attr("marker-start","url("+_+"#"+i+"-aggregationStart)");break;case"extension":m.attr("marker-start","url("+_+"#"+i+"-extensionStart)");break;case"composition":m.attr("marker-start","url("+_+"#"+i+"-compositionStart)");break;case"dependency":m.attr("marker-start","url("+_+"#"+i+"-dependencyStart)");break;case"lollipop":m.attr("marker-start","url("+_+"#"+i+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":m.attr("marker-end","url("+_+"#"+i+"-crossEnd)");break;case"arrow_point":m.attr("marker-end","url("+_+"#"+i+"-pointEnd)");break;case"arrow_barb":m.attr("marker-end","url("+_+"#"+i+"-barbEnd)");break;case"arrow_circle":m.attr("marker-end","url("+_+"#"+i+"-circleEnd)");break;case"aggregation":m.attr("marker-end","url("+_+"#"+i+"-aggregationEnd)");break;case"extension":m.attr("marker-end","url("+_+"#"+i+"-extensionEnd)");break;case"composition":m.attr("marker-end","url("+_+"#"+i+"-compositionEnd)");break;case"dependency":m.attr("marker-end","url("+_+"#"+i+"-dependencyEnd)");break;case"lollipop":m.attr("marker-end","url("+_+"#"+i+"-lollipopEnd)");break}let y={};return o&&(y.updatedPath=s),y.originalPath=r.points,y},JA=(
`),typeof i.style>"u"&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,a,n)})},Bet=function(t){Object.keys(t).forEach(function(r){t[r]})},Det=function(t,e,r,n){H.info("Drawing class - ",e);const i=nt().flowchart,a=nt().securityLevel;H.info("config:",i);const s=i.nodeSpacing||50,o=i.rankSpacing||50,l=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:s,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=n.db.getClasses(),h=n.db.getRelations();H.info(h),Iet(u,l,e,n),Net(h,l);let d;a==="sandbox"&&(d=St("#i"+e));const f=St(a==="sandbox"?d.nodes()[0].contentDocument.body:"body"),p=f.select(`[id="${e}"]`),m=f.select("#"+e+" g");if(i4(m,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),i1(l,p,i.diagramPadding,i.useMaxWidth),!i.htmlLabels){const _=a==="sandbox"?d.nodes()[0].contentDocument:document,y=_.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let b=0;b<y.length;b++){const x=y[b],k=x.getBBox(),T=_.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("rx",0),T.setAttribute("ry",0),T.setAttribute("width",k.width),T.setAttribute("height",k.height),x.insertBefore(T,x.firstChild)}}bn(n.db,p,e)};function tM(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const Oet={setConf:Bet,draw:Det};var a4=function(){var t=function(A,L,v,B){for(v=v||{},B=A.length;B--;v[A[B]]=L);return v},e=[1,2],r=[1,5],n=[6,9,11,23,25,27,29,30,31,49],i=[1,17],a=[1,18],s=[1,19],o=[1,20],l=[1,21],u=[1,22],h=[1,25],d=[1,30],f=[1,31],p=[1,32],m=[1,33],_=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],y=[1,45],b=[30,31,46,47],x=[4,6,9,11,23,25,27,29,30,31,49],k=[42,43,44,45],T=[22,37],C=[1,64],M={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(L,v,B,w,D,N,z){var X=N.length-1;switch(D){case 1:break;case 3:this.$=[];break;case 4:N[X-1].push(N[X]),this.$=N[X-1];break;case 5:case 6:this.$=N[X];break;case 7:case 8:this.$=[];break;case 12:w.addEntity(N[X-4]),w.addEntity(N[X-2]),w.addRelationship(N[X-4],N[X],N[X-2],N[X-3]);break;case 13:w.addEntity(N[X-3]),w.addAttributes(N[X-3],N[X-1]);break;case 14:w.addEntity(N[X-2]);break;case 15:w.addEntity(N[X]);break;case 16:case 17:this.$=N[X].trim(),w.setAccTitle(this.$);break;case 18:case 19:this.$=N[X].trim(),w.setAccDescri
`+ut.showPosition()+`
Expecting `+at.join(", ")+", got '"+(this.terminals_[V]||V)+"'":It="Parse error on line "+(ct+1)+": Unexpected "+(V==$?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(It,{text:ut.match,token:this.terminals_[V]||V,line:ut.yylineno,loc:K,expected:at})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+V);switch(q[0]){case 1:B.push(V),D.push(ut.yytext),N.push(ut.yylloc),B.push(q[1]),V=null,J=ut.yyleng,X=ut.yytext,ct=ut.yylineno,K=ut.yylloc;break;case 2:if(P=this.productions_[q[1]][1],F.$=D[D.length-P],F._$={first_line:N[N.length-(P||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(P||1)].first_column,last_column:N[N.length-1].last_column},it&&(F._$.range=[N[N.length-(P||1)].range[0],N[N.length-1].range[1]]),U=this.performAction.apply(F,[X,J,ct,W.yy,q[1],D,N].concat(lt)),typeof U<"u")return U;P&&(B=B.slice(0,-1*P*2),D=D.slice(0,-1*P),N=N.slice(0,-1*P)),B.push(this.productions_[q[1]][0]),D.push(F.$),N.push(F._$),et=z[B[B.length-2]][B[B.length-1]],B.push(et);break;case 3:return!0}}return!0}},S=function(){var A={EOF:1,parseError:function(v,B){if(this.yy.parser)this.yy.parser.parseError(v,B);else throw new Error(v)},setInput:function(L,v){return this.yy=v||this.yy||{},this._input=L,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var v=L.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},unput:function(L){var v=L.length,B=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),B.length-1&&(this.yylineno-=B.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:B?(B.length===w.length?this.yylloc.first_column:0)+w[w.length-B.length].length-B[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(L){this.unput(this.match.slice(L))},pastInput:function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var L=this.pastInput(),v=new Array(L.length+1).join("-");return L+this.upcomingInput()+`
`+v+"^"},test_match:function(L,v){var B,w,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),w=L[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(L[0].length),this.matched+=L[0],B=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B)return B;if(this._backtrack){for(var N in D)this[N]=D[N];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,v,B,w;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),N=0;N<D.length;N++)if(B=this._input.match(this.rules[D[N]]),B&&(!v||B[0].length>v[0].length)){if(v=B,w=N,this.options.backtrack_lexer){if(L=this.test_match(B,D[N]),L!==!1)return L;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(L=this.test_match(v,D[w]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var v=this.next();return v||this.lex()},begin:function(v){this.conditionStack.push(v)},popState:function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},pushState:function(v){this.begin(v)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(v,B,w,D){switch(w){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return B.yytext[0];case 29:return 42;case 30:return 43;case 31:return 44;case 32:return 45;case 33:return 42;case 34:return 43;case 35:return 44;case 36:return 46;case 37:return 47;case 38:return 46;case 39:return 46;case 40:return 30;case 41:return B.yytext[0];case 42:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return A}();M.lexer=S;function R(){this.yy={}}return R.prototype=M,M.Parser=R,new R}();a4.parser=a4;const Fet=t=>t.match(/^\s*erDiagram/)!==null;let tu={},s4=[];const Pet={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},qet={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Vet=function(t,e,r){Xe.parseDirective(this,t,e,r)},eM=function(t){return typeof tu[t]>"u"&&(tu[t]={attributes:[]},H.info("Added new entity :",t)),tu[t]},zet={Cardinality:Pet,Identification:qet,parseDirective:Vet,getConfig:()=>nt().er,addEntity:eM,addAttributes:function(t,e){let r=eM(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),H.debug("Added attribute ",e[n].attributeName)},getEntities:()=>tu,addRelationship:function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};s4.push(i),H.debug("Added new relationship :",i)},getRelationships:()=>s4,clear:function(){tu={},s4=[],ci()},setAccTitle:Yn,getAccTitle:ui,setAccDescription:hi,getAccDescription:fi},ua={ONLY_ONE_START:"ONLY_ONE_S
`+mr.showPosition()+`
Expecting `+yl.join(", ")+", got '"+(this.terminals_[Dr]||Dr)+"'":Qs="Parse error on line "+(Gr+1)+": Unexpected "+(Dr==S0?"end of input":"'"+(this.terminals_[Dr]||Dr)+"'"),this.parseError(Qs,{text:mr.match,token:this.terminals_[Dr]||Dr,line:mr.yylineno,loc:Zs,expected:yl})}if(hn[0]instanceof Array&&hn.length>1)throw new Error("Parse Error: multiple actions possible at state: "+De+", token: "+Dr);switch(hn[0]){case 1:ce.push(Dr),je.push(mr.yytext),rt.push(mr.yylloc),ce.push(hn[1]),Dr=null,C0=mr.yyleng,ot=mr.yytext,Gr=mr.yylineno,Zs=mr.yylloc;break;case 2:if(Rn=this.productions_[hn[1]][1],_i.$=je[je.length-Rn],_i._$={first_line:rt[rt.length-(Rn||1)].first_line,last_line:rt[rt.length-1].last_line,first_column:rt[rt.length-(Rn||1)].first_column,last_column:rt[rt.length-1].last_column},vu&&(_i._$.range=[rt[rt.length-(Rn||1)].range[0],rt[rt.length-1].range[1]]),xa=this.performAction.apply(_i,[ot,C0,Gr,Hi.yy,hn[1],je,rt].concat(A0)),typeof xa<"u")return xa;Rn&&(ce=ce.slice(0,-1*Rn*2),je=je.slice(0,-1*Rn),rt=rt.slice(0,-1*Rn)),ce.push(this.productions_[hn[1]][0]),je.push(_i.$),rt.push(_i._$),xu=Ks[ce[ce.length-2]][ce[ce.length-1]],ce.push(xu);break;case 3:return!0}}return!0}},E0=function(){var Ln={EOF:1,parseError:function(ee,ce){if(this.yy.parser)this.yy.parser.parseError(ee,ce);else throw new Error(ee)},setInput:function(Xt,ee){return this.yy=ee||this.yy||{},this._input=Xt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Xt=this._input[0];this.yytext+=Xt,this.yyleng++,this.offset++,this.match+=Xt,this.matched+=Xt;var ee=Xt.match(/(?:\r\n?|\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Xt},unput:function(Xt){var ee=Xt.length,ce=Xt.split(/(?:\r\n?|\n)/g);this._input=Xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var Pt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ce.length-1&&(this.yylineno-=ce.length-1);var je=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ce?(ce.length===Pt.length?this.yylloc.first_column:0)+Pt[Pt.length-ce.length].length-ce[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[je[0],je[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Xt){this.unput(this.match.slice(Xt))},pastInput:function(){var Xt=this.matched.substr(0,this.matched.length-this.match.length);return(Xt.length>20?"...":"")+Xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Xt=this.match;return Xt.length<20&&(Xt+=this._input.substr(0,20-Xt.length)),(Xt.substr(0,20)+(Xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Xt=this.pastInput(),ee=new Array(Xt.length+1).join("-");return Xt+this.upcomingInput()+`
`+ee+"^"},test_match:function(Xt,ee){var ce,Pt,je;if(this.options.backtrack_lexer&&(je={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(je.yylloc.range=this.yylloc.range.slice(0))),Pt=Xt[0].match(/(?:\r\n?|\n).*/g),Pt&&(this.yylineno+=Pt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pt?Pt[Pt.length-1].length-Pt[Pt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Xt[0].length},this.yytext+=Xt[0],this.match+=Xt[0],this.matches=Xt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Xt[0].length),this.matched+=Xt[0],ce=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ce)return ce;if(this._backtrack){for(var rt in je)this[rt]=je[rt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Xt,ee,ce,Pt;this._more||(this.yytext="",this.match="");for(var je=this._currentRules(),rt=0;rt<je.length;rt++)if(ce=this._input.match(this.rules[je[rt]]),ce&&(!ee||ce[0].length>ee[0].length)){if(ee=ce,Pt=rt,this.options.backtrack_lexer){if(Xt=this.test_match(ce,je[rt]),Xt!==!1)return Xt;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(Xt=this.test_match(ee,je[Pt]),Xt!==!1?Xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ee=this.next();return ee||this.lex()},begin:function(ee){this.conditionStack.push(ee)},popState:function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},pushState:function(ee){this.begin(ee)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ee,ce,Pt,je){switch(Pt){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return ee.lex.firstGraph()&&this.begin("dir"),24;case 36:return ee.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\
`),o=0;o<s.length;o++)a.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(s[o]);return t.applyStyle(a,i.labelStyle),a}function r(n){for(var i="",a=!1,s,o=0;o<n.length;++o)if(s=n[o],a){switch(s){case"n":i+=`
`;break;default:i+=s}a=!1}else s==="\\"?a=!0:i+=s;return i}return d4}var ent=Gn,p4=rnt;function rnt(t,e){var r=t.append("foreignObject").attr("width","100000"),n=r.append("xhtml:div");n.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":n.insert(i);break;case"object":n.insert(function(){return i});break;default:n.html(i)}ent.applyStyle(n,e.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap");var a=n.node().getBoundingClientRect();return r.attr("width",a.width).attr("height",a.height),r}var g4,vM;function nnt(){if(vM)return g4;vM=1;var t=Gn;g4=e;function e(r,n){var i=r;return i.node().appendChild(n.label),t.applyStyle(i,n.labelStyle),i}return g4}var y4,xM;function m4(){if(xM)return y4;xM=1;var t=tnt(),e=p4,r=nnt();y4=n;function n(i,a,s){var o=a.label,l=i.append("g");a.labelType==="svg"?r(l,a):typeof o!="string"||a.labelType==="html"?e(l,a):t(l,a);var u=l.node().getBBox(),h;switch(s){case"top":h=-a.height/2;break;case"bottom":h=a.height/2-u.height;break;default:h=-u.height/2}return l.attr("transform","translate("+-u.width/2+","+h+")"),l}return y4}var b4,kM;function int(){if(kM)return b4;kM=1;var t=al,e=m4(),r=Gn,n=es;b4=i;function i(a,s,o){var l=s.nodes().filter(function(d){return!r.isSubgraph(s,d)}),u=a.selectAll("g.node").data(l,function(d){return d}).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),u=a.selectAll("g.node"),u.each(function(d){var f=s.node(d),p=n.select(this);r.applyClass(p,f.class,(p.classed("update")?"update ":"")+"node"),p.select("g.label").remove();var m=p.append("g").attr("class","label"),_=e(m,f),y=o[f.shape],b=t.pick(_.node().getBBox(),"width","height");f.elem=this,f.id&&p.attr("id",f.id),f.labelId&&m.attr("id",f.labelId),t.has(f,"width")&&(b.width=f.width),t.has(f,"height")&&(b.height=f.height),b.width+=f.paddingLeft+f.paddingRight,b.height+=f.paddingTop+f.paddingBottom,m.attr("transform","translate("+(f.paddingLeft-f.paddingRight)/2+","+(f.paddingTop-f.paddingBottom)/2+")");var x=n.select(this);x.select(".label-container").remove();var k=y(x,b,f).classed("label-container",!0);r.applyStyle(k,f.style);var T=k.node().getBBox();f.width=T.width,f.height=T.height});var h;return u.exit?h=u.exit():h=u.selectAll(null),r.applyTransition(h,s).style("opacity",0).remove(),u}return b4}var _4,wM;function ant(){if(wM)return _4;wM=1;var t=Gn,e=es,r=m4();_4=n;function n(i,a){var s=a.nodes().filter(function(u){return t.isSubgraph(a,u)}),o=i.selectAll("g.cluster").data(s,function(u){return u});o.selectAll("*").remove(),o.enter().append("g").attr("class","cluster").attr("id",function(u){var h=a.node(u);return h.id}).style("opacity",0),o=i.selectAll("g.cluster"),t.applyTransition(o,a).style("opacity",1),o.each(function(u){var h=a.node(u),d=e.select(this);e.select(this).append("rect");var f=d.append("g").attr("class","label");r(f,h,h.clusterLabelPos)}),o.selectAll("rect").each(function(u){var h=a.node(u),d=e.select(this);t.applyStyle(d,h.style)});var l;return o.exit?l=o.exit():l=o.selectAll(null),t.applyTransition(l,a).style("opacity",0).remove(),o}return _4}var v4,TM;function snt(){if(TM)return v4;TM=1;var t=al,e=m4(),r=Gn,n=es;v4=i;function i(a,s){var o=a.selectAll("g.edgeLabel").data(s.edges(),function(u){return r.edgeToId(u)}).classed("update",!0);o.exit().remove(),o.enter().append("g").classed("edgeLabel",!0).style("opacity",0),o=a.selectAll("g.edgeLabel"),o.each(function(u){var h=n.select(this);h.select(".label").remove();var d=s.edge(u),f=e(h,s.edge(u),0,0).classed("label",!0),p=f.node().getBBox();d.labelId&&f.attr("id",d.labelId),t.has(d,"width")||(d.width=p.width),t.has(d,"height")||(d.height=p.height)});var l;return o.exit?l=o.exit():l=o.selectAll(null),r.applyTransition(l,s).style("opacity",0).remove(),o}return v4}var x4,EM;function ont(){if(EM)return x4;EM=1;var t=al,e=dM,r=Gn,n=es;x4=i;function i(d,f,p){var m=d.selectAll("g.edgePath").data(f.edges(),function(b){return r.edgeToId(b)}).classed("update",!0),_=u(m,f);h(m,f);var y=m.merge!==void 0?m.merge(_):m;return r.applyTransition(y,f).style(
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var An={graphlib:Ort,dagre:fM,intersect:Grt,render:gnt,util:Gn,version:xnt};function RM(t,e,r){const n=e.width,i=e.height,a=(n+i)*.9,s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],o=da(t,a,a,s);return r.intersect=function(l){return An.intersect.polygon(r,s,l)},o}function IM(t,e,r){const i=e.height,a=i/4,s=e.width+2*a,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=da(t,s,i,o);return r.intersect=function(u){return An.intersect.polygon(r,o,u)},l}function NM(t,e,r){const n=e.width,i=e.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function BM(t,e,r){const n=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function DM(t,e,r){const n=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function OM(t,e,r){const n=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function FM(t,e,r){const n=e.width,i=e.height,a=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function PM(t,e,r){const n=e.width,i=e.height,a=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function qM(t,e,r){const n=e.height,i=e.width+n/4,a=t.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return r.intersect=function(s){return An.intersect.rect(r,s)},a}function VM(t,e,r){const n=e.width,i=e.height,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function zM(t,e,r){const n=e.width,i=n/2,a=i/(2.5+n/50),s=e.height+a,o="M 0,"+a+" a "+i+","+a+" 0,0,0 "+n+" 0 a "+i+","+a+" 0,0,0 "+-n+" 0 l 0,"+s+" a "+i+","+a+" 0,0,0 "+n+" 0 l 0,"+-s,l=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(s/2+a)+")");return r.intersect=function(u){const h=An.intersect.rect(r,u),d=h.x-r.x;if(i!=0&&(Math.abs(d)<r.width/2||Math.abs(d)==r.width/2&&Math.abs(h.y-r.y)>r.height/2-a)){let f=a*a*(1-d*d/(i*i));f!=0&&(f=Math.sqrt(f)),f=a-f,u.y-r.y>0&&(f=-f),h.y+=f}return h},l}function knt(t){t.shapes().question=RM,t.shapes().hexagon=IM,t.shapes().stadium=qM,t.shapes().subroutine=VM,t.shapes().cylinder=zM,t.shapes().rect_left_inv_arrow=NM,t.shapes().lean_right=BM,t.shapes().lean_left=DM,t.shapes().trapezoid=OM,t.shapes().inv_trapezoid=FM,t.shapes().rect_right_inv_arrow=PM}function wnt(t){t({question:RM}),t({hexagon:IM}),t({stadium:qM}),t({subroutine:VM}),t({cylinder:zM}),t({rect_left_inv_arrow:NM}),t({lean_right:BM}),t({lean_left:DM}),t({trapezoid:OM}),t({inv_trapezoid:FM}),t({rect_right_inv_arrow:PM})}function da(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const Tnt={addToRender:knt,addToRenderV2:wnt},YM={},Ent=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)YM[e[r]]=t[e[r]]},UM=function(t,e,r,n,i,a){const s=n?n.select(`[id="${r}"]`):St(`[id="${r}"]`),o=i||document;Object.keys(t).forEach(function(u){const h=t[u];let d="default";h.classes.length>0&&(d=h.classes.join(" "));const f=Ka(h.styles);let p=h.text!==void 0?h.text:h.id,m;if(Mr(nt().flowchart.htmlLabels)){const b={label:p.replace(/fa[lrsb]?:fa-[\w-]+/g,x=>`<i class='${x.replace(":"," ")}'></i>`)};m=p4(s,b).node(),m.parentNode.removeChild(m)}else{const b=o.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("style",f.labelStyle.replace("color:","fill
`),typeof s.style>"u"&&(h.style=h.style||"stroke: #333; stroke-width: 1.5px;fill:none"),h.labelStyle=h.labelStyle.replace("color:","fill:"))),h.id=o,h.class=l+" "+u,h.minlen=s.length||1,e.setEdge(r.db.lookUpDomId(s.start),r.db.lookUpDomId(s.end),h,n)})},S4={setConf:Ent,addVertices:UM,addEdges:WM,getClasses:function(t,e){H.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,r,n){H.info("Drawing flowchart"),n.db.clear();const{securityLevel:i,flowchart:a}=nt();let s;i==="sandbox"&&(s=St("#i"+e));const o=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;try{n.parser.parse(t)}catch{H.debug("Parsing failed")}let u=n.db.getDirection();typeof u>"u"&&(u="TD");const h=a.nodeSpacing||50,d=a.rankSpacing||50,f=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:h,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const m=n.db.getSubGraphs();for(let S=m.length-1;S>=0;S--)p=m[S],n.db.addVertex(p.id,p.title,"group",void 0,p.classes);const _=n.db.getVertices();H.warn("Get vertices",_);const y=n.db.getEdges();let b=0;for(b=m.length-1;b>=0;b--){p=m[b],Nu("cluster").append("text");for(let S=0;S<p.nodes.length;S++)H.warn("Setting subgraph",p.nodes[S],n.db.lookUpDomId(p.nodes[S]),n.db.lookUpDomId(p.id)),f.setParent(n.db.lookUpDomId(p.nodes[S]),n.db.lookUpDomId(p.id))}UM(_,f,e,o,l,n),WM(y,f,n);const x=An.render,k=new x;Tnt.addToRender(k),k.arrows().none=function(R,A,L,v){const w=R.append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");An.util.applyStyle(w,L[v+"Style"])},k.arrows().normal=function(R,A){R.append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const T=o.select(`[id="${e}"]`);bn(n.db,T,e);const C=o.select("#"+e+" g");for(k(C,f),C.selectAll("g.node").attr("title",function(){return n.db.getTooltip(this.id)}),n.db.indexNodes("subGraph"+b),b=0;b<m.length;b++)if(p=m[b],p.title!=="undefined"){const S=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(p.id)+'"] rect'),R=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(p.id)+'"]'),A=S[0].x.baseVal.value,L=S[0].y.baseVal.value,v=S[0].width.baseVal.value,w=St(R[0]).select(".label");w.attr("transform",`translate(${A+v/2}, ${L+14})`),w.attr("id",e+"Text");for(let D=0;D<p.classes.length;D++)R[0].classList.add(p.classes[D])}if(!a.htmlLabels){const S=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let R=0;R<S.length;R++){const A=S[R],L=A.getBBox(),v=l.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),A.insertBefore(v,A.firstChild)}}i1(f,T,a.diagramPadding,a.useMaxWidth),Object.keys(_).forEach(function(S){const R=_[S];if(R.link){const A=o.select("#"+e+' [id="'+n.db.lookUpDomId(S)+'"]');if(A){const L=l.createElementNS("http://www.w3.org/2000/svg","a");L.setAttributeNS("http://www.w3.org/2000/svg","class",R.classes.join(" ")),L.setAttributeNS("http://www.w3.org/2000/svg","href",R.link),L.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?L.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):R.linkTarget&&L.setAttributeNS("http://www.w3.org/2000/svg","target",R.linkTarget);const v=A.insert(function(){return L},":first-child"),B=A.select(".label-container");B&&v.append(function(){return B.node()});const w=A.select(".label");w&&v.append(function(){return w.node()})}}})}},HM={},Cnt=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)HM[e[r]]=t[e[r]]},GM=function(t,e,r,n,i,a){const s=n.select(`[id="${r}"]`);Object.keys(t).for
`),typeof o.style>"u"&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+h+" "+d,e.setEdge(o.start,o.end,f,n)})},A4={setConf:Cnt,addVertices:GM,addEdges:jM,getClasses:function(t,e){H.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,r,n){H.info("Drawing flowchart"),n.db.clear(),fa.setGen("gen-2"),n.parser.parse(t);let i=n.db.getDirection();typeof i>"u"&&(i="TD");const{securityLevel:a,flowchart:s}=nt(),o=s.nodeSpacing||50,l=s.rankSpacing||50;let u;a==="sandbox"&&(u=St("#i"+e));const h=St(a==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=a==="sandbox"?u.nodes()[0].contentDocument:document,f=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const m=n.db.getSubGraphs();H.info("Subgraphs - ",m);for(let C=m.length-1;C>=0;C--)p=m[C],H.info("Subgraph - ",p),n.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const _=n.db.getVertices(),y=n.db.getEdges();H.info(y);let b=0;for(b=m.length-1;b>=0;b--){p=m[b],Nu("cluster").append("text");for(let C=0;C<p.nodes.length;C++)H.info("Setting up subgraphs",p.nodes[C],p.id),f.setParent(p.nodes[C],p.id)}GM(_,f,e,h,d,n),jM(y,f);const x=h.select(`[id="${e}"]`);bn(n.db,x,e);const k=h.select("#"+e+" g");if(i4(k,f,["point","circle","cross"],"flowchart",e),i1(f,x,s.diagramPadding,s.useMaxWidth),n.db.indexNodes("subGraph"+b),!s.htmlLabels){const C=d.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let M=0;M<C.length;M++){const S=C[M],R=S.getBBox(),A=d.createElementNS("http://www.w3.org/2000/svg","rect");A.setAttribute("rx",0),A.setAttribute("ry",0),A.setAttribute("width",R.width),A.setAttribute("height",R.height),S.insertBefore(A,S.firstChild)}}Object.keys(_).forEach(function(C){const M=_[C];if(M.link){const S=St("#"+e+' [id="'+C+'"]');if(S){const R=d.createElementNS("http://www.w3.org/2000/svg","a");R.setAttributeNS("http://www.w3.org/2000/svg","class",M.classes.join(" ")),R.setAttributeNS("http://www.w3.org/2000/svg","href",M.link),R.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),a==="sandbox"?R.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):M.linkTarget&&R.setAttributeNS("http://www.w3.org/2000/svg","target",M.linkTarget);const A=S.insert(function(){return R},":first-child"),L=S.select(".label-container");L&&A.append(function(){return L.node()});const v=S.select(".label");v&&A.append(function(){return v.node()})}}})}};var M4=function(){var t=function(S,R,A,L){for(A=A||{},L=S.length;L--;A[S[L]]=R);return A},e=[1,3],r=[1,5],n=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],s=[1,17],o=[1,18],l=[1,19],u=[1,20],h=[1,21],d=[1,22],f=[1,23],p=[1,24],m=[1,25],_=[1,26],y=[1,28],b=[1,30],x=[1,33],k=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],T={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8
`+$.showPosition()+`
Expecting `+P.join(", ")+", got '"+(this.terminals_[it]||it)+"'":et="Parse error on line "+(z+1)+": Unexpected "+(it==J?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(et,{text:$.match,token:this.terminals_[it]||it,line:$.yylineno,loc:W,expected:P})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+it);switch(V[0]){case 1:L.push(it),B.push($.yytext),w.push($.yylloc),L.push(V[1]),it=null,X=$.yyleng,N=$.yytext,z=$.yylineno,W=$.yylloc;break;case 2:if(F=this.productions_[V[1]][1],q.$=B[B.length-F],q._$={first_line:w[w.length-(F||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(F||1)].first_column,last_column:w[w.length-1].last_column},tt&&(q._$.range=[w[w.length-(F||1)].range[0],w[w.length-1].range[1]]),Q=this.performAction.apply(q,[N,X,z,lt.yy,V[1],B,w].concat(Y)),typeof Q<"u")return Q;F&&(L=L.slice(0,-1*F*2),B=B.slice(0,-1*F),w=w.slice(0,-1*F)),L.push(this.productions_[V[1]][0]),B.push(q.$),w.push(q._$),j=D[L[L.length-2]][L[L.length-1]],L.push(j);break;case 3:return!0}}return!0}},C=function(){var S={EOF:1,parseError:function(A,L){if(this.yy.parser)this.yy.parser.parseError(A,L);else throw new Error(A)},setInput:function(R,A){return this.yy=A||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var A=R.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var A=R.length,L=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===v.length?this.yylloc.first_column:0)+v[v.length-L.length].length-L[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),A=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
`+A+"^"},test_match:function(R,A){var L,v,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),v=R[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],L=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var w in B)this[w]=B[w];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,A,L,v;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),w=0;w<B.length;w++)if(L=this._input.match(this.rules[B[w]]),L&&(!A||L[0].length>A[0].length)){if(A=L,v=w,this.options.backtrack_lexer){if(R=this.test_match(L,B[w]),R!==!1)return R;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(R=this.test_match(A,B[v]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var A=this.next();return A||this.lex()},begin:function(A){this.conditionStack.push(A)},popState:function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},pushState:function(A){this.begin(A)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(A,L,v,B){switch(v){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 37;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 26:this.popState();break;case 27:return 36;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};return S}();T.lexer=C;function M(){this.yy={}}return M.prototype=T,T.Parser=M,new M}();M4.parser=M4;const Snt=t=>t.match(/^\s*gantt/)!==null;let zi="",L4="",R4="",au=[],su=[],I4={},N4=[],a0=[],sl="";const $M=["active","done","crit","milestone"];let s0=[],ou=!1,B4=!1,D4=0;const Ant=function(t,e,r){Xe.parseDirective(this,t,e,r)},Mnt=function(){N4=[],a0=[],sl="",s0=[],o0=0,F4=void 0,l0=void 0,yr=[],zi="",L4="",R4="",au=[],su=[],ou=!1,B4=!1,D4=0,I4={},ci()},Lnt=function(t){L4=t},Rnt=function(){
`+k.showPosition()+`
Expecting `+X.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ct="Parse error on line "+(m+1)+": Unexpected "+(A==b?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ct,{text:k.match,token:this.terminals_[A]||A,line:k.yylineno,loc:M,expected:X})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+A);switch(v[0]){case 1:l.push(A),h.push(k.yytext),d.push(k.yylloc),l.push(v[1]),A=null,_=k.yyleng,p=k.yytext,m=k.yylineno,M=k.yylloc;break;case 2:if(N=this.productions_[v[1]][1],w.$=h[h.length-N],w._$={first_line:d[d.length-(N||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(N||1)].first_column,last_column:d[d.length-1].last_column},S&&(w._$.range=[d[d.length-(N||1)].range[0],d[d.length-1].range[1]]),B=this.performAction.apply(w,[p,_,m,T.yy,v[1],h,d].concat(x)),typeof B<"u")return B;N&&(l=l.slice(0,-1*N*2),h=h.slice(0,-1*N),d=d.slice(0,-1*N)),l.push(this.productions_[v[1]][0]),h.push(w.$),d.push(w._$),z=f[l[l.length-2]][l[l.length-1]],l.push(z);break;case 3:return!0}}return!0}},n=function(){var a={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
`+o+"^"},test_match:function(s,o){var l,u,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in h)this[d]=h[d];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),d=0;d<h.length;d++)if(l=this._input.match(this.rules[h[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,u=d,this.options.backtrack_lexer){if(s=this.test_match(l,h[d]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,h[u]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,u,h){switch(u){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return a}();r.lexer=n;function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i}();q4.parser=q4;var iL="",aL=!1;const nit={setMessage:t=>{H.debug("Setting message to: "+t),iL=t},getMessage:()=>iL,setInfo:t=>{aL=t},getInfo:()=>aL,clear:ci},iit={draw:(t,e,r,n)=>{try{H.debug(`Rendering info diagram
`+t);const i=nt().securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body").select("#"+e);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),o.attr("height",100),o.attr("width",400)}catch(i){H.error("Error while rendering info diagram"),H.error(i.message)}}},ait=t=>t.match(/^\s*info/)!==null;var V4=function(){var t=function(M,S,R,A){for(R=R||{},A=M.length;A--;R[M[A]]=S);return R},e=[1,4],r=[1,5],n=[1,6],i=[1,7],a=[1,9],s=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],h=[2,8],d=[1,18],f=[1,19],p=[1,20],m=[1,21],_=[1,22],y=[1,23],b=[1,28],x=[6,26,27,28,29],k={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(S,R,A,L,v,B,w){var D=B.length-1;switch(v){case 4:L.setShowData(!0);break;case 7:this.$=B[D-1];break;case 9:L.addSection(B[D-1],L.cleanupValue(B[D]));break;case 10:this.$=B[D].trim(),L.setDiagramTitle(this.$);break;case 11:this.$=B[D].trim(),L.setAccTitle(this.$);break;case 12:case 13:this.$=B[D].trim(),L.setAccDescription(this.$);break;case 14:L.addSection(B[D].substr(8)),this.$=B[D].substr(8);break;case 21:L.parseDirective("%%{","open_directive");break;case 22:L.parseDirective(B[D],"type_directive");break;case 23:B[D]=B[D].trim().replace(/'/g,'"'),L.parseDirective(B[D],"arg_directive");break;case 24:L.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},t(s,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,h,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:f,15:p,17:m,19:_,20:y,29:a}),t(s,o,{7:25}),{23:26,24:[1,27],32:b},t([24,32],[2,22]),t(s,[2,6]),{4:29,26:r,27:n,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,h,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:f,15:p,17:m,19:_,20:y,29:a}),t(x,[2,16]),{25:34,31:[1,35]},t(x,[2,24]),t(s,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:b},{32:[2,23]},t(x,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(S,R){if(R.recoverable)this.trace(S);else{var A=new Error(S);throw A.hash=R,A}},parse:function(S){var R=this,A=[0],L=[],v=[null],B=[],w=this.table,D="",N=0,z=0,X=2,ct=1,J=B.slice.call(arguments,1),Y=Object.create(this.lexer),$={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&($.yy[lt]=this.yy[lt]);Y.setInput(S,$.yy),$.yy.lexer=Y,$.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var ut=Y.yylloc;B.push(ut);var W=Y.options&&Y.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(){var et;return et=L.pop()||Y.lex()||ct,typeof et!="number"&&(et instanceof Array&&(L=et,et=L.pop()),et=R.symbols_[et]||et),et}for(var K,it,Z,V,Q={},q,U,F,j;;){if(it=A[A.length-1],this.defaultActions[it]?Z=this.defaultActions[it]:((K===null||typeof K>"u")&&(K=tt()),Z=w[it]&&w[it][K]),typeof Z>"u"||!Z
`+Y.showPosition()+`
Expecting `+j.join(", ")+", got '"+(this.terminals_[K]||K)+"'":P="Parse error on line "+(N+1)+": Unexpected "+(K==ct?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(P,{text:Y.match,token:this.terminals_[K]||K,line:Y.yylineno,loc:ut,expected:j})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+it+", token: "+K);switch(Z[0]){case 1:A.push(K),v.push(Y.yytext),B.push(Y.yylloc),A.push(Z[1]),K=null,z=Y.yyleng,D=Y.yytext,N=Y.yylineno,ut=Y.yylloc;break;case 2:if(U=this.productions_[Z[1]][1],Q.$=v[v.length-U],Q._$={first_line:B[B.length-(U||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(U||1)].first_column,last_column:B[B.length-1].last_column},W&&(Q._$.range=[B[B.length-(U||1)].range[0],B[B.length-1].range[1]]),V=this.performAction.apply(Q,[D,z,N,$.yy,Z[1],v,B].concat(J)),typeof V<"u")return V;U&&(A=A.slice(0,-1*U*2),v=v.slice(0,-1*U),B=B.slice(0,-1*U)),A.push(this.productions_[Z[1]][0]),v.push(Q.$),B.push(Q._$),F=w[A[A.length-2]][A[A.length-1]],A.push(F);break;case 3:return!0}}return!0}},T=function(){var M={EOF:1,parseError:function(R,A){if(this.yy.parser)this.yy.parser.parseError(R,A);else throw new Error(R)},setInput:function(S,R){return this.yy=R||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var R=S.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},unput:function(S){var R=S.length,A=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===L.length?this.yylloc.first_column:0)+L[L.length-A.length].length-A[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(S){this.unput(this.match.slice(S))},pastInput:function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var S=this.pastInput(),R=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
`+R+"^"},test_match:function(S,R){var A,L,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),L=S[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],A=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var B in v)this[B]=v[B];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,R,A,L;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),B=0;B<v.length;B++)if(A=this._input.match(this.rules[v[B]]),A&&(!R||A[0].length>R[0].length)){if(R=A,L=B,this.options.backtrack_lexer){if(S=this.test_match(A,v[B]),S!==!1)return S;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(S=this.test_match(R,v[L]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var R=this.next();return R||this.lex()},begin:function(R){this.conditionStack.push(R)},popState:function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},pushState:function(R){this.begin(R)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(R,A,L,v){switch(L){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return M}();k.lexer=T;function C(){this.yy={}}return C.prototype=k,k.Parser=C,new C}();V4.parser=V4;const sit=t=>t.match(/^\s*pie/)!==null;let c0={},z4=!1;const oit={parseDirective:function(t,e,r){Xe.parseDirective(this,t,e,r)},getConfig:()=>nt().pie,addSection:function(t,e){t=pe.sanitizeText(t,nt()),typeof c0[t]>"u"&&(c0[t]=e,H.debug("Added new section :",t))},getSections:()=>c0,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){c0={},z4=!1,ci()},setAccTitle:Yn,getAccTitle:ui,setDiagramTitle:c1,getDiagramTitle:u1,setShowData:function(t){z4=t},getShowData:function(){return z4},getAccDescription:fi,setAccDescription:hi};let ga=nt(),ya;const lu=450,lit={draw:(t,e,r,n)=>{try{ga=nt(),H.debug(`Rendering info diagram
`+t);const b=nt().securityLevel;let x;b==="sandbox"&&(x=St("#i"+e));const k=St(b==="sandbox"?x.nodes()[0].contentDocument.body:"body"),T=b==="sandbox"?x.nodes()[0].contentDocument:document;n.db.clear(),n.parser.parse(t),H.debug("Parsed info diagram");const C=T.getElementById(e);ya=C.parentElement.offsetWidth,typeof ya>"u"&&(ya=1200),typeof ga.useWidth<"u"&&(ya=ga.useWidth),typeof ga.pie.useWidth<"u"&&(ya=ga.pie.useWidth);const M=k.select("#"+e);li(M,lu,ya,ga.pie.useMaxWidth),bn(n.db,M,e),C.setAttribute("viewBox","0 0 "+ya+" "+lu);var i=40,a=18,s=4,o=Math.min(ya,lu)/2-i,l=M.append("g").attr("transform","translate("+ya/2+","+lu/2+")"),u=n.db.getSections(),h=0;Object.keys(u).forEach(function(R){h+=u[R]});const S=ga.themeVariables;var d=[S.pie1,S.pie2,S.pie3,S.pie4,S.pie5,S.pie6,S.pie7,S.pie8,S.pie9,S.pie10,S.pie11,S.pie12],f=nf().range(d),p=B7().value(function(R){return R[1]}),m=p(Object.entries(u)),_=yf().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(m).enter().append("path").attr("d",_).attr("fill",function(R){return f(R.data[0])}).attr("class","pieCircle"),l.selectAll("mySlices").data(m).enter().append("text").text(function(R){return(R.data[1]/h*100).toFixed(0)+"%"}).attr("transform",function(R){return"translate("+_.centroid(R)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.db.getDiagramTitle()).attr("x",0).attr("y",-(lu-50)/2).attr("class","pieTitleText");var y=l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class","legend").attr("transform",function(R,A){var L=a+s,v=L*f.domain().length/2,B=12*a,w=A*L-v;return"translate("+B+","+w+")"});y.append("rect").attr("width",a).attr("height",a).style("fill",f).style("stroke",f),y.data(m).append("text").attr("x",a+s).attr("y",a-s).text(function(R){return n.db.getShowData()||ga.showData||ga.pie.showData?R.data[0]+" ["+R.data[1]+"]":R.data[0]})}catch(b){H.error("Error while rendering info diagram"),H.error(b)}}};var Y4=function(){var t=function(it,Z,V,Q){for(V=V||{},Q=it.length;Q--;V[it[Q]]=Z);return V},e=[1,3],r=[1,5],n=[1,6],i=[1,7],a=[1,8],s=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,30],m=[1,31],_=[1,24],y=[1,32],b=[1,33],x=[1,36],k=[71,72],T=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],C=[1,56],M=[1,57],S=[1,58],R=[1,59],A=[1,60],L=[1,61],v=[1,62],B=[62,63],w=[1,74],D=[1,70],N=[1,71],z=[1,72],X=[1,73],ct=[1,75],J=[1,79],Y=[1,80],$=[1,77],lt=[1,78],ut=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],W={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:
`+Ct.showPosition()+`
Expecting `+zt.join(", ")+", got '"+(this.terminals_[le]||le)+"'":wt="Parse error on line "+(et+1)+": Unexpected "+(le==Lt?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(wt,{text:Ct.match,token:this.terminals_[le]||le,line:Ct.yylineno,loc:vt,expected:zt})}if(Gt[0]instanceof Array&&Gt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+le);switch(Gt[0]){case 1:Q.push(le),U.push(Ct.yytext),F.push(Ct.yylloc),Q.push(Gt[1]),le=null,at=Ct.yyleng,P=Ct.yytext,et=Ct.yylineno,vt=Ct.yylloc;break;case 2:if(jt=this.productions_[Gt[1]][1],Qt.$=U[U.length-jt],Qt._$={first_line:F[F.length-(jt||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(jt||1)].first_column,last_column:F[F.length-1].last_column},Tt&&(Qt._$.range=[F[F.length-(jt||1)].range[0],F[F.length-1].range[1]]),$t=this.performAction.apply(Qt,[P,at,et,pt.yy,Gt[1],U,F].concat(Rt)),typeof $t<"u")return $t;jt&&(Q=Q.slice(0,-1*jt*2),U=U.slice(0,-1*jt),F=F.slice(0,-1*jt)),Q.push(this.productions_[Gt[1]][0]),U.push(Qt.$),F.push(Qt._$),Ft=j[Q[Q.length-2]][Q[Q.length-1]],Q.push(Ft);break;case 3:return!0}}return!0}},tt=function(){var it={EOF:1,parseError:function(V,Q){if(this.yy.parser)this.yy.parser.parseError(V,Q);else throw new Error(V)},setInput:function(Z,V){return this.yy=V||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var V=Z.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},unput:function(Z){var V=Z.length,Q=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Q.length-1&&(this.yylineno-=Q.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Q?(Q.length===q.length?this.yylloc.first_column:0)+q[q.length-Q.length].length-Q[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Z){this.unput(this.match.slice(Z))},pastInput:function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Z=this.pastInput(),V=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+`
`+V+"^"},test_match:function(Z,V){var Q,q,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),q=Z[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],Q=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Q)return Q;if(this._backtrack){for(var F in U)this[F]=U[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,V,Q,q;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),F=0;F<U.length;F++)if(Q=this._input.match(this.rules[U[F]]),Q&&(!V||Q[0].length>V[0].length)){if(V=Q,q=F,this.options.backtrack_lexer){if(Z=this.test_match(Q,U[F]),Z!==!1)return Z;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(Z=this.test_match(V,U[q]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,Q,q,U){switch(q){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return Q.yytext=Q.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return it}();W.lexer=tt;function K(){this.yy={}}return K.prototype=W,W.Parser=K,new K}();Y4.parser=Y4;const cit=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let U4=[],kn={},cu={},rs={},uu={};const uit={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PE
L${e.line_height},${e.line_height/2}
M${e.line_height},${e.line_height/2}
L0,${e.line_height}`).attr("stroke-width",1)}};let sr={},oL=0;const lL=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",sr.rect_min_width+"px").attr("height",sr.rect_min_height+"px"),cL=(t,e,r)=>{let n=sr.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",sr.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(u=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",sr.rect_min_width/2).attr("dy",0).text(u):i.append("tspan").attr("text-anchor","middle").attr("x",sr.rect_min_width/2).attr("dy",sr.line_height*.75).text(u),a++});let s=1.5*sr.rect_padding,o=a*sr.line_height*.75,l=s+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",sr.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:i,y:l}},uL=(t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",sr.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0;const s=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>s&&a<3;){let h=l.substring(0,s);l=l.substring(s,l.length),u=l.length,o[o.length]=h,a++}if(a==3){let h=o[o.length-1];o[o.length-1]=h.substring(0,h.length-4)+"..."}else o[o.length]=l;a=0}),o.forEach(l=>{i.append("tspan").attr("x",sr.rect_padding).attr("dy",sr.line_height).text(l)}),i},hit=(t,e,r,n)=>{const i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),s="rel"+oL;oL++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-l.width/2).attr("y",a.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},fit=function(t,e,r,n,i){const a=r.edge(cl(e.src),cl(e.dst)),s=Ua().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+pe.getUrl(sr.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+pe.getUrl(sr.arrowMarkerAbsolute)+"#"+sL.ReqMarkers.ARROW+"_line_ending)")),hit(t,o,sr,`<<${e.type}>>`)},dit=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];n=cl(n),H.info("Added new requirement: ",n);const a=r.append("g").attr("id",n),s="req-"+n,o=lL(a,s);let l=cL(a,n+"_title",[`<<${i.type}>>`,`${i.name}`]);uL(a,n+"_body",[`Id: ${i.id}`,`Text: ${i.text}`,`Risk: ${i.risk}`,`Verification: ${i.verifyMethod}`],l.y);const u=o.node().getBBox();e.setNode(n,{width:u.width,height:u.height,shape:"rect",id:n})})},pit=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];const a=cl(n),s=r.append("g").attr("id",a),o="element-"+a,l=lL(s,o);let u=cL(s,o+"_title",["<<Element>>",`${n}`]);uL(s,o+"_body",[`Type: ${i.type||"Not Specified"}`,`Doc Ref: ${i.docRef||"None"}`],u.y);const h=l.node().getBBox();e.setNode(a,{width:h.width,height:h.height,shape:"rect",id:a})})},git=(t,e)=>(t.forEach(function(r){let n=cl(r.src),i=cl(r.dst);e.setEdge(n,i,{relationship:r})}),t),yit=function(t,e){e.nodes().forEach(function(r){typeof r<"u"&&typeof e.node(r)<"u"&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},cl=t=>t.replace(/\s/g,"").replace(/\./g,"_"),mit={draw:(t,e,r,n)=>{sr=nt().requirement,n.db.clear(),n.parser.parse(t);const i=sr.securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);sL.insertLineEndings(o,sr);const l=new cr.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:sr.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=n.db.getRequirements(),h=n.db.getElements(),d=n.db.getRelationships();dit(u,l,o),pit(h,l,o),git(d,l),Zc.layout(l),yit(o,l),d.forEach(function(y)
`+Ct.showPosition()+`
Expecting `+zt.join(", ")+", got '"+(this.terminals_[le]||le)+"'":wt="Parse error on line "+(et+1)+": Unexpected "+(le==Lt?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(wt,{text:Ct.match,token:this.terminals_[le]||le,line:Ct.yylineno,loc:vt,expected:zt})}if(Gt[0]instanceof Array&&Gt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+le);switch(Gt[0]){case 1:Q.push(le),U.push(Ct.yytext),F.push(Ct.yylloc),Q.push(Gt[1]),le=null,at=Ct.yyleng,P=Ct.yytext,et=Ct.yylineno,vt=Ct.yylloc;break;case 2:if(jt=this.productions_[Gt[1]][1],Qt.$=U[U.length-jt],Qt._$={first_line:F[F.length-(jt||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(jt||1)].first_column,last_column:F[F.length-1].last_column},Tt&&(Qt._$.range=[F[F.length-(jt||1)].range[0],F[F.length-1].range[1]]),$t=this.performAction.apply(Qt,[P,at,et,pt.yy,Gt[1],U,F].concat(Rt)),typeof $t<"u")return $t;jt&&(Q=Q.slice(0,-1*jt*2),U=U.slice(0,-1*jt),F=F.slice(0,-1*jt)),Q.push(this.productions_[Gt[1]][0]),U.push(Qt.$),F.push(Qt._$),Ft=j[Q[Q.length-2]][Q[Q.length-1]],Q.push(Ft);break;case 3:return!0}}return!0}},tt=function(){var it={EOF:1,parseError:function(V,Q){if(this.yy.parser)this.yy.parser.parseError(V,Q);else throw new Error(V)},setInput:function(Z,V){return this.yy=V||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var V=Z.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},unput:function(Z){var V=Z.length,Q=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Q.length-1&&(this.yylineno-=Q.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Q?(Q.length===q.length?this.yylloc.first_column:0)+q[q.length-Q.length].length-Q[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Z){this.unput(this.match.slice(Z))},pastInput:function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Z=this.pastInput(),V=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+`
`+V+"^"},test_match:function(Z,V){var Q,q,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),q=Z[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],Q=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Q)return Q;if(this._backtrack){for(var F in U)this[F]=U[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,V,Q,q;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),F=0;F<U.length;F++)if(Q=this._input.match(this.rules[U[F]]),Q&&(!V||Q[0].length>V[0].length)){if(V=Q,q=F,this.options.backtrack_lexer){if(Z=this.test_match(Q,U[F]),Z!==!1)return Z;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(Z=this.test_match(V,U[q]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,Q,q,U){switch(q){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return Q.yytext=Q.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return Q.yytext=Q.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],
`+U.showPosition()+`
Expecting `+ft.join(", ")+", got '"+(this.terminals_[It]||It)+"'":le="Parse error on line "+(it+1)+": Unexpected "+(It==Q?"end of input":"'"+(this.terminals_[It]||It)+"'"),this.parseError(le,{text:U.match,token:this.terminals_[It]||It,line:U.yylineno,loc:P,expected:ft})}if(Rt[0]instanceof Array&&Rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lt+", token: "+It);switch(Rt[0]){case 1:$.push(It),ut.push(U.yytext),W.push(U.yylloc),$.push(Rt[1]),It=null,Z=U.yyleng,K=U.yytext,it=U.yylineno,P=U.yylloc;break;case 2:if(vt=this.productions_[Rt[1]][1],pt.$=ut[ut.length-vt],pt._$={first_line:W[W.length-(vt||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(vt||1)].first_column,last_column:W[W.length-1].last_column},et&&(pt._$.range=[W[W.length-(vt||1)].range[0],W[W.length-1].range[1]]),Ct=this.performAction.apply(pt,[K,Z,it,F.yy,Rt[1],ut,W].concat(q)),typeof Ct<"u")return Ct;vt&&($=$.slice(0,-1*vt*2),ut=ut.slice(0,-1*vt),W=W.slice(0,-1*vt)),$.push(this.productions_[Rt[1]][0]),ut.push(pt.$),W.push(pt._$),Tt=tt[$[$.length-2]][$[$.length-1]],$.push(Tt);break;case 3:return!0}}return!0}},z=function(){var ct={EOF:1,parseError:function(Y,$){if(this.yy.parser)this.yy.parser.parseError(Y,$);else throw new Error(Y)},setInput:function(J,Y){return this.yy=Y||this.yy||{},this._input=J,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var Y=J.match(/(?:\r\n?|\n).*/g);return Y?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var Y=J.length,$=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Y),this.offset-=Y;var lt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var ut=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===lt.length?this.yylloc.first_column:0)+lt[lt.length-$.length].length-$[0].length:this.yylloc.first_column-Y},this.options.ranges&&(this.yylloc.range=[ut[0],ut[0]+this.yyleng-Y]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),Y=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
`+Y+"^"},test_match:function(J,Y){var $,lt,ut;if(this.options.backtrack_lexer&&(ut={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ut.yylloc.range=this.yylloc.range.slice(0))),lt=J[0].match(/(?:\r\n?|\n).*/g),lt&&(this.yylineno+=lt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lt?lt[lt.length-1].length-lt[lt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(J[0].length),this.matched+=J[0],$=this.performAction.call(this,this.yy,this,Y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var W in ut)this[W]=ut[W];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,Y,$,lt;this._more||(this.yytext="",this.match="");for(var ut=this._currentRules(),W=0;W<ut.length;W++)if($=this._input.match(this.rules[ut[W]]),$&&(!Y||$[0].length>Y[0].length)){if(Y=$,lt=W,this.options.backtrack_lexer){if(J=this.test_match($,ut[W]),J!==!1)return J;if(this._backtrack){Y=!1;continue}else return!1}else if(!this.options.flex)break}return Y?(J=this.test_match(Y,ut[lt]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Y=this.next();return Y||this.lex()},begin:function(Y){this.conditionStack.push(Y)},popState:function(){var Y=this.conditionStack.length-1;return Y>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Y){return Y=this.conditionStack.length-1-Math.abs(Y||0),Y>=0?this.conditionStack[Y]:"INITIAL"},pushState:function(Y){this.begin(Y)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Y,$,lt,ut){switch(lt){case 0:return 41;case 1:return 42;case 2:return 43;case 3:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:break;case 10:break;case 11:return 5;case 12:break;case 13:break;case 14:break;case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 24:this.popState();break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),23;case 28:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),24;case 29:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),25;case 30:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),23;case 31:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),24;case 32:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),25;case 33:return 41;case 34:return 42;case 35:return 43;case 36:return 44;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:return this.popState(),"ID";case 40:this.popState();break;case 41:return"STATE_DESCR";case 42:return 17;case 43:this.popState();break;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 46:break;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 52:break;case 53:return"NOTE_TEXT";case 54:return this.popState(),"ID";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),$.yytext=$.yytext.substr(2).trim(),29;case 57:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),29;case 58:return 7;case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return $.yytext=$.yytext.trim(),12;case 64:return 13;case 65:return 26;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,
`+w.showPosition()+`
Expecting `+it.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Z="Parse error on line "+(R+1)+": Unexpected "+(J==v?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Z,{text:w.match,token:this.terminals_[J]||J,line:w.yylineno,loc:z,expected:it})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+J);switch($[0]){case 1:x.push(J),T.push(w.yytext),C.push(w.yylloc),x.push($[1]),J=null,A=w.yyleng,S=w.yytext,R=w.yylineno,z=w.yylloc;break;case 2:if(tt=this.productions_[$[1]][1],ut.$=T[T.length-tt],ut._$={first_line:C[C.length-(tt||1)].first_line,last_line:C[C.length-1].last_line,first_column:C[C.length-(tt||1)].first_column,last_column:C[C.length-1].last_column},X&&(ut._$.range=[C[C.length-(tt||1)].range[0],C[C.length-1].range[1]]),lt=this.performAction.apply(ut,[S,A,R,D.yy,$[1],T,C].concat(B)),typeof lt<"u")return lt;tt&&(x=x.slice(0,-1*tt*2),T=T.slice(0,-1*tt),C=C.slice(0,-1*tt)),x.push(this.productions_[$[1]][0]),T.push(ut.$),C.push(ut._$),K=M[x[x.length-2]][x[x.length-1]],x.push(K);break;case 3:return!0}}return!0}},p=function(){var _={EOF:1,parseError:function(b,x){if(this.yy.parser)this.yy.parser.parseError(b,x);else throw new Error(b)},setInput:function(y,b){return this.yy=b||this.yy||{},this._input=y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var b=y.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},unput:function(y){var b=y.length,x=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===k.length?this.yylloc.first_column:0)+k[k.length-x.length].length-x[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(y){this.unput(this.match.slice(y))},pastInput:function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var y=this.pastInput(),b=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
`+b+"^"},test_match:function(y,b){var x,k,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),k=y[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+y[0].length},this.yytext+=y[0],this.match+=y[0],this.matches=y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(y[0].length),this.matched+=y[0],x=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var C in T)this[C]=T[C];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var y,b,x,k;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),C=0;C<T.length;C++)if(x=this._input.match(this.rules[T[C]]),x&&(!b||x[0].length>b[0].length)){if(b=x,k=C,this.options.backtrack_lexer){if(y=this.test_match(x,T[C]),y!==!1)return y;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(y=this.test_match(b,T[k]),y!==!1?y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,x,k,T){switch(k){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();f.lexer=p;function m(){this.yy={}}return m.prototype=f,f.Parser=m,new m}();e_.parser=e_;const jat=t=>t.match(/^\s*journey/)!==null;let pl="";const r_=[],gu=[],gl=[],$at=function(t,e,r){Xe.parseDirective(this,t,e,r)},Xat=function(){r_.length=0,gu.length=0,pl="",gl.length=0,ci()},Kat=function(t){pl=t,r_.push(t)},Zat=function(){return r_},Qat=function(){let t=qL();const e=100;let r=0;for(;!t&&r<e;)t=qL(),r++;return gu.push(...gl),gu},Jat=function(){const t=[];return gu.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},tst=function(t,e){const r=e.substr(1).split(":");let n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const a=i.map(o=>o.trim()),s={section:pl,type:pl,people:a,task:t,score:n};gl.push(s)},est=function(t){const e={section:pl,type:pl,description:t,task:t,classes:[]};gu.push(e)},qL=function(){const t=function(r){return gl[r].processed};let e=!0;for(let r=0;r<gl.length;r++)t(r),e=e&&gl[r].processed;return e},VL={parseDirective:$at,getConfig:()=>nt().journey,clear:Xat,setDiagramTitle:c1,getDiagramTitle:u1,setAccTitle:Yn,getAccTitle:ui,setAccDescription:hi,getAccDescription:fi,addSection:Kat,getSections:Zat,getTasks:Qat,addTask:tst,addTaskOrg:est,getActors:function(){return Jat()}},x0=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),typeof e.class<"u"&&r.attr("class",e.class),r},rst=function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).att
`);const a=nt().securityLevel;let s;a==="sandbox"&&(s=St("#i"+e));const o=St(a==="sandbox"?s.nodes()[0].contentDocument.body:"body");jn.init();const l=o.select("#"+e);yu.initGraphics(l);const u=n.db.getTasks(),h=n.db.getDiagramTitle(),d=n.db.getActors();for(const b in ba)delete ba[b];let f=0;d.forEach(b=>{ba[b]={color:i.actorColours[f%i.actorColours.length],position:f},f++}),cst(l),jn.insert(0,0,$s,Object.keys(ba).length*50),hst(l,u,0);const p=jn.getBounds();h&&l.append("text").text(h).attr("x",$s).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*i.diagramMarginY,_=$s+p.stopx+2*i.diagramMarginX;li(l,m,_,i.useMaxWidth),l.append("line").attr("x1",$s).attr("y1",i.height*4).attr("x2",_-$s-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const y=h?70:0;l.attr("viewBox",`${p.startx} -25 ${_} ${m+y}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+y+25),bn(n.db,l,e)},jn={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,n){typeof t[e]>"u"?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){const i=nt().journey,a=this;let s=0;function o(l){return function(h){s++;const d=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-d*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(jn.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(jn.data,"stopx",r+d*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-d*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(jn.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(jn.data,"stopy",n+d*i.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,n){const i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(jn.data,"startx",i,Math.min),this.updateVal(jn.data,"starty",s,Math.min),this.updateVal(jn.data,"stopx",a,Math.max),this.updateVal(jn.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},i_=k0.sectionFills,HL=k0.sectionColours,hst=function(t,e,r){const n=nt().journey;let i="";const a=n.height*2+n.diagramMarginY,s=r+a;let o=0,l="#CCC",u="black",h=0;for(let d=0;d<e.length;d++){const f=e[d];if(i!==f.section){l=i_[o%i_.length],h=o%i_.length,u=HL[o%HL.length];const m={x:d*n.taskMargin+d*n.width+$s,y:50,text:f.section,fill:l,num:h,colour:u};yu.drawSection(t,m,n),i=f.section,o++}const p=f.people.reduce((m,_)=>(ba[_]&&(m[_]=ba[_]),m),{});f.x=d*n.taskMargin+d*n.width+$s,f.y=s,f.width=n.diagramMarginX,f.height=n.diagramMarginY,f.colour=u,f.fill=l,f.num=h,f.actors=p,yu.drawTask(t,f,n),jn.insert(f.x,f.y,f.x+f.width+n.taskMargin,300+5*30)}},GL={setConf:lst,draw:ust};let jL={};const a_={setConf:function(t){jL={...jL,...t}},draw:(t,e,r)=>{try{H.debug(`Renering svg for syntax error
`);const n=St("#"+e),i=n.append("g");i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),n.attr("height",100),n.attr("width",500),n.attr("viewBox","768 0 912 512")}catch(n){H.error("Error while rendering info diagram"),H.error(hX(n))}}};let $L=!1;const mu=()=>{$L||($L=!0,Lr("error",{db:{clear:()=>{}},styles:Aw,renderer:a_,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Lr("c4",{parser:qc,db:Xw,renderer:a9,styles:Dw,init:t=>{a9.setConf(t.c4)}},lK),Lr("class",{parser:_1,db:Jo,renderer:qtt,styles:Nc,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Jo.clear()}},ZK),Lr("classDiagram",{parser:_1,db:Jo,renderer:Oet,styles:Nc,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Jo.clear()}},QK),Lr("er",{parser:a4,db:zet,renderer:ert,styles:Sw},Fet),Lr("gantt",{parser:M4,db:P4,renderer:rit,styles:Mw},Snt),Lr("info",{parser:q4,db:nit,renderer:iit,styles:Lw},ait),Lr("pie",{parser:V4,db:oit,renderer:lit,styles:Rw},sit),Lr("requirement",{parser:Y4,db:uit,renderer:mit,styles:Iw},cit),Lr("sequence",{parser:H4,db:mL,renderer:AL,styles:Nw,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");mL.setWrap(t.wrap),AL.setConf(t.sequence)}},bit),Lr("state",{parser:p0,db:ma,renderer:zat,styles:s1,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ma.clear()}},fat),Lr("stateDiagram",{parser:p0,db:ma,renderer:Gat,styles:s1,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ma.clear()}},dat),Lr("journey",{parser:e_,db:VL,renderer:GL,styles:Bw,init:t=>{GL.setConf(t.journey),VL.clear()}},jat),Lr("flowchart",{parser:X1,db:fa,renderer:A4,styles:a1,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,S4.setConf(t.flowchart),fa.clear(),fa.setGen("gen-1")}},rrt),Lr("flowchart-v2",{parser:X1,db:fa,renderer:A4,styles:a1,init:t=>{t.flowchart|
`,this.parse(this.txt,r)}parse(e,r){if(this.detectTypeFailed)return!1;try{return e=e+`
`,this.db.clear(),this.parser.parse(e),!0}catch(n){this.handleError(n,r)}return!1}handleError(e,r){if(r)ng(e)?r(e.str,e.hash):r(e);else throw e}getParser(){return this.parser}getType(){return this.type}}const s_=(t,e)=>{const r=Xp(t,nt());try{return Pw(r),new bu(t,e)}catch(n){if(!(n instanceof qw))throw H.error(n),n;const i=wG(r);if(!i)throw new Error(`Loader for ${r} not found.`);return i().then(({diagram:a})=>(Lr(r,a,void 0),new bu(t,e)))}};function fst(t,e){return mu(),new bu(t,e).parse(t,e)}async function dst(t,e){return mu(),(await s_(t,e)).parse(t,e)}const XL=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},w0=function(t){let e=t;return e=e.replace(/fl°°/g,function(){return"&#"}),e=e.replace(/fl°/g,function(){return"&"}),e=e.replace(/¶ß/g,function(){return";"}),e},pst=function(t,e,r,n){var T;mu(),Ic(),e=e.replace(/\r\n?/g,`
`);const i=Se.detectInit(e);i&&(Vs(i),ug(i));const a=nt();H.debug(a),e.length>a.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s=St("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),a.securityLevel==="sandbox"){const C=St(n).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(C.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St(n);s.append("div").attr("id","d"+t).attr("style","font-family: "+a.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const C=document.getElementById(t);C&&C.remove();let M;if(a.securityLevel==="sandbox"?M=document.querySelector("#i"+t):M=document.querySelector("#d"+t),M&&M.remove(),a.securityLevel==="sandbox"){const S=St("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(S.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St("body");s.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=XL(e);let o,l;try{if(o=s_(e),"then"in o)throw new Error("Diagram is a promise")}catch(C){o=new bu("error"),l=C}const u=s.select("#d"+t).node(),h=o.type,d=u.firstChild,f=d.firstChild;let p="";if(a.themeCSS!==void 0&&(p+=`
${a.themeCSS}`),a.fontFamily!==void 0&&(p+=`
:root { --mermaid-font-family: ${a.fontFamily}}`),a.altFontFamily!==void 0&&(p+=`
:root { --mermaid-alt-font-family: ${a.altFontFamily}}`),h==="flowchart"||h==="flowchart-v2"||h==="graph"){const C=S4.getClasses(e,o),M=a.htmlLabels||((T=a.flowchart)==null?void 0:T.htmlLabels);for(const S in C)M?(p+=`
.${S} > * { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} span { ${C[S].styles.join(" !important; ")} !important; }`):(p+=`
.${S} path { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} rect { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} polygon { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} ellipse { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} circle { ${C[S].styles.join(" !important; ")} !important; }`,C[S].textStyles&&(p+=`
.${S} tspan { ${C[S].textStyles.join(" !important; ")} !important; }`))}const _=((C,M)=>e1(yw(`${C}{${M}}`),_w))(`#${t}`,Ow(h,p,a.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+_,d.insertBefore(y,f);try{o.renderer.draw(e,t,r1.version,o)}catch(C){throw a_.draw(e,t,r1.version),C}s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=s.select("#d"+t).node().innerHTML;if(H.debug("cnf.arrowMarkerAbsolute",a.arrowMarkerAbsolute),!Mr(a.arrowMarkerAbsolute)&&a.securityLevel!=="sandbox"&&(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),b=w0(b),b=b.replace(/<br>/g,"<br/>"),a.securityLevel==="sandbox"){const C=s.select("#d"+t+" svg").node(),M="100%";let S="100%";C&&(S=C.viewBox.baseVal.height+"px"),b=`<iframe style="width:${M};height:${S};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+b+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
The \u201Ciframe\u201D tag is not supported by your browser.
</iframe>`}else a.securityLevel!=="loose"&&(b=Ec.sanitize(b,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(h){case"flowchart":case"flowchart-v2":r(b,fa.bindFunctions);break;case"gantt":r(b,P4.bindFunctions);break;case"class":case"classDiagram":r(b,Jo.bindFunctions);break;default:r(b)}else H.debug("CB = undefined!");bL();const x=a.securityLevel==="sandbox"?"#i"+t:"#d"+t,k=St(x).node();if(k&&"remove"in k&&k.remove(),l)throw l;return b},gst=async function(t,e,r,n){var T;mu(),Ic(),e=e.replace(/\r\n?/g,`
`);const i=Se.detectInit(e);i&&(Vs(i),ug(i));const a=nt();H.debug(a),e.length>a.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s=St("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),a.securityLevel==="sandbox"){const C=St(n).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(C.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St(n);s.append("div").attr("id","d"+t).attr("style","font-family: "+a.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const C=document.getElementById(t);C&&C.remove();let M;if(a.securityLevel==="sandbox"?M=document.querySelector("#i"+t):M=document.querySelector("#d"+t),M&&M.remove(),a.securityLevel==="sandbox"){const S=St("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(S.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St("body");s.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=XL(e);let o,l;try{o=await s_(e)}catch(C){o=new bu("error"),l=C}const u=s.select("#d"+t).node(),h=o.type,d=u.firstChild,f=d.firstChild;let p="";if(a.themeCSS!==void 0&&(p+=`
${a.themeCSS}`),a.fontFamily!==void 0&&(p+=`
:root { --mermaid-font-family: ${a.fontFamily}}`),a.altFontFamily!==void 0&&(p+=`
:root { --mermaid-alt-font-family: ${a.altFontFamily}}`),h==="flowchart"||h==="flowchart-v2"||h==="graph"){const C=S4.getClasses(e,o),M=a.htmlLabels||((T=a.flowchart)==null?void 0:T.htmlLabels);for(const S in C)M?(p+=`
.${S} > * { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} span { ${C[S].styles.join(" !important; ")} !important; }`):(p+=`
.${S} path { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} rect { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} polygon { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} ellipse { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
.${S} circle { ${C[S].styles.join(" !important; ")} !important; }`,C[S].textStyles&&(p+=`
.${S} tspan { ${C[S].textStyles.join(" !important; ")} !important; }`))}const _=((C,M)=>e1(yw(`${C}{${M}}`),_w))(`#${t}`,Ow(h,p,a.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+_,d.insertBefore(y,f);try{await o.renderer.draw(e,t,r1.version,o)}catch(C){throw a_.draw(e,t,r1.version),C}s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=s.select("#d"+t).node().innerHTML;if(H.debug("cnf.arrowMarkerAbsolute",a.arrowMarkerAbsolute),!Mr(a.arrowMarkerAbsolute)&&a.securityLevel!=="sandbox"&&(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),b=w0(b),b=b.replace(/<br>/g,"<br/>"),a.securityLevel==="sandbox"){const C=s.select("#d"+t+" svg").node(),M="100%";let S="100%";C&&(S=C.viewBox.baseVal.height+"px"),b=`<iframe style="width:${M};height:${S};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+b+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
The \u201Ciframe\u201D tag is not supported by your browser.
</iframe>`}else a.securityLevel!=="loose"&&(b=Ec.sanitize(b,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(h){case"flowchart":case"flowchart-v2":r(b,fa.bindFunctions);break;case"gantt":r(b,P4.bindFunctions);break;case"class":case"classDiagram":r(b,Jo.bindFunctions);break;default:r(b)}else H.debug("CB = undefined!");bL();const x=a.securityLevel==="sandbox"?"#i"+t:"#d"+t,k=St(x).node();if(k&&"remove"in k&&k.remove(),l)throw l;return b};let Xs={};const yst=function(t,e,r,n){try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Xs={};break;case"type_directive":if(!Xs)throw new Error("currentDirective is undefined");Xs.type=e.toLowerCase();break;case"arg_directive":if(!Xs)throw new Error("currentDirective is undefined");Xs.args=JSON.parse(e);break;case"close_directive":mst(t,Xs,n),Xs=void 0;break}}catch(i){H.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),H.error(i.message)}},mst=function(t,e,r){switch(H.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(n=>{typeof e.args[n]<"u"&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[n],delete e.args[n])}),H.debug("sanitize in handleDirective",e.args),Vs(e.args),H.debug("sanitize in handleDirective (done)",e.args),ug(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":H.warn("themeCss encountered");break;default:H.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}};function bst(t={}){t.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),CX(t),(t==null?void 0:t.theme)&&t.theme in aa?t.themeVariables=aa[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=aa.default.getThemeVariables(t.themeVariables));const e=typeof t=="object"?EX(t):xw();D0(e.logLevel),mu()}const Xe=Object.freeze({render:pst,renderAsync:gst,parse:fst,parseAsync:dst,parseDirective:yst,initialize:bst,getConfig:nt,setConfig:kw,getSiteConfig:xw,updateSiteConfig:SX,reset:()=>{Ic()},globalReset:()=>{Ic(Xo)},defaultConfig:Xo});D0(nt().logLevel),Ic(nt());let KL=!1;const _st=async function(t,e,r){try{KL?await JL(t,e,r):QL(t,e,r)}catch(n){H.warn("Syntax Error rendering"),ng(n)&&H.warn(n.str),$n.parseError&&$n.parseError(n)}},ZL=(t,e,r)=>{H.warn(t),ng(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},QL=function(t,e,r){const n=Xe.getConfig();t&&($n.sequenceConfig=t),H.debug(`${r?"":"No "}Callback function found`);let i;if(typeof e>"u")i=document.querySelectorAll(".mermaid");else if(typeof e=="string")i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else if(e instanceof NodeList)i=e;else throw new Error("Invalid argument nodes for mermaid.init");H.debug(`Found ${i.length} diagrams`),typeof(t==null?void 0:t.startOnLoad)<"u"&&(H.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),Xe.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const a=new Se.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const l of Array.from(i)){H.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${a.next()}`;s=l.innerHTML,s=Se.entityDecode(s).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Se.detectInit(s);h&&H.debug("Detected early reinit: ",h);try{Xe.render(u,s,(d,f)=>{l.innerHTML=d,typeof r<"u"&&r(u),f&&f(l)},l)}catch(d){ZL(d,o,$n.parseError)}}if(o.length>0)throw o[0]},vst=t=>{for(const{id:e,detector:r,loader:n}of t)$k(e,r,n)},xst=async t=>{H.debug(`Loading ${t.length} external diagrams`);const r=(await Promise.allSettled(t.map(async({id:n,detector:i,loader:a})=>{const{diagram:s}=await a();Lr(n,s,i)}))).filter(n=>n.status==="rejected");if(r.length>0){H.error(`Failed to load ${r.length} external diagrams`);for(const n of r)H.error(n);throw new Error(`Failed to load ${r.length}
* Wait for document loaded before starting the execution
*/window.addEventListener("load",tR,!1)}const Tst=function(t){$n.parseError=t},Est=t=>Xe.parse(t,$n.parseError),T0=[];let o_=!1;const eR=async()=>{if(!o_){for(o_=!0;T0.length>0;){const t=T0.shift();if(t)try{await t()}catch(e){H.error("Error executing queue",e)}}o_=!1}},Cst=t=>new Promise((e,r)=>{const n=()=>new Promise((i,a)=>{Xe.parseAsync(t,$n.parseError).then(s=>{i(s),e(s)},s=>{H.error("Error parsing",s),a(s),r(s)})});T0.push(n),eR()}),Sst=(t,e,r,n)=>new Promise((i,a)=>{const s=()=>new Promise((o,l)=>{Xe.renderAsync(t,e,r,n).then(u=>{o(u),i(u)},u=>{H.error("Error parsing",u),l(u),a(u)})});T0.push(s),eR()}),$n={startOnLoad:!0,diagrams:{},mermaidAPI:Xe,parse:Est,parseAsync:Cst,render:Xe.render,renderAsync:Sst,init:_st,initThrowsErrors:QL,initThrowsErrorsAsync:JL,registerExternalDiagrams:wst,initialize:kst,parseError:void 0,contentLoaded:tR,setParseErrorHandler:Tst};return $n});
//# sourceMappingURL=mermaid.min.js.map