diff --git a/.c8rc.json b/.c8rc.json index c0460330..716182ce 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -1,7 +1,7 @@ { "checkCoverage": true, "statements": 99.3, - "branches": 89.6, + "branches": 89.5, "functions": 98.5, "lines": 99.3, "exclude": ["{src/render/graphics/styling,src/render/graphics/svgelementfactory/wobbly,src/parse/*parser.js,test/**/*,tools/**/*}"], diff --git a/dist/bundle/index.min.js b/dist/bundle/index.min.js index f64f7cc7..47c01b1d 100644 --- a/dist/bundle/index.min.js +++ b/dist/bundle/index.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mscgenjs=e():t.mscgenjs=e()}(self,(()=>(()=>{var t={1549:(t,e,r)=>{var n=r(2032),o=r(3862),i=r(6721),a=r(2749),c=r(5749);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(3702),o=r(80),i=r(4739),a=r(8655),c=r(1175);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(6110)(r(9325),"Map");t.exports=n},3661:(t,e,r)=>{var n=r(3040),o=r(7670),i=r(289),a=r(4509),c=r(2949);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(9325).Symbol;t.exports=n},6025:(t,e,r)=>{var n=r(5288);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},2552:(t,e,r)=>{var n=r(1873),o=r(659),i=r(9350),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},5083:(t,e,r)=>{var n=r(1882),o=r(7296),i=r(3805),a=r(7473),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,f=s.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?d:c).test(a(t))}},5481:(t,e,r)=>{var n=r(9325)["__core-js_shared__"];t.exports=n},4840:(t,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},2651:(t,e,r)=>{var n=r(4218);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},6110:(t,e,r)=>{var n=r(5083),o=r(392);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},659:(t,e,r)=>{var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),r=t[c];try{t[c]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[c]=r:delete t[c]),o}},392:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},2032:(t,e,r)=>{var n=r(1042);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},6721:(t,e,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},2749:(t,e,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},5749:(t,e,r)=>{var n=r(1042);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},4218:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7296:(t,e,r)=>{var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},3702:t=>{t.exports=function(){this.__data__=[],this.size=0}},80:(t,e,r)=>{var n=r(6025),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},4739:(t,e,r)=>{var n=r(6025);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},8655:(t,e,r)=>{var n=r(6025);t.exports=function(t){return n(this.__data__,t)>-1}},1175:(t,e,r)=>{var n=r(6025);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},3040:(t,e,r)=>{var n=r(1549),o=r(79),i=r(8223);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},7670:(t,e,r)=>{var n=r(2651);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},289:(t,e,r)=>{var n=r(2651);t.exports=function(t){return n(this,t).get(t)}},4509:(t,e,r)=>{var n=r(2651);t.exports=function(t){return n(this,t).has(t)}},2949:(t,e,r)=>{var n=r(2651);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},1042:(t,e,r)=>{var n=r(6110)(Object,"create");t.exports=n},9350:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},9325:(t,e,r)=>{var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},7473:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5288:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},1882:(t,e,r)=>{var n=r(2552),o=r(3805);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},3805:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},104:(t,e,r)=>{var n=r(3661);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,t.exports=o},8156:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextRenderer=e.getGraphicsRenderer=e.getParser=e.getAllowedValues=e.version=void 0,e.renderMsc=function(t,e,r){a.renderMsc(t,e||{},r,c.getParser,c.getGraphicsRenderer)},e.translateMsc=function(t,e){return a.translateMsc(t,e||{},c.getParser,c.getTextRenderer)};var a=i(r(8672)),c=i(r(8903));e.version=a.version,e.getAllowedValues=a.getAllowedValues,e.getParser=c.getParser,e.getGraphicsRenderer=c.getGraphicsRenderer,e.getTextRenderer=c.getTextRenderer},7426:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2006);e.default=Object.freeze({inputType:[{name:"mscgen",experimental:!1},{name:"msgenny",experimental:!1},{name:"xu",experimental:!1},{name:"json",experimental:!1},{name:"ast",experimental:!1}],outputType:[{name:"mscgen",experimental:!1},{name:"msgenny",experimental:!1},{name:"xu",experimental:!1},{name:"json",experimental:!1},{name:"ast",experimental:!1},{name:"dot",experimental:!1},{name:"doxygen",experimental:!1}],regularArcTextVerticalAlignment:[{name:"above",experimental:!0},{name:"middle",experimental:!1},{name:"below",experimental:!0}],namedStyle:n.namedStyles.map((function(t){return{name:t.name,description:t.description,experimental:t.experimental,deprecated:t.deprecated}}))})},8672:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.renderMsc=function(t,e,r,n,o){var a=(0,i.default)(e,t);try{u(r,null,o().render(c(t,a.inputType,n),a.window,a.elementId,{source:a.source,styleAdditions:a.styleAdditions,additionalTemplate:a.additionalTemplate,mirrorEntitiesOnBottom:a.mirrorEntitiesOnBottom,regularArcTextVerticalAlignment:a.regularArcTextVerticalAlignment}))}catch(t){u(r,t)}},e.translateMsc=function(t,e,r,n){var o=Object.assign({inputType:"mscgen",outputType:"json"},e);return"ast"===o.outputType?r(o.inputType).parse(t):"json"===o.outputType?JSON.stringify(r(o.inputType).parse(t),null," "):n(o.outputType).render(c(t,o.inputType,r))},e.getAllowedValues=function(){return o.default};var o=n(r(7426)),i=n(r(7729)),a=r(8163);function c(t,e,r){return function(t,e){return"json"===e&&"object"==typeof t}(t,e)?t:r(e).parse(t)}function u(t,e,r){Boolean(t)&&(Boolean(e)?t(e,null):t(null,r))}e.version=a.version},7729:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(7426));function i(t,e,r){var n=r;return e.some((function(e){return e.name===t}))&&(n=t),n}function a(t,e){return"boolean"==typeof t?t:e}e.default=function(t,e){var r,n,c,u=a(t.includeSource,!0);return{inputType:(c=t.inputType,i(c,o.default.inputType,"mscgen")),elementId:t.elementId||"__svg",window:t.window||window,includeSource:u,source:u?e:null,styleAdditions:t.styleAdditions||null,additionalTemplate:(n=t.additionalTemplate,i(n,o.default.namedStyle,"basic")),mirrorEntitiesOnBottom:a(t.mirrorEntitiesOnBottom,!1),regularArcTextVerticalAlignment:(r=t.regularArcTextVerticalAlignment,i(r,o.default.regularArcTextVerticalAlignment,"middle"))}}},8903:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextRenderer=e.getGraphicsRenderer=e.getParser=void 0;var a=i(r(3688)),c=i(r(2592)),u=i(r(4626)),s=i(r(939)),l=i(r(2020)),f=i(r(5619)),d=i(r(3250)),h=i(r(2956)),p=i(r(6532)),g=a,b=d,m=Object.freeze({mscgen:a,xu:u,msgenny:c}),y=Object.freeze({mscgen:d,msgenny:h,xu:p,dot:l,doxygen:f});e.getParser=function(t){return["ast","json"].includes(t)?JSON:m[t]||g},e.getGraphicsRenderer=function(){return s},e.getTextRenderer=function(t){return y[t]||b}},2952:(t,e)=>{"use strict";function r(t,e){return void 0===e||"*"===e||t.some((function(t){return t.name===e}))}Object.defineProperty(e,"__esModule",{value:!0}),e.EntityNotDefinedError=void 0,e.nameValue2Option=function(t,e){var r={};return r[t.toLowerCase()]=e,r},e.flattenBoolean=function(t){return["true","on","1"].includes(t.toLowerCase())},e.entityExists=r,e.isMscGenKeyword=function(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"].includes(t)},e.checkForUndeclaredEntities=function t(e,o){(o||[]).forEach((function(o){o.forEach((function(o){if(o.from&&!r(e,o.from))throw new n(o.from,o);if(o.to&&!r(e,o.to))throw new n(o.to,o);o.arcs&&t(e,o.arcs)}))}))},e.getMetaInfo=function(t,e){var r=function(t){return!!t&&(t.hasOwnProperty("watermark")||t.hasOwnProperty("wordwrapentities")||t.hasOwnProperty("wordwrapboxes")||t.hasOwnProperty("width")&&"auto"===t.width)}(t),n=function(t){return(t||[]).some((function(t){return t.some((function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].includes(t.kind)}))}))}(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}};var n=function(t,e){this.name="EntityNotDefinedError",this.message=function(t,e){return"Entity '".concat(t,"' in arc '").concat(e.from," ").concat(e.kind," ").concat(e.to,"' is not defined.")}(t,e)};e.EntityNotDefinedError=n},7796:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.freeze({"|||":"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"});e.default=function(t){return r[t]}},4501:(t,e)=>{"use strict";function r(t,e,n){e.forEach((function(e){!function(t,e,n){e.forEach((function(o){!function(t,e,r,n){n.forEach((function(n){n(r,t,e)}))}(t,e,o,n),o.arcs&&r(t,o.arcs,n)}))}(t,e,n)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var o,i;return o=t.entities,i=e,o.forEach((function(t){i.forEach((function(e){e(t)}))})),t.arcs&&r(t.entities,t.arcs,n),t}},7635:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.nameAsLabel=h,e.swapRTLArc=b,e.overrideColors=y,e.normalize=w,e.flatten=function(t){return w((0,c.default)(t,[h,p],[b,y,p,g]))};var c=a(r(4501)),u=i(r(5383)),s=a(r(7796)),l=a(r(6788)),f=a(r(3498)),d=0;function h(t){void 0===t.label&&(t.label=t.name)}function p(t){t.label&&(t.label=u.unescapeString(t.label)),t.id&&(t.id=u.unescapeString(t.id))}function g(t){t.label=Boolean(t.label)?t.label:""}function b(t){if((0,l.default)(t.kind)!==t.kind){t.kind=(0,l.default)(t.kind);var e=t.from;t.from=t.to,t.to=e}}function m(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 y(t,e){if(void 0===e&&(e=[]),t&&t.from){var r=e.find((function(e){return e.name===t.from}));r&&m(t,r)}}function v(t){return t.arcs.reduce((function(t,e){return t+(Boolean(e[0].arcs)?v(e[0])+1:0)}),t.arcs.length)}function x(t,e,r,n){var o=[],i=[],a=[];return t.forEach((function(t){if(t.isVirtual=!1,"inline_expression"===(0,s.default)(t.kind)){if(t.depth=e,t.isVirtual=!0,t.arcs){var o=structuredClone(t);o.numberofrows=v(o),delete o.arcs,i.push(o),t.arcs.forEach((function(t){a=a.concat(x(t,e+1,o.from,o.to)),t.forEach((function(t){m(t,o)}))})),e>d&&(d=e)}else i.push(t);a.push([{kind:"|||",from:t.from,to:t.to,isVirtual:!0}])}else r&&n&&"empty"===(0,s.default)(t.kind)&&(t.from=r,t.to=n,t.depth=e),i.push(t)})),o.push(i),o.concat(a)}function w(t){return d=0,{options:(0,f.default)(t.options),entities:structuredClone(t.entities),arcs:(e=t.arcs,e?e.reduce((function(t,e){return t.concat(x(e,0))}),[]):[]),depth:d+1};var e}},6788:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.freeze({"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"});e.default=function(t){return r[t]||t}},3498:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return Object.assign({wordwraparcs:!1,wordwrapentities:!0,wordwrapboxes:!0},t||{})}},9370:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={LINE_WIDTH:2,FONT_SIZE:12}},4420:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Thing=void 0;var c=a(r(9370)),u=i(r(4772)),s=i(r(8912)),l=i(r(2314)),f=function(){function t(t){this.interEntitySpacing=160,this.height=34,this.width=100,this.entityXHWM=0,this.entity2x={},t&&(this.interEntitySpacing=160*t,this.width=100*t)}return t.prototype.getX=function(t){return this.entity2x[t]},t.prototype.getDims=function(){return{interEntitySpacing:this.interEntitySpacing,height:this.height,width:this.width,entityXHWM:this.entityXHWM}},t.prototype.getOAndD=function(t,e){return{from:this.getX(t)this.getX(t)?this.getX(e):this.getX(t)}},t.prototype.renderEntities=function(t,e,r){var n=this,o=s.createGroup();return this.entityXHWM=0,this.height=this.getMaxEntityHeight(t,r)+2*c.default.LINE_WIDTH,t.forEach((function(t){o.appendChild(n.renderEntity(t,n.entityXHWM,e,r)),n.setX(t,n.entityXHWM),n.entityXHWM+=n.interEntitySpacing})),o},t.prototype.setX=function(t,e){this.entity2x[t.name]=e+this.width/2},t.prototype.getNoEntityLines=function(t,e,r){return u.splitLabel(t,"entity",this.width,e,r).length},t.prototype.sizeEntityBoxToLabel=function(t,e){var r=Math.min(l.getBBox(t).width+4*c.default.LINE_WIDTH,this.interEntitySpacing/3+e.width);return r>=e.width&&(e.x-=(r-e.width)/2,e.width=r),e},t.prototype.renderEntity=function(t,e,r,n){var o=s.createGroup(),i={x:e||0,y:r||0,width:this.width,height:this.height},a=u.createLabel(Object.assign({kind:"entity"},t),Object.assign({},i,{y:i.y+i.height/2}),n);return o.appendChild(s.createRect(this.sizeEntityBoxToLabel(a,i),{class:"entity",color:t.linecolor,bgColor:t.textbgcolor})),o.appendChild(a),o},t.prototype.getMaxEntityHeight=function(t,e){var r=this,n=t[0],o=2;return t.forEach((function(t){var i=r.getNoEntityLines(t.label,c.default.FONT_SIZE,e);i>o&&(o=i,n=t)})),o>2?Math.max(this.height,l.getBBox(this.renderEntity(n,0,0,e)).height):this.height},t}();e.Thing=f},5871:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setPrefix=function(t){n=r+t},e.get=function(t){return n+(t||"")};var r="mscgenjs",n=r},8475:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getClass=function(t){return i[t]||t},e.getAggregateClass=function(t){return(0,o.default)(t)||t};var o=n(r(7796)),i=Object.freeze({"|||":"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"})},7598:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getAttributes=function(t,e,r,n,o){var a=[];return i[e]&&i[e].attributes&&(a=i[e].attributes.map((function(i){return{name:i.name,value:i.value.replace(/\{\{signal-marker-end\}\}/g,c(e,n,o)).replace(/\{\{signal-marker-start\}\}/g,u(e,n,o)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,r||"black")}}))),a},e.getMarkerDefs=function(t,e){return function(t){return t.arcs.reduce(l,[]).sort().map(f)}(e).map((function(e){return a[e.kind].variants.map((function(r){return{name:"".concat(t+e.kind+r.name,"-").concat(e.color),path:r.path,color:e.color,type:e.kind}}))})).flat(1/0)};var o=n(r(6788)),i={"->":{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:""}}},a={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"}]}};function c(t,e,r){return e&&r&&["<->","->"].includes(t)?e"===t&&e<=r?"signal-l":"signal-lu"}function s(t,e){return i[(0,o.default)(t)].marker.name+(Boolean(e)?" "+e:" black")}function l(t,e){function r(e){l(t,e)}return Array.isArray(e)&&e.forEach(r),e.arcs&&e.arcs.forEach(r),e.kind&&i[(0,o.default)(e.kind)]&&i[(0,o.default)(e.kind)].marker&&!t.includes(s(e.kind,e.linecolor))&&t.push(s(e.kind,e.linecolor)),t}function f(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}},939:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.clean=void 0,e.render=function(t,e,r,n){var o=Object.freeze((0,u.flatten)(t)),i=function(t,e){return t.document.getElementById(e)||t.document.body}(e,r);return f.setPrefix(r),function(t,e,r,n){var o;A.document=g.bootstrap(e,r,f.get(),h.getMarkerDefs(f.get(),t),n),A.mirrorEntitiesOnBottom=n.mirrorEntitiesOnBottom,A.regularArcTextVerticalAlignment=n.regularArcTextVerticalAlignment,v.init(A.document),A.layers={lifeline:(o=A.document).getElementById(f.get("_lifelines")),sequence:o.getElementById(f.get("_sequence")),notes:o.getElementById(f.get("_notes")),inline:o.getElementById(f.get("_arcspans")),watermark:o.getElementById(f.get("_watermark"))},A.maxDepth=t.depth,function(t,e){x=new l.Thing(e&&e.hscale),function(t,e){t.arcRowHeight=_,t.arcGradient=C,t.wordWrapArcs=!1,e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+_,t.arcGradient=parseInt(e.arcgradient,10)+C),t.wordWrapArcs=Boolean(e.wordwraparcs)}(t,e)}(A,t.options)}(o,e,i,n||{}),function(t){var e,r,n;S(t.entities,0,t.options),m.clear(x.getDims().height,A.arcRowHeight),function(t,e,r){O=[],E(e,"arcrow",A.arcRowHeight,m.get(-1).y).forEach((function(t){A.layers.lifeline.appendChild(t)})),function(t,e,r){var n=0;t.forEach((function(t,o){t.every((function(t){return t.isVirtual}))?m.set(o,Math.max(m.get(o).height,L(t,e,r))):(m.set(o,Math.max(m.get(o).height,L(t,e,r)),n),n++)}))}(t,e,r),t.forEach((function(t,n){!function(t,e,r,n){var o="arcrow",i=[];t.forEach((function(t){var a={};switch((0,c.default)(t.kind)){case"empty":a=P(t,m.get(e).y),"..."===t.kind&&(o="arcrowomit"),i.push({layer:A.layers.sequence,element:a});break;case"box":a=D(x.getOAndD(t.from,t.to),t,m.get(e).y,n),i.push({title:t.title,layer:A.layers.notes,element:a});break;case"inline_expression":a=j(t,m.get(e).y),i.push({layer:A.layers.notes,element:a}),O.push({arc:t,rownum:e});break;default:a=k(t,r,i,e,n)}})),E(r,o,m.get(e).height,m.get(e).y).forEach((function(t){A.layers.lifeline.appendChild(t)})),i.forEach((function(t){t.element&&(t.title&&t.element.appendChild(y.createTitle(t.title)),t.layer.appendChild(t.element))}))}(t,n,e,r)})),O.forEach((function(t){var e,r,n,o;A.layers.inline.appendChild((e=t,r=m.get(t.rownum).y,n=m.get(e.rownum).y,o=m.get(e.rownum+e.arc.numberofrows+1).y-n,e.arc.label="",function(t,e,r,n){var o=2*A.maxDepth*s.default.LINE_WIDTH,i=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o,a=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o)/2,c=2*(A.maxDepth-e.depth)*s.default.LINE_WIDTH;return y.createRect({width:i+2*c,height:r||A.arcRowHeight-2*s.default.LINE_WIDTH,x:a-c,y:n},{class:"box inline_expression ".concat(e.kind),color:e.linecolor,bgColor:e.textbgcolor})}(x.getOAndD(e.arc.from,e.arc.to),e.arc,o,r)))}))}(t.arcs,t.entities,t.options),A.mirrorEntitiesOnBottom&&(e=t.entities,r=t.options,n=m.getLast().y+(m.getLast().height+A.arcRowHeight)/2,E(e,"arcrow",A.arcRowHeight,n).forEach((function(t){A.layers.lifeline.appendChild(t)})),S(e,n+A.arcRowHeight/2,r))}(o),function(t){var e,r,n=function(t){var e=b.determineDepthCorrection(t.depth,s.default.LINE_WIDTH),r=m.getLast(),n={width:t.entities.length*x.getDims().interEntitySpacing+e,height:Boolean(A.mirrorEntitiesOnBottom)?2*x.getDims().height+r.y+r.height+2*w:r.y+r.height/2+2*w,horizontaltransform:(x.getDims().interEntitySpacing+e-x.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:w,scale:1};return n.x=0-n.horizontaltransform,n.y=0-n.verticaltransform,n}(t);e=n,(r=A.document.getElementById(f.get("_background")))&&r.appendChild(y.createRect(e,{class:"bglayer"})),function(t){var e=A.document.getElementById(f.get()),r=A.document.getElementById(f.get("_body"));r&&e&&(r.setAttribute("transform","translate(".concat(t.horizontaltransform,",").concat(t.verticaltransform,") ")+"scale(".concat(t.scale,",").concat(t.scale,")")),t.autoscale&&!0===t.autoscale?y.updateSVG(e,{width:"100%",height:"100%",viewBox:"0 0 ".concat(t.width.toString()," ").concat(t.height.toString())}):y.updateSVG(e,{width:t.width.toString(),height:t.height.toString(),viewBox:"0 0 ".concat(t.width.toString()," ").concat(t.height.toString())}))}(n=function(t,e){return t.watermark&&function(t,e){A.layers.watermark.appendChild(y.createDiagonalText(t,e,"watermark"))}(t.watermark,e),t.width&&"auto"!==t.width&&(e=b.scaleCanvasToWidth(t.width,e)),e}(t.options,n))}(o),v.webkitNamespaceBugWorkaround(i.innerHTML)};var c=a(r(7796)),u=r(7635),s=a(r(9370)),l=r(4420),f=i(r(5871)),d=i(r(8475)),h=i(r(7598)),p=i(r(4772)),g=i(r(8780)),b=i(r(8340)),m=i(r(416)),y=i(r(8912)),v=i(r(2314)),x=new l.Thing(0),w=3,_=38,C=0,A=Object.seal({arcRowHeight:_,arcGradient:C,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,regularArcTextVerticalAlignment:"middle",maxDepth:0,document:{},layers:{lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),O=[];function S(t,e,r){A.layers.sequence.appendChild(x.renderEntities(t,e,r)),A.arcEndX=x.getDims().entityXHWM-x.getDims().interEntitySpacing+x.getDims().width}function k(t,e,r,n,o){var i=y.createGroup();return t.from&&t.to&&("*"===t.to?(function(t,e,r,n,o){var i=0,a=t.label,c=x.getX(t.from);t.label="",e.forEach((function(e){var a={};e.name!==t.from&&(i=x.getX(e.name),a=T(t,c,i,n,o),r.push({layer:A.layers.sequence,element:a}))})),t.label=a}(t,e,r,n,o),i=p.createLabel(t,{x:0,y:m.get(n).y,width:A.arcEndX},Object.assign({alignAround:!0,ownBackground:!0},structuredClone(o))),r.push({title:t.title,layer:A.layers.sequence,element:i})):(i=T(t,x.getX(t.from),x.getX(t.to),n,o),r.push({title:t.title,layer:A.layers.sequence,element:i}))),i}function L(t,e,r){var n=0;return t.forEach((function(t){var o;switch((0,c.default)(t.kind)){case"empty":o=P(t,0);break;case"box":o=D(x.getOAndD(t.from,t.to),t,0,r);break;case"inline_expression":o=j(t,0);break;default:var i=structuredClone(t);i.arcskip=0,o=k(i,e,[],0,r)}n=Math.max(n,v.getBBox(o).height+2*s.default.LINE_WIDTH)})),n}function j(t,e){var r=x.getOAndD(t.from,t.to),n=e>0,o=2*A.maxDepth*s.default.LINE_WIDTH,i=r.to-r.from+(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH)-7-s.default.LINE_WIDTH,a=r.from-(x.getDims().interEntitySpacing-3*s.default.LINE_WIDTH-o)/2-2*(A.maxDepth-t.depth)*s.default.LINE_WIDTH,c=y.createGroup();n||(t.label=t.kind+(t.label?": "+t.label:""));var u=p.createLabel(t,{x:a+s.default.LINE_WIDTH-i/2,y:e+A.arcRowHeight/4,width:i},{alignLeft:!0,ownBackground:!1,wordwraparcs:A.wordWrapArcs}),l=v.getBBox(u),f=Math.max(l.height+2*s.default.LINE_WIDTH,A.arcRowHeight/2-2*s.default.LINE_WIDTH),d=Math.min(l.width+2*s.default.LINE_WIDTH,i),h=y.createEdgeRemark({width:d-s.default.LINE_WIDTH+7,height:f,x:a,y:e},{class:"box inline_expression_label",color:t.linecolor,bgColor:t.textbgcolor,foldSize:7});return c.appendChild(h),c.appendChild(u),c}function E(t,e,r,n){return r","::","<:>"].includes(t.kind),l=function(t,e,r){var n=m.get(t).y+e;if(r){var o=Math.floor(r),i=r-o,a=m.get(t).realRowNumber;n=m.getByRealRowNumber(a+o).y+i*(m.getByRealRowNumber(a+o+1).y-m.getByRealRowNumber(a+o).y)}return n}(n,A.arcGradient,t.arcskip);if(e===(r=b.determineArcXTo(t.kind,e,r))){a.appendChild(function(t,e,r,n,o,i){var a=A.arcRowHeight/5*2,c=x.getDims().interEntitySpacing/2,u={},l="arc ".concat(d.getAggregateClass(t)," ").concat(d.getClass(t));if(n){u=y.createGroup();var p=y.createUTurn({x:e,y:o,width:c-2*s.default.LINE_WIDTH,height:a},o+r+a-2*s.default.LINE_WIDTH,{class:l,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH}),g=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a-s.default.LINE_WIDTH,{lineWidth:s.default.LINE_WIDTH}),b=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a,{class:l,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH});i&&p.setAttribute("style","stroke:".concat(i)),h.getAttributes(f.get(),t,i,e,e).forEach((function(t){g.setAttribute(t.name,t.value)})),g.setAttribute("style","stroke:transparent;"),Boolean(i)&&b.setAttribute("style","stroke:".concat(i)),u.appendChild(p),u.appendChild(b),u.appendChild(g),u.setAttribute("class",l)}else u=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a,{class:l,dontHitHome:"-x"===t,lineWidth:s.default.LINE_WIDTH}),h.getAttributes(f.get(),t,i,e,e).forEach((function(t){u.setAttribute(t.name,t.value)}));return u}(t.kind,e,l-m.get(n).y-A.arcGradient,u,m.get(n).y,t.linecolor));var g=2*x.getDims().interEntitySpacing/3;a.appendChild(p.createLabel(t,{x:e+1.5*s.default.LINE_WIDTH-g/2,y:m.get(n).y-A.arcRowHeight/5-s.default.LINE_WIDTH/2,width:g},Object.assign({alignLeft:!0,alignAbove:!0,ownBackground:!0},structuredClone(o))))}else{var v=y.createLine({xFrom:e,yFrom:m.get(n).y,xTo:r,yTo:l},{class:c,doubleLine:u});h.getAttributes(f.get(),t.kind,t.linecolor,e,r).forEach((function(t){v.setAttribute(t.name,t.value)})),a.appendChild(v),a.appendChild(p.createLabel(t,{x:e,y:m.get(n).y+(l-m.get(n).y)/2,width:r-e},Object.assign({alignAround:!0,alignAbove:"above"===A.regularArcTextVerticalAlignment,ownBackground:!0},structuredClone(o))))}return a}function M(t,e,r){var n=0,o=A.arcEndX;return t.from&&t.to&&(n=e.from,o=e.to-e.from),p.createLabel(t,{x:n,y:r,width:o},{ownBackground:!0,wordwraparcs:A.wordWrapArcs})}function D(t,e,r,n){var o,i=2*A.maxDepth*s.default.LINE_WIDTH,a=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i,c=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i)/2,u=y.createGroup(),l=p.createLabel(e,{x:c,y:r,width:a},n),f=v.getBBox(l),d=Math.max(f.height+2*s.default.LINE_WIDTH,A.arcRowHeight-2*s.default.LINE_WIDTH),h={width:a,height:d,x:c,y:r-d/2};switch(e.kind){case"rbox":o=y.createRBox(h,{class:"box rbox",color:e.linecolor,bgColor:e.textbgcolor});break;case"abox":o=y.createABox(h,{class:"box abox",color:e.linecolor,bgColor:e.textbgcolor});break;case"note":o=y.createNote(h,{class:"box note",color:e.linecolor,bgColor:e.textbgcolor,lineWidth:s.default.LINE_WIDTH});break;default:o=y.createRect(h,{class:"box",color:e.linecolor,bgColor:e.textbgcolor})}return u.appendChild(o),u.appendChild(l),u}e.clean=function(t,e){A.document=g.init(e),v.init(A.document),v.removeRenderedSVGFromElement(t)}},4772:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLabel=function(t,e,r,n){var o=f.createGroup(n);if(r=r||{},t.label){var i=e.x+e.width/2,a=function(t,e){return e.alignAbove&&t.forEach((function(){t.push("")})),e.alignAround&&1===t.length&&t.push(""),t}(p(t.label,t.kind,e.width,s.default.FONT_SIZE,r),r),c=function(t,e,r){return r.alignAround?e.y-(t.length-1)/2*(d.calculateTextHeight()+s.default.LINE_WIDTH+1):e.y-(t.length-1)/2*(d.calculateTextHeight()+1)}(a,e,r);a.forEach((function(e,n){if(""!==e){var a=function(t,e,r,n,o,i){var a,c,u,p=r+(o+1/4)*d.calculateTextHeight(),g=function(t,e){var r=t,n=l.getClass(r),o=l.getAggregateClass(r);return n===o?n+e:o+e+n+e}(n.kind,"-text ");return i.alignLeft&&(g+="anchor-start "),i.alignAround&&(p=r+(o+1/4)*(d.calculateTextHeight()+s.default.LINE_WIDTH)),a=h(function(t,e,r,n,o){var i=0===e?{class:n,url:o.url,id:o.id,idurl:o.idurl}:{class:n,url:o.url};return f.createText(t,r,i)}(t,o,{x:e,y:p},g,n),n.textcolor),c=n.url,u=n.textcolor,h(a,c&&!u?"blue":u)}(e,i,c,t,n,r);r.ownBackground&&o.appendChild((u=a,p=t.textbgcolor,g=f.createRect(d.getBBox(u),{class:"label-text-background"}),p&&g.setAttribute("style","fill:".concat(p,"; stroke:").concat(p,";")),g)),o.appendChild(a)}var u,p,g;c++}))}return o},e.splitLabel=p;var c=a(r(7796)),u=a(r(2900)),s=a(r(9370)),l=i(r(8475)),f=i(r(8912)),d=i(r(2314));function h(t,e){return e&&t.setAttribute("style","fill:".concat(e,";")),t}function p(t,e,r,n,o){return function(t,e){return function(t,e){return"box"===(0,c.default)(t)&&e}(t,e.wordwrapboxes)||function(t,e){return"entity"===t&&e}(t,e.wordwrapentities)||function(t,e){return"box"!==(0,c.default)(t)&&"entity"!==t&&e}(t,e.wordwraparcs)||void 0===t}(e,o)?(0,u.default)(t,function(t,e){var r=Math.abs(t);return r<=160?r/(e/12*8):r<=320?r/(e/12*6.4):r<=480?r/(e/12*5.9):r/(e/12*5.6)}(r,n)):t.split("\\n")}},8780:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.init=f,e.bootstrap=function(t,e,r,n,o){l=f(t);var i,a,h=c.createSVG(r,r,function(t){var e="",r=d(t.additionalTemplate);return Boolean(r)&&(e=r.renderMagic),e}(o));return Boolean(o.source)&&h.appendChild(function(t,e){var r=c.createDesc();return r.appendChild(t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n".concat(e))),r}(t,o.source)),h.appendChild(function(t,e,r){var n=c.createDefs();return n.appendChild(function(t,e){var r=l.createElement("style");return r.setAttribute("type","text/css"),r.appendChild(l.createTextNode(function(t,e){return(r=d(t.additionalTemplate)||{},n=t.styleAdditions,(r.cssBefore||"")+s.baseTemplate+(r.cssAfter||"")+(n||"")).replace(/<%=fontSize%>/g,u.default.FONT_SIZE).replace(/<%=lineWidth%>/g,u.default.LINE_WIDTH).replace(/<%=id%>/g,e);var r,n}(t,e))),r}(r,t)),function(t,e){return e.forEach((function(e){"method"===e.type?t.appendChild(c.createMarkerPolygon(e.name,e.path,e.color)):t.appendChild(c.createMarkerPath(e.name,e.path,e.color))})),t}(n,e)}(r,n,o)),h.appendChild((i=r,(a=c.createGroup("".concat(i,"_body"))).appendChild(c.createGroup("".concat(i,"_background"))),a.appendChild(c.createGroup("".concat(i,"_arcspans"))),a.appendChild(c.createGroup("".concat(i,"_lifelines"))),a.appendChild(c.createGroup("".concat(i,"_sequence"))),a.appendChild(c.createGroup("".concat(i,"_notes"))),a.appendChild(c.createGroup("".concat(i,"_watermark"))),a)),e.appendChild(h),l};var c=i(r(8912)),u=a(r(9370)),s=r(2006),l={};function f(t){return c.init(t.document,{LINE_WIDTH:u.default.LINE_WIDTH,FONT_SIZE:u.default.FONT_SIZE}),t.document}function d(t){return s.namedStyles.find((function(e){return e.name===t}))}},8340:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scaleCanvasToWidth=function(t,e){var r=structuredClone(e);return r.scale=t/r.width,r.width*=r.scale,r.height*=r.scale,r.horizontaltransform*=r.scale,r.verticaltransform*=r.scale,r.x=0-r.horizontaltransform,r.y=0-r.verticaltransform,r},e.determineDepthCorrection=function(t,e){return t?2*(t+1)*e*2:0},e.determineArcXTo=function(t,e,r){return"-x"===t?e+3/4*(r-e):r}},416:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.get=i,e.getLast=a,e.clear=function(t,e){r=[],n=t,o=e},e.getByRealRowNumber=function(t){var e=r.find((function(e){return e.realRowNumber===t}));return void 0===e&&(e=a()),e},e.set=function(t,e,n){void 0===n&&(n=-1);var o=i(t-1);r[t]={y:o.y+(o.height+e)/2,height:e,realRowNumber:n}};var r=[],n=0,o=0;function i(t){return r[t]?r[t]:{y:n+1.5*o+t*o,height:o,realRowNumber:r.length-1}}function a(){return i(r.length-1)}},7706:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XLINKNS=e.SVGNS=void 0,e.setAttribute=n,e.setAttributeNS=o,e.setAttributes=i,e.setAttributesNS=function(t,e,r){return Object.keys(r||{}).forEach((function(n){o(t,e,n,r[n])})),t},e.createElement=function(t,n){return i(r.createElementNS(e.SVGNS,t),n)},e.createTextNode=function(t){return r.createTextNode(t)},e.init=function(t){r=t},e.SVGNS="http://www.w3.org/2000/svg",e.XLINKNS="http://www.w3.org/1999/xlink";var r={};function n(t,e,r){return Boolean(r)&&t.setAttribute(e,r),t}function o(t,e,r,n){return Boolean(n)&&t.setAttributeNS(e,r,n),t}function i(t,e){return Object.keys(e||{}).forEach((function(r){n(t,r,e[r])})),t}},424:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return 0-360*Math.atan(t.height/t.width)/(2*Math.PI)}},8912:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.createMarkerPolygon=e.createMarkerPath=e.createGroup=e.createUTurn=e.createDiagonalText=e.createText=e.createNote=e.createABox=e.createRBox=e.createRect=e.createTSpan=e.createDefs=e.createDesc=e.createTitle=e.updateSVG=void 0,e.init=function(t,e){c.init(t),l=Object.assign({LINE_WIDTH:2,FONT_SIZE:12},e)},e.createSVG=function(t,e,r){return s=function(t){return Boolean(t)?"wobbly"===t?u:a:s}(r),c.createSVG(t,e)},e.createEdgeRemark=function(t,e){return s.createEdgeRemark(t,{class:e.class,color:e.color,bgColor:e.bgColor,foldSize:e.foldSize,lineWidth:l.LINE_WIDTH})},e.createLine=function(t,e){return Boolean(e)&&Boolean(e.doubleLine)?(e.lineWidth||(e.lineWidth=l.LINE_WIDTH),s.createDoubleLine(t,e)):s.createSingleLine(t,e)};var a=i(r(5767)),c=i(r(9452)),u=i(r(6180)),s=a,l={};e.updateSVG=c.updateSVG,e.createTitle=c.createTitle,e.createDesc=c.createDesc,e.createDefs=c.createDefs,e.createTSpan=c.createTSpan,e.createRect=function(t,e){return s.createRect(t,e)},e.createRBox=function(t,e){return s.createRBox(t,e)},e.createABox=function(t,e){return s.createABox(t,e)},e.createNote=function(t,e){return s.createNote(t,e)},e.createText=c.createText,e.createDiagonalText=c.createDiagonalText,e.createUTurn=c.createUTurn,e.createGroup=c.createGroup,e.createMarkerPath=c.createMarkerPath,e.createMarkerPolygon=c.createMarkerPolygon},3136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return e?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Math.round(t)}},5767:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.createRect=e.createSingleLine=void 0,e.createDoubleLine=function(t,e){var r=e.lineWidth||1,n=r,o=e?e.class:"",i=c.getDirection(t),u=c.determineEndCorrection(t,o,r),s=c.determineStartCorrection(t,o,r),l=(t.xTo-t.xFrom+u-s).toString(),f=(t.yTo-t.yFrom).toString(),d=a.pathPoint2String("l",i.signX,i.dy),h=a.pathPoint2String("l",l,f);return a.createPath(a.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*i.dy)+d+a.pathPoint2String("M",t.xFrom+s,t.yFrom-n)+h+a.pathPoint2String("M",t.xFrom+s,t.yFrom+n)+h+a.pathPoint2String("M",t.xTo-i.signX,t.yTo+7.5*r*i.dy)+d,e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=n.toString(10);return a.createPath(a.pathPoint2String("M",t.x,t.y)+a.pathPoint2String("l",t.width-n,0)+a.pathPoint2String("l",0,o)+a.pathPoint2String("l",o,0)+a.pathPoint2String("m",-o,-o)+a.pathPoint2String("l",o,o)+a.pathPoint2String("l",0,t.height-n)+a.pathPoint2String("l",-t.width,0)+a.pathPoint2String("l",0,-t.height)+"z",e)},e.createRBox=function(t,e){var r=Object.assign({rx:6,ry:6},e);return a.createRect(t,r)},e.createABox=function(t,e){return a.createPath(a.pathPoint2String("M",t.x,t.y+t.height/2)+a.pathPoint2String("l",3,-t.height/2)+a.pathPoint2String("l",t.width-6,0)+a.pathPoint2String("l",3,t.height/2)+a.pathPoint2String("l",-3,t.height/2)+a.pathPoint2String("l",-(t.width-6),0)+"z",e)},e.createEdgeRemark=function(t,e){var r=e&&e.foldSize?e.foldSize:7,n=Object.assign({class:null,color:null,bgColor:null},e);return a.createPath(a.pathPoint2String("M",t.x,t.y)+a.pathPoint2String("l",t.width,0)+a.pathPoint2String("l",0,t.height-r)+a.pathPoint2String("l",-r,r)+a.pathPoint2String("l",-(t.width-r),0),n)};var a=i(r(9452)),c=i(r(7544));e.createSingleLine=a.createSingleLine,e.createRect=a.createRect},9452:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateSVG=e.init=void 0,e.point2String=f,e.pathPoint2String=d,e.createTSpan=g,e.createText=b,e.createPath=m,e.createSingleLine=function(t,e){return c.createElement("line",{x1:(0,s.default)(t.xFrom,l).toString(),y1:(0,s.default)(t.yFrom,l).toString(),x2:(0,s.default)(t.xTo,l).toString(),y2:(0,s.default)(t.yTo,l).toString(),class:e?e.class:null})},e.createRect=function(t,e){var r=Object.assign({class:null,color:null,bgColor:null,rx:null,ry:null},e);return y(c.createElement("rect",{width:(0,s.default)(t.width,l),height:(0,s.default)(t.height,l),x:(0,s.default)(t.x,l),y:(0,s.default)(t.y,l),rx:(0,s.default)(r.rx||0,l),ry:(0,s.default)(r.ry||0,l),class:r.class}),r.color,r.bgColor)},e.createUTurn=function(t,e,r){var n=Object.assign({class:null,dontHitHome:!1,lineWidth:1},r),o=n.dontHitHome?t.x+7.5*(n.lineWidth||1):t.x;return m(d("M",t.x,t.y-t.height/2)+d("C",t.x+t.width,t.y-7.5*(n.lineWidth||1)/2)+f({x:t.x+t.width,y:e+0})+f({x:o,y:e}),{class:n.class})},e.createGroup=function(t,e){return c.createElement("g",{id:t,class:e})},e.createMarkerPath=function(t,e,r){var n=h(t,"arrow-marker","auto");return n.appendChild(m(e,{class:"arrow-style",style:"stroke-dasharray:100,1;stroke:".concat(r)||0})),n},e.createMarkerPolygon=function(t,e,r){var n=h(t,"arrow-marker","auto");return n.appendChild(c.createElement("polygon",{points:e,class:"arrow-style",stroke:r||"black",fill:r||"black"})),n},e.createTitle=function(t){var e=c.createElement("title"),r=c.createTextNode(t);return e.appendChild(r),e},e.createDiagonalText=function(t,e,r){return c.setAttributes(b(t,{x:e.width/2,y:e.height/2},{class:r}),{transform:"rotate(".concat((0,s.default)((0,u.default)(e),l).toString()," ")+"".concat((0,s.default)(e.width/2,l).toString()," ")+"".concat((0,s.default)(e.height/2,l).toString(),")")})},e.createDesc=function(){return c.createElement("desc")},e.createDefs=function(){return c.createElement("defs")},e.createSVG=function(t,e){return c.createElement("svg",{version:"1.1",id:t,class:e,xmlns:c.SVGNS,"xmlns:xlink":c.XLINKNS,width:"0",height:"0"})};var c=i(r(7706)),u=a(r(424)),s=a(r(3136)),l=2;function f(t){return"".concat((0,s.default)(t.x,l).toString(),",").concat((0,s.default)(t.y,l).toString()," ")}function d(t,e,r){return t+f({x:e,y:r})}function h(t,e,r,n){return c.createElement("marker",{orient:r,id:t,class:e,viewBox:Boolean(n)?n:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}var p="vertical-align:text-top;";function g(t,e){var r=c.createElement("tspan"),n=c.createTextNode(t);return r.appendChild(n),e?function(t,e){var r=c.createElement("a");return c.setAttributesNS(r,c.XLINKNS,{"xlink:href":t,"xlink:title":t}),r.appendChild(e),r}(e,r):r}function b(t,e,r){var n=Object.assign({class:null,url:null,id:null,idurl:null},r),o=c.createElement("text",{x:(0,s.default)(e.x,l).toString(),y:(0,s.default)(e.y,l).toString(),class:n.class});if(o.appendChild(g(t,n.url)),n.id){var i=g(" [".concat(n.id,"]"),n.idurl);i.setAttribute("style",p),o.appendChild(i)}return o}function m(t,e){var r=Object.assign({class:null,style:null,color:null,bgColor:null},e);return y(c.createElement("path",{d:t,class:r.class,style:r.style}),r.color,r.bgColor)}function y(t,e,r){var n="";return r&&(n+="fill:".concat(r,";")),e&&(n+="stroke:".concat(e,";")),c.setAttribute(t,"style",n)}p+="font-size:0.7em;text-anchor:start;",e.init=c.init,e.updateSVG=c.setAttributes},7544:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.determineStartCorrection=function(t,e,r){var n=0;return!e.includes("nodi")&&e.includes("bidi")&&(n=t.xTo>t.xFrom?7.5*r:-7.5*r),n},e.determineEndCorrection=function(t,e,r){var n=0;return e.includes("nodi")||(n=t.xTo>t.xFrom?-7.5*r:7.5*r),n},e.getDirection=function(t){var e=t.xTo>t.xFrom?1:-1;return{signX:e,signY:t.yTo>t.yFrom?1:-1,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}},5994:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.renderNotePathString=function(t,e){return a.pathPoint2String("M",t.x,t.y)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width,t.y+e)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height})+a.pathPoint2String("L",t.x,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height,xTo:t.x,yTo:t.y})+a.pathPoint2String("L",t.x,t.y)+"z"},e.renderNoteCornerString=function(t,e){return a.pathPoint2String("M",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width-e,t.y+e)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width,t.y+e)},e.abox2CurveString=function(t,e){return a.pathPoint2String("M",t.x,t.y+t.height/2)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height/2,xTo:t.x+e,yTo:t.y})+a.pathPoint2String("L",t.x+e,t.y)+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height/2})+a.pathPoint2String("L",t.x+t.width,t.y+t.height/2)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height/2,xTo:t.x+t.width-e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height/2})+"z"},e.rbox2CurveString=function(t,e){return a.pathPoint2String("M",t.x,t.y+e)+(0,u.points2CurveString)([{controlX:t.x,controlY:t.y,x:t.x+e,y:t.y}])+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.points2CurveString)([{controlX:t.x+t.width,controlY:t.y,x:t.x+t.width,y:t.y+e}])+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height-e})+a.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+(0,u.points2CurveString)([{controlX:t.x+t.width,controlY:t.y+t.height,x:t.x+t.width-e,y:t.y+t.height}])+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+e,t.y+t.height)+(0,u.points2CurveString)([{controlX:t.x,controlY:t.y+t.height,x:t.x,y:t.y+t.height-e}])+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height-e,xTo:t.x,yTo:t.y+e})+"z"},e.doubleLine2CurveString=function(t,e){var r=e.lineWidth||1,n=r,o=e?e.class:"",i=c.getDirection(t),s=c.determineEndCorrection(t,o,r),l=c.determineStartCorrection(t,o,r);return a.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*i.dy)+a.pathPoint2String("l",i.signX,i.dy)+a.pathPoint2String("M",t.xFrom+l,t.yFrom-n)+(0,u.line2CurveString)({xFrom:t.xFrom+l,yFrom:t.yFrom-n,xTo:t.xTo+s,yTo:t.yTo-n})+a.pathPoint2String("M",t.xFrom+l,t.yFrom+n)+(0,u.line2CurveString)({xFrom:t.xFrom+l,yFrom:t.yFrom+n,xTo:t.xTo+s,yTo:t.yTo+n})+a.pathPoint2String("M",t.xTo-i.signX,t.yTo+7.5*r*i.dy)+a.pathPoint2String("l",i.signX,i.dy)},e.edgeRemark2CurveString=function(t,e){return a.pathPoint2String("M",t.x+t.width,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height-e})+a.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height-e,xTo:t.x+t.width-e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x-1,yTo:t.y+t.height})+a.pathPoint2String("L",t.x-1,t.y+t.height)};var a=i(r(9452)),c=i(r(7544)),u=r(9521)},9521:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.points2CurveString=d,e.line2CurveString=function(t){return d(m(t,l,f))},e.getLineLength=h,e.getNumberOfSegments=p,e.getBetweenPoints=m;var c=a(r(3136)),u=i(r(9452)),s=i(r(7544)),l=70,f=3;function d(t){return t.map((function(t){return"".concat(u.pathPoint2String("S",t.controlX,t.controlY)," ")+"".concat(u.point2String(t))})).join(" ")}function h(t){var e=Math.abs(t.xTo-t.xFrom),r=Math.abs(t.yTo-t.yFrom);return Math.sqrt(e*e+r*r)}function p(t,e){var r=h(t);return r>0?Math.floor(r/e):0}function g(t){return Math.round(2*Math.random()*t)-t}var b=2;function m(t,e,r){e=function(t,e){if(t<=0)throw new Error("pInterval must be > 0");return Math.min(h(e),t)}(e,t);for(var n,o=[],i=p(t,e),a=s.getDirection(t),u=a.signX*Math.sqrt(Math.pow(e,2)/(1+Math.pow(a.dy,2))),l=a.signY*(Math.abs(a.dy)===1/0?e:Math.sqrt(Math.pow(a.dy,2)*Math.pow(e,2)/(1+Math.pow(a.dy,2)))),f=1;f<=i;f++)e>h({xFrom:(n={controlX:(0,c.default)(t.xFrom+(f-.5)*u+g(r),b),controlY:(0,c.default)(t.yFrom+(f-.5)*l+g(r),b),x:(0,c.default)(t.xFrom+f*u,b),y:(0,c.default)(t.yFrom+f*l,b)}).x,yFrom:n.y,xTo:t.xTo,yTo:t.yTo})&&(n.x=t.xTo,n.y=t.yTo),o.push(n);return o}},6180:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createSingleLine=function(t,e){void 0===e&&(e={});var r=f.getDirection(t);return l.createPath(l.pathPoint2String("M",t.xFrom,t.yFrom)+l.pathPoint2String("L",(0,s.default)(t.xFrom+r.signX*Math.sqrt(1/(1+Math.pow(r.dy,2))),2),t.yFrom+r.signY*(Math.abs(r.dy)===1/0?1:(0,s.default)(Math.sqrt(Math.pow(r.dy,2)/(1+Math.pow(r.dy,2))),2)))+(0,u.line2CurveString)(t),e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=l.createGroup();return o.appendChild(l.createPath((0,c.renderNotePathString)(t,n),e)),e.bgColor="transparent",o.appendChild(l.createPath((0,c.renderNoteCornerString)(t,n),e)),o},e.createRect=function(t,e){return l.createPath((0,c.rbox2CurveString)(t,0),e)},e.createABox=function(t,e){return l.createPath((0,c.abox2CurveString)(t,3),e)},e.createRBox=function(t,e){return l.createPath((0,c.rbox2CurveString)(t,6),e)},e.createEdgeRemark=function(t,e){var r=e&&e.lineWidth||1,n=l.createGroup(),o=e&&e.foldSize?e.foldSize:7,i=e&&e.color?e.color:"black";e.color="transparent!important";var a=l.createPath(l.pathPoint2String("M",t.x,t.y+r/2)+l.pathPoint2String("L",t.x+t.width,t.y+r/2)+l.pathPoint2String("L",t.x+t.width,t.y+t.height-o)+l.pathPoint2String("L",t.x+t.width-o,t.y+t.height)+l.pathPoint2String("L",t.x,t.y+t.height)+"z",e);e.bgColor="transparent",e.color=i;var u=l.createPath((0,c.edgeRemark2CurveString)(t,o),e);return n.appendChild(a),n.appendChild(u),n},e.createDoubleLine=function(t,e){return l.createPath((0,c.doubleLine2CurveString)(t,e),{class:e.class})};var c=r(5994),u=r(9521),s=a(r(3136)),l=i(r(9452)),f=i(r(7544))},2314:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.webkitNamespaceBugWorkaround=e.calculateTextHeight=e.init=void 0,e.getBBox=d,e.removeRenderedSVGFromElement=function(t){u.setPrefix(t);var e=l.getElementById(u.get());if(Boolean(e)){var r=l.getElementById(t);r?r.removeChild(e):l.body.removeChild(e)}};var c=a(r(104)),u=i(r(5871)),s=i(r(8912)),l={},f=u.get("bboxer");function d(t){return"function"==typeof t.getBBox?(e=function(t){var e=l.getElementById(f);(e=e||function(t){var e=s.createSVG(t,u.get());return l.body.appendChild(e),e}(f)).appendChild(t);var r=t.getBBox();return e.removeChild(t),r}(t),r=1e5,Math.abs(e.height)>r||Math.abs(e.width)>r?{height:0,width:0,x:0,y:0}:e):{height:15,width:15,x:2,y:2};var e,r}e.init=function(t){l=t},e.calculateTextHeight=(0,c.default)((function(){return d(s.createText("ÁjyÎ9ƒ@💩",{x:0,y:0})).height})),e.webkitNamespaceBugWorkaround=function(t){return t.replace(/ xlink=/g," xmlns:xlink=").replace(/ href=/g," xlink:href=")}},2020:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.explodeBroadcasts=w,e.render=function(t){var e=function(t){return w((0,u.default)(t,[s.nameAsLabel],[s.swapRTLArc,s.overrideColors]))}(structuredClone(t)),r="/* Sequence chart represented as a directed graph\n * in the graphviz dot language (http://graphviz.org/)\n *\n * Generated by mscgen_js (https://sverweij.github.io/mscgen_js)\n */\n\ngraph {\n";return r+="".concat(d,"rankdir=LR\n"),r+="".concat(d,"splines=true\n"),r+="".concat(d,"ordering=out\n"),r+="".concat(d,'fontname="Helvetica"\n'),r+="".concat(d,'fontsize="9"\n'),r+="".concat(d,'node [style=filled, fillcolor=white fontname="Helvetica", fontsize="9" ]\n'),r+="".concat(d,'edge [fontname="Helvetica", fontsize="9", arrowhead=vee, arrowtail=vee, dir=forward]\n'),r+="\n",r+="".concat(e.entities.reduce((function(t,e){return"".concat(t+d+function(t){return v(t.name)+y(m(t))}(e),";\n")}),""),"\n"),e.arcs&&(p=0,r+=x(e.arcs,"")),r+"}"};var c=a(r(7796)),u=a(r(4501)),s=i(r(7635)),l=a(r(2900)),f=i(r(8501)),d=" ",h=40,p=0;function g(t,e){return"".concat(e,'="').concat(function(t){var e=(0,l.default)(t.replace(/"/g,'\\"'),h);return e.slice(0,-1).reduce((function(t,e){return"".concat(t+e,"\n")}),"")+e.slice(-1)}(t),'"')}function b(t,e,r){Boolean(e)&&t.push(g(e,r))}function m(t){return["label","color","fontcolor","fillcolor"].filter((function(e){return Boolean(t[e])})).map((function(e){return g(t[e],e)}))}function y(t){return t.slice(0,-1).reduce((function(t,e){return"".concat(t+e,", ")})," [")+"".concat(t.slice(-1),"]")}function v(t){return'"'.concat(t,'"')}function x(t,e){return t.reduce((function(t,r){return t+r.reduce((function(t,r){return t+function(t,e){var r="";return t.from&&t.to&&(r+="".concat(d+e+function(t,e,r){var n="",o=(0,c.default)(t.kind);return n+="box"===o?function(t,e,r){var n="",o="box".concat(e.toString());n+=o;var i=m(t);return b(i,f.getStyle(t.kind),"style"),b(i,f.getShape(t.kind),"shape"),n+="".concat(y(i),"\n").concat(d).concat(r),b(i=[],"dotted","style"),b(i,"none","dir"),(n+="".concat(o," -- {").concat(v(t.from),",").concat(v(t.to),"}"))+y(i)}(t,e,r):function(t,e,r){var n="";t.label=function(t,e){return e?"(".concat(t,") ").concat(e):"(".concat(t,")")}(r,t.label);var o=m(t);switch(b(o,f.getStyle(t.kind),"style"),e){case"directional":b(o,f.getArrow(t.kind),"arrowhead");break;case"bidirectional":b(o,f.getArrow(t.kind),"arrowhead"),b(o,f.getArrow(t.kind),"arrowtail"),b(o,"both","dir");break;case"nondirectional":b(o,"none","dir")}return t.arcs||(n+="".concat(v(t.from)," "),n+="--",n+=" ".concat(v(t.to)),n+=y(o)),n}(t,o,e),n}(t,++p,e),"\n"),t.arcs&&(r+="".concat(d+e,"subgraph cluster_").concat(p.toString(),"{"),r+="\n".concat(d).concat(e,' label="').concat(t.kind,": ").concat(t.label,'" labeljust="l"\n'),r+=x(t.arcs,e+d),r+="".concat(d+e,"}\n"))),r}(r,e)}),"")}),"")}function w(t){return t.arcs&&t.arcs.forEach((function(e,r){e.filter((function(t){return"*"===t.to})).forEach((function(n,o){var i=structuredClone(n);delete t.arcs[r][o];var a=function(t,e){return t.filter((function(t){return e.from!==t.name})).map((function(t){return e.to=t.name,structuredClone(e)}))}(t.entities,i);e[o]=a.shift(),t.arcs[r]=e.concat(a)}))})),t}},5619:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.render=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var e=" ",r="\n",n=" * ";t.prototype.init.call(this,{program:{opener:"".concat(n,"\\msc").concat(r),closer:"".concat(n,"\\endmsc")},option:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r).concat(n).concat(r)},entity:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r).concat(n).concat(r)},arcline:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r)},inline:{opener:";".concat(r),closer:"".concat(n,"#")}})},e.prototype.renderComments=function(){return""},e}(r(3250).MscGenAdaptor);e.render=function(t){return new i(!1).render(t)}},3250:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.MscGenAdaptor=void 0;var a=i(r(7796)),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(e){t.prototype.init.call(this,Object.assign({supportedOptions:["hscale","width","arcgradient","wordwraparcs"],supportedEntityAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],supportedArcAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],inline:{opener:";".concat(this.eol),closer:"#"}},e))},e.prototype.renderKind=function(t){return"inline_expression"===(0,a.default)(t)?"--":t},e.prototype.optionIsValid=function(t){return!Boolean(t.value)||"string"!=typeof t.value||"auto"!==t.value.toLowerCase()},e}(r(6532).XuAdaptor);e.MscGenAdaptor=c,e.render=function(t,e){return void 0===e&&(e=!1),new c(e).render(t)}},2956:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.render=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){t.prototype.init.call(this,{supportedEntityAttributes:["label"],supportedArcAttributes:["label"],program:{opener:"",closer:""},option:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol).concat(this.eol)},entity:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol).concat(this.eol)},arcline:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol)},inline:{opener:" {".concat(this.eol),closer:"}"},attribute:{opener:"",separator:"",closer:""}})},e.prototype.renderEntityName=function(t){return this.entityNameIsQuotable(t)?'"'.concat(t,'"'):t},e.prototype.renderAttribute=function(t){var e="";return t.name&&t.value&&(e+=' : "'.concat(t.value,'"')),e},e.prototype.entityNameIsQuotable=function(t){var e=t.match(/[^;, "\t\n\r=\-><:{*]+/gi);return e?1!==e.length:"*"!==t},e}(r(6532).XuAdaptor);e.render=function(t){return(new i).render(t)}},6532:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.XuAdaptor=void 0;var a=i(r(2952)),c=i(r(5383)),u=function(){function t(t){void 0===t&&(t=!1),this.indent=" ",this.space=" ",this.eol="\n",this.config={},!0===t?(this.indent="",this.space="",this.eol=""):(this.indent=" ",this.space=" ",this.eol="\n"),this.init(this.config)}return t.prototype.init=function(t){this.config=Object.assign({},this.getConfig(),t)},t.prototype.render=function(t){var e="";return t.precomment&&(e+=this.renderComments(t.precomment)),e+=this.config.program.opener,t.options&&(e+=this.renderOptions(t.options)),e+=this.renderEntities(t.entities),t.arcs&&(e+=this.renderArcLines(t.arcs,"")),e+this.config.program.closer},t.prototype.renderEntityName=function(t){return this.isQuotable(t)?'"'.concat(t,'"'):t},t.prototype.renderAttribute=function(t){var e="";return t.name&&t.hasOwnProperty("value")&&(e="string"==typeof t.value?this.renderStringAttribute(t):this.renderNonStringAttribute(t)),e},t.prototype.renderComments=function(t){return t.reduce((function(t,e){return t+e}),"")},t.prototype.renderOption=function(t){return"".concat(t.name,"=").concat("string"==typeof t.value?'"'+c.escapeString(t.value)+'"':t.value.toString())},t.prototype.optionIsValid=function(t){return!0},t.prototype.renderKind=function(t){return t},t.prototype.renderStringAttribute=function(t){return"".concat(t.name,'="').concat(c.escapeString(t.value),'"')},t.prototype.renderNonStringAttribute=function(t){return"".concat(t.name,"=").concat(t.value)},t.prototype.getConfig=function(){return{supportedOptions:["hscale","width","arcgradient","wordwraparcs","watermark","wordwrapentities","wordwrapboxes"],supportedEntityAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],supportedArcAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip","title","activation"],program:{opener:"msc".concat(this.space,"{").concat(this.eol),closer:"}"},option:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol).concat(this.eol)},entity:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol).concat(this.eol)},attribute:{opener:"".concat(this.space,"["),separator:",".concat(this.space),closer:"]"},arcline:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol)},inline:{opener:"".concat(this.space,"{").concat(this.eol),closer:"".concat(this.indent,"}")}}},t.prototype.extractSupportedOptions=function(t,e){return e.filter((function(e){return void 0!==t[e]})).map((function(e){return{name:e,value:t[e]}}))},t.prototype.isQuotable=function(t){var e=t.match(/[a-z0-9]+/gi);return e?1!==e.length||a.isMscGenKeyword(t):"*"!==t},t.prototype.renderOptions=function(t){var e=this,r=this.extractSupportedOptions(t,this.config.supportedOptions).filter(this.optionIsValid),n="";if(r.length>0){var o=r.pop();n=r.reduce((function(t,r){return t+e.renderOption(r)+e.config.option.separator}),this.config.option.opener),n+=this.renderOption(o)+this.config.option.closer}return n},t.prototype.renderEntity=function(t){return this.renderEntityName(t.name)+this.renderAttributes(t,this.config.supportedEntityAttributes)},t.prototype.renderEntities=function(t){var e=this,r="";return t.length>0&&(r=t.slice(0,-1).reduce((function(t,r){return t+e.renderEntity(r)+e.config.entity.separator}),this.config.entity.opener),r+=this.renderEntity(t[t.length-1])+this.config.entity.closer),r},t.prototype.renderAttributes=function(t,e){var r=this,n="",o=this.extractSupportedOptions(t,e);if(o.length>0){var i=o.pop();n=o.reduce((function(t,e){return t+r.renderAttribute(e)+r.config.attribute.separator}),this.config.attribute.opener),n+=this.renderAttribute(i)+this.config.attribute.closer}return n},t.prototype.renderArc=function(t,e){var r="";return t.from&&(r+="".concat(this.renderEntityName(t.from)," ")),r+=this.renderKind(t.kind),t.to&&(r+=" ".concat(this.renderEntityName(t.to))),r+=this.renderAttributes(t,this.config.supportedArcAttributes),t.arcs&&(r+=this.config.inline.opener,r+=this.renderArcLines(t.arcs,e+this.indent),r+=e+this.config.inline.closer),null===t.arcs&&(r+=this.config.inline.opener,r+=e+this.config.inline.closer),r},t.prototype.renderArcLine=function(t,e){var r=this,n="";return t.length>0&&(n=t.slice(0,-1).reduce((function(t,n){return t+e+r.renderArc(n,e)+r.config.arcline.separator}),this.config.arcline.opener),n+=e+this.renderArc(t[t.length-1],e)+this.config.arcline.closer),n},t.prototype.renderArcLines=function(t,e){var r=this;return t.reduce((function(t,n){return t+r.renderArcLine(n,e)}),"")},t}();e.XuAdaptor=u,e.render=function(t,e){return void 0===e&&(e=!1),new u(e).render(t)}},8501:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getArrow=function(t){return r[t]},e.getShape=function(t){return n[t]},e.getStyle=function(t){return o[t]};var r=Object.freeze({"->":"rvee","<->":"rvee","=>":"normal","<=>":"normal","-x":"oinvonormal"}),n=Object.freeze({box:"box",abox:"hexagon",rbox:"box",note:"note"}),o=Object.freeze({">>":"dashed","<<>>":"dashed","..":"dashed",":>":"bold","<:>":"bold","::":"bold",rbox:"rounded"})},5383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescapeString=function(t){return t.replace(/\\"/g,'"')},e.escapeString=function(t){return t.replace(/\\"/g,'"').replace(/"/g,'\\"')}},2900:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=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&&(-1===(a=u.substring(0,c).lastIndexOf(" "))||ae?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",E="==",P="<<=>>",T="<=>",M="..",D="<<>>",F="::",I="<:>",B="->",N="=>>",H="=>",R=">>",W=":>",G="-x",z="<-",X="<<=",V="<=",$="<<",q="<:",U="x-",K="note",Z="abox",Y="rbox",Q="box",J="label",tt="idurl",et="id",rt="url",nt="linecolor",ot="linecolour",it="textcolor",at="textcolour",ct="textbgcolor",ut="textbgcolour",st="arclinecolor",lt="arclinecolour",ft="arctextcolor",dt="arctextcolour",ht="arctextbgcolor",pt="arctextbgcolour",gt="arcskip",bt='"',mt='\\"',yt="/*",vt="*/",xt="//",wt="#",_t=".",Ct="true",At="false",Ot="on",St="off",kt=/^[A-Za-z_0-9]/,Lt=/^[ \t]/,jt=/^[\r\n]/,Et=/^[^\r\n]/,Pt=/^[0-9]/,Tt=/^[0-1]/,Mt=_n("{",!1),Dt=_n("}",!1),Ft=_n("msc",!0),It=_n(",",!1),Bt=_n(";",!1),Nt=An("option"),Ht=_n("hscale",!0),Rt=_n("width",!0),Wt=_n("arcgradient",!0),Gt=_n("=",!1),zt=_n("wordwraparcs",!0),Xt=An("entity"),Vt=_n("[",!1),$t=_n("]",!1),qt=_n("*",!1),Ut=An("empty row"),Kt=_n("|||",!1),Zt=_n("...",!1),Yt=An("---"),Qt=_n("---",!1),Jt=An("bi-directional arrow"),te=_n("--",!1),ee=_n("<->",!1),re=_n("==",!1),ne=_n("<<=>>",!1),oe=_n("<=>",!1),ie=_n("..",!1),ae=_n("<<>>",!1),ce=_n("::",!1),ue=_n("<:>",!1),se=An("left to right arrow"),le=_n("->",!1),fe=_n("=>>",!1),de=_n("=>",!1),he=_n(">>",!1),pe=_n(":>",!1),ge=_n("-x",!0),be=An("right to left arrow"),me=_n("<-",!1),ye=_n("<<=",!1),ve=_n("<=",!1),xe=_n("<<",!1),we=_n("<:",!1),_e=_n("x-",!0),Ce=An("box"),Ae=_n("note",!0),Oe=_n("abox",!0),Se=_n("rbox",!0),ke=_n("box",!0),Le=An("attribute name"),je=_n("label",!0),Ee=_n("idurl",!0),Pe=_n("id",!0),Te=_n("url",!0),Me=_n("linecolor",!0),De=_n("linecolour",!0),Fe=_n("textcolor",!0),Ie=_n("textcolour",!0),Be=_n("textbgcolor",!0),Ne=_n("textbgcolour",!0),He=_n("arclinecolor",!0),Re=_n("arclinecolour",!0),We=_n("arctextcolor",!0),Ge=_n("arctextcolour",!0),ze=_n("arctextbgcolor",!0),Xe=_n("arctextbgcolour",!0),Ve=_n("arcskip",!0),$e=An("double quoted string"),qe=_n('"',!1),Ue=_n('\\"',!1),Ke={type:"any"},Ze=An("identifier"),Ye=Cn([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),Qe=An("whitespace"),Je=Cn([" ","\t"],!1,!1),tr=An("lineend"),er=Cn(["\r","\n"],!1,!1),rr=_n("/*",!1),nr=_n("*/",!1),or=_n("//",!1),ir=_n("#",!1),ar=Cn(["\r","\n"],!0,!1),cr=An("comment"),ur=An("number"),sr=An("cardinal"),lr=Cn([["0","9"]],!1,!1),fr=An("real"),dr=_n(".",!1),hr=An("boolean"),pr=_n("true",!0),gr=_n("false",!0),br=_n("on",!0),mr=_n("off",!0),yr=Cn([["0","1"]],!1,!1),vr=function(e,r){return r.entities=r.entities||[],t.checkForUndeclaredEntities(r.entities,r.arcs),r={meta:{extendedOptions:!1,extendedArcTypes:!1,extendedFeatures:!1},...r},e.length>0&&(r={precomment:e,...r}),r},xr=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},wr=function(t){return t},_r=function(t){return t},Cr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Ar=function(e,r){return t.nameValue2Option(e,r)},Or=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Sr=function(t){return t},kr=function(t){return t},Lr=function(t){return t[0].concat(t[1])},jr=function(t,e){return e},Er=function(t,e){return{name:t,...e}},Pr=function(t,e){return e},Tr=function(r,n){return t.isMscGenKeyword(r)&&function(t,r){throw function(t,r){return new e(t,null,null,r)}(t,r=void 0!==r?r:Sn(mn,bn))}("Keywords aren't allowed as entity names (embed them in quotes if you need them)"),{name:r,...n}},Mr=function(t){return t},Dr=function(t){return t},Fr=function(t){return t},Ir=function(t){return t[0].concat(t[1])},Br=function(t){return t},Nr=function(t){return t},Hr=function(t){return t},Rr=function(t,e){return e},Wr=function(t,e){return{...t,...e}},Gr=function(t){return{kind:t}},zr=function(t){return{kind:t}},Xr=function(t,e,r){return{kind:e,from:t,to:r}},Vr=function(t,e){return{kind:t,from:"*",to:e}},$r=function(t,e){return{kind:e,from:t,to:"*"}},qr=function(t,e){return{kind:e,from:t,to:"*"}},Ur=function(t){return t.toLowerCase()},Kr=function(t){return t},Zr=function(t){return t},Yr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Qr=function(t,e){var r={};return r[t.toLowerCase().replace("colour","color")]=e,r},Jr=function(t){return t.join("")},tn=function(t){return t},en=function(t){return t.join("")},rn=function(t){return t},nn=function(t){return t},on=function(t){return t},an=function(t,e,r){return t+e.join("")+r},cn=function(t,e){return t+e.join("")},un=function(t){return t},sn=function(t){return t.toString()},ln=function(t){return t.toString()},fn=function(t){return parseInt(t.join(""),10)},dn=function(t){return parseFloat(t.join(""))},hn=function(t){return t},pn=function(t){return t.toString()},gn=function(t){return t},bn=0|n.peg$currPos,mn=bn,yn=[{line:1,column:1}],vn=bn,xn=n.peg$maxFailExpected||[],wn=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function _n(t,e){return{type:"literal",text:t,ignoreCase:e}}function Cn(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function An(t){return{type:"other",description:t}}function On(t){var e,n=yn[t];if(n)return n;if(t>=yn.length)e=yn.length-1;else for(e=t;!yn[--e];);for(n={line:(n=yn[e]).line,column:n.column};evn&&(vn=bn,xn=[]),xn.push(t))}function Ln(){var t,e,n,o,i;return t=bn,e=Un(),function(){var t;return(t=r.substr(bn,3)).toLowerCase()===p?bn+=3:(t=u,0===wn&&kn(Ft)),t}()!==u?(Un(),123===r.charCodeAt(bn)?(n=d,bn++):(n=u,0===wn&&kn(Mt)),n!==u?(Un(),o=function(){var t,e,n,o;return t=bn,(e=function(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=jn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=wr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=jn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=wr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=jn())!==u?(59===r.charCodeAt(bn)?(a=b,bn++):(a=u,0===wn&&kn(Bt)),a!==u?(mn=o,o=_r(i)):(bn=o,o=u)):(bn=o,o=u),o!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Cr(e)),e}())===u&&(e=null),(n=function(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=En())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Sr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=En())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Sr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=En())!==u?(59===r.charCodeAt(bn)?(a=b,bn++):(a=u,0===wn&&kn(Bt)),a!==u?(mn=o,o=kr(i)):(bn=o,o=u)):(bn=o,o=u),o!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Lr(e)),e}())===u&&(n=null),(o=function(){var t,e,n,o;if(t=[],e=bn,(n=Pn())!==u?(Un(),59===r.charCodeAt(bn)?(o=b,bn++):(o=u,0===wn&&kn(Bt)),o!==u?(mn=e,e=Mr(n)):(bn=e,e=u)):(bn=e,e=u),e!==u)for(;e!==u;)t.push(e),e=bn,(n=Pn())!==u?(Un(),59===r.charCodeAt(bn)?(o=b,bn++):(o=u,0===wn&&kn(Bt)),o!==u?(mn=e,e=Mr(n)):(bn=e,e=u)):(bn=e,e=u);else t=u;return t}())===u&&(o=null),mn=t,xr(e,n,o)}(),Un(),125===r.charCodeAt(bn)?(i=h,bn++):(i=u,0===wn&&kn(Dt)),i!==u?(Un(),mn=t,t=vr(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t}function jn(){var t,e,n,o;return wn++,t=bn,Un(),(e=r.substr(bn,6)).toLowerCase()===m?bn+=6:(e=u,0===wn&&kn(Ht)),e===u&&((e=r.substr(bn,5)).toLowerCase()===y?bn+=5:(e=u,0===wn&&kn(Rt)),e===u&&((e=r.substr(bn,11)).toLowerCase()===v?bn+=11:(e=u,0===wn&&kn(Wt)))),e!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=function(){var t,e;return wn++,t=bn,(e=function(){var t,e,n,o;return t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u&&(n=Kn())!==u?(34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=ln(n)):(bn=t,t=u)):(bn=t,t=u),t}())!==u&&(mn=t,e=un(e)),(t=e)===u&&(t=bn,(e=Kn())!==u&&(mn=t,e=sn(e)),t=e),wn--,t===u&&(e=u,0===wn&&kn(ur)),t}())!==u?(Un(),mn=t,t=Ar(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=r.substr(bn,12)).toLowerCase()===w?bn+=12:(e=u,0===wn&&kn(zt)),e!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=function(){var t,e;return wn++,t=bn,(e=function(){var t,e,n,o;return t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u&&(n=Yn())!==u?(34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=gn(n)):(bn=t,t=u)):(bn=t,t=u),t}())!==u&&(mn=t,e=hn(e)),(t=e)===u&&(t=bn,(e=Yn())!==u&&(mn=t,e=pn(e)),t=e),wn--,t===u&&(e=u,0===wn&&kn(hr)),t}())!==u?(Un(),mn=t,t=Or(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u)),wn--,t===u&&0===wn&&kn(Nt),t}function En(){var t,e,n,o,i,a;return wn++,t=bn,Un(),(e=Nn())!==u?(Un(),n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(Vt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=jr(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),o=Un(),mn=t,t=Er(e,n)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Rn())!==u?(Un(),n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(Vt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=Pr(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),o=Un(),mn=t,t=Tr(e,n)):(bn=t,t=u)),wn--,t===u&&0===wn&&kn(Xt),t}function Pn(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=Tn())!==u?(Un(),44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Dr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=Tn())!==u?(Un(),44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Dr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=Tn())!==u&&(mn=o,i=Fr(i)),(o=i)!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Ir(e)),e}function Tn(){var t,e,n,o,i,a;return t=bn,e=bn,(n=function(){var t,e;return t=bn,Un(),(e=function(){var t;return wn++,r.substr(bn,3)===O?(t=O,bn+=3):(t=u,0===wn&&kn(Kt)),t===u&&(r.substr(bn,3)===S?(t=S,bn+=3):(t=u,0===wn&&kn(Zt))),wn--,t===u&&0===wn&&kn(Ut),t}())!==u?(Un(),mn=t,t=Gr(e)):(bn=t,t=u),t}())!==u&&(mn=e,n=Br(n)),(e=n)===u&&(e=bn,(n=function(){var t,e,n,o;return t=bn,Un(),(e=Hn())!==u?(Un(),(n=function(){var t,e;return t=bn,(e=Mn())===u&&(e=Dn())===u&&(e=Fn())===u&&(e=function(){var t;return wn++,(t=r.substr(bn,4)).toLowerCase()===K?bn+=4:(t=u,0===wn&&kn(Ae)),t===u&&((t=r.substr(bn,4)).toLowerCase()===Z?bn+=4:(t=u,0===wn&&kn(Oe)),t===u&&((t=r.substr(bn,4)).toLowerCase()===Y?bn+=4:(t=u,0===wn&&kn(Se)),t===u&&((t=r.substr(bn,3)).toLowerCase()===Q?bn+=3:(t=u,0===wn&&kn(ke))))),wn--,t===u&&0===wn&&kn(Ce),t}()),e!==u&&(mn=t,e=Ur(e)),e}())!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=Xr(e,n,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),42===r.charCodeAt(bn)?(e=A,bn++):(e=u,0===wn&&kn(qt)),e!==u?(Un(),(n=Fn())!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=Vr(n,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Hn())!==u?(Un(),(n=Dn())!==u?(Un(),42===r.charCodeAt(bn)?(o=A,bn++):(o=u,0===wn&&kn(qt)),o!==u?(Un(),mn=t,t=$r(e,n)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Hn())!==u?(Un(),(n=Mn())!==u?(Un(),42===r.charCodeAt(bn)?(o=A,bn++):(o=u,0===wn&&kn(qt)),o!==u?(Un(),mn=t,t=qr(e,n)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u)))),t}())!==u&&(mn=e,n=Nr(n)),(e=n)===u&&(e=bn,(n=function(){var t,e;return t=bn,Un(),(e=function(){var t;return wn++,r.substr(bn,3)===k?(t=k,bn+=3):(t=u,0===wn&&kn(Qt)),wn--,t===u&&0===wn&&kn(Yt),t}())!==u?(Un(),mn=t,t=zr(e)):(bn=t,t=u),t}())!==u&&(mn=e,n=Hr(n)),e=n)),e!==u?(n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(Vt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=Rr(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),mn=t,t=Wr(e,n)):(bn=t,t=u),t}function Mn(){var t;return wn++,r.substr(bn,2)===L?(t=L,bn+=2):(t=u,0===wn&&kn(te)),t===u&&(r.substr(bn,3)===j?(t=j,bn+=3):(t=u,0===wn&&kn(ee)),t===u&&(r.substr(bn,2)===E?(t=E,bn+=2):(t=u,0===wn&&kn(re)),t===u&&(r.substr(bn,5)===P?(t=P,bn+=5):(t=u,0===wn&&kn(ne)),t===u&&(r.substr(bn,3)===T?(t=T,bn+=3):(t=u,0===wn&&kn(oe)),t===u&&(r.substr(bn,2)===M?(t=M,bn+=2):(t=u,0===wn&&kn(ie)),t===u&&(r.substr(bn,4)===D?(t=D,bn+=4):(t=u,0===wn&&kn(ae)),t===u&&(r.substr(bn,2)===F?(t=F,bn+=2):(t=u,0===wn&&kn(ce)),t===u&&(r.substr(bn,3)===I?(t=I,bn+=3):(t=u,0===wn&&kn(ue)))))))))),wn--,t===u&&0===wn&&kn(Jt),t}function Dn(){var t;return wn++,r.substr(bn,2)===B?(t=B,bn+=2):(t=u,0===wn&&kn(le)),t===u&&(r.substr(bn,3)===N?(t=N,bn+=3):(t=u,0===wn&&kn(fe)),t===u&&(r.substr(bn,2)===H?(t=H,bn+=2):(t=u,0===wn&&kn(de)),t===u&&(r.substr(bn,2)===R?(t=R,bn+=2):(t=u,0===wn&&kn(he)),t===u&&(r.substr(bn,2)===W?(t=W,bn+=2):(t=u,0===wn&&kn(pe)),t===u&&((t=r.substr(bn,2)).toLowerCase()===G?bn+=2:(t=u,0===wn&&kn(ge))))))),wn--,t===u&&0===wn&&kn(se),t}function Fn(){var t;return wn++,r.substr(bn,2)===z?(t=z,bn+=2):(t=u,0===wn&&kn(me)),t===u&&(r.substr(bn,3)===X?(t=X,bn+=3):(t=u,0===wn&&kn(ye)),t===u&&(r.substr(bn,2)===V?(t=V,bn+=2):(t=u,0===wn&&kn(ve)),t===u&&(r.substr(bn,2)===$?(t=$,bn+=2):(t=u,0===wn&&kn(xe)),t===u&&(r.substr(bn,2)===q?(t=q,bn+=2):(t=u,0===wn&&kn(we)),t===u&&((t=r.substr(bn,2)).toLowerCase()===U?bn+=2:(t=u,0===wn&&kn(_e))))))),wn--,t===u&&0===wn&&kn(be),t}function In(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=Bn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Kr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=Bn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Kr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=Bn())!==u&&(mn=o,i=Zr(i)),(o=i)!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Yr(e)),e}function Bn(){var t,e,n,o;return t=bn,Un(),(e=function(){var t;return wn++,(t=r.substr(bn,5)).toLowerCase()===J?bn+=5:(t=u,0===wn&&kn(je)),t===u&&((t=r.substr(bn,5)).toLowerCase()===tt?bn+=5:(t=u,0===wn&&kn(Ee)),t===u&&((t=r.substr(bn,2)).toLowerCase()===et?bn+=2:(t=u,0===wn&&kn(Pe)),t===u&&((t=r.substr(bn,3)).toLowerCase()===rt?bn+=3:(t=u,0===wn&&kn(Te)),t===u&&((t=r.substr(bn,9)).toLowerCase()===nt?bn+=9:(t=u,0===wn&&kn(Me)),t===u&&((t=r.substr(bn,10)).toLowerCase()===ot?bn+=10:(t=u,0===wn&&kn(De)),t===u&&((t=r.substr(bn,9)).toLowerCase()===it?bn+=9:(t=u,0===wn&&kn(Fe)),t===u&&((t=r.substr(bn,10)).toLowerCase()===at?bn+=10:(t=u,0===wn&&kn(Ie)),t===u&&((t=r.substr(bn,11)).toLowerCase()===ct?bn+=11:(t=u,0===wn&&kn(Be)),t===u&&((t=r.substr(bn,12)).toLowerCase()===ut?bn+=12:(t=u,0===wn&&kn(Ne)),t===u&&((t=r.substr(bn,12)).toLowerCase()===st?bn+=12:(t=u,0===wn&&kn(He)),t===u&&((t=r.substr(bn,13)).toLowerCase()===lt?bn+=13:(t=u,0===wn&&kn(Re)),t===u&&((t=r.substr(bn,12)).toLowerCase()===ft?bn+=12:(t=u,0===wn&&kn(We)),t===u&&((t=r.substr(bn,13)).toLowerCase()===dt?bn+=13:(t=u,0===wn&&kn(Ge)),t===u&&((t=r.substr(bn,14)).toLowerCase()===ht?bn+=14:(t=u,0===wn&&kn(ze)),t===u&&((t=r.substr(bn,15)).toLowerCase()===pt?bn+=15:(t=u,0===wn&&kn(Xe)),t===u&&((t=r.substr(bn,7)).toLowerCase()===gt?bn+=7:(t=u,0===wn&&kn(Ve)))))))))))))))))),wn--,t===u&&0===wn&&kn(Le),t}())!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=Qr(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t}function Nn(){var t,e,n,o;return wn++,t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=bn,n=bn,wn++,34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),wn--,o===u?n=void 0:(bn=n,n=u),n!==u?(r.substr(bn,2)===mt?(o=mt,bn+=2):(o=u,0===wn&&kn(Ue)),o===u&&(r.length>bn?(o=r.charAt(bn),bn++):(o=u,0===wn&&kn(Ke))),o!==u?(mn=e,e=tn(o)):(bn=e,e=u)):(bn=e,e=u);e!==u;)t.push(e),e=bn,n=bn,wn++,34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),wn--,o===u?n=void 0:(bn=n,n=u),n!==u?(r.substr(bn,2)===mt?(o=mt,bn+=2):(o=u,0===wn&&kn(Ue)),o===u&&(r.length>bn?(o=r.charAt(bn),bn++):(o=u,0===wn&&kn(Ke))),o!==u?(mn=e,e=tn(o)):(bn=e,e=u)):(bn=e,e=u);return t}(),34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=Jr(n)):(bn=t,t=u)):(bn=t,t=u),wn--,t===u&&(e=u,0===wn&&kn($e)),t}function Hn(){var t;return wn++,(t=Rn())===u&&(t=Nn()),wn--,t===u&&0===wn&&kn(Ze),t}function Rn(){var t,e,n;if(t=bn,e=[],n=r.charAt(bn),kt.test(n)?bn++:(n=u,0===wn&&kn(Ye)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(bn),kt.test(n)?bn++:(n=u,0===wn&&kn(Ye));else e=u;return e!==u&&(mn=t,e=en(e)),e}function Wn(){var t,e;return wn++,t=bn,e=r.charAt(bn),Lt.test(e)?bn++:(e=u,0===wn&&kn(Je)),e!==u&&(mn=t,e=rn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(Qe)),t}function Gn(){var t,e;return wn++,t=bn,e=r.charAt(bn),jt.test(e)?bn++:(e=u,0===wn&&kn(er)),e!==u&&(mn=t,e=nn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(tr)),t}function zn(){var t,e,n;return t=bn,e=bn,wn++,r.substr(bn,2)===vt?(n=vt,bn+=2):(n=u,0===wn&&kn(nr)),wn--,n===u?e=void 0:(bn=e,e=u),e!==u?(r.length>bn?(n=r.charAt(bn),bn++):(n=u,0===wn&&kn(Ke)),n!==u?(mn=t,t=on(n)):(bn=t,t=u)):(bn=t,t=u),t}function Xn(){var t,e,n,o;if(t=bn,(e=function(){var t;return r.substr(bn,2)===yt?(t=yt,bn+=2):(t=u,0===wn&&kn(rr)),t}())!==u){for(n=[],o=zn();o!==u;)n.push(o),o=zn();(o=function(){var t;return r.substr(bn,2)===vt?(t=vt,bn+=2):(t=u,0===wn&&kn(nr)),t}())!==u?(mn=t,t=an(e,n,o)):(bn=t,t=u)}else bn=t,t=u;return t}function Vn(){var t;return t=r.charAt(bn),Et.test(t)?bn++:(t=u,0===wn&&kn(ar)),t}function $n(){var t,e,n,o;if(t=bn,(e=function(){var t;return r.substr(bn,2)===xt?(t=xt,bn+=2):(t=u,0===wn&&kn(or)),t===u&&(35===r.charCodeAt(bn)?(t=wt,bn++):(t=u,0===wn&&kn(ir))),t}())!==u){for(n=[],o=Vn();o!==u;)n.push(o),o=Vn();mn=t,t=cn(e,n)}else bn=t,t=u;return t}function qn(){var t;return wn++,(t=$n())===u&&(t=Xn()),wn--,t===u&&0===wn&&kn(cr),t}function Un(){var t,e;for(t=[],(e=Wn())===u&&(e=Gn())===u&&(e=qn());e!==u;)t.push(e),(e=Wn())===u&&(e=Gn())===u&&(e=qn());return t}function Kn(){var t;return(t=function(){var t,e,n,o,i;return wn++,t=bn,e=bn,(n=Zn())!==u?(46===r.charCodeAt(bn)?(o=_t,bn++):(o=u,0===wn&&kn(dr)),o!==u&&(i=Zn())!==u?e=n=[n,o,i]:(bn=e,e=u)):(bn=e,e=u),e!==u&&(mn=t,e=dn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(fr)),t}())===u&&(t=Zn()),t}function Zn(){var t,e,n;if(wn++,t=bn,e=[],n=r.charAt(bn),Pt.test(n)?bn++:(n=u,0===wn&&kn(lr)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(bn),Pt.test(n)?bn++:(n=u,0===wn&&kn(lr));else e=u;return e!==u&&(mn=t,e=fn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(sr)),t}function Yn(){var t;return(t=r.substr(bn,4)).toLowerCase()===Ct?bn+=4:(t=u,0===wn&&kn(pr)),t===u&&((t=r.substr(bn,5)).toLowerCase()===At?bn+=5:(t=u,0===wn&&kn(gr)),t===u&&((t=r.substr(bn,2)).toLowerCase()===Ot?bn+=2:(t=u,0===wn&&kn(br)),t===u&&((t=r.substr(bn,3)).toLowerCase()===St?bn+=3:(t=u,0===wn&&kn(mr)),t===u&&(t=r.charAt(bn),Tt.test(t)?bn++:(t=u,0===wn&&kn(yr)))))),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:bn,peg$FAILED:u,peg$maxFailExpected:xn,peg$maxFailPos:vn};if(o!==u&&bn===r.length)return o;throw o!==u&&bne?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",P="==",T="<<=>>",M="<=>",D="..",F="<<>>",I="::",B="<:>",N="->",H="=>>",R="=>",W=">>",G=":>",z="-x",X="<-",V="<<=",$="<=",q="<<",U="<:",K="x-",Z="note",Y="abox",Q="rbox",J="box",tt="alt",et="else",rt="opt",nt="break",ot="par",it="seq",at="strict",ct="neg",ut="critical",st="ignore",lt="consider",ft="assert",dt="loop",ht="ref",pt="exc",gt='"',bt='\\"',mt="/*",yt="*/",vt="//",xt="#",wt=".",_t="true",Ct="false",At="on",Ot="off",St="auto",kt=/^[,;{]/,Lt=/^[^;, "\t\n\r=\-><:{*]/,jt=/^[ \t]/,Et=/^[\r\n]/,Pt=/^[^\r\n]/,Tt=/^[0-9]/,Mt=/^[0-1]/,Dt=kn(",",!1),Ft=kn(";",!1),It=kn("hscale",!0),Bt=kn("arcgradient",!0),Nt=kn("=",!1),Ht=kn("width",!0),Rt=kn("wordwraparcs",!0),Wt=kn("wordwrapentities",!0),Gt=kn("wordwrapboxes",!0),zt=kn("watermark",!0),Xt=jn("entity"),Vt=kn(":",!1),$t=kn("*",!1),qt=kn("{",!1),Ut=kn("}",!1),Kt=jn("empty row"),Zt=kn("|||",!1),Yt=kn("...",!1),Qt=jn("---"),Jt=kn("---",!1),te=jn("bi-directional arrow"),ee=kn("--",!1),re=kn("<->",!1),ne=kn("==",!1),oe=kn("<<=>>",!1),ie=kn("<=>",!1),ae=kn("..",!1),ce=kn("<<>>",!1),ue=kn("::",!1),se=kn("<:>",!1),le=jn("left to right arrow"),fe=kn("->",!1),de=kn("=>>",!1),he=kn("=>",!1),pe=kn(">>",!1),ge=kn(":>",!1),be=kn("-x",!0),me=jn("right to left arrow"),ye=kn("<-",!1),ve=kn("<<=",!1),xe=kn("<=",!1),we=kn("<<",!1),_e=kn("<:",!1),Ce=kn("x-",!0),Ae=jn("box"),Oe=kn("note",!0),Se=kn("abox",!0),ke=kn("rbox",!0),Le=kn("box",!0),je=jn("inline expression"),Ee=kn("alt",!0),Pe=kn("else",!0),Te=kn("opt",!0),Me=kn("break",!0),De=kn("par",!0),Fe=kn("seq",!0),Ie=kn("strict",!0),Be=kn("neg",!0),Ne=kn("critical",!0),He=kn("ignore",!0),Re=kn("consider",!0),We=kn("assert",!0),Ge=kn("loop",!0),ze=kn("ref",!0),Xe=kn("exc",!0),Ve=jn("double quoted string"),$e=kn('"',!1),qe=kn('\\"',!1),Ue={type:"any"},Ke=Ln([",",";","{"],!1,!1),Ze=jn("identifier"),Ye=Ln([";",","," ",'"',"\t","\n","\r","=","-",">","<",":","{","*"],!0,!1),Qe=jn("whitespace"),Je=Ln([" ","\t"],!1,!1),tr=jn("lineend"),er=Ln(["\r","\n"],!1,!1),rr=kn("/*",!1),nr=kn("*/",!1),or=kn("//",!1),ir=kn("#",!1),ar=Ln(["\r","\n"],!0,!1),cr=jn("comment"),ur=jn("number"),sr=Ln([["0","9"]],!1,!1),lr=kn(".",!1),fr=jn("boolean"),dr=kn("true",!0),hr=kn("false",!0),pr=kn("on",!0),gr=kn("off",!0),br=Ln([["0","1"]],!1,!1),mr=jn("size"),yr=kn("auto",!0),vr=function(e,r){return r.entities=ao(r.entities||[],r.arcs),r={meta:t.getMetaInfo(r.options,r.arcs),...r},e.length>0&&(r={precomment:e,...r}),r},xr=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},wr=function(t){return t},_r=function(t){return t},Cr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Ar=function(e,r){return t.nameValue2Option(e,r)},Or=function(e,r){return t.nameValue2Option(e,r)},Sr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},kr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Lr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},jr=function(e,r){return t.nameValue2Option(e,r)},Er=function(t){return t},Pr=function(t){return t},Tr=function(t){return t[0].concat(t[1])},Mr=function(t,e){return e},Dr=function(t,e){var r=io(t);return e&&(r.label=e),r},Fr=function(t){return t},Ir=function(t){return t},Br=function(t){return t},Nr=function(t){return t[0].concat(t[1])},Hr=function(t){return t},Rr=function(t){return t},Wr=function(t){return t},Gr=function(t,e){return e},zr=function(t,e){return e&&(t.label=e),t},Xr=function(t){return{kind:t}},Vr=function(t){return{kind:t}},$r=function(t,e,r){return{kind:e,from:t,to:r}},qr=function(t,e){return{kind:t,from:"*",to:e}},Ur=function(t,e){return{kind:e,from:t,to:"*"}},Kr=function(t,e){return{kind:e,from:t,to:"*"}},Zr=function(t,e,r,n){return n},Yr=function(t,e,r,n,o){var i={kind:e,from:t,to:r,arcs:o};return n&&(i.label=n),i},Qr=function(t){return t.toLowerCase()},Jr=function(t){return t.toLowerCase()},tn=function(t){return t.join("")},en=function(t){return t},rn=function(t){return t.join("").trim()},nn=function(t){return t},on=function(t){return t.join("")},an=function(t){return t},cn=function(t){return t},un=function(t){return t},sn=function(t,e,r){return t+e.join("")+r},ln=function(t,e){return t+e.join("")},fn=function(t){return t},dn=function(t){return t.toString()},hn=function(t){return t.toString()},pn=function(t){return parseInt(t.join(""),10)},gn=function(t){return parseFloat(t.join(""))},bn=function(t){return t},mn=function(t){return t.toString()},yn=function(t){return t},vn=function(t){return t},xn=function(t){return t.toString()},wn=function(t){return t.toLowerCase()},_n=0|n.peg$currPos,Cn=[{line:1,column:1}],An=_n,On=n.peg$maxFailExpected||[],Sn=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function kn(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ln(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function jn(t){return{type:"other",description:t}}function En(t){var e,n=Cn[t];if(n)return n;if(t>=Cn.length)e=Cn.length-1;else for(e=t;!Cn[--e];);for(n={line:(n=Cn[e]).line,column:n.column};eAn&&(An=_n,On=[]),On.push(t))}function Mn(){var t,e;return t=Qn(),e=function(){var t,e,n;return(t=function(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Dn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=wr(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Dn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=wr(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Dn())!==u?(59===r.charCodeAt(_n)?(i=h,_n++):(i=u,0===Sn&&Tn(Ft)),i!==u?n=_r(o):(_n=n,n=u)):(_n=n,n=u),n!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Cr(t)),t}())===u&&(t=null),(e=function(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Fn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=Er(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Fn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=Er(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Fn())!==u?(59===r.charCodeAt(_n)?(i=h,_n++):(i=u,0===Sn&&Tn(Ft)),i!==u?n=Pr(o):(_n=n,n=u)):(_n=n,n=u),n!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Tr(t)),t}())===u&&(e=null),(n=In())===u&&(n=null),xr(t,e,n)}(),Qn(),vr(t,e)}function Dn(){var t,e,n,o;return t=_n,Qn(),(e=r.substr(_n,6)).toLowerCase()===p?_n+=6:(e=u,0===Sn&&Tn(It)),e===u&&((e=r.substr(_n,11)).toLowerCase()===g?_n+=11:(e=u,0===Sn&&Tn(Bt))),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=function(){var t,e;return Sn++,t=_n,(e=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Tn($e)),e!==u&&(n=Jn())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),o!==u?t=hn(n):(_n=t,t=u)):(_n=t,t=u),t}())!==u&&(e=fn(e)),(t=e)===u&&(t=_n,(e=Jn())!==u&&(e=dn(e)),t=e),Sn--,t===u&&(e=u,0===Sn&&Tn(ur)),t}())!==u?(Qn(),t=Ar(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,5)).toLowerCase()===m?_n+=5:(e=u,0===Sn&&Tn(Ht)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=function(){var t;return Sn++,(t=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Tn($e)),e!==u&&(n=no())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),o!==u?t=vn(n):(_n=t,t=u)):(_n=t,t=u),t}())===u&&(t=no()),Sn--,t===u&&0===Sn&&Tn(mr),t}())!==u?(Qn(),t=Or(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,12)).toLowerCase()===y?_n+=12:(e=u,0===Sn&&Tn(Rt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=Sr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,16)).toLowerCase()===v?_n+=16:(e=u,0===Sn&&Tn(Wt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=kr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,13)).toLowerCase()===x?_n+=13:(e=u,0===Sn&&Tn(Gt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=Lr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,9)).toLowerCase()===w?_n+=9:(e=u,0===Sn&&Tn(zt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Tn(Nt)),n!==u?(Qn(),(o=zn())!==u?(Qn(),t=jr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)))))),t}function Fn(){var t,e,n,o,i;return Sn++,t=_n,Qn(),(e=Xn())!==u?(Qn(),n=_n,58===r.charCodeAt(_n)?(o=_,_n++):(o=u,0===Sn&&Tn(Vt)),o!==u?(Qn(),(i=Gn())!==u?(Qn(),n=Mr(e,i)):(_n=n,n=u)):(_n=n,n=u),n===u&&(n=null),t=Dr(e,n)):(_n=t,t=u),Sn--,t===u&&0===Sn&&Tn(Xt),t}function In(){var t,e,n,o;if(t=[],e=_n,(n=Bn())!==u?(Qn(),59===r.charCodeAt(_n)?(o=h,_n++):(o=u,0===Sn&&Tn(Ft)),o!==u?e=Fr(n):(_n=e,e=u)):(_n=e,e=u),e!==u)for(;e!==u;)t.push(e),e=_n,(n=Bn())!==u?(Qn(),59===r.charCodeAt(_n)?(o=h,_n++):(o=u,0===Sn&&Tn(Ft)),o!==u?e=Fr(n):(_n=e,e=u)):(_n=e,e=u);else t=u;return t}function Bn(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Nn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=Ir(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Nn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Tn(Dt)),i!==u?n=Ir(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Nn())!==u&&(o=Br(o)),(n=o)!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Nr(t)),t}function Nn(){var t;return(t=function(){var t,e,n,o,i;return t=_n,e=_n,(n=function(){var t,e;return t=_n,Qn(),(e=function(){var t;return Sn++,r.substr(_n,3)===S?(t=S,_n+=3):(t=u,0===Sn&&Tn(Zt)),t===u&&(r.substr(_n,3)===k?(t=k,_n+=3):(t=u,0===Sn&&Tn(Yt))),Sn--,t===u&&0===Sn&&Tn(Kt),t}())!==u?(Qn(),t=Xr(e)):(_n=t,t=u),t}())!==u&&(n=Hr(n)),(e=n)===u&&(e=_n,(n=function(){var t,e,n,o;return t=_n,Qn(),(e=Xn())!==u?(Qn(),(n=function(){var t;return(t=Hn())===u&&(t=Rn())===u&&(t=Wn())===u&&(t=function(){var t;return Sn++,(t=r.substr(_n,4)).toLowerCase()===Z?_n+=4:(t=u,0===Sn&&Tn(Oe)),t===u&&((t=r.substr(_n,4)).toLowerCase()===Y?_n+=4:(t=u,0===Sn&&Tn(Se)),t===u&&((t=r.substr(_n,4)).toLowerCase()===Q?_n+=4:(t=u,0===Sn&&Tn(ke)),t===u&&((t=r.substr(_n,3)).toLowerCase()===J?_n+=3:(t=u,0===Sn&&Tn(Le))))),Sn--,t===u&&0===Sn&&Tn(Ae),t}()),t!==u&&(t=Qr(t)),t}())!==u?(Qn(),(o=Xn())!==u?(Qn(),t=$r(e,n,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),42===r.charCodeAt(_n)?(e=C,_n++):(e=u,0===Sn&&Tn($t)),e!==u?(Qn(),(n=Wn())!==u?(Qn(),(o=Xn())!==u?(Qn(),t=qr(n,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=Xn())!==u?(Qn(),(n=Rn())!==u?(Qn(),42===r.charCodeAt(_n)?(o=C,_n++):(o=u,0===Sn&&Tn($t)),o!==u?(Qn(),t=Ur(e,n)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=Xn())!==u?(Qn(),(n=Hn())!==u?(Qn(),42===r.charCodeAt(_n)?(o=C,_n++):(o=u,0===Sn&&Tn($t)),o!==u?(Qn(),t=Kr(e,n)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)))),t}())!==u&&(n=Rr(n)),(e=n)===u&&(e=_n,(n=function(){var t,e;return t=_n,Qn(),(e=function(){var t;return Sn++,r.substr(_n,3)===L?(t=L,_n+=3):(t=u,0===Sn&&Tn(Jt)),Sn--,t===u&&0===Sn&&Tn(Qt),t}())!==u?(Qn(),t=Vr(e)):(_n=t,t=u),t}())!==u&&(n=Wr(n)),e=n)),e!==u?(n=_n,58===r.charCodeAt(_n)?(o=_,_n++):(o=u,0===Sn&&Tn(Vt)),o!==u?(Qn(),(i=Gn())!==u?(Qn(),n=Gr(e,i)):(_n=n,n=u)):(_n=n,n=u),n===u&&(n=null),t=zr(e,n)):(_n=t,t=u),t}())===u&&(t=function(){var t,e,n,o,i,a,c,s;return t=_n,Qn(),(e=Xn())!==u?(Qn(),(n=function(){var t,e;return Sn++,t=_n,(e=r.substr(_n,3)).toLowerCase()===tt?_n+=3:(e=u,0===Sn&&Tn(Ee)),e===u&&((e=r.substr(_n,4)).toLowerCase()===et?_n+=4:(e=u,0===Sn&&Tn(Pe)),e===u&&((e=r.substr(_n,3)).toLowerCase()===rt?_n+=3:(e=u,0===Sn&&Tn(Te)),e===u&&((e=r.substr(_n,5)).toLowerCase()===nt?_n+=5:(e=u,0===Sn&&Tn(Me)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ot?_n+=3:(e=u,0===Sn&&Tn(De)),e===u&&((e=r.substr(_n,3)).toLowerCase()===it?_n+=3:(e=u,0===Sn&&Tn(Fe)),e===u&&((e=r.substr(_n,6)).toLowerCase()===at?_n+=6:(e=u,0===Sn&&Tn(Ie)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ct?_n+=3:(e=u,0===Sn&&Tn(Be)),e===u&&((e=r.substr(_n,8)).toLowerCase()===ut?_n+=8:(e=u,0===Sn&&Tn(Ne)),e===u&&((e=r.substr(_n,6)).toLowerCase()===st?_n+=6:(e=u,0===Sn&&Tn(He)),e===u&&((e=r.substr(_n,8)).toLowerCase()===lt?_n+=8:(e=u,0===Sn&&Tn(Re)),e===u&&((e=r.substr(_n,6)).toLowerCase()===ft?_n+=6:(e=u,0===Sn&&Tn(We)),e===u&&((e=r.substr(_n,4)).toLowerCase()===dt?_n+=4:(e=u,0===Sn&&Tn(Ge)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ht?_n+=3:(e=u,0===Sn&&Tn(ze)),e===u&&((e=r.substr(_n,3)).toLowerCase()===pt?_n+=3:(e=u,0===Sn&&Tn(Xe)))))))))))))))),e!==u&&(e=Jr(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Tn(je)),t}())!==u?(Qn(),(o=Xn())!==u?(Qn(),i=_n,58===r.charCodeAt(_n)?(a=_,_n++):(a=u,0===Sn&&Tn(Vt)),a!==u?(Qn(),(c=Gn())!==u?(Qn(),i=Zr(e,n,o,c)):(_n=i,i=u)):(_n=i,i=u),i===u&&(i=null),123===r.charCodeAt(_n)?(a=A,_n++):(a=u,0===Sn&&Tn(qt)),a!==u?(Qn(),(c=In())===u&&(c=null),Qn(),125===r.charCodeAt(_n)?(s=O,_n++):(s=u,0===Sn&&Tn(Ut)),s!==u?(Qn(),t=Yr(e,n,o,i,c)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t}()),t}function Hn(){var t;return Sn++,r.substr(_n,2)===j?(t=j,_n+=2):(t=u,0===Sn&&Tn(ee)),t===u&&(r.substr(_n,3)===E?(t=E,_n+=3):(t=u,0===Sn&&Tn(re)),t===u&&(r.substr(_n,2)===P?(t=P,_n+=2):(t=u,0===Sn&&Tn(ne)),t===u&&(r.substr(_n,5)===T?(t=T,_n+=5):(t=u,0===Sn&&Tn(oe)),t===u&&(r.substr(_n,3)===M?(t=M,_n+=3):(t=u,0===Sn&&Tn(ie)),t===u&&(r.substr(_n,2)===D?(t=D,_n+=2):(t=u,0===Sn&&Tn(ae)),t===u&&(r.substr(_n,4)===F?(t=F,_n+=4):(t=u,0===Sn&&Tn(ce)),t===u&&(r.substr(_n,2)===I?(t=I,_n+=2):(t=u,0===Sn&&Tn(ue)),t===u&&(r.substr(_n,3)===B?(t=B,_n+=3):(t=u,0===Sn&&Tn(se)))))))))),Sn--,t===u&&0===Sn&&Tn(te),t}function Rn(){var t;return Sn++,r.substr(_n,2)===N?(t=N,_n+=2):(t=u,0===Sn&&Tn(fe)),t===u&&(r.substr(_n,3)===H?(t=H,_n+=3):(t=u,0===Sn&&Tn(de)),t===u&&(r.substr(_n,2)===R?(t=R,_n+=2):(t=u,0===Sn&&Tn(he)),t===u&&(r.substr(_n,2)===W?(t=W,_n+=2):(t=u,0===Sn&&Tn(pe)),t===u&&(r.substr(_n,2)===G?(t=G,_n+=2):(t=u,0===Sn&&Tn(ge)),t===u&&((t=r.substr(_n,2)).toLowerCase()===z?_n+=2:(t=u,0===Sn&&Tn(be))))))),Sn--,t===u&&0===Sn&&Tn(le),t}function Wn(){var t;return Sn++,r.substr(_n,2)===X?(t=X,_n+=2):(t=u,0===Sn&&Tn(ye)),t===u&&(r.substr(_n,3)===V?(t=V,_n+=3):(t=u,0===Sn&&Tn(ve)),t===u&&(r.substr(_n,2)===$?(t=$,_n+=2):(t=u,0===Sn&&Tn(xe)),t===u&&(r.substr(_n,2)===q?(t=q,_n+=2):(t=u,0===Sn&&Tn(we)),t===u&&(r.substr(_n,2)===U?(t=U,_n+=2):(t=u,0===Sn&&Tn(_e)),t===u&&((t=r.substr(_n,2)).toLowerCase()===K?_n+=2:(t=u,0===Sn&&Tn(Ce))))))),Sn--,t===u&&0===Sn&&Tn(me),t}function Gn(){var t,e;return(t=zn())===u&&(e=function(){var t,e,n,o;for(t=[],e=_n,n=_n,Sn++,o=r.charAt(_n),kt.test(o)?_n++:(o=u,0===Sn&&Tn(Ke)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Tn(Ue)),o!==u?e=nn(o):(_n=e,e=u)):(_n=e,e=u);e!==u;)t.push(e),e=_n,n=_n,Sn++,o=r.charAt(_n),kt.test(o)?_n++:(o=u,0===Sn&&Tn(Ke)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Tn(Ue)),o!==u?e=nn(o):(_n=e,e=u)):(_n=e,e=u);return t}(),t=rn(e)),t}function zn(){var t,e,n,o;return Sn++,t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Tn($e)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=_n,n=_n,Sn++,34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.substr(_n,2)===bt?(o=bt,_n+=2):(o=u,0===Sn&&Tn(qe)),o===u&&(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Tn(Ue))),o!==u?e=en(o):(_n=e,e=u)):(_n=e,e=u);e!==u;)t.push(e),e=_n,n=_n,Sn++,34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.substr(_n,2)===bt?(o=bt,_n+=2):(o=u,0===Sn&&Tn(qe)),o===u&&(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Tn(Ue))),o!==u?e=en(o):(_n=e,e=u)):(_n=e,e=u);return t}(),34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),o!==u?t=tn(n):(_n=t,t=u)):(_n=t,t=u),Sn--,t===u&&(e=u,0===Sn&&Tn(Ve)),t}function Xn(){var t,e,n;if(Sn++,t=_n,e=[],n=r.charAt(_n),Lt.test(n)?_n++:(n=u,0===Sn&&Tn(Ye)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(_n),Lt.test(n)?_n++:(n=u,0===Sn&&Tn(Ye));else e=u;return e!==u&&(e=on(e)),(t=e)===u&&(t=zn()),Sn--,t===u&&(e=u,0===Sn&&Tn(Ze)),t}function Vn(){var t,e;return Sn++,_n,e=r.charAt(_n),jt.test(e)?_n++:(e=u,0===Sn&&Tn(Je)),e!==u&&(e=an(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Tn(Qe)),t}function $n(){var t,e;return Sn++,_n,e=r.charAt(_n),Et.test(e)?_n++:(e=u,0===Sn&&Tn(er)),e!==u&&(e=cn(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Tn(tr)),t}function qn(){var t,e,n;return t=_n,e=_n,Sn++,r.substr(_n,2)===yt?(n=yt,_n+=2):(n=u,0===Sn&&Tn(nr)),Sn--,n===u?e=void 0:(_n=e,e=u),e!==u?(r.length>_n?(n=r.charAt(_n),_n++):(n=u,0===Sn&&Tn(Ue)),n!==u?t=un(n):(_n=t,t=u)):(_n=t,t=u),t}function Un(){var t,e,n,o;if(t=_n,(e=function(){var t;return r.substr(_n,2)===mt?(t=mt,_n+=2):(t=u,0===Sn&&Tn(rr)),t}())!==u){for(n=[],o=qn();o!==u;)n.push(o),o=qn();(o=function(){var t;return r.substr(_n,2)===yt?(t=yt,_n+=2):(t=u,0===Sn&&Tn(nr)),t}())!==u?t=sn(e,n,o):(_n=t,t=u)}else _n=t,t=u;return t}function Kn(){var t;return t=r.charAt(_n),Pt.test(t)?_n++:(t=u,0===Sn&&Tn(ar)),t}function Zn(){var t,e,n,o;if(t=_n,(e=function(){var t;return r.substr(_n,2)===vt?(t=vt,_n+=2):(t=u,0===Sn&&Tn(or)),t===u&&(35===r.charCodeAt(_n)?(t=xt,_n++):(t=u,0===Sn&&Tn(ir))),t}())!==u){for(n=[],o=Kn();o!==u;)n.push(o),o=Kn();t=ln(e,n)}else _n=t,t=u;return t}function Yn(){var t;return Sn++,(t=Zn())===u&&(t=Un()),Sn--,t===u&&0===Sn&&Tn(cr),t}function Qn(){var t,e;for(t=[],(e=Vn())===u&&(e=$n())===u&&(e=Yn());e!==u;)t.push(e),(e=Vn())===u&&(e=$n())===u&&(e=Yn());return t}function Jn(){var t,e,n,o,i;return e=_n,(n=to())!==u?(46===r.charCodeAt(_n)?(o=wt,_n++):(o=u,0===Sn&&Tn(lr)),o!==u&&(i=to())!==u?e=n=[n,o,i]:(_n=e,e=u)):(_n=e,e=u),e!==u&&(e=gn(e)),(t=e)===u&&(t=to()),t}function to(){var t,e;if(t=[],e=r.charAt(_n),Tt.test(e)?_n++:(e=u,0===Sn&&Tn(sr)),e!==u)for(;e!==u;)t.push(e),e=r.charAt(_n),Tt.test(e)?_n++:(e=u,0===Sn&&Tn(sr));else t=u;return t!==u&&(t=pn(t)),t}function eo(){var t,e;return Sn++,t=_n,(e=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Tn($e)),e!==u&&(n=ro())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Tn($e)),o!==u?t=yn(n):(_n=t,t=u)):(_n=t,t=u),t}())!==u&&(e=bn(e)),(t=e)===u&&(t=_n,(e=ro())!==u&&(e=mn(e)),t=e),Sn--,t===u&&(e=u,0===Sn&&Tn(fr)),t}function ro(){var t;return(t=r.substr(_n,4)).toLowerCase()===_t?_n+=4:(t=u,0===Sn&&Tn(dr)),t===u&&((t=r.substr(_n,5)).toLowerCase()===Ct?_n+=5:(t=u,0===Sn&&Tn(hr)),t===u&&((t=r.substr(_n,2)).toLowerCase()===At?_n+=2:(t=u,0===Sn&&Tn(pr)),t===u&&((t=r.substr(_n,3)).toLowerCase()===Ot?_n+=3:(t=u,0===Sn&&Tn(gr)),t===u&&(t=r.charAt(_n),Mt.test(t)?_n++:(t=u,0===Sn&&Tn(br)))))),t}function no(){var t,e;return t=_n,(e=Jn())!==u&&(e=xn(e)),(t=e)===u&&(t=_n,(e=r.substr(_n,4)).toLowerCase()===St?_n+=4:(e=u,0===Sn&&Tn(yr)),e!==u&&(e=wn(e)),t=e),t}function oo(e,r,n){return!(t.entityExists(e,r)||!0===n[r])}function io(t){return{name:t}}function ao(t,e,r){return r||(r={}),(e||[]).forEach((function(e){e.forEach((function(e){oo(t,e.from,r)&&t.push(io(e.from)),e.arcs&&(r[e.to]=!0,Object.assign(t,ao(t,e.arcs,r)),delete r[e.to]),oo(t,e.to,r)&&t.push(io(e.to))}))})),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:_n,peg$FAILED:u,peg$maxFailExpected:On,peg$maxFailPos:An};if(o!==u&&_n===r.length)return o;throw o!==u&&_ne?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",D="==",F="<<=>>",I="<=>",B="..",N="<<>>",H="::",R="<:>",W="->",G="=>>",z="=>",X=">>",V=":>",$="-x",q="<-",U="<<=",K="<=",Z="<<",Y="<:",Q="x-",J="note",tt="abox",et="rbox",rt="box",nt="alt",ot="else",it="opt",at="break",ct="par",ut="seq",st="strict",lt="neg",ft="critical",dt="ignore",ht="consider",pt="assert",gt="loop",bt="ref",mt="exc",yt="activate",vt="deactivate",xt="label",wt="idurl",_t="id",Ct="url",At="linecolor",Ot="linecolour",St="textcolor",kt="textcolour",Lt="textbgcolor",jt="textbgcolour",Et="arclinecolor",Pt="arclinecolour",Tt="arctextcolor",Mt="arctextcolour",Dt="arctextbgcolor",Ft="arctextbgcolour",It="arcskip",Bt="title",Nt="activation",Ht='"',Rt='\\"',Wt="/*",Gt="*/",zt="//",Xt="#",Vt=".",$t="true",qt="false",Ut="on",Kt="off",Zt="auto",Yt=/^[A-Za-z_0-9]/,Qt=/^[ \t]/,Jt=/^[\r\n]/,te=/^[^\r\n]/,ee=/^[0-9]/,re=/^[0-1]/,ne=jo("{",!1),oe=jo("}",!1),ie=jo("msc",!0),ae=jo("xu",!0),ce=jo(",",!1),ue=jo(";",!1),se=Po("option"),le=jo("hscale",!0),fe=jo("arcgradient",!0),de=jo("=",!1),he=jo("width",!0),pe=jo("wordwraparcs",!0),ge=jo("wordwrapentities",!0),be=jo("wordwrapboxes",!0),me=jo("watermark",!0),ye=Po("entity"),ve=jo("[",!1),xe=jo("]",!1),we=jo("*",!1),_e=Po("empty row"),Ce=jo("|||",!1),Ae=jo("...",!1),Oe=Po("---"),Se=jo("---",!1),ke=Po("bi-directional arrow"),Le=jo("--",!1),je=jo("<->",!1),Ee=jo("==",!1),Pe=jo("<<=>>",!1),Te=jo("<=>",!1),Me=jo("..",!1),De=jo("<<>>",!1),Fe=jo("::",!1),Ie=jo("<:>",!1),Be=Po("left to right arrow"),Ne=jo("->",!1),He=jo("=>>",!1),Re=jo("=>",!1),We=jo(">>",!1),Ge=jo(":>",!1),ze=jo("-x",!0),Xe=Po("right to left arrow"),Ve=jo("<-",!1),$e=jo("<<=",!1),qe=jo("<=",!1),Ue=jo("<<",!1),Ke=jo("<:",!1),Ze=jo("x-",!0),Ye=Po("box"),Qe=jo("note",!0),Je=jo("abox",!0),tr=jo("rbox",!0),er=jo("box",!0),rr=Po("inline expression"),nr=jo("alt",!0),or=jo("else",!0),ir=jo("opt",!0),ar=jo("break",!0),cr=jo("par",!0),ur=jo("seq",!0),sr=jo("strict",!0),lr=jo("neg",!0),fr=jo("critical",!0),dr=jo("ignore",!0),hr=jo("consider",!0),pr=jo("assert",!0),gr=jo("loop",!0),br=jo("ref",!0),mr=jo("exc",!0),yr=Po("activate or deactivate"),vr=jo("activate",!0),xr=jo("deactivate",!0),wr=Po("attribute name"),_r=jo("label",!0),Cr=jo("idurl",!0),Ar=jo("id",!0),Or=jo("url",!0),Sr=jo("linecolor",!0),kr=jo("linecolour",!0),Lr=jo("textcolor",!0),jr=jo("textcolour",!0),Er=jo("textbgcolor",!0),Pr=jo("textbgcolour",!0),Tr=jo("arclinecolor",!0),Mr=jo("arclinecolour",!0),Dr=jo("arctextcolor",!0),Fr=jo("arctextcolour",!0),Ir=jo("arctextbgcolor",!0),Br=jo("arctextbgcolour",!0),Nr=jo("arcskip",!0),Hr=jo("title",!0),Rr=jo("activation",!0),Wr=Po("double quoted string"),Gr=jo('"',!1),zr=jo('\\"',!1),Xr={type:"any"},Vr=Po("identifier"),$r=Eo([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),qr=Po("whitespace"),Ur=Eo([" ","\t"],!1,!1),Kr=Po("lineend"),Zr=Eo(["\r","\n"],!1,!1),Yr=jo("/*",!1),Qr=jo("*/",!1),Jr=jo("//",!1),tn=jo("#",!1),en=Eo(["\r","\n"],!0,!1),rn=Po("comment"),nn=Po("number"),on=Eo([["0","9"]],!1,!1),an=jo(".",!1),cn=Po("boolean"),un=jo("true",!0),sn=jo("false",!0),ln=jo("on",!0),fn=jo("off",!0),dn=Eo([["0","1"]],!1,!1),hn=Po("size"),pn=jo("auto",!0),gn=function(e,r){return r.entities=r.entities||[],t.checkForUndeclaredEntities(r.entities,r.arcs),r={meta:t.getMetaInfo(r.options,r.arcs),...r},e.length>0&&(r={precomment:e,...r}),r},bn=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},mn=function(t){return t},yn=function(t){return t},vn=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},xn=function(e,r){return t.nameValue2Option(e,r)},wn=function(e,r){return t.nameValue2Option(e,r)},_n=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Cn=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},An=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},On=function(e,r){return t.nameValue2Option(e,r)},Sn=function(t){return t},kn=function(t){return t},Ln=function(t){return t[0].concat(t[1])},jn=function(t,e){return e},En=function(t,e){return{name:t,...e}},Pn=function(t,e){return e},Tn=function(r,n){return t.isMscGenKeyword(r)&&function(t,r){throw function(t,r){return new e(t,null,null,r)}(t,r=void 0!==r?r:Mo(Ao,Co))}("MscGen keywords aren't allowed as entity names (embed them in quotes if you need them)"),{name:r,...n}},Mn=function(t){return t},Dn=function(t){return t},Fn=function(t){return t},In=function(t){return t[0].concat(t[1])},Bn=function(t){return t},Nn=function(t){return t},Hn=function(t){return t},Rn=function(t,e){return e},Wn=function(t,e){return{...t,...e}},Gn=function(t){return{kind:t}},zn=function(t){return{kind:t}},Xn=function(t,e,r){return{kind:e,from:t,to:r}},Vn=function(t,e){return{kind:t,from:"*",to:e}},$n=function(t,e){return{kind:e,from:t,to:"*"}},qn=function(t,e){return{kind:e,from:t,to:"*"}},Un=function(t,e,r,n){return n},Kn=function(t,e,r,n,o){return{kind:e,from:t,to:r,arcs:o,...n}},Zn=function(t){return t.toLowerCase()},Yn=function(t){return t.toLowerCase()},Qn=function(t){return t},Jn=function(t){return t},to=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},eo=function(t){return{activation:"activate"===t.toLowerCase()}},ro=function(e,r){var n={};return"activation"===e.toLowerCase()?n.activation=t.flattenBoolean(r):n[e.toLowerCase().replace("colour","color")]=r,n},no=function(t){return t.join("")},oo=function(t){return t},io=function(t){return t.join("")},ao=function(t){return t},co=function(t){return t},uo=function(t){return t},so=function(t,e,r){return t+e.join("")+r},lo=function(t,e){return t+e.join("")},fo=function(t){return t},ho=function(t){return t.toString()},po=function(t){return t.toString()},go=function(t){return parseInt(t.join(""),10)},bo=function(t){return parseFloat(t.join(""))},mo=function(t){return t},yo=function(t){return t.toString()},vo=function(t){return t},xo=function(t){return t},wo=function(t){return t.toString()},_o=function(t){return t.toLowerCase()},Co=0|n.peg$currPos,Ao=Co,Oo=[{line:1,column:1}],So=Co,ko=n.peg$maxFailExpected||[],Lo=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function jo(t,e){return{type:"literal",text:t,ignoreCase:e}}function Eo(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Po(t){return{type:"other",description:t}}function To(t){var e,n=Oo[t];if(n)return n;if(t>=Oo.length)e=Oo.length-1;else for(e=t;!Oo[--e];);for(n={line:(n=Oo[e]).line,column:n.column};eSo&&(So=Co,ko=[]),ko.push(t))}function Fo(){var t,e,n,o,i;return t=Co,e=ri(),function(){var t;return(t=r.substr(Co,3)).toLowerCase()===p?Co+=3:(t=u,0===Lo&&Do(ie)),t===u&&((t=r.substr(Co,2)).toLowerCase()===g?Co+=2:(t=u,0===Lo&&Do(ae))),t}()!==u?(ri(),123===r.charCodeAt(Co)?(n=d,Co++):(n=u,0===Lo&&Do(ne)),n!==u?(ri(),o=function(){var t,e,n,o;return t=Co,(e=function(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Io())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=mn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Io())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=mn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Io())!==u?(59===r.charCodeAt(Co)?(a=m,Co++):(a=u,0===Lo&&Do(ue)),a!==u?(Ao=o,o=yn(i)):(Co=o,o=u)):(Co=o,o=u),o!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=vn(e)),e}())===u&&(e=null),(n=function(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Bo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Sn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Bo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Sn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Bo())!==u?(59===r.charCodeAt(Co)?(a=m,Co++):(a=u,0===Lo&&Do(ue)),a!==u?(Ao=o,o=kn(i)):(Co=o,o=u)):(Co=o,o=u),o!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=Ln(e)),e}())===u&&(n=null),(o=No())===u&&(o=null),Ao=t,bn(e,n,o)}(),ri(),125===r.charCodeAt(Co)?(i=h,Co++):(i=u,0===Lo&&Do(oe)),i!==u?(ri(),Ao=t,t=gn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}function Io(){var t,e,n,o;return Lo++,t=Co,ri(),(e=r.substr(Co,6)).toLowerCase()===y?Co+=6:(e=u,0===Lo&&Do(le)),e===u&&((e=r.substr(Co,11)).toLowerCase()===v?Co+=11:(e=u,0===Lo&&Do(fe))),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=function(){var t,e;return Lo++,t=Co,(e=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ni())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=po(n)):(Co=t,t=u)):(Co=t,t=u),t}())!==u&&(Ao=t,e=fo(e)),(t=e)===u&&(t=Co,(e=ni())!==u&&(Ao=t,e=ho(e)),t=e),Lo--,t===u&&(e=u,0===Lo&&Do(nn)),t}())!==u?(ri(),Ao=t,t=xn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,5)).toLowerCase()===w?Co+=5:(e=u,0===Lo&&Do(he)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=function(){var t;return Lo++,(t=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ci())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=xo(n)):(Co=t,t=u)):(Co=t,t=u),t}())===u&&(t=ci()),Lo--,t===u&&0===Lo&&Do(hn),t}())!==u?(ri(),Ao=t,t=wn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,12)).toLowerCase()===_?Co+=12:(e=u,0===Lo&&Do(pe)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=_n(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,16)).toLowerCase()===C?Co+=16:(e=u,0===Lo&&Do(ge)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=Cn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,13)).toLowerCase()===A?Co+=13:(e=u,0===Lo&&Do(be)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=An(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,9)).toLowerCase()===O?Co+=9:(e=u,0===Lo&&Do(me)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=$o())!==u?(ri(),Ao=t,t=On(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)))))),Lo--,t===u&&0===Lo&&Do(se),t}function Bo(){var t,e,n,o,i,a;return Lo++,t=Co,ri(),(e=$o())!==u?(ri(),n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Xo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=jn(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),o=ri(),Ao=t,t=En(e,n)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=Uo())!==u?(ri(),n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Xo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=Pn(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),o=ri(),Ao=t,t=Tn(e,n)):(Co=t,t=u)),Lo--,t===u&&0===Lo&&Do(ye),t}function No(){var t,e,n,o;if(t=[],e=Co,(n=Ho())!==u?(ri(),59===r.charCodeAt(Co)?(o=m,Co++):(o=u,0===Lo&&Do(ue)),o!==u?(Ao=e,e=Mn(n)):(Co=e,e=u)):(Co=e,e=u),e!==u)for(;e!==u;)t.push(e),e=Co,(n=Ho())!==u?(ri(),59===r.charCodeAt(Co)?(o=m,Co++):(o=u,0===Lo&&Do(ue)),o!==u?(Ao=e,e=Mn(n)):(Co=e,e=u)):(Co=e,e=u);else t=u;return t}function Ho(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Ro())!==u?(ri(),44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Dn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Ro())!==u?(ri(),44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Dn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Ro())!==u&&(Ao=o,i=Fn(i)),(o=i)!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=In(e)),e}function Ro(){var t;return(t=function(){var t,e,n,o,i,a;return t=Co,e=Co,(n=function(){var t,e;return t=Co,ri(),(e=function(){var t;return Lo++,r.substr(Co,3)===j?(t=j,Co+=3):(t=u,0===Lo&&Do(Ce)),t===u&&(r.substr(Co,3)===E?(t=E,Co+=3):(t=u,0===Lo&&Do(Ae))),Lo--,t===u&&0===Lo&&Do(_e),t}())!==u?(ri(),Ao=t,t=Gn(e)):(Co=t,t=u),t}())!==u&&(Ao=e,n=Bn(n)),(e=n)===u&&(e=Co,(n=function(){var t,e,n,o;return t=Co,ri(),(e=qo())!==u?(ri(),(n=function(){var t,e;return t=Co,(e=Wo())===u&&(e=Go())===u&&(e=zo())===u&&(e=function(){var t;return Lo++,(t=r.substr(Co,4)).toLowerCase()===J?Co+=4:(t=u,0===Lo&&Do(Qe)),t===u&&((t=r.substr(Co,4)).toLowerCase()===tt?Co+=4:(t=u,0===Lo&&Do(Je)),t===u&&((t=r.substr(Co,4)).toLowerCase()===et?Co+=4:(t=u,0===Lo&&Do(tr)),t===u&&((t=r.substr(Co,3)).toLowerCase()===rt?Co+=3:(t=u,0===Lo&&Do(er))))),Lo--,t===u&&0===Lo&&Do(Ye),t}()),e!==u&&(Ao=t,e=Zn(e)),e}())!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=Xn(e,n,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),42===r.charCodeAt(Co)?(e=L,Co++):(e=u,0===Lo&&Do(we)),e!==u?(ri(),(n=zo())!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=Vn(n,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=qo())!==u?(ri(),(n=Go())!==u?(ri(),42===r.charCodeAt(Co)?(o=L,Co++):(o=u,0===Lo&&Do(we)),o!==u?(ri(),Ao=t,t=$n(e,n)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=qo())!==u?(ri(),(n=Wo())!==u?(ri(),42===r.charCodeAt(Co)?(o=L,Co++):(o=u,0===Lo&&Do(we)),o!==u?(ri(),Ao=t,t=qn(e,n)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)))),t}())!==u&&(Ao=e,n=Nn(n)),(e=n)===u&&(e=Co,(n=function(){var t,e;return t=Co,ri(),(e=function(){var t;return Lo++,r.substr(Co,3)===P?(t=P,Co+=3):(t=u,0===Lo&&Do(Se)),Lo--,t===u&&0===Lo&&Do(Oe),t}())!==u?(ri(),Ao=t,t=zn(e)):(Co=t,t=u),t}())!==u&&(Ao=e,n=Hn(n)),e=n)),e!==u?(n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Xo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=Rn(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),Ao=t,t=Wn(e,n)):(Co=t,t=u),t}())===u&&(t=function(){var t,e,n,o,i,a,c,s,l,f;return t=Co,ri(),(e=qo())!==u?(ri(),(n=function(){var t,e;return Lo++,t=Co,(e=r.substr(Co,3)).toLowerCase()===nt?Co+=3:(e=u,0===Lo&&Do(nr)),e===u&&((e=r.substr(Co,4)).toLowerCase()===ot?Co+=4:(e=u,0===Lo&&Do(or)),e===u&&((e=r.substr(Co,3)).toLowerCase()===it?Co+=3:(e=u,0===Lo&&Do(ir)),e===u&&((e=r.substr(Co,5)).toLowerCase()===at?Co+=5:(e=u,0===Lo&&Do(ar)),e===u&&((e=r.substr(Co,3)).toLowerCase()===ct?Co+=3:(e=u,0===Lo&&Do(cr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===ut?Co+=3:(e=u,0===Lo&&Do(ur)),e===u&&((e=r.substr(Co,6)).toLowerCase()===st?Co+=6:(e=u,0===Lo&&Do(sr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===lt?Co+=3:(e=u,0===Lo&&Do(lr)),e===u&&((e=r.substr(Co,8)).toLowerCase()===ft?Co+=8:(e=u,0===Lo&&Do(fr)),e===u&&((e=r.substr(Co,6)).toLowerCase()===dt?Co+=6:(e=u,0===Lo&&Do(dr)),e===u&&((e=r.substr(Co,8)).toLowerCase()===ht?Co+=8:(e=u,0===Lo&&Do(hr)),e===u&&((e=r.substr(Co,6)).toLowerCase()===pt?Co+=6:(e=u,0===Lo&&Do(pr)),e===u&&((e=r.substr(Co,4)).toLowerCase()===gt?Co+=4:(e=u,0===Lo&&Do(gr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===bt?Co+=3:(e=u,0===Lo&&Do(br)),e===u&&((e=r.substr(Co,3)).toLowerCase()===mt?Co+=3:(e=u,0===Lo&&Do(mr)))))))))))))))),e!==u&&(Ao=t,e=Yn(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(rr)),t}())!==u?(ri(),(o=qo())!==u?(ri(),i=Co,91===r.charCodeAt(Co)?(a=S,Co++):(a=u,0===Lo&&Do(ve)),a!==u&&(c=Xo())!==u?(93===r.charCodeAt(Co)?(s=k,Co++):(s=u,0===Lo&&Do(xe)),s!==u?(Ao=i,i=Un(e,n,o,c)):(Co=i,i=u)):(Co=i,i=u),i===u&&(i=null),a=ri(),123===r.charCodeAt(Co)?(c=d,Co++):(c=u,0===Lo&&Do(ne)),c!==u?(s=ri(),(l=No())===u&&(l=null),ri(),125===r.charCodeAt(Co)?(f=h,Co++):(f=u,0===Lo&&Do(oe)),f!==u?(ri(),Ao=t,t=Kn(e,n,o,i,l)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}()),t}function Wo(){var t;return Lo++,r.substr(Co,2)===T?(t=T,Co+=2):(t=u,0===Lo&&Do(Le)),t===u&&(r.substr(Co,3)===M?(t=M,Co+=3):(t=u,0===Lo&&Do(je)),t===u&&(r.substr(Co,2)===D?(t=D,Co+=2):(t=u,0===Lo&&Do(Ee)),t===u&&(r.substr(Co,5)===F?(t=F,Co+=5):(t=u,0===Lo&&Do(Pe)),t===u&&(r.substr(Co,3)===I?(t=I,Co+=3):(t=u,0===Lo&&Do(Te)),t===u&&(r.substr(Co,2)===B?(t=B,Co+=2):(t=u,0===Lo&&Do(Me)),t===u&&(r.substr(Co,4)===N?(t=N,Co+=4):(t=u,0===Lo&&Do(De)),t===u&&(r.substr(Co,2)===H?(t=H,Co+=2):(t=u,0===Lo&&Do(Fe)),t===u&&(r.substr(Co,3)===R?(t=R,Co+=3):(t=u,0===Lo&&Do(Ie)))))))))),Lo--,t===u&&0===Lo&&Do(ke),t}function Go(){var t;return Lo++,r.substr(Co,2)===W?(t=W,Co+=2):(t=u,0===Lo&&Do(Ne)),t===u&&(r.substr(Co,3)===G?(t=G,Co+=3):(t=u,0===Lo&&Do(He)),t===u&&(r.substr(Co,2)===z?(t=z,Co+=2):(t=u,0===Lo&&Do(Re)),t===u&&(r.substr(Co,2)===X?(t=X,Co+=2):(t=u,0===Lo&&Do(We)),t===u&&(r.substr(Co,2)===V?(t=V,Co+=2):(t=u,0===Lo&&Do(Ge)),t===u&&((t=r.substr(Co,2)).toLowerCase()===$?Co+=2:(t=u,0===Lo&&Do(ze))))))),Lo--,t===u&&0===Lo&&Do(Be),t}function zo(){var t;return Lo++,r.substr(Co,2)===q?(t=q,Co+=2):(t=u,0===Lo&&Do(Ve)),t===u&&(r.substr(Co,3)===U?(t=U,Co+=3):(t=u,0===Lo&&Do($e)),t===u&&(r.substr(Co,2)===K?(t=K,Co+=2):(t=u,0===Lo&&Do(qe)),t===u&&(r.substr(Co,2)===Z?(t=Z,Co+=2):(t=u,0===Lo&&Do(Ue)),t===u&&(r.substr(Co,2)===Y?(t=Y,Co+=2):(t=u,0===Lo&&Do(Ke)),t===u&&((t=r.substr(Co,2)).toLowerCase()===Q?Co+=2:(t=u,0===Lo&&Do(Ze))))))),Lo--,t===u&&0===Lo&&Do(Xe),t}function Xo(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Vo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Qn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Vo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Qn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Vo())!==u&&(Ao=o,i=Jn(i)),(o=i)!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=to(e)),e}function Vo(){var t;return(t=function(){var t,e,n,o;return t=Co,ri(),(e=function(){var t;return Lo++,(t=r.substr(Co,5)).toLowerCase()===xt?Co+=5:(t=u,0===Lo&&Do(_r)),t===u&&((t=r.substr(Co,5)).toLowerCase()===wt?Co+=5:(t=u,0===Lo&&Do(Cr)),t===u&&((t=r.substr(Co,2)).toLowerCase()===_t?Co+=2:(t=u,0===Lo&&Do(Ar)),t===u&&((t=r.substr(Co,3)).toLowerCase()===Ct?Co+=3:(t=u,0===Lo&&Do(Or)),t===u&&((t=r.substr(Co,9)).toLowerCase()===At?Co+=9:(t=u,0===Lo&&Do(Sr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===Ot?Co+=10:(t=u,0===Lo&&Do(kr)),t===u&&((t=r.substr(Co,9)).toLowerCase()===St?Co+=9:(t=u,0===Lo&&Do(Lr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===kt?Co+=10:(t=u,0===Lo&&Do(jr)),t===u&&((t=r.substr(Co,11)).toLowerCase()===Lt?Co+=11:(t=u,0===Lo&&Do(Er)),t===u&&((t=r.substr(Co,12)).toLowerCase()===jt?Co+=12:(t=u,0===Lo&&Do(Pr)),t===u&&((t=r.substr(Co,12)).toLowerCase()===Et?Co+=12:(t=u,0===Lo&&Do(Tr)),t===u&&((t=r.substr(Co,13)).toLowerCase()===Pt?Co+=13:(t=u,0===Lo&&Do(Mr)),t===u&&((t=r.substr(Co,12)).toLowerCase()===Tt?Co+=12:(t=u,0===Lo&&Do(Dr)),t===u&&((t=r.substr(Co,13)).toLowerCase()===Mt?Co+=13:(t=u,0===Lo&&Do(Fr)),t===u&&((t=r.substr(Co,14)).toLowerCase()===Dt?Co+=14:(t=u,0===Lo&&Do(Ir)),t===u&&((t=r.substr(Co,15)).toLowerCase()===Ft?Co+=15:(t=u,0===Lo&&Do(Br)),t===u&&((t=r.substr(Co,7)).toLowerCase()===It?Co+=7:(t=u,0===Lo&&Do(Nr)),t===u&&((t=r.substr(Co,5)).toLowerCase()===Bt?Co+=5:(t=u,0===Lo&&Do(Hr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===Nt?Co+=10:(t=u,0===Lo&&Do(Rr)))))))))))))))))))),Lo--,t===u&&0===Lo&&Do(wr),t}())!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=ro(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}())===u&&(t=function(){var t,e;return Lo++,t=Co,ri(),(e=r.substr(Co,8)).toLowerCase()===yt?Co+=8:(e=u,0===Lo&&Do(vr)),e===u&&((e=r.substr(Co,10)).toLowerCase()===vt?Co+=10:(e=u,0===Lo&&Do(xr))),e!==u?(ri(),Ao=t,t=eo(e)):(Co=t,t=u),Lo--,t===u&&0===Lo&&Do(yr),t}()),t}function $o(){var t,e,n,o;return Lo++,t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=Co,n=Co,Lo++,34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),Lo--,o===u?n=void 0:(Co=n,n=u),n!==u?(r.substr(Co,2)===Rt?(o=Rt,Co+=2):(o=u,0===Lo&&Do(zr)),o===u&&(r.length>Co?(o=r.charAt(Co),Co++):(o=u,0===Lo&&Do(Xr))),o!==u?(Ao=e,e=oo(o)):(Co=e,e=u)):(Co=e,e=u);e!==u;)t.push(e),e=Co,n=Co,Lo++,34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),Lo--,o===u?n=void 0:(Co=n,n=u),n!==u?(r.substr(Co,2)===Rt?(o=Rt,Co+=2):(o=u,0===Lo&&Do(zr)),o===u&&(r.length>Co?(o=r.charAt(Co),Co++):(o=u,0===Lo&&Do(Xr))),o!==u?(Ao=e,e=oo(o)):(Co=e,e=u)):(Co=e,e=u);return t}(),34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=no(n)):(Co=t,t=u)):(Co=t,t=u),Lo--,t===u&&(e=u,0===Lo&&Do(Wr)),t}function qo(){var t;return Lo++,(t=Uo())===u&&(t=$o()),Lo--,t===u&&0===Lo&&Do(Vr),t}function Uo(){var t,e,n;if(t=Co,e=[],n=r.charAt(Co),Yt.test(n)?Co++:(n=u,0===Lo&&Do($r)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(Co),Yt.test(n)?Co++:(n=u,0===Lo&&Do($r));else e=u;return e!==u&&(Ao=t,e=io(e)),e}function Ko(){var t,e;return Lo++,t=Co,e=r.charAt(Co),Qt.test(e)?Co++:(e=u,0===Lo&&Do(Ur)),e!==u&&(Ao=t,e=ao(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(qr)),t}function Zo(){var t,e;return Lo++,t=Co,e=r.charAt(Co),Jt.test(e)?Co++:(e=u,0===Lo&&Do(Zr)),e!==u&&(Ao=t,e=co(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(Kr)),t}function Yo(){var t,e,n;return t=Co,e=Co,Lo++,r.substr(Co,2)===Gt?(n=Gt,Co+=2):(n=u,0===Lo&&Do(Qr)),Lo--,n===u?e=void 0:(Co=e,e=u),e!==u?(r.length>Co?(n=r.charAt(Co),Co++):(n=u,0===Lo&&Do(Xr)),n!==u?(Ao=t,t=uo(n)):(Co=t,t=u)):(Co=t,t=u),t}function Qo(){var t,e,n,o;if(t=Co,(e=function(){var t;return r.substr(Co,2)===Wt?(t=Wt,Co+=2):(t=u,0===Lo&&Do(Yr)),t}())!==u){for(n=[],o=Yo();o!==u;)n.push(o),o=Yo();(o=function(){var t;return r.substr(Co,2)===Gt?(t=Gt,Co+=2):(t=u,0===Lo&&Do(Qr)),t}())!==u?(Ao=t,t=so(e,n,o)):(Co=t,t=u)}else Co=t,t=u;return t}function Jo(){var t;return t=r.charAt(Co),te.test(t)?Co++:(t=u,0===Lo&&Do(en)),t}function ti(){var t,e,n,o;if(t=Co,(e=function(){var t;return r.substr(Co,2)===zt?(t=zt,Co+=2):(t=u,0===Lo&&Do(Jr)),t===u&&(35===r.charCodeAt(Co)?(t=Xt,Co++):(t=u,0===Lo&&Do(tn))),t}())!==u){for(n=[],o=Jo();o!==u;)n.push(o),o=Jo();Ao=t,t=lo(e,n)}else Co=t,t=u;return t}function ei(){var t;return Lo++,(t=ti())===u&&(t=Qo()),Lo--,t===u&&0===Lo&&Do(rn),t}function ri(){var t,e;for(t=[],(e=Ko())===u&&(e=Zo())===u&&(e=ei());e!==u;)t.push(e),(e=Ko())===u&&(e=Zo())===u&&(e=ei());return t}function ni(){var t;return(t=function(){var t,e,n,o,i;return t=Co,e=Co,(n=oi())!==u?(46===r.charCodeAt(Co)?(o=Vt,Co++):(o=u,0===Lo&&Do(an)),o!==u&&(i=oi())!==u?e=n=[n,o,i]:(Co=e,e=u)):(Co=e,e=u),e!==u&&(Ao=t,e=bo(e)),e}())===u&&(t=oi()),t}function oi(){var t,e,n;if(t=Co,e=[],n=r.charAt(Co),ee.test(n)?Co++:(n=u,0===Lo&&Do(on)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(Co),ee.test(n)?Co++:(n=u,0===Lo&&Do(on));else e=u;return e!==u&&(Ao=t,e=go(e)),e}function ii(){var t,e;return Lo++,t=Co,(e=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ai())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=vo(n)):(Co=t,t=u)):(Co=t,t=u),t}())!==u&&(Ao=t,e=mo(e)),(t=e)===u&&(t=Co,(e=ai())!==u&&(Ao=t,e=yo(e)),t=e),Lo--,t===u&&(e=u,0===Lo&&Do(cn)),t}function ai(){var t;return(t=r.substr(Co,4)).toLowerCase()===$t?Co+=4:(t=u,0===Lo&&Do(un)),t===u&&((t=r.substr(Co,5)).toLowerCase()===qt?Co+=5:(t=u,0===Lo&&Do(sn)),t===u&&((t=r.substr(Co,2)).toLowerCase()===Ut?Co+=2:(t=u,0===Lo&&Do(ln)),t===u&&((t=r.substr(Co,3)).toLowerCase()===Kt?Co+=3:(t=u,0===Lo&&Do(fn)),t===u&&(t=r.charAt(Co),re.test(t)?Co++:(t=u,0===Lo&&Do(dn)))))),t}function ci(){var t,e;return t=Co,(e=ni())!==u&&(Ao=t,e=wo(e)),(t=e)===u&&(t=Co,(e=r.substr(Co,4)).toLowerCase()===Zt?Co+=4:(e=u,0===Lo&&Do(pn)),e!==u&&(Ao=t,e=_o(e)),t=e),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:Co,peg$FAILED:u,peg$maxFailExpected:ko,peg$maxFailPos:So};if(o!==u&&Co===r.length)return o;throw o!==u&&Co{"use strict";t.exports=JSON.parse('{"baseTemplate":"svg.<%=id%>{font-family:Helvetica,sans-serif;font-size:<%=fontSize%>px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;stroke-width:<%=lineWidth%>}.<%=id%> path, .<%=id%> rect{fill:none}.<%=id%> .label-text-background{fill:white;stroke:white;stroke-width:0}.<%=id%> .bglayer{fill:white;stroke:white;stroke-width:0}.<%=id%> line{}.<%=id%> .return, .<%=id%> .comment{stroke-dasharray:5,3}.<%=id%> .inline_expression_divider{stroke-dasharray:10,5}.<%=id%> text{color:inherit;stroke:none;text-anchor:middle}.<%=id%> text.anchor-start{text-anchor:start}.<%=id%> .arrow-marker{overflow:visible}.<%=id%> .arrow-style{stroke-width:1}.<%=id%> .arcrow, .<%=id%> .arcrowomit, .<%=id%> .emphasised{stroke-linecap:butt}.<%=id%> .arcrowomit{stroke-dasharray:2,2}.<%=id%> .box, .<%=id%> .entity{fill:white;stroke-linejoin:round}.<%=id%> .inherit{stroke:inherit;color:inherit}.<%=id%> .inherit-fill{fill:inherit}.<%=id%> .watermark{font-size:48pt;font-weight:bold;opacity:0.14}","namedStyles":[{"name":"basic","description":"Basic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:underline;}"},{"name":"lazy","description":"Lazy","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{font-weight:bold;}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC}.<%=id%> rect.label-text-background{opacity:0.9}.<%=id%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke:grey}"},{"name":"classic","description":"Classic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:none}.<%=id%> .entity{stroke:none;}.<%=id%> line,.<%=id%> rect,.<%=id%> path{stroke-width:1px}.<%=id%> .arrow-style{stroke-width:2;}.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke-width: 1px}"},{"name":"fountainpen","description":"Fountain pen","experimental":true,"deprecated":false,"renderMagic":"wobbly","cssBefore":"@import \'https://fonts.googleapis.com/css?family=Gochi+Hand\';","cssAfter":"svg.<%=id%>{font-family:\'Gochi Hand\', cursive;font-size:14px;stroke-opacity:0.4;stroke-linecap:round;background-color:transparent}.<%=id%> text{fill:rgba(0,0,128,0.7)}.<%=id%> marker polygon{fill:rgba(0,0,255,0.4);stroke-linejoin:round}.<%=id%> line, .<%=id%> path, .<%=id%> rect, .<%=id%> polygon{stroke:blue !important}.<%=id%> text.entity-text{font-weight:bold;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC;}.<%=id%> .label-text-background{opacity:0}"},{"name":"cygne","description":"Cygne (best with msgenny)","experimental":true,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:#00A1DE}.<%=id%> text{fill:#005B82}.<%=id%> .entity,.<%=id%> .box{fill:#00A1DE;stroke:#00A1DE}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#E77B2F;stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"pegasse","description":"Pégase (best with msgenny)","experimental":false,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:rgba(0, 43, 84, 1)}.<%=id%> text{fill:rgba(0, 43, 84, 1)}.<%=id%> .entity,.<%=id%> .box{fill:rgba(0, 43, 84, 1);stroke:rgba(0, 43, 84, 1)}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:rgba(255, 50, 0, 1);stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"grayscaled","description":"Grayscaled (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:grayscale(1);-webkit-filter:grayscale(1);}"},{"name":"inverted","description":"Inverted (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:invert(1);-webkit-filter:invert(1);}"},{"name":"noentityboxes","description":"No entity boxes","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> .entity{fill:none;stroke:none;}.<%=id%> text.entity-text{text-decoration:underline;}"}]}')},8163:t=>{"use strict";t.exports={version:"7.0.0"}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(8156)})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mscgenjs=e():t.mscgenjs=e()}(self,(()=>{return t={156:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextRenderer=e.getGraphicsRenderer=e.getParser=e.getAllowedValues=e.version=void 0,e.renderMsc=function(t,e,r){a.renderMsc(t,e||{},r,c.getParser,c.getGraphicsRenderer)},e.translateMsc=function(t,e){return a.translateMsc(t,e||{},c.getParser,c.getTextRenderer)};var a=i(r(672)),c=i(r(903));e.version=a.version,e.getAllowedValues=a.getAllowedValues,e.getParser=c.getParser,e.getGraphicsRenderer=c.getGraphicsRenderer,e.getTextRenderer=c.getTextRenderer},426:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6);e.default=Object.freeze({inputType:[{name:"mscgen",experimental:!1},{name:"msgenny",experimental:!1},{name:"xu",experimental:!1},{name:"json",experimental:!1},{name:"ast",experimental:!1}],outputType:[{name:"mscgen",experimental:!1},{name:"msgenny",experimental:!1},{name:"xu",experimental:!1},{name:"json",experimental:!1},{name:"ast",experimental:!1},{name:"dot",experimental:!1},{name:"doxygen",experimental:!1}],regularArcTextVerticalAlignment:[{name:"above",experimental:!0},{name:"middle",experimental:!1},{name:"below",experimental:!0}],namedStyle:n.namedStyles.map((function(t){return{name:t.name,description:t.description,experimental:t.experimental,deprecated:t.deprecated}}))})},672:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.version=void 0,e.renderMsc=function(t,e,r,n,o){var a=(0,i.default)(e,t);try{u(r,null,o().render(c(t,a.inputType,n),a.window,a.elementId,{source:a.source,styleAdditions:a.styleAdditions,additionalTemplate:a.additionalTemplate,mirrorEntitiesOnBottom:a.mirrorEntitiesOnBottom,regularArcTextVerticalAlignment:a.regularArcTextVerticalAlignment}))}catch(t){u(r,t)}},e.translateMsc=function(t,e,r,n){var o=Object.assign({inputType:"mscgen",outputType:"json"},e);return"ast"===o.outputType?r(o.inputType).parse(t):"json"===o.outputType?JSON.stringify(r(o.inputType).parse(t),null," "):n(o.outputType).render(c(t,o.inputType,r))},e.getAllowedValues=function(){return o.default};var o=n(r(426)),i=n(r(729)),a=r(163);function c(t,e,r){return function(t,e){return"json"===e&&"object"==typeof t}(t,e)?t:r(e).parse(t)}function u(t,e,r){Boolean(t)&&(Boolean(e)?t(e,null):t(null,r))}e.version=a.version},729:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(426));function i(t,e,r){var n=r;return e.some((function(e){return e.name===t}))&&(n=t),n}function a(t,e){return"boolean"==typeof t?t:e}e.default=function(t,e){var r,n,c,u=a(t.includeSource,!0);return{inputType:(c=t.inputType,i(c,o.default.inputType,"mscgen")),elementId:t.elementId||"__svg",window:t.window||window,includeSource:u,source:u?e:null,styleAdditions:t.styleAdditions||null,additionalTemplate:(n=t.additionalTemplate,i(n,o.default.namedStyle,"basic")),mirrorEntitiesOnBottom:a(t.mirrorEntitiesOnBottom,!1),regularArcTextVerticalAlignment:(r=t.regularArcTextVerticalAlignment,i(r,o.default.regularArcTextVerticalAlignment,"middle"))}}},903:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.getTextRenderer=e.getGraphicsRenderer=e.getParser=void 0;var a=i(r(688)),c=i(r(592)),u=i(r(626)),s=i(r(939)),l=i(r(20)),f=i(r(619)),d=i(r(250)),h=i(r(956)),p=i(r(532)),g=a,b=d,m=Object.freeze({mscgen:a,xu:u,msgenny:c}),y=Object.freeze({mscgen:d,msgenny:h,xu:p,dot:l,doxygen:f});e.getParser=function(t){return["ast","json"].includes(t)?JSON:m[t]||g},e.getGraphicsRenderer=function(){return s},e.getTextRenderer=function(t){return y[t]||b}},952:(t,e)=>{"use strict";function r(t,e){return void 0===e||"*"===e||t.some((function(t){return t.name===e}))}Object.defineProperty(e,"__esModule",{value:!0}),e.EntityNotDefinedError=void 0,e.nameValue2Option=function(t,e){var r={};return r[t.toLowerCase()]=e,r},e.flattenBoolean=function(t){return["true","on","1"].includes(t.toLowerCase())},e.entityExists=r,e.isMscGenKeyword=function(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"].includes(t)},e.checkForUndeclaredEntities=function t(e,o){(o||[]).forEach((function(o){o.forEach((function(o){if(o.from&&!r(e,o.from))throw new n(o.from,o);if(o.to&&!r(e,o.to))throw new n(o.to,o);o.arcs&&t(e,o.arcs)}))}))},e.getMetaInfo=function(t,e){var r=function(t){return!!t&&(t.hasOwnProperty("watermark")||t.hasOwnProperty("wordwrapentities")||t.hasOwnProperty("wordwrapboxes")||t.hasOwnProperty("width")&&"auto"===t.width)}(t),n=function(t){return(t||[]).some((function(t){return t.some((function(t){return["alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"].includes(t.kind)}))}))}(e);return{extendedOptions:r,extendedArcTypes:n,extendedFeatures:r||n}};var n=function(t,e){this.name="EntityNotDefinedError",this.message=function(t,e){return"Entity '".concat(t,"' in arc '").concat(e.from," ").concat(e.kind," ").concat(e.to,"' is not defined.")}(t,e)};e.EntityNotDefinedError=n},796:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.freeze({"|||":"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"});e.default=function(t){return r[t]}},501:(t,e)=>{"use strict";function r(t,e,n){e.forEach((function(e){!function(t,e,n){e.forEach((function(o){!function(t,e,r,n){n.forEach((function(n){n(r,t,e)}))}(t,e,o,n),o.arcs&&r(t,o.arcs,n)}))}(t,e,n)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var o,i;return o=t.entities,i=e,o.forEach((function(t){i.forEach((function(e){e(t)}))})),t.arcs&&r(t.entities,t.arcs,n),t}},635:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.nameAsLabel=h,e.swapRTLArc=b,e.overrideColors=y,e.normalize=w,e.flatten=function(t){return w((0,c.default)(t,[h,p],[b,y,p,g]))};var c=a(r(501)),u=i(r(383)),s=a(r(796)),l=a(r(788)),f=a(r(498)),d=0;function h(t){void 0===t.label&&(t.label=t.name)}function p(t){t.label&&(t.label=u.unescapeString(t.label)),t.id&&(t.id=u.unescapeString(t.id))}function g(t){t.label=Boolean(t.label)?t.label:""}function b(t){if((0,l.default)(t.kind)!==t.kind){t.kind=(0,l.default)(t.kind);var e=t.from;t.from=t.to,t.to=e}}function m(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 y(t,e){if(void 0===e&&(e=[]),t&&t.from){var r=e.find((function(e){return e.name===t.from}));r&&m(t,r)}}function v(t){return t.arcs.reduce((function(t,e){return t+(Boolean(e[0].arcs)?v(e[0])+1:0)}),t.arcs.length)}function x(t,e,r,n){var o=[],i=[],a=[];return t.forEach((function(t){if(t.isVirtual=!1,"inline_expression"===(0,s.default)(t.kind)){if(t.depth=e,t.isVirtual=!0,t.arcs){var o=structuredClone(t);o.numberofrows=v(o),delete o.arcs,i.push(o),t.arcs.forEach((function(t){a=a.concat(x(t,e+1,o.from,o.to)),t.forEach((function(t){m(t,o)}))})),e>d&&(d=e)}else i.push(t);a.push([{kind:"|||",from:t.from,to:t.to,isVirtual:!0}])}else r&&n&&"empty"===(0,s.default)(t.kind)&&(t.from=r,t.to=n,t.depth=e),i.push(t)})),o.push(i),o.concat(a)}function w(t){return d=0,{options:(0,f.default)(t.options),entities:structuredClone(t.entities),arcs:(e=t.arcs,e?e.reduce((function(t,e){return t.concat(x(e,0))}),[]):[]),depth:d+1};var e}},788:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.freeze({"<-":"->","<=":"=>","<<=":"=>>","<<":">>","<:":":>","x-":"-x"});e.default=function(t){return r[t]||t}},498:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return Object.assign({wordwraparcs:!1,wordwrapentities:!0,wordwrapboxes:!0},t||{})}},370:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={LINE_WIDTH:2,FONT_SIZE:12}},420:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Thing=void 0;var c=a(r(370)),u=i(r(772)),s=i(r(912)),l=i(r(314)),f=function(){function t(t){this.interEntitySpacing=160,this.height=34,this.width=100,this.entityXHWM=0,this.entity2x={},t&&(this.interEntitySpacing=160*t,this.width=100*t)}return t.prototype.getX=function(t){return this.entity2x[t]},t.prototype.getDims=function(){return{interEntitySpacing:this.interEntitySpacing,height:this.height,width:this.width,entityXHWM:this.entityXHWM}},t.prototype.getOAndD=function(t,e){return{from:this.getX(t)this.getX(t)?this.getX(e):this.getX(t)}},t.prototype.renderEntities=function(t,e,r){var n=this,o=s.createGroup();return this.entityXHWM=0,this.height=this.getMaxEntityHeight(t,r)+2*c.default.LINE_WIDTH,t.forEach((function(t){o.appendChild(n.renderEntity(t,n.entityXHWM,e,r)),n.setX(t,n.entityXHWM),n.entityXHWM+=n.interEntitySpacing})),o},t.prototype.setX=function(t,e){this.entity2x[t.name]=e+this.width/2},t.prototype.getNoEntityLines=function(t,e,r){return u.splitLabel(t,"entity",this.width,e,r).length},t.prototype.sizeEntityBoxToLabel=function(t,e){var r=Math.min(l.getBBox(t).width+4*c.default.LINE_WIDTH,this.interEntitySpacing/3+e.width);return r>=e.width&&(e.x-=(r-e.width)/2,e.width=r),e},t.prototype.renderEntity=function(t,e,r,n){var o=s.createGroup(),i={x:e||0,y:r||0,width:this.width,height:this.height},a=u.createLabel(Object.assign({kind:"entity"},t),Object.assign({},i,{y:i.y+i.height/2}),n);return o.appendChild(s.createRect(this.sizeEntityBoxToLabel(a,i),{class:"entity",color:t.linecolor,bgColor:t.textbgcolor})),o.appendChild(a),o},t.prototype.getMaxEntityHeight=function(t,e){var r=this,n=t[0],o=2;return t.forEach((function(t){var i=r.getNoEntityLines(t.label,c.default.FONT_SIZE,e);i>o&&(o=i,n=t)})),o>2?Math.max(this.height,l.getBBox(this.renderEntity(n,0,0,e)).height):this.height},t}();e.Thing=f},871:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setPrefix=function(t){n=r+t},e.get=function(t){return n+(t||"")};var r="mscgenjs",n=r},475:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getClass=function(t){return i[t]||t},e.getAggregateClass=function(t){return(0,o.default)(t)||t};var o=n(r(796)),i=Object.freeze({"|||":"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"})},598:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getAttributes=function(t,e,r,n,o){var a=[];return i[e]&&i[e].attributes&&(a=i[e].attributes.map((function(i){return{name:i.name,value:i.value.replace(/\{\{signal-marker-end\}\}/g,c(e,n,o)).replace(/\{\{signal-marker-start\}\}/g,u(e,n,o)).replace(/\{\{id\}\}/g,t).replace(/\{\{color\}\}/g,r||"black")}}))),a},e.getMarkerDefs=function(t,e){return function(t){return t.arcs.reduce(l,[]).sort().map(f)}(e).map((function(e){return a[e.kind].variants.map((function(r){return{name:"".concat(t+e.kind+r.name,"-").concat(e.color),path:r.path,color:e.color,type:e.kind}}))})).flat(1/0)};var o=n(r(788)),i={"->":{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:""}}},a={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"}]}};function c(t,e,r){return e&&r&&["<->","->"].includes(t)?e"===t&&e<=r?"signal-l":"signal-lu"}function s(t,e){return i[(0,o.default)(t)].marker.name+(Boolean(e)?" "+e:" black")}function l(t,e){function r(e){l(t,e)}return Array.isArray(e)&&e.forEach(r),e.arcs&&e.arcs.forEach(r),e.kind&&i[(0,o.default)(e.kind)]&&i[(0,o.default)(e.kind)].marker&&!t.includes(s(e.kind,e.linecolor))&&t.push(s(e.kind,e.linecolor)),t}function f(t){return{kind:t.split(" ")[0],color:t.split(" ")[1]}}},939:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.clean=void 0,e.render=function(t,e,r,n){var o=Object.freeze((0,u.flatten)(t)),i=function(t,e){return t.document.getElementById(e)||t.document.body}(e,r);return f.setPrefix(r),function(t,e,r,n){var o;A.document=g.bootstrap(e,r,f.get(),h.getMarkerDefs(f.get(),t),n),A.mirrorEntitiesOnBottom=n.mirrorEntitiesOnBottom,A.regularArcTextVerticalAlignment=n.regularArcTextVerticalAlignment,v.init(A.document),A.layers={lifeline:(o=A.document).getElementById(f.get("_lifelines")),sequence:o.getElementById(f.get("_sequence")),notes:o.getElementById(f.get("_notes")),inline:o.getElementById(f.get("_arcspans")),watermark:o.getElementById(f.get("_watermark"))},A.maxDepth=t.depth,function(t,e){x=new l.Thing(e&&e.hscale),function(t,e){t.arcRowHeight=_,t.arcGradient=C,t.wordWrapArcs=!1,e.arcgradient&&(t.arcRowHeight=parseInt(e.arcgradient,10)+_,t.arcGradient=parseInt(e.arcgradient,10)+C),t.wordWrapArcs=Boolean(e.wordwraparcs)}(t,e)}(A,t.options)}(o,e,i,n||{}),function(t){var e,r,n;S(t.entities,0,t.options),m.clear(x.getDims().height,A.arcRowHeight),function(t,e,r){O=[],j(e,"arcrow",A.arcRowHeight,m.get(-1).y).forEach((function(t){A.layers.lifeline.appendChild(t)})),function(t,e,r){var n=0;t.forEach((function(t,o){t.every((function(t){return t.isVirtual}))?m.set(o,Math.max(m.get(o).height,L(t,e,r))):(m.set(o,Math.max(m.get(o).height,L(t,e,r)),n),n++)}))}(t,e,r),t.forEach((function(t,n){!function(t,e,r,n){var o="arcrow",i=[];t.forEach((function(t){var a={};switch((0,c.default)(t.kind)){case"empty":a=P(t,m.get(e).y),"..."===t.kind&&(o="arcrowomit"),i.push({layer:A.layers.sequence,element:a});break;case"box":a=D(x.getOAndD(t.from,t.to),t,m.get(e).y,n),i.push({title:t.title,layer:A.layers.notes,element:a});break;case"inline_expression":a=E(t,m.get(e).y),i.push({layer:A.layers.notes,element:a}),O.push({arc:t,rownum:e});break;default:a=k(t,r,i,e,n)}})),j(r,o,m.get(e).height,m.get(e).y).forEach((function(t){A.layers.lifeline.appendChild(t)})),i.forEach((function(t){t.element&&(t.title&&t.element.appendChild(y.createTitle(t.title)),t.layer.appendChild(t.element))}))}(t,n,e,r)})),O.forEach((function(t){var e,r,n,o;A.layers.inline.appendChild((e=t,r=m.get(t.rownum).y,n=m.get(e.rownum).y,o=m.get(e.rownum+e.arc.numberofrows+1).y-n,e.arc.label="",function(t,e,r,n){var o=2*A.maxDepth*s.default.LINE_WIDTH,i=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o,a=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-o)/2,c=2*(A.maxDepth-e.depth)*s.default.LINE_WIDTH;return y.createRect({width:i+2*c,height:r||A.arcRowHeight-2*s.default.LINE_WIDTH,x:a-c,y:n},{class:"box inline_expression ".concat(e.kind),color:e.linecolor,bgColor:e.textbgcolor})}(x.getOAndD(e.arc.from,e.arc.to),e.arc,o,r)))}))}(t.arcs,t.entities,t.options),A.mirrorEntitiesOnBottom&&(e=t.entities,r=t.options,n=m.getLast().y+(m.getLast().height+A.arcRowHeight)/2,j(e,"arcrow",A.arcRowHeight,n).forEach((function(t){A.layers.lifeline.appendChild(t)})),S(e,n+A.arcRowHeight/2,r))}(o),function(t){var e,r,n=function(t){var e=b.determineDepthCorrection(t.depth,s.default.LINE_WIDTH),r=m.getLast(),n={width:t.entities.length*x.getDims().interEntitySpacing+e,height:Boolean(A.mirrorEntitiesOnBottom)?2*x.getDims().height+r.y+r.height+2*w:r.y+r.height/2+2*w,horizontaltransform:(x.getDims().interEntitySpacing+e-x.getDims().width)/2,autoscale:!!t.options&&!!t.options.width&&"auto"===t.options.width,verticaltransform:w,scale:1};return n.x=0-n.horizontaltransform,n.y=0-n.verticaltransform,n}(t);e=n,(r=A.document.getElementById(f.get("_background")))&&r.appendChild(y.createRect(e,{class:"bglayer"})),function(t){var e=A.document.getElementById(f.get()),r=A.document.getElementById(f.get("_body"));r&&e&&(r.setAttribute("transform","translate(".concat(t.horizontaltransform,",").concat(t.verticaltransform,") ")+"scale(".concat(t.scale,",").concat(t.scale,")")),t.autoscale&&!0===t.autoscale?y.updateSVG(e,{width:"100%",height:"100%",viewBox:"0 0 ".concat(t.width.toString()," ").concat(t.height.toString())}):y.updateSVG(e,{width:t.width.toString(),height:t.height.toString(),viewBox:"0 0 ".concat(t.width.toString()," ").concat(t.height.toString())}))}(n=function(t,e){return t.watermark&&function(t,e){A.layers.watermark.appendChild(y.createDiagonalText(t,e,"watermark"))}(t.watermark,e),t.width&&"auto"!==t.width&&(e=b.scaleCanvasToWidth(t.width,e)),e}(t.options,n))}(o),v.webkitNamespaceBugWorkaround(i.innerHTML)};var c=a(r(796)),u=r(635),s=a(r(370)),l=r(420),f=i(r(871)),d=i(r(475)),h=i(r(598)),p=i(r(772)),g=i(r(780)),b=i(r(340)),m=i(r(416)),y=i(r(912)),v=i(r(314)),x=new l.Thing(0),w=3,_=38,C=0,A=Object.seal({arcRowHeight:_,arcGradient:C,arcEndX:0,wordWrapArcs:!1,mirrorEntitiesOnBottom:!1,regularArcTextVerticalAlignment:"middle",maxDepth:0,document:{},layers:{lifeline:{},sequence:{},notes:{},inline:{},watermark:{}}}),O=[];function S(t,e,r){A.layers.sequence.appendChild(x.renderEntities(t,e,r)),A.arcEndX=x.getDims().entityXHWM-x.getDims().interEntitySpacing+x.getDims().width}function k(t,e,r,n,o){var i=y.createGroup();return t.from&&t.to&&("*"===t.to?(function(t,e,r,n,o){var i=0,a=t.label,c=x.getX(t.from);t.label="",e.forEach((function(e){var a={};e.name!==t.from&&(i=x.getX(e.name),a=M(t,c,i,n,o),r.push({layer:A.layers.sequence,element:a}))})),t.label=a}(t,e,r,n,o),i=p.createLabel(t,{x:0,y:m.get(n).y,width:A.arcEndX},Object.assign({alignAround:!0,ownBackground:!0},structuredClone(o))),r.push({title:t.title,layer:A.layers.sequence,element:i})):(i=M(t,x.getX(t.from),x.getX(t.to),n,o),r.push({title:t.title,layer:A.layers.sequence,element:i}))),i}function L(t,e,r){var n=0;return t.forEach((function(t){var o;switch((0,c.default)(t.kind)){case"empty":o=P(t,0);break;case"box":o=D(x.getOAndD(t.from,t.to),t,0,r);break;case"inline_expression":o=E(t,0);break;default:var i=structuredClone(t);i.arcskip=0,o=k(i,e,[],0,r)}n=Math.max(n,v.getBBox(o).height+2*s.default.LINE_WIDTH)})),n}function E(t,e){var r=x.getOAndD(t.from,t.to),n=e>0,o=2*A.maxDepth*s.default.LINE_WIDTH,i=r.to-r.from+(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH)-7-s.default.LINE_WIDTH,a=r.from-(x.getDims().interEntitySpacing-3*s.default.LINE_WIDTH-o)/2-2*(A.maxDepth-t.depth)*s.default.LINE_WIDTH,c=y.createGroup();n||(t.label=t.kind+(t.label?": "+t.label:""));var u=p.createLabel(t,{x:a+s.default.LINE_WIDTH-i/2,y:e+A.arcRowHeight/4,width:i},{alignLeft:!0,ownBackground:!1,wordwraparcs:A.wordWrapArcs}),l=v.getBBox(u),f=Math.max(l.height+2*s.default.LINE_WIDTH,A.arcRowHeight/2-2*s.default.LINE_WIDTH),d=Math.min(l.width+2*s.default.LINE_WIDTH,i),h=y.createEdgeRemark({width:d-s.default.LINE_WIDTH+7,height:f,x:a,y:e},{class:"box inline_expression_label",color:t.linecolor,bgColor:t.textbgcolor,foldSize:7});return c.appendChild(h),c.appendChild(u),c}function j(t,e,r,n){return r","::","<:>"].includes(t.kind),l=function(t,e,r){var n=m.get(t).y+e;if(r){var o=Math.floor(r),i=r-o,a=m.get(t).realRowNumber;n=m.getByRealRowNumber(a+o).y+i*(m.getByRealRowNumber(a+o+1).y-m.getByRealRowNumber(a+o).y)}return n}(n,A.arcGradient,t.arcskip);if(e===(r=b.determineArcXTo(t.kind,e,r))){a.appendChild(function(t,e,r,n,o,i){var a=A.arcRowHeight/5*2,c=x.getDims().interEntitySpacing/2,u={},l="arc ".concat(d.getAggregateClass(t)," ").concat(d.getClass(t));if(n){u=y.createGroup();var p=y.createUTurn({x:e,y:o,width:c-2*s.default.LINE_WIDTH,height:a},o+r+a-2*s.default.LINE_WIDTH,{class:l,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH}),g=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a-s.default.LINE_WIDTH,{lineWidth:s.default.LINE_WIDTH}),b=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a,{class:l,dontHitHome:"::"!==t,lineWidth:s.default.LINE_WIDTH});i&&p.setAttribute("style","stroke:".concat(i)),h.getAttributes(f.get(),t,i,e,e).forEach((function(t){g.setAttribute(t.name,t.value)})),g.setAttribute("style","stroke:transparent;"),Boolean(i)&&b.setAttribute("style","stroke:".concat(i)),u.appendChild(p),u.appendChild(b),u.appendChild(g),u.setAttribute("class",l)}else u=y.createUTurn({x:e,y:o,width:c,height:a},o+r+a,{class:l,dontHitHome:"-x"===t,lineWidth:s.default.LINE_WIDTH}),h.getAttributes(f.get(),t,i,e,e).forEach((function(t){u.setAttribute(t.name,t.value)}));return u}(t.kind,e,l-m.get(n).y-A.arcGradient,u,m.get(n).y,t.linecolor));var g=2*x.getDims().interEntitySpacing/3;a.appendChild(p.createLabel(t,{x:e+1.5*s.default.LINE_WIDTH-g/2,y:m.get(n).y-A.arcRowHeight/5-s.default.LINE_WIDTH/2,width:g},Object.assign({alignLeft:!0,alignAbove:!0,ownBackground:!0},structuredClone(o))))}else{var v=y.createLine({xFrom:e,yFrom:m.get(n).y,xTo:r,yTo:l},{class:c,doubleLine:u});h.getAttributes(f.get(),t.kind,t.linecolor,e,r).forEach((function(t){v.setAttribute(t.name,t.value)})),a.appendChild(v),a.appendChild(p.createLabel(t,{x:e,y:m.get(n).y+(l-m.get(n).y)/2,width:r-e},Object.assign({alignAround:!0,alignAbove:"above"===A.regularArcTextVerticalAlignment,ownBackground:!0},structuredClone(o))))}return a}function T(t,e,r){var n=0,o=A.arcEndX;return t.from&&t.to&&(n=e.from,o=e.to-e.from),p.createLabel(t,{x:n,y:r,width:o},{ownBackground:!0,wordwraparcs:A.wordWrapArcs})}function D(t,e,r,n){var o,i=2*A.maxDepth*s.default.LINE_WIDTH,a=t.to-t.from+x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i,c=t.from-(x.getDims().interEntitySpacing-2*s.default.LINE_WIDTH-i)/2,u=y.createGroup(),l=p.createLabel(e,{x:c,y:r,width:a},n),f=v.getBBox(l),d=Math.max(f.height+2*s.default.LINE_WIDTH,A.arcRowHeight-2*s.default.LINE_WIDTH),h={width:a,height:d,x:c,y:r-d/2};switch(e.kind){case"rbox":o=y.createRBox(h,{class:"box rbox",color:e.linecolor,bgColor:e.textbgcolor});break;case"abox":o=y.createABox(h,{class:"box abox",color:e.linecolor,bgColor:e.textbgcolor});break;case"note":o=y.createNote(h,{class:"box note",color:e.linecolor,bgColor:e.textbgcolor,lineWidth:s.default.LINE_WIDTH});break;default:o=y.createRect(h,{class:"box",color:e.linecolor,bgColor:e.textbgcolor})}return u.appendChild(o),u.appendChild(l),u}e.clean=function(t,e){A.document=g.init(e),v.init(A.document),v.removeRenderedSVGFromElement(t)}},772:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLabel=function(t,e,r,n){var o=f.createGroup(n);if(r=r||{},t.label){var i=e.x+e.width/2,a=function(t,e){return e.alignAbove&&t.forEach((function(){t.push("")})),e.alignAround&&1===t.length&&t.push(""),t}(p(t.label,t.kind,e.width,s.default.FONT_SIZE,r),r),c=function(t,e,r){return r.alignAround?e.y-(t.length-1)/2*(d.calculateTextHeight()+s.default.LINE_WIDTH+1):e.y-(t.length-1)/2*(d.calculateTextHeight()+1)}(a,e,r);a.forEach((function(e,n){if(""!==e){var a=function(t,e,r,n,o,i){var a,c,u,p=r+(o+1/4)*d.calculateTextHeight(),g=function(t,e){var r=t,n=l.getClass(r),o=l.getAggregateClass(r);return n===o?n+e:o+e+n+e}(n.kind,"-text ");return i.alignLeft&&(g+="anchor-start "),i.alignAround&&(p=r+(o+1/4)*(d.calculateTextHeight()+s.default.LINE_WIDTH)),a=h(function(t,e,r,n,o){var i=0===e?{class:n,url:o.url,id:o.id,idurl:o.idurl}:{class:n,url:o.url};return f.createText(t,r,i)}(t,o,{x:e,y:p},g,n),n.textcolor),c=n.url,u=n.textcolor,h(a,c&&!u?"blue":u)}(e,i,c,t,n,r);r.ownBackground&&o.appendChild((u=a,p=t.textbgcolor,g=f.createRect(d.getBBox(u),{class:"label-text-background"}),p&&g.setAttribute("style","fill:".concat(p,"; stroke:").concat(p,";")),g)),o.appendChild(a)}var u,p,g;c++}))}return o},e.splitLabel=p;var c=a(r(796)),u=a(r(900)),s=a(r(370)),l=i(r(475)),f=i(r(912)),d=i(r(314));function h(t,e){return e&&t.setAttribute("style","fill:".concat(e,";")),t}function p(t,e,r,n,o){return function(t,e){return function(t,e){return"box"===(0,c.default)(t)&&e}(t,e.wordwrapboxes)||function(t,e){return"entity"===t&&e}(t,e.wordwrapentities)||function(t,e){return"box"!==(0,c.default)(t)&&"entity"!==t&&e}(t,e.wordwraparcs)||void 0===t}(e,o)?(0,u.default)(t,function(t,e){var r=Math.abs(t);return r<=160?r/(e/12*8):r<=320?r/(e/12*6.4):r<=480?r/(e/12*5.9):r/(e/12*5.6)}(r,n)):t.split("\\n")}},780:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.init=f,e.bootstrap=function(t,e,r,n,o){l=f(t);var i,a,h=c.createSVG(r,r,function(t){var e="",r=d(t.additionalTemplate);return Boolean(r)&&(e=r.renderMagic),e}(o));return Boolean(o.source)&&h.appendChild(function(t,e){var r=c.createDesc();return r.appendChild(t.document.createTextNode("\n\n# Generated by mscgen_js - https://sverweij.github.io/mscgen_js\n".concat(e))),r}(t,o.source)),h.appendChild(function(t,e,r){var n=c.createDefs();return n.appendChild(function(t,e){var r=l.createElement("style");return r.setAttribute("type","text/css"),r.appendChild(l.createTextNode(function(t,e){return(r=d(t.additionalTemplate)||{},n=t.styleAdditions,(r.cssBefore||"")+s.baseTemplate+(r.cssAfter||"")+(n||"")).replace(/<%=fontSize%>/g,u.default.FONT_SIZE).replace(/<%=lineWidth%>/g,u.default.LINE_WIDTH).replace(/<%=id%>/g,e);var r,n}(t,e))),r}(r,t)),function(t,e){return e.forEach((function(e){"method"===e.type?t.appendChild(c.createMarkerPolygon(e.name,e.path,e.color)):t.appendChild(c.createMarkerPath(e.name,e.path,e.color))})),t}(n,e)}(r,n,o)),h.appendChild((i=r,(a=c.createGroup("".concat(i,"_body"))).appendChild(c.createGroup("".concat(i,"_background"))),a.appendChild(c.createGroup("".concat(i,"_arcspans"))),a.appendChild(c.createGroup("".concat(i,"_lifelines"))),a.appendChild(c.createGroup("".concat(i,"_sequence"))),a.appendChild(c.createGroup("".concat(i,"_notes"))),a.appendChild(c.createGroup("".concat(i,"_watermark"))),a)),e.appendChild(h),l};var c=i(r(912)),u=a(r(370)),s=r(6),l={};function f(t){return c.init(t.document,{LINE_WIDTH:u.default.LINE_WIDTH,FONT_SIZE:u.default.FONT_SIZE}),t.document}function d(t){return s.namedStyles.find((function(e){return e.name===t}))}},340:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scaleCanvasToWidth=function(t,e){var r=structuredClone(e);return r.scale=t/r.width,r.width*=r.scale,r.height*=r.scale,r.horizontaltransform*=r.scale,r.verticaltransform*=r.scale,r.x=0-r.horizontaltransform,r.y=0-r.verticaltransform,r},e.determineDepthCorrection=function(t,e){return t?2*(t+1)*e*2:0},e.determineArcXTo=function(t,e,r){return"-x"===t?e+3/4*(r-e):r}},416:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.get=i,e.getLast=a,e.clear=function(t,e){r=[],n=t,o=e},e.getByRealRowNumber=function(t){var e=r.find((function(e){return e.realRowNumber===t}));return void 0===e&&(e=a()),e},e.set=function(t,e,n){void 0===n&&(n=-1);var o=i(t-1);r[t]={y:o.y+(o.height+e)/2,height:e,realRowNumber:n}};var r=[],n=0,o=0;function i(t){return r[t]?r[t]:{y:n+1.5*o+t*o,height:o,realRowNumber:r.length-1}}function a(){return i(r.length-1)}},706:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XLINKNS=e.SVGNS=void 0,e.setAttribute=n,e.setAttributeNS=o,e.setAttributes=i,e.setAttributesNS=function(t,e,r){return Object.keys(r||{}).forEach((function(n){o(t,e,n,r[n])})),t},e.createElement=function(t,n){return i(r.createElementNS(e.SVGNS,t),n)},e.createTextNode=function(t){return r.createTextNode(t)},e.init=function(t){r=t},e.SVGNS="http://www.w3.org/2000/svg",e.XLINKNS="http://www.w3.org/1999/xlink";var r={};function n(t,e,r){return Boolean(r)&&t.setAttribute(e,r),t}function o(t,e,r,n){return Boolean(n)&&t.setAttributeNS(e,r,n),t}function i(t,e){return Object.keys(e||{}).forEach((function(r){n(t,r,e[r])})),t}},424:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return 0-360*Math.atan(t.height/t.width)/(2*Math.PI)}},912:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.createMarkerPolygon=e.createMarkerPath=e.createGroup=e.createUTurn=e.createDiagonalText=e.createText=e.createNote=e.createABox=e.createRBox=e.createRect=e.createTSpan=e.createDefs=e.createDesc=e.createTitle=e.updateSVG=void 0,e.init=function(t,e){c.init(t),l=Object.assign({LINE_WIDTH:2,FONT_SIZE:12},e)},e.createSVG=function(t,e,r){return s=function(t){return Boolean(t)?"wobbly"===t?u:a:s}(r),c.createSVG(t,e)},e.createEdgeRemark=function(t,e){return s.createEdgeRemark(t,{class:e.class,color:e.color,bgColor:e.bgColor,foldSize:e.foldSize,lineWidth:l.LINE_WIDTH})},e.createLine=function(t,e){return Boolean(e)&&Boolean(e.doubleLine)?(e.lineWidth||(e.lineWidth=l.LINE_WIDTH),s.createDoubleLine(t,e)):s.createSingleLine(t,e)};var a=i(r(767)),c=i(r(452)),u=i(r(180)),s=a,l={};e.updateSVG=c.updateSVG,e.createTitle=c.createTitle,e.createDesc=c.createDesc,e.createDefs=c.createDefs,e.createTSpan=c.createTSpan,e.createRect=function(t,e){return s.createRect(t,e)},e.createRBox=function(t,e){return s.createRBox(t,e)},e.createABox=function(t,e){return s.createABox(t,e)},e.createNote=function(t,e){return s.createNote(t,e)},e.createText=c.createText,e.createDiagonalText=c.createDiagonalText,e.createUTurn=c.createUTurn,e.createGroup=c.createGroup,e.createMarkerPath=c.createMarkerPath,e.createMarkerPolygon=c.createMarkerPolygon},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return e?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Math.round(t)}},767:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.createRect=e.createSingleLine=void 0,e.createDoubleLine=function(t,e){var r=e.lineWidth||1,n=r,o=e?e.class:"",i=c.getDirection(t),u=c.determineEndCorrection(t,o,r),s=c.determineStartCorrection(t,o,r),l=(t.xTo-t.xFrom+u-s).toString(),f=(t.yTo-t.yFrom).toString(),d=a.pathPoint2String("l",i.signX,i.dy),h=a.pathPoint2String("l",l,f);return a.createPath(a.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*i.dy)+d+a.pathPoint2String("M",t.xFrom+s,t.yFrom-n)+h+a.pathPoint2String("M",t.xFrom+s,t.yFrom+n)+h+a.pathPoint2String("M",t.xTo-i.signX,t.yTo+7.5*r*i.dy)+d,e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=n.toString(10);return a.createPath(a.pathPoint2String("M",t.x,t.y)+a.pathPoint2String("l",t.width-n,0)+a.pathPoint2String("l",0,o)+a.pathPoint2String("l",o,0)+a.pathPoint2String("m",-o,-o)+a.pathPoint2String("l",o,o)+a.pathPoint2String("l",0,t.height-n)+a.pathPoint2String("l",-t.width,0)+a.pathPoint2String("l",0,-t.height)+"z",e)},e.createRBox=function(t,e){var r=Object.assign({rx:6,ry:6},e);return a.createRect(t,r)},e.createABox=function(t,e){return a.createPath(a.pathPoint2String("M",t.x,t.y+t.height/2)+a.pathPoint2String("l",3,-t.height/2)+a.pathPoint2String("l",t.width-6,0)+a.pathPoint2String("l",3,t.height/2)+a.pathPoint2String("l",-3,t.height/2)+a.pathPoint2String("l",-(t.width-6),0)+"z",e)},e.createEdgeRemark=function(t,e){var r=e&&e.foldSize?e.foldSize:7,n=Object.assign({class:null,color:null,bgColor:null},e);return a.createPath(a.pathPoint2String("M",t.x,t.y)+a.pathPoint2String("l",t.width,0)+a.pathPoint2String("l",0,t.height-r)+a.pathPoint2String("l",-r,r)+a.pathPoint2String("l",-(t.width-r),0),n)};var a=i(r(452)),c=i(r(544));e.createSingleLine=a.createSingleLine,e.createRect=a.createRect},452:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateSVG=e.init=void 0,e.point2String=f,e.pathPoint2String=d,e.createTSpan=g,e.createText=b,e.createPath=m,e.createSingleLine=function(t,e){return c.createElement("line",{x1:(0,s.default)(t.xFrom,l).toString(),y1:(0,s.default)(t.yFrom,l).toString(),x2:(0,s.default)(t.xTo,l).toString(),y2:(0,s.default)(t.yTo,l).toString(),class:e?e.class:null})},e.createRect=function(t,e){var r=Object.assign({class:null,color:null,bgColor:null,rx:null,ry:null},e);return y(c.createElement("rect",{width:(0,s.default)(t.width,l),height:(0,s.default)(t.height,l),x:(0,s.default)(t.x,l),y:(0,s.default)(t.y,l),rx:(0,s.default)(r.rx||0,l),ry:(0,s.default)(r.ry||0,l),class:r.class}),r.color,r.bgColor)},e.createUTurn=function(t,e,r){var n=Object.assign({class:null,dontHitHome:!1,lineWidth:1},r),o=n.dontHitHome?t.x+7.5*(n.lineWidth||1):t.x;return m(d("M",t.x,t.y-t.height/2)+d("C",t.x+t.width,t.y-7.5*(n.lineWidth||1)/2)+f({x:t.x+t.width,y:e+0})+f({x:o,y:e}),{class:n.class})},e.createGroup=function(t,e){return c.createElement("g",{id:t,class:e})},e.createMarkerPath=function(t,e,r){var n=h(t,"arrow-marker","auto");return n.appendChild(m(e,{class:"arrow-style",style:"stroke-dasharray:100,1;stroke:".concat(r)||0})),n},e.createMarkerPolygon=function(t,e,r){var n=h(t,"arrow-marker","auto");return n.appendChild(c.createElement("polygon",{points:e,class:"arrow-style",stroke:r||"black",fill:r||"black"})),n},e.createTitle=function(t){var e=c.createElement("title"),r=c.createTextNode(t);return e.appendChild(r),e},e.createDiagonalText=function(t,e,r){return c.setAttributes(b(t,{x:e.width/2,y:e.height/2},{class:r}),{transform:"rotate(".concat((0,s.default)((0,u.default)(e),l).toString()," ")+"".concat((0,s.default)(e.width/2,l).toString()," ")+"".concat((0,s.default)(e.height/2,l).toString(),")")})},e.createDesc=function(){return c.createElement("desc")},e.createDefs=function(){return c.createElement("defs")},e.createSVG=function(t,e){return c.createElement("svg",{version:"1.1",id:t,class:e,xmlns:c.SVGNS,"xmlns:xlink":c.XLINKNS,width:"0",height:"0"})};var c=i(r(706)),u=a(r(424)),s=a(r(136)),l=2;function f(t){return"".concat((0,s.default)(t.x,l).toString(),",").concat((0,s.default)(t.y,l).toString()," ")}function d(t,e,r){return t+f({x:e,y:r})}function h(t,e,r,n){return c.createElement("marker",{orient:r,id:t,class:e,viewBox:Boolean(n)?n:"0 0 10 10",refX:"9",refY:"3",markerUnits:"strokeWidth",markerWidth:"10",markerHeight:"10"})}var p="vertical-align:text-top;";function g(t,e){var r=c.createElement("tspan"),n=c.createTextNode(t);return r.appendChild(n),e?function(t,e){var r=c.createElement("a");return c.setAttributesNS(r,c.XLINKNS,{"xlink:href":t,"xlink:title":t}),r.appendChild(e),r}(e,r):r}function b(t,e,r){var n=Object.assign({class:null,url:null,id:null,idurl:null},r),o=c.createElement("text",{x:(0,s.default)(e.x,l).toString(),y:(0,s.default)(e.y,l).toString(),class:n.class});if(o.appendChild(g(t,n.url)),n.id){var i=g(" [".concat(n.id,"]"),n.idurl);i.setAttribute("style",p),o.appendChild(i)}return o}function m(t,e){var r=Object.assign({class:null,style:null,color:null,bgColor:null},e);return y(c.createElement("path",{d:t,class:r.class,style:r.style}),r.color,r.bgColor)}function y(t,e,r){var n="";return r&&(n+="fill:".concat(r,";")),e&&(n+="stroke:".concat(e,";")),c.setAttribute(t,"style",n)}p+="font-size:0.7em;text-anchor:start;",e.init=c.init,e.updateSVG=c.setAttributes},544:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.determineStartCorrection=function(t,e,r){var n=0;return!e.includes("nodi")&&e.includes("bidi")&&(n=t.xTo>t.xFrom?7.5*r:-7.5*r),n},e.determineEndCorrection=function(t,e,r){var n=0;return e.includes("nodi")||(n=t.xTo>t.xFrom?-7.5*r:7.5*r),n},e.getDirection=function(t){var e=t.xTo>t.xFrom?1:-1;return{signX:e,signY:t.yTo>t.yFrom?1:-1,dy:e*(t.yTo-t.yFrom)/(t.xTo-t.xFrom)}}},994:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.renderNotePathString=function(t,e){return a.pathPoint2String("M",t.x,t.y)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width,t.y+e)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height})+a.pathPoint2String("L",t.x,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height,xTo:t.x,yTo:t.y})+a.pathPoint2String("L",t.x,t.y)+"z"},e.renderNoteCornerString=function(t,e){return a.pathPoint2String("M",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width-e,t.y+e)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+e})+a.pathPoint2String("L",t.x+t.width,t.y+e)},e.abox2CurveString=function(t,e){return a.pathPoint2String("M",t.x,t.y+t.height/2)+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height/2,xTo:t.x+e,yTo:t.y})+a.pathPoint2String("L",t.x+e,t.y)+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height/2})+a.pathPoint2String("L",t.x+t.width,t.y+t.height/2)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height/2,xTo:t.x+t.width-e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y+t.height,xTo:t.x,yTo:t.y+t.height/2})+"z"},e.rbox2CurveString=function(t,e){return a.pathPoint2String("M",t.x,t.y+e)+(0,u.points2CurveString)([{controlX:t.x,controlY:t.y,x:t.x+e,y:t.y}])+(0,u.line2CurveString)({xFrom:t.x+e,yFrom:t.y,xTo:t.x+t.width-e,yTo:t.y})+a.pathPoint2String("L",t.x+t.width-e,t.y)+(0,u.points2CurveString)([{controlX:t.x+t.width,controlY:t.y,x:t.x+t.width,y:t.y+e}])+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+e,xTo:t.x+t.width,yTo:t.y+t.height-e})+a.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+(0,u.points2CurveString)([{controlX:t.x+t.width,controlY:t.y+t.height,x:t.x+t.width-e,y:t.y+t.height}])+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x+e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+e,t.y+t.height)+(0,u.points2CurveString)([{controlX:t.x,controlY:t.y+t.height,x:t.x,y:t.y+t.height-e}])+(0,u.line2CurveString)({xFrom:t.x,yFrom:t.y+t.height-e,xTo:t.x,yTo:t.y+e})+"z"},e.doubleLine2CurveString=function(t,e){var r=e.lineWidth||1,n=r,o=e?e.class:"",i=c.getDirection(t),s=c.determineEndCorrection(t,o,r),l=c.determineStartCorrection(t,o,r);return a.pathPoint2String("M",t.xFrom,t.yFrom-7.5*r*i.dy)+a.pathPoint2String("l",i.signX,i.dy)+a.pathPoint2String("M",t.xFrom+l,t.yFrom-n)+(0,u.line2CurveString)({xFrom:t.xFrom+l,yFrom:t.yFrom-n,xTo:t.xTo+s,yTo:t.yTo-n})+a.pathPoint2String("M",t.xFrom+l,t.yFrom+n)+(0,u.line2CurveString)({xFrom:t.xFrom+l,yFrom:t.yFrom+n,xTo:t.xTo+s,yTo:t.yTo+n})+a.pathPoint2String("M",t.xTo-i.signX,t.yTo+7.5*r*i.dy)+a.pathPoint2String("l",i.signX,i.dy)},e.edgeRemark2CurveString=function(t,e){return a.pathPoint2String("M",t.x+t.width,t.y)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y,xTo:t.x+t.width,yTo:t.y+t.height-e})+a.pathPoint2String("L",t.x+t.width,t.y+t.height-e)+(0,u.line2CurveString)({xFrom:t.x+t.width,yFrom:t.y+t.height-e,xTo:t.x+t.width-e,yTo:t.y+t.height})+a.pathPoint2String("L",t.x+t.width-e,t.y+t.height)+(0,u.line2CurveString)({xFrom:t.x+t.width-e,yFrom:t.y+t.height,xTo:t.x-1,yTo:t.y+t.height})+a.pathPoint2String("L",t.x-1,t.y+t.height)};var a=i(r(452)),c=i(r(544)),u=r(521)},521:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.points2CurveString=d,e.line2CurveString=function(t){return d(m(t,l,f))},e.getLineLength=h,e.getNumberOfSegments=p,e.getBetweenPoints=m;var c=a(r(136)),u=i(r(452)),s=i(r(544)),l=70,f=3;function d(t){return t.map((function(t){return"".concat(u.pathPoint2String("S",t.controlX,t.controlY)," ")+"".concat(u.point2String(t))})).join(" ")}function h(t){var e=Math.abs(t.xTo-t.xFrom),r=Math.abs(t.yTo-t.yFrom);return Math.sqrt(e*e+r*r)}function p(t,e){var r=h(t);return r>0?Math.floor(r/e):0}function g(t){return Math.round(2*Math.random()*t)-t}var b=2;function m(t,e,r){e=function(t,e){if(t<=0)throw new Error("pInterval must be > 0");return Math.min(h(e),t)}(e,t);for(var n,o=[],i=p(t,e),a=s.getDirection(t),u=a.signX*Math.sqrt(Math.pow(e,2)/(1+Math.pow(a.dy,2))),l=a.signY*(Math.abs(a.dy)===1/0?e:Math.sqrt(Math.pow(a.dy,2)*Math.pow(e,2)/(1+Math.pow(a.dy,2)))),f=1;f<=i;f++)e>h({xFrom:(n={controlX:(0,c.default)(t.xFrom+(f-.5)*u+g(r),b),controlY:(0,c.default)(t.yFrom+(f-.5)*l+g(r),b),x:(0,c.default)(t.xFrom+f*u,b),y:(0,c.default)(t.yFrom+f*l,b)}).x,yFrom:n.y,xTo:t.xTo,yTo:t.yTo})&&(n.x=t.xTo,n.y=t.yTo),o.push(n);return o}},180:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createSingleLine=function(t,e){void 0===e&&(e={});var r=f.getDirection(t);return l.createPath(l.pathPoint2String("M",t.xFrom,t.yFrom)+l.pathPoint2String("L",(0,s.default)(t.xFrom+r.signX*Math.sqrt(1/(1+Math.pow(r.dy,2))),2),t.yFrom+r.signY*(Math.abs(r.dy)===1/0?1:(0,s.default)(Math.sqrt(Math.pow(r.dy,2)/(1+Math.pow(r.dy,2))),2)))+(0,u.line2CurveString)(t),e)},e.createNote=function(t,e){var r=e&&e.lineWidth||1,n=Math.max(9,Math.min(4.5*r,t.height/2)),o=l.createGroup();return o.appendChild(l.createPath((0,c.renderNotePathString)(t,n),e)),e.bgColor="transparent",o.appendChild(l.createPath((0,c.renderNoteCornerString)(t,n),e)),o},e.createRect=function(t,e){return l.createPath((0,c.rbox2CurveString)(t,0),e)},e.createABox=function(t,e){return l.createPath((0,c.abox2CurveString)(t,3),e)},e.createRBox=function(t,e){return l.createPath((0,c.rbox2CurveString)(t,6),e)},e.createEdgeRemark=function(t,e){var r=e&&e.lineWidth||1,n=l.createGroup(),o=e&&e.foldSize?e.foldSize:7,i=e&&e.color?e.color:"black";e.color="transparent!important";var a=l.createPath(l.pathPoint2String("M",t.x,t.y+r/2)+l.pathPoint2String("L",t.x+t.width,t.y+r/2)+l.pathPoint2String("L",t.x+t.width,t.y+t.height-o)+l.pathPoint2String("L",t.x+t.width-o,t.y+t.height)+l.pathPoint2String("L",t.x,t.y+t.height)+"z",e);e.bgColor="transparent",e.color=i;var u=l.createPath((0,c.edgeRemark2CurveString)(t,o),e);return n.appendChild(a),n.appendChild(u),n},e.createDoubleLine=function(t,e){return l.createPath((0,c.doubleLine2CurveString)(t,e),{class:e.class})};var c=r(994),u=r(521),s=a(r(136)),l=i(r(452)),f=i(r(544))},314:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.webkitNamespaceBugWorkaround=e.init=void 0,e.getBBox=f,e.calculateTextHeight=function(){return 0!==l?l:l=f(c.createText("ÁjyÎ9ƒ@💩",{x:0,y:0})).height},e.removeRenderedSVGFromElement=function(t){a.setPrefix(t);var e=u.getElementById(a.get());if(Boolean(e)){var r=u.getElementById(t);r?r.removeChild(e):u.body.removeChild(e)}};var a=i(r(871)),c=i(r(912)),u={},s=a.get("bboxer"),l=0;function f(t){return"function"==typeof t.getBBox?(e=function(t){var e=u.getElementById(s);(e=e||function(t){var e=c.createSVG(t,a.get());return u.body.appendChild(e),e}(s)).appendChild(t);var r=t.getBBox();return e.removeChild(t),r}(t),r=1e5,Math.abs(e.height)>r||Math.abs(e.width)>r?{height:0,width:0,x:0,y:0}:e):{height:15,width:15,x:2,y:2};var e,r}e.init=function(t){u=t},e.webkitNamespaceBugWorkaround=function(t){return t.replace(/ xlink=/g," xmlns:xlink=").replace(/ href=/g," xlink:href=")}},20:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.explodeBroadcasts=w,e.render=function(t){var e=function(t){return w((0,u.default)(t,[s.nameAsLabel],[s.swapRTLArc,s.overrideColors]))}(structuredClone(t)),r="/* Sequence chart represented as a directed graph\n * in the graphviz dot language (http://graphviz.org/)\n *\n * Generated by mscgen_js (https://sverweij.github.io/mscgen_js)\n */\n\ngraph {\n";return r+="".concat(d,"rankdir=LR\n"),r+="".concat(d,"splines=true\n"),r+="".concat(d,"ordering=out\n"),r+="".concat(d,'fontname="Helvetica"\n'),r+="".concat(d,'fontsize="9"\n'),r+="".concat(d,'node [style=filled, fillcolor=white fontname="Helvetica", fontsize="9" ]\n'),r+="".concat(d,'edge [fontname="Helvetica", fontsize="9", arrowhead=vee, arrowtail=vee, dir=forward]\n'),r+="\n",r+="".concat(e.entities.reduce((function(t,e){return"".concat(t+d+function(t){return v(t.name)+y(m(t))}(e),";\n")}),""),"\n"),e.arcs&&(p=0,r+=x(e.arcs,"")),r+"}"};var c=a(r(796)),u=a(r(501)),s=i(r(635)),l=a(r(900)),f=i(r(882)),d=" ",h=40,p=0;function g(t,e){return"".concat(e,'="').concat(function(t){var e=(0,l.default)(t.replace(/"/g,'\\"'),h);return e.slice(0,-1).reduce((function(t,e){return"".concat(t+e,"\n")}),"")+e.slice(-1)}(t),'"')}function b(t,e,r){Boolean(e)&&t.push(g(e,r))}function m(t){return["label","color","fontcolor","fillcolor"].filter((function(e){return Boolean(t[e])})).map((function(e){return g(t[e],e)}))}function y(t){return t.slice(0,-1).reduce((function(t,e){return"".concat(t+e,", ")})," [")+"".concat(t.slice(-1),"]")}function v(t){return'"'.concat(t,'"')}function x(t,e){return t.reduce((function(t,r){return t+r.reduce((function(t,r){return t+function(t,e){var r="";return t.from&&t.to&&(r+="".concat(d+e+function(t,e,r){var n="",o=(0,c.default)(t.kind);return n+="box"===o?function(t,e,r){var n="",o="box".concat(e.toString());n+=o;var i=m(t);return b(i,f.getStyle(t.kind),"style"),b(i,f.getShape(t.kind),"shape"),n+="".concat(y(i),"\n").concat(d).concat(r),b(i=[],"dotted","style"),b(i,"none","dir"),(n+="".concat(o," -- {").concat(v(t.from),",").concat(v(t.to),"}"))+y(i)}(t,e,r):function(t,e,r){var n="";t.label=function(t,e){return e?"(".concat(t,") ").concat(e):"(".concat(t,")")}(r,t.label);var o=m(t);switch(b(o,f.getStyle(t.kind),"style"),e){case"directional":b(o,f.getArrow(t.kind),"arrowhead");break;case"bidirectional":b(o,f.getArrow(t.kind),"arrowhead"),b(o,f.getArrow(t.kind),"arrowtail"),b(o,"both","dir");break;case"nondirectional":b(o,"none","dir")}return t.arcs||(n+="".concat(v(t.from)," "),n+="--",n+=" ".concat(v(t.to)),n+=y(o)),n}(t,o,e),n}(t,++p,e),"\n"),t.arcs&&(r+="".concat(d+e,"subgraph cluster_").concat(p.toString(),"{"),r+="\n".concat(d).concat(e,' label="').concat(t.kind,": ").concat(t.label,'" labeljust="l"\n'),r+=x(t.arcs,e+d),r+="".concat(d+e,"}\n"))),r}(r,e)}),"")}),"")}function w(t){return t.arcs&&t.arcs.forEach((function(e,r){e.filter((function(t){return"*"===t.to})).forEach((function(n,o){var i=structuredClone(n);delete t.arcs[r][o];var a=function(t,e){return t.filter((function(t){return e.from!==t.name})).map((function(t){return e.to=t.name,structuredClone(e)}))}(t.entities,i);e[o]=a.shift(),t.arcs[r]=e.concat(a)}))})),t}},619:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.render=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var e=" ",r="\n",n=" * ";t.prototype.init.call(this,{program:{opener:"".concat(n,"\\msc").concat(r),closer:"".concat(n,"\\endmsc")},option:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r).concat(n).concat(r)},entity:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r).concat(n).concat(r)},arcline:{opener:n+e,separator:",".concat(r).concat(n).concat(e),closer:";".concat(r)},inline:{opener:";".concat(r),closer:"".concat(n,"#")}})},e.prototype.renderComments=function(){return""},e}(r(250).MscGenAdaptor);e.render=function(t){return new i(!1).render(t)}},250:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.MscGenAdaptor=void 0;var a=i(r(796)),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(e){t.prototype.init.call(this,Object.assign({supportedOptions:["hscale","width","arcgradient","wordwraparcs"],supportedEntityAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],supportedArcAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],inline:{opener:";".concat(this.eol),closer:"#"}},e))},e.prototype.renderKind=function(t){return"inline_expression"===(0,a.default)(t)?"--":t},e.prototype.optionIsValid=function(t){return!Boolean(t.value)||"string"!=typeof t.value||"auto"!==t.value.toLowerCase()},e}(r(532).XuAdaptor);e.MscGenAdaptor=c,e.render=function(t,e){return void 0===e&&(e=!1),new c(e).render(t)}},956:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.render=void 0;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){t.prototype.init.call(this,{supportedEntityAttributes:["label"],supportedArcAttributes:["label"],program:{opener:"",closer:""},option:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol).concat(this.eol)},entity:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol).concat(this.eol)},arcline:{opener:"",separator:",".concat(this.eol),closer:";".concat(this.eol)},inline:{opener:" {".concat(this.eol),closer:"}"},attribute:{opener:"",separator:"",closer:""}})},e.prototype.renderEntityName=function(t){return this.entityNameIsQuotable(t)?'"'.concat(t,'"'):t},e.prototype.renderAttribute=function(t){var e="";return t.name&&t.value&&(e+=' : "'.concat(t.value,'"')),e},e.prototype.entityNameIsQuotable=function(t){var e=t.match(/[^;, "\t\n\r=\-><:{*]+/gi);return e?1!==e.length:"*"!==t},e}(r(532).XuAdaptor);e.render=function(t){return(new i).render(t)}},532:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.XuAdaptor=void 0;var a=i(r(952)),c=i(r(383)),u=function(){function t(t){void 0===t&&(t=!1),this.indent=" ",this.space=" ",this.eol="\n",this.config={},!0===t?(this.indent="",this.space="",this.eol=""):(this.indent=" ",this.space=" ",this.eol="\n"),this.init(this.config)}return t.prototype.init=function(t){this.config=Object.assign({},this.getConfig(),t)},t.prototype.render=function(t){var e="";return t.precomment&&(e+=this.renderComments(t.precomment)),e+=this.config.program.opener,t.options&&(e+=this.renderOptions(t.options)),e+=this.renderEntities(t.entities),t.arcs&&(e+=this.renderArcLines(t.arcs,"")),e+this.config.program.closer},t.prototype.renderEntityName=function(t){return this.isQuotable(t)?'"'.concat(t,'"'):t},t.prototype.renderAttribute=function(t){var e="";return t.name&&t.hasOwnProperty("value")&&(e="string"==typeof t.value?this.renderStringAttribute(t):this.renderNonStringAttribute(t)),e},t.prototype.renderComments=function(t){return t.reduce((function(t,e){return t+e}),"")},t.prototype.renderOption=function(t){return"".concat(t.name,"=").concat("string"==typeof t.value?'"'+c.escapeString(t.value)+'"':t.value.toString())},t.prototype.optionIsValid=function(t){return!0},t.prototype.renderKind=function(t){return t},t.prototype.renderStringAttribute=function(t){return"".concat(t.name,'="').concat(c.escapeString(t.value),'"')},t.prototype.renderNonStringAttribute=function(t){return"".concat(t.name,"=").concat(t.value)},t.prototype.getConfig=function(){return{supportedOptions:["hscale","width","arcgradient","wordwraparcs","watermark","wordwrapentities","wordwrapboxes"],supportedEntityAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip"],supportedArcAttributes:["label","idurl","id","url","linecolor","textcolor","textbgcolor","arclinecolor","arctextcolor","arctextbgcolor","arcskip","title","activation"],program:{opener:"msc".concat(this.space,"{").concat(this.eol),closer:"}"},option:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol).concat(this.eol)},entity:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol).concat(this.eol)},attribute:{opener:"".concat(this.space,"["),separator:",".concat(this.space),closer:"]"},arcline:{opener:this.indent,separator:",".concat(this.eol).concat(this.indent),closer:";".concat(this.eol)},inline:{opener:"".concat(this.space,"{").concat(this.eol),closer:"".concat(this.indent,"}")}}},t.prototype.extractSupportedOptions=function(t,e){return e.filter((function(e){return void 0!==t[e]})).map((function(e){return{name:e,value:t[e]}}))},t.prototype.isQuotable=function(t){var e=t.match(/[a-z0-9]+/gi);return e?1!==e.length||a.isMscGenKeyword(t):"*"!==t},t.prototype.renderOptions=function(t){var e=this,r=this.extractSupportedOptions(t,this.config.supportedOptions).filter(this.optionIsValid),n="";if(r.length>0){var o=r.pop();n=r.reduce((function(t,r){return t+e.renderOption(r)+e.config.option.separator}),this.config.option.opener),n+=this.renderOption(o)+this.config.option.closer}return n},t.prototype.renderEntity=function(t){return this.renderEntityName(t.name)+this.renderAttributes(t,this.config.supportedEntityAttributes)},t.prototype.renderEntities=function(t){var e=this,r="";return t.length>0&&(r=t.slice(0,-1).reduce((function(t,r){return t+e.renderEntity(r)+e.config.entity.separator}),this.config.entity.opener),r+=this.renderEntity(t[t.length-1])+this.config.entity.closer),r},t.prototype.renderAttributes=function(t,e){var r=this,n="",o=this.extractSupportedOptions(t,e);if(o.length>0){var i=o.pop();n=o.reduce((function(t,e){return t+r.renderAttribute(e)+r.config.attribute.separator}),this.config.attribute.opener),n+=this.renderAttribute(i)+this.config.attribute.closer}return n},t.prototype.renderArc=function(t,e){var r="";return t.from&&(r+="".concat(this.renderEntityName(t.from)," ")),r+=this.renderKind(t.kind),t.to&&(r+=" ".concat(this.renderEntityName(t.to))),r+=this.renderAttributes(t,this.config.supportedArcAttributes),t.arcs&&(r+=this.config.inline.opener,r+=this.renderArcLines(t.arcs,e+this.indent),r+=e+this.config.inline.closer),null===t.arcs&&(r+=this.config.inline.opener,r+=e+this.config.inline.closer),r},t.prototype.renderArcLine=function(t,e){var r=this,n="";return t.length>0&&(n=t.slice(0,-1).reduce((function(t,n){return t+e+r.renderArc(n,e)+r.config.arcline.separator}),this.config.arcline.opener),n+=e+this.renderArc(t[t.length-1],e)+this.config.arcline.closer),n},t.prototype.renderArcLines=function(t,e){var r=this;return t.reduce((function(t,n){return t+r.renderArcLine(n,e)}),"")},t}();e.XuAdaptor=u,e.render=function(t,e){return void 0===e&&(e=!1),new u(e).render(t)}},882:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getArrow=function(t){return r[t]},e.getShape=function(t){return n[t]},e.getStyle=function(t){return o[t]};var r=Object.freeze({"->":"rvee","<->":"rvee","=>":"normal","<=>":"normal","-x":"oinvonormal"}),n=Object.freeze({box:"box",abox:"hexagon",rbox:"box",note:"note"}),o=Object.freeze({">>":"dashed","<<>>":"dashed","..":"dashed",":>":"bold","<:>":"bold","::":"bold",rbox:"rounded"})},383:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescapeString=function(t){return t.replace(/\\"/g,'"')},e.escapeString=function(t){return t.replace(/\\"/g,'"').replace(/"/g,'\\"')}},900:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=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&&(-1===(a=u.substring(0,c).lastIndexOf(" "))||ae?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",j="==",P="<<=>>",M="<=>",T="..",D="<<>>",F="::",I="<:>",B="->",N="=>>",H="=>",R=">>",W=":>",G="-x",X="<-",V="<<=",z="<=",$="<<",q="<:",U="x-",K="note",Z="abox",Y="rbox",Q="box",J="label",tt="idurl",et="id",rt="url",nt="linecolor",ot="linecolour",it="textcolor",at="textcolour",ct="textbgcolor",ut="textbgcolour",st="arclinecolor",lt="arclinecolour",ft="arctextcolor",dt="arctextcolour",ht="arctextbgcolor",pt="arctextbgcolour",gt="arcskip",bt='"',mt='\\"',yt="/*",vt="*/",xt="//",wt="#",_t=".",Ct="true",At="false",Ot="on",St="off",kt=/^[A-Za-z_0-9]/,Lt=/^[ \t]/,Et=/^[\r\n]/,jt=/^[^\r\n]/,Pt=/^[0-9]/,Mt=/^[0-1]/,Tt=_n("{",!1),Dt=_n("}",!1),Ft=_n("msc",!0),It=_n(",",!1),Bt=_n(";",!1),Nt=An("option"),Ht=_n("hscale",!0),Rt=_n("width",!0),Wt=_n("arcgradient",!0),Gt=_n("=",!1),Xt=_n("wordwraparcs",!0),Vt=An("entity"),zt=_n("[",!1),$t=_n("]",!1),qt=_n("*",!1),Ut=An("empty row"),Kt=_n("|||",!1),Zt=_n("...",!1),Yt=An("---"),Qt=_n("---",!1),Jt=An("bi-directional arrow"),te=_n("--",!1),ee=_n("<->",!1),re=_n("==",!1),ne=_n("<<=>>",!1),oe=_n("<=>",!1),ie=_n("..",!1),ae=_n("<<>>",!1),ce=_n("::",!1),ue=_n("<:>",!1),se=An("left to right arrow"),le=_n("->",!1),fe=_n("=>>",!1),de=_n("=>",!1),he=_n(">>",!1),pe=_n(":>",!1),ge=_n("-x",!0),be=An("right to left arrow"),me=_n("<-",!1),ye=_n("<<=",!1),ve=_n("<=",!1),xe=_n("<<",!1),we=_n("<:",!1),_e=_n("x-",!0),Ce=An("box"),Ae=_n("note",!0),Oe=_n("abox",!0),Se=_n("rbox",!0),ke=_n("box",!0),Le=An("attribute name"),Ee=_n("label",!0),je=_n("idurl",!0),Pe=_n("id",!0),Me=_n("url",!0),Te=_n("linecolor",!0),De=_n("linecolour",!0),Fe=_n("textcolor",!0),Ie=_n("textcolour",!0),Be=_n("textbgcolor",!0),Ne=_n("textbgcolour",!0),He=_n("arclinecolor",!0),Re=_n("arclinecolour",!0),We=_n("arctextcolor",!0),Ge=_n("arctextcolour",!0),Xe=_n("arctextbgcolor",!0),Ve=_n("arctextbgcolour",!0),ze=_n("arcskip",!0),$e=An("double quoted string"),qe=_n('"',!1),Ue=_n('\\"',!1),Ke={type:"any"},Ze=An("identifier"),Ye=Cn([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),Qe=An("whitespace"),Je=Cn([" ","\t"],!1,!1),tr=An("lineend"),er=Cn(["\r","\n"],!1,!1),rr=_n("/*",!1),nr=_n("*/",!1),or=_n("//",!1),ir=_n("#",!1),ar=Cn(["\r","\n"],!0,!1),cr=An("comment"),ur=An("number"),sr=An("cardinal"),lr=Cn([["0","9"]],!1,!1),fr=An("real"),dr=_n(".",!1),hr=An("boolean"),pr=_n("true",!0),gr=_n("false",!0),br=_n("on",!0),mr=_n("off",!0),yr=Cn([["0","1"]],!1,!1),vr=function(e,r){return r.entities=r.entities||[],t.checkForUndeclaredEntities(r.entities,r.arcs),r={meta:{extendedOptions:!1,extendedArcTypes:!1,extendedFeatures:!1},...r},e.length>0&&(r={precomment:e,...r}),r},xr=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},wr=function(t){return t},_r=function(t){return t},Cr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Ar=function(e,r){return t.nameValue2Option(e,r)},Or=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Sr=function(t){return t},kr=function(t){return t},Lr=function(t){return t[0].concat(t[1])},Er=function(t,e){return e},jr=function(t,e){return{name:t,...e}},Pr=function(t,e){return e},Mr=function(r,n){return t.isMscGenKeyword(r)&&function(t,r){throw function(t,r){return new e(t,null,null,r)}(t,r=void 0!==r?r:Sn(mn,bn))}("Keywords aren't allowed as entity names (embed them in quotes if you need them)"),{name:r,...n}},Tr=function(t){return t},Dr=function(t){return t},Fr=function(t){return t},Ir=function(t){return t[0].concat(t[1])},Br=function(t){return t},Nr=function(t){return t},Hr=function(t){return t},Rr=function(t,e){return e},Wr=function(t,e){return{...t,...e}},Gr=function(t){return{kind:t}},Xr=function(t){return{kind:t}},Vr=function(t,e,r){return{kind:e,from:t,to:r}},zr=function(t,e){return{kind:t,from:"*",to:e}},$r=function(t,e){return{kind:e,from:t,to:"*"}},qr=function(t,e){return{kind:e,from:t,to:"*"}},Ur=function(t){return t.toLowerCase()},Kr=function(t){return t},Zr=function(t){return t},Yr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Qr=function(t,e){var r={};return r[t.toLowerCase().replace("colour","color")]=e,r},Jr=function(t){return t.join("")},tn=function(t){return t},en=function(t){return t.join("")},rn=function(t){return t},nn=function(t){return t},on=function(t){return t},an=function(t,e,r){return t+e.join("")+r},cn=function(t,e){return t+e.join("")},un=function(t){return t},sn=function(t){return t.toString()},ln=function(t){return t.toString()},fn=function(t){return parseInt(t.join(""),10)},dn=function(t){return parseFloat(t.join(""))},hn=function(t){return t},pn=function(t){return t.toString()},gn=function(t){return t},bn=0|n.peg$currPos,mn=bn,yn=[{line:1,column:1}],vn=bn,xn=n.peg$maxFailExpected||[],wn=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function _n(t,e){return{type:"literal",text:t,ignoreCase:e}}function Cn(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function An(t){return{type:"other",description:t}}function On(t){var e,n=yn[t];if(n)return n;if(t>=yn.length)e=yn.length-1;else for(e=t;!yn[--e];);for(n={line:(n=yn[e]).line,column:n.column};evn&&(vn=bn,xn=[]),xn.push(t))}function Ln(){var t,e,n,o,i;return t=bn,e=Un(),function(){var t;return(t=r.substr(bn,3)).toLowerCase()===p?bn+=3:(t=u,0===wn&&kn(Ft)),t}()!==u?(Un(),123===r.charCodeAt(bn)?(n=d,bn++):(n=u,0===wn&&kn(Tt)),n!==u?(Un(),o=function(){var t,e,n,o;return t=bn,(e=function(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=En())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=wr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=En())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=wr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=En())!==u?(59===r.charCodeAt(bn)?(a=b,bn++):(a=u,0===wn&&kn(Bt)),a!==u?(mn=o,o=_r(i)):(bn=o,o=u)):(bn=o,o=u),o!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Cr(e)),e}())===u&&(e=null),(n=function(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=jn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Sr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=jn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Sr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=jn())!==u?(59===r.charCodeAt(bn)?(a=b,bn++):(a=u,0===wn&&kn(Bt)),a!==u?(mn=o,o=kr(i)):(bn=o,o=u)):(bn=o,o=u),o!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Lr(e)),e}())===u&&(n=null),(o=function(){var t,e,n,o;if(t=[],e=bn,(n=Pn())!==u?(Un(),59===r.charCodeAt(bn)?(o=b,bn++):(o=u,0===wn&&kn(Bt)),o!==u?(mn=e,e=Tr(n)):(bn=e,e=u)):(bn=e,e=u),e!==u)for(;e!==u;)t.push(e),e=bn,(n=Pn())!==u?(Un(),59===r.charCodeAt(bn)?(o=b,bn++):(o=u,0===wn&&kn(Bt)),o!==u?(mn=e,e=Tr(n)):(bn=e,e=u)):(bn=e,e=u);else t=u;return t}())===u&&(o=null),mn=t,xr(e,n,o)}(),Un(),125===r.charCodeAt(bn)?(i=h,bn++):(i=u,0===wn&&kn(Dt)),i!==u?(Un(),mn=t,t=vr(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t}function En(){var t,e,n,o;return wn++,t=bn,Un(),(e=r.substr(bn,6)).toLowerCase()===m?bn+=6:(e=u,0===wn&&kn(Ht)),e===u&&((e=r.substr(bn,5)).toLowerCase()===y?bn+=5:(e=u,0===wn&&kn(Rt)),e===u&&((e=r.substr(bn,11)).toLowerCase()===v?bn+=11:(e=u,0===wn&&kn(Wt)))),e!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=function(){var t,e;return wn++,t=bn,(e=function(){var t,e,n,o;return t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u&&(n=Kn())!==u?(34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=ln(n)):(bn=t,t=u)):(bn=t,t=u),t}())!==u&&(mn=t,e=un(e)),(t=e)===u&&(t=bn,(e=Kn())!==u&&(mn=t,e=sn(e)),t=e),wn--,t===u&&(e=u,0===wn&&kn(ur)),t}())!==u?(Un(),mn=t,t=Ar(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=r.substr(bn,12)).toLowerCase()===w?bn+=12:(e=u,0===wn&&kn(Xt)),e!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=function(){var t,e;return wn++,t=bn,(e=function(){var t,e,n,o;return t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u&&(n=Yn())!==u?(34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=gn(n)):(bn=t,t=u)):(bn=t,t=u),t}())!==u&&(mn=t,e=hn(e)),(t=e)===u&&(t=bn,(e=Yn())!==u&&(mn=t,e=pn(e)),t=e),wn--,t===u&&(e=u,0===wn&&kn(hr)),t}())!==u?(Un(),mn=t,t=Or(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u)),wn--,t===u&&0===wn&&kn(Nt),t}function jn(){var t,e,n,o,i,a;return wn++,t=bn,Un(),(e=Nn())!==u?(Un(),n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(zt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=Er(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),o=Un(),mn=t,t=jr(e,n)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Rn())!==u?(Un(),n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(zt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=Pr(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),o=Un(),mn=t,t=Mr(e,n)):(bn=t,t=u)),wn--,t===u&&0===wn&&kn(Vt),t}function Pn(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=Mn())!==u?(Un(),44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Dr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=Mn())!==u?(Un(),44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Dr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=Mn())!==u&&(mn=o,i=Fr(i)),(o=i)!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Ir(e)),e}function Mn(){var t,e,n,o,i,a;return t=bn,e=bn,(n=function(){var t,e;return t=bn,Un(),(e=function(){var t;return wn++,r.substr(bn,3)===O?(t=O,bn+=3):(t=u,0===wn&&kn(Kt)),t===u&&(r.substr(bn,3)===S?(t=S,bn+=3):(t=u,0===wn&&kn(Zt))),wn--,t===u&&0===wn&&kn(Ut),t}())!==u?(Un(),mn=t,t=Gr(e)):(bn=t,t=u),t}())!==u&&(mn=e,n=Br(n)),(e=n)===u&&(e=bn,(n=function(){var t,e,n,o;return t=bn,Un(),(e=Hn())!==u?(Un(),(n=function(){var t,e;return t=bn,(e=Tn())===u&&(e=Dn())===u&&(e=Fn())===u&&(e=function(){var t;return wn++,(t=r.substr(bn,4)).toLowerCase()===K?bn+=4:(t=u,0===wn&&kn(Ae)),t===u&&((t=r.substr(bn,4)).toLowerCase()===Z?bn+=4:(t=u,0===wn&&kn(Oe)),t===u&&((t=r.substr(bn,4)).toLowerCase()===Y?bn+=4:(t=u,0===wn&&kn(Se)),t===u&&((t=r.substr(bn,3)).toLowerCase()===Q?bn+=3:(t=u,0===wn&&kn(ke))))),wn--,t===u&&0===wn&&kn(Ce),t}()),e!==u&&(mn=t,e=Ur(e)),e}())!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=Vr(e,n,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),42===r.charCodeAt(bn)?(e=A,bn++):(e=u,0===wn&&kn(qt)),e!==u?(Un(),(n=Fn())!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=zr(n,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Hn())!==u?(Un(),(n=Dn())!==u?(Un(),42===r.charCodeAt(bn)?(o=A,bn++):(o=u,0===wn&&kn(qt)),o!==u?(Un(),mn=t,t=$r(e,n)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t===u&&(t=bn,Un(),(e=Hn())!==u?(Un(),(n=Tn())!==u?(Un(),42===r.charCodeAt(bn)?(o=A,bn++):(o=u,0===wn&&kn(qt)),o!==u?(Un(),mn=t,t=qr(e,n)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u)))),t}())!==u&&(mn=e,n=Nr(n)),(e=n)===u&&(e=bn,(n=function(){var t,e;return t=bn,Un(),(e=function(){var t;return wn++,r.substr(bn,3)===k?(t=k,bn+=3):(t=u,0===wn&&kn(Qt)),wn--,t===u&&0===wn&&kn(Yt),t}())!==u?(Un(),mn=t,t=Xr(e)):(bn=t,t=u),t}())!==u&&(mn=e,n=Hr(n)),e=n)),e!==u?(n=bn,91===r.charCodeAt(bn)?(o=_,bn++):(o=u,0===wn&&kn(zt)),o!==u&&(i=In())!==u?(93===r.charCodeAt(bn)?(a=C,bn++):(a=u,0===wn&&kn($t)),a!==u?(mn=n,n=Rr(e,i)):(bn=n,n=u)):(bn=n,n=u),n===u&&(n=null),mn=t,t=Wr(e,n)):(bn=t,t=u),t}function Tn(){var t;return wn++,r.substr(bn,2)===L?(t=L,bn+=2):(t=u,0===wn&&kn(te)),t===u&&(r.substr(bn,3)===E?(t=E,bn+=3):(t=u,0===wn&&kn(ee)),t===u&&(r.substr(bn,2)===j?(t=j,bn+=2):(t=u,0===wn&&kn(re)),t===u&&(r.substr(bn,5)===P?(t=P,bn+=5):(t=u,0===wn&&kn(ne)),t===u&&(r.substr(bn,3)===M?(t=M,bn+=3):(t=u,0===wn&&kn(oe)),t===u&&(r.substr(bn,2)===T?(t=T,bn+=2):(t=u,0===wn&&kn(ie)),t===u&&(r.substr(bn,4)===D?(t=D,bn+=4):(t=u,0===wn&&kn(ae)),t===u&&(r.substr(bn,2)===F?(t=F,bn+=2):(t=u,0===wn&&kn(ce)),t===u&&(r.substr(bn,3)===I?(t=I,bn+=3):(t=u,0===wn&&kn(ue)))))))))),wn--,t===u&&0===wn&&kn(Jt),t}function Dn(){var t;return wn++,r.substr(bn,2)===B?(t=B,bn+=2):(t=u,0===wn&&kn(le)),t===u&&(r.substr(bn,3)===N?(t=N,bn+=3):(t=u,0===wn&&kn(fe)),t===u&&(r.substr(bn,2)===H?(t=H,bn+=2):(t=u,0===wn&&kn(de)),t===u&&(r.substr(bn,2)===R?(t=R,bn+=2):(t=u,0===wn&&kn(he)),t===u&&(r.substr(bn,2)===W?(t=W,bn+=2):(t=u,0===wn&&kn(pe)),t===u&&((t=r.substr(bn,2)).toLowerCase()===G?bn+=2:(t=u,0===wn&&kn(ge))))))),wn--,t===u&&0===wn&&kn(se),t}function Fn(){var t;return wn++,r.substr(bn,2)===X?(t=X,bn+=2):(t=u,0===wn&&kn(me)),t===u&&(r.substr(bn,3)===V?(t=V,bn+=3):(t=u,0===wn&&kn(ye)),t===u&&(r.substr(bn,2)===z?(t=z,bn+=2):(t=u,0===wn&&kn(ve)),t===u&&(r.substr(bn,2)===$?(t=$,bn+=2):(t=u,0===wn&&kn(xe)),t===u&&(r.substr(bn,2)===q?(t=q,bn+=2):(t=u,0===wn&&kn(we)),t===u&&((t=r.substr(bn,2)).toLowerCase()===U?bn+=2:(t=u,0===wn&&kn(_e))))))),wn--,t===u&&0===wn&&kn(be),t}function In(){var t,e,n,o,i,a;for(t=bn,e=bn,n=[],o=bn,(i=Bn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Kr(i)):(bn=o,o=u)):(bn=o,o=u);o!==u;)n.push(o),o=bn,(i=Bn())!==u?(44===r.charCodeAt(bn)?(a=g,bn++):(a=u,0===wn&&kn(It)),a!==u?(mn=o,o=Kr(i)):(bn=o,o=u)):(bn=o,o=u);return o=bn,(i=Bn())!==u&&(mn=o,i=Zr(i)),(o=i)!==u?e=n=[n,o]:(bn=e,e=u),e!==u&&(mn=t,e=Yr(e)),e}function Bn(){var t,e,n,o;return t=bn,Un(),(e=function(){var t;return wn++,(t=r.substr(bn,5)).toLowerCase()===J?bn+=5:(t=u,0===wn&&kn(Ee)),t===u&&((t=r.substr(bn,5)).toLowerCase()===tt?bn+=5:(t=u,0===wn&&kn(je)),t===u&&((t=r.substr(bn,2)).toLowerCase()===et?bn+=2:(t=u,0===wn&&kn(Pe)),t===u&&((t=r.substr(bn,3)).toLowerCase()===rt?bn+=3:(t=u,0===wn&&kn(Me)),t===u&&((t=r.substr(bn,9)).toLowerCase()===nt?bn+=9:(t=u,0===wn&&kn(Te)),t===u&&((t=r.substr(bn,10)).toLowerCase()===ot?bn+=10:(t=u,0===wn&&kn(De)),t===u&&((t=r.substr(bn,9)).toLowerCase()===it?bn+=9:(t=u,0===wn&&kn(Fe)),t===u&&((t=r.substr(bn,10)).toLowerCase()===at?bn+=10:(t=u,0===wn&&kn(Ie)),t===u&&((t=r.substr(bn,11)).toLowerCase()===ct?bn+=11:(t=u,0===wn&&kn(Be)),t===u&&((t=r.substr(bn,12)).toLowerCase()===ut?bn+=12:(t=u,0===wn&&kn(Ne)),t===u&&((t=r.substr(bn,12)).toLowerCase()===st?bn+=12:(t=u,0===wn&&kn(He)),t===u&&((t=r.substr(bn,13)).toLowerCase()===lt?bn+=13:(t=u,0===wn&&kn(Re)),t===u&&((t=r.substr(bn,12)).toLowerCase()===ft?bn+=12:(t=u,0===wn&&kn(We)),t===u&&((t=r.substr(bn,13)).toLowerCase()===dt?bn+=13:(t=u,0===wn&&kn(Ge)),t===u&&((t=r.substr(bn,14)).toLowerCase()===ht?bn+=14:(t=u,0===wn&&kn(Xe)),t===u&&((t=r.substr(bn,15)).toLowerCase()===pt?bn+=15:(t=u,0===wn&&kn(Ve)),t===u&&((t=r.substr(bn,7)).toLowerCase()===gt?bn+=7:(t=u,0===wn&&kn(ze)))))))))))))))))),wn--,t===u&&0===wn&&kn(Le),t}())!==u?(Un(),61===r.charCodeAt(bn)?(n=x,bn++):(n=u,0===wn&&kn(Gt)),n!==u?(Un(),(o=Hn())!==u?(Un(),mn=t,t=Qr(e,o)):(bn=t,t=u)):(bn=t,t=u)):(bn=t,t=u),t}function Nn(){var t,e,n,o;return wn++,t=bn,34===r.charCodeAt(bn)?(e=bt,bn++):(e=u,0===wn&&kn(qe)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=bn,n=bn,wn++,34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),wn--,o===u?n=void 0:(bn=n,n=u),n!==u?(r.substr(bn,2)===mt?(o=mt,bn+=2):(o=u,0===wn&&kn(Ue)),o===u&&(r.length>bn?(o=r.charAt(bn),bn++):(o=u,0===wn&&kn(Ke))),o!==u?(mn=e,e=tn(o)):(bn=e,e=u)):(bn=e,e=u);e!==u;)t.push(e),e=bn,n=bn,wn++,34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),wn--,o===u?n=void 0:(bn=n,n=u),n!==u?(r.substr(bn,2)===mt?(o=mt,bn+=2):(o=u,0===wn&&kn(Ue)),o===u&&(r.length>bn?(o=r.charAt(bn),bn++):(o=u,0===wn&&kn(Ke))),o!==u?(mn=e,e=tn(o)):(bn=e,e=u)):(bn=e,e=u);return t}(),34===r.charCodeAt(bn)?(o=bt,bn++):(o=u,0===wn&&kn(qe)),o!==u?(mn=t,t=Jr(n)):(bn=t,t=u)):(bn=t,t=u),wn--,t===u&&(e=u,0===wn&&kn($e)),t}function Hn(){var t;return wn++,(t=Rn())===u&&(t=Nn()),wn--,t===u&&0===wn&&kn(Ze),t}function Rn(){var t,e,n;if(t=bn,e=[],n=r.charAt(bn),kt.test(n)?bn++:(n=u,0===wn&&kn(Ye)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(bn),kt.test(n)?bn++:(n=u,0===wn&&kn(Ye));else e=u;return e!==u&&(mn=t,e=en(e)),e}function Wn(){var t,e;return wn++,t=bn,e=r.charAt(bn),Lt.test(e)?bn++:(e=u,0===wn&&kn(Je)),e!==u&&(mn=t,e=rn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(Qe)),t}function Gn(){var t,e;return wn++,t=bn,e=r.charAt(bn),Et.test(e)?bn++:(e=u,0===wn&&kn(er)),e!==u&&(mn=t,e=nn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(tr)),t}function Xn(){var t,e,n;return t=bn,e=bn,wn++,r.substr(bn,2)===vt?(n=vt,bn+=2):(n=u,0===wn&&kn(nr)),wn--,n===u?e=void 0:(bn=e,e=u),e!==u?(r.length>bn?(n=r.charAt(bn),bn++):(n=u,0===wn&&kn(Ke)),n!==u?(mn=t,t=on(n)):(bn=t,t=u)):(bn=t,t=u),t}function Vn(){var t,e,n,o;if(t=bn,(e=function(){var t;return r.substr(bn,2)===yt?(t=yt,bn+=2):(t=u,0===wn&&kn(rr)),t}())!==u){for(n=[],o=Xn();o!==u;)n.push(o),o=Xn();(o=function(){var t;return r.substr(bn,2)===vt?(t=vt,bn+=2):(t=u,0===wn&&kn(nr)),t}())!==u?(mn=t,t=an(e,n,o)):(bn=t,t=u)}else bn=t,t=u;return t}function zn(){var t;return t=r.charAt(bn),jt.test(t)?bn++:(t=u,0===wn&&kn(ar)),t}function $n(){var t,e,n,o;if(t=bn,(e=function(){var t;return r.substr(bn,2)===xt?(t=xt,bn+=2):(t=u,0===wn&&kn(or)),t===u&&(35===r.charCodeAt(bn)?(t=wt,bn++):(t=u,0===wn&&kn(ir))),t}())!==u){for(n=[],o=zn();o!==u;)n.push(o),o=zn();mn=t,t=cn(e,n)}else bn=t,t=u;return t}function qn(){var t;return wn++,(t=$n())===u&&(t=Vn()),wn--,t===u&&0===wn&&kn(cr),t}function Un(){var t,e;for(t=[],(e=Wn())===u&&(e=Gn())===u&&(e=qn());e!==u;)t.push(e),(e=Wn())===u&&(e=Gn())===u&&(e=qn());return t}function Kn(){var t;return(t=function(){var t,e,n,o,i;return wn++,t=bn,e=bn,(n=Zn())!==u?(46===r.charCodeAt(bn)?(o=_t,bn++):(o=u,0===wn&&kn(dr)),o!==u&&(i=Zn())!==u?e=n=[n,o,i]:(bn=e,e=u)):(bn=e,e=u),e!==u&&(mn=t,e=dn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(fr)),t}())===u&&(t=Zn()),t}function Zn(){var t,e,n;if(wn++,t=bn,e=[],n=r.charAt(bn),Pt.test(n)?bn++:(n=u,0===wn&&kn(lr)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(bn),Pt.test(n)?bn++:(n=u,0===wn&&kn(lr));else e=u;return e!==u&&(mn=t,e=fn(e)),wn--,(t=e)===u&&(e=u,0===wn&&kn(sr)),t}function Yn(){var t;return(t=r.substr(bn,4)).toLowerCase()===Ct?bn+=4:(t=u,0===wn&&kn(pr)),t===u&&((t=r.substr(bn,5)).toLowerCase()===At?bn+=5:(t=u,0===wn&&kn(gr)),t===u&&((t=r.substr(bn,2)).toLowerCase()===Ot?bn+=2:(t=u,0===wn&&kn(br)),t===u&&((t=r.substr(bn,3)).toLowerCase()===St?bn+=3:(t=u,0===wn&&kn(mr)),t===u&&(t=r.charAt(bn),Mt.test(t)?bn++:(t=u,0===wn&&kn(yr)))))),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:bn,peg$FAILED:u,peg$maxFailExpected:xn,peg$maxFailPos:vn};if(o!==u&&bn===r.length)return o;throw o!==u&&bne?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",P="==",M="<<=>>",T="<=>",D="..",F="<<>>",I="::",B="<:>",N="->",H="=>>",R="=>",W=">>",G=":>",X="-x",V="<-",z="<<=",$="<=",q="<<",U="<:",K="x-",Z="note",Y="abox",Q="rbox",J="box",tt="alt",et="else",rt="opt",nt="break",ot="par",it="seq",at="strict",ct="neg",ut="critical",st="ignore",lt="consider",ft="assert",dt="loop",ht="ref",pt="exc",gt='"',bt='\\"',mt="/*",yt="*/",vt="//",xt="#",wt=".",_t="true",Ct="false",At="on",Ot="off",St="auto",kt=/^[,;{]/,Lt=/^[^;, "\t\n\r=\-><:{*]/,Et=/^[ \t]/,jt=/^[\r\n]/,Pt=/^[^\r\n]/,Mt=/^[0-9]/,Tt=/^[0-1]/,Dt=kn(",",!1),Ft=kn(";",!1),It=kn("hscale",!0),Bt=kn("arcgradient",!0),Nt=kn("=",!1),Ht=kn("width",!0),Rt=kn("wordwraparcs",!0),Wt=kn("wordwrapentities",!0),Gt=kn("wordwrapboxes",!0),Xt=kn("watermark",!0),Vt=En("entity"),zt=kn(":",!1),$t=kn("*",!1),qt=kn("{",!1),Ut=kn("}",!1),Kt=En("empty row"),Zt=kn("|||",!1),Yt=kn("...",!1),Qt=En("---"),Jt=kn("---",!1),te=En("bi-directional arrow"),ee=kn("--",!1),re=kn("<->",!1),ne=kn("==",!1),oe=kn("<<=>>",!1),ie=kn("<=>",!1),ae=kn("..",!1),ce=kn("<<>>",!1),ue=kn("::",!1),se=kn("<:>",!1),le=En("left to right arrow"),fe=kn("->",!1),de=kn("=>>",!1),he=kn("=>",!1),pe=kn(">>",!1),ge=kn(":>",!1),be=kn("-x",!0),me=En("right to left arrow"),ye=kn("<-",!1),ve=kn("<<=",!1),xe=kn("<=",!1),we=kn("<<",!1),_e=kn("<:",!1),Ce=kn("x-",!0),Ae=En("box"),Oe=kn("note",!0),Se=kn("abox",!0),ke=kn("rbox",!0),Le=kn("box",!0),Ee=En("inline expression"),je=kn("alt",!0),Pe=kn("else",!0),Me=kn("opt",!0),Te=kn("break",!0),De=kn("par",!0),Fe=kn("seq",!0),Ie=kn("strict",!0),Be=kn("neg",!0),Ne=kn("critical",!0),He=kn("ignore",!0),Re=kn("consider",!0),We=kn("assert",!0),Ge=kn("loop",!0),Xe=kn("ref",!0),Ve=kn("exc",!0),ze=En("double quoted string"),$e=kn('"',!1),qe=kn('\\"',!1),Ue={type:"any"},Ke=Ln([",",";","{"],!1,!1),Ze=En("identifier"),Ye=Ln([";",","," ",'"',"\t","\n","\r","=","-",">","<",":","{","*"],!0,!1),Qe=En("whitespace"),Je=Ln([" ","\t"],!1,!1),tr=En("lineend"),er=Ln(["\r","\n"],!1,!1),rr=kn("/*",!1),nr=kn("*/",!1),or=kn("//",!1),ir=kn("#",!1),ar=Ln(["\r","\n"],!0,!1),cr=En("comment"),ur=En("number"),sr=Ln([["0","9"]],!1,!1),lr=kn(".",!1),fr=En("boolean"),dr=kn("true",!0),hr=kn("false",!0),pr=kn("on",!0),gr=kn("off",!0),br=Ln([["0","1"]],!1,!1),mr=En("size"),yr=kn("auto",!0),vr=function(e,r){return r.entities=ao(r.entities||[],r.arcs),r={meta:t.getMetaInfo(r.options,r.arcs),...r},e.length>0&&(r={precomment:e,...r}),r},xr=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},wr=function(t){return t},_r=function(t){return t},Cr=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},Ar=function(e,r){return t.nameValue2Option(e,r)},Or=function(e,r){return t.nameValue2Option(e,r)},Sr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},kr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Lr=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Er=function(e,r){return t.nameValue2Option(e,r)},jr=function(t){return t},Pr=function(t){return t},Mr=function(t){return t[0].concat(t[1])},Tr=function(t,e){return e},Dr=function(t,e){var r=io(t);return e&&(r.label=e),r},Fr=function(t){return t},Ir=function(t){return t},Br=function(t){return t},Nr=function(t){return t[0].concat(t[1])},Hr=function(t){return t},Rr=function(t){return t},Wr=function(t){return t},Gr=function(t,e){return e},Xr=function(t,e){return e&&(t.label=e),t},Vr=function(t){return{kind:t}},zr=function(t){return{kind:t}},$r=function(t,e,r){return{kind:e,from:t,to:r}},qr=function(t,e){return{kind:t,from:"*",to:e}},Ur=function(t,e){return{kind:e,from:t,to:"*"}},Kr=function(t,e){return{kind:e,from:t,to:"*"}},Zr=function(t,e,r,n){return n},Yr=function(t,e,r,n,o){var i={kind:e,from:t,to:r,arcs:o};return n&&(i.label=n),i},Qr=function(t){return t.toLowerCase()},Jr=function(t){return t.toLowerCase()},tn=function(t){return t.join("")},en=function(t){return t},rn=function(t){return t.join("").trim()},nn=function(t){return t},on=function(t){return t.join("")},an=function(t){return t},cn=function(t){return t},un=function(t){return t},sn=function(t,e,r){return t+e.join("")+r},ln=function(t,e){return t+e.join("")},fn=function(t){return t},dn=function(t){return t.toString()},hn=function(t){return t.toString()},pn=function(t){return parseInt(t.join(""),10)},gn=function(t){return parseFloat(t.join(""))},bn=function(t){return t},mn=function(t){return t.toString()},yn=function(t){return t},vn=function(t){return t},xn=function(t){return t.toString()},wn=function(t){return t.toLowerCase()},_n=0|n.peg$currPos,Cn=[{line:1,column:1}],An=_n,On=n.peg$maxFailExpected||[],Sn=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function kn(t,e){return{type:"literal",text:t,ignoreCase:e}}function Ln(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function En(t){return{type:"other",description:t}}function jn(t){var e,n=Cn[t];if(n)return n;if(t>=Cn.length)e=Cn.length-1;else for(e=t;!Cn[--e];);for(n={line:(n=Cn[e]).line,column:n.column};eAn&&(An=_n,On=[]),On.push(t))}function Tn(){var t,e;return t=Qn(),e=function(){var t,e,n;return(t=function(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Dn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=wr(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Dn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=wr(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Dn())!==u?(59===r.charCodeAt(_n)?(i=h,_n++):(i=u,0===Sn&&Mn(Ft)),i!==u?n=_r(o):(_n=n,n=u)):(_n=n,n=u),n!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Cr(t)),t}())===u&&(t=null),(e=function(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Fn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=jr(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Fn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=jr(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Fn())!==u?(59===r.charCodeAt(_n)?(i=h,_n++):(i=u,0===Sn&&Mn(Ft)),i!==u?n=Pr(o):(_n=n,n=u)):(_n=n,n=u),n!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Mr(t)),t}())===u&&(e=null),(n=In())===u&&(n=null),xr(t,e,n)}(),Qn(),vr(t,e)}function Dn(){var t,e,n,o;return t=_n,Qn(),(e=r.substr(_n,6)).toLowerCase()===p?_n+=6:(e=u,0===Sn&&Mn(It)),e===u&&((e=r.substr(_n,11)).toLowerCase()===g?_n+=11:(e=u,0===Sn&&Mn(Bt))),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=function(){var t,e;return Sn++,t=_n,(e=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Mn($e)),e!==u&&(n=Jn())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),o!==u?t=hn(n):(_n=t,t=u)):(_n=t,t=u),t}())!==u&&(e=fn(e)),(t=e)===u&&(t=_n,(e=Jn())!==u&&(e=dn(e)),t=e),Sn--,t===u&&(e=u,0===Sn&&Mn(ur)),t}())!==u?(Qn(),t=Ar(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,5)).toLowerCase()===m?_n+=5:(e=u,0===Sn&&Mn(Ht)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=function(){var t;return Sn++,(t=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Mn($e)),e!==u&&(n=no())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),o!==u?t=vn(n):(_n=t,t=u)):(_n=t,t=u),t}())===u&&(t=no()),Sn--,t===u&&0===Sn&&Mn(mr),t}())!==u?(Qn(),t=Or(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,12)).toLowerCase()===y?_n+=12:(e=u,0===Sn&&Mn(Rt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=Sr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,16)).toLowerCase()===v?_n+=16:(e=u,0===Sn&&Mn(Wt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=kr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,13)).toLowerCase()===x?_n+=13:(e=u,0===Sn&&Mn(Gt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=eo())!==u?(Qn(),t=Lr(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=r.substr(_n,9)).toLowerCase()===w?_n+=9:(e=u,0===Sn&&Mn(Xt)),e!==u?(Qn(),61===r.charCodeAt(_n)?(n=b,_n++):(n=u,0===Sn&&Mn(Nt)),n!==u?(Qn(),(o=Xn())!==u?(Qn(),t=Er(e,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)))))),t}function Fn(){var t,e,n,o,i;return Sn++,t=_n,Qn(),(e=Vn())!==u?(Qn(),n=_n,58===r.charCodeAt(_n)?(o=_,_n++):(o=u,0===Sn&&Mn(zt)),o!==u?(Qn(),(i=Gn())!==u?(Qn(),n=Tr(e,i)):(_n=n,n=u)):(_n=n,n=u),n===u&&(n=null),t=Dr(e,n)):(_n=t,t=u),Sn--,t===u&&0===Sn&&Mn(Vt),t}function In(){var t,e,n,o;if(t=[],e=_n,(n=Bn())!==u?(Qn(),59===r.charCodeAt(_n)?(o=h,_n++):(o=u,0===Sn&&Mn(Ft)),o!==u?e=Fr(n):(_n=e,e=u)):(_n=e,e=u),e!==u)for(;e!==u;)t.push(e),e=_n,(n=Bn())!==u?(Qn(),59===r.charCodeAt(_n)?(o=h,_n++):(o=u,0===Sn&&Mn(Ft)),o!==u?e=Fr(n):(_n=e,e=u)):(_n=e,e=u);else t=u;return t}function Bn(){var t,e,n,o,i;for(t=_n,e=[],n=_n,(o=Nn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=Ir(o):(_n=n,n=u)):(_n=n,n=u);n!==u;)e.push(n),n=_n,(o=Nn())!==u?(44===r.charCodeAt(_n)?(i=d,_n++):(i=u,0===Sn&&Mn(Dt)),i!==u?n=Ir(o):(_n=n,n=u)):(_n=n,n=u);return n=_n,(o=Nn())!==u&&(o=Br(o)),(n=o)!==u?t=e=[e,n]:(_n=t,t=u),t!==u&&(t=Nr(t)),t}function Nn(){var t;return(t=function(){var t,e,n,o,i;return t=_n,e=_n,(n=function(){var t,e;return t=_n,Qn(),(e=function(){var t;return Sn++,r.substr(_n,3)===S?(t=S,_n+=3):(t=u,0===Sn&&Mn(Zt)),t===u&&(r.substr(_n,3)===k?(t=k,_n+=3):(t=u,0===Sn&&Mn(Yt))),Sn--,t===u&&0===Sn&&Mn(Kt),t}())!==u?(Qn(),t=Vr(e)):(_n=t,t=u),t}())!==u&&(n=Hr(n)),(e=n)===u&&(e=_n,(n=function(){var t,e,n,o;return t=_n,Qn(),(e=Vn())!==u?(Qn(),(n=function(){var t;return(t=Hn())===u&&(t=Rn())===u&&(t=Wn())===u&&(t=function(){var t;return Sn++,(t=r.substr(_n,4)).toLowerCase()===Z?_n+=4:(t=u,0===Sn&&Mn(Oe)),t===u&&((t=r.substr(_n,4)).toLowerCase()===Y?_n+=4:(t=u,0===Sn&&Mn(Se)),t===u&&((t=r.substr(_n,4)).toLowerCase()===Q?_n+=4:(t=u,0===Sn&&Mn(ke)),t===u&&((t=r.substr(_n,3)).toLowerCase()===J?_n+=3:(t=u,0===Sn&&Mn(Le))))),Sn--,t===u&&0===Sn&&Mn(Ae),t}()),t!==u&&(t=Qr(t)),t}())!==u?(Qn(),(o=Vn())!==u?(Qn(),t=$r(e,n,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),42===r.charCodeAt(_n)?(e=C,_n++):(e=u,0===Sn&&Mn($t)),e!==u?(Qn(),(n=Wn())!==u?(Qn(),(o=Vn())!==u?(Qn(),t=qr(n,o)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=Vn())!==u?(Qn(),(n=Rn())!==u?(Qn(),42===r.charCodeAt(_n)?(o=C,_n++):(o=u,0===Sn&&Mn($t)),o!==u?(Qn(),t=Ur(e,n)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t===u&&(t=_n,Qn(),(e=Vn())!==u?(Qn(),(n=Hn())!==u?(Qn(),42===r.charCodeAt(_n)?(o=C,_n++):(o=u,0===Sn&&Mn($t)),o!==u?(Qn(),t=Kr(e,n)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)))),t}())!==u&&(n=Rr(n)),(e=n)===u&&(e=_n,(n=function(){var t,e;return t=_n,Qn(),(e=function(){var t;return Sn++,r.substr(_n,3)===L?(t=L,_n+=3):(t=u,0===Sn&&Mn(Jt)),Sn--,t===u&&0===Sn&&Mn(Qt),t}())!==u?(Qn(),t=zr(e)):(_n=t,t=u),t}())!==u&&(n=Wr(n)),e=n)),e!==u?(n=_n,58===r.charCodeAt(_n)?(o=_,_n++):(o=u,0===Sn&&Mn(zt)),o!==u?(Qn(),(i=Gn())!==u?(Qn(),n=Gr(e,i)):(_n=n,n=u)):(_n=n,n=u),n===u&&(n=null),t=Xr(e,n)):(_n=t,t=u),t}())===u&&(t=function(){var t,e,n,o,i,a,c,s;return t=_n,Qn(),(e=Vn())!==u?(Qn(),(n=function(){var t,e;return Sn++,t=_n,(e=r.substr(_n,3)).toLowerCase()===tt?_n+=3:(e=u,0===Sn&&Mn(je)),e===u&&((e=r.substr(_n,4)).toLowerCase()===et?_n+=4:(e=u,0===Sn&&Mn(Pe)),e===u&&((e=r.substr(_n,3)).toLowerCase()===rt?_n+=3:(e=u,0===Sn&&Mn(Me)),e===u&&((e=r.substr(_n,5)).toLowerCase()===nt?_n+=5:(e=u,0===Sn&&Mn(Te)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ot?_n+=3:(e=u,0===Sn&&Mn(De)),e===u&&((e=r.substr(_n,3)).toLowerCase()===it?_n+=3:(e=u,0===Sn&&Mn(Fe)),e===u&&((e=r.substr(_n,6)).toLowerCase()===at?_n+=6:(e=u,0===Sn&&Mn(Ie)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ct?_n+=3:(e=u,0===Sn&&Mn(Be)),e===u&&((e=r.substr(_n,8)).toLowerCase()===ut?_n+=8:(e=u,0===Sn&&Mn(Ne)),e===u&&((e=r.substr(_n,6)).toLowerCase()===st?_n+=6:(e=u,0===Sn&&Mn(He)),e===u&&((e=r.substr(_n,8)).toLowerCase()===lt?_n+=8:(e=u,0===Sn&&Mn(Re)),e===u&&((e=r.substr(_n,6)).toLowerCase()===ft?_n+=6:(e=u,0===Sn&&Mn(We)),e===u&&((e=r.substr(_n,4)).toLowerCase()===dt?_n+=4:(e=u,0===Sn&&Mn(Ge)),e===u&&((e=r.substr(_n,3)).toLowerCase()===ht?_n+=3:(e=u,0===Sn&&Mn(Xe)),e===u&&((e=r.substr(_n,3)).toLowerCase()===pt?_n+=3:(e=u,0===Sn&&Mn(Ve)))))))))))))))),e!==u&&(e=Jr(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Mn(Ee)),t}())!==u?(Qn(),(o=Vn())!==u?(Qn(),i=_n,58===r.charCodeAt(_n)?(a=_,_n++):(a=u,0===Sn&&Mn(zt)),a!==u?(Qn(),(c=Gn())!==u?(Qn(),i=Zr(e,n,o,c)):(_n=i,i=u)):(_n=i,i=u),i===u&&(i=null),123===r.charCodeAt(_n)?(a=A,_n++):(a=u,0===Sn&&Mn(qt)),a!==u?(Qn(),(c=In())===u&&(c=null),Qn(),125===r.charCodeAt(_n)?(s=O,_n++):(s=u,0===Sn&&Mn(Ut)),s!==u?(Qn(),t=Yr(e,n,o,i,c)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u)):(_n=t,t=u),t}()),t}function Hn(){var t;return Sn++,r.substr(_n,2)===E?(t=E,_n+=2):(t=u,0===Sn&&Mn(ee)),t===u&&(r.substr(_n,3)===j?(t=j,_n+=3):(t=u,0===Sn&&Mn(re)),t===u&&(r.substr(_n,2)===P?(t=P,_n+=2):(t=u,0===Sn&&Mn(ne)),t===u&&(r.substr(_n,5)===M?(t=M,_n+=5):(t=u,0===Sn&&Mn(oe)),t===u&&(r.substr(_n,3)===T?(t=T,_n+=3):(t=u,0===Sn&&Mn(ie)),t===u&&(r.substr(_n,2)===D?(t=D,_n+=2):(t=u,0===Sn&&Mn(ae)),t===u&&(r.substr(_n,4)===F?(t=F,_n+=4):(t=u,0===Sn&&Mn(ce)),t===u&&(r.substr(_n,2)===I?(t=I,_n+=2):(t=u,0===Sn&&Mn(ue)),t===u&&(r.substr(_n,3)===B?(t=B,_n+=3):(t=u,0===Sn&&Mn(se)))))))))),Sn--,t===u&&0===Sn&&Mn(te),t}function Rn(){var t;return Sn++,r.substr(_n,2)===N?(t=N,_n+=2):(t=u,0===Sn&&Mn(fe)),t===u&&(r.substr(_n,3)===H?(t=H,_n+=3):(t=u,0===Sn&&Mn(de)),t===u&&(r.substr(_n,2)===R?(t=R,_n+=2):(t=u,0===Sn&&Mn(he)),t===u&&(r.substr(_n,2)===W?(t=W,_n+=2):(t=u,0===Sn&&Mn(pe)),t===u&&(r.substr(_n,2)===G?(t=G,_n+=2):(t=u,0===Sn&&Mn(ge)),t===u&&((t=r.substr(_n,2)).toLowerCase()===X?_n+=2:(t=u,0===Sn&&Mn(be))))))),Sn--,t===u&&0===Sn&&Mn(le),t}function Wn(){var t;return Sn++,r.substr(_n,2)===V?(t=V,_n+=2):(t=u,0===Sn&&Mn(ye)),t===u&&(r.substr(_n,3)===z?(t=z,_n+=3):(t=u,0===Sn&&Mn(ve)),t===u&&(r.substr(_n,2)===$?(t=$,_n+=2):(t=u,0===Sn&&Mn(xe)),t===u&&(r.substr(_n,2)===q?(t=q,_n+=2):(t=u,0===Sn&&Mn(we)),t===u&&(r.substr(_n,2)===U?(t=U,_n+=2):(t=u,0===Sn&&Mn(_e)),t===u&&((t=r.substr(_n,2)).toLowerCase()===K?_n+=2:(t=u,0===Sn&&Mn(Ce))))))),Sn--,t===u&&0===Sn&&Mn(me),t}function Gn(){var t,e;return(t=Xn())===u&&(e=function(){var t,e,n,o;for(t=[],e=_n,n=_n,Sn++,o=r.charAt(_n),kt.test(o)?_n++:(o=u,0===Sn&&Mn(Ke)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Mn(Ue)),o!==u?e=nn(o):(_n=e,e=u)):(_n=e,e=u);e!==u;)t.push(e),e=_n,n=_n,Sn++,o=r.charAt(_n),kt.test(o)?_n++:(o=u,0===Sn&&Mn(Ke)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Mn(Ue)),o!==u?e=nn(o):(_n=e,e=u)):(_n=e,e=u);return t}(),t=rn(e)),t}function Xn(){var t,e,n,o;return Sn++,t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Mn($e)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=_n,n=_n,Sn++,34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.substr(_n,2)===bt?(o=bt,_n+=2):(o=u,0===Sn&&Mn(qe)),o===u&&(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Mn(Ue))),o!==u?e=en(o):(_n=e,e=u)):(_n=e,e=u);e!==u;)t.push(e),e=_n,n=_n,Sn++,34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),Sn--,o===u?n=void 0:(_n=n,n=u),n!==u?(r.substr(_n,2)===bt?(o=bt,_n+=2):(o=u,0===Sn&&Mn(qe)),o===u&&(r.length>_n?(o=r.charAt(_n),_n++):(o=u,0===Sn&&Mn(Ue))),o!==u?e=en(o):(_n=e,e=u)):(_n=e,e=u);return t}(),34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),o!==u?t=tn(n):(_n=t,t=u)):(_n=t,t=u),Sn--,t===u&&(e=u,0===Sn&&Mn(ze)),t}function Vn(){var t,e,n;if(Sn++,t=_n,e=[],n=r.charAt(_n),Lt.test(n)?_n++:(n=u,0===Sn&&Mn(Ye)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(_n),Lt.test(n)?_n++:(n=u,0===Sn&&Mn(Ye));else e=u;return e!==u&&(e=on(e)),(t=e)===u&&(t=Xn()),Sn--,t===u&&(e=u,0===Sn&&Mn(Ze)),t}function zn(){var t,e;return Sn++,_n,e=r.charAt(_n),Et.test(e)?_n++:(e=u,0===Sn&&Mn(Je)),e!==u&&(e=an(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Mn(Qe)),t}function $n(){var t,e;return Sn++,_n,e=r.charAt(_n),jt.test(e)?_n++:(e=u,0===Sn&&Mn(er)),e!==u&&(e=cn(e)),Sn--,(t=e)===u&&(e=u,0===Sn&&Mn(tr)),t}function qn(){var t,e,n;return t=_n,e=_n,Sn++,r.substr(_n,2)===yt?(n=yt,_n+=2):(n=u,0===Sn&&Mn(nr)),Sn--,n===u?e=void 0:(_n=e,e=u),e!==u?(r.length>_n?(n=r.charAt(_n),_n++):(n=u,0===Sn&&Mn(Ue)),n!==u?t=un(n):(_n=t,t=u)):(_n=t,t=u),t}function Un(){var t,e,n,o;if(t=_n,(e=function(){var t;return r.substr(_n,2)===mt?(t=mt,_n+=2):(t=u,0===Sn&&Mn(rr)),t}())!==u){for(n=[],o=qn();o!==u;)n.push(o),o=qn();(o=function(){var t;return r.substr(_n,2)===yt?(t=yt,_n+=2):(t=u,0===Sn&&Mn(nr)),t}())!==u?t=sn(e,n,o):(_n=t,t=u)}else _n=t,t=u;return t}function Kn(){var t;return t=r.charAt(_n),Pt.test(t)?_n++:(t=u,0===Sn&&Mn(ar)),t}function Zn(){var t,e,n,o;if(t=_n,(e=function(){var t;return r.substr(_n,2)===vt?(t=vt,_n+=2):(t=u,0===Sn&&Mn(or)),t===u&&(35===r.charCodeAt(_n)?(t=xt,_n++):(t=u,0===Sn&&Mn(ir))),t}())!==u){for(n=[],o=Kn();o!==u;)n.push(o),o=Kn();t=ln(e,n)}else _n=t,t=u;return t}function Yn(){var t;return Sn++,(t=Zn())===u&&(t=Un()),Sn--,t===u&&0===Sn&&Mn(cr),t}function Qn(){var t,e;for(t=[],(e=zn())===u&&(e=$n())===u&&(e=Yn());e!==u;)t.push(e),(e=zn())===u&&(e=$n())===u&&(e=Yn());return t}function Jn(){var t,e,n,o,i;return e=_n,(n=to())!==u?(46===r.charCodeAt(_n)?(o=wt,_n++):(o=u,0===Sn&&Mn(lr)),o!==u&&(i=to())!==u?e=n=[n,o,i]:(_n=e,e=u)):(_n=e,e=u),e!==u&&(e=gn(e)),(t=e)===u&&(t=to()),t}function to(){var t,e;if(t=[],e=r.charAt(_n),Mt.test(e)?_n++:(e=u,0===Sn&&Mn(sr)),e!==u)for(;e!==u;)t.push(e),e=r.charAt(_n),Mt.test(e)?_n++:(e=u,0===Sn&&Mn(sr));else t=u;return t!==u&&(t=pn(t)),t}function eo(){var t,e;return Sn++,t=_n,(e=function(){var t,e,n,o;return t=_n,34===r.charCodeAt(_n)?(e=gt,_n++):(e=u,0===Sn&&Mn($e)),e!==u&&(n=ro())!==u?(34===r.charCodeAt(_n)?(o=gt,_n++):(o=u,0===Sn&&Mn($e)),o!==u?t=yn(n):(_n=t,t=u)):(_n=t,t=u),t}())!==u&&(e=bn(e)),(t=e)===u&&(t=_n,(e=ro())!==u&&(e=mn(e)),t=e),Sn--,t===u&&(e=u,0===Sn&&Mn(fr)),t}function ro(){var t;return(t=r.substr(_n,4)).toLowerCase()===_t?_n+=4:(t=u,0===Sn&&Mn(dr)),t===u&&((t=r.substr(_n,5)).toLowerCase()===Ct?_n+=5:(t=u,0===Sn&&Mn(hr)),t===u&&((t=r.substr(_n,2)).toLowerCase()===At?_n+=2:(t=u,0===Sn&&Mn(pr)),t===u&&((t=r.substr(_n,3)).toLowerCase()===Ot?_n+=3:(t=u,0===Sn&&Mn(gr)),t===u&&(t=r.charAt(_n),Tt.test(t)?_n++:(t=u,0===Sn&&Mn(br)))))),t}function no(){var t,e;return t=_n,(e=Jn())!==u&&(e=xn(e)),(t=e)===u&&(t=_n,(e=r.substr(_n,4)).toLowerCase()===St?_n+=4:(e=u,0===Sn&&Mn(yr)),e!==u&&(e=wn(e)),t=e),t}function oo(e,r,n){return!(t.entityExists(e,r)||!0===n[r])}function io(t){return{name:t}}function ao(t,e,r){return r||(r={}),(e||[]).forEach((function(e){e.forEach((function(e){oo(t,e.from,r)&&t.push(io(e.from)),e.arcs&&(r[e.to]=!0,Object.assign(t,ao(t,e.arcs,r)),delete r[e.to]),oo(t,e.to,r)&&t.push(io(e.to))}))})),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:_n,peg$FAILED:u,peg$maxFailExpected:On,peg$maxFailPos:An};if(o!==u&&_n===r.length)return o;throw o!==u&&_ne?t:(e-=t.length,t+(r+=r.repeat(e)).slice(0,e))}return function(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}(e,Error),e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,o=null;for(n=0;n0){for(e=1,r=1;e",D="==",F="<<=>>",I="<=>",B="..",N="<<>>",H="::",R="<:>",W="->",G="=>>",X="=>",V=">>",z=":>",$="-x",q="<-",U="<<=",K="<=",Z="<<",Y="<:",Q="x-",J="note",tt="abox",et="rbox",rt="box",nt="alt",ot="else",it="opt",at="break",ct="par",ut="seq",st="strict",lt="neg",ft="critical",dt="ignore",ht="consider",pt="assert",gt="loop",bt="ref",mt="exc",yt="activate",vt="deactivate",xt="label",wt="idurl",_t="id",Ct="url",At="linecolor",Ot="linecolour",St="textcolor",kt="textcolour",Lt="textbgcolor",Et="textbgcolour",jt="arclinecolor",Pt="arclinecolour",Mt="arctextcolor",Tt="arctextcolour",Dt="arctextbgcolor",Ft="arctextbgcolour",It="arcskip",Bt="title",Nt="activation",Ht='"',Rt='\\"',Wt="/*",Gt="*/",Xt="//",Vt="#",zt=".",$t="true",qt="false",Ut="on",Kt="off",Zt="auto",Yt=/^[A-Za-z_0-9]/,Qt=/^[ \t]/,Jt=/^[\r\n]/,te=/^[^\r\n]/,ee=/^[0-9]/,re=/^[0-1]/,ne=Eo("{",!1),oe=Eo("}",!1),ie=Eo("msc",!0),ae=Eo("xu",!0),ce=Eo(",",!1),ue=Eo(";",!1),se=Po("option"),le=Eo("hscale",!0),fe=Eo("arcgradient",!0),de=Eo("=",!1),he=Eo("width",!0),pe=Eo("wordwraparcs",!0),ge=Eo("wordwrapentities",!0),be=Eo("wordwrapboxes",!0),me=Eo("watermark",!0),ye=Po("entity"),ve=Eo("[",!1),xe=Eo("]",!1),we=Eo("*",!1),_e=Po("empty row"),Ce=Eo("|||",!1),Ae=Eo("...",!1),Oe=Po("---"),Se=Eo("---",!1),ke=Po("bi-directional arrow"),Le=Eo("--",!1),Ee=Eo("<->",!1),je=Eo("==",!1),Pe=Eo("<<=>>",!1),Me=Eo("<=>",!1),Te=Eo("..",!1),De=Eo("<<>>",!1),Fe=Eo("::",!1),Ie=Eo("<:>",!1),Be=Po("left to right arrow"),Ne=Eo("->",!1),He=Eo("=>>",!1),Re=Eo("=>",!1),We=Eo(">>",!1),Ge=Eo(":>",!1),Xe=Eo("-x",!0),Ve=Po("right to left arrow"),ze=Eo("<-",!1),$e=Eo("<<=",!1),qe=Eo("<=",!1),Ue=Eo("<<",!1),Ke=Eo("<:",!1),Ze=Eo("x-",!0),Ye=Po("box"),Qe=Eo("note",!0),Je=Eo("abox",!0),tr=Eo("rbox",!0),er=Eo("box",!0),rr=Po("inline expression"),nr=Eo("alt",!0),or=Eo("else",!0),ir=Eo("opt",!0),ar=Eo("break",!0),cr=Eo("par",!0),ur=Eo("seq",!0),sr=Eo("strict",!0),lr=Eo("neg",!0),fr=Eo("critical",!0),dr=Eo("ignore",!0),hr=Eo("consider",!0),pr=Eo("assert",!0),gr=Eo("loop",!0),br=Eo("ref",!0),mr=Eo("exc",!0),yr=Po("activate or deactivate"),vr=Eo("activate",!0),xr=Eo("deactivate",!0),wr=Po("attribute name"),_r=Eo("label",!0),Cr=Eo("idurl",!0),Ar=Eo("id",!0),Or=Eo("url",!0),Sr=Eo("linecolor",!0),kr=Eo("linecolour",!0),Lr=Eo("textcolor",!0),Er=Eo("textcolour",!0),jr=Eo("textbgcolor",!0),Pr=Eo("textbgcolour",!0),Mr=Eo("arclinecolor",!0),Tr=Eo("arclinecolour",!0),Dr=Eo("arctextcolor",!0),Fr=Eo("arctextcolour",!0),Ir=Eo("arctextbgcolor",!0),Br=Eo("arctextbgcolour",!0),Nr=Eo("arcskip",!0),Hr=Eo("title",!0),Rr=Eo("activation",!0),Wr=Po("double quoted string"),Gr=Eo('"',!1),Xr=Eo('\\"',!1),Vr={type:"any"},zr=Po("identifier"),$r=jo([["A","Z"],["a","z"],"_",["0","9"]],!1,!1),qr=Po("whitespace"),Ur=jo([" ","\t"],!1,!1),Kr=Po("lineend"),Zr=jo(["\r","\n"],!1,!1),Yr=Eo("/*",!1),Qr=Eo("*/",!1),Jr=Eo("//",!1),tn=Eo("#",!1),en=jo(["\r","\n"],!0,!1),rn=Po("comment"),nn=Po("number"),on=jo([["0","9"]],!1,!1),an=Eo(".",!1),cn=Po("boolean"),un=Eo("true",!0),sn=Eo("false",!0),ln=Eo("on",!0),fn=Eo("off",!0),dn=jo([["0","1"]],!1,!1),hn=Po("size"),pn=Eo("auto",!0),gn=function(e,r){return r.entities=r.entities||[],t.checkForUndeclaredEntities(r.entities,r.arcs),r={meta:t.getMetaInfo(r.options,r.arcs),...r},e.length>0&&(r={precomment:e,...r}),r},bn=function(t,e,r){var n={};return t&&(n.options=t),e&&(n.entities=e),r&&(n.arcs=r),n},mn=function(t){return t},yn=function(t){return t},vn=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},xn=function(e,r){return t.nameValue2Option(e,r)},wn=function(e,r){return t.nameValue2Option(e,r)},_n=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},Cn=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},An=function(e,r){return t.nameValue2Option(e,t.flattenBoolean(r))},On=function(e,r){return t.nameValue2Option(e,r)},Sn=function(t){return t},kn=function(t){return t},Ln=function(t){return t[0].concat(t[1])},En=function(t,e){return e},jn=function(t,e){return{name:t,...e}},Pn=function(t,e){return e},Mn=function(r,n){return t.isMscGenKeyword(r)&&function(t,r){throw function(t,r){return new e(t,null,null,r)}(t,r=void 0!==r?r:To(Ao,Co))}("MscGen keywords aren't allowed as entity names (embed them in quotes if you need them)"),{name:r,...n}},Tn=function(t){return t},Dn=function(t){return t},Fn=function(t){return t},In=function(t){return t[0].concat(t[1])},Bn=function(t){return t},Nn=function(t){return t},Hn=function(t){return t},Rn=function(t,e){return e},Wn=function(t,e){return{...t,...e}},Gn=function(t){return{kind:t}},Xn=function(t){return{kind:t}},Vn=function(t,e,r){return{kind:e,from:t,to:r}},zn=function(t,e){return{kind:t,from:"*",to:e}},$n=function(t,e){return{kind:e,from:t,to:"*"}},qn=function(t,e){return{kind:e,from:t,to:"*"}},Un=function(t,e,r,n){return n},Kn=function(t,e,r,n,o){return{kind:e,from:t,to:r,arcs:o,...n}},Zn=function(t){return t.toLowerCase()},Yn=function(t){return t.toLowerCase()},Qn=function(t){return t},Jn=function(t){return t},to=function(t){return t[0].concat(t[1]).reduce(((t,e)=>Object.assign(t,e)),{})},eo=function(t){return{activation:"activate"===t.toLowerCase()}},ro=function(e,r){var n={};return"activation"===e.toLowerCase()?n.activation=t.flattenBoolean(r):n[e.toLowerCase().replace("colour","color")]=r,n},no=function(t){return t.join("")},oo=function(t){return t},io=function(t){return t.join("")},ao=function(t){return t},co=function(t){return t},uo=function(t){return t},so=function(t,e,r){return t+e.join("")+r},lo=function(t,e){return t+e.join("")},fo=function(t){return t},ho=function(t){return t.toString()},po=function(t){return t.toString()},go=function(t){return parseInt(t.join(""),10)},bo=function(t){return parseFloat(t.join(""))},mo=function(t){return t},yo=function(t){return t.toString()},vo=function(t){return t},xo=function(t){return t},wo=function(t){return t.toString()},_o=function(t){return t.toLowerCase()},Co=0|n.peg$currPos,Ao=Co,Oo=[{line:1,column:1}],So=Co,ko=n.peg$maxFailExpected||[],Lo=0|n.peg$silentFails;if(n.startRule){if(!(n.startRule in l))throw new Error("Can't start parsing from rule \""+n.startRule+'".');f=l[n.startRule]}function Eo(t,e){return{type:"literal",text:t,ignoreCase:e}}function jo(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function Po(t){return{type:"other",description:t}}function Mo(t){var e,n=Oo[t];if(n)return n;if(t>=Oo.length)e=Oo.length-1;else for(e=t;!Oo[--e];);for(n={line:(n=Oo[e]).line,column:n.column};eSo&&(So=Co,ko=[]),ko.push(t))}function Fo(){var t,e,n,o,i;return t=Co,e=ri(),function(){var t;return(t=r.substr(Co,3)).toLowerCase()===p?Co+=3:(t=u,0===Lo&&Do(ie)),t===u&&((t=r.substr(Co,2)).toLowerCase()===g?Co+=2:(t=u,0===Lo&&Do(ae))),t}()!==u?(ri(),123===r.charCodeAt(Co)?(n=d,Co++):(n=u,0===Lo&&Do(ne)),n!==u?(ri(),o=function(){var t,e,n,o;return t=Co,(e=function(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Io())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=mn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Io())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=mn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Io())!==u?(59===r.charCodeAt(Co)?(a=m,Co++):(a=u,0===Lo&&Do(ue)),a!==u?(Ao=o,o=yn(i)):(Co=o,o=u)):(Co=o,o=u),o!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=vn(e)),e}())===u&&(e=null),(n=function(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Bo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Sn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Bo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Sn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Bo())!==u?(59===r.charCodeAt(Co)?(a=m,Co++):(a=u,0===Lo&&Do(ue)),a!==u?(Ao=o,o=kn(i)):(Co=o,o=u)):(Co=o,o=u),o!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=Ln(e)),e}())===u&&(n=null),(o=No())===u&&(o=null),Ao=t,bn(e,n,o)}(),ri(),125===r.charCodeAt(Co)?(i=h,Co++):(i=u,0===Lo&&Do(oe)),i!==u?(ri(),Ao=t,t=gn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}function Io(){var t,e,n,o;return Lo++,t=Co,ri(),(e=r.substr(Co,6)).toLowerCase()===y?Co+=6:(e=u,0===Lo&&Do(le)),e===u&&((e=r.substr(Co,11)).toLowerCase()===v?Co+=11:(e=u,0===Lo&&Do(fe))),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=function(){var t,e;return Lo++,t=Co,(e=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ni())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=po(n)):(Co=t,t=u)):(Co=t,t=u),t}())!==u&&(Ao=t,e=fo(e)),(t=e)===u&&(t=Co,(e=ni())!==u&&(Ao=t,e=ho(e)),t=e),Lo--,t===u&&(e=u,0===Lo&&Do(nn)),t}())!==u?(ri(),Ao=t,t=xn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,5)).toLowerCase()===w?Co+=5:(e=u,0===Lo&&Do(he)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=function(){var t;return Lo++,(t=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ci())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=xo(n)):(Co=t,t=u)):(Co=t,t=u),t}())===u&&(t=ci()),Lo--,t===u&&0===Lo&&Do(hn),t}())!==u?(ri(),Ao=t,t=wn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,12)).toLowerCase()===_?Co+=12:(e=u,0===Lo&&Do(pe)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=_n(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,16)).toLowerCase()===C?Co+=16:(e=u,0===Lo&&Do(ge)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=Cn(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,13)).toLowerCase()===A?Co+=13:(e=u,0===Lo&&Do(be)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=ii())!==u?(ri(),Ao=t,t=An(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=r.substr(Co,9)).toLowerCase()===O?Co+=9:(e=u,0===Lo&&Do(me)),e!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=$o())!==u?(ri(),Ao=t,t=On(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)))))),Lo--,t===u&&0===Lo&&Do(se),t}function Bo(){var t,e,n,o,i,a;return Lo++,t=Co,ri(),(e=$o())!==u?(ri(),n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Vo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=En(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),o=ri(),Ao=t,t=jn(e,n)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=Uo())!==u?(ri(),n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Vo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=Pn(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),o=ri(),Ao=t,t=Mn(e,n)):(Co=t,t=u)),Lo--,t===u&&0===Lo&&Do(ye),t}function No(){var t,e,n,o;if(t=[],e=Co,(n=Ho())!==u?(ri(),59===r.charCodeAt(Co)?(o=m,Co++):(o=u,0===Lo&&Do(ue)),o!==u?(Ao=e,e=Tn(n)):(Co=e,e=u)):(Co=e,e=u),e!==u)for(;e!==u;)t.push(e),e=Co,(n=Ho())!==u?(ri(),59===r.charCodeAt(Co)?(o=m,Co++):(o=u,0===Lo&&Do(ue)),o!==u?(Ao=e,e=Tn(n)):(Co=e,e=u)):(Co=e,e=u);else t=u;return t}function Ho(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=Ro())!==u?(ri(),44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Dn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=Ro())!==u?(ri(),44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Dn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=Ro())!==u&&(Ao=o,i=Fn(i)),(o=i)!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=In(e)),e}function Ro(){var t;return(t=function(){var t,e,n,o,i,a;return t=Co,e=Co,(n=function(){var t,e;return t=Co,ri(),(e=function(){var t;return Lo++,r.substr(Co,3)===E?(t=E,Co+=3):(t=u,0===Lo&&Do(Ce)),t===u&&(r.substr(Co,3)===j?(t=j,Co+=3):(t=u,0===Lo&&Do(Ae))),Lo--,t===u&&0===Lo&&Do(_e),t}())!==u?(ri(),Ao=t,t=Gn(e)):(Co=t,t=u),t}())!==u&&(Ao=e,n=Bn(n)),(e=n)===u&&(e=Co,(n=function(){var t,e,n,o;return t=Co,ri(),(e=qo())!==u?(ri(),(n=function(){var t,e;return t=Co,(e=Wo())===u&&(e=Go())===u&&(e=Xo())===u&&(e=function(){var t;return Lo++,(t=r.substr(Co,4)).toLowerCase()===J?Co+=4:(t=u,0===Lo&&Do(Qe)),t===u&&((t=r.substr(Co,4)).toLowerCase()===tt?Co+=4:(t=u,0===Lo&&Do(Je)),t===u&&((t=r.substr(Co,4)).toLowerCase()===et?Co+=4:(t=u,0===Lo&&Do(tr)),t===u&&((t=r.substr(Co,3)).toLowerCase()===rt?Co+=3:(t=u,0===Lo&&Do(er))))),Lo--,t===u&&0===Lo&&Do(Ye),t}()),e!==u&&(Ao=t,e=Zn(e)),e}())!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=Vn(e,n,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),42===r.charCodeAt(Co)?(e=L,Co++):(e=u,0===Lo&&Do(we)),e!==u?(ri(),(n=Xo())!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=zn(n,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=qo())!==u?(ri(),(n=Go())!==u?(ri(),42===r.charCodeAt(Co)?(o=L,Co++):(o=u,0===Lo&&Do(we)),o!==u?(ri(),Ao=t,t=$n(e,n)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t===u&&(t=Co,ri(),(e=qo())!==u?(ri(),(n=Wo())!==u?(ri(),42===r.charCodeAt(Co)?(o=L,Co++):(o=u,0===Lo&&Do(we)),o!==u?(ri(),Ao=t,t=qn(e,n)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)))),t}())!==u&&(Ao=e,n=Nn(n)),(e=n)===u&&(e=Co,(n=function(){var t,e;return t=Co,ri(),(e=function(){var t;return Lo++,r.substr(Co,3)===P?(t=P,Co+=3):(t=u,0===Lo&&Do(Se)),Lo--,t===u&&0===Lo&&Do(Oe),t}())!==u?(ri(),Ao=t,t=Xn(e)):(Co=t,t=u),t}())!==u&&(Ao=e,n=Hn(n)),e=n)),e!==u?(n=Co,91===r.charCodeAt(Co)?(o=S,Co++):(o=u,0===Lo&&Do(ve)),o!==u&&(i=Vo())!==u?(93===r.charCodeAt(Co)?(a=k,Co++):(a=u,0===Lo&&Do(xe)),a!==u?(Ao=n,n=Rn(e,i)):(Co=n,n=u)):(Co=n,n=u),n===u&&(n=null),Ao=t,t=Wn(e,n)):(Co=t,t=u),t}())===u&&(t=function(){var t,e,n,o,i,a,c,s,l,f;return t=Co,ri(),(e=qo())!==u?(ri(),(n=function(){var t,e;return Lo++,t=Co,(e=r.substr(Co,3)).toLowerCase()===nt?Co+=3:(e=u,0===Lo&&Do(nr)),e===u&&((e=r.substr(Co,4)).toLowerCase()===ot?Co+=4:(e=u,0===Lo&&Do(or)),e===u&&((e=r.substr(Co,3)).toLowerCase()===it?Co+=3:(e=u,0===Lo&&Do(ir)),e===u&&((e=r.substr(Co,5)).toLowerCase()===at?Co+=5:(e=u,0===Lo&&Do(ar)),e===u&&((e=r.substr(Co,3)).toLowerCase()===ct?Co+=3:(e=u,0===Lo&&Do(cr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===ut?Co+=3:(e=u,0===Lo&&Do(ur)),e===u&&((e=r.substr(Co,6)).toLowerCase()===st?Co+=6:(e=u,0===Lo&&Do(sr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===lt?Co+=3:(e=u,0===Lo&&Do(lr)),e===u&&((e=r.substr(Co,8)).toLowerCase()===ft?Co+=8:(e=u,0===Lo&&Do(fr)),e===u&&((e=r.substr(Co,6)).toLowerCase()===dt?Co+=6:(e=u,0===Lo&&Do(dr)),e===u&&((e=r.substr(Co,8)).toLowerCase()===ht?Co+=8:(e=u,0===Lo&&Do(hr)),e===u&&((e=r.substr(Co,6)).toLowerCase()===pt?Co+=6:(e=u,0===Lo&&Do(pr)),e===u&&((e=r.substr(Co,4)).toLowerCase()===gt?Co+=4:(e=u,0===Lo&&Do(gr)),e===u&&((e=r.substr(Co,3)).toLowerCase()===bt?Co+=3:(e=u,0===Lo&&Do(br)),e===u&&((e=r.substr(Co,3)).toLowerCase()===mt?Co+=3:(e=u,0===Lo&&Do(mr)))))))))))))))),e!==u&&(Ao=t,e=Yn(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(rr)),t}())!==u?(ri(),(o=qo())!==u?(ri(),i=Co,91===r.charCodeAt(Co)?(a=S,Co++):(a=u,0===Lo&&Do(ve)),a!==u&&(c=Vo())!==u?(93===r.charCodeAt(Co)?(s=k,Co++):(s=u,0===Lo&&Do(xe)),s!==u?(Ao=i,i=Un(e,n,o,c)):(Co=i,i=u)):(Co=i,i=u),i===u&&(i=null),a=ri(),123===r.charCodeAt(Co)?(c=d,Co++):(c=u,0===Lo&&Do(ne)),c!==u?(s=ri(),(l=No())===u&&(l=null),ri(),125===r.charCodeAt(Co)?(f=h,Co++):(f=u,0===Lo&&Do(oe)),f!==u?(ri(),Ao=t,t=Kn(e,n,o,i,l)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}()),t}function Wo(){var t;return Lo++,r.substr(Co,2)===M?(t=M,Co+=2):(t=u,0===Lo&&Do(Le)),t===u&&(r.substr(Co,3)===T?(t=T,Co+=3):(t=u,0===Lo&&Do(Ee)),t===u&&(r.substr(Co,2)===D?(t=D,Co+=2):(t=u,0===Lo&&Do(je)),t===u&&(r.substr(Co,5)===F?(t=F,Co+=5):(t=u,0===Lo&&Do(Pe)),t===u&&(r.substr(Co,3)===I?(t=I,Co+=3):(t=u,0===Lo&&Do(Me)),t===u&&(r.substr(Co,2)===B?(t=B,Co+=2):(t=u,0===Lo&&Do(Te)),t===u&&(r.substr(Co,4)===N?(t=N,Co+=4):(t=u,0===Lo&&Do(De)),t===u&&(r.substr(Co,2)===H?(t=H,Co+=2):(t=u,0===Lo&&Do(Fe)),t===u&&(r.substr(Co,3)===R?(t=R,Co+=3):(t=u,0===Lo&&Do(Ie)))))))))),Lo--,t===u&&0===Lo&&Do(ke),t}function Go(){var t;return Lo++,r.substr(Co,2)===W?(t=W,Co+=2):(t=u,0===Lo&&Do(Ne)),t===u&&(r.substr(Co,3)===G?(t=G,Co+=3):(t=u,0===Lo&&Do(He)),t===u&&(r.substr(Co,2)===X?(t=X,Co+=2):(t=u,0===Lo&&Do(Re)),t===u&&(r.substr(Co,2)===V?(t=V,Co+=2):(t=u,0===Lo&&Do(We)),t===u&&(r.substr(Co,2)===z?(t=z,Co+=2):(t=u,0===Lo&&Do(Ge)),t===u&&((t=r.substr(Co,2)).toLowerCase()===$?Co+=2:(t=u,0===Lo&&Do(Xe))))))),Lo--,t===u&&0===Lo&&Do(Be),t}function Xo(){var t;return Lo++,r.substr(Co,2)===q?(t=q,Co+=2):(t=u,0===Lo&&Do(ze)),t===u&&(r.substr(Co,3)===U?(t=U,Co+=3):(t=u,0===Lo&&Do($e)),t===u&&(r.substr(Co,2)===K?(t=K,Co+=2):(t=u,0===Lo&&Do(qe)),t===u&&(r.substr(Co,2)===Z?(t=Z,Co+=2):(t=u,0===Lo&&Do(Ue)),t===u&&(r.substr(Co,2)===Y?(t=Y,Co+=2):(t=u,0===Lo&&Do(Ke)),t===u&&((t=r.substr(Co,2)).toLowerCase()===Q?Co+=2:(t=u,0===Lo&&Do(Ze))))))),Lo--,t===u&&0===Lo&&Do(Ve),t}function Vo(){var t,e,n,o,i,a;for(t=Co,e=Co,n=[],o=Co,(i=zo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Qn(i)):(Co=o,o=u)):(Co=o,o=u);o!==u;)n.push(o),o=Co,(i=zo())!==u?(44===r.charCodeAt(Co)?(a=b,Co++):(a=u,0===Lo&&Do(ce)),a!==u?(Ao=o,o=Qn(i)):(Co=o,o=u)):(Co=o,o=u);return o=Co,(i=zo())!==u&&(Ao=o,i=Jn(i)),(o=i)!==u?e=n=[n,o]:(Co=e,e=u),e!==u&&(Ao=t,e=to(e)),e}function zo(){var t;return(t=function(){var t,e,n,o;return t=Co,ri(),(e=function(){var t;return Lo++,(t=r.substr(Co,5)).toLowerCase()===xt?Co+=5:(t=u,0===Lo&&Do(_r)),t===u&&((t=r.substr(Co,5)).toLowerCase()===wt?Co+=5:(t=u,0===Lo&&Do(Cr)),t===u&&((t=r.substr(Co,2)).toLowerCase()===_t?Co+=2:(t=u,0===Lo&&Do(Ar)),t===u&&((t=r.substr(Co,3)).toLowerCase()===Ct?Co+=3:(t=u,0===Lo&&Do(Or)),t===u&&((t=r.substr(Co,9)).toLowerCase()===At?Co+=9:(t=u,0===Lo&&Do(Sr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===Ot?Co+=10:(t=u,0===Lo&&Do(kr)),t===u&&((t=r.substr(Co,9)).toLowerCase()===St?Co+=9:(t=u,0===Lo&&Do(Lr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===kt?Co+=10:(t=u,0===Lo&&Do(Er)),t===u&&((t=r.substr(Co,11)).toLowerCase()===Lt?Co+=11:(t=u,0===Lo&&Do(jr)),t===u&&((t=r.substr(Co,12)).toLowerCase()===Et?Co+=12:(t=u,0===Lo&&Do(Pr)),t===u&&((t=r.substr(Co,12)).toLowerCase()===jt?Co+=12:(t=u,0===Lo&&Do(Mr)),t===u&&((t=r.substr(Co,13)).toLowerCase()===Pt?Co+=13:(t=u,0===Lo&&Do(Tr)),t===u&&((t=r.substr(Co,12)).toLowerCase()===Mt?Co+=12:(t=u,0===Lo&&Do(Dr)),t===u&&((t=r.substr(Co,13)).toLowerCase()===Tt?Co+=13:(t=u,0===Lo&&Do(Fr)),t===u&&((t=r.substr(Co,14)).toLowerCase()===Dt?Co+=14:(t=u,0===Lo&&Do(Ir)),t===u&&((t=r.substr(Co,15)).toLowerCase()===Ft?Co+=15:(t=u,0===Lo&&Do(Br)),t===u&&((t=r.substr(Co,7)).toLowerCase()===It?Co+=7:(t=u,0===Lo&&Do(Nr)),t===u&&((t=r.substr(Co,5)).toLowerCase()===Bt?Co+=5:(t=u,0===Lo&&Do(Hr)),t===u&&((t=r.substr(Co,10)).toLowerCase()===Nt?Co+=10:(t=u,0===Lo&&Do(Rr)))))))))))))))))))),Lo--,t===u&&0===Lo&&Do(wr),t}())!==u?(ri(),61===r.charCodeAt(Co)?(n=x,Co++):(n=u,0===Lo&&Do(de)),n!==u?(ri(),(o=qo())!==u?(ri(),Ao=t,t=ro(e,o)):(Co=t,t=u)):(Co=t,t=u)):(Co=t,t=u),t}())===u&&(t=function(){var t,e;return Lo++,t=Co,ri(),(e=r.substr(Co,8)).toLowerCase()===yt?Co+=8:(e=u,0===Lo&&Do(vr)),e===u&&((e=r.substr(Co,10)).toLowerCase()===vt?Co+=10:(e=u,0===Lo&&Do(xr))),e!==u?(ri(),Ao=t,t=eo(e)):(Co=t,t=u),Lo--,t===u&&0===Lo&&Do(yr),t}()),t}function $o(){var t,e,n,o;return Lo++,t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u?(n=function(){var t,e,n,o;for(t=[],e=Co,n=Co,Lo++,34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),Lo--,o===u?n=void 0:(Co=n,n=u),n!==u?(r.substr(Co,2)===Rt?(o=Rt,Co+=2):(o=u,0===Lo&&Do(Xr)),o===u&&(r.length>Co?(o=r.charAt(Co),Co++):(o=u,0===Lo&&Do(Vr))),o!==u?(Ao=e,e=oo(o)):(Co=e,e=u)):(Co=e,e=u);e!==u;)t.push(e),e=Co,n=Co,Lo++,34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),Lo--,o===u?n=void 0:(Co=n,n=u),n!==u?(r.substr(Co,2)===Rt?(o=Rt,Co+=2):(o=u,0===Lo&&Do(Xr)),o===u&&(r.length>Co?(o=r.charAt(Co),Co++):(o=u,0===Lo&&Do(Vr))),o!==u?(Ao=e,e=oo(o)):(Co=e,e=u)):(Co=e,e=u);return t}(),34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=no(n)):(Co=t,t=u)):(Co=t,t=u),Lo--,t===u&&(e=u,0===Lo&&Do(Wr)),t}function qo(){var t;return Lo++,(t=Uo())===u&&(t=$o()),Lo--,t===u&&0===Lo&&Do(zr),t}function Uo(){var t,e,n;if(t=Co,e=[],n=r.charAt(Co),Yt.test(n)?Co++:(n=u,0===Lo&&Do($r)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(Co),Yt.test(n)?Co++:(n=u,0===Lo&&Do($r));else e=u;return e!==u&&(Ao=t,e=io(e)),e}function Ko(){var t,e;return Lo++,t=Co,e=r.charAt(Co),Qt.test(e)?Co++:(e=u,0===Lo&&Do(Ur)),e!==u&&(Ao=t,e=ao(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(qr)),t}function Zo(){var t,e;return Lo++,t=Co,e=r.charAt(Co),Jt.test(e)?Co++:(e=u,0===Lo&&Do(Zr)),e!==u&&(Ao=t,e=co(e)),Lo--,(t=e)===u&&(e=u,0===Lo&&Do(Kr)),t}function Yo(){var t,e,n;return t=Co,e=Co,Lo++,r.substr(Co,2)===Gt?(n=Gt,Co+=2):(n=u,0===Lo&&Do(Qr)),Lo--,n===u?e=void 0:(Co=e,e=u),e!==u?(r.length>Co?(n=r.charAt(Co),Co++):(n=u,0===Lo&&Do(Vr)),n!==u?(Ao=t,t=uo(n)):(Co=t,t=u)):(Co=t,t=u),t}function Qo(){var t,e,n,o;if(t=Co,(e=function(){var t;return r.substr(Co,2)===Wt?(t=Wt,Co+=2):(t=u,0===Lo&&Do(Yr)),t}())!==u){for(n=[],o=Yo();o!==u;)n.push(o),o=Yo();(o=function(){var t;return r.substr(Co,2)===Gt?(t=Gt,Co+=2):(t=u,0===Lo&&Do(Qr)),t}())!==u?(Ao=t,t=so(e,n,o)):(Co=t,t=u)}else Co=t,t=u;return t}function Jo(){var t;return t=r.charAt(Co),te.test(t)?Co++:(t=u,0===Lo&&Do(en)),t}function ti(){var t,e,n,o;if(t=Co,(e=function(){var t;return r.substr(Co,2)===Xt?(t=Xt,Co+=2):(t=u,0===Lo&&Do(Jr)),t===u&&(35===r.charCodeAt(Co)?(t=Vt,Co++):(t=u,0===Lo&&Do(tn))),t}())!==u){for(n=[],o=Jo();o!==u;)n.push(o),o=Jo();Ao=t,t=lo(e,n)}else Co=t,t=u;return t}function ei(){var t;return Lo++,(t=ti())===u&&(t=Qo()),Lo--,t===u&&0===Lo&&Do(rn),t}function ri(){var t,e;for(t=[],(e=Ko())===u&&(e=Zo())===u&&(e=ei());e!==u;)t.push(e),(e=Ko())===u&&(e=Zo())===u&&(e=ei());return t}function ni(){var t;return(t=function(){var t,e,n,o,i;return t=Co,e=Co,(n=oi())!==u?(46===r.charCodeAt(Co)?(o=zt,Co++):(o=u,0===Lo&&Do(an)),o!==u&&(i=oi())!==u?e=n=[n,o,i]:(Co=e,e=u)):(Co=e,e=u),e!==u&&(Ao=t,e=bo(e)),e}())===u&&(t=oi()),t}function oi(){var t,e,n;if(t=Co,e=[],n=r.charAt(Co),ee.test(n)?Co++:(n=u,0===Lo&&Do(on)),n!==u)for(;n!==u;)e.push(n),n=r.charAt(Co),ee.test(n)?Co++:(n=u,0===Lo&&Do(on));else e=u;return e!==u&&(Ao=t,e=go(e)),e}function ii(){var t,e;return Lo++,t=Co,(e=function(){var t,e,n,o;return t=Co,34===r.charCodeAt(Co)?(e=Ht,Co++):(e=u,0===Lo&&Do(Gr)),e!==u&&(n=ai())!==u?(34===r.charCodeAt(Co)?(o=Ht,Co++):(o=u,0===Lo&&Do(Gr)),o!==u?(Ao=t,t=vo(n)):(Co=t,t=u)):(Co=t,t=u),t}())!==u&&(Ao=t,e=mo(e)),(t=e)===u&&(t=Co,(e=ai())!==u&&(Ao=t,e=yo(e)),t=e),Lo--,t===u&&(e=u,0===Lo&&Do(cn)),t}function ai(){var t;return(t=r.substr(Co,4)).toLowerCase()===$t?Co+=4:(t=u,0===Lo&&Do(un)),t===u&&((t=r.substr(Co,5)).toLowerCase()===qt?Co+=5:(t=u,0===Lo&&Do(sn)),t===u&&((t=r.substr(Co,2)).toLowerCase()===Ut?Co+=2:(t=u,0===Lo&&Do(ln)),t===u&&((t=r.substr(Co,3)).toLowerCase()===Kt?Co+=3:(t=u,0===Lo&&Do(fn)),t===u&&(t=r.charAt(Co),re.test(t)?Co++:(t=u,0===Lo&&Do(dn)))))),t}function ci(){var t,e;return t=Co,(e=ni())!==u&&(Ao=t,e=wo(e)),(t=e)===u&&(t=Co,(e=r.substr(Co,4)).toLowerCase()===Zt?Co+=4:(e=u,0===Lo&&Do(pn)),e!==u&&(Ao=t,e=_o(e)),t=e),t}if(o=f(),n.peg$library)return{peg$result:o,peg$currPos:Co,peg$FAILED:u,peg$maxFailExpected:ko,peg$maxFailPos:So};if(o!==u&&Co===r.length)return o;throw o!==u&&Co{"use strict";t.exports=JSON.parse('{"baseTemplate":"svg.<%=id%>{font-family:Helvetica,sans-serif;font-size:<%=fontSize%>px;font-weight:normal;font-style:normal;text-decoration:none;background-color:white;stroke:black;stroke-width:<%=lineWidth%>}.<%=id%> path, .<%=id%> rect{fill:none}.<%=id%> .label-text-background{fill:white;stroke:white;stroke-width:0}.<%=id%> .bglayer{fill:white;stroke:white;stroke-width:0}.<%=id%> line{}.<%=id%> .return, .<%=id%> .comment{stroke-dasharray:5,3}.<%=id%> .inline_expression_divider{stroke-dasharray:10,5}.<%=id%> text{color:inherit;stroke:none;text-anchor:middle}.<%=id%> text.anchor-start{text-anchor:start}.<%=id%> .arrow-marker{overflow:visible}.<%=id%> .arrow-style{stroke-width:1}.<%=id%> .arcrow, .<%=id%> .arcrowomit, .<%=id%> .emphasised{stroke-linecap:butt}.<%=id%> .arcrowomit{stroke-dasharray:2,2}.<%=id%> .box, .<%=id%> .entity{fill:white;stroke-linejoin:round}.<%=id%> .inherit{stroke:inherit;color:inherit}.<%=id%> .inherit-fill{fill:inherit}.<%=id%> .watermark{font-size:48pt;font-weight:bold;opacity:0.14}","namedStyles":[{"name":"basic","description":"Basic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:underline;}"},{"name":"lazy","description":"Lazy","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{font-weight:bold;}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC}.<%=id%> rect.label-text-background{opacity:0.9}.<%=id%> line.comment,.<%=id%> rect.inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke:grey}"},{"name":"classic","description":"Classic","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> text.entity-text{text-decoration:none}.<%=id%> .entity{stroke:none;}.<%=id%> line,.<%=id%> rect,.<%=id%> path{stroke-width:1px}.<%=id%> .arrow-style{stroke-width:2;}.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{stroke-width: 1px}"},{"name":"fountainpen","description":"Fountain pen","experimental":true,"deprecated":false,"renderMagic":"wobbly","cssBefore":"@import \'https://fonts.googleapis.com/css?family=Gochi+Hand\';","cssAfter":"svg.<%=id%>{font-family:\'Gochi Hand\', cursive;font-size:14px;stroke-opacity:0.4;stroke-linecap:round;background-color:transparent}.<%=id%> text{fill:rgba(0,0,128,0.7)}.<%=id%> marker polygon{fill:rgba(0,0,255,0.4);stroke-linejoin:round}.<%=id%> line, .<%=id%> path, .<%=id%> rect, .<%=id%> polygon{stroke:blue !important}.<%=id%> text.entity-text{font-weight:bold;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#FFFFCC;}.<%=id%> .label-text-background{opacity:0}"},{"name":"cygne","description":"Cygne (best with msgenny)","experimental":true,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:#00A1DE}.<%=id%> text{fill:#005B82}.<%=id%> .entity,.<%=id%> .box{fill:#00A1DE;stroke:#00A1DE}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:#E77B2F;stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"pegasse","description":"Pégase (best with msgenny)","experimental":false,"deprecated":true,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> line, .<%=id%> path{stroke:rgba(0, 43, 84, 1)}.<%=id%> text{fill:rgba(0, 43, 84, 1)}.<%=id%> .entity,.<%=id%> .box{fill:rgba(0, 43, 84, 1);stroke:rgba(0, 43, 84, 1)}.<%=id%> text.box-text{fill:white}.<%=id%> text.entity-text{font-weight:bold;fill:white;text-decoration:none}.<%=id%> text.return-text{font-style:italic}.<%=id%> path.note{fill:rgba(255, 50, 0, 1);stroke:white}.<%=id%> .comment,.<%=id%> .inline_expression,.<%=id%> .inline_expression_divider,.<%=id%> .inline_expression_label{fill:white}"},{"name":"grayscaled","description":"Grayscaled (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:grayscale(1);-webkit-filter:grayscale(1);}"},{"name":"inverted","description":"Inverted (not in IE or Safari)","experimental":true,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":"svg.<%=id%>{filter:invert(1);-webkit-filter:invert(1);}"},{"name":"noentityboxes","description":"No entity boxes","experimental":false,"deprecated":false,"renderMagic":"straight","cssBefore":"","cssAfter":".<%=id%> .entity{fill:none;stroke:none;}.<%=id%> text.entity-text{text-decoration:underline;}"}]}')},163:t=>{"use strict";t.exports={version:"7.0.0"}}},e={},function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}(156);var t,e})); \ No newline at end of file diff --git a/dist/cjs/main/lazy-resolver.js b/dist/cjs/main/lazy-resolver.js index 27b6e299..d74e0f83 100644 --- a/dist/cjs/main/lazy-resolver.js +++ b/dist/cjs/main/lazy-resolver.js @@ -1,36 +1,48 @@ "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTextRenderer = exports.getGraphicsRenderer = exports.getParser = void 0; -var memoize_1 = __importDefault(require("lodash/memoize")); +exports.getParser = getParser; +exports.getGraphicsRenderer = getGraphicsRenderer; +exports.getTextRenderer = getTextRenderer; var DEFAULT_PARSER = "../parse/mscgenparser"; var DEFAULT_TEXT_RENDERER = "../render/text/ast2mscgen"; -var gLang2Parser = Object.freeze({ - mscgen: "../parse/mscgenparser", - xu: "../parse/xuparser", - msgenny: "../parse/msgennyparser", -}); -var gLang2TextRenderer = Object.freeze({ - mscgen: "../render/text/ast2mscgen", - msgenny: "../render/text/ast2msgenny", - xu: "../render/text/ast2xu", - dot: "../render/text/ast2dot", - doxygen: "../render/text/ast2doxygen", -}); -exports.getParser = (0, memoize_1.default)(function (pLanguage) { +var gLang2Parser = new Map([ + ["mscgen", "../parse/mscgenparser"], + ["xu", "../parse/xuparser"], + ["msgenny", "../parse/msgennyparser"], +]); +var gLang2TextRenderer = new Map([ + ["mscgen", "../render/text/ast2mscgen"], + ["msgenny", "../render/text/ast2msgenny"], + ["xu", "../render/text/ast2xu"], + ["dot", "../render/text/ast2dot"], + ["doxygen", "../render/text/ast2doxygen"], +]); +var parserMap = new Map(); +function getParser(pLanguage) { if (["ast", "json"].indexOf(pLanguage) > -1) { return JSON; } - return require(gLang2Parser[pLanguage] || DEFAULT_PARSER); -}); -exports.getGraphicsRenderer = (0, memoize_1.default)(function () { - return require("../render/graphics/renderast"); -}); -exports.getTextRenderer = (0, memoize_1.default)(function (pLanguage) { - return require(gLang2TextRenderer[pLanguage] || DEFAULT_TEXT_RENDERER); -}); + if (!parserMap.has(pLanguage)) { + parserMap.set(pLanguage, require(gLang2Parser.get(pLanguage) || DEFAULT_PARSER)); + } + return parserMap.get(pLanguage); +} +; +var graphicsRenderer = null; +function getGraphicsRenderer() { + if (!graphicsRenderer) { + graphicsRenderer = require("../render/graphics/renderast"); + } + return graphicsRenderer; +} +var textRendererMap = new Map(); +function getTextRenderer(pLanguage) { + if (!textRendererMap.has(pLanguage)) { + textRendererMap.set(pLanguage, require(gLang2TextRenderer.get(pLanguage) || DEFAULT_TEXT_RENDERER)); + } + return textRendererMap.get(pLanguage); +} +; /* This file is part of mscgen_js. diff --git a/dist/cjs/render/graphics/svgutensils.js b/dist/cjs/render/graphics/svgutensils.js index edef462b..313ba279 100644 --- a/dist/cjs/render/graphics/svgutensils.js +++ b/dist/cjs/render/graphics/svgutensils.js @@ -22,14 +22,11 @@ var __importStar = (this && this.__importStar) || function (mod) { __setModuleDefault(result, mod); return result; }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.webkitNamespaceBugWorkaround = exports.calculateTextHeight = exports.init = void 0; +exports.webkitNamespaceBugWorkaround = exports.init = void 0; exports.getBBox = getBBox; +exports.calculateTextHeight = calculateTextHeight; exports.removeRenderedSVGFromElement = removeRenderedSVGFromElement; -var memoize_1 = __importDefault(require("lodash/memoize")); var idmanager = __importStar(require("./idmanager")); var svgelementfactory = __importStar(require("./svgelementfactory/index")); /** @@ -37,6 +34,7 @@ var svgelementfactory = __importStar(require("./svgelementfactory/index")); */ var gDocument = {}; var gSvgBBoxerId = idmanager.get("bboxer"); +var gTextHeight = 0; /* istanbul ignore next */ function _createBBoxerSVG(pId) { var lSvg = svgelementfactory.createSVG(pId, idmanager.get()); @@ -103,7 +101,13 @@ function getBBox(pElement) { }; } } -function _calculateTextHeight() { +/** + * Returns the height in pixels necessary for rendering characters + */ +function calculateTextHeight() { + if (gTextHeight !== 0) { + return gTextHeight; + } /* Uses a string with some characters that tend to stick out * above/ below the current line and an 'astral codepoint' to * determine the text height to use everywhere. @@ -111,10 +115,11 @@ function _calculateTextHeight() { * The astral \uD83D\uDCA9 codepoint mainly makes a difference in gecko based * browsers. The string in readable form: ÁjyÎ9ƒ@💩 */ - return getBBox(svgelementfactory.createText("\u00C1jy\u00CE9\u0192@\uD83D\uDCA9", { + gTextHeight = getBBox(svgelementfactory.createText("\u00C1jy\u00CE9\u0192@\uD83D\uDCA9", { x: 0, y: 0, })).height; + return gTextHeight; } function removeRenderedSVGFromElement(pElementId) { idmanager.setPrefix(pElementId); @@ -133,10 +138,6 @@ var init = function (pDocument) { gDocument = pDocument; }; exports.init = init; -/** - * Returns the height in pixels necessary for rendering characters - */ -exports.calculateTextHeight = (0, memoize_1.default)(_calculateTextHeight); // webkit (at least in Safari Version 6.0.5 (8536.30.1) which is // distibuted with MacOSX 10.8.4) omits the xmlns: and xlink: // namespace prefixes in front of xlink and all hrefs respectively. diff --git a/dist/es2015/main/lazy-resolver.js b/dist/es2015/main/lazy-resolver.js index 11bfc235..e7b35f56 100644 --- a/dist/es2015/main/lazy-resolver.js +++ b/dist/es2015/main/lazy-resolver.js @@ -1,26 +1,43 @@ -import memoize from "lodash/memoize"; const DEFAULT_PARSER = "../parse/mscgenparser"; const DEFAULT_TEXT_RENDERER = "../render/text/ast2mscgen"; -const gLang2Parser = Object.freeze({ - mscgen: "../parse/mscgenparser", - xu: "../parse/xuparser", - msgenny: "../parse/msgennyparser", -}); -const gLang2TextRenderer = Object.freeze({ - mscgen: "../render/text/ast2mscgen", - msgenny: "../render/text/ast2msgenny", - xu: "../render/text/ast2xu", - dot: "../render/text/ast2dot", - doxygen: "../render/text/ast2doxygen", -}); -export const getParser = memoize((pLanguage) => { +const gLang2Parser = new Map([ + ["mscgen", "../parse/mscgenparser"], + ["xu", "../parse/xuparser"], + ["msgenny", "../parse/msgennyparser"], +]); +const gLang2TextRenderer = new Map([ + ["mscgen", "../render/text/ast2mscgen"], + ["msgenny", "../render/text/ast2msgenny"], + ["xu", "../render/text/ast2xu"], + ["dot", "../render/text/ast2dot"], + ["doxygen", "../render/text/ast2doxygen"], +]); +const parserMap = new Map(); +export function getParser(pLanguage) { if (["ast", "json"].indexOf(pLanguage) > -1) { return JSON; } - return require(gLang2Parser[pLanguage] || DEFAULT_PARSER); -}); -export const getGraphicsRenderer = memoize(() => require("../render/graphics/renderast")); -export const getTextRenderer = memoize((pLanguage) => require(gLang2TextRenderer[pLanguage] || DEFAULT_TEXT_RENDERER)); + if (!parserMap.has(pLanguage)) { + parserMap.set(pLanguage, require(gLang2Parser.get(pLanguage) || DEFAULT_PARSER)); + } + return parserMap.get(pLanguage); +} +; +let graphicsRenderer = null; +export function getGraphicsRenderer() { + if (!graphicsRenderer) { + graphicsRenderer = require("../render/graphics/renderast"); + } + return graphicsRenderer; +} +const textRendererMap = new Map(); +export function getTextRenderer(pLanguage) { + if (!textRendererMap.has(pLanguage)) { + textRendererMap.set(pLanguage, require(gLang2TextRenderer.get(pLanguage) || DEFAULT_TEXT_RENDERER)); + } + return textRendererMap.get(pLanguage); +} +; /* This file is part of mscgen_js. diff --git a/dist/es2015/render/graphics/svgutensils.js b/dist/es2015/render/graphics/svgutensils.js index 2cbd7f44..5b73e3b3 100644 --- a/dist/es2015/render/graphics/svgutensils.js +++ b/dist/es2015/render/graphics/svgutensils.js @@ -1,4 +1,3 @@ -import memoize from "lodash/memoize"; import * as idmanager from "./idmanager"; import * as svgelementfactory from "./svgelementfactory/index"; /** @@ -6,6 +5,7 @@ import * as svgelementfactory from "./svgelementfactory/index"; */ let gDocument = {}; const gSvgBBoxerId = idmanager.get("bboxer"); +let gTextHeight = 0; /* istanbul ignore next */ function _createBBoxerSVG(pId) { const lSvg = svgelementfactory.createSVG(pId, idmanager.get()); @@ -72,7 +72,13 @@ export function getBBox(pElement) { }; } } -function _calculateTextHeight() { +/** + * Returns the height in pixels necessary for rendering characters + */ +export function calculateTextHeight() { + if (gTextHeight !== 0) { + return gTextHeight; + } /* Uses a string with some characters that tend to stick out * above/ below the current line and an 'astral codepoint' to * determine the text height to use everywhere. @@ -80,10 +86,11 @@ function _calculateTextHeight() { * The astral \uD83D\uDCA9 codepoint mainly makes a difference in gecko based * browsers. The string in readable form: ÁjyÎ9ƒ@💩 */ - return getBBox(svgelementfactory.createText("\u00C1jy\u00CE9\u0192@\uD83D\uDCA9", { + gTextHeight = getBBox(svgelementfactory.createText("\u00C1jy\u00CE9\u0192@\uD83D\uDCA9", { x: 0, y: 0, })).height; + return gTextHeight; } export function removeRenderedSVGFromElement(pElementId) { idmanager.setPrefix(pElementId); @@ -101,10 +108,6 @@ export function removeRenderedSVGFromElement(pElementId) { export const init = (pDocument) => { gDocument = pDocument; }; -/** - * Returns the height in pixels necessary for rendering characters - */ -export const calculateTextHeight = memoize(_calculateTextHeight); // webkit (at least in Safari Version 6.0.5 (8536.30.1) which is // distibuted with MacOSX 10.8.4) omits the xmlns: and xlink: // namespace prefixes in front of xlink and all hrefs respectively. diff --git a/package-lock.json b/package-lock.json index fc92ea45..c2bf5f11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,12 +8,8 @@ "name": "mscgenjs", "version": "7.0.0", "license": "GPL-3.0", - "dependencies": { - "lodash": "4.17.21" - }, "devDependencies": { "@types/node": "20.14.10", - "@typescript-eslint/parser": "7.16.0", "ajv": "8.17.1", "c8": "10.1.2", "chai": "^4.4.1", @@ -523,176 +519,6 @@ "node": ">=12" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "peer": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "peer": true - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -864,41 +690,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@peggyjs/from-mem": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@peggyjs/from-mem/-/from-mem-1.3.0.tgz", @@ -1007,121 +798,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.0.tgz", - "integrity": "sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "7.16.0", - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/typescript-estree": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.0.tgz", - "integrity": "sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.0.tgz", - "integrity": "sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.0.tgz", - "integrity": "sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.16.0", - "@typescript-eslint/visitor-keys": "7.16.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.0.tgz", - "integrity": "sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.16.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "peer": true - }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", @@ -1437,13 +1113,6 @@ "node": ">=4" } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "peer": true - }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -1460,16 +1129,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", @@ -1651,16 +1310,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001636", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", @@ -2095,13 +1744,6 @@ "node": ">=6" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "peer": true - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2216,32 +1858,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -2486,170 +2102,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "peer": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -2663,19 +2115,6 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2697,16 +2136,6 @@ "node": ">=4.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -2722,49 +2151,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "peer": true - }, "node_modules/fast-uri": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", @@ -2777,17 +2169,8 @@ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" + "engines": { + "node": ">= 4.9.1" } }, "node_modules/figgy-pudding": { @@ -2797,19 +2180,6 @@ "deprecated": "This module is no longer supported.", "dev": true }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "peer": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -2847,28 +2217,6 @@ "flat": "cli.js" } }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true, - "peer": true - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -3067,19 +2415,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -3123,22 +2458,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -3155,27 +2474,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3194,13 +2492,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "peer": true - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -3358,23 +2649,6 @@ "node": ">= 4" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "peer": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -3394,16 +2668,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3560,15 +2824,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -3579,18 +2834,6 @@ "node": ">=8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-installed-globally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-1.0.0.tgz", @@ -3655,16 +2898,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3853,19 +3086,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsdom": { "version": "24.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", @@ -3907,13 +3127,6 @@ } } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "peer": true - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -3932,13 +3145,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "peer": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -3951,16 +3157,6 @@ "node": ">=6" } }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3979,20 +3175,6 @@ "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/libnpmconfig": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", @@ -4136,14 +3318,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "peer": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/loupe": { "version": "2.3.7", @@ -4207,16 +3383,6 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/micromatch": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", @@ -4328,13 +3494,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "peer": true - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -4585,24 +3744,6 @@ "wrappy": "1" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4649,19 +3790,6 @@ "dev": true, "license": "BlueOak-1.0.0" }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "peer": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -4725,16 +3853,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -4873,16 +3991,6 @@ "node": ">= 0.4" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -4917,26 +4025,6 @@ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -5074,16 +4162,6 @@ "node": ">=8" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", @@ -5094,33 +4172,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "peer": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rrweb-cssom": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", @@ -5128,29 +4179,6 @@ "dev": true, "license": "MIT" }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -5422,15 +4450,6 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5647,19 +4666,6 @@ "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5838,13 +4844,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "peer": true - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5885,19 +4884,6 @@ "node": ">=18" } }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, "node_modules/ts-loader": { "version": "9.5.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", @@ -6137,19 +5123,6 @@ "fsevents": "~2.3.3" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -6159,19 +5132,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", @@ -6667,16 +5627,6 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", diff --git a/package.json b/package.json index c631f995..cf71591e 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,8 @@ "package.json", "README.md" ], - "dependencies": { - "lodash": "4.17.21" - }, "devDependencies": { "@types/node": "20.14.10", - "@typescript-eslint/parser": "7.16.0", "ajv": "8.17.1", "c8": "10.1.2", "chai": "^4.4.1", @@ -41,7 +37,7 @@ { "package": "chai", "policy": "wanted", - "because": "chai >=5 are ESM only, and typescript doesn't play nice with ESM jet on here" + "because": "chai >=5 are ESM only, and typescript doesn't play nice with ESM yet on here" } ] }, @@ -76,7 +72,7 @@ "build:es2015:copy:version": "cp src/version.json dist/es2015/.", "check": "npm-run-all depcruise lint test:all", "check:ci": "npm-run-all depcruise lint test:all:ci", - "check:full": "npm-run-all --parallel depcruise lint test:all", + "check:full": "npm-run-all --parallel depcruise lint test:cover", "depcruise": "depcruise src test", "depcruise:graph": "npm-run-all --parallel depcruise:graph:*", "depcruise:graph:html": "depcruise src test --output-type dot | dot -T svg | tee docs/dependencygraph.svg | depcruise-wrap-stream-in-html > docs/dependencygraph.html", diff --git a/src/main/lazy-resolver.ts b/src/main/lazy-resolver.ts index 7c7125cf..b729cc1f 100644 --- a/src/main/lazy-resolver.ts +++ b/src/main/lazy-resolver.ts @@ -1,38 +1,48 @@ -import memoize from "lodash/memoize"; -import type { InputType } from "../../types/mscgen"; +import type { InputType, OutputType } from "../../types/mscgen"; const DEFAULT_PARSER = "../parse/mscgenparser"; const DEFAULT_TEXT_RENDERER = "../render/text/ast2mscgen"; -const gLang2Parser = Object.freeze({ - mscgen: "../parse/mscgenparser", - xu: "../parse/xuparser", - msgenny: "../parse/msgennyparser", -}) as any; - -const gLang2TextRenderer = Object.freeze({ - mscgen: "../render/text/ast2mscgen", - msgenny: "../render/text/ast2msgenny", - xu: "../render/text/ast2xu", - dot: "../render/text/ast2dot", - doxygen: "../render/text/ast2doxygen", -}) as any; - -export const getParser = memoize((pLanguage: InputType) => { +const gLang2Parser: Map = new Map([ + ["mscgen", "../parse/mscgenparser"], + ["xu", "../parse/xuparser"], + ["msgenny", "../parse/msgennyparser"], +]); + +const gLang2TextRenderer: Map = new Map([ + ["mscgen", "../render/text/ast2mscgen"], + ["msgenny", "../render/text/ast2msgenny"], + ["xu", "../render/text/ast2xu"], + ["dot", "../render/text/ast2dot"], + ["doxygen", "../render/text/ast2doxygen"], +]); + +const parserMap = new Map(); +export function getParser (pLanguage: InputType) { if (["ast", "json"].indexOf(pLanguage) > -1) { return JSON; } + if (!parserMap.has(pLanguage)) { + parserMap.set(pLanguage, require(gLang2Parser.get(pLanguage) || DEFAULT_PARSER)); + } + return parserMap.get(pLanguage); +}; - return require(gLang2Parser[pLanguage] || DEFAULT_PARSER); -}); - -export const getGraphicsRenderer = memoize(() => - require("../render/graphics/renderast") -); +let graphicsRenderer = null; +export function getGraphicsRenderer () { + if (!graphicsRenderer) { + graphicsRenderer = require("../render/graphics/renderast"); + } + return graphicsRenderer; +} -export const getTextRenderer = memoize((pLanguage: InputType) => - require(gLang2TextRenderer[pLanguage] || DEFAULT_TEXT_RENDERER) -); +const textRendererMap = new Map(); +export function getTextRenderer (pLanguage: OutputType) { + if(!textRendererMap.has(pLanguage)) { + textRendererMap.set(pLanguage, require(gLang2TextRenderer.get(pLanguage) || DEFAULT_TEXT_RENDERER)); + } + return textRendererMap.get(pLanguage); +}; /* This file is part of mscgen_js. diff --git a/src/render/graphics/svgutensils.ts b/src/render/graphics/svgutensils.ts index 9a4721ad..8977e92f 100644 --- a/src/render/graphics/svgutensils.ts +++ b/src/render/graphics/svgutensils.ts @@ -1,4 +1,3 @@ -import memoize from "lodash/memoize"; import * as idmanager from "./idmanager"; import type { IBBox } from "./svgelementfactory/geotypes"; import * as svgelementfactory from "./svgelementfactory/index"; @@ -10,6 +9,8 @@ import * as svgelementfactory from "./svgelementfactory/index"; let gDocument: any = {}; const gSvgBBoxerId = idmanager.get("bboxer"); +let gTextHeight = 0; + /* istanbul ignore next */ function _createBBoxerSVG(pId): SVGSVGElement { const lSvg = svgelementfactory.createSVG(pId, idmanager.get()); @@ -84,7 +85,14 @@ export function getBBox(pElement: SVGGElement): IBBox { } } -function _calculateTextHeight(): number { + +/** + * Returns the height in pixels necessary for rendering characters + */ +export function calculateTextHeight(): number { + if (gTextHeight !== 0) { + return gTextHeight; + } /* Uses a string with some characters that tend to stick out * above/ below the current line and an 'astral codepoint' to * determine the text height to use everywhere. @@ -92,12 +100,13 @@ function _calculateTextHeight(): number { * The astral \uD83D\uDCA9 codepoint mainly makes a difference in gecko based * browsers. The string in readable form: ÁjyÎ9ƒ@💩 */ - return getBBox( + gTextHeight = getBBox( svgelementfactory.createText("\u00C1jy\u00CE9\u0192@\uD83D\uDCA9", { x: 0, y: 0, }) ).height; + return gTextHeight } export function removeRenderedSVGFromElement(pElementId: string) { @@ -117,11 +126,6 @@ export const init = (pDocument: Document) => { gDocument = pDocument; }; -/** - * Returns the height in pixels necessary for rendering characters - */ -export const calculateTextHeight = memoize(_calculateTextHeight); - // webkit (at least in Safari Version 6.0.5 (8536.30.1) which is // distibuted with MacOSX 10.8.4) omits the xmlns: and xlink: // namespace prefixes in front of xlink and all hrefs respectively.