o;o++)r=" "+r;return r}function r(t,r){return e(r,3)+" "+t}function n(e,r){return e.split("").reduce(function(e,n,i){return i===r?e+t.applyTemplate(u,{"char":o(n)}):e+o(n)},"")}function o(t){return t.replace(/# ERROR on line {line}, column {col} - {message}
",a="# ERROR {message}
",c="{line}\n",u="{char}";return{formatNumber:e,deHTMLize:o,renderError:function(e,u,s){var l=u?t.applyTemplate(i,{message:s,line:u.start.line,col:u.start.column}):t.applyTemplate(a,{message:s});return e.split("\n").reduce(function(e,i,a){return u&&a===u.start.line-1?e+t.applyTemplate(c,{line:r(n(i,u.start.column-1),a+1)}):e+o(r(i,a+1))+"\n"},l)+"
"}}}),r("utl/domutl",[],function(){"use strict";return{ajax:function(t,e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(t){t.target.readyState===XMLHttpRequest.DONE&&(200===n.status?e(t):r(t))},n.open("GET",t),n.responseType="text";try{n.send()}catch(o){r(o)}}}}),e(["lib/mscgenjs-core/parse/xuparser","lib/mscgenjs-core/parse/msgennyparser","lib/mscgenjs-core/render/graphics/renderast","utl/exporter","embedding/config","embedding/error-rendering","utl/domutl","utl/tpl"],function(t,e,r,n,o,i,a,c){"use strict";function u(){s();var t=document.getElementsByClassName("mscgen_js");l(t,0),l(document.getElementsByTagName("mscgen"),t.length)}function s(){for(var t=document.scripts,e=0;e{string}",{string:e})}function d(t,e){b(t,e),t.setAttribute("data-renderedby","mscgen_js"),o.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?a.ajax(t.getAttribute("data-src"),function(e){h(t,e.target.response)},function(){f(t,c.applyTemplate(C,{url:t.getAttribute("data-src")}))}):!o.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?f(t,c.applyTemplate(k,{url:t.getAttribute("data-src")})):h(t,t.textContent)}function h(t,e){var r=m(t),n=v(e,r);n.entities?y(n,t.id,e,r):t.innerHTML=i.renderError(e,n.location,n.message)}function g(t,e,r){var i={pathname:"index.html"},a=document.createElement("a");return a.setAttribute("href",o.getConfig().clickURL+n.toLocationString(i,t,e)),a.setAttribute("id",r+"link"),a.setAttribute("style","text-decoration: none;"),a.setAttribute("title","click to edit in the mscgen_js interpreter"),a}function b(t,e){t.id||(t.id=o.getConfig().parentElementPrefix+e.toString())}function m(t){var e=t.getAttribute("data-language");return e||(e=o.getConfig().defaultLanguage),e}function v(r,n){var o={};try{o="msgenny"===n?e.parse(r):"json"===n?JSON.parse(r):t.parse(r)}catch(i){return i}return o}function y(t,e,n,i){var a=document.getElementById(e);a.innerHTML="",!0===o.getConfig().clickable&&(a.appendChild(g(n,i,e)),e+="link"),r.clean(e,window),r.renderAST(t,n,e,window)}var x="{msc}",w="data-src='{src}' ",C="ERROR: Could not find or open the URL '{url}' specified in the data-src
attribute.",k="ERROR: Won't load the chart specified in data-src='{url}'
, because loading from separate files is switched off in the mscgen_js configuration.
See Loading charts from separate files in the mscgen_js embedding guide how to enable it.",A={"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"};u()}),r("mscgen-inpage",function(){})}();
\ No newline at end of file
+!function(){var t,e,r;!function(n){function o(t,e){return x.call(t,e)}function i(t,e){var r,n,o,i,a,c,u,s,l,p,f,d,h=e&&e.split("/"),g=y.map,b=g&&g["*"]||{};if(t){for(t=t.split("/"),a=t.length-1,y.nodeIdCompat&&C.test(t[a])&&(t[a]=t[a].replace(C,"")),"."===t[0].charAt(0)&&h&&(d=h.slice(0,h.length-1),t=d.concat(t)),l=0;l0&&(t.splice(l-1,2),l-=2)}t=t.join("/")}if((h||b)&&g){for(r=t.split("/"),l=r.length;l>0;l-=1){if(n=r.slice(0,l).join("/"),h)for(p=h.length;p>0;p-=1)if(o=g[h.slice(0,p).join("/")],o&&(o=o[n])){i=o,c=l;break}if(i)break;!u&&b&&b[n]&&(u=b[n],s=l)}!i&&u&&(i=u,c=s),i&&(r.splice(0,c,i),t=r.join("/"))}return t}function a(t,e){return function(){var r=w.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),d.apply(n,r.concat([t,e]))}}function c(t){return function(e){return i(e,t)}}function u(t){return function(e){b[t]=e}}function s(t){if(o(m,t)){var e=m[t];delete m[t],v[t]=!0,f.apply(n,e)}if(!o(b,t)&&!o(v,t))throw new Error("No "+t);return b[t]}function l(t){var e,r=t?t.indexOf("!"):-1;return r>-1&&(e=t.substring(0,r),t=t.substring(r+1,t.length)),[e,t]}function p(t){return function(){return y&&y.config&&y.config[t]||{}}}var f,d,h,g,b={},m={},y={},v={},x=Object.prototype.hasOwnProperty,w=[].slice,C=/\.js$/;h=function(t,e){var r,n=l(t),o=n[0];return t=n[1],o&&(o=i(o,e),r=s(o)),o?t=r&&r.normalize?r.normalize(t,c(e)):i(t,e):(t=i(t,e),n=l(t),o=n[0],t=n[1],o&&(r=s(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:r}},g={require:function(t){return a(t)},exports:function(t){var e=b[t];return"undefined"!=typeof e?e:b[t]={}},module:function(t){return{id:t,uri:"",exports:b[t],config:p(t)}}},f=function(t,e,r,i){var c,l,p,f,d,y,x=[],w=typeof r;if(i=i||t,"undefined"===w||"function"===w){for(e=!e.length&&r.length?["require","exports","module"]:e,d=0;dr;)n=t.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return ai[e]=o,o}function i(t,e){var r=o(t),n=o(e);return{start:{offset:t,line:r.line,column:r.column},end:{offset:e,line:n.line,column:n.column}}}function a(t){ci>oi||(oi>ci&&(ci=oi,ui=[]),ui.push(t))}function c(t,r,n,o){function i(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?a.slice(0,-1).join(", ")+" or "+a[t.length-1]:a[0],o=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+o+" found."}return null!==r&&i(r),new e(null!==t?t:a(r,n),r,n,o)}function u(){var e,r,n,o,i,c,u,p,f,d;return e=oi,r=K(),r!==wt?(n=s(),n!==wt?(o=K(),o!==wt?(123===t.charCodeAt(oi)?(i=At,oi++):(i=wt,0===si&&a(_t)),i!==wt?(c=K(),c!==wt?(u=l(),u!==wt?(p=K(),p!==wt?(125===t.charCodeAt(oi)?(f=Et,oi++):(f=wt,0===si&&a(Lt)),f!==wt?(d=K(),d!==wt?(ii=e,r=St(r,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function s(){var e;return t.substr(oi,3).toLowerCase()===jt?(e=t.substr(oi,3),oi+=3):(e=wt,0===si&&a(It)),e===wt&&(t.substr(oi,2).toLowerCase()===Tt?(e=t.substr(oi,2),oi+=2):(e=wt,0===si&&a(Nt))),e}function l(){var t,e,r,n,o;return t=oi,e=oi,r=p(),r!==wt&&(ii=e,r=Dt(r)),e=r,e===wt&&(e=null),e!==wt?(r=oi,n=d(),n!==wt&&(ii=r,n=Rt(n)),r=n,r===wt&&(r=null),r!==wt?(n=oi,o=g(),o!==wt&&(ii=n,o=Ht(o)),n=o,n===wt&&(n=null),n!==wt?(e=[e,r,n],t=e):(oi=t,t=wt)):(oi=t,t=wt)):(oi=t,t=wt),t}function p(){var e,r,n,o,i,c;for(e=oi,r=oi,n=[],o=oi,i=f(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=Ft(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);o!==wt;)n.push(o),o=oi,i=f(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=Ft(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);return n!==wt?(o=oi,i=f(),i!==wt?(59===t.charCodeAt(oi)?(c=Bt,oi++):(c=wt,0===si&&a(Mt)),c!==wt?(ii=o,i=Ft(i),o=i):(oi=o,o=wt)):(oi=o,o=wt),o!==wt?(n=[n,o],r=n):(oi=r,r=wt)):(oi=r,r=wt),r!==wt&&(ii=e,r=Gt(r)),e=r}function f(){var e,r,n,o,i,c,u,s;return si++,e=oi,r=K(),r!==wt?(t.substr(oi,6).toLowerCase()===qt?(n=t.substr(oi,6),oi+=6):(n=wt,0===si&&a(zt)),n===wt&&(t.substr(oi,11).toLowerCase()===Ut?(n=t.substr(oi,11),oi+=11):(n=wt,0===si&&a(Pt))),n!==wt?(o=K(),o!==wt?(61===t.charCodeAt(oi)?(i=Vt,oi++):(i=wt,0===si&&a(Kt)),i!==wt?(c=K(),c!==wt?(u=$(),u!==wt?(s=K(),s!==wt?(ii=e,r=$t(n,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(t.substr(oi,5).toLowerCase()===Zt?(n=t.substr(oi,5),oi+=5):(n=wt,0===si&&a(Jt)),n!==wt?(o=K(),o!==wt?(61===t.charCodeAt(oi)?(i=Vt,oi++):(i=wt,0===si&&a(Kt)),i!==wt?(c=K(),c!==wt?(u=nt(),u!==wt?(s=K(),s!==wt?(ii=e,r=$t(n,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(t.substr(oi,12).toLowerCase()===Qt?(n=t.substr(oi,12),oi+=12):(n=wt,0===si&&a(Yt)),n!==wt?(o=K(),o!==wt?(61===t.charCodeAt(oi)?(i=Vt,oi++):(i=wt,0===si&&a(Kt)),i!==wt?(c=K(),c!==wt?(u=tt(),u!==wt?(s=K(),s!==wt?(ii=e,r=te(n,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(t.substr(oi,9).toLowerCase()===ee?(n=t.substr(oi,9),oi+=9):(n=wt,0===si&&a(re)),n!==wt?(o=K(),o!==wt?(61===t.charCodeAt(oi)?(i=Vt,oi++):(i=wt,0===si&&a(Kt)),i!==wt?(c=K(),c!==wt?(u=R(),u!==wt?(s=K(),s!==wt?(ii=e,r=$t(n,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)))),si--,e===wt&&(r=wt,0===si&&a(Xt)),e}function d(){var e,r,n,o,i,c;for(e=oi,r=oi,n=[],o=oi,i=h(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=ne(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);o!==wt;)n.push(o),o=oi,i=h(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=ne(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);return n!==wt?(o=oi,i=h(),i!==wt?(59===t.charCodeAt(oi)?(c=Bt,oi++):(c=wt,0===si&&a(Mt)),c!==wt?(ii=o,i=ne(i),o=i):(oi=o,o=wt)):(oi=o,o=wt),o!==wt?(n=[n,o],r=n):(oi=r,r=wt)):(oi=r,r=wt),r!==wt&&(ii=e,r=oe(r)),e=r}function h(){var e,r,n,o,i,c,u,s;return si++,e=oi,r=K(),r!==wt?(n=R(),n!==wt?(o=K(),o!==wt?(i=oi,91===t.charCodeAt(oi)?(c=ae,oi++):(c=wt,0===si&&a(ce)),c!==wt?(u=T(),u!==wt?(93===t.charCodeAt(oi)?(s=ue,oi++):(s=wt,0===si&&a(se)),s!==wt?(ii=i,c=le(n,u),i=c):(oi=i,i=wt)):(oi=i,i=wt)):(oi=i,i=wt),i===wt&&(i=null),i!==wt?(c=K(),c!==wt?(ii=e,r=pe(n,i),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(n=O(),n!==wt?(o=K(),o!==wt?(i=oi,91===t.charCodeAt(oi)?(c=ae,oi++):(c=wt,0===si&&a(ce)),c!==wt?(u=T(),u!==wt?(93===t.charCodeAt(oi)?(s=ue,oi++):(s=wt,0===si&&a(se)),s!==wt?(ii=i,c=le(n,u),i=c):(oi=i,i=wt)):(oi=i,i=wt)):(oi=i,i=wt),i===wt&&(i=null),i!==wt?(c=K(),c!==wt?(ii=e,r=fe(n,i),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)),si--,e===wt&&(r=wt,0===si&&a(ie)),e}function g(){var e,r,n,o,i;if(e=[],r=oi,n=b(),n!==wt?(o=K(),o!==wt?(59===t.charCodeAt(oi)?(i=Bt,oi++):(i=wt,0===si&&a(Mt)),i!==wt?(ii=r,n=de(n),r=n):(oi=r,r=wt)):(oi=r,r=wt)):(oi=r,r=wt),r!==wt)for(;r!==wt;)e.push(r),r=oi,n=b(),n!==wt?(o=K(),o!==wt?(59===t.charCodeAt(oi)?(i=Bt,oi++):(i=wt,0===si&&a(Mt)),i!==wt?(ii=r,n=de(n),r=n):(oi=r,r=wt)):(oi=r,r=wt)):(oi=r,r=wt);else e=wt;return e}function b(){var e,r,n,o,i,c,u;for(e=oi,r=oi,n=[],o=oi,i=m(),i!==wt?(c=K(),c!==wt?(44===t.charCodeAt(oi)?(u=Wt,oi++):(u=wt,0===si&&a(Ot)),u!==wt?(ii=o,i=de(i),o=i):(oi=o,o=wt)):(oi=o,o=wt)):(oi=o,o=wt);o!==wt;)n.push(o),o=oi,i=m(),i!==wt?(c=K(),c!==wt?(44===t.charCodeAt(oi)?(u=Wt,oi++):(u=wt,0===si&&a(Ot)),u!==wt?(ii=o,i=de(i),o=i):(oi=o,o=wt)):(oi=o,o=wt)):(oi=o,o=wt);return n!==wt?(o=oi,i=m(),i!==wt&&(ii=o,i=he(i)),o=i,o!==wt?(n=[n,o],r=n):(oi=r,r=wt)):(oi=r,r=wt),r!==wt&&(ii=e,r=ge(r)),e=r}function m(){var t;return t=y(),t===wt&&(t=C()),t}function y(){var e,r,n,o,i,c;return e=oi,r=oi,n=v(),n!==wt&&(ii=r,n=de(n)),r=n,r===wt&&(r=oi,n=w(),n!==wt&&(ii=r,n=de(n)),r=n,r===wt&&(r=oi,n=x(),n!==wt&&(ii=r,n=de(n)),r=n)),r!==wt?(n=oi,91===t.charCodeAt(oi)?(o=ae,oi++):(o=wt,0===si&&a(ce)),o!==wt?(i=T(),i!==wt?(93===t.charCodeAt(oi)?(c=ue,oi++):(c=wt,0===si&&a(se)),c!==wt?(ii=n,o=be(r,i),n=o):(oi=n,n=wt)):(oi=n,n=wt)):(oi=n,n=wt),n===wt&&(n=null),n!==wt?(ii=e,r=me(r,n),e=r):(oi=e,e=wt)):(oi=e,e=wt),e}function v(){var t,e,r,n;return t=oi,e=K(),e!==wt?(r=k(),r!==wt?(n=K(),n!==wt?(ii=t,e=ye(r),t=e):(oi=t,t=wt)):(oi=t,t=wt)):(oi=t,t=wt),t}function x(){var t,e,r,n;return t=oi,e=K(),e!==wt?(r=A(),r!==wt?(n=K(),n!==wt?(ii=t,e=ye(r),t=e):(oi=t,t=wt)):(oi=t,t=wt)):(oi=t,t=wt),t}function w(){var e,r,n,o,i,c,u,s;return e=oi,r=K(),r!==wt?(n=W(),n!==wt?(o=K(),o!==wt?(i=_(),i!==wt?(c=K(),c!==wt?(u=W(),u!==wt?(s=K(),s!==wt?(ii=e,r=ve(n,i,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(42===t.charCodeAt(oi)?(n=xe,oi++):(n=wt,0===si&&a(we)),n!==wt?(o=K(),o!==wt?(i=S(),i!==wt?(c=K(),c!==wt?(u=W(),u!==wt?(s=K(),s!==wt?(ii=e,r=Ce(i,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(n=W(),n!==wt?(o=K(),o!==wt?(i=L(),i!==wt?(c=K(),c!==wt?(42===t.charCodeAt(oi)?(u=xe,oi++):(u=wt,0===si&&a(we)),u!==wt?(s=K(),s!==wt?(ii=e,r=ke(n,i),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e===wt&&(e=oi,r=K(),r!==wt?(n=W(),n!==wt?(o=K(),o!==wt?(i=E(),i!==wt?(c=K(),c!==wt?(42===t.charCodeAt(oi)?(u=xe,oi++):(u=wt,0===si&&a(we)),u!==wt?(s=K(),s!==wt?(ii=e,r=ke(n,i),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)))),e}function C(){var e,r,n,o,i,c,u,s,l,p,f,d,h,b,m,y;return e=oi,r=K(),r!==wt?(n=W(),n!==wt?(o=K(),o!==wt?(i=I(),i!==wt?(c=K(),c!==wt?(u=W(),u!==wt?(s=K(),s!==wt?(l=oi,91===t.charCodeAt(oi)?(p=ae,oi++):(p=wt,0===si&&a(ce)),p!==wt?(f=T(),f!==wt?(93===t.charCodeAt(oi)?(d=ue,oi++):(d=wt,0===si&&a(se)),d!==wt?(ii=l,p=Ae(n,i,u,f),l=p):(oi=l,l=wt)):(oi=l,l=wt)):(oi=l,l=wt),l===wt&&(l=null),l!==wt?(p=K(),p!==wt?(123===t.charCodeAt(oi)?(f=At,oi++):(f=wt,0===si&&a(_t)),f!==wt?(d=K(),d!==wt?(h=g(),h===wt&&(h=null),h!==wt?(b=K(),b!==wt?(125===t.charCodeAt(oi)?(m=Et,oi++):(m=wt,0===si&&a(Lt)),m!==wt?(y=K(),y!==wt?(ii=e,r=_e(n,i,u,l,h),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function k(){var e,r;return si++,t.substr(oi,3)===Le?(e=Le,oi+=3):(e=wt,0===si&&a(Se)),e===wt&&(t.substr(oi,3)===je?(e=je,oi+=3):(e=wt,0===si&&a(Ie))),si--,e===wt&&(r=wt,0===si&&a(Ee)),e}function A(){var e,r;return si++,t.substr(oi,3)===Ne?(e=Ne,oi+=3):(e=wt,0===si&&a(De)),si--,e===wt&&(r=wt,0===si&&a(Te)),e}function _(){var t,e;return t=oi,e=E(),e===wt&&(e=L(),e===wt&&(e=S(),e===wt&&(e=j()))),e!==wt&&(ii=t,e=Re(e)),t=e}function E(){var e,r;return si++,t.substr(oi,2)===We?(e=We,oi+=2):(e=wt,0===si&&a(Oe)),e===wt&&(t.substr(oi,3)===Fe?(e=Fe,oi+=3):(e=wt,0===si&&a(Be)),e===wt&&(t.substr(oi,2)===Me?(e=Me,oi+=2):(e=wt,0===si&&a(Ge)),e===wt&&(t.substr(oi,5)===Xe?(e=Xe,oi+=5):(e=wt,0===si&&a(qe)),e===wt&&(t.substr(oi,3)===ze?(e=ze,oi+=3):(e=wt,0===si&&a(Ue)),e===wt&&(t.substr(oi,2)===Pe?(e=Pe,oi+=2):(e=wt,0===si&&a(Ve)),e===wt&&(t.substr(oi,4)===Ke?(e=Ke,oi+=4):(e=wt,0===si&&a($e)),e===wt&&(t.substr(oi,2)===Ze?(e=Ze,oi+=2):(e=wt,0===si&&a(Je)),e===wt&&(t.substr(oi,3)===Qe?(e=Qe,oi+=3):(e=wt,0===si&&a(Ye)))))))))),si--,e===wt&&(r=wt,0===si&&a(He)),e}function L(){var e,r;return si++,t.substr(oi,2)===er?(e=er,oi+=2):(e=wt,0===si&&a(rr)),e===wt&&(t.substr(oi,3)===nr?(e=nr,oi+=3):(e=wt,0===si&&a(or)),e===wt&&(t.substr(oi,2)===ir?(e=ir,oi+=2):(e=wt,0===si&&a(ar)),e===wt&&(t.substr(oi,2)===cr?(e=cr,oi+=2):(e=wt,0===si&&a(ur)),e===wt&&(t.substr(oi,2)===sr?(e=sr,oi+=2):(e=wt,0===si&&a(lr)),e===wt&&(t.substr(oi,2).toLowerCase()===pr?(e=t.substr(oi,2),oi+=2):(e=wt,0===si&&a(fr))))))),si--,e===wt&&(r=wt,0===si&&a(tr)),e}function S(){var e,r;return si++,t.substr(oi,2)===hr?(e=hr,oi+=2):(e=wt,0===si&&a(gr)),e===wt&&(t.substr(oi,3)===br?(e=br,oi+=3):(e=wt,0===si&&a(mr)),e===wt&&(t.substr(oi,2)===yr?(e=yr,oi+=2):(e=wt,0===si&&a(vr)),e===wt&&(t.substr(oi,2)===xr?(e=xr,oi+=2):(e=wt,0===si&&a(wr)),e===wt&&(t.substr(oi,2)===Cr?(e=Cr,oi+=2):(e=wt,0===si&&a(kr)),e===wt&&(t.substr(oi,2).toLowerCase()===Ar?(e=t.substr(oi,2),oi+=2):(e=wt,0===si&&a(_r))))))),si--,e===wt&&(r=wt,0===si&&a(dr)),e}function j(){var e,r;return si++,t.substr(oi,4).toLowerCase()===Lr?(e=t.substr(oi,4),oi+=4):(e=wt,0===si&&a(Sr)),e===wt&&(t.substr(oi,4).toLowerCase()===jr?(e=t.substr(oi,4),oi+=4):(e=wt,0===si&&a(Ir)),e===wt&&(t.substr(oi,4).toLowerCase()===Tr?(e=t.substr(oi,4),oi+=4):(e=wt,0===si&&a(Nr)),e===wt&&(t.substr(oi,3).toLowerCase()===Dr?(e=t.substr(oi,3),oi+=3):(e=wt,0===si&&a(Rr))))),si--,e===wt&&(r=wt,0===si&&a(Er)),e}function I(){var e,r;return si++,e=oi,t.substr(oi,3).toLowerCase()===Wr?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(Or)),r===wt&&(t.substr(oi,4).toLowerCase()===Fr?(r=t.substr(oi,4),oi+=4):(r=wt,0===si&&a(Br)),r===wt&&(t.substr(oi,3).toLowerCase()===Mr?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(Gr)),r===wt&&(t.substr(oi,5).toLowerCase()===Xr?(r=t.substr(oi,5),oi+=5):(r=wt,0===si&&a(qr)),r===wt&&(t.substr(oi,3).toLowerCase()===zr?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(Ur)),r===wt&&(t.substr(oi,3).toLowerCase()===Pr?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(Vr)),r===wt&&(t.substr(oi,6).toLowerCase()===Kr?(r=t.substr(oi,6),oi+=6):(r=wt,0===si&&a($r)),r===wt&&(t.substr(oi,3).toLowerCase()===Zr?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(Jr)),r===wt&&(t.substr(oi,8).toLowerCase()===Qr?(r=t.substr(oi,8),oi+=8):(r=wt,0===si&&a(Yr)),r===wt&&(t.substr(oi,6).toLowerCase()===tn?(r=t.substr(oi,6),oi+=6):(r=wt,0===si&&a(en)),r===wt&&(t.substr(oi,8).toLowerCase()===rn?(r=t.substr(oi,8),oi+=8):(r=wt,0===si&&a(nn)),r===wt&&(t.substr(oi,6).toLowerCase()===on?(r=t.substr(oi,6),oi+=6):(r=wt,0===si&&a(an)),r===wt&&(t.substr(oi,4).toLowerCase()===cn?(r=t.substr(oi,4),oi+=4):(r=wt,0===si&&a(un)),r===wt&&(t.substr(oi,3).toLowerCase()===sn?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(ln)),r===wt&&(t.substr(oi,3).toLowerCase()===pn?(r=t.substr(oi,3),oi+=3):(r=wt,0===si&&a(fn)))))))))))))))),r!==wt&&(ii=e,r=dn(r)),e=r,si--,e===wt&&(r=wt,0===si&&a(Hr)),e}function T(){var e,r,n,o,i,c;for(e=oi,r=oi,n=[],o=oi,i=N(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=de(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);o!==wt;)n.push(o),o=oi,i=N(),i!==wt?(44===t.charCodeAt(oi)?(c=Wt,oi++):(c=wt,0===si&&a(Ot)),c!==wt?(ii=o,i=de(i),o=i):(oi=o,o=wt)):(oi=o,o=wt);return n!==wt?(o=oi,i=N(),i!==wt&&(ii=o,i=de(i)),o=i,o!==wt?(n=[n,o],r=n):(oi=r,r=wt)):(oi=r,r=wt),r!==wt&&(ii=e,r=Gt(r)),e=r}function N(){var e,r,n,o,i,c,u,s;return e=oi,r=K(),r!==wt?(n=D(),n!==wt?(o=K(),o!==wt?(61===t.charCodeAt(oi)?(i=Vt,oi++):(i=wt,0===si&&a(Kt)),i!==wt?(c=K(),c!==wt?(u=W(),u!==wt?(s=K(),s!==wt?(ii=e,r=hn(n,u),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function D(){var e,r;return si++,t.substr(oi,5).toLowerCase()===bn?(e=t.substr(oi,5),oi+=5):(e=wt,0===si&&a(mn)),e===wt&&(t.substr(oi,5).toLowerCase()===yn?(e=t.substr(oi,5),oi+=5):(e=wt,0===si&&a(vn)),e===wt&&(t.substr(oi,2).toLowerCase()===xn?(e=t.substr(oi,2),oi+=2):(e=wt,0===si&&a(wn)),e===wt&&(t.substr(oi,3).toLowerCase()===Cn?(e=t.substr(oi,3),oi+=3):(e=wt,0===si&&a(kn)),e===wt&&(t.substr(oi,9).toLowerCase()===An?(e=t.substr(oi,9),oi+=9):(e=wt,0===si&&a(_n)),e===wt&&(t.substr(oi,10).toLowerCase()===En?(e=t.substr(oi,10),oi+=10):(e=wt,0===si&&a(Ln)),e===wt&&(t.substr(oi,9).toLowerCase()===Sn?(e=t.substr(oi,9),oi+=9):(e=wt,0===si&&a(jn)),e===wt&&(t.substr(oi,10).toLowerCase()===In?(e=t.substr(oi,10),oi+=10):(e=wt,0===si&&a(Tn)),e===wt&&(t.substr(oi,11).toLowerCase()===Nn?(e=t.substr(oi,11),oi+=11):(e=wt,0===si&&a(Dn)),e===wt&&(t.substr(oi,12).toLowerCase()===Rn?(e=t.substr(oi,12),oi+=12):(e=wt,0===si&&a(Hn)),e===wt&&(t.substr(oi,12).toLowerCase()===Wn?(e=t.substr(oi,12),oi+=12):(e=wt,0===si&&a(On)),e===wt&&(t.substr(oi,13).toLowerCase()===Fn?(e=t.substr(oi,13),oi+=13):(e=wt,0===si&&a(Bn)),e===wt&&(t.substr(oi,12).toLowerCase()===Mn?(e=t.substr(oi,12),oi+=12):(e=wt,0===si&&a(Gn)),e===wt&&(t.substr(oi,13).toLowerCase()===Xn?(e=t.substr(oi,13),oi+=13):(e=wt,0===si&&a(qn)),e===wt&&(t.substr(oi,14).toLowerCase()===zn?(e=t.substr(oi,14),oi+=14):(e=wt,0===si&&a(Un)),e===wt&&(t.substr(oi,15).toLowerCase()===Pn?(e=t.substr(oi,15),oi+=15):(e=wt,0===si&&a(Vn)),e===wt&&(t.substr(oi,7).toLowerCase()===Kn?(e=t.substr(oi,7),oi+=7):(e=wt,0===si&&a($n)))))))))))))))))),si--,e===wt&&(r=wt,0===si&&a(gn)),e}function R(){var e,r,n,o;return si++,e=oi,34===t.charCodeAt(oi)?(r=Jn,oi++):(r=wt,0===si&&a(Qn)),r!==wt?(n=H(),n!==wt?(34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),o!==wt?(ii=e,r=Yn(n),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),si--,e===wt&&(r=wt,0===si&&a(Zn)),e}function H(){var e,r,n,o;for(e=[],r=oi,n=oi,si++,34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),si--,o===wt?n=void 0:(oi=n,n=wt),n!==wt?(t.substr(oi,2)===to?(o=to,oi+=2):(o=wt,0===si&&a(eo)),o===wt&&(t.length>oi?(o=t.charAt(oi),oi++):(o=wt,0===si&&a(ro))),o!==wt?(ii=r,n=no(o),r=n):(oi=r,r=wt)):(oi=r,r=wt);r!==wt;)e.push(r),r=oi,n=oi,si++,34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),si--,o===wt?n=void 0:(oi=n,n=wt),n!==wt?(t.substr(oi,2)===to?(o=to,oi+=2):(o=wt,0===si&&a(eo)),o===wt&&(t.length>oi?(o=t.charAt(oi),oi++):(o=wt,0===si&&a(ro))),o!==wt?(ii=r,n=no(o),r=n):(oi=r,r=wt)):(oi=r,r=wt);return e}function W(){var t,e;return si++,t=O(),t===wt&&(t=R()),si--,t===wt&&(e=wt,0===si&&a(oo)),t}function O(){var e,r,n;if(e=oi,r=[],io.test(t.charAt(oi))?(n=t.charAt(oi),oi++):(n=wt,0===si&&a(ao)),n!==wt)for(;n!==wt;)r.push(n),io.test(t.charAt(oi))?(n=t.charAt(oi),oi++):(n=wt,0===si&&a(ao));else r=wt;return r!==wt&&(ii=e,r=co(r)),e=r}function F(){var e,r;return si++,e=oi,so.test(t.charAt(oi))?(r=t.charAt(oi),oi++):(r=wt,0===si&&a(lo)),r!==wt&&(ii=e,r=no(r)),e=r,si--,e===wt&&(r=wt,0===si&&a(uo)),e}function B(){var e,r;return si++,e=oi,fo.test(t.charAt(oi))?(r=t.charAt(oi),oi++):(r=wt,0===si&&a(ho)),r!==wt&&(ii=e,r=no(r)),e=r,si--,e===wt&&(r=wt,0===si&&a(po)),e}function M(){var e;return t.substr(oi,2)===go?(e=go,oi+=2):(e=wt,0===si&&a(bo)),e}function G(){var e;return t.substr(oi,2)===mo?(e=mo,oi+=2):(e=wt,0===si&&a(yo)),e}function X(){var e,r,n;return e=oi,r=oi,si++,t.substr(oi,2)===mo?(n=mo,oi+=2):(n=wt,0===si&&a(yo)),si--,n===wt?r=void 0:(oi=r,r=wt),r!==wt?(t.length>oi?(n=t.charAt(oi),oi++):(n=wt,0===si&&a(ro)),n!==wt?(ii=e,r=no(n),e=r):(oi=e,e=wt)):(oi=e,e=wt),e}function q(){var t,e,r,n;if(t=oi,e=M(),e!==wt){for(r=[],n=X();n!==wt;)r.push(n),n=X();r!==wt?(n=G(),n!==wt?(ii=t,e=vo(e,r,n),t=e):(oi=t,t=wt)):(oi=t,t=wt)}else oi=t,t=wt;return t}function z(){var e;return t.substr(oi,2)===xo?(e=xo,oi+=2):(e=wt,0===si&&a(wo)),e===wt&&(35===t.charCodeAt(oi)?(e=Co,oi++):(e=wt,0===si&&a(ko))),e}function U(){var e;return Ao.test(t.charAt(oi))?(e=t.charAt(oi),oi++):(e=wt,0===si&&a(_o)),e}function P(){var t,e,r,n;if(t=oi,e=z(),e!==wt){for(r=[],n=U();n!==wt;)r.push(n),n=U();r!==wt?(ii=t,e=Eo(e,r),t=e):(oi=t,t=wt)}else oi=t,t=wt;return t}function V(){var t,e;return si++,t=P(),t===wt&&(t=q()),si--,t===wt&&(e=wt,0===si&&a(Lo)),t}function K(){var t,e;for(t=[],e=F(),e===wt&&(e=B(),e===wt&&(e=V()));e!==wt;)t.push(e),e=F(),e===wt&&(e=B(),e===wt&&(e=V()));return t}function $(){var t,e;return si++,t=oi,e=Z(),e!==wt&&(ii=t,e=jo(e)),t=e,t===wt&&(t=oi,e=J(),e!==wt&&(ii=t,e=Io(e)),t=e),si--,t===wt&&(e=wt,0===si&&a(So)),t}function Z(){var e,r,n,o;return e=oi,34===t.charCodeAt(oi)?(r=Jn,oi++):(r=wt,0===si&&a(Qn)),r!==wt?(n=J(),n!==wt?(34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),o!==wt?(ii=e,r=To(n),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function J(){var t;return t=Y(),t===wt&&(t=Q()),t}function Q(){var e,r,n;if(e=oi,r=[],No.test(t.charAt(oi))?(n=t.charAt(oi),oi++):(n=wt,0===si&&a(Do)),n!==wt)for(;n!==wt;)r.push(n),No.test(t.charAt(oi))?(n=t.charAt(oi),oi++):(n=wt,0===si&&a(Do));else r=wt;return r!==wt&&(ii=e,r=Ro(r)),e=r}function Y(){var e,r,n,o,i;return e=oi,r=oi,n=Q(),n!==wt?(46===t.charCodeAt(oi)?(o=Ho,oi++):(o=wt,0===si&&a(Wo)),o!==wt?(i=Q(),i!==wt?(n=[n,o,i],r=n):(oi=r,r=wt)):(oi=r,r=wt)):(oi=r,r=wt),r!==wt&&(ii=e,r=Oo(r)),e=r}function tt(){var t,e;return si++,t=oi,e=et(),e!==wt&&(ii=t,e=Bo(e)),t=e,t===wt&&(t=oi,e=rt(),e!==wt&&(ii=t,e=Mo(e)),t=e),si--,t===wt&&(e=wt,0===si&&a(Fo)),t}function et(){var e,r,n,o;return e=oi,34===t.charCodeAt(oi)?(r=Jn,oi++):(r=wt,0===si&&a(Qn)),r!==wt?(n=rt(),n!==wt?(34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),o!==wt?(ii=e,r=jo(n),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function rt(){var e;return t.substr(oi,4).toLowerCase()===Go?(e=t.substr(oi,4),oi+=4):(e=wt,0===si&&a(Xo)),e===wt&&(t.substr(oi,5).toLowerCase()===qo?(e=t.substr(oi,5),oi+=5):(e=wt,0===si&&a(zo)),e===wt&&(t.substr(oi,2).toLowerCase()===Uo?(e=t.substr(oi,2),oi+=2):(e=wt,0===si&&a(Po)),e===wt&&(t.substr(oi,3).toLowerCase()===Vo?(e=t.substr(oi,3),oi+=3):(e=wt,0===si&&a(Ko)),e===wt&&(48===t.charCodeAt(oi)?(e=$o,oi++):(e=wt,0===si&&a(Zo)),e===wt&&(49===t.charCodeAt(oi)?(e=Jo,oi++):(e=wt,0===si&&a(Qo))))))),e}function nt(){var t,e;return si++,t=ot(),t===wt&&(t=it()),si--,t===wt&&(e=wt,0===si&&a(Yo)),t}function ot(){var e,r,n,o;return e=oi,34===t.charCodeAt(oi)?(r=Jn,oi++):(r=wt,0===si&&a(Qn)),r!==wt?(n=it(),n!==wt?(34===t.charCodeAt(oi)?(o=Jn,oi++):(o=wt,0===si&&a(Qn)),o!==wt?(ii=e,r=jo(n),e=r):(oi=e,e=wt)):(oi=e,e=wt)):(oi=e,e=wt),e}function it(){var e,r;return e=oi,r=J(),r!==wt&&(ii=e,r=ti(r)),e=r,e===wt&&(e=oi,t.substr(oi,4).toLowerCase()===ei?(r=t.substr(oi,4),oi+=4):(r=wt,0===si&&a(ri)),r!==wt&&(ii=e,r=ni(r)),e=r),e}function at(t,e){e&&Object.getOwnPropertyNames(e).forEach(function(r){t[r]=e[r]})}function ct(t,e){return t=t?t:{},at(t,e),t}function ut(t){var e={};return t[0].forEach(function(t){e=ct(e,t)}),ct(e,t[1])}function st(t){return["true","on","1"].indexOf(t.toLowerCase())>-1}function lt(t,e){var r={};return r[t.toLowerCase()]=e,r}function pt(t,e){return void 0===e||"*"===e||t.entities.some(function(t){return t.name===e})}function ft(t){return["box","abox","rbox","note","msc","hscale","width","arcgradient","wordwraparcs","label","color","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip"].indexOf(t)>-1}function dt(t,e){return"Entity '"+t+"' in arc '"+e.from+" "+e.kind+" "+e.to+"' is not defined."}function ht(t,e){this.name="EntityNotDefinedError",this.message=dt(t,e),e.location&&(this.location=e.location,this.location.start.line++,this.location.end.line++)}function gt(t,e){return t||(t={},t.entities=[]),e&&e.arcs&&e.arcs.forEach(function(e){e.forEach(function(e){if(e.from&&!pt(t,e.from))throw new ht(e.from,e);if(e.to&&!pt(t,e.to))throw new ht(e.to,e);e.location&&delete e.location,e.arcs&>(t,e)})}),t}function bt(t){return t&&t.options?!!t.options.watermark||!!t.options.width&&"auto"===t.options.width:!1}function mt(t){return t&&t.arcs?t.arcs.some(function(t){return t.some(function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(t.kind)>-1})}):!1}function yt(t,e){var r=bt(t),n=mt(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var vt,xt=arguments.length>1?arguments[1]:{},wt={},Ct={program:u},kt=u,At="{",_t={type:"literal",value:"{",description:'"{"'},Et="}",Lt={type:"literal",value:"}",description:'"}"'},St=function(t,e){e[1]=gt(e[1],e[2]);var r=ct(e[0],ct(e[1],e[2]));return r=ct({meta:yt(e[0],e[2])},r),t.length>0&&(r=ct({precomment:t},r)),r},jt="msc",It={type:"literal",value:"msc",description:'"msc"'},Tt="xu",Nt={type:"literal",value:"xu",description:'"xu"'},Dt=function(t){return{options:t}},Rt=function(t){return{entities:t}},Ht=function(t){return{arcs:t}},Wt=",",Ot={type:"literal",value:",",description:'","'},Ft=function(t){return t},Bt=";",Mt={type:"literal",value:";",description:'";"'},Gt=function(t){return ut(t)},Xt={type:"other",description:"option"},qt="hscale",zt={type:"literal",value:"hscale",description:'"hscale"'},Ut="arcgradient",Pt={type:"literal",value:"arcgradient",description:'"arcgradient"'},Vt="=",Kt={type:"literal",value:"=",description:'"="'},$t=function(t,e){return lt(t,e)},Zt="width",Jt={type:"literal",value:"width",description:'"width"'},Qt="wordwraparcs",Yt={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},te=function(t,e){var r={};return r[t.toLowerCase()]=st(e),r},ee="watermark",re={type:"literal",value:"watermark",description:'"watermark"'},ne=function(t){return t},oe=function(t){return t[0].push(t[1]),t[0]},ie={type:"other",description:"entity"},ae="[",ce={type:"literal",value:"[",description:'"["'},ue="]",se={type:"literal",value:"]",description:'"]"'},le=function(t,e){return e},pe=function(t,e){return ct({name:t},e)},fe=function(t,e){return ft(t)&&n("MscGen keywords aren't allowed as entity names (embed them in quotes if you need them)"),ct({name:t},e)},de=function(t){return t},he=function(t){return[t]},ge=function(t){return t[0].push(t[1][0]),t[0]},be=function(t,e){return e},me=function(t,e){return ct(t,e)},ye=function(t){return{kind:t}},ve=function(t,e,n){return{kind:e,from:t,to:n,location:r()}},xe="*",we={type:"literal",value:"*",description:'"*"'},Ce=function(t,e){return{kind:t,from:"*",to:e,location:r()}},ke=function(t,e){return{kind:e,from:t,to:"*",location:r()}},Ae=function(t,e,r,n){return n},_e=function(t,e,n,o,i){var a={kind:e,from:t,to:n,location:r(),arcs:i};return ct(a,o)},Ee={type:"other",description:"empty row"},Le="|||",Se={type:"literal",value:"|||",description:'"|||"'},je="...",Ie={type:"literal",value:"...",description:'"..."'},Te={type:"other",description:"---"},Ne="---",De={type:"literal",value:"---",description:'"---"'},Re=function(t){return t.toLowerCase()},He={type:"other",description:"bi-directional arrow"},We="--",Oe={type:"literal",value:"--",description:'"--"'},Fe="<->",Be={type:"literal",value:"<->",description:'"<->"'},Me="==",Ge={type:"literal",value:"==",description:'"=="'},Xe="<<=>>",qe={type:"literal",value:"<<=>>",description:'"<<=>>"'},ze="<=>",Ue={type:"literal",value:"<=>",description:'"<=>"'},Pe="..",Ve={type:"literal",value:"..",description:'".."'},Ke="<<>>",$e={type:"literal",value:"<<>>",description:'"<<>>"'},Ze="::",Je={type:"literal",value:"::",description:'"::"'},Qe="<:>",Ye={type:"literal",value:"<:>",description:'"<:>"'},tr={type:"other",description:"left to right arrow"},er="->",rr={type:"literal",value:"->",description:'"->"'},nr="=>>",or={type:"literal",value:"=>>",description:'"=>>"'},ir="=>",ar={type:"literal",value:"=>",description:'"=>"'},cr=">>",ur={type:"literal",value:">>",description:'">>"'},sr=":>",lr={type:"literal",value:":>",description:'":>"'},pr="-x",fr={type:"literal",value:"-x",description:'"-x"'},dr={type:"other",description:"right to left arrow"},hr="<-",gr={type:"literal",value:"<-",description:'"<-"'},br="<<=",mr={type:"literal",value:"<<=",description:'"<<="'},yr="<=",vr={type:"literal",value:"<=",description:'"<="'},xr="<<",wr={type:"literal",value:"<<",description:'"<<"'},Cr="<:",kr={type:"literal",value:"<:",description:'"<:"'},Ar="x-",_r={type:"literal",value:"x-",description:'"x-"'},Er={type:"other",description:"box"},Lr="note",Sr={type:"literal",value:"note",description:'"note"'},jr="abox",Ir={type:"literal",value:"abox",description:'"abox"'},Tr="rbox",Nr={type:"literal",value:"rbox",description:'"rbox"'},Dr="box",Rr={type:"literal",value:"box",description:'"box"'},Hr={type:"other",description:"inline expression"},Wr="alt",Or={type:"literal",value:"alt",description:'"alt"'},Fr="else",Br={type:"literal",value:"else",description:'"else"'},Mr="opt",Gr={type:"literal",value:"opt",description:'"opt"'},Xr="break",qr={type:"literal",value:"break",description:'"break"'},zr="par",Ur={type:"literal",value:"par",description:'"par"'},Pr="seq",Vr={type:"literal",value:"seq",description:'"seq"'},Kr="strict",$r={type:"literal",value:"strict",description:'"strict"'},Zr="neg",Jr={type:"literal",value:"neg",description:'"neg"'},Qr="critical",Yr={type:"literal",value:"critical",description:'"critical"'},tn="ignore",en={type:"literal",value:"ignore",description:'"ignore"'},rn="consider",nn={type:"literal",value:"consider",description:'"consider"'},on="assert",an={type:"literal",value:"assert",description:'"assert"'},cn="loop",un={type:"literal",value:"loop",description:'"loop"'},sn="ref",ln={type:"literal",value:"ref",description:'"ref"'},pn="exc",fn={type:"literal",value:"exc",description:'"exc"'},dn=function(t){return t.toLowerCase()},hn=function(t,e){var r={};return r[t.toLowerCase().replace("colour","color")]=e,r},gn={type:"other",description:"attribute name"},bn="label",mn={type:"literal",value:"label",description:'"label"'},yn="idurl",vn={type:"literal",value:"idurl",description:'"idurl"'},xn="id",wn={type:"literal",value:"id",description:'"id"'},Cn="url",kn={type:"literal",value:"url",description:'"url"'},An="linecolor",_n={type:"literal",value:"linecolor",description:'"linecolor"'},En="linecolour",Ln={type:"literal",value:"linecolour",description:'"linecolour"'},Sn="textcolor",jn={type:"literal",value:"textcolor",description:'"textcolor"'},In="textcolour",Tn={type:"literal",value:"textcolour",description:'"textcolour"'},Nn="textbgcolor",Dn={type:"literal",value:"textbgcolor",description:'"textbgcolor"'},Rn="textbgcolour",Hn={type:"literal",value:"textbgcolour",description:'"textbgcolour"'},Wn="arclinecolor",On={type:"literal",value:"arclinecolor",description:'"arclinecolor"'},Fn="arclinecolour",Bn={type:"literal",value:"arclinecolour",
+description:'"arclinecolour"'},Mn="arctextcolor",Gn={type:"literal",value:"arctextcolor",description:'"arctextcolor"'},Xn="arctextcolour",qn={type:"literal",value:"arctextcolour",description:'"arctextcolour"'},zn="arctextbgcolor",Un={type:"literal",value:"arctextbgcolor",description:'"arctextbgcolor"'},Pn="arctextbgcolour",Vn={type:"literal",value:"arctextbgcolour",description:'"arctextbgcolour"'},Kn="arcskip",$n={type:"literal",value:"arcskip",description:'"arcskip"'},Zn={type:"other",description:"double quoted string"},Jn='"',Qn={type:"literal",value:'"',description:'"\\""'},Yn=function(t){return t.join("")},to='\\"',eo={type:"literal",value:'\\"',description:'"\\\\\\""'},ro={type:"any",description:"any character"},no=function(t){return t},oo={type:"other",description:"identifier"},io=/^[A-Za-z_0-9]/,ao={type:"class",value:"[A-Za-z_0-9]",description:"[A-Za-z_0-9]"},co=function(t){return t.join("")},uo={type:"other",description:"whitespace"},so=/^[ \t]/,lo={type:"class",value:"[ \\t]",description:"[ \\t]"},po={type:"other",description:"lineend"},fo=/^[\r\n]/,ho={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},go="/*",bo={type:"literal",value:"/*",description:'"/*"'},mo="*/",yo={type:"literal",value:"*/",description:'"*/"'},vo=function(t,e,r){return t+e.join("")+r},xo="//",wo={type:"literal",value:"//",description:'"//"'},Co="#",ko={type:"literal",value:"#",description:'"#"'},Ao=/^[^\r\n]/,_o={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Eo=function(t,e){return t+e.join("")},Lo={type:"other",description:"comment"},So={type:"other",description:"number"},jo=function(t){return t},Io=function(t){return t.toString()},To=function(t){return t.toString()},No=/^[0-9]/,Do={type:"class",value:"[0-9]",description:"[0-9]"},Ro=function(t){return parseInt(t.join(""),10)},Ho=".",Wo={type:"literal",value:".",description:'"."'},Oo=function(t){return parseFloat(t.join(""))},Fo={type:"other",description:"boolean"},Bo=function(t){return t},Mo=function(t){return t.toString()},Go="true",Xo={type:"literal",value:"true",description:'"true"'},qo="false",zo={type:"literal",value:"false",description:'"false"'},Uo="on",Po={type:"literal",value:"on",description:'"on"'},Vo="off",Ko={type:"literal",value:"off",description:'"off"'},$o="0",Zo={type:"literal",value:"0",description:'"0"'},Jo="1",Qo={type:"literal",value:"1",description:'"1"'},Yo={type:"other",description:"size"},ti=function(t){return t.toString()},ei="auto",ri={type:"literal",value:"auto",description:'"auto"'},ni=function(t){return t.toLowerCase()},oi=0,ii=0,ai=[{line:1,column:1,seenCR:!1}],ci=0,ui=[],si=0;if("startRule"in xt){if(!(xt.startRule in Ct))throw new Error("Can't start parsing from rule \""+xt.startRule+'".');kt=Ct[xt.startRule]}if(vt=kt(),vt!==wt&&oi===t.length)return vt;throw vt!==wt&&oir;)n=t.charAt(r),"\n"===n?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),r++;return ho[e]=o,o}function n(t,e){var n=r(t),o=r(e);return{start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:o.line,column:o.column}}}function o(t){go>po||(po>go&&(go=po,bo=[]),bo.push(t))}function i(t,r,n,o){function i(t){var e=1;for(t.sort(function(t,e){return t.descriptione.description?1:0});e1?a.slice(0,-1).join(", ")+" or "+a[t.length-1]:a[0],o=e?'"'+r(e)+'"':"end of input","Expected "+n+" but "+o+" found."}return null!==r&&i(r),new e(null!==t?t:a(r,n),r,n,o)}function a(){var t,e,r,n;return t=po,e=z(),e!==gt?(r=c(),r!==gt?(n=z(),n!==gt?(fo=t,e=yt(e,r),t=e):(po=t,t=gt)):(po=t,t=gt)):(po=t,t=gt),t}function c(){var t,e,r,n,o;return t=po,e=po,r=u(),r!==gt&&(fo=e,r=vt(r)),e=r,e===gt&&(e=null),e!==gt?(r=po,n=l(),n!==gt&&(fo=r,n=xt(n)),r=n,r===gt&&(r=null),r!==gt?(n=po,o=f(),o!==gt&&(fo=n,o=wt(o)),n=o,n===gt&&(n=null),n!==gt?(e=[e,r,n],t=e):(po=t,t=gt)):(po=t,t=gt)):(po=t,t=gt),t}function u(){var e,r,n,i,a,c;for(e=po,r=po,n=[],i=po,a=s(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=At(a),i=a):(po=i,i=gt)):(po=i,i=gt);i!==gt;)n.push(i),i=po,a=s(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=At(a),i=a):(po=i,i=gt)):(po=i,i=gt);return n!==gt?(i=po,a=s(),a!==gt?(59===t.charCodeAt(po)?(c=_t,po++):(c=gt,0===mo&&o(Et)),c!==gt?(fo=i,a=At(a),i=a):(po=i,i=gt)):(po=i,i=gt),i!==gt?(n=[n,i],r=n):(po=r,r=gt)):(po=r,r=gt),r!==gt&&(fo=e,r=Lt(r)),e=r}function s(){var e,r,n,i,a,c,u,s;return e=po,r=z(),r!==gt?(t.substr(po,6).toLowerCase()===St?(n=t.substr(po,6),po+=6):(n=gt,0===mo&&o(jt)),n===gt&&(t.substr(po,11).toLowerCase()===It?(n=t.substr(po,11),po+=11):(n=gt,0===mo&&o(Tt))),n!==gt?(i=z(),i!==gt?(61===t.charCodeAt(po)?(a=Nt,po++):(a=gt,0===mo&&o(Dt)),a!==gt?(c=z(),c!==gt?(u=U(),u!==gt?(s=z(),s!==gt?(fo=e,r=Rt(n,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(t.substr(po,5).toLowerCase()===Ht?(n=t.substr(po,5),po+=5):(n=gt,0===mo&&o(Wt)),n!==gt?(i=z(),i!==gt?(61===t.charCodeAt(po)?(a=Nt,po++):(a=gt,0===mo&&o(Dt)),a!==gt?(c=z(),c!==gt?(u=Y(),u!==gt?(s=z(),s!==gt?(fo=e,r=Rt(n,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(t.substr(po,12).toLowerCase()===Ot?(n=t.substr(po,12),po+=12):(n=gt,0===mo&&o(Ft)),n!==gt?(i=z(),i!==gt?(61===t.charCodeAt(po)?(a=Nt,po++):(a=gt,0===mo&&o(Dt)),a!==gt?(c=z(),c!==gt?(u=Z(),u!==gt?(s=z(),s!==gt?(fo=e,r=Bt(n,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(t.substr(po,9).toLowerCase()===Mt?(n=t.substr(po,9),po+=9):(n=gt,0===mo&&o(Gt)),n!==gt?(i=z(),i!==gt?(61===t.charCodeAt(po)?(a=Nt,po++):(a=gt,0===mo&&o(Dt)),a!==gt?(c=z(),c!==gt?(u=j(),u!==gt?(s=z(),s!==gt?(fo=e,r=Rt(n,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)))),e}function l(){var e,r,n,i,a,c;for(e=po,r=po,n=[],i=po,a=p(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=Xt(a),i=a):(po=i,i=gt)):(po=i,i=gt);i!==gt;)n.push(i),i=po,a=p(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=Xt(a),i=a):(po=i,i=gt)):(po=i,i=gt);return n!==gt?(i=po,a=p(),a!==gt?(59===t.charCodeAt(po)?(c=_t,po++):(c=gt,0===mo&&o(Et)),c!==gt?(fo=i,a=Xt(a),i=a):(po=i,i=gt)):(po=i,i=gt),i!==gt?(n=[n,i],r=n):(po=r,r=gt)):(po=r,r=gt),r!==gt&&(fo=e,r=qt(r)),e=r}function p(){var e,r,n,i,a,c,u,s,l;return mo++,e=po,r=z(),r!==gt?(n=D(),n!==gt?(i=z(),i!==gt?(a=po,58===t.charCodeAt(po)?(c=Ut,po++):(c=gt,0===mo&&o(Pt)),c!==gt?(u=z(),u!==gt?(s=S(),s!==gt?(l=z(),l!==gt?(fo=a,c=Vt(n,s),a=c):(po=a,a=gt)):(po=a,a=gt)):(po=a,a=gt)):(po=a,a=gt),a===gt&&(a=null),a!==gt?(fo=e,r=Kt(n,a),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),mo--,e===gt&&(r=gt,0===mo&&o(zt)),e}function f(){var e,r,n,i,a;if(e=[],r=po,n=d(),n!==gt?(i=z(),i!==gt?(59===t.charCodeAt(po)?(a=_t,po++):(a=gt,0===mo&&o(Et)),a!==gt?(fo=r,n=$t(n),r=n):(po=r,r=gt)):(po=r,r=gt)):(po=r,r=gt),r!==gt)for(;r!==gt;)e.push(r),r=po,n=d(),n!==gt?(i=z(),i!==gt?(59===t.charCodeAt(po)?(a=_t,po++):(a=gt,0===mo&&o(Et)),a!==gt?(fo=r,n=$t(n),r=n):(po=r,r=gt)):(po=r,r=gt)):(po=r,r=gt);else e=gt;return e}function d(){var e,r,n,i,a,c;for(e=po,r=po,n=[],i=po,a=h(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=$t(a),i=a):(po=i,i=gt)):(po=i,i=gt);i!==gt;)n.push(i),i=po,a=h(),a!==gt?(44===t.charCodeAt(po)?(c=Ct,po++):(c=gt,0===mo&&o(kt)),c!==gt?(fo=i,a=$t(a),i=a):(po=i,i=gt)):(po=i,i=gt);return n!==gt?(i=po,a=h(),a!==gt&&(fo=i,a=Zt(a)),i=a,i!==gt?(n=[n,i],r=n):(po=r,r=gt)):(po=r,r=gt),r!==gt&&(fo=e,r=Jt(r)),e=r}function h(){var t;return t=g(),t===gt&&(t=v()),t}function g(){var e,r,n,i,a,c,u;return e=po,r=po,n=b(),n!==gt&&(fo=r,n=Qt(n)),r=n,r===gt&&(r=po,n=y(),n!==gt&&(fo=r,n=Yt(n)),r=n,r===gt&&(r=po,n=m(),n!==gt&&(fo=r,n=te(n)),r=n)),r!==gt?(n=po,58===t.charCodeAt(po)?(i=Ut,po++):(i=gt,0===mo&&o(Pt)),i!==gt?(a=z(),a!==gt?(c=S(),c!==gt?(u=z(),u!==gt?(fo=n,i=ee(r,c),n=i):(po=n,n=gt)):(po=n,n=gt)):(po=n,n=gt)):(po=n,n=gt),n===gt&&(n=null),n!==gt?(fo=e,r=re(r,n),e=r):(po=e,e=gt)):(po=e,e=gt),e}function b(){var t,e,r,n;return t=po,e=z(),e!==gt?(r=x(),r!==gt?(n=z(),n!==gt?(fo=t,e=ne(r),t=e):(po=t,t=gt)):(po=t,t=gt)):(po=t,t=gt),t}function m(){var t,e,r,n;return t=po,e=z(),e!==gt?(r=w(),r!==gt?(n=z(),n!==gt?(fo=t,e=ne(r),t=e):(po=t,t=gt)):(po=t,t=gt)):(po=t,t=gt),t}function y(){var e,r,n,i,a,c,u,s;return e=po,r=z(),r!==gt?(n=D(),n!==gt?(i=z(),i!==gt?(a=C(),a!==gt?(c=z(),c!==gt?(u=D(),u!==gt?(s=z(),s!==gt?(fo=e,r=oe(n,a,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(42===t.charCodeAt(po)?(n=ie,po++):(n=gt,0===mo&&o(ae)),n!==gt?(i=z(),i!==gt?(a=_(),a!==gt?(c=z(),c!==gt?(u=D(),u!==gt?(s=z(),s!==gt?(fo=e,r=ce(a,u),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(n=D(),n!==gt?(i=z(),i!==gt?(a=A(),a!==gt?(c=z(),c!==gt?(42===t.charCodeAt(po)?(u=ie,po++):(u=gt,0===mo&&o(ae)),u!==gt?(s=z(),s!==gt?(fo=e,r=ue(n,a),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e===gt&&(e=po,r=z(),r!==gt?(n=D(),n!==gt?(i=z(),i!==gt?(a=k(),a!==gt?(c=z(),c!==gt?(42===t.charCodeAt(po)?(u=ie,po++):(u=gt,0===mo&&o(ae)),u!==gt?(s=z(),s!==gt?(fo=e,r=ue(n,a),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)))),e}function v(){var e,r,n,i,a,c,u,s,l,p,d,h,g,b,m;return e=po,r=z(),r!==gt?(n=D(),n!==gt?(i=z(),i!==gt?(a=L(),a!==gt?(c=z(),c!==gt?(u=D(),u!==gt?(s=z(),s!==gt?(l=po,58===t.charCodeAt(po)?(p=Ut,po++):(p=gt,0===mo&&o(Pt)),p!==gt?(d=z(),d!==gt?(h=S(),h!==gt?(g=z(),g!==gt?(fo=l,p=se(n,a,u,h),l=p):(po=l,l=gt)):(po=l,l=gt)):(po=l,l=gt)):(po=l,l=gt),l===gt&&(l=null),l!==gt?(123===t.charCodeAt(po)?(p=le,po++):(p=gt,0===mo&&o(pe)),p!==gt?(d=z(),d!==gt?(h=f(),h===gt&&(h=null),h!==gt?(g=z(),g!==gt?(125===t.charCodeAt(po)?(b=fe,po++):(b=gt,0===mo&&o(de)),b!==gt?(m=z(),m!==gt?(fo=e,r=he(n,a,u,l,h),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e}function x(){var e,r;return mo++,t.substr(po,3)===be?(e=be,po+=3):(e=gt,0===mo&&o(me)),e===gt&&(t.substr(po,3)===ye?(e=ye,po+=3):(e=gt,0===mo&&o(ve))),mo--,e===gt&&(r=gt,0===mo&&o(ge)),e}function w(){var e,r;return mo++,t.substr(po,3)===we?(e=we,po+=3):(e=gt,0===mo&&o(Ce)),mo--,e===gt&&(r=gt,0===mo&&o(xe)),e}function C(){var t,e;return t=po,e=k(),e===gt&&(e=A(),e===gt&&(e=_(),e===gt&&(e=E()))),e!==gt&&(fo=t,e=ke(e)),t=e}function k(){var e,r;return mo++,t.substr(po,2)===_e?(e=_e,po+=2):(e=gt,0===mo&&o(Ee)),e===gt&&(t.substr(po,3)===Le?(e=Le,po+=3):(e=gt,0===mo&&o(Se)),e===gt&&(t.substr(po,2)===je?(e=je,po+=2):(e=gt,0===mo&&o(Ie)),e===gt&&(t.substr(po,5)===Te?(e=Te,po+=5):(e=gt,0===mo&&o(Ne)),e===gt&&(t.substr(po,3)===De?(e=De,po+=3):(e=gt,0===mo&&o(Re)),e===gt&&(t.substr(po,2)===He?(e=He,po+=2):(e=gt,0===mo&&o(We)),e===gt&&(t.substr(po,4)===Oe?(e=Oe,po+=4):(e=gt,0===mo&&o(Fe)),e===gt&&(t.substr(po,2)===Be?(e=Be,po+=2):(e=gt,0===mo&&o(Me)),e===gt&&(t.substr(po,3)===Ge?(e=Ge,po+=3):(e=gt,0===mo&&o(Xe)))))))))),mo--,e===gt&&(r=gt,0===mo&&o(Ae)),e}function A(){var e,r;return mo++,t.substr(po,2)===ze?(e=ze,po+=2):(e=gt,0===mo&&o(Ue)),e===gt&&(t.substr(po,3)===Pe?(e=Pe,po+=3):(e=gt,0===mo&&o(Ve)),e===gt&&(t.substr(po,2)===Ke?(e=Ke,po+=2):(e=gt,0===mo&&o($e)),e===gt&&(t.substr(po,2)===Ze?(e=Ze,po+=2):(e=gt,0===mo&&o(Je)),e===gt&&(t.substr(po,2)===Qe?(e=Qe,po+=2):(e=gt,0===mo&&o(Ye)),e===gt&&(t.substr(po,2).toLowerCase()===tr?(e=t.substr(po,2),po+=2):(e=gt,0===mo&&o(er))))))),mo--,e===gt&&(r=gt,0===mo&&o(qe)),e}function _(){var e,r;return mo++,t.substr(po,2)===nr?(e=nr,po+=2):(e=gt,0===mo&&o(or)),e===gt&&(t.substr(po,3)===ir?(e=ir,po+=3):(e=gt,0===mo&&o(ar)),e===gt&&(t.substr(po,2)===cr?(e=cr,po+=2):(e=gt,0===mo&&o(ur)),e===gt&&(t.substr(po,2)===sr?(e=sr,po+=2):(e=gt,0===mo&&o(lr)),e===gt&&(t.substr(po,2)===pr?(e=pr,po+=2):(e=gt,0===mo&&o(fr)),e===gt&&(t.substr(po,2).toLowerCase()===dr?(e=t.substr(po,2),po+=2):(e=gt,0===mo&&o(hr))))))),mo--,e===gt&&(r=gt,0===mo&&o(rr)),e}function E(){var e,r;return mo++,t.substr(po,4).toLowerCase()===br?(e=t.substr(po,4),po+=4):(e=gt,0===mo&&o(mr)),e===gt&&(t.substr(po,4).toLowerCase()===yr?(e=t.substr(po,4),po+=4):(e=gt,0===mo&&o(vr)),e===gt&&(t.substr(po,4).toLowerCase()===xr?(e=t.substr(po,4),po+=4):(e=gt,0===mo&&o(wr)),e===gt&&(t.substr(po,3).toLowerCase()===Cr?(e=t.substr(po,3),po+=3):(e=gt,0===mo&&o(kr))))),mo--,e===gt&&(r=gt,0===mo&&o(gr)),e}function L(){var e,r;return mo++,e=po,t.substr(po,3).toLowerCase()===_r?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Er)),r===gt&&(t.substr(po,4).toLowerCase()===Lr?(r=t.substr(po,4),po+=4):(r=gt,0===mo&&o(Sr)),r===gt&&(t.substr(po,3).toLowerCase()===jr?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Ir)),r===gt&&(t.substr(po,5).toLowerCase()===Tr?(r=t.substr(po,5),po+=5):(r=gt,0===mo&&o(Nr)),r===gt&&(t.substr(po,3).toLowerCase()===Dr?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Rr)),r===gt&&(t.substr(po,3).toLowerCase()===Hr?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Wr)),r===gt&&(t.substr(po,6).toLowerCase()===Or?(r=t.substr(po,6),po+=6):(r=gt,0===mo&&o(Fr)),r===gt&&(t.substr(po,3).toLowerCase()===Br?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Mr)),r===gt&&(t.substr(po,8).toLowerCase()===Gr?(r=t.substr(po,8),po+=8):(r=gt,0===mo&&o(Xr)),r===gt&&(t.substr(po,6).toLowerCase()===qr?(r=t.substr(po,6),po+=6):(r=gt,0===mo&&o(zr)),r===gt&&(t.substr(po,8).toLowerCase()===Ur?(r=t.substr(po,8),po+=8):(r=gt,0===mo&&o(Pr)),r===gt&&(t.substr(po,6).toLowerCase()===Vr?(r=t.substr(po,6),po+=6):(r=gt,0===mo&&o(Kr)),r===gt&&(t.substr(po,4).toLowerCase()===$r?(r=t.substr(po,4),po+=4):(r=gt,0===mo&&o(Zr)),r===gt&&(t.substr(po,3).toLowerCase()===Jr?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(Qr)),r===gt&&(t.substr(po,3).toLowerCase()===Yr?(r=t.substr(po,3),po+=3):(r=gt,0===mo&&o(tn)))))))))))))))),r!==gt&&(fo=e,r=en(r)),e=r,mo--,e===gt&&(r=gt,0===mo&&o(Ar)),e}function S(){var t;return t=j(),t===gt&&(t=T()),t}function j(){var e,r,n,i;return mo++,e=po,34===t.charCodeAt(po)?(r=nn,po++):(r=gt,0===mo&&o(on)),r!==gt?(n=I(),n!==gt?(34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),i!==gt?(fo=e,r=an(n),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),mo--,e===gt&&(r=gt,0===mo&&o(rn)),e}function I(){var e,r,n,i;for(e=[],r=po,n=po,mo++,34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),mo--,i===gt?n=void 0:(po=n,n=gt),n!==gt?(t.substr(po,2)===cn?(i=cn,po+=2):(i=gt,0===mo&&o(un)),i===gt&&(t.length>po?(i=t.charAt(po),po++):(i=gt,0===mo&&o(sn))),i!==gt?(fo=r,n=ln(i),r=n):(po=r,r=gt)):(po=r,r=gt);r!==gt;)e.push(r),r=po,n=po,mo++,34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),mo--,i===gt?n=void 0:(po=n,n=gt),n!==gt?(t.substr(po,2)===cn?(i=cn,po+=2):(i=gt,0===mo&&o(un)),i===gt&&(t.length>po?(i=t.charAt(po),po++):(i=gt,0===mo&&o(sn))),i!==gt?(fo=r,n=ln(i),r=n):(po=r,r=gt)):(po=r,r=gt);return e}function T(){var t,e;return t=po,e=N(),e!==gt&&(fo=t,e=pn(e)),t=e}function N(){var e,r,n,i;for(e=[],r=po,n=po,mo++,44===t.charCodeAt(po)?(i=Ct,po++):(i=gt,0===mo&&o(kt)),i===gt&&(59===t.charCodeAt(po)?(i=_t,po++):(i=gt,0===mo&&o(Et)),i===gt&&(123===t.charCodeAt(po)?(i=le,po++):(i=gt,0===mo&&o(pe)))),mo--,i===gt?n=void 0:(po=n,n=gt),n!==gt?(t.length>po?(i=t.charAt(po),po++):(i=gt,0===mo&&o(sn)),i!==gt?(fo=r,n=ln(i),r=n):(po=r,r=gt)):(po=r,r=gt);r!==gt;)e.push(r),r=po,n=po,mo++,44===t.charCodeAt(po)?(i=Ct,po++):(i=gt,0===mo&&o(kt)),i===gt&&(59===t.charCodeAt(po)?(i=_t,po++):(i=gt,0===mo&&o(Et)),i===gt&&(123===t.charCodeAt(po)?(i=le,po++):(i=gt,0===mo&&o(pe)))),mo--,i===gt?n=void 0:(po=n,n=gt),n!==gt?(t.length>po?(i=t.charAt(po),po++):(i=gt,0===mo&&o(sn)),i!==gt?(fo=r,n=ln(i),r=n):(po=r,r=gt)):(po=r,r=gt);return e}function D(){var e,r,n;if(mo++,e=po,r=[],dn.test(t.charAt(po))?(n=t.charAt(po),po++):(n=gt,0===mo&&o(hn)),n!==gt)for(;n!==gt;)r.push(n),dn.test(t.charAt(po))?(n=t.charAt(po),po++):(n=gt,0===mo&&o(hn));else r=gt;return r!==gt&&(fo=e,r=gn(r)),e=r,e===gt&&(e=j()),mo--,e===gt&&(r=gt,0===mo&&o(fn)),e}function R(){var e,r;return mo++,e=po,mn.test(t.charAt(po))?(r=t.charAt(po),po++):(r=gt,0===mo&&o(yn)),r!==gt&&(fo=e,r=ln(r)),e=r,mo--,e===gt&&(r=gt,0===mo&&o(bn)),e}function H(){var e,r;return mo++,e=po,xn.test(t.charAt(po))?(r=t.charAt(po),po++):(r=gt,0===mo&&o(wn)),r!==gt&&(fo=e,r=ln(r)),e=r,mo--,e===gt&&(r=gt,0===mo&&o(vn)),e}function W(){var e;return t.substr(po,2)===Cn?(e=Cn,po+=2):(e=gt,0===mo&&o(kn)),e}function O(){var e;return t.substr(po,2)===An?(e=An,po+=2):(e=gt,0===mo&&o(_n)),e}function F(){var e,r,n;return e=po,r=po,mo++,t.substr(po,2)===An?(n=An,po+=2):(n=gt,0===mo&&o(_n)),mo--,n===gt?r=void 0:(po=r,r=gt),r!==gt?(t.length>po?(n=t.charAt(po),po++):(n=gt,0===mo&&o(sn)),n!==gt?(fo=e,r=ln(n),e=r):(po=e,e=gt)):(po=e,e=gt),e}function B(){var t,e,r,n;if(t=po,e=W(),e!==gt){for(r=[],n=F();n!==gt;)r.push(n),n=F();r!==gt?(n=O(),n!==gt?(fo=t,e=En(e,r,n),t=e):(po=t,t=gt)):(po=t,t=gt)}else po=t,t=gt;return t}function M(){var e;return t.substr(po,2)===Ln?(e=Ln,po+=2):(e=gt,0===mo&&o(Sn)),e===gt&&(35===t.charCodeAt(po)?(e=jn,po++):(e=gt,0===mo&&o(In))),e}function G(){var e;return Tn.test(t.charAt(po))?(e=t.charAt(po),po++):(e=gt,0===mo&&o(Nn)),e}function X(){var t,e,r,n;if(t=po,e=M(),e!==gt){for(r=[],n=G();n!==gt;)r.push(n),n=G();r!==gt?(fo=t,e=Dn(e,r),t=e):(po=t,t=gt)}else po=t,t=gt;return t}function q(){var t,e;return mo++,t=X(),t===gt&&(t=B()),mo--,t===gt&&(e=gt,0===mo&&o(Rn)),t}function z(){var t,e;for(t=[],e=R(),e===gt&&(e=H(),e===gt&&(e=q()));e!==gt;)t.push(e),e=R(),e===gt&&(e=H(),e===gt&&(e=q()));return t}function U(){var t,e;return mo++,t=po,e=P(),e!==gt&&(fo=t,e=Wn(e)),t=e,t===gt&&(t=po,e=V(),e!==gt&&(fo=t,e=On(e)),t=e),mo--,t===gt&&(e=gt,0===mo&&o(Hn)),t}function P(){var e,r,n,i;return e=po,34===t.charCodeAt(po)?(r=nn,po++):(r=gt,0===mo&&o(on)),r!==gt?(n=V(),n!==gt?(34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),i!==gt?(fo=e,r=Fn(n),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e}function V(){var t;return t=$(),t===gt&&(t=K()),t}function K(){var e,r,n;if(e=po,r=[],Bn.test(t.charAt(po))?(n=t.charAt(po),po++):(n=gt,0===mo&&o(Mn)),n!==gt)for(;n!==gt;)r.push(n),Bn.test(t.charAt(po))?(n=t.charAt(po),po++):(n=gt,0===mo&&o(Mn));else r=gt;return r!==gt&&(fo=e,r=Gn(r)),e=r}function $(){var e,r,n,i,a;return e=po,r=po,n=K(),n!==gt?(46===t.charCodeAt(po)?(i=Xn,po++):(i=gt,0===mo&&o(qn)),i!==gt?(a=K(),a!==gt?(n=[n,i,a],r=n):(po=r,r=gt)):(po=r,r=gt)):(po=r,r=gt),r!==gt&&(fo=e,r=zn(r)),e=r}function Z(){var t,e;return mo++,t=po,e=J(),e!==gt&&(fo=t,e=Pn(e)),t=e,t===gt&&(t=po,e=Q(),e!==gt&&(fo=t,e=Vn(e)),t=e),mo--,t===gt&&(e=gt,0===mo&&o(Un)),t}function J(){var e,r,n,i;return e=po,34===t.charCodeAt(po)?(r=nn,po++):(r=gt,0===mo&&o(on)),r!==gt?(n=Q(),n!==gt?(34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),i!==gt?(fo=e,r=Wn(n),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e}function Q(){var e;return t.substr(po,4).toLowerCase()===Kn?(e=t.substr(po,4),po+=4):(e=gt,0===mo&&o($n)),e===gt&&(t.substr(po,5).toLowerCase()===Zn?(e=t.substr(po,5),po+=5):(e=gt,0===mo&&o(Jn)),e===gt&&(t.substr(po,2).toLowerCase()===Qn?(e=t.substr(po,2),po+=2):(e=gt,0===mo&&o(Yn)),e===gt&&(t.substr(po,3).toLowerCase()===to?(e=t.substr(po,3),po+=3):(e=gt,0===mo&&o(eo)),e===gt&&(48===t.charCodeAt(po)?(e=ro,po++):(e=gt,0===mo&&o(no)),e===gt&&(49===t.charCodeAt(po)?(e=oo,po++):(e=gt,0===mo&&o(io))))))),e}function Y(){var t,e;return mo++,t=tt(),t===gt&&(t=et()),mo--,t===gt&&(e=gt,0===mo&&o(ao)),t}function tt(){var e,r,n,i;return e=po,34===t.charCodeAt(po)?(r=nn,po++):(r=gt,0===mo&&o(on)),r!==gt?(n=et(),n!==gt?(34===t.charCodeAt(po)?(i=nn,po++):(i=gt,0===mo&&o(on)),i!==gt?(fo=e,r=Wn(n),e=r):(po=e,e=gt)):(po=e,e=gt)):(po=e,e=gt),e}function et(){var e,r;return e=po,r=V(),r!==gt&&(fo=e,r=co(r)),e=r,e===gt&&(e=po,t.substr(po,4).toLowerCase()===uo?(r=t.substr(po,4),po+=4):(r=gt,0===mo&&o(so)),r!==gt&&(fo=e,r=lo(r)),e=r),e}function rt(t,e){e&&Object.getOwnPropertyNames(e).forEach(function(r){t[r]=e[r]})}function nt(t,e){return t=t?t:{},rt(t,e),t}function ot(t){var e={};return t[0].forEach(function(t){e=nt(e,t)}),nt(e,t[1])}function it(t){return["true","on","1"].indexOf(t.toLowerCase())>-1}function at(t,e){var r={};return r[t.toLowerCase()]=e,r}function ct(t,e,r){return void 0===e||"*"===e?!0:t.entities.some(function(t){return t.name===e})?!0:r[e]===!0}function ut(t){var e={};return e.name=t,e}function st(t,e,r){return t||(t={},t.entities=[]),r||(r={}),e&&e.arcs&&e.arcs.forEach(function(e){e.forEach(function(e){ct(t,e.from,r)||(t.entities[t.entities.length]=ut(e.from)),e.arcs&&(r[e.to]=!0,nt(t,st(t,e,r)),delete r[e.to]),ct(t,e.to,r)||(t.entities[t.entities.length]=ut(e.to))})}),t}function lt(t){return t&&t.options?!!t.options.watermark||!!t.options.width&&"auto"===t.options.width:!1}function pt(t){return t&&t.arcs?t.arcs.some(function(t){return t.some(function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].indexOf(t.kind)>-1})}):!1}function ft(t,e){var r=lt(t),n=pt(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}}var dt,ht=arguments.length>1?arguments[1]:{},gt={},bt={program:a},mt=a,yt=function(t,e){e[1]=st(e[1],e[2]);var r=nt(e[0],nt(e[1],e[2]));return r=nt({meta:ft(e[0],e[2])},r),t.length>0&&(r=nt({precomment:t},r)),r},vt=function(t){return{options:t}},xt=function(t){return{entities:t}},wt=function(t){return{arcs:t}},Ct=",",kt={type:"literal",value:",",description:'","'},At=function(t){return t},_t=";",Et={type:"literal",value:";",description:'";"'},Lt=function(t){return ot(t)},St="hscale",jt={type:"literal",value:"hscale",description:'"hscale"'},It="arcgradient",Tt={type:"literal",value:"arcgradient",description:'"arcgradient"'},Nt="=",Dt={type:"literal",value:"=",description:'"="'},Rt=function(t,e){return at(t,e)},Ht="width",Wt={type:"literal",value:"width",description:'"width"'},Ot="wordwraparcs",Ft={type:"literal",value:"wordwraparcs",description:'"wordwraparcs"'},Bt=function(t,e){var r={};return r[t.toLowerCase()]=it(e),r},Mt="watermark",Gt={type:"literal",value:"watermark",description:'"watermark"'},Xt=function(t){return t},qt=function(t){return t[0].push(t[1]),t[0]},zt={type:"other",description:"entity"},Ut=":",Pt={type:"literal",value:":",description:'":"'},Vt=function(t,e){return e},Kt=function(t,e){var r={};return r.name=t,e&&(r.label=e),r},$t=function(t){return t},Zt=function(t){return[t]},Jt=function(t){return t[0].push(t[1][0]),t[0]},Qt=function(t){return t},Yt=function(t){return t},te=function(t){return t},ee=function(t,e){return e},re=function(t,e){return e&&(t.label=e),t},ne=function(t){return{kind:t}},oe=function(t,e,r){return{kind:e,from:t,to:r}},ie="*",ae={type:"literal",value:"*",description:'"*"'},ce=function(t,e){return{kind:t,from:"*",to:e}},ue=function(t,e){return{kind:e,from:t,to:"*"}},se=function(t,e,r,n){return n},le="{",pe={type:"literal",value:"{",description:'"{"'},fe="}",de={type:"literal",value:"}",description:'"}"'},he=function(t,e,r,n,o){var i={kind:e,from:t,to:r,arcs:o};return n&&(i.label=n),i},ge={type:"other",description:"empty row"},be="|||",me={type:"literal",value:"|||",description:'"|||"'},ye="...",ve={type:"literal",value:"...",description:'"..."'},xe={type:"other",description:"---"},we="---",Ce={type:"literal",value:"---",description:'"---"'},ke=function(t){return t.toLowerCase()},Ae={type:"other",description:"bi-directional arrow"},_e="--",Ee={type:"literal",value:"--",description:'"--"'},Le="<->",Se={type:"literal",value:"<->",description:'"<->"'},je="==",Ie={type:"literal",value:"==",description:'"=="'},Te="<<=>>",Ne={type:"literal",value:"<<=>>",description:'"<<=>>"'},De="<=>",Re={type:"literal",value:"<=>",description:'"<=>"'},He="..",We={type:"literal",value:"..",description:'".."'},Oe="<<>>",Fe={type:"literal",value:"<<>>",description:'"<<>>"'},Be="::",Me={type:"literal",value:"::",description:'"::"'},Ge="<:>",Xe={type:"literal",value:"<:>",description:'"<:>"'},qe={type:"other",description:"left to right arrow"},ze="->",Ue={type:"literal",value:"->",description:'"->"'},Pe="=>>",Ve={type:"literal",value:"=>>",description:'"=>>"'},Ke="=>",$e={type:"literal",value:"=>",description:'"=>"'},Ze=">>",Je={type:"literal",value:">>",description:'">>"'},Qe=":>",Ye={type:"literal",value:":>",description:'":>"'},tr="-x",er={type:"literal",value:"-x",description:'"-x"'},rr={type:"other",description:"right to left arrow"},nr="<-",or={type:"literal",value:"<-",description:'"<-"'},ir="<<=",ar={type:"literal",value:"<<=",description:'"<<="'},cr="<=",ur={type:"literal",value:"<=",description:'"<="'},sr="<<",lr={type:"literal",value:"<<",description:'"<<"'},pr="<:",fr={type:"literal",value:"<:",description:'"<:"'},dr="x-",hr={type:"literal",value:"x-",description:'"x-"'},gr={type:"other",description:"box"},br="note",mr={type:"literal",value:"note",description:'"note"'},yr="abox",vr={type:"literal",value:"abox",description:'"abox"'},xr="rbox",wr={type:"literal",value:"rbox",description:'"rbox"'},Cr="box",kr={type:"literal",value:"box",description:'"box"'},Ar={type:"other",description:"inline expression"},_r="alt",Er={type:"literal",value:"alt",description:'"alt"'},Lr="else",Sr={type:"literal",value:"else",description:'"else"'},jr="opt",Ir={type:"literal",value:"opt",description:'"opt"'},Tr="break",Nr={type:"literal",value:"break",description:'"break"'},Dr="par",Rr={type:"literal",value:"par",description:'"par"'},Hr="seq",Wr={type:"literal",value:"seq",description:'"seq"'},Or="strict",Fr={type:"literal",value:"strict",description:'"strict"'},Br="neg",Mr={type:"literal",value:"neg",description:'"neg"'},Gr="critical",Xr={type:"literal",value:"critical",description:'"critical"'},qr="ignore",zr={type:"literal",value:"ignore",description:'"ignore"'},Ur="consider",Pr={type:"literal",value:"consider",description:'"consider"'},Vr="assert",Kr={type:"literal",value:"assert",description:'"assert"'},$r="loop",Zr={type:"literal",value:"loop",description:'"loop"'},Jr="ref",Qr={type:"literal",value:"ref",description:'"ref"'},Yr="exc",tn={type:"literal",value:"exc",description:'"exc"'},en=function(t){return t.toLowerCase()},rn={type:"other",description:"double quoted string"},nn='"',on={type:"literal",value:'"',description:'"\\""'},an=function(t){return t.join("")},cn='\\"',un={type:"literal",value:'\\"',description:'"\\\\\\""'},sn={type:"any",description:"any character"},ln=function(t){return t},pn=function(t){return t.join("").trim()},fn={type:"other",description:"identifier"},dn=/^[^;, "\t\n\r=\-><:{*]/,hn={type:"class",value:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]',description:'[^;, \\"\\t\\n\\r=\\-><:\\{\\*]'},gn=function(t){return t.join("")},bn={type:"other",description:"whitespace"},mn=/^[ \t]/,yn={type:"class",value:"[ \\t]",description:"[ \\t]"},vn={type:"other",description:"lineend"},xn=/^[\r\n]/,wn={type:"class",value:"[\\r\\n]",description:"[\\r\\n]"},Cn="/*",kn={type:"literal",value:"/*",description:'"/*"'},An="*/",_n={type:"literal",value:"*/",description:'"*/"'},En=function(t,e,r){return t+e.join("")+r},Ln="//",Sn={type:"literal",value:"//",description:'"//"'},jn="#",In={type:"literal",value:"#",description:'"#"'},Tn=/^[^\r\n]/,Nn={type:"class",value:"[^\\r\\n]",description:"[^\\r\\n]"},Dn=function(t,e){return t+e.join("")},Rn={type:"other",description:"comment"},Hn={type:"other",description:"number"},Wn=function(t){return t},On=function(t){return t.toString()},Fn=function(t){return t.toString()},Bn=/^[0-9]/,Mn={type:"class",value:"[0-9]",description:"[0-9]"},Gn=function(t){return parseInt(t.join(""),10)},Xn=".",qn={type:"literal",value:".",description:'"."'},zn=function(t){return parseFloat(t.join(""))},Un={type:"other",description:"boolean"},Pn=function(t){return t},Vn=function(t){return t.toString()},Kn="true",$n={type:"literal",value:"true",description:'"true"'},Zn="false",Jn={type:"literal",value:"false",description:'"false"'},Qn="on",Yn={type:"literal",value:"on",description:'"on"'},to="off",eo={type:"literal",value:"off",description:'"off"'},ro="0",no={type:"literal",value:"0",description:'"0"'},oo="1",io={type:"literal",value:"1",description:'"1"'},ao={type:"other",description:"size"},co=function(t){return t.toString()},uo="auto",so={type:"literal",value:"auto",description:'"auto"'},lo=function(t){return t.toLowerCase()},po=0,fo=0,ho=[{line:1,column:1,seenCR:!1}],go=0,bo=[],mo=0;if("startRule"in ht){if(!(ht.startRule in bt))throw new Error("Can't start parsing from rule \""+ht.startRule+'".');mt=bt[ht.startRule]}if(dt=mt(),dt!==gt&&po===t.length)return dt;throw dt!==gt&&pot.xFrom&&(e=1),{dx:e,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}return{getDiagonalAngle:e,getDirection:r}}),r("lib/mscgenjs-core/render/graphics/svgelementfactory",["./constants","./svglowlevelfactory","./geometry"],function(t,e,r){"use strict";function n(r){return e.createElement("svg",{version:"1.1",id:r,xmlns:t.SVGNS,"xmlns:xlink":t.XLINKNS,width:0,height:0})}function o(t){return e.createElement("desc",{id:t})}function i(){return e.createElement("defs")}function a(t,r,n,o){return p(e.createElement("path",{d:t,"class":r}),n,o)}function c(t,r){return e.createElement("polygon",{points:t,"class":r})}function u(t,r,n,o,i,a){return p(e.createElement("rect",{width:t.width,height:t.height,x:t.x,y:t.y,rx:i,ry:a,"class":r}),n,o)}function s(t){return e.createElement("g",{id:t})}function l(r,n){var o=e.createElement("use",{x:r.x.toString(),y:r.y.toString()});return o.setAttributeNS(t.XLINKNS,"xlink:href","#"+n),o}function p(t,r,n){var o="";return n&&(o+="fill:"+n+";"),r&&(o+="stroke:"+r+";"),e.setAttribute(t,"style",o)}function f(t,r){return e.createElement("line",{
+x1:t.xFrom.toString(),y1:t.yFrom.toString(),x2:t.xTo.toString(),y2:t.yTo.toString(),"class":r})}function d(e,r){var n=S.createElementNS(t.SVGNS,"a");return n.setAttributeNS(t.XLINKNS,"xlink:href",e),n.setAttributeNS(t.XLINKNS,"xlink:title",e),n.setAttributeNS(t.XLINKNS,"xlink:show","new"),n.appendChild(r),n}function h(t,e,r,n){var o=3;return a("M"+t.x+","+t.y+"l"+o+", -"+t.height/2+"l"+(t.width-2*o)+",0l"+o+","+t.height/2+"l-"+o+","+t.height/2+"l-"+(t.width-2*o)+",0 l-"+o+",-"+t.height/2,e,r,n)}function g(e,r,n,o){var i=Math.max(9,Math.min(4.5*t.LINE_WIDTH,e.height/2)),c=i.toString(10);return a("M"+e.x+","+e.y+"l"+(e.width-i)+",0 l0,"+c+" l"+c+",0 m-"+c+",-"+c+" l"+c+","+c+" l0,"+(e.height-i)+" l-"+e.width+",0 l0,-"+(e.height+t.LINE_WIDTH/2)+" ",r,n,o)}function b(t,e,r,n,o){var i=o?o:7;return a("M"+t.x+","+t.y+" l"+t.width+",0 l0,"+(t.height-i)+" l-"+i.toString(10)+","+i.toString(10)+" l-"+(t.width-i)+",0 ",e,r,n)}function m(e,r){var n=S.createElementNS(t.SVGNS,"tspan"),o=S.createTextNode(e);return n.appendChild(o),r?d(r,n):n}function y(t,r,n,o,i,a){var c=e.createElement("text",{x:r.x.toString(),y:r.y.toString(),"class":n});if(c.appendChild(m(t,o)),i){var u=m(" ["+i+"]",a);u.setAttribute("style",j),c.appendChild(u)}return c}function v(t,n,o){return e.setAttributes(y(t,{x:n.width/2,y:n.height/2},o),{transform:"rotate("+r.getDiagonalAngle(n).toString()+" "+(n.width/2).toString()+" "+(n.height/2).toString()+")"})}function x(e,r){var n=0;return r.indexOf("nodi")<0&&(n=e.xTo>e.xFrom?-7.5*t.LINE_WIDTH:7.5*t.LINE_WIDTH),n}function w(e,r){var n=0;return r.indexOf("nodi")<0&&(n=r.indexOf("bidi")>-1?e.xTo>e.xFrom?7.5*t.LINE_WIDTH:-7.5*t.LINE_WIDTH:0),n}function C(e,n){var o=t.LINE_WIDTH,i=r.getDirection(e),c=x(e,n),u=w(e,n),s=(e.xTo-e.xFrom+c-u).toString(),l=(e.yTo-e.yFrom).toString(),p="l"+i.dx.toString()+","+i.dy.toString(),f=" l"+s+","+l;return a("M"+e.xFrom.toString()+","+(e.yFrom-7.5*t.LINE_WIDTH*i.dy).toString()+p+"M"+(e.xFrom+u).toString()+","+(e.yFrom-o).toString()+f+"M"+(e.xFrom+u).toString()+","+(e.yFrom+o).toString()+f+"M"+(e.xTo-i.dx).toString()+","+(e.yTo+7.5*t.LINE_WIDTH*i.dy).toString()+p,n)}function k(t,e,r){return r?C(t,e):f(t,e)}function A(e,r,n,o,i){var c=i?e.x+7.5*t.LINE_WIDTH:e.x;return a("M"+e.x.toString()+", -"+e.y.toString()+" C"+(e.x+n).toString()+","+(e.y-7.5*t.LINE_WIDTH).toString()+" "+(e.x+n).toString()+","+(r+0).toString()+" "+c.toString()+","+r.toString(),o)}function _(t,r,n,o){return e.createElement("marker",{orient:n,id:t,"class":r,viewBox:o?o:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}function E(t,r,n){var o=_(t,"arrow-marker","auto");return o.appendChild(e.setAttributes(a(r,"arrow-style"),{style:"stroke-dasharray:100,1;stroke:"+n||"black"})),o}function L(t,r,n){var o=_(t,"arrow-marker","auto");return o.appendChild(e.setAttributes(c(r,"arrow-style"),{stroke:n||"black",fill:n||"black"})),o}var S,j="vertical-align:text-top;";return j+="font-size:0.7em;text-anchor:start;",{init:function(t){S=t,e.init(t)},createSVG:n,createDesc:o,createDefs:i,createRect:u,createABox:h,createNote:g,createEdgeRemark:b,createText:y,createDiagonalText:v,createLine:k,createUTurn:A,createGroup:s,createUse:l,createMarkerPath:E,createMarkerPolygon:L}}),r("lib/mscgenjs-core/render/graphics/idmanager",[],function(){"use strict";var t="mscgen_js-svg-",e=t;return{setPrefix:function(r){e=t+r},get:function(t){return t?e+t:e}}}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e,r){var n=r.length;switch(n){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function o(t,e){for(var r=-1,n=t.length;++r-1&&t%1==0&&e>t}function p(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}function f(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function d(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function h(){}function g(){}function b(t,e){return y(t,e)&&delete t[e]}function m(t,e){if(lr){var r=t[e];return r===zt?Mt:r}return ze.call(t,e)?t[e]:Mt}function y(t,e){return lr?t[e]!==Mt:ze.call(t,e)}function v(t,e,r){t[e]=lr&&r===Mt?zt:r}function x(t){var e=-1,r=t?t.length:0;for(this.clear();++er)return!1;var n=t.length-1;return r==n?t.pop():er.call(t,r,1),!0}function D(t,e){var r=H(t,e);return 0>r?Mt:t[r][1]}function R(t,e){return H(t,e)>-1}function H(t,e){for(var r=t.length;r--;)if(At(t[r][0],e))return r;return-1}function W(t,e,r){var n=H(t,e);0>n?t.push([e,r]):t[n][1]=r}function O(t,e,r,n){return t===Mt||At(t,Xe[r])&&!ze.call(n,r)?e:t}function F(t,e,r){var n=t[e];ze.call(t,e)&&At(n,r)&&(r!==Mt||e in t)||(t[e]=r)}function B(t,e){return t&&nt(e,Ot(e),t)}function M(t,e,r,n,i,a,c){var u;if(n&&(u=a?n(t,i,a,c):n(t)),u!==Mt)return u;if(!It(t))return t;var l=vr(t);if(l){if(u=pt(t),!e)return rt(t,u)}else{var p=lt(t),f=p==te||p==ee;if(xr(t))return K(t,e);if(p==oe||p==$t||f&&!a){if(s(t))return a?t:{};if(u=ft(f?{}:t),!e)return ot(t,B(u,t))}else{if(!Ie[p])return a?t:{};u=dt(t,p,M,e)}}c||(c=new E);var d=c.get(t);if(d)return d;if(c.set(t,u),!l)var h=r?at(t):Ot(t);return o(h||t,function(o,i){h&&(i=o,o=t[i]),F(u,i,M(o,e,r,n,i,t,c))}),u}function G(t){return It(t)?Ye(t):{}}function X(t,e,r,n,o){var a=-1,c=t.length;for(r||(r=gt),o||(o=[]);++a0&&r(u)?e>1?X(u,e-1,r,n,o):i(o,u):n||(o[o.length]=u)}return o}function q(t,e,r){var n=e(t);return vr(t)?n:i(n,r(t))}function z(t,e){return ze.call(t,e)||"object"==typeof t&&e in t&&null===ut(t)}function U(t){return nr(Object(t))}function P(t){t=null==t?t:Object(t);var e=[];for(var r in t)e.push(r);return e}function V(t){return function(e){return null==e?Mt:e[t]}}function K(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function $(t){var e=new t.constructor(t.byteLength);return new Ze(e).set(new Ze(t)),e}function Z(t,e){var r=e?$(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function J(e,r,n){var o=r?n(f(e),!0):f(e);return a(o,t,new e.constructor)}function Q(t){var e=new t.constructor(t.source,Ae.exec(t));return e.lastIndex=t.lastIndex,e}function Y(t,r,n){var o=r?n(d(t),!0):d(t);return a(o,e,new t.constructor)}function tt(t){return mr?Object(mr.call(t)):{}}function et(t,e){var r=e?$(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function rt(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r1?r[o-1]:Mt,a=o>2?r[2]:Mt;for(i="function"==typeof i?(o--,i):Mt,a&&bt(r[0],r[1],a)&&(i=3>o?Mt:i,o=1),e=Object(e);++n-1&&t%1==0&&Pt>=t}function It(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Tt(t){return!!t&&"object"==typeof t}function Nt(t){if(!It(t))return!1;var e=St(t)||s(t)?Pe:Le;return e.test(vt(t))}function Dt(t){return"string"==typeof t||!vr(t)&&Tt(t)&&Ue.call(t)==ue}function Rt(t){return"symbol"==typeof t||Tt(t)&&Ue.call(t)==se}function Ht(t){if(!t)return 0===t?t:0;if(t=Wt(t),t===Ut||t===-Ut){var e=0>t?-1:1;return e*Vt}var r=t%1;return t===t?r?t-r:t:0}function Wt(t){if("number"==typeof t)return t;if(Rt(t))return Kt;if(It(t)){var e=St(t.valueOf)?t.valueOf():t;t=It(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ke,"");var r=Ee.test(t);return r||Se.test(t)?Ne(t.slice(2),r?2:8):_e.test(t)?Kt:+t}function Ot(t){var e=yt(t);if(!e&&!Et(t))return U(t);var r=ht(t),n=!!r,o=r||[],i=o.length;for(var a in t)!z(t,a)||n&&("length"==a||l(a,i))||e&&"constructor"==a||o.push(a);return o}function Ft(t){for(var e=-1,r=yt(t),n=P(t),o=n.length,i=ht(t),a=!!i,c=i||[],u=c.length;++ee||Math.abs(t.width)>e?{height:0,width:0,x:0,y:0}:t}function u(t){return"function"==typeof t.getBBox?c(a(t)):{height:15,width:15,x:2,y:2}}function s(e){var r=d.createElementNS(t.SVGNS,"tspan");return r.appendChild(d.createTextNode(e)),r}function l(t){var e=n.createElement("text",{x:"0",y:"0"});return e.appendChild(s(t)),e}function p(){return u(l("ÁjyÎ9ƒ@💩")).height}function f(t){e.setPrefix(t);var r=d.getElementById(e.get());if(r){var n=d.getElementById(t);n?n.removeChild(r):d.body.removeChild(r)}}var d,h=e.get("bboxer");return{init:function(t){d=t},removeRenderedSVGFromElement:f,getBBox:u,calculateTextHeight:o.memoize(p),webkitNamespaceBugWorkaround:function(t){return t.replace(/\ xlink=/g," xmlns:xlink=","g").replace(/\ href=/g," xlink:href=","g")}}}),r("lib/mscgenjs-core/render/graphics/renderutensils",[],function(){"use strict";function t(t,e){e.scale=t/e.width,e.width*=e.scale,e.height*=e.scale,e.horizontaltransform*=e.scale,e.verticaltransform*=e.scale,e.x=0-e.horizontaltransform,e.y=0-e.verticaltransform}function e(t,e){return t?2*(2*(t+1)*e):0}function r(t,e,r){return"-x"===t?e+.75*(r-e):r}return{scaleCanvasToWidth:t,determineDepthCorrection:e,determineArcXTo:r}}),r("lib/mscgenjs-core/render/graphics/csstemplates",[],function(){"use strict";return{baseTemplate:"svg{font-family:Helvetica,sans-serif;font-size:<%=fontSize%>px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;color:black;}rect{fill:none;stroke:black;stroke-width:<%=lineWidth%>;}rect.entity{fill:white;}rect.label-text-background{fill:white;stroke:white;stroke-width:0;}rect.bglayer{fill:white;stroke:white;stroke-width:0;}line{stroke:black;stroke-width:<%=lineWidth%>;}line.return{stroke-dasharray:5,2;}line.comment{stroke-dasharray:5,2;}line.inline_expression_divider{stroke-dasharray:10,5;}text{color:inherit;stroke:none;text-anchor:middle;}text.entity-text{text-decoration:underline;}text.anchor-start{text-anchor:start;}text.box-text{}path{stroke:black;color:black;stroke-width:<%=lineWidth%>;fill:none;}.arrow-marker{overflow:visible;}.arrow-style{stroke-width:1;}.arcrowomit{stroke-dasharray:2,2;}rect.box,path.box{fill:white;}.inherit{stroke:inherit;color:inherit;}.inherit-fill{fill:inherit;}.watermark{stroke:black;color:black;fill:black;font-size:48pt;font-weight:bold;opacity:0.14;}"}}),r("lib/mscgenjs-core/render/graphics/renderskeleton",["./svgelementfactory","./constants","./csstemplates"],function(t,e,r){"use strict";function n(e,r){return r.forEach(function(r){"method"===r.type?e.appendChild(t.createMarkerPolygon(r.name,r.path,r.color)):e.appendChild(t.createMarkerPath(r.name,r.path,r.color))}),e}function o(t){var e=l.createElement("style");return e.setAttribute("type","text/css"),e.appendChild(l.createTextNode(s(t))),e}function i(e,r,i){var a=t.createDefs();return a.appendChild(o(i)),a=n(a,r),a.appendChild(t.createGroup(e+"__defs")),a}function a(e){var r=t.createGroup(e+"__body");return r.appendChild(t.createGroup(e+"__background")),r.appendChild(t.createGroup(e+"__arcspanlayer")),r.appendChild(t.createGroup(e+"__lifelinelayer")),r.appendChild(t.createGroup(e+"__sequencelayer")),r.appendChild(t.createGroup(e+"__notelayer")),r.appendChild(t.createGroup(e+"__watermark")),r}function c(e){return t.init(e.document),e.document}function u(e,r,n,o,u){l=c(u);var s=l.getElementById(e);null===s&&(s=l.body);var p=t.createSVG(r);return p.appendChild(t.createDesc(r+"__msc_source")),p.appendChild(i(r,n,o)),p.appendChild(a(r)),s.appendChild(p),l}function s(t){return r.baseTemplate.replace(/<%=fontSize%>/g,e.FONT_SIZE).replace(/<%=lineWidth%>/g,e.LINE_WIDTH)+(t?t:"")}var l;return{bootstrap:u,init:c}}),r("lib/mscgenjs-core/render/text/asttransform",[],function(){"use strict";function t(t,e){t&&e&&t.forEach(function(t){e.forEach(function(e){e(t)})})}function e(t,e,r,n){n&&n.forEach(function(n){n(r,t,e)})}function r(t,r,o){r.forEach(function(i){e(t,r,i,o),i.arcs&&n(t,i.arcs,o)})}function n(t,e,n){t&&e&&n&&e.forEach(function(e){r(t,e,n)})}function o(e,r,o){return t(e.entities,r),n(e.entities,e.arcs,o),e}return{transform:o}}),r("lib/mscgenjs-core/render/text/arcmappings",[],function(){"use strict";var t={"->":"rvee","<->":"rvee","=>":"normal","<=>":"normal","-x":"oinvonormal"},e={box:"box",abox:"hexagon",rbox:"box",note:"note"},r={">>":"dashed","<<>>":"dashed","..":"dashed",":>":"bold","<:>":"bold","::":"bold",rbox:"rounded"},n={"|||":"emptyarc","...":"emptyarc","---":"emptyarc","->":"directional","=>":"directional","=>>":"directional",">>":"directional",":>":"directional","-x":"directional","<-":"directional","<=":"directional","<<=":"directional","<<":"directional","<:":"directional","x-":"directional",note:"box",box:"box",abox:"box",rbox:"box","<->":"bidirectional","<=>":"bidirectional","<<=>>":"bidirectional","<<>>":"bidirectional","<:>":"bidirectional","--":"nondirectional","==":"nondirectional","..":"nondirectional","::":"nondirectional",alt:"inline_expression","else":"inline_expression",opt:"inline_expression","break":"inline_expression",par:"inline_expression",seq:"inline_expression",strict:"inline_expression",neg:"inline_expression",critical:"inline_expression",ignore:"inline_expression",consider:"inline_expression",assert:"inline_expression",loop:"inline_expression",ref:"inline_expression",exc:"inline_expression"},o={"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"},i={"|||":"empty-row","...":"omitted-row","---":"comment-row","->":"signal","=>":"method","=>>":"callback",">>":"return",":>":"emphasised","-x":"lost","<-":"signal","<=":"method","<<=":"callback","<<":"return","<:":"emphasised","x-":"lost","<->":"signal","<=>":"method","<<=>>":"callback","<<>>":"return","<:>":"emphasised","--":"signal","==":"method","..":"return","::":"emphasised"},a={"|||":"empty","...":"empty","---":"empty","->":"directional","=>":"directional","=>>":"directional",">>":"directional",":>":"directional","-x":"directional","<-":"directional","<=":"directional","<<=":"directional","<<":"directional","<:":"directional","x-":"directional",note:"box",box:"box",abox:"box",rbox:"box","<->":"bidirectional","<=>":"bidirectional","<<=>>":"bidirectional","<<>>":"bidirectional","<:>":"bidirectional","--":"nondirectional","==":"nondirectional","..":"nondirectional","::":"nondirectional",alt:"inline_expression","else":"inline_expression",opt:"inline_expression","break":"inline_expression",par:"inline_expression",seq:"inline_expression",strict:"inline_expression",neg:"inline_expression",critical:"inline_expression",ignore:"inline_expression",consider:"inline_expression",assert:"inline_expression",loop:"inline_expression",ref:"inline_expression",exc:"inline_expression"};return{getArrow:function(e){return t[e]},getShape:function(t){return e[t]},getStyle:function(t){return r[t]},getAggregate:function(t){return n[t]},getClass:function(t){return i[t]||t},getAggregateClass:function(t){return a[t]||t},getNormalizedKind:function(t){return o[t]||t}}}),r("lib/mscgenjs-core/render/text/textutensils",[],function(){"use strict";return{wrap:function(t,e){for(var r=0,n=[],o=0,i=0,a=0,c=0,u=t.replace(/[\t\n]+/g," ").replace(/\\n/g,"\n");c<=u.length;)c>=u.length?n.push(u.substring(o,c)):"\n"===u[c]?(r=0,a=c,n.push(u.substring(o,a)),o=a+1):r++>=e&&(a=u.substring(0,c).lastIndexOf(" "),-1===a||o>a?(r=1,a=c,i=c):(r=0,i=a+1),n.push(u.substring(o,a)),o=i),c++;return n},unescapeString:function(t){return t.replace(/\\\"/g,'"')},escapeString:function(t){return t.replace(/\\\"/g,'"').replace(/\"/g,'\\"')}}}),r("lib/mscgenjs-core/render/text/flatten",["./asttransform","./arcmappings","../../lib/lodash/lodash.custom","./textutensils"],function(t,e,r,n){"use strict";function o(t){void 0===t.label&&(t.label=t.name)}function i(t){t.label&&(t.label=n.unescapeString(t.label)),t.id&&(t.id=n.unescapeString(t.id))}function a(t){t.label=t.label?t.label:""}function c(t){if(t.kind&&e.getNormalizedKind(t.kind)!==t.kind){t.kind=e.getNormalizedKind(t.kind);var r=t.from;t.from=t.to,t.to=r}return t}function u(t,e){!t.linecolor&&e.arclinecolor&&(t.linecolor=e.arclinecolor),!t.textcolor&&e.arctextcolor&&(t.textcolor=e.arctextcolor),!t.textbgcolor&&e.arctextbgcolor&&(t.textbgcolor=e.arctextbgcolor)}function s(t,e){if(t&&t.from){var r=e.filter(function(e){return e.name===t.from});r.length>0&&u(t,r[0])}}function l(t){return t.arcs.reduce(function(t,e){return t+(e[0].arcs?l(e[0])+1:0)},t.arcs.length)}function p(t,n,o,i,a){var c={};"inline_expression"===e.getAggregate(t[0].kind)?(c=r.cloneDeep(t[0]),c.arcs?(c.numberofrows=l(c),delete c.arcs,n.arcs.push([c]),t[0].arcs.forEach(function(t){p(t,n,o+1,c.from,c.to),t.forEach(function(t){u(t,c)})}),o>g&&(g=o)):n.arcs.push([c]),n.arcs.push([{kind:"|||",from:c.from,to:c.to}]),c.depth=o):(i&&a&&t.filter(function(t){return"emptyarc"===e.getAggregate(t.kind)}).forEach(function(t){t.from=i,t.to=a,t.depth=o}),n.arcs.push(t))}function f(t){var e={};return g=0,t.options&&(e.options=r.cloneDeep(t.options)),t.entities&&(e.entities=r.cloneDeep(t.entities)),e.arcs=[],t&&t.arcs&&t.arcs.forEach(function(t){p(t,e,0)}),e.depth=g+1,e}function d(t,e){return t.filter(function(t){return e.from!==t.name}).map(function(t){return e.to=t.name,r.cloneDeep(e)})}function h(t){if(t.entities&&t.arcs){var e=[],n={};t.arcs.forEach(function(o,i){o.filter(function(t){return"*"===t.to}).forEach(function(a,c){n=r.cloneDeep(a),delete t.arcs[i][c],e=d(t.entities,n),o[c]=e.shift(),t.arcs[i]=o.concat(e)})})}return t}var g=0;return{swapRTLArc:c,unwind:f,explodeBroadcasts:h,flatten:function(e){return t.transform(f(e),[o,i],[c,s,i,a])},dotFlatten:function(e){return h(t.transform(e,[o],[c,s]))}}}),r("lib/mscgenjs-core/render/graphics/swap",[],function(){"use strict";function t(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}return{swapfromto:function(e){t(e,"from","to")}}}),r("lib/mscgenjs-core/render/graphics/rowmemory",[],function(){"use strict";function t(t,e){o=[],i=t,a=e}function e(t){return o[t]?o[t]:{y:i+1.5*a+t*a,height:a}}function r(){return e(o.length-1)}function n(t,r,n){if((void 0===r||a>r)&&(r=a),void 0===n){var i=e(t-1);i&&i.y>0&&(n=i.y+(i.height+r)/2)}o[t]={y:n,height:r}}var o=[],i=0,a=0;return{clear:t,get:e,getLast:r,set:n}}),r("lib/mscgenjs-core/render/graphics/markermanager",["../../lib/lodash/lodash.custom","../text/arcmappings"],function(t,e){"use strict";function r(t,e,r){return e&&r&&["<->","->"].indexOf(t>-1)?r>e?"signal":"signal-u":void 0}function n(t,e,r){return"<->"===t&&r>=e?"signal-l":"signal-lu"}function o(t,e,o,i,a){var c=[];return s[e]&&s[e].attributes&&(c=s[e].attributes.map(function(c){return{name:c.name,value:c.value.replace(/\{\{signal-marker-end\}\}/g,r(e,i,a)).replace(/\{\{signal-marker-start\}\}/g,n(e,i,a)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,o||"black")}})),c}function i(t,r){return s[e.getNormalizedKind(t)].marker.name+(r?" "+r:" black")}function a(t,r){function n(e){a(t,e)}return Array.isArray(r)&&r.forEach(n),r.arcs&&r.arcs.forEach(n),r.kind&&s[e.getNormalizedKind(r.kind)]&&s[e.getNormalizedKind(r.kind)].marker&&t.indexOf(i(r.kind,r.linecolor))<0&&t.push(i(r.kind,r.linecolor)),t}function c(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}function u(t){return t.arcs.reduce(a,[]).sort().map(c)}var s={"->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"}],marker:{name:"signal"}},"<->":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}{{signal-marker-end}}-{{color}})"},{name:"marker-start",value:"url(#{{id}}{{signal-marker-start}}-{{color}})"}],marker:{name:"signal"}},"=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<=>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},">>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"}],marker:{name:"callback",end:""}},"<<>>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}callback-{{color}})"},{name:"marker-start",value:"url(#{{id}}callback-l-{{color}})"}],marker:{name:"callback",end:"",start:"-l"}},"..":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"--":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"==":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"::":{attributes:[{name:"style",value:"stroke:{{color}}"}]},"=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<=>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},":>":{attributes:[{name:"style",value:"stroke:{{color}};"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"}],marker:{name:"method",end:""}},"<:>":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}method-{{color}})"},{name:"marker-start",value:"url(#{{id}}method-l-{{color}})"}],marker:{name:"method",end:"",start:"-l"}},"-x":{attributes:[{name:"style",value:"stroke:{{color}}"},{name:"marker-end",value:"url(#{{id}}lost-{{color}})"}],marker:{name:"lost",end:""}}},l={signal:{variants:[{name:"",path:"M9,3 l-8, 2"},{name:"-u",path:"M9,3 l-8,-2"},{name:"-l",path:"M9,3 l 8, 2"},{name:"-lu",path:"M9,3 l 8,-2"}]},method:{variants:[{name:"",path:"1,1 9,3 1,5"},{name:"-l",path:"17,1 9,3 17,5"}]},callback:{variants:[{name:"",path:"M 1,1 l 8,2 l-8,2"},{name:"-l",path:"M17,1 l-8,2 l 8,2"}]},lost:{variants:[{name:"",path:"M7,0 l5,6 M7,6 l5,-6"}]}};return{getAttributes:o,getMarkerDefs:function(e,r){return t.flatten(u(r).map(function(t){return l[t.kind].variants.map(function(r){return{name:e+t.kind+r.name+"-"+t.color,path:r.path,color:t.color,type:t.kind}})}))}}}),r("lib/mscgenjs-core/render/graphics/renderlabels",["./svgelementfactory","./svgutensils","./constants","../text/textutensils","../text/arcmappings"],function(t,e,r,n,o){"use strict";function i(t,e){e&&t.setAttribute("style","fill:"+e+";")}function a(t,e,r){i(t,e&&!r?"blue":r)}function c(r,n){var o=t.createRect(e.getBBox(r),"label-text-background");return n&&o.setAttribute("style","fill:"+n+"; stroke:"+n+";"),o}function u(e,r,n,o,i,a){var c={};return c=0===e?t.createText(r,{x:n,y:o},i,a.url,a.id,a.idurl):t.createText(r,{x:n,y:o},i,a.url)}function s(t,e,r){var n=e||t,i=o.getClass(n),a=o.getAggregateClass(n);return i===a?i+r:a+r+i+r}function l(t,n,o,c,l,p){var f=o+(l+.25)*e.calculateTextHeight(),d="";d=s(c.kind,p&&p.kind,"-text "),p&&(p.alignLeft&&(d+="anchor-start "),p.alignAround&&(f=o+(l+.25)*(e.calculateTextHeight()+r.LINE_WIDTH)));var h=u(l,t,n,f,d,c);return i(h,c.textcolor),a(h,c.url,c.textcolor),h}function p(n,o,i,a){var u=t.createGroup(a);if(n.label){var s=o.x+o.width/2,p=d(n.label,n.kind,o.width,r.FONT_SIZE,i?i.wordWrapArcs:!1),f={};i&&i.alignAbove&&p.forEach(function(){p.push("")});var h=o.y-(p.length-1)/2*(e.calculateTextHeight()+1);i&&i.alignAround&&(1===p.length&&p.push(""),h=o.y-(p.length-1)/2*(e.calculateTextHeight()+r.LINE_WIDTH+1)),p.forEach(function(t,e){""!==t&&(f=l(t,s,h,n,e,i),i&&i.ownBackground&&u.appendChild(c(f,n.textbgcolor)),u.appendChild(f)),h++})}return u}function f(t,e){var r=Math.abs(t),n=12;return 160>=r?r/(e/n*8):320>=r?r/(e/n*6.4):480>=r?r/(e/n*5.9):r/(e/n*5.6)}function d(t,e,r,i,a){return"box"===o.getAggregate(e)||void 0===e||a?n.wrap(t,f(r,i)):t.split("\\n")}return{createLabel:p,splitLabel:d}}),r("lib/mscgenjs-core/render/graphics/entities",["./renderlabels","./constants"],function(t,e){"use strict";function r(t){p.interEntitySpacing=u,p.height=l,p.width=s,t&&t.hscale&&(p.interEntitySpacing=t.hscale*u,p.width=t.hscale*s),f={}}function n(t,e){return{from:o(t),to:o(e)}}function o(t){return f[t]}function i(t,e){f[t.name]=e+p.width/2;
+}function a(){return p}function c(t){p.height=t}var u=160,s=100,l=34,p={interEntitySpacing:u,height:l,width:s},f={};return{init:r,getX:o,setX:i,getOAndD:n,setHeight:c,getDims:a,getNoEntityLines:function(r){return t.splitLabel(r,"box",p.width,e.FONT_SIZE).length}}}),r("lib/mscgenjs-core/render/graphics/renderast",["./svgelementfactory","./svglowlevelfactory","./svgutensils","./renderutensils","./renderskeleton","../text/flatten","../text/arcmappings","./swap","./rowmemory","./idmanager","./markermanager","./entities","./renderlabels","./constants"],function(t,e,r,n,o,i,a,c,u,s,l,p,f,d){"use strict";function h(t,e,n,o,a){var c=i.flatten(t);g(c,e,n,o,a),b(c),m(c);var u=o.document.getElementById(n);return u?r.webkitNamespaceBugWorkaround(u.innerHTML):r.webkitNamespaceBugWorkaround(o.document.body.innerHTML)}function g(t,e,n,i,a){s.setPrefix(n),$.document=o.bootstrap(n,s.get(),l.getMarkerDefs(s.get(),t),a,i),r.init($.document),y($,t.depth),w($,t.options),C($,e)}function b(t){T(t.entities),u.clear(p.getDims().height,$.arcRowHeight),D(t.arcs,t.entities)}function m(t){var e=k(t);A($,e),E(t.options,e),L(e)}function y(t,e){v(t.layer,t.document),t.maxDepth=e?e:0}function v(t,e){t.defs=e.getElementById(s.get("__defs")),t.lifeline=e.getElementById(s.get("__lifelinelayer")),t.sequence=e.getElementById(s.get("__sequencelayer")),t.notes=e.getElementById(s.get("__notelayer")),t.inline=e.getElementById(s.get("__arcspanlayer")),t.watermark=e.getElementById(s.get("__watermark"))}function x(t,e){t.arcRowHeight=V,t.arcGradient=K,t.wordWrapArcs=!1,e&&(e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+V,t.arcGradient=parseInt(e.arcgradient,10)+K),e.wordwraparcs&&(t.wordWrapArcs=e.wordwraparcs))}function w(t,e){p.init(e),x(t,e)}function C(t,e){if(e){var r=t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n"+e);t.document.getElementById(s.get("__msc_source")).appendChild(r)}}function k(t){var e=n.determineDepthCorrection(t.depth,d.LINE_WIDTH),r=u.getLast(),o={width:t.entities.length*p.getDims().interEntitySpacing+e,height:r.y+r.height/2+2*P,horizontaltransform:(p.getDims().interEntitySpacing+e-p.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:P,scale:1};return o.x=0-o.horizontaltransform,o.y=0-o.verticaltransform,o}function A(e,r){var n=t.createRect(r,"bglayer");e.document.getElementById(s.get("__background")).appendChild(n)}function _(e,r){$.layer.watermark.appendChild(t.createDiagonalText(e,r,"watermark"))}function E(t,e){t&&(t.watermark&&_(t.watermark,e),t.width&&"auto"!==t.width&&n.scaleCanvasToWidth(t.width,e))}function L(t){var r=$.document.getElementById(s.get()),n=$.document.getElementById(s.get("__body"));n.setAttribute("transform","translate("+t.horizontaltransform+","+t.verticaltransform+") scale("+t.scale+","+t.scale+")"),t.autoscale&&t.autoscale===!0?e.setAttributes(r,{width:"100%",height:"100%",viewBox:"0 0 "+t.width.toString()+" "+t.height.toString()}):e.setAttributes(r,{width:t.width.toString(),height:t.height.toString()})}function S(t){var e=t[0],n=2;return t.forEach(function(t){var r=p.getNoEntityLines(t.label);r>n&&(n=r,e=t)}),n>2?Math.max(p.getDims().height,r.getBBox(j(e)).height):p.getDims().height}function j(e){var r=t.createGroup(s.get(e.name)),n=p.getDims(),o=f.createLabel(e,{x:0,y:n.height/2,width:n.width},{kind:"entity"}),i=t.createRect(n,"entity",e.linecolor,e.textbgcolor);return r.appendChild(i),r.appendChild(o),r}function I(e,r){$.layer.defs.appendChild(j(e)),$.layer.sequence.appendChild(t.createUse({x:r,y:0},s.get(e.name)))}function T(t){var e=0;t&&(p.setHeight(S(t)+2*d.LINE_WIDTH),t.forEach(function(t){I(t,e),p.setX(t,e),e+=p.getDims().interEntitySpacing})),$.arcEndX=e-p.getDims().interEntitySpacing+p.getDims().width}function N(e,n,o){var i=!1,c=[];u.set(n),e.forEach(function(t,e){var l,h=s.get(n.toString()+"_"+e.toString());switch(a.getAggregate(t.kind)){case"emptyarc":l=B(t,h),i="..."===t.kind,c.push({id:h,layer:$.layer.sequence});break;case"box":l=z(h,p.getOAndD(t.from,t.to),t),c.push({id:h,layer:$.layer.notes});break;case"inline_expression":l=R(h+"_label",t),c.push({id:h+"_label",layer:$.layer.notes}),Z.push({id:h,arc:t,rownum:n});break;default:if(t.from&&t.to){var g=0,b=0;if("*"===t.to){var m=t.label;b=p.getX(t.from),o.forEach(function(e,r){e.name!==t.from&&(g=p.getX(e.name),t.label="",$.layer.defs.appendChild(G(h+"bc"+r,t,b,g)),c.push({id:h+"bc"+r,layer:$.layer.sequence}))}),t.label=m,l=f.createLabel(t,{x:0,y:0,width:$.arcEndX},{alignAround:!0,ownBackground:!0,wordWrapArcs:$.wordWrapArcs},h+"_lbl"),c.push({id:h+"_lbl",layer:$.layer.sequence})}else l=G(h,t,p.getX(t.from),p.getX(t.to)),c.push({id:h,layer:$.layer.sequence})}}l&&(u.set(n,Math.max(u.get(n).height,r.getBBox(l).height+2*d.LINE_WIDTH)),$.layer.defs.appendChild(l))});var l="arcrow_"+n.toString(),h="arcrow";i&&(h="arcrowomit"),$.layer.defs.appendChild(O(o,h,u.get(n).height,s.get(l))),$.layer.lifeline.appendChild(t.createUse({x:0,y:u.get(n).y},s.get(l))),c.forEach(function(e){e.layer.appendChild(t.createUse({x:0,y:u.get(n).y},e.id))})}function D(e,r){if(Z=[],$.layer.defs.appendChild(O(r,s.get("arcrow"))),$.layer.lifeline.appendChild(t.createUse({x:0,y:u.get(-1).y},s.get("arcrow"))),e){for(var n=0;no.to&&c.swapfromto(o);var a=o.to-o.from+(p.getDims().interEntitySpacing-2*d.LINE_WIDTH)-i-d.LINE_WIDTH,u=o.from-(p.getDims().interEntitySpacing-3*d.LINE_WIDTH)/2-2*($.maxDepth-n.depth)*d.LINE_WIDTH,s=t.createGroup(e);n.label=n.kind+(n.label?": "+n.label:"");var l=f.createLabel(n,{x:u+d.LINE_WIDTH-a/2,y:$.arcRowHeight/4,width:a},{alignLeft:!0,ownBackground:!1,wordWrapArcs:$.wordWrapArcs}),h=r.getBBox(l),g=Math.max(h.height+2*d.LINE_WIDTH,$.arcRowHeight/2-2*d.LINE_WIDTH),b=Math.min(h.width+2*d.LINE_WIDTH,a),m=t.createEdgeRemark({width:b-d.LINE_WIDTH+i,height:g,x:u,y:0},"box inline_expression_label",n.linecolor,n.textbgcolor,i);return s.appendChild(m),s.appendChild(l),s}function H(e){e.forEach(function(e){$.layer.defs.appendChild(W(e)),$.layer.inline.appendChild(t.createUse({x:0,y:u.get(e.rownum).y},e.id))})}function W(t){var e=u.get(t.rownum).y,r=u.get(t.rownum+t.arc.numberofrows+1).y,n=r-e;return t.arc.label="",z(t.id,p.getOAndD(t.arc.from,t.arc.to),t.arc,n)}function O(e,r,n,o){o||(o=r),(!n||n<$.arcRowHeight)&&(n=$.arcRowHeight);var i=t.createGroup(o);return e.forEach(function(e){var o=t.createLine({xFrom:p.getX(e.name),yFrom:0-n/2,xTo:p.getX(e.name),yTo:n/2},r);e.linecolor&&o.setAttribute("style","stroke:"+e.linecolor+";"),i.appendChild(o)}),i}function F(e,r,n,o,i){var c=2*($.arcRowHeight/5),u=p.getDims().interEntitySpacing/2,f={},h="arc "+a.getAggregateClass(e)+" "+a.getClass(e);if(o){f=t.createGroup();var g=t.createUTurn({x:r,y:c/2},n+c-2*d.LINE_WIDTH,u-2*d.LINE_WIDTH,h,"::"!==e),b=t.createUTurn({x:r,y:c/2},n+c-d.LINE_WIDTH,u),m=t.createUTurn({x:r,y:c/2},n+c,u,h,"::"!==e);i&&g.setAttribute("style","stroke:"+i),l.getAttributes(s.get(),e,i,r,r).forEach(function(t){b.setAttribute(t.name,t.value)}),b.setAttribute("style","stroke:transparent;"),i&&m.setAttribute("style","stroke:"+i),f.appendChild(g),f.appendChild(m),f.appendChild(b),f.setAttribute("class",h)}else f=t.createUTurn({x:r,y:c/2},n+c,u,h,"-x"===e),l.getAttributes(s.get(),e,i,r,r).forEach(function(t){f.setAttribute(t.name,t.value)});return f}function B(t,e){var r;switch(t.from&&t.to&&p.getX(t.from)>p.getX(t.to)&&c.swapfromto(t),t.kind){case"...":case"|||":r=X(e,t);break;case"---":r=q(e,t)}return r}function M(t){return t.arcskip?t.arcskip*$.arcRowHeight:0}function G(e,r,o,i){var c=t.createGroup(e),u="arc ";u+="<:>"===r.kind?"bidi ":"::"===r.kind?"nodi ":"",u+=a.getAggregateClass(r.kind)+" "+a.getClass(r.kind);var h=[":>","::","<:>"].indexOf(r.kind)>-1,g=M(r),b=0===g?$.arcGradient:g;if(i=n.determineArcXTo(r.kind,o,i),o===i){c.appendChild(F(r.kind,o,g,h,r.linecolor));var m=2*p.getDims().interEntitySpacing/3;c.appendChild(f.createLabel(r,{x:o+1.5*d.LINE_WIDTH-m/2,y:0-$.arcRowHeight/5-d.LINE_WIDTH/2,width:m},{alignLeft:!0,alignAbove:!0,ownBackground:!0,wordWrapArcs:$.wordWrapArcs}))}else{var y=t.createLine({xFrom:o,yFrom:0,xTo:i,yTo:b},u,h);l.getAttributes(s.get(),r.kind,r.linecolor,o,i).forEach(function(t){y.setAttribute(t.name,t.value)}),c.appendChild(y),c.appendChild(f.createLabel(r,{x:o,y:0,width:i-o},{alignAround:!0,ownBackground:!0,wordWrapArcs:$.wordWrapArcs}))}return c}function X(e,r){var n=0,o=$.arcEndX,i=t.createGroup(e);return r.from&&r.to&&(n=p.getX(r.from),o=Math.abs(p.getX(r.to)-p.getX(r.from))),i.appendChild(f.createLabel(r,{x:n,y:0,width:o},{ownBackground:!0,wordWrapArcs:$.wordWrapArcs},e+"_lbl")),i}function q(e,r){var n=0,o=$.arcEndX,i="comment",a=t.createGroup(e);if(r.from&&r.to){var c=2*($.maxDepth-r.depth)*d.LINE_WIDTH;n=p.getX(r.from)-(p.getDims().interEntitySpacing+2*d.LINE_WIDTH)/2-c,o=p.getX(r.to)+(p.getDims().interEntitySpacing+2*d.LINE_WIDTH)/2+c,i="inline_expression_divider"}var u=t.createLine({xFrom:n,yFrom:0,xTo:o,yTo:0},i);return a.appendChild(u),a.appendChild(X(e+"_txt",r)),r.linecolor&&u.setAttribute("style","stroke:"+r.linecolor+";"),a}function z(e,n,o,i){n.from>n.to&&c.swapfromto(n);var a,u=n.to-n.from+p.getDims().interEntitySpacing-2*d.LINE_WIDTH,s=6,l=n.from-(p.getDims().interEntitySpacing-2*d.LINE_WIDTH)/2,h=t.createGroup(e),g=f.createLabel(o,{x:l,y:0,width:u}),b=r.getBBox(g),m=i?i:Math.max(b.height+2*d.LINE_WIDTH,$.arcRowHeight-2*d.LINE_WIDTH),y={width:u,height:m,x:l,y:0-m/2};switch(o.kind){case"box":a=t.createRect(y,"box",o.linecolor,o.textbgcolor);break;case"rbox":a=t.createRect(y,"box rbox",o.linecolor,o.textbgcolor,s,s);break;case"abox":y.y=0,a=t.createABox(y,"box abox",o.linecolor,o.textbgcolor);break;case"note":a=t.createNote(y,"box note",o.linecolor,o.textbgcolor);break;default:var v=2*($.maxDepth-o.depth)*d.LINE_WIDTH;a=t.createRect({width:u+2*v,height:m,x:l-v,y:0},"box inline_expression "+o.kind,o.linecolor,o.textbgcolor)}return h.appendChild(a),h.appendChild(g),h}function U(t,e){$.document=o.init(e),r.init($.document),r.removeRenderedSVGFromElement(t)}var P=3,V=38,K=0,$={arcRowHeight:V,arcGradient:K,arcEndX:0,wordWrapArcs:!1,maxDepth:0,document:{},layer:{defs:{},lifeline:{},sequence:{},notes:{},inline:{}}},Z=[];return{clean:U,renderAST:h}}),r("utl/exporter",[],function(){"use strict";function t(t,e,r){return t.pathname+"?lang="+r+"&msc="+encodeURIComponent(e)}function e(e,n,o){return t(e,n,o).lengtho;o++)r=" "+r;return r}function r(t,r){return e(r,3)+" "+t}function n(e,r){return e.split("").reduce(function(e,n,i){return i===r?e+t.applyTemplate(u,{"char":o(n)}):e+o(n)},"")}function o(t){return t.replace(/# ERROR on line {line}, column {col} - {message}
",a="# ERROR {message}
",c="{line}\n",u="{char}";return{formatNumber:e,deHTMLize:o,renderError:function(e,u,s){var l=u?t.applyTemplate(i,{message:s,line:u.start.line,col:u.start.column}):t.applyTemplate(a,{message:s});return e.split("\n").reduce(function(e,i,a){return u&&a===u.start.line-1?e+t.applyTemplate(c,{line:r(n(i,u.start.column-1),a+1)}):e+o(r(i,a+1))+"\n"},l)+"
"}}}),r("utl/domutl",[],function(){"use strict";return{ajax:function(t,e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(t){t.target.readyState===XMLHttpRequest.DONE&&(200===n.status?e(t):r(t))},n.open("GET",t),n.responseType="text";try{n.send()}catch(o){r(o)}}}}),e(["lib/mscgenjs-core/parse/xuparser","lib/mscgenjs-core/parse/msgennyparser","lib/mscgenjs-core/render/graphics/renderast","utl/exporter","embedding/config","embedding/error-rendering","utl/domutl","utl/tpl"],function(t,e,r,n,o,i,a,c){"use strict";function u(){s();var t=document.getElementsByClassName("mscgen_js");l(t,0),l(document.getElementsByTagName("mscgen"),t.length)}function s(){for(var t=document.scripts,e=0;e{string}",{string:e})}function d(t,e){b(t,e),t.setAttribute("data-renderedby","mscgen_js"),o.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?a.ajax(t.getAttribute("data-src"),function(e){h(t,e.target.response)},function(){f(t,c.applyTemplate(C,{url:t.getAttribute("data-src")}))}):!o.getConfig().loadFromSrcAttribute&&t.getAttribute("data-src")?f(t,c.applyTemplate(k,{url:t.getAttribute("data-src")})):h(t,t.textContent)}function h(t,e){var r=m(t),n=y(e,r);n.entities?v(n,t.id,e,r):t.innerHTML=i.renderError(e,n.location,n.message)}function g(t,e,r){var i={pathname:"index.html"},a=document.createElement("a");return a.setAttribute("href",o.getConfig().clickURL+n.toLocationString(i,t,e)),a.setAttribute("id",r+"link"),a.setAttribute("style","text-decoration: none;"),a.setAttribute("title","click to edit in the mscgen_js interpreter"),a}function b(t,e){t.id||(t.id=o.getConfig().parentElementPrefix+e.toString())}function m(t){var e=t.getAttribute("data-language");return e||(e=o.getConfig().defaultLanguage),e}function y(r,n){var o={};try{o="msgenny"===n?e.parse(r):"json"===n?JSON.parse(r):t.parse(r)}catch(i){return i}return o}function v(t,e,n,i){var a=document.getElementById(e);a.innerHTML="",!0===o.getConfig().clickable&&(a.appendChild(g(n,i,e)),e+="link"),r.clean(e,window),r.renderAST(t,n,e,window)}var x="{msc}",w="data-src='{src}' ",C="ERROR: Could not find or open the URL '{url}' specified in the data-src
attribute.",k="ERROR: Won't load the chart specified in data-src='{url}'
, because loading from separate files is switched off in the mscgen_js configuration.
See Loading charts from separate files in the mscgen_js embedding guide how to enable it.",A={"text/x-mscgen":"mscgen","text/x-msgenny":"msgenny","text/x-xu":"xu"};u()}),r("mscgen-inpage",function(){})}();
\ No newline at end of file
diff --git a/src/script/lib/mscgenjs-core/lib/lodash/lodash.custom.js b/src/script/lib/mscgenjs-core/lib/lodash/lodash.custom.js
index 8d803bb4..5e1d5a21 100644
--- a/src/script/lib/mscgenjs-core/lib/lodash/lodash.custom.js
+++ b/src/script/lib/mscgenjs-core/lib/lodash/lodash.custom.js
@@ -1,7 +1,7 @@
/**
* @license
- * lodash 4.9.0 (Custom Build)
- * Build: `lodash exports="umd" include="memoize,cloneDeep,flatten,defaults,template" --development --output lib/lodash/lodash.custom.js`
+ * lodash 4.11.1 (Custom Build)
+ * Build: `lodash exports="umd" include="memoize,cloneDeep,flatten,defaults" --development --output lib/lodash/lodash.custom.js`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
* Based on Underscore.js 1.8.3
@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
- var VERSION = '4.9.0';
+ var VERSION = '4.11.1';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -60,20 +60,6 @@
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
- /** Used to match HTML entities and HTML characters. */
- var reUnescapedHtml = /[&<>"'`]/g,
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g;
-
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
@@ -83,12 +69,6 @@
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
- /**
- * Used to match
- * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
- */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
@@ -107,15 +87,6 @@
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
-
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
-
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
@@ -132,32 +103,12 @@
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
- };
-
/** Used to determine if values are of the language type `Object`. */
var objectTypes = {
'function': true,
'object': true
};
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
@@ -269,26 +220,6 @@
return array;
}
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
-
/**
* Appends the elements of `values` to `array`.
*
@@ -352,22 +283,6 @@
return result;
}
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return arrayMap(props, function(key) {
- return object[key];
- });
- }
-
/**
* Checks if `value` is a global object.
*
@@ -379,28 +294,6 @@
return (value && value.Object === Object) ? value : null;
}
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
- }
-
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
-
/**
* Checks if `value` is a host object in IE < 9.
*
@@ -546,8 +439,7 @@
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/*------------------------------------------------------------------------*/
@@ -631,7 +523,7 @@
* `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
* `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
* `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
- * `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,
+ * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
* `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
* `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
* `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
@@ -670,67 +562,6 @@
// No operation performed.
}
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type {Object}
- */
- lodash.templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- '_': lodash
- }
- };
-
/*------------------------------------------------------------------------*/
/**
@@ -1501,24 +1332,10 @@
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object) {
- return copyObjectWith(source, props, object);
- }
-
- /**
- * This function is like `copyObject` except that it accepts a function to
- * customize copied values.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
- function copyObjectWith(source, props, object, customizer) {
+ function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
@@ -2197,33 +2014,6 @@
return value instanceof Buffer;
};
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object,
- * else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- if (!isObjectLike(value)) {
- return false;
- }
- return (objectToString.call(value) == errorTag) ||
- (typeof value.message == 'string' && typeof value.name == 'string');
- }
-
/**
* Checks if `value` is classified as a `Function` object.
*
@@ -2495,42 +2285,6 @@
: (reIsBadHex.test(value) ? NAN : +value);
}
- /**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (value == null) {
- return '';
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
/*------------------------------------------------------------------------*/
/**
@@ -2562,7 +2316,7 @@
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObjectWith(source, keysIn(source), object, customizer);
+ copyObject(source, keysIn(source), object, customizer);
});
/**
@@ -2683,290 +2437,6 @@
/*------------------------------------------------------------------------*/
- /**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value. See
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the
- * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
- *
- * When working with HTML you should always
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
- * XSS vectors.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is given, it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options={}] The options object.
- * @param {RegExp} [options.escape=_.templateSettings.escape]
- * The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
- * The "evaluate" delimiter.
- * @param {Object} [options.imports=_.templateSettings.imports]
- * An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
- * The "interpolate" delimiter.
- * @param {string} [options.sourceURL='lodash.templateSources[n]']
- * The sourceURL of the compiled template.
- * @param {string} [options.variable='obj']
- * The data object variable name.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // Use the "interpolate" delimiter to create a compiled template.
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // Use the HTML "escape" delimiter to escape data property values.
- * var compiled = _.template('<%- value %>');
- * compiled({ 'value': '