pocketpy/resources/js/mermaid.js
2026-03-20 05:23:43 +00:00

3 lines
2.6 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! Retype v4.3.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */
(()=>{var t={9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,n){"use strict";e.J=function(t){if(!t)return r.BLANK_URL;var e,n=a(t.trim());do{e=(n=a(n=i(n).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim())).match(r.ctrlCharactersRegex)||n.match(r.htmlEntitiesRegex)||n.match(r.htmlCtrlEntityRegex)||n.match(r.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var s=n;if(!s)return r.BLANK_URL;if(function(t){return r.relativeFirstCharacters.indexOf(t[0])>-1}(s))return s;var o=s.trimStart(),l=o.match(r.urlSchemeRegex);if(!l)return s;var c=l[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(c))return r.BLANK_URL;var h=o.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return r.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h};var r=n(9119);function i(t){return t.replace(r.ctrlCharactersRegex,"").replace(r.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},7799(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},function(t,e,n){"use strict";var r=n(0).LGraphManager;function i(t){r.call(this,t)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},function(t,e,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(t,e,n,i){r.call(this,t,e,n,i)}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i<r.length;i++)null==(n=r[i]).getChild()?(n.moveBy(t,e),n.displacementX+=t,n.displacementY+=e):n.propogateDisplacementToChildren(t,e)},a.prototype.setPred1=function(t){this.pred1=t},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(t){this.next=t},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(t){this.processed=t},a.prototype.isProcessed=function(){return processed},t.exports=a},function(t,e,n){"use strict";var r=n(0).FDLayout,i=n(4),a=n(3),s=n(5),o=n(2),l=n(1),c=n(0).FDLayoutConstants,h=n(0).LayoutConstants,u=n(0).Point,d=n(0).PointD,p=n(0).Layout,f=n(0).Integer,g=n(0).IGeometry,m=n(0).LGraph,y=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var x in v.prototype=Object.create(r.prototype),r)v[x]=r[x];v.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},v.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},v.prototype.newNode=function(t){return new s(this.graphManager,t)},v.prototype.newEdge=function(t){return new o(null,null,t)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=c.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=c.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=c.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return h.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(n));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n<t.length;n++){var r=t[n].rect,i=t[n].id;e[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return e},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===c.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,n=[],r=this.graphManager.getGraphs(),i=r.length;for(e=0;e<i;e++)(t=r[e]).updateConnected(),t.isConnected||(n=n.concat(t.getNodes()));return n},v.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,n=new Set;for(e=0;e<t.length;e++){var r=t[e];if(!n.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new d),r.getBendpoints().push(new d),this.createDummyNodesForBendpoints(r),n.add(r);else{var s=[];if(s=(s=s.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!n.has(s[0])){var o;if(s.length>1)for(o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new d),this.createDummyNodesForBendpoints(l)}s.forEach(function(t){n.add(t)})}}}if(n.size==t.length)break}},v.prototype.positionNodesRadially=function(t){for(var e=new u(0,0),n=Math.ceil(Math.sqrt(t.length)),r=0,i=0,a=0,s=new d(0,0),o=0;o<t.length;o++){o%n==0&&(a=0,i=r,0!=o&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var c=t[o],f=p.findCenterOfTree(c);e.x=a,e.y=i,(s=v.radialLayout(c,f,e)).y>r&&(r=Math.floor(s.y)),a=Math.floor(s.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(h.WORLD_CENTER_X-s.x/2,h.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var i=m.calculateBounds(t),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var s=0;s<t.length;s++)t[s].transform(a);var o=new d(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(o)},v.branchRadialLayout=function(t,e,n,r,i,a){var s=(r-n+1)/2;s<0&&(s+=180);var o=(s+n)%360*g.TWO_PI/360,l=(Math.cos(o),i*Math.cos(o)),c=i*Math.sin(o);t.setCenter(l,c);var h=[],u=(h=h.concat(t.getEdges())).length;null!=e&&u--;for(var d,p=0,f=h.length,m=t.getEdgesBetween(e);m.length>1;){var y=m[0];m.splice(0,1);var x=h.indexOf(y);x>=0&&h.splice(x,1),f--,u--}d=null!=e?(h.indexOf(m[0])+1)%f:0;for(var b=Math.abs(r-n)/u,w=d;p!=u;w=++w%f){var T=h[w].getOtherEnd(t);if(T!=e){var k=(n+p*b)%360,E=(k+b)%360;v.branchRadialLayout(T,t,k,E,i+a,a),p++}}},v.maxDiagonalInTree=function(t){for(var e=f.MIN_VALUE,n=0;n<t.length;n++){var r=t[n].getDiagonal();r>e&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=(o=r[i]).getParent();0!==this.getNodeDegreeWithChildren(o)||null!=a.id&&this.getToBeTiled(a)||n.push(o)}for(i=0;i<n.length;i++){var o,l=(o=n[i]).getParent().id;void 0===e[l]&&(e[l]=[]),e[l]=e[l].concat(o)}Object.keys(e).forEach(function(n){if(e[n].length>1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),a=new s(t.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c<e[n].length;c++){var h=e[n][c];l.remove(h),o.add(h)}}})},v.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)e[this.compoundOrder[n].id]=this.compoundOrder[n],t[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},v.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=t.idToDummyNode[n];e[n]=t.tileNodes(t.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=e[n].width,r.rect.height=e[n].height})},v.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;r<e.length;r++){var i=e[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var n=t.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];e+=this.getNodeDegreeWithChildren(i)}return e},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var n=t[e];null!=n.getChild()&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(t,e,n,r,i){n+=i;for(var a=e+=r,s=0;s<t.rows.length;s++){var o=t.rows[s];e=a;for(var l=0,c=0;c<o.length;c++){var h=o[c];h.rect.x=e,h.rect.y=n,e+=h.rect.width+t.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}n+=l+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var i=e[r];n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var r=0;r<t.length;r++){var i=t[r];0==n.rows.length?this.insertNodeToRow(n,i,0,e):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),e):this.insertNodeToRow(n,i,n.rows.length,e),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(t,e,n,r){var i=r;n==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var a=t.rowWidth[n]+e.rect.width;t.rows[n].length>0&&(a+=t.horizontalPadding),t.rowWidth[n]=a,t.width<a&&(t.width=a);var s=e.rect.height;n>0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[n]&&(o=t.rowHeight[n],t.rowHeight[n]=s,o=t.rowHeight[n]-o),t.height+=o,t.rows[n].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]<n&&(e=r,n=t.rowWidth[r]);return e},v.prototype.getLongestRowIndex=function(t){for(var e=-1,n=Number.MIN_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]>n&&(e=r,n=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,n){var r=this.getShortestRowIndex(t);if(r<0)return!0;var i=t.rowWidth[r];if(i+t.horizontalPadding+e<=t.width)return!0;var a,s,o=0;return t.rowHeight[r]<n&&r>0&&(o=n+t.verticalPadding-t.rowHeight[r]),a=t.width-i>=e+t.horizontalPadding?(t.height+o)/(i+e+t.horizontalPadding):(t.height+o)/t.width,o=n+t.verticalPadding,(s=t.width<e?(t.height+o)/e:(t.height+o)/t.width)<1&&(s=1/s),a<1&&(a=1/a),a<s},v.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),n=t.rowWidth.length-1,r=t.rows[e],i=r[r.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[n]>a&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[n]=t.rowWidth[n]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<r.length;o++)r[o].height>s&&(s=r[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=s,t.rowHeight[n]<i.height+t.verticalPadding&&(t.rowHeight[n]=i.height+t.verticalPadding);var c=t.rowHeight[e]+t.rowHeight[n];t.height+=c-l,this.shiftToLastRow(t)}},v.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var t,e=[],n=!0;n;){var r=this.graphManager.getAllNodes(),i=[];n=!1;for(var a=0;a<r.length;a++)1!=(t=r[a]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(i.push([t,t.getEdges()[0],t.getOwner()]),n=!0);if(1==n){for(var s=[],o=0;o<i.length;o++)1==i[o][0].getEdges().length&&(s.push(i[o]),i[o][0].getOwner().remove(i[o][0]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(t){for(var e,n=t[t.length-1],r=0;r<n.length;r++)e=n[r],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(t){var e,n,r=t[0],i=(n=r==t[1].source?t[1].target:t[1].source).startX,a=n.finishX,s=n.startY,o=n.finishY,l=[0,0,0,0];if(s>0)for(var h=i;h<=a;h++)l[0]+=this.grid[h][s-1].length+this.grid[h][s].length-1;if(a<this.grid.length-1)for(h=s;h<=o;h++)l[1]+=this.grid[a+1][h].length+this.grid[a][h].length-1;if(o<this.grid[0].length-1)for(h=i;h<=a;h++)l[2]+=this.grid[h][o+1].length+this.grid[h][o].length-1;if(i>0)for(h=s;h<=o;h++)l[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var u,d,p=f.MAX_VALUE,g=0;g<l.length;g++)l[g]<p?(p=l[g],u=1,d=g):l[g]==p&&u++;if(3==u&&0==p)0==l[0]&&0==l[1]&&0==l[2]?e=1:0==l[0]&&0==l[1]&&0==l[3]?e=0:0==l[0]&&0==l[2]&&0==l[3]?e=3:0==l[1]&&0==l[2]&&0==l[3]&&(e=2);else if(2==u&&0==p){var m=Math.floor(2*Math.random());e=0==l[0]&&0==l[1]?0==m?0:1:0==l[0]&&0==l[2]?0==m?0:2:0==l[0]&&0==l[3]?0==m?0:3:0==l[1]&&0==l[2]?0==m?1:2:0==l[1]&&0==l[3]?0==m?1:3:0==m?2:3}else e=4==u&&0==p?m=Math.floor(4*Math.random()):d;0==e?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-c.DEFAULT_EDGE_LENGTH-r.getHeight()/2):1==e?r.setCenter(n.getCenterX()+n.getWidth()/2+c.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):2==e?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+c.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-c.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},t.exports=v},function(t,e,n){"use strict";var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),t.exports=r}])},t.exports=r(n(3143))},3457(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,s=n(0).CoSELayout,o=n(0).CoSENode,l=n(0).layoutBase.PointD,c=n(0).layoutBase.DimensionD,h={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function u(t){this.options=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n}(h,t),d(this.options)}var d=function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?r.QUALITY=0:"proof"==t.quality?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};u.prototype.run=function(){var t,e,n=this.options,r=(this.idToLNode={},this.layout=new s),i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=r.newGraphManager();this.gm=a;var o=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(o),r);for(var c=0;c<l.length;c++){var h=l[c],u=this.idToLNode[h.data("source")],d=this.idToLNode[h.data("target")];u!==d&&0==u.getEdgesBetween(d).length&&(a.add(r.newEdge(),u,d).id=h.id())}var p=function(t,e){"number"==typeof t&&(t=e);var n=t.data("id"),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},f=function a(){for(var s,o=function(){n.fit&&n.cy.fit(n.eles,n.padding),t||(t=!0,i.cy.one("layoutready",n.ready),i.cy.trigger({type:"layoutready",layout:i}))},l=i.options.refresh,c=0;c<l&&!s;c++)s=i.stopped||i.layout.tick();if(s)return r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(p),o(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),e&&cancelAnimationFrame(e),void(t=!1);var h=i.layout.getPositionsData();n.eles.nodes().positions(function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var n=t.id(),r=h[n],i=t;null==r&&(r=h[i.data("parent")]||h["DummyCompound_"+i.data("parent")],h[n]=r,null!=(i=i.parent()[0])););return null!=r?{x:r.x,y:r.y}:{x:t.position("x"),y:t.position("y")}}}),o(),e=requestAnimationFrame(a)};return r.addListener("layoutstarted",function(){"during"===i.options.animate&&(e=requestAnimationFrame(f))}),r.runLayout(),"during"!==this.options.animate&&(i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,p),t=!1),this},u.prototype.getTopMostNodes=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].id()]=!0;var r=t.filter(function(t,n){"number"==typeof t&&(t=n);for(var r=t.parent()[0];null!=r;){if(e[r.id()])return!1;r=r.parent()[0]}return!0});return r},u.prototype.processChildrenList=function(t,e,n){for(var r=e.length,i=0;i<r;i++){var a,s,h=e[i],u=h.children(),d=h.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((a=null!=h.outerWidth()&&null!=h.outerHeight()?t.add(new o(n.graphManager,new l(h.position("x")-d.w/2,h.position("y")-d.h/2),new c(parseFloat(d.w),parseFloat(d.h)))):t.add(new o(this.graphManager))).id=h.data("id"),a.paddingLeft=parseInt(h.css("padding")),a.paddingTop=parseInt(h.css("padding")),a.paddingRight=parseInt(h.css("padding")),a.paddingBottom=parseInt(h.css("padding")),this.options.nodeDimensionsIncludeLabels&&h.isParent()){var p=h.boundingBox({includeLabels:!0,includeNodes:!1}).w,f=h.boundingBox({includeLabels:!0,includeNodes:!1}).h,g=h.css("text-halign");a.labelWidth=p,a.labelHeight=f,a.labelPos=g}this.idToLNode[h.data("id")]=a,isNaN(a.rect.x)&&(a.rect.x=0),isNaN(a.rect.y)&&(a.rect.y=0),null!=u&&u.length>0&&(s=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(s,u,n))}},u.prototype.stop=function(){return this.stopped=!0,this};var p=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&p(cytoscape),t.exports=p}])},t.exports=r(n(7799))},8908(t,e,n){var r;r=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach(function(e){Object.keys(e).forEach(function(n){return t[n]=e[n]})}),t}},548:(t,e,n)=>{var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n(140).layoutBase.LinkedList,a={getTopMostNodes:function(t){for(var e={},n=0;n<t.length;n++)e[t[n].id()]=!0;var r=t.filter(function(t,n){"number"==typeof t&&(t=n);for(var r=t.parent()[0];null!=r;){if(e[r.id()])return!1;r=r.parent()[0]}return!0});return r},connectComponents:function(t,e,n,r){var a=new i,s=new Set,o=[],l=void 0,c=void 0,h=void 0,u=!1,d=1,p=[],f=[],g=function(){var r=t.collection();f.push(r);var i=n[0],g=t.collection();g.merge(i).merge(i.descendants().intersection(e)),o.push(i),g.forEach(function(t){a.push(t),s.add(t),r.merge(t)});for(var m=function(){i=a.shift();var c=t.collection();i.neighborhood().nodes().forEach(function(t){e.intersection(i.edgesWith(t)).length>0&&c.merge(t)});for(var h=0;h<c.length;h++){var u=c[h];null==(l=n.intersection(u.union(u.ancestors())))||s.has(l[0])||l.union(l.descendants()).forEach(function(t){a.push(t),s.add(t),r.merge(t),n.has(t)&&o.push(t)})}};0!=a.length;)m();if(r.forEach(function(t){e.intersection(t.connectedEdges()).forEach(function(t){r.has(t.source())&&r.has(t.target())&&r.merge(t)})}),o.length==n.length&&(u=!0),!u||u&&d>1){c=o[0],h=c.connectedEdges().length,o.forEach(function(t){t.connectedEdges().length<h&&(h=t.connectedEdges().length,c=t)}),p.push(c.id());var y=t.collection();y.merge(o[0]),o.forEach(function(t){y.merge(t)}),o=[],n=n.difference(y),d++}};do{g()}while(!u);return r&&p.length>0&&r.set("dummy"+(r.size+1),p),f},relocateComponent:function(t,e,n){if(!n.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if("draft"==n.quality){var l=!0,c=!1,h=void 0;try{for(var u,d=e.nodeIndexes[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var p=u.value,f=r(p,2),g=f[0],m=f[1],y=n.cy.getElementById(g);if(y){var v=y.boundingBox(),x=e.xCoords[m]-v.w/2,b=e.xCoords[m]+v.w/2,w=e.yCoords[m]-v.h/2,T=e.yCoords[m]+v.h/2;x<i&&(i=x),b>a&&(a=b),w<s&&(s=w),T>o&&(o=T)}}}catch(C){c=!0,h=C}finally{try{!l&&d.return&&d.return()}finally{if(c)throw h}}var k=t.x-(a+i)/2,E=t.y-(o+s)/2;e.xCoords=e.xCoords.map(function(t){return t+k}),e.yCoords=e.yCoords.map(function(t){return t+E})}else{Object.keys(e).forEach(function(t){var n=e[t],r=n.getRect().x,l=n.getRect().x+n.getRect().width,c=n.getRect().y,h=n.getRect().y+n.getRect().height;r<i&&(i=r),l>a&&(a=l),c<s&&(s=c),h>o&&(o=h)});var A=t.x-(a+i)/2,_=t.y-(o+s)/2;Object.keys(e).forEach(function(t){var n=e[t];n.setCenter(n.getCenterX()+A,n.getCenterY()+_)})}}},calcBoundingBox:function(t,e,n,r){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=void 0,c=void 0,h=void 0,u=void 0,d=t.descendants().not(":parent"),p=d.length,f=0;f<p;f++){var g=d[f];i>(l=e[r.get(g.id())]-g.width()/2)&&(i=l),a<(c=e[r.get(g.id())]+g.width()/2)&&(a=c),s>(h=n[r.get(g.id())]-g.height()/2)&&(s=h),o<(u=n[r.get(g.id())]+g.height()/2)&&(o=u)}var m={};return m.topLeftX=i,m.topLeftY=s,m.width=a-i,m.height=o-s,m},calcParentsWithoutChildren:function(t,e){var n=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||n.merge(t)}),n}};t.exports=a},816:(t,e,n)=>{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,s=n(140).layoutBase.PointD,o=n(140).layoutBase.DimensionD,l=n(140).layoutBase.LayoutConstants,c=n(140).layoutBase.FDLayoutConstants,h=n(140).CoSEConstants;t.exports={coseLayout:function(t,e){var n=t.cy,u=t.eles,d=u.nodes(),p=u.edges(),f=void 0,g=void 0,m=void 0,y={};t.randomize&&(f=e.nodeIndexes,g=e.xCoords,m=e.yCoords);var v=function(t){return"function"==typeof t},x=function(t,e){return v(t)?t(e):t},b=r.calcParentsWithoutChildren(n,u);null!=t.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(h.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?l.QUALITY=2:l.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!t.randomize,h.ANIMATE=c.ANIMATE=l.ANIMATE=t.animate,h.TILE=t.tile,h.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!t.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),"enforced"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),"cose"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return function t(e,n,i,l){for(var c=n.length,h=0;h<c;h++){var u=n[h],d=null;0==u.intersection(b).length&&(d=u.children());var p=void 0,v=u.layoutDimensions({nodeDimensionsIncludeLabels:l.nodeDimensionsIncludeLabels});if(null!=u.outerWidth()&&null!=u.outerHeight())if(l.randomize)if(u.isParent()){var w=r.calcBoundingBox(u,g,m,f);p=0==u.intersection(b).length?e.add(new a(i.graphManager,new s(w.topLeftX,w.topLeftY),new o(w.width,w.height))):e.add(new a(i.graphManager,new s(w.topLeftX,w.topLeftY),new o(parseFloat(v.w),parseFloat(v.h))))}else p=e.add(new a(i.graphManager,new s(g[f.get(u.id())]-v.w/2,m[f.get(u.id())]-v.h/2),new o(parseFloat(v.w),parseFloat(v.h))));else p=e.add(new a(i.graphManager,new s(u.position("x")-v.w/2,u.position("y")-v.h/2),new o(parseFloat(v.w),parseFloat(v.h))));else p=e.add(new a(this.graphManager));p.id=u.data("id"),p.nodeRepulsion=x(l.nodeRepulsion,u),p.paddingLeft=parseInt(u.css("padding")),p.paddingTop=parseInt(u.css("padding")),p.paddingRight=parseInt(u.css("padding")),p.paddingBottom=parseInt(u.css("padding")),l.nodeDimensionsIncludeLabels&&(p.labelWidth=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,p.labelHeight=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,p.labelPosVertical=u.css("text-valign"),p.labelPosHorizontal=u.css("text-halign")),y[u.data("id")]=p,isNaN(p.rect.x)&&(p.rect.x=0),isNaN(p.rect.y)&&(p.rect.y=0),null!=d&&d.length>0&&t(i.getGraphManager().add(i.newGraph(),p),d,i,l)}}(T.addRoot(),r.getTopMostNodes(d),w,t),function(e,n,r){for(var i=0,a=0,s=0;s<r.length;s++){var o=r[s],l=y[o.data("source")],u=y[o.data("target")];if(l&&u&&l!==u&&0==l.getEdgesBetween(u).length){var d=n.add(e.newEdge(),l,u);d.id=o.id(),d.idealLength=x(t.idealEdgeLength,o),d.edgeElasticity=x(t.edgeElasticity,o),i+=d.idealLength,a++}}null!=t.idealEdgeLength&&(a>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=i/a:v(t.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)}(w,T,p),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(w,t),w.runLayout(),y}}},212:(t,e,n)=>{var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(658),a=n(548),s=n(657).spectralLayout,o=n(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(t){return 4500},idealEdgeLength:function(t){return 50},edgeElasticity:function(t){return.45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=i({},l,e)}return r(t,[{key:"run",value:function(){var t=this.options,e=t.cy,n=t.eles,r=[],i=[],l=void 0,c=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&0!=t.fixedNodeConstraint.length||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&0!=t.alignmentConstraint.vertical.length||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&0!=t.alignmentConstraint.horizontal.length||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&0!=t.relativePlacementConstraint.length||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var h=void 0,u=!1;if(e.layoutUtilities&&t.packComponents&&((h=e.layoutUtilities("get"))||(h=e.layoutUtilities()),u=!0),n.nodes().length>0)if(u){var d=a.getTopMostNodes(t.eles.nodes());if((l=a.connectComponents(e,t.eles,d)).forEach(function(t){var e=t.boundingBox();c.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,r.push(s(t))}),"default"==t.quality||"proof"==t.quality){var p=e.collection();if(t.tile){var f=new Map,g=0,m={nodeIndexes:f,xCoords:[],yCoords:[]},y=[];if(l.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,n){p.merge(t.nodes()[n]),e.isParent()||(m.nodeIndexes.set(t.nodes()[n].id(),g++),m.xCoords.push(t.nodes()[0].position().x),m.yCoords.push(t.nodes()[0].position().y))}),y.push(e))}),p.length>1){var v=p.boundingBox();c.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),l.push(p),r.push(m);for(var x=y.length-1;x>=0;x--)l.splice(y[x],1),r.splice(y[x],1),c.splice(y[x],1)}}l.forEach(function(e,n){t.eles=e,i.push(o(t,r[n])),a.relocateComponent(c[n],i[n],t)})}else l.forEach(function(e,n){a.relocateComponent(c[n],r[n],t)});var b=new Set;if(l.length>1){var w=[],T=n.filter(function(t){return"none"==t.css("display")});l.forEach(function(e,n){var s=void 0;if("draft"==t.quality&&(s=r[n].nodeIndexes),e.nodes().not(T).length>0){var o={edges:[],nodes:[]},l=void 0;e.nodes().not(T).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var c=a.calcBoundingBox(e,r[n].xCoords,r[n].yCoords,s);o.nodes.push({x:c.topLeftX,y:c.topLeftY,width:c.width,height:c.height})}else l=s.get(e.id()),o.nodes.push({x:r[n].xCoords[l]-e.boundingbox().w/2,y:r[n].yCoords[l]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else i[n][e.id()]&&o.nodes.push({x:i[n][e.id()].getLeft(),y:i[n][e.id()].getTop(),width:i[n][e.id()].getWidth(),height:i[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var l=e.source(),c=e.target();if("none"!=l.css("display")&&"none"!=c.css("display"))if("draft"==t.quality){var h=s.get(l.id()),u=s.get(c.id()),d=[],p=[];if(l.isParent()){var f=a.calcBoundingBox(l,r[n].xCoords,r[n].yCoords,s);d.push(f.topLeftX+f.width/2),d.push(f.topLeftY+f.height/2)}else d.push(r[n].xCoords[h]),d.push(r[n].yCoords[h]);if(c.isParent()){var g=a.calcBoundingBox(c,r[n].xCoords,r[n].yCoords,s);p.push(g.topLeftX+g.width/2),p.push(g.topLeftY+g.height/2)}else p.push(r[n].xCoords[u]),p.push(r[n].yCoords[u]);o.edges.push({startX:d[0],startY:d[1],endX:p[0],endY:p[1]})}else i[n][l.id()]&&i[n][c.id()]&&o.edges.push({startX:i[n][l.id()].getCenterX(),startY:i[n][l.id()].getCenterY(),endX:i[n][c.id()].getCenterX(),endY:i[n][c.id()].getCenterY()})}),o.nodes.length>0&&(w.push(o),b.add(n))}});var k=h.packComponents(w,t.randomize).shifts;if("draft"==t.quality)r.forEach(function(t,e){var n=t.xCoords.map(function(t){return t+k[e].dx}),r=t.yCoords.map(function(t){return t+k[e].dy});t.xCoords=n,t.yCoords=r});else{var E=0;b.forEach(function(t){Object.keys(i[t]).forEach(function(e){var n=i[t][e];n.setCenter(n.getCenterX()+k[E].dx,n.getCenterY()+k[E].dy)}),E++})}}}else{var A=t.eles.boundingBox();if(c.push({x:A.x1+A.w/2,y:A.y1+A.h/2}),t.randomize){var _=s(t);r.push(_)}"default"==t.quality||"proof"==t.quality?(i.push(o(t,r[0])),a.relocateComponent(c[0],i[0],t)):a.relocateComponent(c[0],r[0],t)}var C=function(e,n){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=n);var a=void 0,s=void 0,o=e.data("id");return i.forEach(function(t){o in t&&(a={x:t[o].getRect().getCenterX(),y:t[o].getRect().getCenterY()},s=t[o])}),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?a.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(a.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?a.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(a.y-=s.labelHeight/2))),null==a&&(a={x:e.position("x"),y:e.position("y")}),{x:a.x,y:a.y}}var l=void 0;return r.forEach(function(t){var n=t.nodeIndexes.get(e.id());null!=n&&(l={x:t.xCoords[n],y:t.yCoords[n]})}),null==l&&(l={x:e.position("x"),y:e.position("y")}),{x:l.x,y:l.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var S=a.calcParentsWithoutChildren(e,n),R=n.filter(function(t){return"none"==t.css("display")});t.eles=n.not(R),n.nodes().not(":parent").not(R).layoutPositions(this,t,C),S.length>0&&S.forEach(function(t){t.position(C(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=c},657:(t,e,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,n=t.eles,s=n.nodes(),o=n.nodes(":parent"),l=new Map,c=new Map,h=new Map,u=[],d=[],p=[],f=[],g=[],m=[],y=[],v=[],x=void 0,b=1e8,w=1e-9,T=t.piTol,k=t.samplingType,E=t.nodeSeparation,A=void 0,_=function(t,e,n){for(var r=[],i=0,a=0,s=0,o=void 0,l=[],h=0,d=1,p=0;p<x;p++)l[p]=b;for(r[a]=t,l[t]=0;a>=i;){s=r[i++];for(var f=u[s],y=0;y<f.length;y++)l[o=c.get(f[y])]==b&&(l[o]=l[s]+1,r[++a]=o);m[s][e]=l[s]*E}if(n){for(var v=0;v<x;v++)m[v][e]<g[v]&&(g[v]=m[v][e]);for(var w=0;w<x;w++)g[w]>h&&(h=g[w],d=w)}return d};r.connectComponents(e,n,r.getTopMostNodes(s),l),o.forEach(function(t){r.connectComponents(e,n,r.getTopMostNodes(t.descendants().intersection(n)),l)});for(var C=0,S=0;S<s.length;S++)s[S].isParent()||c.set(s[S].id(),C++);var R=!0,L=!1,D=void 0;try{for(var I,N=l.keys()[Symbol.iterator]();!(R=(I=N.next()).done);R=!0){var M=I.value;c.set(M,C++)}}catch(X){L=!0,D=X}finally{try{!R&&N.return&&N.return()}finally{if(L)throw D}}for(var O=0;O<c.size;O++)u[O]=[];o.forEach(function(t){for(var e=t.children().intersection(n);0==e.nodes(":childless").length;)e=e.nodes()[0].children().intersection(n);var r=0,i=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<i&&(i=t.connectedEdges().length,r=e)}),h.set(t.id(),e.nodes(":childless")[r].id())}),s.forEach(function(t){var e=void 0;e=t.isParent()?c.get(h.get(t.id())):c.get(t.id()),t.neighborhood().nodes().forEach(function(r){n.intersection(t.edgesWith(r)).length>0&&(r.isParent()?u[e].push(h.get(r.id())):u[e].push(r.id()))})});var P=function(t){var n=c.get(t),r=void 0;l.get(t).forEach(function(i){r=e.getElementById(i).isParent()?h.get(i):i,u[n].push(r),u[c.get(r)].push(t)})},$=!0,B=!1,F=void 0;try{for(var z,K=l.keys()[Symbol.iterator]();!($=(z=K.next()).done);$=!0)P(z.value)}catch(X){B=!0,F=X}finally{try{!$&&K.return&&K.return()}finally{if(B)throw F}}var q=void 0;if((x=c.size)>2){A=x<t.sampleSize?x:t.sampleSize;for(var U=0;U<x;U++)m[U]=[];for(var j=0;j<A;j++)v[j]=[];return"draft"==t.quality||"all"==t.step?(function(t){var e=void 0;if(t){e=Math.floor(Math.random()*x);for(var n=0;n<x;n++)g[n]=b;for(var r=0;r<A;r++)f[r]=e,e=_(e,r,t)}else{!function(){for(var t=0,e=0,n=!1;e<A;){t=Math.floor(Math.random()*x),n=!1;for(var r=0;r<e;r++)if(f[r]==t){n=!0;break}n||(f[e]=t,e++)}}();for(var i=0;i<A;i++)_(f[i],i,t)}for(var a=0;a<x;a++)for(var s=0;s<A;s++)m[a][s]*=m[a][s];for(var o=0;o<A;o++)y[o]=[];for(var l=0;l<A;l++)for(var c=0;c<A;c++)y[l][c]=m[f[c]][l]}(k),function(){for(var t=a.svd(y),e=t.S,n=t.U,r=t.V,s=e[0]*e[0]*e[0],o=[],l=0;l<A;l++){o[l]=[];for(var c=0;c<A;c++)o[l][c]=0,l==c&&(o[l][c]=e[l]/(e[l]*e[l]+s/(e[l]*e[l])))}v=i.multMat(i.multMat(r,o),i.transpose(n))}(),function(){for(var t=void 0,e=void 0,n=[],r=[],a=[],s=[],o=0;o<x;o++)n[o]=Math.random(),r[o]=Math.random();n=i.normalize(n),r=i.normalize(r);for(var l=w,c=w,h=void 0;;){for(var u=0;u<x;u++)a[u]=n[u];if(n=i.multGamma(i.multL(i.multGamma(a),m,v)),t=i.dotProduct(a,n),n=i.normalize(n),l=i.dotProduct(a,n),(h=Math.abs(l/c))<=1+T&&h>=1)break;c=l}for(var f=0;f<x;f++)a[f]=n[f];for(c=w;;){for(var g=0;g<x;g++)s[g]=r[g];if(s=i.minusOp(s,i.multCons(a,i.dotProduct(a,s))),r=i.multGamma(i.multL(i.multGamma(s),m,v)),e=i.dotProduct(s,r),r=i.normalize(r),l=i.dotProduct(s,r),(h=Math.abs(l/c))<=1+T&&h>=1)break;c=l}for(var y=0;y<x;y++)s[y]=r[y];d=i.multCons(a,Math.sqrt(Math.abs(t))),p=i.multCons(s,Math.sqrt(Math.abs(e)))}(),q={nodeIndexes:c,xCoords:d,yCoords:p}):(c.forEach(function(t,n){d.push(e.getElementById(n).position("x")),p.push(e.getElementById(n).position("y"))}),q={nodeIndexes:c,xCoords:d,yCoords:p}),q}var Y=c.keys(),G=e.getElementById(Y.next().value),W=G.position(),V=G.outerWidth();if(d.push(W.x),p.push(W.y),2==x){var H=e.getElementById(Y.next().value).outerWidth();d.push(W.x+V/2+H/2+t.idealEdgeLength),p.push(W.y)}return q={nodeIndexes:c,xCoords:d,yCoords:p}}}},579:(t,e,n)=>{var r=n(212),i=function(t){t&&t("layout","fcose",r)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},140:e=>{e.exports=t}},n={},r=function t(r){var i=n[r];if(void 0!==i)return i.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(579);return r})()},t.exports=r(n(1709))},1709(t,e,n){var r;r=function(t){return(()=>{"use strict";var e={45:(t,e,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),t.exports=r},806:(t,e,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,n)=>{var r=n(551).FDLayoutEdge;function i(t,e,n){r.call(this,t,e,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},880:(t,e,n)=>{var r=n(551).LGraph;function i(t,e,n){r.call(this,t,e,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},578:(t,e,n)=>{var r=n(551).LGraphManager;function i(t){r.call(this,t)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];t.exports=i},765:(t,e,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),s=n(991),o=n(767),l=n(806),c=n(902),h=n(551).FDLayoutConstants,u=n(551).LayoutConstants,d=n(551).Point,p=n(551).PointD,f=n(551).DimensionD,g=n(551).Layout,m=n(551).Integer,y=n(551).IGeometry,v=n(551).LGraph,x=n(551).Transform,b=n(551).LinkedList;function w(){r.call(this),this.toBeTiled={},this.constraints={}}for(var T in w.prototype=Object.create(r.prototype),r)w[T]=r[T];w.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},w.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},w.prototype.newNode=function(t){return new s(this.graphManager,t)},w.prototype.newEdge=function(t){return new o(null,null,t)},w.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},w.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},w.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},w.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(n));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},w.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},w.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n<t.length;n++){var r=t[n].rect,i=t[n].id;e[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return e},w.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===h.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},w.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},w.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),n=0;n<e.length;n++){var r=e[n];this.idToNodeMap.set(r.id,r)}var i=function e(n){for(var r,i=n.getChild().getNodes(),a=0,s=0;s<i.length;s++)null==(r=i[s]).getChild()?t.fixedNodeSet.has(r.id)&&(a+=100):a+=e(r);return a};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach(function(e){t.fixedNodeSet.add(e.nodeId)}),e=this.graphManager.getAllNodes(),n=0;n<e.length;n++)if(null!=(r=e[n]).getChild()){var a=i(r);a>0&&(r.fixedNodeWeight=a)}if(this.constraints.relativePlacementConstraint){var s=new Map,o=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var c=this.constraints.alignmentConstraint.vertical;for(n=0;n<c.length;n++)this.dummyToNodeForVerticalAlignment.set("dummy"+n,[]),c[n].forEach(function(e){s.set(e,"dummy"+n),t.dummyToNodeForVerticalAlignment.get("dummy"+n).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnHorizontal.add("dummy"+n)})}if(this.constraints.alignmentConstraint.horizontal){var h=this.constraints.alignmentConstraint.horizontal;for(n=0;n<h.length;n++)this.dummyToNodeForHorizontalAlignment.set("dummy"+n,[]),h[n].forEach(function(e){o.set(e,"dummy"+n),t.dummyToNodeForHorizontalAlignment.get("dummy"+n).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnVertical.add("dummy"+n)})}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var e,n,r;for(r=t.length-1;r>=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),n=t[r],t[r]=t[e],t[e]=n;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var n=s.has(e.left)?s.get(e.left):e.left,r=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:e.gap})}else{var i=o.has(e.top)?o.get(e.top):e.top,a=o.has(e.bottom)?o.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(a)||(t.nodesInRelativeVertical.push(a),t.nodeToRelativeConstraintMapVertical.set(a,[]),t.dummyToNodeForHorizontalAlignment.has(a)?t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(a).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:e.gap})}});else{var u=new Map,d=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,n=s.has(t.right)?s.get(t.right):t.right;u.has(e)?u.get(e).push(n):u.set(e,[n]),u.has(n)?u.get(n).push(e):u.set(n,[e])}else{var r=o.has(t.top)?o.get(t.top):t.top,i=o.has(t.bottom)?o.get(t.bottom):t.bottom;d.has(r)?d.get(r).push(i):d.set(r,[i]),d.has(i)?d.get(i).push(r):d.set(i,[r])}});var p=function(t,e){var n=[],r=[],i=new b,a=new Set,s=0;return t.forEach(function(o,l){if(!a.has(l)){n[s]=[],r[s]=!1;var c=l;for(i.push(c),a.add(c),n[s].push(c);0!=i.length;)c=i.shift(),e.has(c)&&(r[s]=!0),t.get(c).forEach(function(t){a.has(t)||(i.push(t),a.add(t),n[s].push(t))});s++}}),{components:n,isFixed:r}},f=p(u,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var g=p(d,t.fixedNodesOnVertical);this.componentsOnVertical=g.components,this.fixedComponentsOnVertical=g.isFixed}}},w.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var n=t.idToNodeMap.get(e.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,n=0;n<e.length;n++){for(var r=0,i=0;i<e[n].length;i++){if(this.fixedNodeSet.has(e[n][i])){r=0;break}r+=this.idToNodeMap.get(e[n][i]).displacementX}var a=r/e[n].length;for(i=0;i<e[n].length;i++)this.idToNodeMap.get(e[n][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal){var s=this.constraints.alignmentConstraint.horizontal;for(n=0;n<s.length;n++){var o=0;for(i=0;i<s[n].length;i++){if(this.fixedNodeSet.has(s[n][i])){o=0;break}o+=this.idToNodeMap.get(s[n][i]).displacementY}var c=o/s[n].length;for(i=0;i<s[n].length;i++)this.idToNodeMap.get(s[n][i]).displacementY=c}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(e){if(!t.fixedNodesOnHorizontal.has(e)){var n=0;n=t.dummyToNodeForVerticalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(e)[0]).displacementX:t.idToNodeMap.get(e).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(e).forEach(function(r){var i;r.right?(i=t.nodeToTempPositionMapHorizontal.get(r.right)-t.nodeToTempPositionMapHorizontal.get(e)-n)<r.gap&&(n-=r.gap-i):(i=t.nodeToTempPositionMapHorizontal.get(e)-t.nodeToTempPositionMapHorizontal.get(r.left)+n)<r.gap&&(n+=r.gap-i)}),t.nodeToTempPositionMapHorizontal.set(e,t.nodeToTempPositionMapHorizontal.get(e)+n),t.dummyToNodeForVerticalAlignment.has(e)?t.dummyToNodeForVerticalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementX=n}):t.idToNodeMap.get(e).displacementX=n}}),this.nodesInRelativeVertical.forEach(function(e){if(!t.fixedNodesOnHorizontal.has(e)){var n=0;n=t.dummyToNodeForHorizontalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(e)[0]).displacementY:t.idToNodeMap.get(e).displacementY,t.nodeToRelativeConstraintMapVertical.get(e).forEach(function(r){var i;r.bottom?(i=t.nodeToTempPositionMapVertical.get(r.bottom)-t.nodeToTempPositionMapVertical.get(e)-n)<r.gap&&(n-=r.gap-i):(i=t.nodeToTempPositionMapVertical.get(e)-t.nodeToTempPositionMapVertical.get(r.top)+n)<r.gap&&(n+=r.gap-i)}),t.nodeToTempPositionMapVertical.set(e,t.nodeToTempPositionMapVertical.get(e)+n),t.dummyToNodeForHorizontalAlignment.has(e)?t.dummyToNodeForHorizontalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementY=n}):t.idToNodeMap.get(e).displacementY=n}});else{for(n=0;n<this.componentsOnHorizontal.length;n++){var h=this.componentsOnHorizontal[n];if(this.fixedComponentsOnHorizontal[n])for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(h[i]).displacementX=0;else{var u=0,d=0;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?(u+=(f=this.dummyToNodeForVerticalAlignment.get(h[i])).length*this.idToNodeMap.get(f[0]).displacementX,d+=f.length):(u+=this.idToNodeMap.get(h[i]).displacementX,d++);var p=u/d;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementX=p}):this.idToNodeMap.get(h[i]).displacementX=p}}for(n=0;n<this.componentsOnVertical.length;n++)if(h=this.componentsOnVertical[n],this.fixedComponentsOnVertical[n])for(i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(h[i]).displacementY=0;else{for(u=0,d=0,i=0;i<h.length;i++){var f;this.dummyToNodeForHorizontalAlignment.has(h[i])?(u+=(f=this.dummyToNodeForHorizontalAlignment.get(h[i])).length*this.idToNodeMap.get(f[0]).displacementY,d+=f.length):(u+=this.idToNodeMap.get(h[i]).displacementY,d++)}for(p=u/d,i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementY=p}):this.idToNodeMap.get(h[i]).displacementY=p}}},w.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,n=[],r=this.graphManager.getGraphs(),i=r.length;for(e=0;e<i;e++)(t=r[e]).updateConnected(),t.isConnected||(n=n.concat(t.getNodes()));return n},w.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,n=new Set;for(e=0;e<t.length;e++){var r=t[e];if(!n.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),n.add(r);else{var s=[];if(s=(s=s.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!n.has(s[0])){var o;if(s.length>1)for(o=0;o<s.length;o++){var l=s[o];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}s.forEach(function(t){n.add(t)})}}}if(n.size==t.length)break}},w.prototype.positionNodesRadially=function(t){for(var e=new d(0,0),n=Math.ceil(Math.sqrt(t.length)),r=0,i=0,a=0,s=new p(0,0),o=0;o<t.length;o++){o%n==0&&(a=0,i=r,0!=o&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var c=t[o],h=g.findCenterOfTree(c);e.x=a,e.y=i,(s=w.radialLayout(c,h,e)).y>r&&(r=Math.floor(s.y)),a=Math.floor(s.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},w.radialLayout=function(t,e,n){var r=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);w.branchRadialLayout(e,null,0,359,0,r);var i=v.calculateBounds(t),a=new x;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var s=0;s<t.length;s++)t[s].transform(a);var o=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(o)},w.branchRadialLayout=function(t,e,n,r,i,a){var s=(r-n+1)/2;s<0&&(s+=180);var o=(s+n)%360*y.TWO_PI/360,l=(Math.cos(o),i*Math.cos(o)),c=i*Math.sin(o);t.setCenter(l,c);var h=[],u=(h=h.concat(t.getEdges())).length;null!=e&&u--;for(var d,p=0,f=h.length,g=t.getEdgesBetween(e);g.length>1;){var m=g[0];g.splice(0,1);var v=h.indexOf(m);v>=0&&h.splice(v,1),f--,u--}d=null!=e?(h.indexOf(g[0])+1)%f:0;for(var x=Math.abs(r-n)/u,b=d;p!=u;b=++b%f){var T=h[b].getOtherEnd(t);if(T!=e){var k=(n+p*x)%360,E=(k+x)%360;w.branchRadialLayout(T,t,k,E,i+a,a),p++}}},w.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,n=0;n<t.length;n++){var r=t[n].getDiagonal();r>e&&(e=r)}return e},w.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},w.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=(o=r[i]).getParent();0!==this.getNodeDegreeWithChildren(o)||null!=a.id&&this.getToBeTiled(a)||n.push(o)}for(i=0;i<n.length;i++){var o,l=(o=n[i]).getParent().id;void 0===e[l]&&(e[l]=[]),e[l]=e[l].concat(o)}Object.keys(e).forEach(function(n){if(e[n].length>1){var r="DummyCompound_"+n;t.memberGroups[r]=e[n];var i=e[n][0].getParent(),a=new s(t.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[r]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c<e[n].length;c++){var h=e[n][c];l.remove(h),o.add(h)}}})},w.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)e[this.compoundOrder[n].id]=this.compoundOrder[n],t[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},w.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=t.idToDummyNode[n];if(e[n]=t.tileNodes(t.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=e[n].width,r.rect.height=e[n].height,r.setCenter(e[n].centerX,e[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var i=r.rect.width,a=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(i+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>i?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):"right"==r.labelPosHorizontal&&r.setWidth(i+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):"bottom"==r.labelPosVertical&&r.setHeight(a+r.labelHeight))}})},w.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,r=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,r,i,a,s)}},w.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(n){var r=t.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,s=r.labelMarginLeft,o=r.labelMarginTop;t.adjustLocations(e[n],r.rect.x,r.rect.y,i,a,s,o)})},w.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},w.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,r=0;r<e.length;r++){var i=e[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},w.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var n=t.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];e+=this.getNodeDegreeWithChildren(i)}return e},w.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},w.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var n=t[e];null!=n.getChild()&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},w.prototype.adjustLocations=function(t,e,n,r,i,a,s){n+=i+s;for(var o=e+=r+a,l=0;l<t.rows.length;l++){var c=t.rows[l];e=o;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=e,d.rect.y=n,e+=d.rect.width+t.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}n+=h+t.verticalPadding}},w.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var i=e[r];if(n.tiledMemberPack[r]=n.tileNodes(t[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,s=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):"right"==i.labelPosHorizontal&&i.setWidth(a+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(s+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>s?(i.rect.y-=(i.labelHeight-s)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-s)/2):"bottom"==i.labelPosVertical&&i.setHeight(s+i.labelHeight))}})},w.prototype.tileNodes=function(t,e){var n=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)<i?r:n},w.prototype.getOrgRatio=function(t){var e=t.width/t.height;return e<1&&(e=1/e),e},w.prototype.calcIdealRowWidth=function(t,e){var n=l.TILING_PADDING_VERTICAL,r=l.TILING_PADDING_HORIZONTAL,i=t.length,a=0,s=0,o=0;t.forEach(function(t){a+=t.getWidth(),s+=t.getHeight(),t.getWidth()>o&&(o=t.getWidth())});var c,h=a/i,u=s/i,d=Math.pow(n-r,2)+4*(h+r)*(u+n)*i,p=(r-n+Math.sqrt(d))/(2*(h+r));e?(c=Math.ceil(p))==p&&c++:c=Math.floor(p);var f=c*(h+r)-r;return o>f&&(f=o),f+=2*r},w.prototype.tileNodesByFavoringDim=function(t,e,n){var r=l.TILING_PADDING_VERTICAL,i=l.TILING_PADDING_HORIZONTAL,a=l.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(s.idealRowWidth=this.calcIdealRowWidth(t,n));var o=function(t){return t.rect.width*t.rect.height},c=function(t,e){return o(e)-o(t)};t.sort(function(t,e){var n=c;return s.idealRowWidth?(n=a)(t.id,e.id):n(t,e)});for(var h=0,u=0,d=0;d<t.length;d++)h+=(p=t[d]).getCenterX(),u+=p.getCenterY();for(s.centerX=h/t.length,s.centerY=u/t.length,d=0;d<t.length;d++){var p=t[d];if(0==s.rows.length)this.insertNodeToRow(s,p,0,e);else if(this.canAddHorizontal(s,p.rect.width,p.rect.height)){var f=s.rows.length-1;s.idealRowWidth||(f=this.getShortestRowIndex(s)),this.insertNodeToRow(s,p,f,e)}else this.insertNodeToRow(s,p,s.rows.length,e);this.shiftToLastRow(s)}return s},w.prototype.insertNodeToRow=function(t,e,n,r){var i=r;n==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var a=t.rowWidth[n]+e.rect.width;t.rows[n].length>0&&(a+=t.horizontalPadding),t.rowWidth[n]=a,t.width<a&&(t.width=a);var s=e.rect.height;n>0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[n]&&(o=t.rowHeight[n],t.rowHeight[n]=s,o=t.rowHeight[n]-o),t.height+=o,t.rows[n].push(e)},w.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]<n&&(e=r,n=t.rowWidth[r]);return e},w.prototype.getLongestRowIndex=function(t){for(var e=-1,n=Number.MIN_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]>n&&(e=r,n=t.rowWidth[r]);return e},w.prototype.canAddHorizontal=function(t,e,n){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var a=t.rowWidth[i];if(a+t.horizontalPadding+e<=t.width)return!0;var s,o,l=0;return t.rowHeight[i]<n&&i>0&&(l=n+t.verticalPadding-t.rowHeight[i]),s=t.width-a>=e+t.horizontalPadding?(t.height+l)/(a+e+t.horizontalPadding):(t.height+l)/t.width,l=n+t.verticalPadding,(o=t.width<e?(t.height+l)/e:(t.height+l)/t.width)<1&&(o=1/o),s<1&&(s=1/s),s<o},w.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),n=t.rowWidth.length-1,r=t.rows[e],i=r[r.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[n]>a&&e!=n){r.splice(-1,1),t.rows[n].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[n]=t.rowWidth[n]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;o<r.length;o++)r[o].height>s&&(s=r[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=s,t.rowHeight[n]<i.height+t.verticalPadding&&(t.rowHeight[n]=i.height+t.verticalPadding);var c=t.rowHeight[e]+t.rowHeight[n];t.height+=c-l,this.shiftToLastRow(t)}},w.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},w.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},w.prototype.reduceTrees=function(){for(var t,e=[],n=!0;n;){var r=this.graphManager.getAllNodes(),i=[];n=!1;for(var a=0;a<r.length;a++)if(1==(t=r[a]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(l.PURE_INCREMENTAL){var s=t.getEdges()[0].getOtherEnd(t),o=new f(t.getCenterX()-s.getCenterX(),t.getCenterY()-s.getCenterY());i.push([t,t.getEdges()[0],t.getOwner(),o])}else i.push([t,t.getEdges()[0],t.getOwner()]);n=!0}if(1==n){for(var c=[],h=0;h<i.length;h++)1==i[h][0].getEdges().length&&(c.push(i[h]),i[h][0].getOwner().remove(i[h][0]));e.push(c),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},w.prototype.growTree=function(t){for(var e,n=t[t.length-1],r=0;r<n.length;r++)e=n[r],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},w.prototype.findPlaceforPrunedNode=function(t){var e,n,r=t[0];if(n=r==t[1].source?t[1].target:t[1].source,l.PURE_INCREMENTAL)r.setCenter(n.getCenterX()+t[3].getWidth(),n.getCenterY()+t[3].getHeight());else{var i=n.startX,a=n.finishX,s=n.startY,o=n.finishY,c=[0,0,0,0];if(s>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][s-1].length+this.grid[u][s].length-1;if(a<this.grid.length-1)for(u=s;u<=o;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(o<this.grid[0].length-1)for(u=i;u<=a;u++)c[2]+=this.grid[u][o+1].length+this.grid[u][o].length-1;if(i>0)for(u=s;u<=o;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d,p,f=m.MAX_VALUE,g=0;g<c.length;g++)c[g]<f?(f=c[g],d=1,p=g):c[g]==f&&d++;if(3==d&&0==f)0==c[0]&&0==c[1]&&0==c[2]?e=1:0==c[0]&&0==c[1]&&0==c[3]?e=0:0==c[0]&&0==c[2]&&0==c[3]?e=3:0==c[1]&&0==c[2]&&0==c[3]&&(e=2);else if(2==d&&0==f){var y=Math.floor(2*Math.random());e=0==c[0]&&0==c[1]?0==y?0:1:0==c[0]&&0==c[2]?0==y?0:2:0==c[0]&&0==c[3]?0==y?0:3:0==c[1]&&0==c[2]?0==y?1:2:0==c[1]&&0==c[3]?0==y?1:3:0==y?2:3}else e=4==d&&0==f?y=Math.floor(4*Math.random()):p;0==e?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-h.DEFAULT_EDGE_LENGTH-r.getHeight()/2):1==e?r.setCenter(n.getCenterX()+n.getWidth()/2+h.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):2==e?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+h.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-h.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())}},t.exports=w},991:(t,e,n)=>{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(t,e,n,i){r.call(this,t,e,n,i)}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(t,e){for(var n,r=this.getChild().getNodes(),i=0;i<r.length;i++)null==(n=r[i]).getChild()?(n.displacementX+=t,n.displacementY+=e):n.propogateDisplacementToChildren(t,e)},a.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(t){this.pred1=t},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(t){this.next=t},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(t){this.processed=t},a.prototype.isProcessed=function(){return processed},t.exports=a},902:(t,e,n)=>{function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=n(806),a=n(551).LinkedList,s=n(551).Matrix,o=n(551).SVD;function l(){}l.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var n=new Map,l=new Map,c=[],h=[],u=t.getAllNodes(),d=0,p=0;p<u.length;p++){var f=u[p];null==f.getChild()&&(l.set(f.id,d++),c.push(f.getCenterX()),h.push(f.getCenterY()),n.set(f.id,f))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=i.DEFAULT_EDGE_LENGTH+n.get(t.left).getWidth()/2+n.get(t.right).getWidth()/2:t.gap=i.DEFAULT_EDGE_LENGTH+n.get(t.top).getHeight()/2+n.get(t.bottom).getHeight()/2)});var g=function(t){var e=0,n=0;return t.forEach(function(t){e+=c[l.get(t)],n+=h[l.get(t)]}),{x:e/t.size,y:n/t.size}},m=function(t,e,n,i,s){var o=new Map;t.forEach(function(t,e){o.set(e,0)}),t.forEach(function(t,e){t.forEach(function(t){o.set(t.id,o.get(t.id)+1)})});var u=new Map,d=new Map,p=new a;o.forEach(function(t,r){0==t?(p.push(r),n||("horizontal"==e?u.set(r,l.has(r)?c[l.get(r)]:i.get(r)):u.set(r,l.has(r)?h[l.get(r)]:i.get(r)))):u.set(r,Number.NEGATIVE_INFINITY),n&&d.set(r,new Set([r]))}),n&&s.forEach(function(t){var r=[];if(t.forEach(function(t){n.has(t)&&r.push(t)}),r.length>0){var a=0;r.forEach(function(t){"horizontal"==e?(u.set(t,l.has(t)?c[l.get(t)]:i.get(t)),a+=u.get(t)):(u.set(t,l.has(t)?h[l.get(t)]:i.get(t)),a+=u.get(t))}),a/=r.length,t.forEach(function(t){n.has(t)||u.set(t,a)})}else{var s=0;t.forEach(function(t){s+="horizontal"==e?l.has(t)?c[l.get(t)]:i.get(t):l.has(t)?h[l.get(t)]:i.get(t)}),s/=t.length,t.forEach(function(t){u.set(t,s)})}});for(var f=function(){var r=p.shift();t.get(r).forEach(function(t){if(u.get(t.id)<u.get(r)+t.gap)if(n&&n.has(t.id)){var a=void 0;if(a="horizontal"==e?l.has(t.id)?c[l.get(t.id)]:i.get(t.id):l.has(t.id)?h[l.get(t.id)]:i.get(t.id),u.set(t.id,a),a<u.get(r)+t.gap){var s=u.get(r)+t.gap-a;d.get(r).forEach(function(t){u.set(t,u.get(t)-s)})}}else u.set(t.id,u.get(r)+t.gap);o.set(t.id,o.get(t.id)-1),0==o.get(t.id)&&p.push(t.id),n&&d.set(t.id,function(t,e){var n=new Set(t),r=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done);r=!0){var l=s.value;n.add(l)}}catch(c){i=!0,a=c}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}(d.get(r),d.get(t.id)))})};0!=p.length;)f();if(n){var g=new Set;t.forEach(function(t,e){0==t.length&&g.add(e)});var m=[];d.forEach(function(t,e){if(g.has(e)){var i=!1,a=!0,s=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var h=l.value;n.has(h)&&(i=!0)}}catch(p){s=!0,o=p}finally{try{!a&&c.return&&c.return()}finally{if(s)throw o}}if(!i){var u=!1,d=void 0;m.forEach(function(e,n){e.has([].concat(r(t))[0])&&(u=!0,d=n)}),u?t.forEach(function(t){m[d].add(t)}):m.push(new Set(t))}}}),m.forEach(function(t,n){var r=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,d=!0,p=!1,f=void 0;try{for(var g,m=t[Symbol.iterator]();!(d=(g=m.next()).done);d=!0){var y=g.value,v=void 0;v="horizontal"==e?l.has(y)?c[l.get(y)]:i.get(y):l.has(y)?h[l.get(y)]:i.get(y);var x=u.get(y);v<r&&(r=v),v>s&&(s=v),x<a&&(a=x),x>o&&(o=x)}}catch(C){p=!0,f=C}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}var b=(r+s)/2-(a+o)/2,w=!0,T=!1,k=void 0;try{for(var E,A=t[Symbol.iterator]();!(w=(E=A.next()).done);w=!0){var _=E.value;u.set(_,u.get(_)+b)}}catch(C){T=!0,k=C}finally{try{!w&&A.return&&A.return()}finally{if(T)throw k}}})}return u},y=function(t){var e=0,n=0,r=0,i=0;if(t.forEach(function(t){t.left?c[l.get(t.left)]-c[l.get(t.right)]>=0?e++:n++:h[l.get(t.top)]-h[l.get(t.bottom)]>=0?r++:i++}),e>n&&r>i)for(var a=0;a<l.size;a++)c[a]=-1*c[a],h[a]=-1*h[a];else if(e>n)for(var s=0;s<l.size;s++)c[s]=-1*c[s];else if(r>i)for(var o=0;o<l.size;o++)h[o]=-1*h[o]},v=function(t){var e=[],n=new a,r=new Set,i=0;return t.forEach(function(a,s){if(!r.has(s)){e[i]=[];var o=s;for(n.push(o),r.add(o),e[i].push(o);0!=n.length;)o=n.shift(),t.get(o).forEach(function(t){r.has(t.id)||(n.push(t.id),r.add(t.id),e[i].push(t.id))});i++}}),e},x=function(t){var e=new Map;return t.forEach(function(t,n){e.set(n,[])}),t.forEach(function(t,n){t.forEach(function(t){e.get(n).push(t),e.get(t.id).push({id:n,gap:t.gap,direction:t.direction})})}),e},b=function(t){var e=new Map;return t.forEach(function(t,n){e.set(n,[])}),t.forEach(function(t,n){t.forEach(function(t){e.get(t.id).push({id:n,gap:t.gap,direction:t.direction})})}),e},w=[],T=[],k=!1,E=!1,A=new Set,_=new Map,C=new Map,S=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach(function(t){A.add(t.nodeId)}),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach(function(t){t.left?(_.has(t.left)?_.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):_.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),_.has(t.right)||_.set(t.right,[])):(_.has(t.top)?_.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):_.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),_.has(t.bottom)||_.set(t.bottom,[]))}),C=x(_),S=v(C)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>1)e.fixedNodeConstraint.forEach(function(t,e){w[e]=[t.position.x,t.position.y],T[e]=[c[l.get(t.nodeId)],h[l.get(t.nodeId)]]}),k=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var n=e.alignmentConstraint.vertical,i=function(e){var i=new Set;n[e].forEach(function(t){i.add(t)});var a=new Set([].concat(r(i)).filter(function(t){return A.has(t)})),s=void 0;s=a.size>0?c[l.get(a.values().next().value)]:g(i).x,n[e].forEach(function(e){w[t]=[s,h[l.get(e)]],T[t]=[c[l.get(e)],h[l.get(e)]],t++})},a=0;a<n.length;a++)i(a);k=!0}if(e.alignmentConstraint.horizontal){for(var s=e.alignmentConstraint.horizontal,o=function(e){var n=new Set;s[e].forEach(function(t){n.add(t)});var i=new Set([].concat(r(n)).filter(function(t){return A.has(t)})),a=void 0;a=i.size>0?c[l.get(i.values().next().value)]:g(n).y,s[e].forEach(function(e){w[t]=[c[l.get(e)],a],T[t]=[c[l.get(e)],h[l.get(e)]],t++})},u=0;u<s.length;u++)o(u);k=!0}e.relativePlacementConstraint&&(E=!0)}();else if(e.relativePlacementConstraint){for(var R=0,L=0,D=0;D<S.length;D++)S[D].length>R&&(R=S[D].length,L=D);if(R<C.size/2)y(e.relativePlacementConstraint),k=!1,E=!1;else{var I=new Map,N=new Map,M=[];S[L].forEach(function(t){_.get(t).forEach(function(e){"horizontal"==e.direction?(I.has(t)?I.get(t).push(e):I.set(t,[e]),I.has(e.id)||I.set(e.id,[]),M.push({left:t,right:e.id})):(N.has(t)?N.get(t).push(e):N.set(t,[e]),N.has(e.id)||N.set(e.id,[]),M.push({top:t,bottom:e.id}))})}),y(M),E=!1;var O=m(I,"horizontal"),P=m(N,"vertical");S[L].forEach(function(t,e){T[e]=[c[l.get(t)],h[l.get(t)]],w[e]=[],O.has(t)?w[e][0]=O.get(t):w[e][0]=c[l.get(t)],P.has(t)?w[e][1]=P.get(t):w[e][1]=h[l.get(t)]}),k=!0}}if(k){for(var $,B=s.transpose(w),F=s.transpose(T),z=0;z<B.length;z++)B[z]=s.multGamma(B[z]),F[z]=s.multGamma(F[z]);var K=s.multMat(B,s.transpose(F)),q=o.svd(K);$=s.multMat(q.V,s.transpose(q.U));for(var U=0;U<l.size;U++){var j=[c[U],h[U]],Y=[$[0][0],$[1][0]],G=[$[0][1],$[1][1]];c[U]=s.dotProduct(j,Y),h[U]=s.dotProduct(j,G)}E&&y(e.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>0){var W={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var n,r,i={x:c[l.get(t.nodeId)],y:h[l.get(t.nodeId)]},a=t.position,s=(r=i,{x:(n=a).x-r.x,y:n.y-r.y});W.x+=s.x,W.y+=s.y}),W.x/=e.fixedNodeConstraint.length,W.y/=e.fixedNodeConstraint.length,c.forEach(function(t,e){c[e]+=W.x}),h.forEach(function(t,e){h[e]+=W.y}),e.fixedNodeConstraint.forEach(function(t){c[l.get(t.nodeId)]=t.position.x,h[l.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var V=e.alignmentConstraint.vertical,H=function(t){var e=new Set;V[t].forEach(function(t){e.add(t)});var n=new Set([].concat(r(e)).filter(function(t){return A.has(t)})),i=void 0;i=n.size>0?c[l.get(n.values().next().value)]:g(e).x,e.forEach(function(t){A.has(t)||(c[l.get(t)]=i)})},X=0;X<V.length;X++)H(X);if(e.alignmentConstraint.horizontal)for(var Z=e.alignmentConstraint.horizontal,Q=function(t){var e=new Set;Z[t].forEach(function(t){e.add(t)});var n=new Set([].concat(r(e)).filter(function(t){return A.has(t)})),i=void 0;i=n.size>0?h[l.get(n.values().next().value)]:g(e).y,e.forEach(function(t){A.has(t)||(h[l.get(t)]=i)})},J=0;J<Z.length;J++)Q(J)}e.relativePlacementConstraint&&function(){var t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,s=new Map,o=new Set,u=new Set;if(A.forEach(function(t){o.add(t),u.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var d=e.alignmentConstraint.vertical,p=function(e){r.set("dummy"+e,[]),d[e].forEach(function(n){t.set(n,"dummy"+e),r.get("dummy"+e).push(n),A.has(n)&&o.add("dummy"+e)}),a.set("dummy"+e,c[l.get(d[e][0])])},f=0;f<d.length;f++)p(f);if(e.alignmentConstraint.horizontal)for(var g=e.alignmentConstraint.horizontal,y=function(t){i.set("dummy"+t,[]),g[t].forEach(function(e){n.set(e,"dummy"+t),i.get("dummy"+t).push(e),A.has(e)&&u.add("dummy"+t)}),s.set("dummy"+t,h[l.get(g[t][0])])},w=0;w<g.length;w++)y(w)}var T=new Map,k=new Map,E=function(e){_.get(e).forEach(function(r){var i=void 0,a=void 0;"horizontal"==r.direction?(i=t.get(e)?t.get(e):e,a=t.get(r.id)?{id:t.get(r.id),gap:r.gap,direction:r.direction}:r,T.has(i)?T.get(i).push(a):T.set(i,[a]),T.has(a.id)||T.set(a.id,[])):(i=n.get(e)?n.get(e):e,a=n.get(r.id)?{id:n.get(r.id),gap:r.gap,direction:r.direction}:r,k.has(i)?k.get(i).push(a):k.set(i,[a]),k.has(a.id)||k.set(a.id,[]))})},C=!0,S=!1,R=void 0;try{for(var L,D=_.keys()[Symbol.iterator]();!(C=(L=D.next()).done);C=!0)E(L.value)}catch(tt){S=!0,R=tt}finally{try{!C&&D.return&&D.return()}finally{if(S)throw R}}var I=x(T),N=x(k),M=v(I),O=v(N),P=b(T),$=b(k),B=[],F=[];M.forEach(function(t,e){B[e]=[],t.forEach(function(t){0==P.get(t).length&&B[e].push(t)})}),O.forEach(function(t,e){F[e]=[],t.forEach(function(t){0==$.get(t).length&&F[e].push(t)})});var z=m(T,"horizontal",o,a,B),K=m(k,"vertical",u,s,F),q=function(t){r.get(t)?r.get(t).forEach(function(e){c[l.get(e)]=z.get(t)}):c[l.get(t)]=z.get(t)},U=!0,j=!1,Y=void 0;try{for(var G,W=z.keys()[Symbol.iterator]();!(U=(G=W.next()).done);U=!0)q(G.value)}catch(tt){j=!0,Y=tt}finally{try{!U&&W.return&&W.return()}finally{if(j)throw Y}}var V=function(t){i.get(t)?i.get(t).forEach(function(e){h[l.get(e)]=K.get(t)}):h[l.get(t)]=K.get(t)},H=!0,X=!1,Z=void 0;try{for(var Q,J=K.keys()[Symbol.iterator]();!(H=(Q=J.next()).done);H=!0)V(Q.value)}catch(tt){X=!0,Z=tt}finally{try{!H&&J.return&&J.return()}finally{if(X)throw Z}}}()}for(var tt=0;tt<u.length;tt++){var et=u[tt];null==et.getChild()&&et.setCenter(c[l.get(et.id)],h[l.get(et.id)])}},t.exports=l},551:e=>{e.exports=t}},n={},r=function t(r){var i=n[r];if(void 0!==i)return i.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(45);return r})()},t.exports=r(n(6679))},6679(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28)}([function(t,e,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(8),a=n(9);function s(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var o in s.prototype=Object.create(r.prototype),r)s[o]=r[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(13),s=n(0),o=n(16),l=n(5);function c(t,e,n,s){null==n&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new a(e.x,e.y,n.width,n.height):new a}for(var h in c.prototype=Object.create(r.prototype),r)c[h]=r[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;n<e.length;n++)e[n].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),n=0;n<e.length;n++)t+=e[n].getNoOfChildren();return 0==t&&(t=1),t},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var t,e,n=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+o.nextDouble()*(r-n)+n;var i=-s.INITIAL_WORLD_BOUNDARY,a=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+o.nextDouble()*(a-i)+i,this.rect.x=t,this.rect.y=e},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),n=t.getBottom()-t.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(n+this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new l(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,n){"use strict";var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(0),s=n(7),o=n(3),l=n(1),c=n(13),h=n(12),u=n(11);function d(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i<r;i++)(a=n[i]).isInterGraph?this.graphManager.remove(a):a.source.owner.remove(a);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){var a;if(null==(a=t))throw"Edge is null!";if(null==a.source||null==a.target)throw"Source and/or target is null!";if(null==a.source.owner||null==a.target.owner||a.source.owner!=this||a.target.owner!=this)throw"Source and/or target owner is invalid!";var s,c=a.source.edges.indexOf(a),h=a.target.edges.indexOf(a);if(!(c>-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},d.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l<o;l++){var c=s[l];r>(t=c.getTop())&&(r=t),a>(e=c.getLeft())&&(a=e)}return r==i.MAX_VALUE?null:(n=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,n,r,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f<p;f++){var g=d[f];t&&null!=g.child&&g.updateBounds(),o>(e=g.getLeft())&&(o=e),l<(n=g.getRight())&&(l=n),h>(r=g.getTop())&&(h=r),u<(a=g.getBottom())&&(u=a)}var m=new c(o,h,l-o,u-h);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},d.calculateBounds=function(t){for(var e,n,r,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d<u;d++){var p=t[d];s>(e=p.getLeft())&&(s=e),o<(n=p.getRight())&&(o=n),l>(r=p.getTop())&&(l=r),h<(a=p.getBottom())&&(h=a)}return new c(s,l,o-s,h-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r<n;r++)t+=e[r].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,n,r=new u,i=new Set,a=this.nodes[0];for(a.withChildren().forEach(function(t){r.push(t),i.add(t)});0!==r.length;)for(var s=(e=(a=r.shift()).getEdges()).length,o=0;o<s;o++)null==(n=e[o].getOtherEndInGraph(a,this))||i.has(n)||n.withChildren().forEach(function(t){r.push(t),i.add(t)});if(this.isConnected=!1,i.size>=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,n){"use strict";var r,i=n(1);function a(t){r=n(6),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var a=(r=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o<s;o++)n=a[o],e.remove(n);var l,c=[];for(s=(c=c.concat(e.getNodes())).length,o=0;o<s;o++)l=c[o],e.remove(l);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof i){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(h=n.source.edges.indexOf(n),n.source.edges.splice(h,1),h=n.target.edges.indexOf(n),n.target.edges.splice(h,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";h=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(h,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),n=e.length,r=0;r<n;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),n=(e.length,0);n<e.length;n++)t=t.concat(e[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var n,r=t.getOwner();null!=(n=r.getParent());){if(n==e)return!0;if(null==(r=n.getOwner()))break}for(r=e.getOwner();null!=(n=r.getParent());){if(n==t)return!0;if(null==(r=n.getOwner()))break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,n,r,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,n=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=n,e!=n){for(r=e.getOwner();null==t.lca;){for(t.targetInLca=n,i=n.getOwner();null==t.lca;){if(i==r){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var n=t.getOwner();null!=n;){for(var r=e.getOwner();null!=r;){if(r==n)return r;r=r.getParent().getOwner()}n=n.getParent().getOwner()}return n},a.prototype.calcInclusionTreeDepths=function(t,e){var n;null==t&&null==e&&(t=this.rootGraph,e=1);for(var r=t.getNodes(),i=r.length,a=0;a<i;a++)(n=r[a]).inclusionTreeDepth=e,null!=n.child&&this.calcInclusionTreeDepths(n.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=[],n=this.edges.length,r=0;r<n;r++)t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(r=0;r<e.length;r++)this.remove(e[r]);return!1},t.exports=a},function(t,e,n){"use strict";var r=n(12);function i(){}i.calcSeparationAmount=function(t,e,n,r){if(!t.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,i),n[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),n[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*n[0],o=n[1]/a;n[0]<o?o=n[0]:s=n[1],n[0]=-1*i[0]*(o/2+r),n[1]=-1*i[1]*(s/2+r)},i.decideDirectionsForOverlappingNodes=function(t,e,n){t.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,t.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(t,e,n){var r=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return n[0]=r,n[1]=i,n[2]=a,n[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),g=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),T=e.getHeightHalf(),k=!1,E=!1;if(r===a){if(i>s)return n[0]=r,n[1]=l,n[2]=a,n[3]=x,!1;if(i<s)return n[0]=r,n[1]=u,n[2]=a,n[3]=m,!1}else if(i===s){if(r>a)return n[0]=o,n[1]=i,n[2]=y,n[3]=s,!1;if(r<a)return n[0]=c,n[1]=i,n[2]=g,n[3]=s,!1}else{var A=t.height/t.width,_=e.height/e.width,C=(s-i)/(a-r),S=void 0,R=void 0,L=void 0,D=void 0,I=void 0,N=void 0;if(-A===C?r>a?(n[0]=h,n[1]=u,k=!0):(n[0]=c,n[1]=l,k=!0):A===C&&(r>a?(n[0]=o,n[1]=l,k=!0):(n[0]=d,n[1]=u,k=!0)),-_===C?a>r?(n[2]=v,n[3]=x,E=!0):(n[2]=y,n[3]=m,E=!0):_===C&&(a>r?(n[2]=g,n[3]=m,E=!0):(n[2]=b,n[3]=x,E=!0)),k&&E)return!1;if(r>a?i>s?(S=this.getCardinalDirection(A,C,4),R=this.getCardinalDirection(_,C,2)):(S=this.getCardinalDirection(-A,C,3),R=this.getCardinalDirection(-_,C,1)):i>s?(S=this.getCardinalDirection(-A,C,1),R=this.getCardinalDirection(-_,C,3)):(S=this.getCardinalDirection(A,C,2),R=this.getCardinalDirection(_,C,4)),!k)switch(S){case 1:D=l,L=r+-f/C,n[0]=L,n[1]=D;break;case 2:L=d,D=i+p*C,n[0]=L,n[1]=D;break;case 3:D=u,L=r+f/C,n[0]=L,n[1]=D;break;case 4:L=h,D=i+-p*C,n[0]=L,n[1]=D}if(!E)switch(R){case 1:N=m,I=a+-T/C,n[2]=I,n[3]=N;break;case 2:I=b,N=s+w*C,n[2]=I,n[3]=N;break;case 3:N=x,I=a+T/C,n[2]=I,n[3]=N;break;case 4:I=v,N=s+-w*C,n[2]=I,n[3]=N}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var a,s,o,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=n.x,y=n.y,v=i.x,x=i.y;return 0===(u=(a=g-p)*(l=m-v)-(s=x-y)*(o=d-f))?null:new r((o*(h=v*y-m*x)-l*(c=f*p-d*g))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n<t?i+=Math.PI:r<e&&(i+=this.TWO_PI)):i=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},i.doIntersect=function(t,e,n,r){var i=t.x,a=t.y,s=e.x,o=e.y,l=n.x,c=n.y,h=r.x,u=r.y,d=(s-i)*(u-c)-(h-l)*(o-a);if(0===d)return!1;var p=((u-c)*(h-i)+(l-h)*(u-a))/d,f=((a-o)*(h-i)+(s-i)*(u-a))/d;return 0<p&&p<1&&0<f&&f<1},i.findCircleLineIntersections=function(t,e,n,r,i,a,s){var o=(n-t)*(n-t)+(r-e)*(r-e),l=2*((t-i)*(n-t)+(e-a)*(r-e)),c=(t-i)*(t-i)+(e-a)*(e-a)-s*s;if(l*l-4*o*c>=0){var h=(-l+Math.sqrt(l*l-4*o*c))/(2*o),u=(-l-Math.sqrt(l*l-4*o*c))/(2*o);return h>=0&&h<=1?[h]:u>=0&&u<=1?[u]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,n){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,e,n,r){return null!==t?t.next=e:r.head=e,null!==n?n.prev=e:r.tail=e,e.prev=t,e.next=n,r.length++,e},s=function(t,e){var n=t.prev,r=t.next;return null!==n?n.next=r:e.head=r,null!==r?r.prev=n:e.tail=n,t.prev=t.next=null,e.length--,t},o=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return n.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return a(e.prev,i(t),e,this)}},{key:"insertAfter",value:function(t,e){return a(e,i(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return a(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return a(e,t,e.next,this)}},{key:"push",value:function(t){return a(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return a(null,i(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,n=this.head;e<t;)n=n.next,e++;return n.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var n=1,r=this.head;n<t;)r=r.next,n++;r.value=e}}}]),t}();t.exports=o},function(t,e,n){"use strict";function r(t,e,n){this.x=null,this.y=null,null==t&&null==e&&null==n?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==n?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==n&&(n=t,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,n){"Point"==t.constructor.name&&null==e&&null==n?(n=t,this.setLocation(n.x,n.y)):"number"==typeof t&&"number"==typeof e&&null==n&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},r.prototype.toString=function(){return(new r).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=n&&null!=r&&(this.x=t,this.y=e,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return null==t&&(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=n(0),a=n(7),s=n(3),o=n(1),l=n(6),c=n(5),h=n(17),u=n(29);function d(t){u.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}d.RANDOM_SEED=1,d.prototype=Object.create(u.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t,t},d.prototype.newGraph=function(t){return new l(null,this.graphManager,t)},d.prototype.newNode=function(t){return new s(this.graphManager,t)},d.prototype.newEdge=function(t){return new o(null,null,t)},d.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var n=this.graphManager.getRoot().getNodes();for(e=0;e<n.length;e++)n[e];this.update(this.graphManager.getRoot())}},d.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){var e=t;if(null!=e.getChild())for(var n=e.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof o){var i=t;null!=i.vGraphObject&&i.vGraphObject.update(i)}else if(t instanceof l){var a=t;null!=a.vGraphObject&&a.vGraphObject.update(a)}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(t){if(null==t)this.transform(new c(0,0));else{var e=new h,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(n.x),e.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i=0;i<r.length;i++)r[i].transform(e)}}},d.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,n,r=t.getNodes(),i=0;i<r.length;i++)null==(n=(e=r[i]).getChild())||0==n.getNodes().length?e.scatter():(this.positionNodesRandomly(n),e.updateBounds())},d.prototype.getFlatForest=function(){for(var t=[],e=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)null!=n[a].getChild()&&(i=!1);if(!i)return t;var s=new Set,o=[],l=new Map,c=[];for(c=c.concat(n);c.length>0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a<u.length;a++){var d=u[a].getOtherEnd(h);if(l.get(h)!=d){if(s.has(d)){e=!1;break}o.push(d),l.set(d,h)}}}if(e){var p=[].concat(r(s));for(t.push(p),a=0;a<p.length;a++){var f=p[a],g=c.indexOf(f);g>-1&&c.splice(g,1)}s=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var s=this.newEdge(null);this.graphManager.add(s,n,a),e.add(a),n=a}return s=this.newEdge(null),this.graphManager.add(s,n,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},d.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var n=t[e];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var s=i[a],o=new c(s.getCenterX(),s.getCenterY()),l=n.bendpoints.get(a);l.x=o.x,l.y=o.y,s.getOwner().remove(s)}this.graphManager.add(n,n.source,n.target)}}},d.transform=function(t,e,n,r){if(null!=n&&null!=r){var i=e;return t<=50?i-=(e-e/n)/50*(50-t):i+=(e*r-e)/50*(t-50),i}var a,s;return t<=50?(a=9*e/500,s=e/10):(a=9*e/50,s=-8*e),a*t+s},d.findCenterOfTree=function(t){var e=[];e=e.concat(t);var n=[],r=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(h=e[s]).getNeighborsList().size;r.set(h,h.getNeighborsList().size),1==o&&n.push(h)}var l=[];for(l=l.concat(n);!i;){var c=[];for(c=c.concat(l),l=[],s=0;s<e.length;s++){var h=e[s],u=e.indexOf(h);u>=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}})}n=n.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(5);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(4),a=n(0),s=n(8),o=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,s,o,l,c=this.getGraphManager().getAllEdges(),h=0;h<c.length;h++)e=(t=c[h]).idealLength,t.isInterGraph&&(r=t.getSource(),s=t.getTarget(),o=t.getSourceInLca().getEstimatedSize(),l=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=o+l-2*a.SIMPLE_NODE_SIZE),n=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+s.getInclusionTreeDepth()-2*n))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,e,n,r,a,s=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),a=new Set,t=0;t<l.length;t++)n=l[t],this.calculateRepulsionForceOfANode(n,a,s,o),a.add(n);else for(t=0;t<l.length;t++)for(n=l[t],e=t+1;e<l.length;e++)r=l[e],n.getOwner()==r.getOwner()&&this.calcRepulsionForce(n,r)},l.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),n=0;n<e.length;n++)t=e[n],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},l.prototype.calcSpringForce=function(t,e){var n,r,i,a,s=t.getSource(),o=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==o.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(n=t.getLength())&&(i=(r=t.edgeElasticity*(n-e))*(t.lengthX/n),a=r*(t.lengthY/n),s.springForceX+=i,s.springForceY+=a,o.springForceX-=i,o.springForceY-=a)},l.prototype.calcRepulsionForce=function(t,e){var n,r,a,l,c,h,u,d=t.getRect(),p=e.getRect(),f=new Array(2),g=new Array(4);if(d.intersects(p)){s.calcSeparationAmount(d,p,f,i.DEFAULT_EDGE_LENGTH/2),h=2*f[0],u=2*f[1];var m=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=m*h,t.repulsionForceY-=m*u,e.repulsionForceX+=m*h,e.repulsionForceY+=m*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(n=p.getCenterX()-d.getCenterX(),r=p.getCenterY()-d.getCenterY()):(s.getIntersection(d,p,g),n=g[2]-g[0],r=g[3]-g[1]),Math.abs(n)<i.MIN_REPULSION_DIST&&(n=o.sign(n)*i.MIN_REPULSION_DIST),Math.abs(r)<i.MIN_REPULSION_DIST&&(r=o.sign(r)*i.MIN_REPULSION_DIST),a=n*n+r*r,l=Math.sqrt(a),h=(c=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*n/l,u=c*r/l,t.repulsionForceX-=h,t.repulsionForceY-=u,e.repulsionForceX+=h,e.repulsionForceY+=u},l.prototype.calcGravitationalForce=function(t){var e,n,r,i,a,s,o,l;n=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,i=t.getCenterX()-n,a=t.getCenterY()-r,s=Math.abs(i)+t.getWidth()/2,o=Math.abs(a)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),n=0;n<e.length;n++)(t=e[n]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var e,n;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=new Array(e),i=0;i<e;i++)r[i]=new Array(n);for(i=0;i<e;i++)for(var a=0;a<n;a++)r[i][a]=new Array;return r},l.prototype.addNodeToGrid=function(t,e,n){var r,i,a,s;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-n)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-n)/this.repulsionRange));for(var o=r;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(r,i,a,s)},l.prototype.updateGrid=function(){var t,e,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<n.length;t++)e=n[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,e,n,r){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&n||r){var a,s=new Set;t.surrounding=new Array;for(var o=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=o.length||c>=o[0].length))for(var h=0;h<o[l][c].length;h++)if(a=o[l][c][h],t.getOwner()==a.getOwner()&&t!=a&&!e.has(a)&&!s.has(a)){var u=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);u<=this.repulsionRange&&d<=this.repulsionRange&&s.add(a)}t.surrounding=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(s))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,e,n){"use strict";var r=n(1),i=n(4);function a(t,e,n){r.call(this,t,e,n),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];t.exports=a},function(t,e,n){"use strict";var r=n(3),i=n(4);function a(t,e,n,a){r.call(this,t,e,n,a),this.nodeRepulsion=i.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];a.prototype.setGridCoordinates=function(t,e,n,r){this.startX=t,this.finishX=e,this.startY=n,this.finishY=r},t.exports=a},function(t,e,n){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,n){"use strict";var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var n=r.createID(t);this.contains(n)||(this.map[n]=e,this.keys.push(t))},i.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},i.prototype.get=function(t){var e=r.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,n){"use strict";var r=n(14);function i(){this.set={}}i.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[r.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[r.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),n=e.length,r=0;r<n;r++)t.push(this.set[e[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,n=0;n<e;n++){var r=t[n];this.add(r)}},t.exports=i},function(t,e,n){"use strict";function r(){}r.multMat=function(t,e){for(var n=[],r=0;r<t.length;r++){n[r]=[];for(var i=0;i<e[0].length;i++){n[r][i]=0;for(var a=0;a<t[0].length;a++)n[r][i]+=t[r][a]*e[a][i]}}return n},r.transpose=function(t){for(var e=[],n=0;n<t[0].length;n++){e[n]=[];for(var r=0;r<t.length;r++)e[n][r]=t[r][n]}return e},r.multCons=function(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=t[r]*e;return n},r.minusOp=function(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=t[r]-e[r];return n},r.dotProduct=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n},r.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},r.normalize=function(t){for(var e=[],n=this.mag(t),r=0;r<t.length;r++)e[r]=t[r]/n;return e},r.multGamma=function(t){for(var e=[],n=0,r=0;r<t.length;r++)n+=t[r];n*=-1/t.length;for(var i=0;i<t.length;i++)e[i]=n+t[i];return e},r.multL=function(t,e,n){for(var r=[],i=[],a=[],s=0;s<e[0].length;s++){for(var o=0,l=0;l<e.length;l++)o+=-.5*e[l][s]*t[l];i[s]=o}for(var c=0;c<n.length;c++){for(var h=0,u=0;u<n.length;u++)h+=n[c][u]*i[u];a[c]=h}for(var d=0;d<e.length;d++){for(var p=0,f=0;f<e[0].length;f++)p+=e[d][f]*a[f];r[d]=p}return r},t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(11),a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof i?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:"_quicksort",value:function(t,e,n){if(e<n){var r=this._partition(t,e,n);this._quicksort(t,e,r),this._quicksort(t,r+1,n)}}},{key:"_partition",value:function(t,e,n){for(var r=this._get(t,e),i=e,a=n;;){for(;this.compareFunction(r,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),r);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}}},{key:"_get",value:function(t,e){return t instanceof i?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,n){t instanceof i?t.set_object_at(e,n):t[e]=n}},{key:"_swap",value:function(t,e,n){var r=this._get(t,e);this._set(t,e,this._get(t,n)),this._set(t,n,r)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}();t.exports=a},function(t,e,n){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var n=[],r=0;r<e[0];r++)n.push(t(e.slice(1)));return n}([this.m,e]),this.V=function(t){return function t(e){if(0==e.length)return 0;for(var n=[],r=0;r<e[0];r++)n.push(t(e.slice(1)));return n}(t)}([this.n,this.n]);for(var n=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.n),i=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),o=0;o<Math.max(a,s);o++){if(o<a){this.s[o]=0;for(var l=o;l<this.m;l++)this.s[o]=r.hypot(this.s[o],t[l][o]);if(0!==this.s[o]){t[o][o]<0&&(this.s[o]=-this.s[o]);for(var c=o;c<this.m;c++)t[c][o]/=this.s[o];t[o][o]+=1}this.s[o]=-this.s[o]}for(var h=o+1;h<this.n;h++){if(function(t,e){return t&&e}(o<a,0!==this.s[o])){for(var u=0,d=o;d<this.m;d++)u+=t[d][o]*t[d][h];u=-u/t[o][o];for(var p=o;p<this.m;p++)t[p][h]+=u*t[p][o]}n[h]=t[o][h]}if(function(t,e){return e}(0,o<a))for(var f=o;f<this.m;f++)this.U[f][o]=t[f][o];if(o<s){n[o]=0;for(var g=o+1;g<this.n;g++)n[o]=r.hypot(n[o],n[g]);if(0!==n[o]){n[o+1]<0&&(n[o]=-n[o]);for(var m=o+1;m<this.n;m++)n[m]/=n[o];n[o+1]+=1}if(n[o]=-n[o],function(t,e){return t&&e}(o+1<this.m,0!==n[o])){for(var y=o+1;y<this.m;y++)i[y]=0;for(var v=o+1;v<this.n;v++)for(var x=o+1;x<this.m;x++)i[x]+=n[v]*t[x][v];for(var b=o+1;b<this.n;b++)for(var w=-n[b]/n[o+1],T=o+1;T<this.m;T++)t[T][b]+=w*i[T]}for(var k=o+1;k<this.n;k++)this.V[k][o]=n[k]}}var E=Math.min(this.n,this.m+1);a<this.n&&(this.s[a]=t[a][a]),this.m<E&&(this.s[E-1]=0),s+1<E&&(n[s]=t[s][E-1]),n[E-1]=0;for(var A=a;A<e;A++){for(var _=0;_<this.m;_++)this.U[_][A]=0;this.U[A][A]=1}for(var C=a-1;C>=0;C--)if(0!==this.s[C]){for(var S=C+1;S<e;S++){for(var R=0,L=C;L<this.m;L++)R+=this.U[L][C]*this.U[L][S];R=-R/this.U[C][C];for(var D=C;D<this.m;D++)this.U[D][S]+=R*this.U[D][C]}for(var I=C;I<this.m;I++)this.U[I][C]=-this.U[I][C];this.U[C][C]=1+this.U[C][C];for(var N=0;N<C-1;N++)this.U[N][C]=0}else{for(var M=0;M<this.m;M++)this.U[M][C]=0;this.U[C][C]=1}for(var O=this.n-1;O>=0;O--){if(function(t,e){return t&&e}(O<s,0!==n[O]))for(var P=O+1;P<e;P++){for(var $=0,B=O+1;B<this.n;B++)$+=this.V[B][O]*this.V[B][P];$=-$/this.V[O+1][O];for(var F=O+1;F<this.n;F++)this.V[F][P]+=$*this.V[F][O]}for(var z=0;z<this.n;z++)this.V[z][O]=0;this.V[O][O]=1}for(var K=E-1,q=Math.pow(2,-52),U=Math.pow(2,-966);E>0;){var j=void 0,Y=void 0;for(j=E-2;j>=-1&&-1!==j;j--)if(Math.abs(n[j])<=U+q*(Math.abs(this.s[j])+Math.abs(this.s[j+1]))){n[j]=0;break}if(j===E-2)Y=4;else{var G=void 0;for(G=E-1;G>=j&&G!==j;G--){var W=(G!==E?Math.abs(n[G]):0)+(G!==j+1?Math.abs(n[G-1]):0);if(Math.abs(this.s[G])<=U+q*W){this.s[G]=0;break}}G===j?Y=3:G===E-1?Y=1:(Y=2,j=G)}switch(j++,Y){case 1:var V=n[E-2];n[E-2]=0;for(var H=E-2;H>=j;H--){var X=r.hypot(this.s[H],V),Z=this.s[H]/X,Q=V/X;this.s[H]=X,H!==j&&(V=-Q*n[H-1],n[H-1]=Z*n[H-1]);for(var J=0;J<this.n;J++)X=Z*this.V[J][H]+Q*this.V[J][E-1],this.V[J][E-1]=-Q*this.V[J][H]+Z*this.V[J][E-1],this.V[J][H]=X}break;case 2:var tt=n[j-1];n[j-1]=0;for(var et=j;et<E;et++){var nt=r.hypot(this.s[et],tt),rt=this.s[et]/nt,it=tt/nt;this.s[et]=nt,tt=-it*n[et],n[et]=rt*n[et];for(var at=0;at<this.m;at++)nt=rt*this.U[at][et]+it*this.U[at][j-1],this.U[at][j-1]=-it*this.U[at][et]+rt*this.U[at][j-1],this.U[at][et]=nt}break;case 3:var st=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[E-1]),Math.abs(this.s[E-2])),Math.abs(n[E-2])),Math.abs(this.s[j])),Math.abs(n[j])),ot=this.s[E-1]/st,lt=this.s[E-2]/st,ct=n[E-2]/st,ht=this.s[j]/st,ut=n[j]/st,dt=((lt+ot)*(lt-ot)+ct*ct)/2,pt=ot*ct*(ot*ct),ft=0;(function(t,e){return t||e})(0!==dt,0!==pt)&&(ft=Math.sqrt(dt*dt+pt),dt<0&&(ft=-ft),ft=pt/(dt+ft));for(var gt=(ht+ot)*(ht-ot)+ft,mt=ht*ut,yt=j;yt<E-1;yt++){var vt=r.hypot(gt,mt),xt=gt/vt,bt=mt/vt;yt!==j&&(n[yt-1]=vt),gt=xt*this.s[yt]+bt*n[yt],n[yt]=xt*n[yt]-bt*this.s[yt],mt=bt*this.s[yt+1],this.s[yt+1]=xt*this.s[yt+1];for(var wt=0;wt<this.n;wt++)vt=xt*this.V[wt][yt]+bt*this.V[wt][yt+1],this.V[wt][yt+1]=-bt*this.V[wt][yt]+xt*this.V[wt][yt+1],this.V[wt][yt]=vt;if(xt=gt/(vt=r.hypot(gt,mt)),bt=mt/vt,this.s[yt]=vt,gt=xt*n[yt]+bt*this.s[yt+1],this.s[yt+1]=-bt*n[yt]+xt*this.s[yt+1],mt=bt*n[yt+1],n[yt+1]=xt*n[yt+1],yt<this.m-1)for(var Tt=0;Tt<this.m;Tt++)vt=xt*this.U[Tt][yt]+bt*this.U[Tt][yt+1],this.U[Tt][yt+1]=-bt*this.U[Tt][yt]+xt*this.U[Tt][yt+1],this.U[Tt][yt]=vt}n[E-2]=gt;break;case 4:if(this.s[j]<=0){this.s[j]=this.s[j]<0?-this.s[j]:0;for(var kt=0;kt<=K;kt++)this.V[kt][j]=-this.V[kt][j]}for(;j<K&&!(this.s[j]>=this.s[j+1]);){var Et=this.s[j];if(this.s[j]=this.s[j+1],this.s[j+1]=Et,j<this.n-1)for(var At=0;At<this.n;At++)Et=this.V[At][j+1],this.V[At][j+1]=this.V[At][j],this.V[At][j]=Et;if(j<this.m-1)for(var _t=0;_t<this.m;_t++)Et=this.U[_t][j+1],this.U[_t][j+1]=this.U[_t][j],this.U[_t][j]=Et;j++}E--}}return{U:this.U,V:this.V,S:this.s}},r.hypot=function(t,e){var n=void 0;return Math.abs(t)>Math.abs(e)?(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)):0!=e?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):n=0,n},t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=[this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty,this.grid[n-1][r]+this.gap_penalty,this.grid[n][r-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[n][r]=i[a[0]],this.tracebackGrid[n][r]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],n=this.tracebackGrid[e.pos[0]][e.pos[1]];n[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),n[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),n[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var n=[],r=-1;-1!==(r=t.indexOf(e,r+1));)n.push(r);return n}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}();t.exports=i},function(t,e,n){"use strict";var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(4),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(5),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(25),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(6),r.LEdge=n(1),r.LGraphManager=n(7),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(27),r.Matrix=n(24),r.SVD=n(26),t.exports=r},function(t,e,n){"use strict";function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];t===r.event&&r.callback(e)}},t.exports=r}])},t.exports=e()},4353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",a="minute",s="hour",o="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),a=n-i<0,s=e.clone().add(r+(a?-1:1),c);return+(-(r+(n-i)/(a?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:u,w:l,d:o,D:d,h:s,m:a,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",b={};b[x]=m;var w="$isDayjsObject",T=function(t){return t instanceof _||!(!t||!t[w])},k=function t(e,n,r){var i;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var o=e.name;b[o]=e,i=o}return!r&&i&&(x=i),i||!r&&x},E=function(t,e){if(T(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},A=v;A.l=k,A.i=T,A.w=function(t,e){return E(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var n=E(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return E(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<E(t)},y.$g=function(t,e,n){return A.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,r=!!A.u(e)||e,h=A.p(t),p=function(t,e){var i=A.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(o)},f=function(t,e){return A.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,m=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case u:return r?p(1,0):p(31,11);case c:return r?p(1,m):p(0,m+1);case l:var x=this.$locale().weekStart||0,b=(g<x?g+7:g)-x;return p(r?y-b:y+(6-b),m);case o:case d:return f(v+"Hours",0);case s:return f(v+"Minutes",1);case a:return f(v+"Seconds",2);case i:return f(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,l=A.p(t),h="set"+(this.$u?"UTC":""),p=(n={},n[o]=h+"Date",n[d]=h+"Date",n[c]=h+"Month",n[u]=h+"FullYear",n[s]=h+"Hours",n[a]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[l],f=l===o?this.$D+(e-this.$W):e;if(l===c||l===u){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[A.p(t)]()},y.add=function(r,h){var d,p=this;r=Number(r);var f=A.p(h),g=function(t){var e=E(p);return A.w(e.date(e.date()+Math.round(t*r)),p)};if(f===c)return this.set(c,this.$M+r);if(f===u)return this.set(u,this.$y+r);if(f===o)return g(1);if(f===l)return g(7);var m=(d={},d[a]=e,d[s]=n,d[i]=t,d)[f]||1,y=this.$d.getTime()+r*m;return A.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=A.z(this),a=this.$H,s=this.$m,o=this.$M,l=n.weekdays,c=n.months,h=n.meridiem,u=function(t,n,i,a){return t&&(t[n]||t(e,r))||i[n].slice(0,a)},d=function(t){return A.s(a%12||12,t,"0")},f=h||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(g,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return A.s(e.$y,4,"0");case"M":return o+1;case"MM":return A.s(o+1,2,"0");case"MMM":return u(n.monthsShort,o,c,3);case"MMMM":return u(c,o);case"D":return e.$D;case"DD":return A.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(n.weekdaysMin,e.$W,l,2);case"ddd":return u(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return A.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(a,s,!0);case"A":return f(a,s,!1);case"m":return String(s);case"mm":return A.s(s,2,"0");case"s":return String(e.$s);case"ss":return A.s(e.$s,2,"0");case"SSS":return A.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,d,p){var f,g=this,m=A.p(d),y=E(r),v=(y.utcOffset()-this.utcOffset())*e,x=this-y,b=function(){return A.m(g,y)};switch(m){case u:f=b()/12;break;case c:f=b();break;case h:f=b()/3;break;case l:f=(x-v)/6048e5;break;case o:f=(x-v)/864e5;break;case s:f=x/n;break;case a:f=x/e;break;case i:f=x/t;break;default:f=x}return p?f:A.a(f)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=k(t,e,!0);return r&&(n.$L=r),n},y.clone=function(){return A.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),C=_.prototype;return E.prototype=C,[["$ms",r],["$s",i],["$m",a],["$H",s],["$W",o],["$M",c],["$y",u],["$D",d]].forEach(function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),E.extend=function(t,e){return t.$i||(t(e,_,E),t.$i=!0),E},E.locale=k,E.isDayjs=T,E.unix=function(t){return E(1e3*t)},E.en=b[x],E.Ls=b,E.p={},E}()},7375(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,r=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return r.bind(this)(t);var i=this.$utils(),a=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return i.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return i.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return i.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return r.bind(this)(a)}}}()},445(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(t){return(t=+t)+(t>68?1900:2e3)},l=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],h=function(t){var e=s[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[a,function(t){this.afternoon=u(t,!1)}],a:[a,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[r,l("day")],Do:[a,function(t){var e=s.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],w:[i,l("week")],ww:[r,l("week")],M:[i,l("month")],MM:[r,l("month")],MMM:[a,function(t){var e=h("months"),n=(h("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(t){this.year=o(t)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function p(n){var r,i;r=n,i=s&&s.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,r){var a=r&&r.toUpperCase();return n||i[r]||t[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=a.length,l=0;l<o;l+=1){var c=a[l],h=d[c],u=h&&h[0],p=h&&h[1];a[l]=p?{regex:u,parser:p}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<o;n+=1){var i=a[n];if("string"==typeof i)r+=i.length;else{var s=i.regex,l=i.parser,c=t.slice(r),h=s.exec(c)[0];l.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,a=t.args;this.$u=r;var o=a[1];if("string"==typeof o){var l=!0===a[2],c=!0===a[3],h=l||c,u=a[2];c&&(u=a[2]),s=this.$locale(),!l&&u&&(s=n.Ls[u]),this.$d=function(t,e,n,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=p(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,f=i.week,g=new Date,m=o||(a||s?1:g.getDate()),y=a||g.getFullYear(),v=0;a&&!s||(v=s>0?s-1:g.getMonth());var x,b=l||0,w=c||0,T=h||0,k=u||0;return d?new Date(Date.UTC(y,v,m,b,w,T,k+60*d.offset*1e3)):n?new Date(Date.UTC(y,v,m,b,w,T,k)):(x=new Date(y,v,m,b,w,T,k),f&&(x=r(x).week(f).toDate()),x)}catch(t){return new Date("")}}(e,o,r,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),s={}}else if(o instanceof Array)for(var d=o.length,f=1;f<=d;f+=1){a[1]=o[f-1];var g=n.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===d&&(this.$d=new Date(""))}else i.call(this,t)}}}()},3522(t){t.exports=function(){"use strict";var t,e,n=1e3,r=6e4,i=36e5,a=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,o=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:o,months:l,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof v},d=function(t,e,n){return new v(t,n,e.$l)},p=function(t){return e.p(t)+"s"},f=function(t){return t<0},g=function(t){return f(t)?Math.ceil(t):Math.floor(t)},m=function(t){return Math.abs(t)},y=function(t,e){return t?f(t)?{negative:!0,format:""+m(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},v=function(){function f(t,e,n){var r=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*h[p(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){r.$d[p(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var i=t.match(c);if(i){var a=i.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var m=f.prototype;return m.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*h[n]},0)},m.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=g(t/o),t%=o,this.$d.months=g(t/l),t%=l,this.$d.days=g(t/a),t%=a,this.$d.hours=g(t/i),t%=i,this.$d.minutes=g(t/r),t%=r,this.$d.seconds=g(t/n),t%=n,this.$d.milliseconds=t},m.toISOString=function(){var t=y(this.$d.years,"Y"),e=y(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=y(n,"D"),i=y(this.$d.hours,"H"),a=y(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var o=y(s,"S"),l=t.negative||e.negative||r.negative||i.negative||a.negative||o.negative,c=i.format||a.format||o.format?"T":"",h=(l?"-":"")+"P"+t.format+e.format+r.format+c+i.format+a.format+o.format;return"P"===h||"-P"===h?"P0D":h},m.toJSON=function(){return this.toISOString()},m.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(s,function(t,e){return e||String(r[t])})},m.as=function(t){return this.$ms/h[p(t)]},m.get=function(t){var e=this.$ms,n=p(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?g(e/h[n]):this.$d[n],e||0},m.add=function(t,e,n){var r;return r=e?t*h[p(e)]:u(t)?t.$ms:d(t,this).$ms,d(this.$ms+r*(n?-1:1),this)},m.subtract=function(t,e){return this.add(t,e,!0)},m.locale=function(t){var e=this.clone();return e.$l=t,e},m.clone=function(){return d(this.$ms,this)},m.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},m.valueOf=function(){return this.asMilliseconds()},m.milliseconds=function(){return this.get("milliseconds")},m.asMilliseconds=function(){return this.as("milliseconds")},m.seconds=function(){return this.get("seconds")},m.asSeconds=function(){return this.as("seconds")},m.minutes=function(){return this.get("minutes")},m.asMinutes=function(){return this.as("minutes")},m.hours=function(){return this.get("hours")},m.asHours=function(){return this.as("hours")},m.days=function(){return this.get("days")},m.asDays=function(){return this.as("days")},m.weeks=function(){return this.get("weeks")},m.asWeeks=function(){return this.as("weeks")},m.months=function(){return this.get("months")},m.asMonths=function(){return this.as("months")},m.years=function(){return this.get("years")},m.asYears=function(){return this.as("years")},f}(),x=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,r,i){t=i,e=i().$utils(),i.duration=function(t,e){var n=i.locale();return d(t,{$l:n},e)},i.isDuration=u;var a=r.prototype.add,s=r.prototype.subtract;r.prototype.add=function(t,e){return u(t)?x(this,t,1):a.bind(this)(t,e)},r.prototype.subtract=function(t,e){return u(t)?x(this,t,-1):s.bind(this)(t,e)}}}()},8313(t){t.exports=function(){"use strict";var t="day";return function(e,n,r){var i=function(e){return e.add(4-e.isoWeekday(),t)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,a,s,o=i(this),l=(n=this.isoWeekYear(),s=4-(a=(this.$u?r.utc:r)().year(n).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return o.diff(l,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var s=a.startOf;a.startOf=function(t,e){var n=this.$utils(),r=!!n.u(e)||e;return"isoweek"===n.p(t)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}()},3143(t){var e;e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=26)}([function(t,e,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(8),a=n(9);function s(t,e,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var o in s.prototype=Object.create(r.prototype),r)s[o]=r[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,n){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(13),s=n(0),o=n(16),l=n(4);function c(t,e,n,s){null==n&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new a(e.x,e.y,n.width,n.height):new a}for(var h in c.prototype=Object.create(r.prototype),r)c[h]=r[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.target==t){if(r.source!=n)throw"Incorrect edge source!";e.push(r)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;n<e.length;n++)e[n].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),n=0;n<e.length;n++)t+=e[n].getNoOfChildren();return 0==t&&(t=1),t},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var t,e,n=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+o.nextDouble()*(r-n)+n;var i=-s.INITIAL_WORLD_BOUNDARY,a=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+o.nextDouble()*(a-i)+i,this.rect.x=t,this.rect.y=e},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),n=t.getBottom()-t.getTop();this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var r=new l(e,n),i=t.inverseTransformPoint(r);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,n){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(0),s=n(6),o=n(3),l=n(1),c=n(13),h=n(12),u=n(11);function d(t,e,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(t,e,n){if(null==e&&null==n){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(i.source=e,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),n!=e&&n.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),r=n.length,i=0;i<r;i++)(a=n[i]).isInterGraph?this.graphManager.remove(a):a.source.owner.remove(a);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof l){var a;if(null==(a=t))throw"Edge is null!";if(null==a.source||null==a.target)throw"Source and/or target is null!";if(null==a.source.owner||null==a.target.owner||a.source.owner!=this||a.target.owner!=this)throw"Source and/or target owner is invalid!";var s,c=a.source.edges.indexOf(a),h=a.target.edges.indexOf(a);if(!(c>-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},d.prototype.updateLeftTop=function(){for(var t,e,n,r=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l<o;l++){var c=s[l];r>(t=c.getTop())&&(r=t),a>(e=c.getLeft())&&(a=e)}return r==i.MAX_VALUE?null:(n=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,n,r,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f<p;f++){var g=d[f];t&&null!=g.child&&g.updateBounds(),o>(e=g.getLeft())&&(o=e),l<(n=g.getRight())&&(l=n),h>(r=g.getTop())&&(h=r),u<(a=g.getBottom())&&(u=a)}var m=new c(o,h,l-o,u-h);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},d.calculateBounds=function(t){for(var e,n,r,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d<u;d++){var p=t[d];s>(e=p.getLeft())&&(s=e),o<(n=p.getRight())&&(o=n),l>(r=p.getTop())&&(l=r),h<(a=p.getBottom())&&(h=a)}return new c(s,l,o-s,h-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,r=0;r<n;r++)t+=e[r].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,n,r=new u,i=new Set,a=this.nodes[0];for(a.withChildren().forEach(function(t){r.push(t),i.add(t)});0!==r.length;)for(var s=(e=(a=r.shift()).getEdges()).length,o=0;o<s;o++)null==(n=e[o].getOtherEndInGraph(a,this))||i.has(n)||n.withChildren().forEach(function(t){r.push(t),i.add(t)});if(this.isConnected=!1,i.size>=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,n){"use strict";var r,i=n(1);function a(t){r=n(5),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(t,e,n,r,i){if(null==n&&null==r&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=n,n=t;var a=(r=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o<s;o++)n=a[o],e.remove(n);var l,c=[];for(s=(c=c.concat(e.getNodes())).length,o=0;o<s;o++)l=c[o],e.remove(l);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof i){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(h=n.source.edges.indexOf(n),n.source.edges.splice(h,1),h=n.target.edges.indexOf(n),n.target.edges.splice(h,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";h=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(h,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),n=e.length,r=0;r<n;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),n=(e.length,0);n<e.length;n++)t=t.concat(e[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var n,r=t.getOwner();null!=(n=r.getParent());){if(n==e)return!0;if(null==(r=n.getOwner()))break}for(r=e.getOwner();null!=(n=r.getParent());){if(n==t)return!0;if(null==(r=n.getOwner()))break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,n,r,i,a=this.getAllEdges(),s=a.length,o=0;o<s;o++)if(e=(t=a[o]).source,n=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=n,e!=n){for(r=e.getOwner();null==t.lca;){for(t.targetInLca=n,i=n.getOwner();null==t.lca;){if(i==r){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var n=t.getOwner();null!=n;){for(var r=e.getOwner();null!=r;){if(r==n)return r;r=r.getParent().getOwner()}n=n.getParent().getOwner()}return n},a.prototype.calcInclusionTreeDepths=function(t,e){var n;null==t&&null==e&&(t=this.rootGraph,e=1);for(var r=t.getNodes(),i=r.length,a=0;a<i;a++)(n=r[a]).inclusionTreeDepth=e,null!=n.child&&this.calcInclusionTreeDepths(n.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,n=0;n<e;n++)if(t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=a},function(t,e,n){"use strict";var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,n){"use strict";var r=n(12);function i(){}i.calcSeparationAmount=function(t,e,n,r){if(!t.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,i),n[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),n[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*n[0],o=n[1]/a;n[0]<o?o=n[0]:s=n[1],n[0]=-1*i[0]*(o/2+r),n[1]=-1*i[1]*(s/2+r)},i.decideDirectionsForOverlappingNodes=function(t,e,n){t.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,t.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(t,e,n){var r=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return n[0]=r,n[1]=i,n[2]=a,n[3]=s,!0;var o=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),g=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),x=e.getBottom(),b=e.getRight(),w=e.getWidthHalf(),T=e.getHeightHalf(),k=!1,E=!1;if(r===a){if(i>s)return n[0]=r,n[1]=l,n[2]=a,n[3]=x,!1;if(i<s)return n[0]=r,n[1]=u,n[2]=a,n[3]=m,!1}else if(i===s){if(r>a)return n[0]=o,n[1]=i,n[2]=y,n[3]=s,!1;if(r<a)return n[0]=c,n[1]=i,n[2]=g,n[3]=s,!1}else{var A=t.height/t.width,_=e.height/e.width,C=(s-i)/(a-r),S=void 0,R=void 0,L=void 0,D=void 0,I=void 0,N=void 0;if(-A===C?r>a?(n[0]=h,n[1]=u,k=!0):(n[0]=c,n[1]=l,k=!0):A===C&&(r>a?(n[0]=o,n[1]=l,k=!0):(n[0]=d,n[1]=u,k=!0)),-_===C?a>r?(n[2]=v,n[3]=x,E=!0):(n[2]=y,n[3]=m,E=!0):_===C&&(a>r?(n[2]=g,n[3]=m,E=!0):(n[2]=b,n[3]=x,E=!0)),k&&E)return!1;if(r>a?i>s?(S=this.getCardinalDirection(A,C,4),R=this.getCardinalDirection(_,C,2)):(S=this.getCardinalDirection(-A,C,3),R=this.getCardinalDirection(-_,C,1)):i>s?(S=this.getCardinalDirection(-A,C,1),R=this.getCardinalDirection(-_,C,3)):(S=this.getCardinalDirection(A,C,2),R=this.getCardinalDirection(_,C,4)),!k)switch(S){case 1:D=l,L=r+-f/C,n[0]=L,n[1]=D;break;case 2:L=d,D=i+p*C,n[0]=L,n[1]=D;break;case 3:D=u,L=r+f/C,n[0]=L,n[1]=D;break;case 4:L=h,D=i+-p*C,n[0]=L,n[1]=D}if(!E)switch(R){case 1:N=m,I=a+-T/C,n[2]=I,n[3]=N;break;case 2:I=b,N=s+w*C,n[2]=I,n[3]=N;break;case 3:N=x,I=a+T/C,n[2]=I,n[3]=N;break;case 4:I=v,N=s+-w*C,n[2]=I,n[3]=N}}return!1},i.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},i.getIntersection=function(t,e,n,i){if(null==i)return this.getIntersection2(t,e,n);var a,s,o,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=n.x,y=n.y,v=i.x,x=i.y;return 0===(u=(a=g-p)*(l=m-v)-(s=x-y)*(o=d-f))?null:new r((o*(h=v*y-m*x)-l*(c=f*p-d*g))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,n,r){var i=void 0;return t!==n?(i=Math.atan((r-e)/(n-t)),n<t?i+=Math.PI:r<e&&(i+=this.TWO_PI)):i=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},i.doIntersect=function(t,e,n,r){var i=t.x,a=t.y,s=e.x,o=e.y,l=n.x,c=n.y,h=r.x,u=r.y,d=(s-i)*(u-c)-(h-l)*(o-a);if(0===d)return!1;var p=((u-c)*(h-i)+(l-h)*(u-a))/d,f=((a-o)*(h-i)+(s-i)*(u-a))/d;return 0<p&&p<1&&0<f&&f<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,n){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,e,n,r){return null!==t?t.next=e:r.head=e,null!==n?n.prev=e:r.tail=e,e.prev=t,e.next=n,r.length++,e},s=function(t,e){var n=t.prev,r=t.next;return null!==n?n.next=r:e.head=r,null!==r?r.prev=n:e.tail=n,t.prev=t.next=null,e.length--,t},o=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return n.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return a(e.prev,i(t),e,this)}},{key:"insertAfter",value:function(t,e){return a(e,i(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return a(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return a(e,t,e.next,this)}},{key:"push",value:function(t){return a(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return a(null,i(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,n=this.head;e<t;)n=n.next,e++;return n.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var n=1,r=this.head;n<t;)r=r.next,n++;r.value=e}}}]),t}();t.exports=o},function(t,e,n){"use strict";function r(t,e,n){this.x=null,this.y=null,null==t&&null==e&&null==n?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==n?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==n&&(n=t,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,n){"Point"==t.constructor.name&&null==e&&null==n?(n=t,this.setLocation(n.x,n.y)):"number"==typeof t&&"number"==typeof e&&null==n&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},r.prototype.toString=function(){return(new r).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=n&&null!=r&&(this.x=t,this.y=e,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return null==t&&(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=n(0),a=n(6),s=n(3),o=n(1),l=n(5),c=n(4),h=n(17),u=n(27);function d(t){u.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}d.RANDOM_SEED=1,d.prototype=Object.create(u.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t,t},d.prototype.newGraph=function(t){return new l(null,this.graphManager,t)},d.prototype.newNode=function(t){return new s(this.graphManager,t)},d.prototype.newEdge=function(t){return new o(null,null,t)},d.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var n=this.graphManager.getRoot().getNodes();for(e=0;e<n.length;e++)n[e];this.update(this.graphManager.getRoot())}},d.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){var e=t;if(null!=e.getChild())for(var n=e.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof o){var i=t;null!=i.vGraphObject&&i.vGraphObject.update(i)}else if(t instanceof l){var a=t;null!=a.vGraphObject&&a.vGraphObject.update(a)}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(t){if(null==t)this.transform(new c(0,0));else{var e=new h,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(n.x),e.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i=0;i<r.length;i++)r[i].transform(e)}}},d.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,n,r=t.getNodes(),i=0;i<r.length;i++)null==(n=(e=r[i]).getChild())||0==n.getNodes().length?e.scatter():(this.positionNodesRandomly(n),e.updateBounds())},d.prototype.getFlatForest=function(){for(var t=[],e=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)null!=n[a].getChild()&&(i=!1);if(!i)return t;var s=new Set,o=[],l=new Map,c=[];for(c=c.concat(n);c.length>0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a<u.length;a++){var d=u[a].getOtherEnd(h);if(l.get(h)!=d){if(s.has(d)){e=!1;break}o.push(d),l.set(d,h)}}}if(e){var p=[].concat(r(s));for(t.push(p),a=0;a<p.length;a++){var f=p[a],g=c.indexOf(f);g>-1&&c.splice(g,1)}s=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var s=this.newEdge(null);this.graphManager.add(s,n,a),e.add(a),n=a}return s=this.newEdge(null),this.graphManager.add(s,n,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},d.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var n=t[e];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var s=i[a],o=new c(s.getCenterX(),s.getCenterY()),l=n.bendpoints.get(a);l.x=o.x,l.y=o.y,s.getOwner().remove(s)}this.graphManager.add(n,n.source,n.target)}}},d.transform=function(t,e,n,r){if(null!=n&&null!=r){var i=e;return t<=50?i-=(e-e/n)/50*(50-t):i+=(e*r-e)/50*(t-50),i}var a,s;return t<=50?(a=9*e/500,s=e/10):(a=9*e/50,s=-8*e),a*t+s},d.findCenterOfTree=function(t){var e=[];e=e.concat(t);var n=[],r=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var s=0;s<e.length;s++){var o=(h=e[s]).getNeighborsList().size;r.set(h,h.getNeighborsList().size),1==o&&n.push(h)}var l=[];for(l=l.concat(n);!i;){var c=[];for(c=c.concat(l),l=[],s=0;s<e.length;s++){var h=e[s],u=e.indexOf(h);u>=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(n.indexOf(t)<0){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}})}n=n.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,n){"use strict";var r=n(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},i.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},i.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},i.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},i.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,n){"use strict";var r=n(15),i=n(7),a=n(0),s=n(8),o=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,r,s,o,l=this.getGraphManager().getAllEdges(),c=0;c<l.length;c++)(t=l[c]).idealLength=this.idealEdgeLength,t.isInterGraph&&(n=t.getSource(),r=t.getTarget(),s=t.getSourceInLca().getEstimatedSize(),o=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=s+o-2*a.SIMPLE_NODE_SIZE),e=t.getLca().getInclusionTreeDepth(),t.idealLength+=i.DEFAULT_EDGE_LENGTH*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*e))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,e,n,r,a,s=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),a=new Set,t=0;t<l.length;t++)n=l[t],this.calculateRepulsionForceOfANode(n,a,s,o),a.add(n);else for(t=0;t<l.length;t++)for(n=l[t],e=t+1;e<l.length;e++)r=l[e],n.getOwner()==r.getOwner()&&this.calcRepulsionForce(n,r)},l.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),n=0;n<e.length;n++)t=e[n],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},l.prototype.calcSpringForce=function(t,e){var n,r,i,a,s=t.getSource(),o=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==o.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(n=t.getLength())&&(i=(r=this.springConstant*(n-e))*(t.lengthX/n),a=r*(t.lengthY/n),s.springForceX+=i,s.springForceY+=a,o.springForceX-=i,o.springForceY-=a)},l.prototype.calcRepulsionForce=function(t,e){var n,r,a,l,c,h,u,d=t.getRect(),p=e.getRect(),f=new Array(2),g=new Array(4);if(d.intersects(p)){s.calcSeparationAmount(d,p,f,i.DEFAULT_EDGE_LENGTH/2),h=2*f[0],u=2*f[1];var m=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=m*h,t.repulsionForceY-=m*u,e.repulsionForceX+=m*h,e.repulsionForceY+=m*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(n=p.getCenterX()-d.getCenterX(),r=p.getCenterY()-d.getCenterY()):(s.getIntersection(d,p,g),n=g[2]-g[0],r=g[3]-g[1]),Math.abs(n)<i.MIN_REPULSION_DIST&&(n=o.sign(n)*i.MIN_REPULSION_DIST),Math.abs(r)<i.MIN_REPULSION_DIST&&(r=o.sign(r)*i.MIN_REPULSION_DIST),a=n*n+r*r,l=Math.sqrt(a),h=(c=this.repulsionConstant*t.noOfChildren*e.noOfChildren/a)*n/l,u=c*r/l,t.repulsionForceX-=h,t.repulsionForceY-=u,e.repulsionForceX+=h,e.repulsionForceY+=u},l.prototype.calcGravitationalForce=function(t){var e,n,r,i,a,s,o,l;n=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,i=t.getCenterX()-n,a=t.getCenterY()-r,s=Math.abs(i)+t.getWidth()/2,o=Math.abs(a)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),n=0;n<e.length;n++)(t=e[n]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var e,n;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=new Array(e),i=0;i<e;i++)r[i]=new Array(n);for(i=0;i<e;i++)for(var a=0;a<n;a++)r[i][a]=new Array;return r},l.prototype.addNodeToGrid=function(t,e,n){var r,i,a,s;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-n)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-n)/this.repulsionRange));for(var o=r;o<=i;o++)for(var l=a;l<=s;l++)this.grid[o][l].push(t),t.setGridCoordinates(r,i,a,s)},l.prototype.updateGrid=function(){var t,e,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<n.length;t++)e=n[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,e,n,r){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&n||r){var a,s=new Set;t.surrounding=new Array;for(var o=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=o.length||c>=o[0].length))for(var h=0;h<o[l][c].length;h++)if(a=o[l][c][h],t.getOwner()==a.getOwner()&&t!=a&&!e.has(a)&&!s.has(a)){var u=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);u<=this.repulsionRange&&d<=this.repulsionRange&&s.add(a)}t.surrounding=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(s))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,e,n){"use strict";var r=n(1),i=n(7);function a(t,e,n){r.call(this,t,e,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var s in a.prototype=Object.create(r.prototype),r)a[s]=r[s];t.exports=a},function(t,e,n){"use strict";var r=n(3);function i(t,e,n,i){r.call(this,t,e,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(t,e,n,r){this.startX=t,this.finishX=e,this.startY=n,this.finishY=r},t.exports=i},function(t,e,n){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,n){"use strict";var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var n=r.createID(t);this.contains(n)||(this.map[n]=e,this.keys.push(t))},i.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},i.prototype.get=function(t){var e=r.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,n){"use strict";var r=n(14);function i(){this.set={}}i.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[r.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[r.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),n=e.length,r=0;r<n;r++)t.push(this.set[e[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,n=0;n<e;n++){var r=t[n];this.add(r)}},t.exports=i},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(11),a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof i?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:"_quicksort",value:function(t,e,n){if(e<n){var r=this._partition(t,e,n);this._quicksort(t,e,r),this._quicksort(t,r+1,n)}}},{key:"_partition",value:function(t,e,n){for(var r=this._get(t,e),i=e,a=n;;){for(;this.compareFunction(r,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),r);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}}},{key:"_get",value:function(t,e){return t instanceof i?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,n){t instanceof i?t.set_object_at(e,n):t[e]=n}},{key:"_swap",value:function(t,e,n){var r=this._get(t,e);this._set(t,e,this._get(t,n)),this._set(t,n,r)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}();t.exports=a},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=[this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty,this.grid[n-1][r]+this.gap_penalty,this.grid[n][r-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[n][r]=i[a[0]],this.tracebackGrid[n][r]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],n=this.tracebackGrid[e.pos[0]][e.pos[1]];n[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),n[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),n[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var n=[],r=-1;-1!==(r=t.indexOf(e,r+1));)n.push(r);return n}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}();t.exports=i},function(t,e,n){"use strict";var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),t.exports=r},function(t,e,n){"use strict";function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===t&&r.callback===e&&this.listeners.splice(n,1)}},i.emit=function(t,e){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];t===r.event&&r.callback(e)}},t.exports=r}])},t.exports=e()},2274(t,e,n){"use strict";function r(t,e,n){if(t&&t.length){const[r,i]=e,a=Math.PI/180*n,s=Math.cos(a),o=Math.sin(a);for(const e of t){const[t,n]=e;e[0]=(t-r)*s-(n-i)*o+r,e[1]=(t-r)*o+(n-i)*s+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,n,a=1){const s=n,o=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,c=[0,0];if(s)for(const i of l)r(i,c,s);const h=function(t,e,n){const r=[];for(const h of t){const t=[...h];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}const a=[];e=Math.max(e,.1);const s=[];for(const i of r)for(let t=0;t<i.length-1;t++){const e=i[t],n=i[t+1];if(e[1]!==n[1]){const t=Math.min(e[1],n[1]);s.push({ymin:t,ymax:Math.max(e[1],n[1]),x:t===e[1]?e[0]:n[0],islope:(n[0]-e[0])/(n[1]-e[1])})}}if(s.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return a;let o=[],l=s[0].ymin,c=0;for(;o.length||s.length;){if(s.length){let t=-1;for(let e=0;e<s.length&&!(s[e].ymin>l);e++)t=e;s.splice(0,t+1).forEach(t=>{o.push({s:l,edge:t})})}if(o=o.filter(t=>!(t.edge.ymax<=l)),o.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||c%e==0)&&o.length>1)for(let t=0;t<o.length;t+=2){const e=t+1;if(e>=o.length)break;const n=o[t].edge,r=o[e].edge;a.push([[Math.round(n.x),l],[Math.round(r.x),l]])}l+=n,o.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),c++}return a}(l,o,a);if(s){for(const t of l)r(t,c,-s);!function(t,e,n){const i=[];t.forEach(t=>i.push(...t)),r(i,e,n)}(h,c,-s)}return h}function s(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(s=i),a(t,i,r,s||1)}n.d(e,{A:()=>it});class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const n=s(t,e);return{type:"fillSketch",ops:this.renderLines(n,e)}}renderLines(t,e){const n=[];for(const r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}}function l(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}class c extends o{fillPolygons(t,e){let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);const r=s(t,Object.assign({},e,{hachureGap:n})),i=Math.PI/180*e.hachureAngle,a=[],o=.5*n*Math.cos(i),c=.5*n*Math.sin(i);for(const[s,h]of r)l([s,h])&&a.push([[s[0]-o,s[1]+c],[...h]],[[s[0]+o,s[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends o{fillPolygons(t,e){const n=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,r);return n.ops=n.ops.concat(i.ops),n}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const n=s(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(n,e)}dotsOnLines(t,e){const n=[];let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=r/4;for(const s of t){const t=l(s),o=t/r,c=Math.ceil(o)-1,h=t-c*r,u=(s[0][0]+s[1][0])/2-r/4,d=Math.min(s[0][1],s[1][1]);for(let s=0;s<c;s++){const t=d+h+s*r,o=u-a+2*Math.random()*a,l=t-a+2*Math.random()*a,c=this.helper.ellipse(o,l,i,i,e);n.push(...c.ops)}}return{type:"fillSketch",ops:n}}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const n=s(t,e);return{type:"fillSketch",ops:this.dashedLine(n,e)}}dashedLine(t,e){const n=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,i=[];return t.forEach(t=>{const a=l(t),s=Math.floor(a/(n+r)),o=(a+r-s*(n+r))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let l=0;l<s;l++){const t=l*(n+r),a=t+n,s=[c[0]+t*Math.cos(u)+o*Math.cos(u),c[1]+t*Math.sin(u)+o*Math.sin(u)],h=[c[0]+a*Math.cos(u)+o*Math.cos(u),c[1]+a*Math.sin(u)+o*Math.sin(u)];i.push(...this.helper.doubleLineOps(s[0],s[1],h[0],h[1],e))}}),i}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const n=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?n:e.zigzagOffset,i=s(t,e=Object.assign({},e,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(i,r,e)}}zigzagLines(t,e,n){const r=[];return t.forEach(t=>{const i=l(t),a=Math.round(i/(2*e));let s=t[0],o=t[1];s[0]>o[0]&&(s=t[1],o=t[0]);const c=Math.atan((o[1]-s[1])/(o[0]-s[0]));for(let l=0;l<a;l++){const t=2*l*e,i=2*(l+1)*e,a=Math.sqrt(2*Math.pow(e,2)),o=[s[0]+t*Math.cos(c),s[1]+t*Math.sin(c)],h=[s[0]+i*Math.cos(c),s[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c+Math.PI/4),o[1]+a*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(o[0],o[1],u[0],u[1],n),...this.helper.doubleLineOps(u[0],u[1],h[0],h[1],n))}}),r}}const f={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const m={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function y(t,e){return t.type===e}function v(t){const e=[],n=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let r="BOD",i=0,a=n[i];for(;!y(a,2);){let s=0;const o=[];if("BOD"===r){if("M"!==a.text&&"m"!==a.text)return v("M0,0"+t);i++,s=m[a.text],r=a.text}else y(a,1)?s=m[r]:(i++,s=m[a.text],r=a.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let t=i;t<i+s;t++){const e=n[t];if(!y(e,1))throw new Error("Param not a number: "+r+","+e.text);o[o.length]=+e.text}if("number"!=typeof m[r])throw new Error("Bad segment: "+r);{const t={key:r,data:o};e.push(t),i+=s,a=n[i],"M"===r&&(r="L"),"m"===r&&(r="l")}}return e}function x(t){let e=0,n=0,r=0,i=0;const a=[];for(const{key:s,data:o}of t)switch(s){case"M":a.push({key:"M",data:[...o]}),[e,n]=o,[r,i]=o;break;case"m":e+=o[0],n+=o[1],a.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":a.push({key:"L",data:[...o]}),[e,n]=o;break;case"l":e+=o[0],n+=o[1],a.push({key:"L",data:[e,n]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],n=o[5];break;case"c":{const t=o.map((t,r)=>r%2?t+n:t+e);a.push({key:"C",data:t}),e=t[4],n=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],n=o[3];break;case"q":{const t=o.map((t,r)=>r%2?t+n:t+e);a.push({key:"Q",data:t}),e=t[2],n=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],n=o[6];break;case"a":e+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,n]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],n=o[3];break;case"s":{const t=o.map((t,r)=>r%2?t+n:t+e);a.push({key:"S",data:t}),e=t[2],n=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],n=o[1];break;case"t":e+=o[0],n+=o[1],a.push({key:"T",data:[e,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,n=i}return a}function b(t){const e=[];let n="",r=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let t=0,a=0;"C"===n||"S"===n?(t=r+(r-o),a=i+(i-l)):(t=r,a=i),e.push({key:"C",data:[t,a,...h]}),o=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[t,a]=h;let s=0,c=0;"Q"===n||"T"===n?(s=r+(r-o),c=i+(i-l)):(s=r,c=i);const u=r+2*(s-r)/3,d=i+2*(c-i)/3,p=t+2*(s-t)/3,f=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),o=s,l=c,r=t,i=a;break}case"Q":{const[t,n,a,s]=h,c=r+2*(t-r)/3,u=i+2*(n-i)/3,d=a+2*(t-a)/3,p=s+2*(n-s)/3;e.push({key:"C",data:[c,u,d,p,a,s]}),o=t,l=n,r=a,i=s;break}case"A":{const t=Math.abs(h[0]),n=Math.abs(h[1]),a=h[2],s=h[3],o=h[4],l=h[5],c=h[6];0===t||0===n?(e.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c):r===l&&i===c||(T(r,i,l,c,t,n,a,s,o).forEach(function(t){e.push({key:"C",data:t})}),r=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),r=a,i=s}n=c}return e}function w(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function T(t,e,n,r,i,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[t,e]=w(t,e,-h),[n,r]=w(n,r,-h);const s=(t-n)/2,c=(e-r)/2;let u=s*s/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,v=d*y-d*c*c-y*s*s,x=d*c*c+y*s*s,b=(o===l?-1:1)*Math.sqrt(Math.abs(v/x));g=b*i*c/a+(t+n)/2,m=b*-a*s/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),f=Math.asin(parseFloat(((r-m)/a).toFixed(9))),t<g&&(p=Math.PI-p),n<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const t=f,e=n,o=r;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=T(n=g+i*Math.cos(f),r=m+a*Math.sin(f),e,o,i,a,s,0,l,[f,t,g,m])}y=f-p;const v=Math.cos(p),x=Math.sin(p),b=Math.cos(f),k=Math.sin(f),E=Math.tan(y/4),A=4/3*i*E,_=4/3*a*E,C=[t,e],S=[t+A*x,e-_*v],R=[n+A*k,r-_*b],L=[n,r];if(S[0]=2*C[0]-S[0],S[1]=2*C[1]-S[1],c)return[S,R,L].concat(d);{d=[S,R,L].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const n=w(d[e][0],d[e][1],h),r=w(d[e+1][0],d[e+1][1],h),i=w(d[e+2][0],d[e+2][1],h);t.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return t}}const k={randOffset:function(t,e){return P(t,e)},randOffsetWithRange:function(t,e,n){return O(t,e,n)},ellipse:function(t,e,n,r,i){return S(t,e,i,C(n,r,i)).opset},doubleLineOps:function(t,e,n,r,i){return $(t,e,n,r,i,!0)}};function E(t,e,n,r,i){return{type:"path",ops:$(t,e,n,r,i)}}function A(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let e=0;e<r-1;e++)i.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],n));return e&&i.push(...$(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return 2===r?E(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function _(t,e){if(t.length){const n="number"==typeof t[0][0]?[t]:t,r=F(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:F(n[0],1.5*(1+.22*e.roughness),N(e));for(let t=1;t<n.length;t++){const a=n[t];if(a.length){const t=F(a,1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:F(a,1.5*(1+.22*e.roughness),N(e));for(const e of t)"move"!==e.op&&r.push(e);for(const e of n)"move"!==e.op&&i.push(e)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function C(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i;let s=Math.abs(t/2),o=Math.abs(e/2);const l=1-n.curveFitting;return s+=P(s*l,n),o+=P(o*l,n),{increment:a,rx:s,ry:o}}function S(t,e,n,r){const[i,a]=K(r.increment,t,e,r.rx,r.ry,1,r.increment*O(.1,O(.4,1,n),n),n);let s=z(i,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[i]=K(r.increment,t,e,r.rx,r.ry,1.5,0,n),a=z(i,null,n);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function R(t,e,n,r,i,a,s,o,l){const c=t,h=e;let u=Math.abs(n/2),d=Math.abs(r/2);u+=P(.01*u,l),d+=P(.01*d,l);let p=i,f=a;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=q(m,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(m,c,h,u,d,p,f,1.5,l);y.push(...t)}return s&&(o?y.push(...$(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...$(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function L(t,e){const n=b(x(v(t))),r=[];let i=[0,0],a=[0,0];for(const{key:s,data:o}of n)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":r.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,n,i,s,l,c]=o;r.push(...U(t,n,i,s,l,c,a,e)),a=[l,c];break}case"Z":r.push(...$(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:r}}function D(t,e){const n=[];for(const r of t)if(r.length){const t=e.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+P(t,e),r[0][1]+P(t,e)]});for(let a=1;a<i;a++)n.push({op:"lineTo",data:[r[a][0]+P(t,e),r[a][1]+P(t,e)]})}}return{type:"fillPath",ops:n}}function I(t,e){return function(t,e){let n=t.fillStyle||"hachure";if(!f[n])switch(n){case"zigzag":f[n]||(f[n]=new c(e));break;case"cross-hatch":f[n]||(f[n]=new h(e));break;case"dots":f[n]||(f[n]=new u(e));break;case"dashed":f[n]||(f[n]=new d(e));break;case"zigzag-line":f[n]||(f[n]=new p(e));break;default:n="hachure",f[n]||(f[n]=new o(e))}return f[n]}(e,k).fillPolygons(t,e)}function N(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function M(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function O(t,e,n,r=1){return n.roughness*r*(M(n)*(e-t)+t)}function P(t,e,n=1){return O(-t,t,e,n)}function $(t,e,n,r,i,a=!1){const s=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=B(t,e,n,r,i,!0,!1);if(s)return o;const l=B(t,e,n,r,i,!0,!0);return o.concat(l)}function B(t,e,n,r,i,a,s){const o=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*M(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=P(p,i,c),f=P(f,i,c);const g=[],m=()=>P(u,i,c),y=()=>P(h,i,c),v=i.preserveVertices;return a&&(s?g.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):g.push({op:"move",data:[t+(v?0:P(h,i,c)),e+(v?0:P(h,i,c))]})),s?g.push({op:"bcurveTo",data:[p+t+(n-t)*d+m(),f+e+(r-e)*d+m(),p+t+2*(n-t)*d+m(),f+e+2*(r-e)*d+m(),n+(v?0:m()),r+(v?0:m())]}):g.push({op:"bcurveTo",data:[p+t+(n-t)*d+y(),f+e+(r-e)*d+y(),p+t+2*(n-t)*d+y(),f+e+2*(r-e)*d+y(),n+(v?0:y()),r+(v?0:y())]}),g}function F(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+P(e,n),t[0][1]+P(e,n)]),r.push([t[0][0]+P(e,n),t[0][1]+P(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+P(e,n),t[i][1]+P(e,n)]),i===t.length-1&&r.push([t[i][0]+P(e,n),t[i][1]+P(e,n)]);return z(r,null,n)}function z(t,e,n){const r=t.length,i=[];if(r>3){const a=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){const n=t[e];a[0]=[n[0],n[1]],a[1]=[n[0]+(s*t[e+1][0]-s*t[e-1][0])/6,n[1]+(s*t[e+1][1]-s*t[e-1][1])/6],a[2]=[t[e+1][0]+(s*t[e][0]-s*t[e+2][0])/6,t[e+1][1]+(s*t[e][1]-s*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=n.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+P(t,n),e[1]+P(t,n)]})}}else 3===r?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&i.push(...B(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function K(t,e,n,r,i,a,s,o){const l=[],c=[];if(0===o.roughness){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+r*Math.cos(a),n+i*Math.sin(a)];l.push(t),c.push(t)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=P(.5,o)-Math.PI/2;c.push([P(a,o)+e+.9*r*Math.cos(h-t),P(a,o)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let s=h;s<u;s+=t){const t=[P(a,o)+e+r*Math.cos(s),P(a,o)+n+i*Math.sin(s)];l.push(t),c.push(t)}c.push([P(a,o)+e+r*Math.cos(h+2*Math.PI+.5*s),P(a,o)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([P(a,o)+e+.98*r*Math.cos(h+s),P(a,o)+n+.98*i*Math.sin(h+s)]),c.push([P(a,o)+e+.9*r*Math.cos(h+.5*s),P(a,o)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function q(t,e,n,r,i,a,s,o,l){const c=a+P(.1,l),h=[];h.push([P(o,l)+e+.9*r*Math.cos(c-t),P(o,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([P(o,l)+e+r*Math.cos(u),P(o,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),z(h,null,l)}function U(t,e,n,r,i,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let p=0;p<u;p++)0===p?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:P(c[0],o)),s[1]+(d?0:P(c[0],o))]}),h=d?[i,a]:[i+P(c[p],o),a+P(c[p],o)],l.push({op:"bcurveTo",data:[t+P(c[p],o),e+P(c[p],o),n+P(c[p],o),r+P(c[p],o),h[0],h[1]]});return l}function j(t){return[...t]}function Y(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);const i=[],a=1-e;r.push(j(n[0]));for(let t=1;t+2<n.length;t++){const e=n[t];i[0]=[e[0],e[1]],i[1]=[e[0]+(a*n[t+1][0]-a*n[t-1][0])/6,e[1]+(a*n[t+1][1]-a*n[t-1][1])/6],i[2]=[n[t+1][0]+(a*n[t][0]-a*n[t+2][0])/6,n[t+1][1]+(a*n[t][1]-a*n[t+2][1])/6],i[3]=[n[t+1][0],n[t+1][1]],r.push(i[1],i[2],i[3])}}return r}function G(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function W(t,e,n){const r=G(e,n);if(0===r)return G(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),G(t,V(e,n,i))}function V(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function H(t,e,n,r){const i=r||[];if(function(t,e){const n=t[e+0],r=t[e+1],i=t[e+2],a=t[e+3];let s=3*r[0]-2*n[0]-a[0];s*=s;let o=3*r[1]-2*n[1]-a[1];o*=o;let l=3*i[0]-2*a[0]-n[0];l*=l;let c=3*i[1]-2*a[1]-n[1];return c*=c,s<l&&(s=l),o<c&&(o=c),s+o}(t,e)<n){const n=t[e+0];i.length?(a=i[i.length-1],s=n,Math.sqrt(G(a,s))>1&&i.push(n)):i.push(n),i.push(t[e+3])}else{const r=.5,a=t[e+0],s=t[e+1],o=t[e+2],l=t[e+3],c=V(a,s,r),h=V(s,o,r),u=V(o,l,r),d=V(c,h,r),p=V(h,u,r),f=V(d,p,r);H([a,c,d,f],0,n,i),H([f,p,u,l],0,n,i)}var a,s;return i}function X(t,e){return Z(t,0,t.length,e)}function Z(t,e,n,r,i){const a=i||[],s=t[e],o=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const e=W(t[h],s,o);e>l&&(l=e,c=h)}return Math.sqrt(l)>r?(Z(t,e,c+1,r,a),Z(t,c,n,r,a)):(a.length||a.push(s),a.push(o)),a}function Q(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let a=0;a<i;a++)H(t,3*a,e,r);return n&&n>0?Z(r,0,r.length,n):r}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,n){return{shape:t,sets:e||[],options:n||this.defaultOptions}}line(t,e,n,r,i){const a=this._o(i);return this._d("line",[E(t,e,n,r,a)],a)}rectangle(t,e,n,r,i){const a=this._o(i),s=[],o=function(t,e,n,r,i){return function(t,e){return A(t,!0,e)}([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}(t,e,n,r,a);if(a.fill){const i=[[t,e],[t+n,e],[t+n,e+r],[t,e+r]];"solid"===a.fillStyle?s.push(D([i],a)):s.push(I([i],a))}return a.stroke!==J&&s.push(o),this._d("rectangle",s,a)}ellipse(t,e,n,r,i){const a=this._o(i),s=[],o=C(n,r,a),l=S(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){const n=S(t,e,a,o).opset;n.type="fillPath",s.push(n)}else s.push(I([l.estimatedPoints],a));return a.stroke!==J&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,n,r){const i=this.ellipse(t,e,n,n,r);return i.shape="circle",i}linearPath(t,e){const n=this._o(e);return this._d("linearPath",[A(t,!1,n)],n)}arc(t,e,n,r,i,a,s=!1,o){const l=this._o(o),c=[],h=R(t,e,n,r,i,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const o=R(t,e,n,r,i,a,!0,!1,s);o.type="fillPath",c.push(o)}else c.push(function(t,e,n,r,i,a,s){const o=t,l=e;let c=Math.abs(n/2),h=Math.abs(r/2);c+=P(.01*c,s),h+=P(.01*h,s);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/s.curveStepCount,f=[];for(let g=u;g<=d;g+=p)f.push([o+c*Math.cos(g),l+h*Math.sin(g)]);return f.push([o+c*Math.cos(d),l+h*Math.sin(d)]),f.push([o,l]),I([f],s)}(t,e,n,r,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const n=this._o(e),r=[],i=_(t,n);if(n.fill&&n.fill!==J)if("solid"===n.fillStyle){const e=_(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const r of t)r.length<3?e.push(...r):3===r.length?e.push(...Q(Y([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):e.push(...Q(Y(r),10,(1+n.roughness)/2))}e.length&&r.push(I([e],n))}return n.stroke!==J&&r.push(i),this._d("curve",r,n)}polygon(t,e){const n=this._o(e),r=[],i=A(t,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(D([t],n)):r.push(I([t],n))),n.stroke!==J&&r.push(i),this._d("polygon",r,n)}path(t,e){const n=this._o(e),r=[];if(!t)return this._d("path",r,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==J,a=n.stroke!==J,s=!!(n.simplification&&n.simplification<1),o=function(t,e,n){const r=b(x(v(t))),i=[];let a=[],s=[0,0],o=[];const l=()=>{o.length>=4&&a.push(...Q(o,1)),o=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:u,data:d}of r)switch(u){case"M":c(),s=[d[0],d[1]],a.push(s);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!o.length){const t=a.length?a[a.length-1]:s;o.push([t[0],t[1]])}o.push([d[0],d[1]]),o.push([d[2],d[3]]),o.push([d[4],d[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(c(),!n)return i;const h=[];for(const u of i){const t=X(u,n);t.length&&h.push(t)}return h}(t,0,s?4-4*(n.simplification||1):(1+n.roughness)/2),l=L(t,n);if(i)if("solid"===n.fillStyle)if(1===o.length){const e=L(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(D(o,n));else r.push(I(o,n));return a&&(s?o.forEach(t=>{r.push(A(t,!1,n))}):r.push(l)),this._d("path",r,n)}opsToPath(t,e){let n="";for(const r of t.ops){const t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":n+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":n+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":n+=`L${t[0]} ${t[1]} `}}return n.trim()}toPaths(t){const e=t.sets||[],n=t.options||this.defaultOptions,r=[];for(const i of e){let t=null;switch(i.type){case"path":t={d:this.opsToPath(i),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(i),stroke:J,strokeWidth:0,fill:n.fill||J};break;case"fillSketch":t=this.fillSketch(i,n)}t&&r.push(t)}return r}fillSketch(t,e){let n=e.fillWeight;return n<0&&(n=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:n,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(r,a,i,e),r.restore();break}case"fillSketch":this.fillSketch(r,a,n)}}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=r,this._drawToContext(t,e,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,n,r="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof n&&n>=0?i.data.map(t=>+t.toFixed(n)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(r):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a),a}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a),a}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a),a}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i),i}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n),n}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n),n}arc(t,e,n,r,i,a,s=!1,o){const l=this.gen.arc(t,e,n,r,i,a,s,o);return this.draw(l),l}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n),n}path(t,e){const n=this.gen.path(t,e);return this.draw(n),n}}const nt="http://www.w3.org/2000/svg";class rt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":e=r.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(r,s,n)}e&&i.appendChild(e)}return i}fillSketch(t,e,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=t.createElementNS(nt,"path");return i.setAttribute("d",this.opsToPath(e,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,n,r,i){const a=this.gen.line(t,e,n,r,i);return this.draw(a)}rectangle(t,e,n,r,i){const a=this.gen.rectangle(t,e,n,r,i);return this.draw(a)}ellipse(t,e,n,r,i){const a=this.gen.ellipse(t,e,n,r,i);return this.draw(a)}circle(t,e,n,r){const i=this.gen.circle(t,e,n,r);return this.draw(i)}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n)}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n)}arc(t,e,n,r,i,a,s=!1,o){const l=this.gen.arc(t,e,n,r,i,a,s,o);return this.draw(l)}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n)}path(t,e){const n=this.gen.path(t,e);return this.draw(n)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new rt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,n){"use strict";function r(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.from("string"==typeof t?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var i=r.reduce(function(t,e){var n=e.match(/\n([\t ]+|(?!\s).)/g);return n?t.concat(n.map(function(t){var e,n;return null!==(n=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==n?n:0})):t},[]);if(i.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");r=r.map(function(t){return t.replace(a,"\n")})}r[0]=r[0].replace(/^\r?\n/,"");var s=r[0];return e.forEach(function(t,e){var n=s.match(/(?:^|\n)( *)$/),i=n?n[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+i+t}).join("\n")),s+=a+r[e+1]}),s}n.d(e,{T:()=>r})},6087(t,e,n){"use strict";t.exports=n(6439)},6439(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;n(4615).default.install();const a=n(3281);i(n(3281),e);class s extends a.AbstractMessageReader{constructor(t){super(),this._onData=new a.Emitter,this._messageListener=t=>{this._onData.fire(t.data)},t.addEventListener("error",t=>this.fireError(t)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}}e.BrowserMessageReader=s;class o extends a.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",t=>this.fireError(t))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){}}e.BrowserMessageWriter=o,e.createMessageConnection=function(t,e,n,r){return void 0===n&&(n=a.NullLogger),a.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,a.createMessageConnection)(t,e,n,r)}},4615(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3281);class i extends r.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(t,e){return(new TextEncoder).encode(t)}toString(t,e){return"ascii"===e?this.asciiDecoder.decode(t):new TextDecoder(e).decode(t)}asNative(t,e){return void 0===e?t:t.slice(0,e)}allocNative(t){return new Uint8Array(t)}}i.emptyBuffer=new Uint8Array(0);class a{constructor(t){this.socket=t,this._onData=new r.Emitter,this._messageListener=t=>{t.data.arrayBuffer().then(t=>{this._onData.fire(new Uint8Array(t))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),r.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),r.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),r.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}}class s{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),r.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),r.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),r.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,e){if("string"==typeof t){if(void 0!==e&&"utf-8"!==e)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}}const o=new TextEncoder,l=Object.freeze({messageBuffer:Object.freeze({create:t=>new i(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{if("utf-8"!==e.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(o.encode(JSON.stringify(t,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))}})}),stream:Object.freeze({asReadableStream:t=>new a(t),asWritableStream:t=>new s(t)}),console,timer:Object.freeze({setTimeout(t,e,...n){const r=setTimeout(t,e,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(t,...e){const n=setTimeout(t,0,...e);return{dispose:()=>clearTimeout(n)}},setInterval(t,e,...n){const r=setInterval(t,e,...n);return{dispose:()=>clearInterval(r)}}})});function c(){return l}!function(t){t.install=function(){r.RAL.install(l)}}(c||(c={})),e.default=c},3281(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;const r=n(6177);Object.defineProperty(e,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(3352);Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(e,"Touch",{enumerable:!0,get:function(){return i.Touch}});const a=n(4019);Object.defineProperty(e,"Disposable",{enumerable:!0,get:function(){return a.Disposable}});const s=n(2676);Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const o=n(9850);Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:function(){return o.CancellationTokenSource}}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return o.CancellationToken}});const l=n(4996);Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const c=n(9085);Object.defineProperty(e,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const h=n(3193);Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:function(){return h.MessageWriter}}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:function(){return h.AbstractMessageWriter}}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return h.WriteableStreamMessageWriter}});const u=n(9244);Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:function(){return u.AbstractMessageBuffer}});const d=n(577);Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:function(){return d.ConnectionStrategy}}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:function(){return d.ConnectionOptions}}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:function(){return d.NullLogger}}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:function(){return d.createMessageConnection}}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:function(){return d.ProgressToken}}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:function(){return d.ProgressType}}),Object.defineProperty(e,"Trace",{enumerable:!0,get:function(){return d.Trace}}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:function(){return d.TraceValues}}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:function(){return d.TraceFormat}}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:function(){return d.SetTraceNotification}}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:function(){return d.LogTraceNotification}}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:function(){return d.ConnectionErrors}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return d.ConnectionError}}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return d.CancellationReceiverStrategy}}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:function(){return d.CancellationSenderStrategy}}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:function(){return d.CancellationStrategy}}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:function(){return d.MessageStrategy}});const p=n(9590);e.RAL=p.default},9850(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const r=n(9590),i=n(8585),a=n(2676);var s;!function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),t.is=function(e){const n=e;return n&&(n===t.None||n===t.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(e.CancellationToken=s={}));const o=Object.freeze(function(t,e){const n=(0,r.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}});class l{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}e.CancellationTokenSource=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=s.None}}},577(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;const r=n(9590),i=n(8585),a=n(6177),s=n(3352),o=n(2676),l=n(9850);var c,h,u,d,p,f,g,m,y,v,x,b,w,T,k,E,A,_,C;!function(t){t.type=new a.NotificationType("$/cancelRequest")}(c||(c={})),function(t){t.is=function(t){return"string"==typeof t||"number"==typeof t}}(h||(e.ProgressToken=h={})),function(t){t.type=new a.NotificationType("$/progress")}(u||(u={}));e.ProgressType=class{constructor(){}},function(t){t.is=function(t){return i.func(t)}}(d||(d={})),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"}(p||(e.Trace=p={})),function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"}(f||(e.TraceValues=f={})),function(t){t.fromString=function(e){if(!i.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":default:return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose}},t.toString=function(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}}(p||(e.Trace=p={})),function(t){t.Text="text",t.JSON="json"}(g||(e.TraceFormat=g={})),function(t){t.fromString=function(e){return i.string(e)&&"json"===(e=e.toLowerCase())?t.JSON:t.Text}}(g||(e.TraceFormat=g={})),function(t){t.type=new a.NotificationType("$/setTrace")}(m||(e.SetTraceNotification=m={})),function(t){t.type=new a.NotificationType("$/logTrace")}(y||(e.LogTraceNotification=y={})),function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"}(v||(e.ConnectionErrors=v={}));class S extends Error{constructor(t,e){super(e),this.code=t,Object.setPrototypeOf(this,S.prototype)}}e.ConnectionError=S,function(t){t.is=function(t){const e=t;return e&&i.func(e.cancelUndispatched)}}(x||(e.ConnectionStrategy=x={})),function(t){t.is=function(t){const e=t;return e&&(void 0===e.kind||"id"===e.kind)&&i.func(e.createCancellationTokenSource)&&(void 0===e.dispose||i.func(e.dispose))}}(b||(e.IdCancellationReceiverStrategy=b={})),function(t){t.is=function(t){const e=t;return e&&"request"===e.kind&&i.func(e.createCancellationTokenSource)&&(void 0===e.dispose||i.func(e.dispose))}}(w||(e.RequestCancellationReceiverStrategy=w={})),function(t){t.Message=Object.freeze({createCancellationTokenSource:t=>new l.CancellationTokenSource}),t.is=function(t){return b.is(t)||w.is(t)}}(T||(e.CancellationReceiverStrategy=T={})),function(t){t.Message=Object.freeze({sendCancellation:(t,e)=>t.sendNotification(c.type,{id:e}),cleanup(t){}}),t.is=function(t){const e=t;return e&&i.func(e.sendCancellation)&&i.func(e.cleanup)}}(k||(e.CancellationSenderStrategy=k={})),function(t){t.Message=Object.freeze({receiver:T.Message,sender:k.Message}),t.is=function(t){const e=t;return e&&T.is(e.receiver)&&k.is(e.sender)}}(E||(e.CancellationStrategy=E={})),function(t){t.is=function(t){const e=t;return e&&i.func(e.handleMessage)}}(A||(e.MessageStrategy=A={})),function(t){t.is=function(t){const e=t;return e&&(E.is(e.cancellationStrategy)||x.is(e.connectionStrategy)||A.is(e.messageStrategy))}}(_||(e.ConnectionOptions=_={})),function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"}(C||(C={})),e.createMessageConnection=function(t,n,f,x){const w=void 0!==f?f:e.NullLogger;let T=0,k=0,_=0;const R="2.0";let L;const D=new Map;let I;const N=new Map,M=new Map;let O,P,$=new s.LinkedMap,B=new Map,F=new Set,z=new Map,K=p.Off,q=g.Text,U=C.New;const j=new o.Emitter,Y=new o.Emitter,G=new o.Emitter,W=new o.Emitter,V=new o.Emitter,H=x&&x.cancellationStrategy?x.cancellationStrategy:E.Message;function X(t){if(null===t)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+t.toString()}function Z(t,e){var n;a.Message.isRequest(e)?t.set(X(e.id),e):a.Message.isResponse(e)?t.set(null===(n=e.id)?"res-unknown-"+(++_).toString():"res-"+n.toString(),e):t.set("not-"+(++k).toString(),e)}function Q(t){}function J(){return U===C.Listening}function tt(){return U===C.Closed}function et(){return U===C.Disposed}function nt(){U!==C.New&&U!==C.Listening||(U=C.Closed,Y.fire(void 0))}function rt(){O||0===$.size||(O=(0,r.default)().timer.setImmediate(()=>{O=void 0,function(){if(0===$.size)return;const t=$.shift();try{const e=x?.messageStrategy;A.is(e)?e.handleMessage(t,it):it(t)}finally{rt()}}()}))}function it(t){a.Message.isRequest(t)?function(t){if(et())return;function e(e,r,i){const s={jsonrpc:R,id:t.id};e instanceof a.ResponseError?s.error=e.toJson():s.result=void 0===e?null:e,ot(s,r,i),n.write(s).catch(()=>w.error("Sending response failed."))}function r(e,r,i){const a={jsonrpc:R,id:t.id,error:e.toJson()};ot(a,r,i),n.write(a).catch(()=>w.error("Sending response failed."))}function s(e,r,i){void 0===e&&(e=null);const a={jsonrpc:R,id:t.id,result:e};ot(a,r,i),n.write(a).catch(()=>w.error("Sending response failed."))}!function(t){if(K===p.Off||!P)return;if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||!t.params||(e=`Params: ${st(t.params)}\n\n`),P.log(`Received request '${t.method} - (${t.id})'.`,e)}else ct("receive-request",t)}(t);const o=D.get(t.method);let l,c;o&&(l=o.type,c=o.handler);const h=Date.now();if(c||L){const n=t.id??String(Date.now()),o=b.is(H.receiver)?H.receiver.createCancellationTokenSource(n):H.receiver.createCancellationTokenSource(t);null!==t.id&&F.has(t.id)&&o.cancel(),null!==t.id&&z.set(n,o);try{let u;if(c)if(void 0===t.params){if(void 0!==l&&0!==l.numberOfParams)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines ${l.numberOfParams} params but received none.`),t.method,h);u=c(o.token)}else if(Array.isArray(t.params)){if(void 0!==l&&l.parameterStructures===a.ParameterStructures.byName)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by name but received parameters by position`),t.method,h);u=c(...t.params,o.token)}else{if(void 0!==l&&l.parameterStructures===a.ParameterStructures.byPosition)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by position but received parameters by name`),t.method,h);u=c(t.params,o.token)}else L&&(u=L(t.method,t.params,o.token));const d=u;u?d.then?d.then(r=>{z.delete(n),e(r,t.method,h)},e=>{z.delete(n),e instanceof a.ResponseError?r(e,t.method,h):e&&i.string(e.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${e.message}`),t.method,h):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,h)}):(z.delete(n),e(u,t.method,h)):(z.delete(n),s(u,t.method,h))}catch(u){z.delete(n),u instanceof a.ResponseError?e(u,t.method,h):u&&i.string(u.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${u.message}`),t.method,h):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,h)}}else r(new a.ResponseError(a.ErrorCodes.MethodNotFound,`Unhandled method ${t.method}`),t.method,h)}(t):a.Message.isNotification(t)?function(t){if(et())return;let e,n;if(t.method===c.type.method){const e=t.params.id;return F.delete(e),void lt(t)}{const r=N.get(t.method);r&&(n=r.handler,e=r.type)}if(n||I)try{if(lt(t),n)if(void 0===t.params)void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==a.ParameterStructures.byName&&w.error(`Notification ${t.method} defines ${e.numberOfParams} params but received none.`),n();else if(Array.isArray(t.params)){const r=t.params;t.method===u.type.method&&2===r.length&&h.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==e&&(e.parameterStructures===a.ParameterStructures.byName&&w.error(`Notification ${t.method} defines parameters by name but received parameters by position`),e.numberOfParams!==t.params.length&&w.error(`Notification ${t.method} defines ${e.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==e&&e.parameterStructures===a.ParameterStructures.byPosition&&w.error(`Notification ${t.method} defines parameters by position but received parameters by name`),n(t.params);else I&&I(t.method,t.params)}catch(r){r.message?w.error(`Notification handler '${t.method}' failed with message: ${r.message}`):w.error(`Notification handler '${t.method}' failed unexpectedly.`)}else G.fire(t)}(t):a.Message.isResponse(t)?function(t){if(et())return;if(null===t.id)t.error?w.error(`Received response message without id: Error is: \n${JSON.stringify(t.error,void 0,4)}`):w.error("Received response message without id. No further error information provided.");else{const n=t.id,r=B.get(n);if(function(t,e){if(K===p.Off||!P)return;if(q===g.Text){let n;if(K!==p.Verbose&&K!==p.Compact||(t.error&&t.error.data?n=`Error data: ${st(t.error.data)}\n\n`:t.result?n=`Result: ${st(t.result)}\n\n`:void 0===t.error&&(n="No result returned.\n\n")),e){const r=t.error?` Request failed: ${t.error.message} (${t.error.code}).`:"";P.log(`Received response '${e.method} - (${t.id})' in ${Date.now()-e.timerStart}ms.${r}`,n)}else P.log(`Received response ${t.id} without active response promise.`,n)}else ct("receive-response",t)}(t,r),void 0!==r){B.delete(n);try{if(t.error){const e=t.error;r.reject(new a.ResponseError(e.code,e.message,e.data))}else{if(void 0===t.result)throw new Error("Should never happen.");r.resolve(t.result)}}catch(e){e.message?w.error(`Response handler '${r.method}' failed with message: ${e.message}`):w.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(t):function(t){if(!t)return void w.error("Received empty message.");w.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(t,null,4)}`);const e=t;if(i.string(e.id)||i.number(e.id)){const t=e.id,n=B.get(t);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(t)}t.onClose(nt),t.onError(function(t){j.fire([t,void 0,void 0])}),n.onClose(nt),n.onError(function(t){j.fire(t)});const at=t=>{try{if(a.Message.isNotification(t)&&t.method===c.type.method){const e=t.params.id,r=X(e),i=$.get(r);if(a.Message.isRequest(i)){const a=x?.connectionStrategy,s=a&&a.cancelUndispatched?a.cancelUndispatched(i,Q):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return $.delete(r),z.delete(e),s.id=i.id,ot(s,t.method,Date.now()),void n.write(s).catch(()=>w.error("Sending response for canceled message failed."))}const s=z.get(e);if(void 0!==s)return s.cancel(),void lt(t);F.add(e)}Z($,t)}finally{rt()}};function st(t){if(null!=t)switch(K){case p.Verbose:return JSON.stringify(t,null,4);case p.Compact:return JSON.stringify(t);default:return}}function ot(t,e,n){if(K!==p.Off&&P)if(q===g.Text){let r;K!==p.Verbose&&K!==p.Compact||(t.error&&t.error.data?r=`Error data: ${st(t.error.data)}\n\n`:t.result?r=`Result: ${st(t.result)}\n\n`:void 0===t.error&&(r="No result returned.\n\n")),P.log(`Sending response '${e} - (${t.id})'. Processing request took ${Date.now()-n}ms`,r)}else ct("send-response",t)}function lt(t){if(K!==p.Off&&P&&t.method!==y.type.method)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||(e=t.params?`Params: ${st(t.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Received notification '${t.method}'.`,e)}else ct("receive-notification",t)}function ct(t,e){if(!P||K===p.Off)return;const n={isLSPMessage:!0,type:t,message:e,timestamp:Date.now()};P.log(n)}function ht(){if(tt())throw new S(v.Closed,"Connection is closed.");if(et())throw new S(v.Disposed,"Connection is disposed.")}function ut(t){return void 0===t?null:t}function dt(t){return null===t?void 0:t}function pt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function ft(t,e){switch(t){case a.ParameterStructures.auto:return pt(e)?dt(e):[ut(e)];case a.ParameterStructures.byName:if(!pt(e))throw new Error("Received parameters by name but param is not an object literal.");return dt(e);case a.ParameterStructures.byPosition:return[ut(e)];default:throw new Error(`Unknown parameter structure ${t.toString()}`)}}function gt(t,e){let n;const r=t.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ft(t.parameterStructures,e[0]);break;default:n=[];for(let t=0;t<e.length&&t<r;t++)n.push(ut(e[t]));if(e.length<r)for(let t=e.length;t<r;t++)n.push(null)}return n}const mt={sendNotification:(t,...e)=>{let r,s;if(ht(),i.string(t)){r=t;const n=e[0];let i=0,o=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(i=1,o=n);let l=e.length;const c=l-i;switch(c){case 0:s=void 0;break;case 1:s=ft(o,e[i]);break;default:if(o===a.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);s=e.slice(i,l).map(t=>ut(t))}}else{const n=e;r=t.method,s=gt(t,n)}const o={jsonrpc:R,method:r,params:s};return function(t){if(K!==p.Off&&P)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||(e=t.params?`Params: ${st(t.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Sending notification '${t.method}'.`,e)}else ct("send-notification",t)}(o),n.write(o).catch(t=>{throw w.error("Sending notification failed."),t})},onNotification:(t,e)=>{let n;return ht(),i.func(t)?I=t:e&&(i.string(t)?(n=t,N.set(t,{type:void 0,handler:e})):(n=t.method,N.set(t.method,{type:t,handler:e}))),{dispose:()=>{void 0!==n?N.delete(n):I=void 0}}},onProgress:(t,e,n)=>{if(M.has(e))throw new Error(`Progress handler for token ${e} already registered`);return M.set(e,n),{dispose:()=>{M.delete(e)}}},sendProgress:(t,e,n)=>mt.sendNotification(u.type,{token:e,value:n}),onUnhandledProgress:W.event,sendRequest:(t,...e)=>{let r,s,o;if(ht(),function(){if(!J())throw new Error("Call listen() first.")}(),i.string(t)){r=t;const n=e[0],i=e[e.length-1];let c=0,h=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(c=1,h=n);let u=e.length;l.CancellationToken.is(i)&&(u-=1,o=i);const d=u-c;switch(d){case 0:s=void 0;break;case 1:s=ft(h,e[c]);break;default:if(h===a.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);s=e.slice(c,u).map(t=>ut(t))}}else{const n=e;r=t.method,s=gt(t,n);const i=t.numberOfParams;o=l.CancellationToken.is(n[i])?n[i]:void 0}const c=T++;let h;o&&(h=o.onCancellationRequested(()=>{const t=H.sender.sendCancellation(mt,c);return void 0===t?(w.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):t.catch(()=>{w.log(`Sending cancellation messages for id ${c} failed`)})}));const u={jsonrpc:R,id:c,method:r,params:s};return function(t){if(K!==p.Off&&P)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||!t.params||(e=`Params: ${st(t.params)}\n\n`),P.log(`Sending request '${t.method} - (${t.id})'.`,e)}else ct("send-request",t)}(u),"function"==typeof H.sender.enableCancellation&&H.sender.enableCancellation(u),new Promise(async(t,e)=>{const i={method:r,timerStart:Date.now(),resolve:e=>{t(e),H.sender.cleanup(c),h?.dispose()},reject:t=>{e(t),H.sender.cleanup(c),h?.dispose()}};try{await n.write(u),B.set(c,i)}catch(s){throw w.error("Sending request failed."),i.reject(new a.ResponseError(a.ErrorCodes.MessageWriteError,s.message?s.message:"Unknown reason")),s}})},onRequest:(t,e)=>{ht();let n=null;return d.is(t)?(n=void 0,L=t):i.string(t)?(n=null,void 0!==e&&(n=t,D.set(t,{handler:e,type:void 0}))):void 0!==e&&(n=t.method,D.set(t.method,{type:t,handler:e})),{dispose:()=>{null!==n&&(void 0!==n?D.delete(n):L=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(t,e,n)=>{let r=!1,a=g.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,a=n.traceFormat||g.Text)),K=t,q=a,P=K===p.Off?void 0:e,!r||tt()||et()||await mt.sendNotification(m.type,{value:p.toString(t)})},onError:j.event,onClose:Y.event,onUnhandledNotification:G.event,onDispose:V.event,end:()=>{n.end()},dispose:()=>{if(et())return;U=C.Disposed,V.fire(void 0);const e=new a.ResponseError(a.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of B.values())t.reject(e);B=new Map,z=new Map,F=new Set,$=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(t.dispose)&&t.dispose()},listen:()=>{ht(),function(){if(J())throw new S(v.AlreadyListening,"Connection is already listening")}(),U=C.Listening,t.listen(at)},inspect:()=>{(0,r.default)().console.log("inspect")}};return mt.onNotification(y.type,t=>{if(K===p.Off||!P)return;const e=K===p.Verbose||K===p.Compact;P.log(t.message,e?t.verbose:void 0)}),mt.onNotification(u.type,t=>{const e=M.get(t.token);e?e(t.value):W.fire(t)}),mt}},4019(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(t){t.create=function(t){return{dispose:t}}}(n||(e.Disposable=n={}))},2676(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;const r=n(9590);var i;!function(t){const e={dispose(){}};t.None=function(){return e}}(i||(e.Event=i={}));class a{add(t,e=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(n)&&n.push({dispose:()=>this.remove(t,e)})}remove(t,e=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===t){if(this._contexts[r]===e)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];const e=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=n.length;s<o;s++)try{e.push(n[s].apply(i[s],t))}catch(a){(0,r.default)().console.error(a)}return e}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class s{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,e,n)=>{this._callbacks||(this._callbacks=new a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,e),r.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}e.Emitter=s,s._noop=function(){}},8585(t,e){"use strict";function n(t){return"string"==typeof t||t instanceof String}function r(t){return Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,e.boolean=function(t){return!0===t||!1===t},e.string=n,e.number=function(t){return"number"==typeof t||t instanceof Number},e.error=function(t){return t instanceof Error},e.func=function(t){return"function"==typeof t},e.array=r,e.stringArray=function(t){return r(t)&&t.every(t=>n(t))}},3352(t,e){"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last}(r||(e.Touch=r={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,e=r.None){const n=this._map.get(t);if(n)return e!==r.None&&this.touch(n,e),n.value}set(t,e,n=r.None){let i=this._map.get(t);if(i)i.value=e,n!==r.None&&this.touch(i,n);else{switch(i={key:t,value:e,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,e){const n=this._state;let r=this._head;for(;r;){if(e?t.bind(e)(r.value,r.key,this):t(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const t=this._state;let e=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.key,done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return n}values(){const t=this._state;let e=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.value,done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return n}entries(){const t=this._state;let e=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:[e.key,e.value],done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(0===t)return void this.clear();let e=this._head,n=this.size;for(;e&&n>t;)this._map.delete(e.key),e=e.next,n--;this._head=e,this._size=n,e&&(e.previous=void 0),this._state++}addItemFirst(t){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");t.next=this._head,this._head.previous=t}else this._tail=t;this._head=t,this._state++}addItemLast(t){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");t.previous=this._tail,this._tail.next=t}else this._head=t;this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const e=t.next,n=t.previous;if(!e||!n)throw new Error("Invalid list");e.previous=n,n.next=e}t.next=void 0,t.previous=void 0,this._state++}touch(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(e===r.First||e===r.Last)if(e===r.First){if(t===this._head)return;const e=t.next,n=t.previous;t===this._tail?(n.next=void 0,this._tail=n):(e.previous=n,n.next=e),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(e===r.Last){if(t===this._tail)return;const e=t.next,n=t.previous;t===this._head?(e.previous=void 0,this._head=e):(e.previous=n,n.next=e),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}toJSON(){const t=[];return this.forEach((e,n)=>{t.push([n,e])}),t}fromJSON(t){this.clear();for(const[e,n]of t)this.set(e,n)}}e.LinkedMap=i;e.LRUCache=class extends i{constructor(t,e=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,e=r.AsNew){return super.get(t,e)}peek(t){return super.get(t,r.None)}set(t,e){return super.set(t,e,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;e.AbstractMessageBuffer=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){const e="string"==typeof t?this.fromString(t,this._encoding):t;this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(t=!1){if(0===this._chunks.length)return;let e=0,n=0,r=0,i=0;t:for(;n<this._chunks.length;){const t=this._chunks[n];for(r=0;r<t.length;){switch(t[r]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,r++;break t;default:e=0}break;default:e=0}r++}i+=t.byteLength,n++}if(4!==e)return;const a=this._read(i+r),s=new Map,o=this.toString(a,"ascii").split("\r\n");if(o.length<2)return s;for(let l=0;l<o.length-2;l++){const e=o[l],n=e.indexOf(":");if(-1===n)throw new Error(`Message header must separate key and value using ':'\n${e}`);const r=e.substr(0,n),i=e.substr(n+1).trim();s.set(t?r.toLowerCase():r,i)}return s}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(0===t)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){const e=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(e)}if(this._chunks[0].byteLength>t){const e=this._chunks[0],n=this.asNative(e,t);return this._chunks[0]=e.slice(t),this._totalLength-=t,n}const e=this.allocNative(t);let n=0;for(;t>0;){const r=this._chunks[0];if(r.byteLength>t){const i=r.slice(0,t);e.set(i,n),n+=t,this._chunks[0]=r.slice(t),this._totalLength-=t,t-=t}else e.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,t-=r.byteLength}return e}}},9085(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;const r=n(9590),i=n(8585),a=n(2676),s=n(4323);var o,l;!function(t){t.is=function(t){let e=t;return e&&i.func(e.listen)&&i.func(e.dispose)&&i.func(e.onError)&&i.func(e.onClose)&&i.func(e.onPartialMessage)}}(o||(e.MessageReader=o={}));class c{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${i.string(t.message)?t.message:"unknown"}`)}}e.AbstractMessageReader=c,function(t){t.fromOptions=function(t){let e,n;const i=new Map;let a;const s=new Map;if(void 0===t||"string"==typeof t)e=t??"utf-8";else{if(e=t.charset??"utf-8",void 0!==t.contentDecoder&&(n=t.contentDecoder,i.set(n.name,n)),void 0!==t.contentDecoders)for(const e of t.contentDecoders)i.set(e.name,e);if(void 0!==t.contentTypeDecoder&&(a=t.contentTypeDecoder,s.set(a.name,a)),void 0!==t.contentTypeDecoders)for(const e of t.contentTypeDecoders)s.set(e.name,e)}return void 0===a&&(a=(0,r.default)().applicationJson.decoder,s.set(a.name,a)),{charset:e,contentDecoder:n,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:s}}}(l||(l={}));e.ReadableStreamMessageReader=class extends c{constructor(t,e){super(),this.readable=t,this.options=l.fromOptions(e),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;const e=this.readable.onData(t=>{this.onData(t)});return this.readable.onError(t=>this.fireError(t)),this.readable.onClose(()=>this.fireClose()),e}onData(t){try{for(this.buffer.append(t);;){if(-1===this.nextMessageLength){const t=this.buffer.tryReadHeaders(!0);if(!t)return;const e=t.get("content-length");if(!e)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(t))}`));const n=parseInt(e);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${e}`));this.nextMessageLength=n}const t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,n=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(n)}).catch(t=>{this.fireError(t)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((t,e)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:e}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;const r=n(9590),i=n(8585),a=n(4323),s=n(2676);var o,l;!function(t){t.is=function(t){let e=t;return e&&i.func(e.dispose)&&i.func(e.onClose)&&i.func(e.onError)&&i.func(e.write)}}(o||(e.MessageWriter=o={}));class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,e,n){this.errorEmitter.fire([this.asError(t),e,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${i.string(t.message)?t.message:"unknown"}`)}}e.AbstractMessageWriter=c,function(t){t.fromOptions=function(t){return void 0===t||"string"==typeof t?{charset:t??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(l||(l={}));e.WriteableStreamMessageWriter=class extends c{constructor(t,e){super(),this.writable=t,this.options=l.fromOptions(e),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError(t=>this.fireError(t)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(t=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(t):t).then(e=>{const n=[];return n.push("Content-Length: ",e.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(t,n,e)},t=>{throw this.fireError(t),t}))}async doWrite(t,e,n){try{return await this.writable.write(e.join(""),"ascii"),this.writable.write(n)}catch(r){return this.handleError(r,t),Promise.reject(r)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){this.writable.end()}}},6177(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;const r=n(8585);var i,a;!function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3}(i||(e.ErrorCodes=i={}));class s extends Error{constructor(t,e,n){super(e),this.code=r.number(t)?t:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),t}}e.ResponseError=s;class o{constructor(t){this.kind=t}static is(t){return t===o.auto||t===o.byName||t===o.byPosition}toString(){return this.kind}}e.ParameterStructures=o,o.auto=new o("auto"),o.byPosition=new o("byPosition"),o.byName=new o("byName");class l{constructor(t,e){this.method=t,this.numberOfParams=e}get parameterStructures(){return o.auto}}e.AbstractMessageSignature=l;e.RequestType0=class extends l{constructor(t){super(t,0)}};e.RequestType=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.RequestType1=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.RequestType2=class extends l{constructor(t){super(t,2)}};e.RequestType3=class extends l{constructor(t){super(t,3)}};e.RequestType4=class extends l{constructor(t){super(t,4)}};e.RequestType5=class extends l{constructor(t){super(t,5)}};e.RequestType6=class extends l{constructor(t){super(t,6)}};e.RequestType7=class extends l{constructor(t){super(t,7)}};e.RequestType8=class extends l{constructor(t){super(t,8)}};e.RequestType9=class extends l{constructor(t){super(t,9)}};e.NotificationType=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.NotificationType0=class extends l{constructor(t){super(t,0)}};e.NotificationType1=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.NotificationType2=class extends l{constructor(t){super(t,2)}};e.NotificationType3=class extends l{constructor(t){super(t,3)}};e.NotificationType4=class extends l{constructor(t){super(t,4)}};e.NotificationType5=class extends l{constructor(t){super(t,5)}};e.NotificationType6=class extends l{constructor(t){super(t,6)}};e.NotificationType7=class extends l{constructor(t){super(t,7)}};e.NotificationType8=class extends l{constructor(t){super(t,8)}};e.NotificationType9=class extends l{constructor(t){super(t,9)}},function(t){t.isRequest=function(t){const e=t;return e&&r.string(e.method)&&(r.string(e.id)||r.number(e.id))},t.isNotification=function(t){const e=t;return e&&r.string(e.method)&&void 0===t.id},t.isResponse=function(t){const e=t;return e&&(void 0!==e.result||!!e.error)&&(r.string(e.id)||r.number(e.id)||null===e.id)}}(a||(e.Message=a={}))},9590(t,e){"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.install=function(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");n=t}}(r||(r={})),e.default=r},4323(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;const r=n(9590);e.Semaphore=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((e,n)=>{this._waiting.push({thunk:t,resolve:e,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}}},4996(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;const r=n(9850);var i;!function(t){t.Continue=0,t.Cancelled=1}(i||(i={}));e.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(t){if(null===t.id)return;const e=new SharedArrayBuffer(4);new Int32Array(e,0,1)[0]=i.Continue,this.buffers.set(t.id,e),t.$cancellationData=e}async sendCancellation(t,e){const n=this.buffers.get(e);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};class a{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(t){this.token=new a(t)}cancel(){}dispose(){}}e.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(t){const e=t.$cancellationData;return void 0===e?new r.CancellationTokenSource:new s(e)}}},4512(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;const a=n(6087);i(n(6087),e),i(n(8766),e),e.createProtocolConnection=function(t,e,n,r){return(0,a.createMessageConnection)(t,e,n,r)}},8766(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,i(n(6439),e),i(n(6203),e),i(n(372),e),i(n(1560),e);var a,s=n(1580);Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800}(a||(e.LSPErrorCodes=a={}))},1580(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;const r=n(6439);e.createProtocolConnection=function(t,e,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(t,e,n,i)}},372(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;const r=n(6439);var i;!function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"}(i||(e.MessageDirection=i={}));e.RegistrationType=class{constructor(t){this.method=t}};class a extends r.RequestType0{constructor(t){super(t)}}e.ProtocolRequestType0=a;class s extends r.RequestType{constructor(t){super(t,r.ParameterStructures.byName)}}e.ProtocolRequestType=s;class o extends r.NotificationType0{constructor(t){super(t)}}e.ProtocolNotificationType0=o;class l extends r.NotificationType{constructor(t){super(t,r.ParameterStructures.byName)}}e.ProtocolNotificationType=l},8765(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;const r=n(372);var i,a,s;!function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.CallHierarchyPrepareRequest=i={})),function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(a||(e.CallHierarchyIncomingCallsRequest=a={})),function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(s||(e.CallHierarchyOutgoingCallsRequest=s={}))},7672(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;const r=n(372);var i,a;!function(t){t.method="textDocument/documentColor",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.DocumentColorRequest=i={})),function(t){t.method="textDocument/colorPresentation",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(a||(e.ColorPresentationRequest=a={}))},1660(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;const r=n(372);var i;!function(t){t.method="workspace/configuration",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType(t.method)}(i||(e.ConfigurationRequest=i={}))},6914(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/declaration",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.DeclarationRequest=i={}))},6011(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;const r=n(6439),i=n(8598),a=n(372);var s,o,l,c,h;!function(t){t.is=function(t){const e=t;return e&&i.boolean(e.retriggerRequest)}}(s||(e.DiagnosticServerCancellationData=s={})),function(t){t.Full="full",t.Unchanged="unchanged"}(o||(e.DocumentDiagnosticReportKind=o={})),function(t){t.method="textDocument/diagnostic",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType}(l||(e.DocumentDiagnosticRequest=l={})),function(t){t.method="workspace/diagnostic",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType}(c||(e.WorkspaceDiagnosticRequest=c={})),function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=a.MessageDirection.serverToClient,t.type=new a.ProtocolRequestType0(t.method)}(h||(e.DiagnosticRefreshRequest=h={}))},9840(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;const r=n(372);var i,a,s,o,l,c,h;!function(t){t.file="file",t.folder="folder"}(i||(e.FileOperationPatternKind=i={})),function(t){t.method="workspace/willCreateFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(a||(e.WillCreateFilesRequest=a={})),function(t){t.method="workspace/didCreateFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(s||(e.DidCreateFilesNotification=s={})),function(t){t.method="workspace/willRenameFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(o||(e.WillRenameFilesRequest=o={})),function(t){t.method="workspace/didRenameFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(l||(e.DidRenameFilesNotification=l={})),function(t){t.method="workspace/didDeleteFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(c||(e.DidDeleteFilesNotification=c={})),function(t){t.method="workspace/willDeleteFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(h||(e.WillDeleteFilesRequest=h={}))},2874(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;const r=n(372);var i,a;!function(t){t.method="textDocument/foldingRange",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.FoldingRangeRequest=i={})),function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(a||(e.FoldingRangeRefreshRequest=a={}))},9574(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/implementation",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.ImplementationRequest=i={}))},7752(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;const r=n(372);var i,a,s;!function(t){t.method="textDocument/inlayHint",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.InlayHintRequest=i={})),function(t){t.method="inlayHint/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(a||(e.InlayHintResolveRequest=a={})),function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(s||(e.InlayHintRefreshRequest=s={}))},3307(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/inlineCompletion",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.InlineCompletionRequest=i={}))},3124(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;const r=n(372);var i,a;!function(t){t.method="textDocument/inlineValue",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.InlineValueRequest=i={})),function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(a||(e.InlineValueRefreshRequest=a={}))},1560(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;const r=n(372),i=n(6203),a=n(8598),s=n(9574);Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const o=n(8461);Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:function(){return o.TypeDefinitionRequest}});const l=n(9935);Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return l.WorkspaceFoldersRequest}}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return l.DidChangeWorkspaceFoldersNotification}});const c=n(1660);Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const h=n(7672);Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});const u=n(2874);Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return u.FoldingRangeRefreshRequest}});const d=n(6914);Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const p=n(3487);Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const f=n(2687);Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const g=n(8765);Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const m=n(2478);Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const v=n(2935);Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const x=n(9840);Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:function(){return x.FileOperationPatternKind}}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:function(){return x.DidCreateFilesNotification}}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:function(){return x.WillCreateFilesRequest}}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:function(){return x.DidRenameFilesNotification}}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:function(){return x.WillRenameFilesRequest}}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return x.DidDeleteFilesNotification}}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return x.WillDeleteFilesRequest}});const b=n(9047);Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}});const w=n(645);Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return w.TypeHierarchyPrepareRequest}}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySubtypesRequest}}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySupertypesRequest}});const T=n(3124);Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const k=n(7752);Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:function(){return k.InlayHintRequest}}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:function(){return k.InlayHintResolveRequest}}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return k.InlayHintRefreshRequest}});const E=n(6011);Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return E.DiagnosticServerCancellationData}}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return E.DocumentDiagnosticReportKind}}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return E.DocumentDiagnosticRequest}}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return E.WorkspaceDiagnosticRequest}}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return E.DiagnosticRefreshRequest}});const A=n(3557);Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:function(){return A.NotebookCellKind}}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:function(){return A.ExecutionSummary}}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:function(){return A.NotebookCell}}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:function(){return A.NotebookDocument}}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return A.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return A.DidOpenNotebookDocumentNotification}}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:function(){return A.NotebookCellArrayChange}}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return A.DidChangeNotebookDocumentNotification}}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return A.DidSaveNotebookDocumentNotification}}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return A.DidCloseNotebookDocumentNotification}});const _=n(3307);var C,S,R,L,D,I,N,M,O,P,$,B,F,z,K,q,U,j,Y,G,W,V,H,X,Z,Q,J,tt,et,nt,rt,it,at,st,ot,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,xt,bt,wt,Tt,kt,Et,At,_t,Ct,St,Rt,Lt,Dt,It,Nt,Mt,Ot,Pt,$t;Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:function(){return _.InlineCompletionRequest}}),function(t){t.is=function(t){const e=t;return a.string(e)||a.string(e.language)||a.string(e.scheme)||a.string(e.pattern)}}(C||(e.TextDocumentFilter=C={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(a.string(e.notebookType)||a.string(e.scheme)||a.string(e.pattern))}}(S||(e.NotebookDocumentFilter=S={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(a.string(e.notebook)||S.is(e.notebook))&&(void 0===e.language||a.string(e.language))}}(R||(e.NotebookCellTextDocumentFilter=R={})),function(t){t.is=function(t){if(!Array.isArray(t))return!1;for(let e of t)if(!a.string(e)&&!C.is(e)&&!R.is(e))return!1;return!0}}(L||(e.DocumentSelector=L={})),function(t){t.method="client/registerCapability",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType(t.method)}(D||(e.RegistrationRequest=D={})),function(t){t.method="client/unregisterCapability",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType(t.method)}(I||(e.UnregistrationRequest=I={})),function(t){t.Create="create",t.Rename="rename",t.Delete="delete"}(N||(e.ResourceOperationKind=N={})),function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"}(M||(e.FailureHandlingKind=M={})),function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"}(O||(e.PositionEncodingKind=O={})),function(t){t.hasId=function(t){const e=t;return e&&a.string(e.id)&&e.id.length>0}}(P||(e.StaticRegistrationOptions=P={})),function(t){t.is=function(t){const e=t;return e&&(null===e.documentSelector||L.is(e.documentSelector))}}($||(e.TextDocumentRegistrationOptions=$={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(void 0===e.workDoneProgress||a.boolean(e.workDoneProgress))},t.hasWorkDoneProgress=function(t){const e=t;return e&&a.boolean(e.workDoneProgress)}}(B||(e.WorkDoneProgressOptions=B={})),function(t){t.method="initialize",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(F||(e.InitializeRequest=F={})),function(t){t.unknownProtocolVersion=1}(z||(e.InitializeErrorCodes=z={})),function(t){t.method="initialized",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(K||(e.InitializedNotification=K={})),function(t){t.method="shutdown",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType0(t.method)}(q||(e.ShutdownRequest=q={})),function(t){t.method="exit",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType0(t.method)}(U||(e.ExitNotification=U={})),function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(j||(e.DidChangeConfigurationNotification=j={})),function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5}(Y||(e.MessageType=Y={})),function(t){t.method="window/showMessage",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolNotificationType(t.method)}(G||(e.ShowMessageNotification=G={})),function(t){t.method="window/showMessageRequest",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType(t.method)}(W||(e.ShowMessageRequest=W={})),function(t){t.method="window/logMessage",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolNotificationType(t.method)}(V||(e.LogMessageNotification=V={})),function(t){t.method="telemetry/event",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolNotificationType(t.method)}(H||(e.TelemetryEventNotification=H={})),function(t){t.None=0,t.Full=1,t.Incremental=2}(X||(e.TextDocumentSyncKind=X={})),function(t){t.method="textDocument/didOpen",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(Z||(e.DidOpenTextDocumentNotification=Z={})),function(t){t.isIncremental=function(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)},t.isFull=function(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}(Q||(e.TextDocumentContentChangeEvent=Q={})),function(t){t.method="textDocument/didChange",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(J||(e.DidChangeTextDocumentNotification=J={})),function(t){t.method="textDocument/didClose",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(tt||(e.DidCloseTextDocumentNotification=tt={})),function(t){t.method="textDocument/didSave",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(et||(e.DidSaveTextDocumentNotification=et={})),function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3}(nt||(e.TextDocumentSaveReason=nt={})),function(t){t.method="textDocument/willSave",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(rt||(e.WillSaveTextDocumentNotification=rt={})),function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(it||(e.WillSaveTextDocumentWaitUntilRequest=it={})),function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(at||(e.DidChangeWatchedFilesNotification=at={})),function(t){t.Created=1,t.Changed=2,t.Deleted=3}(st||(e.FileChangeType=st={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(i.URI.is(e.baseUri)||i.WorkspaceFolder.is(e.baseUri))&&a.string(e.pattern)}}(ot||(e.RelativePattern=ot={})),function(t){t.Create=1,t.Change=2,t.Delete=4}(lt||(e.WatchKind=lt={})),function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolNotificationType(t.method)}(ct||(e.PublishDiagnosticsNotification=ct={})),function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3}(ht||(e.CompletionTriggerKind=ht={})),function(t){t.method="textDocument/completion",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(ut||(e.CompletionRequest=ut={})),function(t){t.method="completionItem/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(dt||(e.CompletionResolveRequest=dt={})),function(t){t.method="textDocument/hover",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(pt||(e.HoverRequest=pt={})),function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3}(ft||(e.SignatureHelpTriggerKind=ft={})),function(t){t.method="textDocument/signatureHelp",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(gt||(e.SignatureHelpRequest=gt={})),function(t){t.method="textDocument/definition",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(mt||(e.DefinitionRequest=mt={})),function(t){t.method="textDocument/references",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(yt||(e.ReferencesRequest=yt={})),function(t){t.method="textDocument/documentHighlight",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(vt||(e.DocumentHighlightRequest=vt={})),function(t){t.method="textDocument/documentSymbol",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(xt||(e.DocumentSymbolRequest=xt={})),function(t){t.method="textDocument/codeAction",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(bt||(e.CodeActionRequest=bt={})),function(t){t.method="codeAction/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(wt||(e.CodeActionResolveRequest=wt={})),function(t){t.method="workspace/symbol",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Tt||(e.WorkspaceSymbolRequest=Tt={})),function(t){t.method="workspaceSymbol/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(kt||(e.WorkspaceSymbolResolveRequest=kt={})),function(t){t.method="textDocument/codeLens",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Et||(e.CodeLensRequest=Et={})),function(t){t.method="codeLens/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(At||(e.CodeLensResolveRequest=At={})),function(t){t.method="workspace/codeLens/refresh",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(_t||(e.CodeLensRefreshRequest=_t={})),function(t){t.method="textDocument/documentLink",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Ct||(e.DocumentLinkRequest=Ct={})),function(t){t.method="documentLink/resolve",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(St||(e.DocumentLinkResolveRequest=St={})),function(t){t.method="textDocument/formatting",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Rt||(e.DocumentFormattingRequest=Rt={})),function(t){t.method="textDocument/rangeFormatting",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Lt||(e.DocumentRangeFormattingRequest=Lt={})),function(t){t.method="textDocument/rangesFormatting",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Dt||(e.DocumentRangesFormattingRequest=Dt={})),function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(It||(e.DocumentOnTypeFormattingRequest=It={})),function(t){t.Identifier=1}(Nt||(e.PrepareSupportDefaultBehavior=Nt={})),function(t){t.method="textDocument/rename",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Mt||(e.RenameRequest=Mt={})),function(t){t.method="textDocument/prepareRename",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Ot||(e.PrepareRenameRequest=Ot={})),function(t){t.method="workspace/executeCommand",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(Pt||(e.ExecuteCommandRequest=Pt={})),function(t){t.method="workspace/applyEdit",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType("workspace/applyEdit")}($t||(e.ApplyWorkspaceEditRequest=$t={}))},2935(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.LinkedEditingRangeRequest=i={}))},9047(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;const r=n(372);var i,a,s;!function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"}(i||(e.UniquenessLevel=i={})),function(t){t.$import="import",t.$export="export",t.local="local"}(a||(e.MonikerKind=a={})),function(t){t.method="textDocument/moniker",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(s||(e.MonikerRequest=s={}))},3557(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;const r=n(6203),i=n(8598),a=n(372);var s,o,l,c,h,u,d,p,f,g;!function(t){t.Markup=1,t.Code=2,t.is=function(t){return 1===t||2===t}}(s||(e.NotebookCellKind=s={})),function(t){t.create=function(t,e){const n={executionOrder:t};return!0!==e&&!1!==e||(n.success=e),n},t.is=function(t){const e=t;return i.objectLiteral(e)&&r.uinteger.is(e.executionOrder)&&(void 0===e.success||i.boolean(e.success))},t.equals=function(t,e){return t===e||null!=t&&null!=e&&(t.executionOrder===e.executionOrder&&t.success===e.success)}}(o||(e.ExecutionSummary=o={})),function(t){function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(typeof t!=typeof n)return!1;if("object"!=typeof t)return!1;const r=Array.isArray(t),a=Array.isArray(n);if(r!==a)return!1;if(r&&a){if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}if(i.objectLiteral(t)&&i.objectLiteral(n)){const r=Object.keys(t),i=Object.keys(n);if(r.length!==i.length)return!1;if(r.sort(),i.sort(),!e(r,i))return!1;for(let a=0;a<r.length;a++){const i=r[a];if(!e(t[i],n[i]))return!1}}return!0}t.create=function(t,e){return{kind:t,document:e}},t.is=function(t){const e=t;return i.objectLiteral(e)&&s.is(e.kind)&&r.DocumentUri.is(e.document)&&(void 0===e.metadata||i.objectLiteral(e.metadata))},t.diff=function(t,n){const r=new Set;return t.document!==n.document&&r.add("document"),t.kind!==n.kind&&r.add("kind"),t.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===t.metadata&&void 0===n.metadata||e(t.metadata,n.metadata)||r.add("metadata"),void 0===t.executionSummary&&void 0===n.executionSummary||o.equals(t.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(l||(e.NotebookCell=l={})),function(t){t.create=function(t,e,n,r){return{uri:t,notebookType:e,version:n,cells:r}},t.is=function(t){const e=t;return i.objectLiteral(e)&&i.string(e.uri)&&r.integer.is(e.version)&&i.typedArray(e.cells,l.is)}}(c||(e.NotebookDocument=c={})),function(t){t.method="notebookDocument/sync",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.RegistrationType(t.method)}(h||(e.NotebookDocumentSyncRegistrationType=h={})),function(t){t.method="notebookDocument/didOpen",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolNotificationType(t.method),t.registrationMethod=h.method}(u||(e.DidOpenNotebookDocumentNotification=u={})),function(t){t.is=function(t){const e=t;return i.objectLiteral(e)&&r.uinteger.is(e.start)&&r.uinteger.is(e.deleteCount)&&(void 0===e.cells||i.typedArray(e.cells,l.is))},t.create=function(t,e,n){const r={start:t,deleteCount:e};return void 0!==n&&(r.cells=n),r}}(d||(e.NotebookCellArrayChange=d={})),function(t){t.method="notebookDocument/didChange",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolNotificationType(t.method),t.registrationMethod=h.method}(p||(e.DidChangeNotebookDocumentNotification=p={})),function(t){t.method="notebookDocument/didSave",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolNotificationType(t.method),t.registrationMethod=h.method}(f||(e.DidSaveNotebookDocumentNotification=f={})),function(t){t.method="notebookDocument/didClose",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolNotificationType(t.method),t.registrationMethod=h.method}(g||(e.DidCloseNotebookDocumentNotification=g={}))},2687(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;const r=n(6439),i=n(372);var a,s,o;!function(t){t.type=new r.ProgressType,t.is=function(e){return e===t.type}}(a||(e.WorkDoneProgress=a={})),function(t){t.method="window/workDoneProgress/create",t.messageDirection=i.MessageDirection.serverToClient,t.type=new i.ProtocolRequestType(t.method)}(s||(e.WorkDoneProgressCreateRequest=s={})),function(t){t.method="window/workDoneProgress/cancel",t.messageDirection=i.MessageDirection.clientToServer,t.type=new i.ProtocolNotificationType(t.method)}(o||(e.WorkDoneProgressCancelNotification=o={}))},3487(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/selectionRange",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.SelectionRangeRequest=i={}))},2478(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;const r=n(372);var i,a,s,o,l,c;!function(t){t.Relative="relative"}(i||(e.TokenFormat=i={})),function(t){t.method="textDocument/semanticTokens",t.type=new r.RegistrationType(t.method)}(a||(e.SemanticTokensRegistrationType=a={})),function(t){t.method="textDocument/semanticTokens/full",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),t.registrationMethod=a.method}(s||(e.SemanticTokensRequest=s={})),function(t){t.method="textDocument/semanticTokens/full/delta",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),t.registrationMethod=a.method}(o||(e.SemanticTokensDeltaRequest=o={})),function(t){t.method="textDocument/semanticTokens/range",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),t.registrationMethod=a.method}(l||(e.SemanticTokensRangeRequest=l={})),function(t){t.method="workspace/semanticTokens/refresh",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(c||(e.SemanticTokensRefreshRequest=c={}))},908(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;const r=n(372);var i;!function(t){t.method="window/showDocument",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType(t.method)}(i||(e.ShowDocumentRequest=i={}))},8461(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;const r=n(372);var i;!function(t){t.method="textDocument/typeDefinition",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.TypeDefinitionRequest=i={}))},645(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;const r=n(372);var i,a,s;!function(t){t.method="textDocument/prepareTypeHierarchy",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(i||(e.TypeHierarchyPrepareRequest=i={})),function(t){t.method="typeHierarchy/supertypes",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(a||(e.TypeHierarchySupertypesRequest=a={})),function(t){t.method="typeHierarchy/subtypes",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}(s||(e.TypeHierarchySubtypesRequest=s={}))},9935(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;const r=n(372);var i,a;!function(t){t.method="workspace/workspaceFolders",t.messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}(i||(e.WorkspaceFoldersRequest=i={})),function(t){t.method="workspace/didChangeWorkspaceFolders",t.messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}(a||(e.DidChangeWorkspaceFoldersNotification=a={}))},8598(t,e){"use strict";function n(t){return"string"==typeof t||t instanceof String}function r(t){return Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,e.boolean=function(t){return!0===t||!1===t},e.string=n,e.number=function(t){return"number"==typeof t||t instanceof Number},e.error=function(t){return t instanceof Error},e.func=function(t){return"function"==typeof t},e.array=r,e.stringArray=function(t){return r(t)&&t.every(t=>n(t))},e.typedArray=function(t,e){return Array.isArray(t)&&t.every(e)},e.objectLiteral=function(t){return null!==t&&"object"==typeof t}},2607(t,e,n){"use strict";function r(t){return t.charCodeAt(0)}function i(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function a(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e];t[e]=!0}function s(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function o(){throw Error("Internal Error - Should never get here!")}function l(t){return"Character"===t.type}n.d(e,{z:()=>m,H:()=>g});const c=[];for(let y=r("0");y<=r("9");y++)c.push(y);const h=[r("_")].concat(c);for(let y=r("a");y<=r("z");y++)h.push(y);for(let y=r("A");y<=r("Z");y++)h.push(y);const u=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r(" "),r(""),r(" "),r(""),r(""),r(""),r(""),r(""),r(""),r(""),r(""),r(""),r(""),r("\u2028"),r("\u2029"),r(""),r(""),r(" "),r("\ufeff")],d=/[0-9a-fA-F]/,p=/[0-9]/,f=/[1-9]/;class g{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}s(e);const n=this.disjunction();return this.consumeChar(")"),{type:e,value:n,loc:this.loc(t)}}return o()}quantifier(t=!1){let e;const n=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":let t;this.isDigit()?(t=this.integerIncludingZero(),e={atLeast:n,atMost:t}):e={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;s(e)}if(!0!==t||void 0!==e)return s(e)?("?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(n),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),s(t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):o()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=c;break;case"D":t=c,e=!0;break;case"s":t=u;break;case"S":t=u,e=!0;break;case"w":t=h;break;case"W":t=h,e=!0}return s(t)?{type:"Set",value:t,complement:e}:o()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=r("\f");break;case"n":t=r("\n");break;case"r":t=r("\r");break;case"t":t=r("\t");break;case"v":t=r("\v")}return s(t)?{type:"Character",value:t}:o()}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r(this.popChar())}}}characterClass(){const t=[];let e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){const e=this.classAtom();e.type;if(l(e)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();n.type;if(l(n)){if(n.value<e.value)throw Error("Range out of order in character class");t.push({from:e.value,to:n.value})}else i(e.value,t),t.push(r("-")),i(n.value,t)}else i(e.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:r("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),t=!1;else this.groupIdx++;const e=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:t,value:e};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(!1===f.test(t))throw Error("Expecting a positive integer");for(;p.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===p.test(t))throw Error("Expecting an integer");for(;p.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){const t=this.popChar();switch(t){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:r(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return p.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const t=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let e="";for(let n=0;n<t;n++){const t=this.popChar();if(!1===d.test(t))throw Error("Expecting a HexDecimal digits");e+=t}return{type:"Character",value:parseInt(e,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){const t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}class m{visitChildren(t){for(const e in t){const n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Lookbehind":this.visitLookbehind(t);break;case"NegativeLookbehind":this.visitNegativeLookbehind(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitLookbehind(t){}visitNegativeLookbehind(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}},8644(t,e,n){"use strict";n.d(e,{createArchitectureServices:()=>r.S});var r=n(5877);n(830)},6729(t,e,n){"use strict";n.d(e,{b:()=>c});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.d$,l);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}(0,r.K2)(c,"createGitGraphServices")},6527(t,e,n){"use strict";n.d(e,{$:()=>c});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.p5,l);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}(0,r.K2)(c,"createPacketServices")},1009(t,e,n){"use strict";n.d(e,{v:()=>c});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.FZ,l);return e.ServiceRegistry.register(n),{shared:e,Info:n}}(0,r.K2)(c,"createInfoServices")},6299(t,e,n){"use strict";n.d(e,{f:()=>c});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.Bg,l);return e.ServiceRegistry.register(n),{shared:e,Radar:n}}(0,r.K2)(c,"createRadarServices")},1592(t,e,n){"use strict";n.d(e,{d:()=>p});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},l=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,c=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(t,e,n){if("NUMBER2"===t.name)return parseFloat(e.replace(/,/g,""));if("SEPARATOR"===t.name)return e.substring(1,e.length-1);if("STRING2"===t.name)return e.substring(1,e.length-1);if("INDENTATION"===t.name)return e.length;if("ClassDef"===t.name){if("string"!=typeof e)return e;const t=l.exec(e);if(t)return{$type:"ClassDefStatement",className:t[1],styleText:t[2]||void 0}}}};function h(t){const e=t.validation.TreemapValidator,n=t.validation.ValidationRegistry;if(n){const t={Treemap:e.checkSingleRoot.bind(e)};n.register(t,e)}}(0,r.K2)(h,"registerValidationChecks");var u=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(t,e){let n;for(const r of t.TreemapRows)r.item&&(void 0===n&&void 0===r.indent?n=0:(void 0===r.indent||void 0!==n&&n>=parseInt(r.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},d={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")},validation:{TreemapValidator:(0,r.K2)(()=>new u,"TreemapValidator")}};function p(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.XE,d);return e.ServiceRegistry.register(n),h(n),{shared:e,Treemap:n}}(0,r.K2)(p,"createTreemapServices")},5877(t,e,n){"use strict";n.d(e,{S:()=>h});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},l=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(t,e,n){if("ARCH_ICON"===t.name)return e.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===t.name)return e.replace(/["()]/g,"");if("ARCH_TITLE"===t.name){let t=e.replace(/^\[|]$/g,"").trim();return(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1),t=t.replace(/\\"/g,'"').replace(/\\'/g,"'")),t.trim()}}},c={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")}};function h(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.wV,c);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}(0,r.K2)(h,"createArchitectureServices")},7761(t,e,n){"use strict";n.d(e,{f:()=>h});var r=n(830),i=n(4628),a=n(9364),s=n(4298),o=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},l=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(t,e,n){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},c={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")}};function h(t=s.D){const e=(0,a.WQ)((0,i.u)(t),r.sr),n=(0,a.WQ)((0,i.t)({shared:e}),r.D_,c);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}(0,r.K2)(h,"createPieServices")},830(t,e,n){"use strict";n.d(e,{mR:()=>kn,dg:()=>wn,wV:()=>pn,Tm:()=>Tn,d$:()=>fn,FZ:()=>gn,sr:()=>dn,p5:()=>mn,D_:()=>yn,Bg:()=>vn,XE:()=>xn,K2:()=>T});var r=n(2479),i=n(4628),a=n(9364),s=n(2151),o=n(4298),l=n(7608);const c={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},h={AstReflection:()=>new s.QX};function u(t){const e=function(){const t=(0,a.WQ)((0,i.u)(o.D),h),e=(0,a.WQ)((0,i.t)({shared:t}),c);return t.ServiceRegistry.register(e),e}(),n=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(n,l.r.parse(`memory:/${n.name??"grammar"}.langium`)),n}var d,p,f,g,m,y,v,x=n(5033),b=n(1945),w=Object.defineProperty,T=(t,e)=>w(t,"name",{value:e,configurable:!0});(d||(d={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(p||(p={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(v||(v={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/};d.Terminals,p.Terminals,f.Terminals,g.Terminals,m.Terminals,y.Terminals,v.Terminals;var k="Architecture",E="accDescr",A="accTitle",_="edges",C="groups",S="junctions",R="services",L="title";T(function(t){return Xe.isInstance(t,k)},"isArchitecture");var D="Axis",I="label",N="name",M="Branch",O="name",P="order";T(function(t){return Xe.isInstance(t,M)},"isBranch");var $="Checkout",B="branch",F="CherryPicking",z="id",K="parent",q="tags",U="ClassDefStatement",j="className",Y="styleText",G="Commit",W="id",V="message",H="tags",X="type";T(function(t){return Xe.isInstance(t,G)},"isCommit");var Z="Curve",Q="entries",J="label",tt="name",et="Direction",nt="accDescr",rt="accTitle",it="dir",at="statements",st="title",ot="Edge",lt="lhsDir",ct="lhsGroup",ht="lhsId",ut="lhsInto",dt="rhsDir",pt="rhsGroup",ft="rhsId",gt="rhsInto",mt="title",yt="Entry",vt="axis",xt="value",bt="GitGraph",wt="accDescr",Tt="accTitle",kt="statements",Et="title";T(function(t){return Xe.isInstance(t,bt)},"isGitGraph");var At="Group",_t="icon",Ct="id",St="in",Rt="title",Lt="Info",Dt="accDescr",It="accTitle",Nt="title";T(function(t){return Xe.isInstance(t,Lt)},"isInfo");var Mt="Item",Ot="classSelector",Pt="name",$t="Junction",Bt="id",Ft="in",zt="Leaf",Kt="classSelector",qt="name",Ut="value",jt="Merge",Yt="branch",Gt="id",Wt="tags",Vt="type";T(function(t){return Xe.isInstance(t,jt)},"isMerge");var Ht="Option",Xt="name",Zt="value",Qt="Packet",Jt="accDescr",te="accTitle",ee="blocks",ne="title";T(function(t){return Xe.isInstance(t,Qt)},"isPacket");var re="PacketBlock",ie="bits",ae="end",se="label",oe="start";T(function(t){return Xe.isInstance(t,re)},"isPacketBlock");var le="Pie",ce="accDescr",he="accTitle",ue="sections",de="showData",pe="title";T(function(t){return Xe.isInstance(t,le)},"isPie");var fe="PieSection",ge="label",me="value";T(function(t){return Xe.isInstance(t,fe)},"isPieSection");var ye="Radar",ve="accDescr",xe="accTitle",be="axes",we="curves",Te="options",ke="title",Ee="Section",Ae="classSelector",_e="name",Ce="Service",Se="icon",Re="iconText",Le="id",De="in",Ie="title",Ne="Statement",Me="Treemap",Oe="accDescr",Pe="accTitle",$e="title",Be="TreemapRows";T(function(t){return Xe.isInstance(t,Me)},"isTreemap");var Fe,ze,Ke,qe,Ue,je,Ye,Ge="TreemapRow",We="indent",Ve="item",He=class extends r.kD{constructor(){super(...arguments),this.types={Architecture:{name:k,properties:{accDescr:{name:E},accTitle:{name:A},edges:{name:_,defaultValue:[]},groups:{name:C,defaultValue:[]},junctions:{name:S,defaultValue:[]},services:{name:R,defaultValue:[]},title:{name:L}},superTypes:[]},Axis:{name:D,properties:{label:{name:I},name:{name:N}},superTypes:[]},Branch:{name:M,properties:{name:{name:O},order:{name:P}},superTypes:[Ne]},Checkout:{name:$,properties:{branch:{name:B}},superTypes:[Ne]},CherryPicking:{name:F,properties:{id:{name:z},parent:{name:K},tags:{name:q,defaultValue:[]}},superTypes:[Ne]},ClassDefStatement:{name:U,properties:{className:{name:j},styleText:{name:Y}},superTypes:[]},Commit:{name:G,properties:{id:{name:W},message:{name:V},tags:{name:H,defaultValue:[]},type:{name:X}},superTypes:[Ne]},Curve:{name:Z,properties:{entries:{name:Q,defaultValue:[]},label:{name:J},name:{name:tt}},superTypes:[]},Direction:{name:et,properties:{accDescr:{name:nt},accTitle:{name:rt},dir:{name:it},statements:{name:at,defaultValue:[]},title:{name:st}},superTypes:[bt]},Edge:{name:ot,properties:{lhsDir:{name:lt},lhsGroup:{name:ct,defaultValue:!1},lhsId:{name:ht},lhsInto:{name:ut,defaultValue:!1},rhsDir:{name:dt},rhsGroup:{name:pt,defaultValue:!1},rhsId:{name:ft},rhsInto:{name:gt,defaultValue:!1},title:{name:mt}},superTypes:[]},Entry:{name:yt,properties:{axis:{name:vt,referenceType:D},value:{name:xt}},superTypes:[]},GitGraph:{name:bt,properties:{accDescr:{name:wt},accTitle:{name:Tt},statements:{name:kt,defaultValue:[]},title:{name:Et}},superTypes:[]},Group:{name:At,properties:{icon:{name:_t},id:{name:Ct},in:{name:St},title:{name:Rt}},superTypes:[]},Info:{name:Lt,properties:{accDescr:{name:Dt},accTitle:{name:It},title:{name:Nt}},superTypes:[]},Item:{name:Mt,properties:{classSelector:{name:Ot},name:{name:Pt}},superTypes:[]},Junction:{name:$t,properties:{id:{name:Bt},in:{name:Ft}},superTypes:[]},Leaf:{name:zt,properties:{classSelector:{name:Kt},name:{name:qt},value:{name:Ut}},superTypes:[Mt]},Merge:{name:jt,properties:{branch:{name:Yt},id:{name:Gt},tags:{name:Wt,defaultValue:[]},type:{name:Vt}},superTypes:[Ne]},Option:{name:Ht,properties:{name:{name:Xt},value:{name:Zt,defaultValue:!1}},superTypes:[]},Packet:{name:Qt,properties:{accDescr:{name:Jt},accTitle:{name:te},blocks:{name:ee,defaultValue:[]},title:{name:ne}},superTypes:[]},PacketBlock:{name:re,properties:{bits:{name:ie},end:{name:ae},label:{name:se},start:{name:oe}},superTypes:[]},Pie:{name:le,properties:{accDescr:{name:ce},accTitle:{name:he},sections:{name:ue,defaultValue:[]},showData:{name:de,defaultValue:!1},title:{name:pe}},superTypes:[]},PieSection:{name:fe,properties:{label:{name:ge},value:{name:me}},superTypes:[]},Radar:{name:ye,properties:{accDescr:{name:ve},accTitle:{name:xe},axes:{name:be,defaultValue:[]},curves:{name:we,defaultValue:[]},options:{name:Te,defaultValue:[]},title:{name:ke}},superTypes:[]},Section:{name:Ee,properties:{classSelector:{name:Ae},name:{name:_e}},superTypes:[Mt]},Service:{name:Ce,properties:{icon:{name:Se},iconText:{name:Re},id:{name:Le},in:{name:De},title:{name:Ie}},superTypes:[]},Statement:{name:Ne,properties:{},superTypes:[]},Treemap:{name:Me,properties:{accDescr:{name:Oe},accTitle:{name:Pe},title:{name:$e},TreemapRows:{name:Be,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Ge,properties:{indent:{name:We},item:{name:Ve}},superTypes:[]}}}static{T(this,"MermaidAstReflection")}},Xe=new He,Ze=T(()=>Fe??(Fe=u('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Qe=T(()=>ze??(ze=u('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),Je=T(()=>Ke??(Ke=u('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),tn=T(()=>qe??(qe=u('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),en=T(()=>Ue??(Ue=u('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),nn=T(()=>je??(je=u('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),rn=T(()=>Ye??(Ye=u('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),an={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sn={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},on={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ln={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cn={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hn={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},un={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dn={AstReflection:T(()=>new He,"AstReflection")},pn={Grammar:T(()=>Ze(),"Grammar"),LanguageMetaData:T(()=>an,"LanguageMetaData"),parser:{}},fn={Grammar:T(()=>Qe(),"Grammar"),LanguageMetaData:T(()=>sn,"LanguageMetaData"),parser:{}},gn={Grammar:T(()=>Je(),"Grammar"),LanguageMetaData:T(()=>on,"LanguageMetaData"),parser:{}},mn={Grammar:T(()=>tn(),"Grammar"),LanguageMetaData:T(()=>ln,"LanguageMetaData"),parser:{}},yn={Grammar:T(()=>en(),"Grammar"),LanguageMetaData:T(()=>cn,"LanguageMetaData"),parser:{}},vn={Grammar:T(()=>nn(),"Grammar"),LanguageMetaData:T(()=>hn,"LanguageMetaData"),parser:{}},xn={Grammar:T(()=>rn(),"Grammar"),LanguageMetaData:T(()=>un,"LanguageMetaData"),parser:{}},bn={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},wn=class extends x.d{static{T(this,"AbstractMermaidValueConverter")}runConverter(t,e,n){let r=this.runCommonConverter(t,e,n);return void 0===r&&(r=this.runCustomConverter(t,e,n)),void 0===r?super.runConverter(t,e,n):r}runCommonConverter(t,e,n){const r=bn[t.name];if(void 0===r)return;const i=r.exec(e);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},Tn=class extends wn{static{T(this,"CommonValueConverter")}runCustomConverter(t,e,n){}},kn=class extends b.Q{static{T(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,n){const r=super.buildKeywordTokens(t,e,n);return r.forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends kn{static{T(this,"CommonTokenBuilder")}})},6427(t,e,n){"use strict";n.d(e,{createGitGraphServices:()=>r.b});var r=n(6729);n(830)},6235(t,e,n){"use strict";n.d(e,{createInfoServices:()=>r.v});var r=n(1009);n(830)},5982(t,e,n){"use strict";n.d(e,{createPacketServices:()=>r.$});var r=n(6527);n(830)},3201(t,e,n){"use strict";n.d(e,{createPieServices:()=>r.f});var r=n(7761);n(830)},4736(t,e,n){"use strict";n.d(e,{createRadarServices:()=>r.f});var r=n(6299);n(830)},5187(t,e,n){"use strict";n.d(e,{createTreemapServices:()=>r.d});var r=n(1592);n(830)},8731(t,e,n){"use strict";n.d(e,{qg:()=>s});n(6729),n(1009),n(6527),n(7761),n(5877),n(6299),n(1592);var r=n(830),i={},a={info:(0,r.K2)(async()=>{const{createInfoServices:t}=await Promise.resolve().then(n.bind(n,6235)),e=t().Info.parser.LangiumParser;i.info=e},"info"),packet:(0,r.K2)(async()=>{const{createPacketServices:t}=await Promise.resolve().then(n.bind(n,5982)),e=t().Packet.parser.LangiumParser;i.packet=e},"packet"),pie:(0,r.K2)(async()=>{const{createPieServices:t}=await Promise.resolve().then(n.bind(n,3201)),e=t().Pie.parser.LangiumParser;i.pie=e},"pie"),architecture:(0,r.K2)(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(n.bind(n,8644)),e=t().Architecture.parser.LangiumParser;i.architecture=e},"architecture"),gitGraph:(0,r.K2)(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(n.bind(n,6427)),e=t().GitGraph.parser.LangiumParser;i.gitGraph=e},"gitGraph"),radar:(0,r.K2)(async()=>{const{createRadarServices:t}=await Promise.resolve().then(n.bind(n,4736)),e=t().Radar.parser.LangiumParser;i.radar=e},"radar"),treemap:(0,r.K2)(async()=>{const{createTreemapServices:t}=await Promise.resolve().then(n.bind(n,5187)),e=t().Treemap.parser.LangiumParser;i.treemap=e},"treemap")};async function s(t,e){const n=a[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);i[t]||await n();const r=i[t].parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o(r);return r.value}(0,r.K2)(s,"parse");var o=class extends Error{constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>`Lexer error on line ${void 0===t.line||isNaN(t.line)?"?":t.line}, column ${void 0===t.column||isNaN(t.column)?"?":t.column}: ${t.message}`).join("\n")} ${t.parserErrors.map(t=>`Parse error on line ${void 0===t.token.startLine||isNaN(t.token.startLine)?"?":t.token.startLine}, column ${void 0===t.token.startColumn||isNaN(t.token.startColumn)?"?":t.token.startColumn}: ${t.message}`).join("\n")}`),this.result=t}static{(0,r.K2)(this,"MermaidParseError")}}},724(t,e,n){"use strict";n.d(e,{ak:()=>j,mT:()=>Pr,LT:()=>Xe,jr:()=>Br,T6:()=>dr,JG:()=>$e,wL:()=>P,c$:()=>F,Y2:()=>q,$P:()=>z,Cy:()=>K,Pp:()=>U,BK:()=>Y,PW:()=>Me,my:()=>Je,jk:()=>En,Sk:()=>Be,G:()=>Qe});var r=n(8058),i=n(2866),a=n(6401),s=n(4722),o=n(9622),l=n(53);function c(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}const h=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a};var u=n(8593);const d=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||void 0===e?1:(0,u.A)(e),h(t,e<0?0:e,r)):[]};var p=n(9703),f=n(2851),g=n(2031),m=n(3767),y=n(8446),v=n(7271),x=n(7422),b=Object.prototype.hasOwnProperty;const w=(0,m.A)(function(t,e){if((0,v.A)(e)||(0,y.A)(e))(0,g.A)(e,(0,x.A)(e),t);else for(var n in e)b.call(e,n)&&(0,f.A)(t,n,e[n])});var T=n(5572),k=n(6307),E=n(5507),A=n(3973);const _=function(t,e){if(null==t)return{};var n=(0,T.A)((0,A.A)(t),function(t){return[t]});return e=(0,k.A)(e),(0,E.A)(t,n,function(t,n){return e(t,n[0])})};var C=n(9672),S=n(3098);const R=function(t){return(0,S.A)(t)&&"[object RegExp]"==(0,C.A)(t)};var L=n(2789),D=n(4841),I=D.A&&D.A.isRegExp;const N=I?(0,L.A)(I):R;function M(t){return e=t,(0,p.A)(e.LABEL)&&""!==e.LABEL?t.LABEL:t.name;var e}class O{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),(0,r.A)(this.definition,e=>{e.accept(t)})}}class P extends O{constructor(t){super([]),this.idx=1,w(this,_(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}}class $ extends O{constructor(t){super(t.definition),this.orgText="",w(this,_(t,t=>void 0!==t))}}class B extends O{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,w(this,_(t,t=>void 0!==t))}}class F extends O{constructor(t){super(t.definition),this.idx=1,w(this,_(t,t=>void 0!==t))}}class z extends O{constructor(t){super(t.definition),this.idx=1,w(this,_(t,t=>void 0!==t))}}class K extends O{constructor(t){super(t.definition),this.idx=1,w(this,_(t,t=>void 0!==t))}}class q extends O{constructor(t){super(t.definition),this.idx=1,w(this,_(t,t=>void 0!==t))}}class U extends O{constructor(t){super(t.definition),this.idx=1,w(this,_(t,t=>void 0!==t))}}class j extends O{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,w(this,_(t,t=>void 0!==t))}}class Y{constructor(t){this.idx=1,w(this,_(t,t=>void 0!==t))}accept(t){t.visit(this)}}function G(t){function e(t){return(0,s.A)(t,G)}if(t instanceof P){const e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return(0,p.A)(t.label)&&(e.label=t.label),e}if(t instanceof B)return{type:"Alternative",definition:e(t.definition)};if(t instanceof F)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof z)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof K)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:G(new Y({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof U)return{type:"RepetitionWithSeparator",idx:t.idx,separator:G(new Y({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof q)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof j)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Y){const e={type:"Terminal",name:t.terminalType.name,label:M(t.terminalType),idx:t.idx};(0,p.A)(t.label)&&(e.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=N(n)?n.source:n),e}if(t instanceof $)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class W{visit(t){const e=t;switch(e.constructor){case P:return this.visitNonTerminal(e);case B:return this.visitAlternative(e);case F:return this.visitOption(e);case z:return this.visitRepetitionMandatory(e);case K:return this.visitRepetitionMandatoryWithSeparator(e);case U:return this.visitRepetitionWithSeparator(e);case q:return this.visitRepetition(e);case j:return this.visitAlternation(e);case Y:return this.visitTerminal(e);case $:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}var V=n(3736),H=n(4288);const X=function(t,e){var n;return(0,H.A)(t,function(t,r,i){return!(n=e(t,r,i))}),!!n};var Z=n(2049),Q=n(6832);const J=function(t,e,n){var r=(0,Z.A)(t)?V.A:X;return n&&(0,Q.A)(t,e,n)&&(e=void 0),r(t,(0,k.A)(e,3))};var tt=n(5205),et=Math.max;const nt=function(t,e,n,r){t=(0,y.A)(t)?t:(0,i.A)(t),n=n&&!r?(0,u.A)(n):0;var a=t.length;return n<0&&(n=et(a+n,0)),(0,p.A)(t)?n<=a&&t.indexOf(e,n)>-1:!!a&&(0,tt.A)(t,e,n)>-1};const rt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0};const it=function(t,e){var n=!0;return(0,H.A)(t,function(t,r,i){return n=!!e(t,r,i)}),n};const at=function(t,e,n){var r=(0,Z.A)(t)?rt:it;return n&&(0,Q.A)(t,e,n)&&(e=void 0),r(t,(0,k.A)(e,3))};function st(t,e=[]){return!!(t instanceof F||t instanceof q||t instanceof U)||(t instanceof j?J(t.definition,t=>st(t,e)):!(t instanceof P&&nt(e,t))&&(t instanceof O&&(t instanceof P&&e.push(t),at(t.definition,t=>st(t,e)))))}function ot(t){if(t instanceof P)return"SUBRULE";if(t instanceof F)return"OPTION";if(t instanceof j)return"OR";if(t instanceof z)return"AT_LEAST_ONE";if(t instanceof K)return"AT_LEAST_ONE_SEP";if(t instanceof U)return"MANY_SEP";if(t instanceof q)return"MANY";if(t instanceof Y)return"CONSUME";throw Error("non exhaustive match")}class lt{walk(t,e=[]){(0,r.A)(t.definition,(n,r)=>{const i=d(t.definition,r+1);if(n instanceof P)this.walkProdRef(n,i,e);else if(n instanceof Y)this.walkTerminal(n,i,e);else if(n instanceof B)this.walkFlat(n,i,e);else if(n instanceof F)this.walkOption(n,i,e);else if(n instanceof z)this.walkAtLeastOne(n,i,e);else if(n instanceof K)this.walkAtLeastOneSep(n,i,e);else if(n instanceof U)this.walkManySep(n,i,e);else if(n instanceof q)this.walkMany(n,i,e);else{if(!(n instanceof j))throw Error("non exhaustive match");this.walkOr(n,i,e)}})}walkTerminal(t,e,n){}walkProdRef(t,e,n){}walkFlat(t,e,n){const r=e.concat(n);this.walk(t,r)}walkOption(t,e,n){const r=e.concat(n);this.walk(t,r)}walkAtLeastOne(t,e,n){const r=[new F({definition:t.definition})].concat(e,n);this.walk(t,r)}walkAtLeastOneSep(t,e,n){const r=ct(t,e,n);this.walk(t,r)}walkMany(t,e,n){const r=[new F({definition:t.definition})].concat(e,n);this.walk(t,r)}walkManySep(t,e,n){const r=ct(t,e,n);this.walk(t,r)}walkOr(t,e,n){const i=e.concat(n);(0,r.A)(t.definition,t=>{const e=new B({definition:[t]});this.walk(e,i)})}}function ct(t,e,n){return[new F({definition:[new Y({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var ht=n(7371);const ut=function(t){return t&&t.length?(0,ht.A)(t):[]};var dt=n(1717);function pt(t){if(t instanceof P)return pt(t.referencedRule);if(t instanceof Y)return[t.terminalType];if(function(t){return t instanceof B||t instanceof F||t instanceof q||t instanceof z||t instanceof K||t instanceof U||t instanceof Y||t instanceof $}(t))return function(t){let e=[];const n=t.definition;let r,i=0,a=n.length>i,s=!0;for(;a&&s;)r=n[i],s=st(r),e=e.concat(pt(r)),i+=1,a=n.length>i;return ut(e)}(t);if(function(t){return t instanceof j}(t))return function(t){const e=(0,s.A)(t.definition,t=>pt(t));return ut((0,dt.A)(e))}(t);throw Error("non exhaustive match")}const ft="_~IN~_";class gt extends lt{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,n){}walkProdRef(t,e,n){const r=(i=t.referencedRule,a=t.idx,i.name+a+ft+this.topProd.name);var i,a;const s=e.concat(n),o=pt(new B({definition:s}));this.follows[r]=o}}var mt=n(9592),yt=n(2607),vt=n(3068),xt=n(2634),bt=n(1790);const wt=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}};const Tt=function(t,e){return((0,Z.A)(t)?xt.A:bt.A)(t,wt((0,k.A)(e,3)))};var kt=n(9610),Et=Math.max;const At=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:(0,u.A)(n);return i<0&&(i=Et(r+i,0)),(0,tt.A)(t,e,i)};var _t=n(3130),Ct=n(4092),St=n(8300),Rt=n(5530),Lt=n(7809),Dt=n(4099);const It=function(t,e,n,r){var i=-1,a=Rt.A,s=!0,o=t.length,l=[],c=e.length;if(!o)return l;n&&(e=(0,T.A)(e,(0,L.A)(n))),r?(a=Lt.A,s=!1):e.length>=200&&(a=Dt.A,s=!1,e=new St.A(e));t:for(;++i<o;){var h=t[i],u=null==n?h:n(h);if(h=r||0!==h?h:0,s&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else a(e,u,r)||l.push(h)}return l};var Nt=n(7671),Mt=n(4326),Ot=n(3533),Pt=(0,Mt.A)(function(t,e){return(0,Ot.A)(t)?It(t,(0,Nt.A)(e,1,Ot.A,!0)):[]});const $t=Pt;const Bt=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i};const Ft=function(t){return t&&t.length?t[0]:void 0};var zt=n(473);function Kt(t){console&&console.error&&console.error(`Error: ${t}`)}function qt(t){console&&console.warn&&console.warn(`Warning: ${t}`)}let Ut={};const jt=new yt.H;function Yt(t){const e=t.toString();if(Ut.hasOwnProperty(e))return Ut[e];{const t=jt.pattern(e);return Ut[e]=t,t}}const Gt="Complement Sets are not supported for first char optimization",Wt='Unable to use "first char" lexer optimizations:\n';function Vt(t,e=!1){try{const e=Yt(t);return Ht(e.value,{},e.flags.ignoreCase)}catch(n){if(n.message===Gt)e&&qt(`${Wt}\tUnable to optimize: < ${t.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Kt(`${Wt}\n\tFailed parsing: < ${t.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Ht(t,e,n){switch(t.type){case"Disjunction":for(let r=0;r<t.value.length;r++)Ht(t.value[r],e,n);break;case"Alternative":const i=t.value;for(let t=0;t<i.length;t++){const a=i[t];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const s=a;switch(s.type){case"Character":Xt(s.value,e,n);break;case"Set":if(!0===s.complement)throw Error(Gt);(0,r.A)(s.value,t=>{if("number"==typeof t)Xt(t,e,n);else{const r=t;if(!0===n)for(let t=r.from;t<=r.to;t++)Xt(t,e,n);else{for(let t=r.from;t<=r.to&&t<ve;t++)Xt(t,e,n);if(r.to>=ve){const t=r.from>=ve?r.from:ve,n=r.to,i=be(t),a=be(n);for(let r=i;r<=a;r++)e[r]=r}}}});break;case"Group":Ht(s.value,e,n);break;default:throw Error("Non Exhaustive Match")}const o=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===Qt(s)||"Group"!==s.type&&!1===o)break}break;default:throw Error("non exhaustive match!")}return(0,i.A)(e)}function Xt(t,e,n){const r=be(t);e[r]=r,!0===n&&function(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const t=be(r.charCodeAt(0));e[t]=t}else{const t=n.toLowerCase();if(t!==n){const n=be(t.charCodeAt(0));e[n]=n}}}(t,e)}function Zt(t,e){return(0,zt.A)(t.value,t=>{if("number"==typeof t)return nt(e,t);{const n=t;return void 0!==(0,zt.A)(e,t=>n.from<=t&&t<=n.to)}})}function Qt(t){const e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&((0,Z.A)(t.value)?at(t.value,Qt):Qt(t.value))}class Jt extends yt.z{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t);case"Lookbehind":return void this.visitLookbehind(t);case"NegativeLookbehind":return void this.visitNegativeLookbehind(t)}super.visitChildren(t)}}visitCharacter(t){nt(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Zt(t,this.targetCharCodes)&&(this.found=!0):void 0!==Zt(t,this.targetCharCodes)&&(this.found=!0)}}function te(t,e){if(e instanceof RegExp){const n=Yt(e),r=new Jt(t);return r.visit(n),r.found}return void 0!==(0,zt.A)(e,e=>nt(t,e.charCodeAt(0)))}const ee="PATTERN",ne="defaultMode",re="modes";let ie="boolean"==typeof new RegExp("(?:)").sticky;function ae(t,e){const n=(e=(0,vt.A)(e,{useSticky:ie,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(t,e)=>e()})).tracer;let i;n("initCharCodeToOptimizedIndexMap",()=>{!function(){if((0,a.A)(xe)){xe=new Array(65536);for(let t=0;t<65536;t++)xe[t]=t>255?255+~~(t/255):t}}()}),n("Reject Lexer.NA",()=>{i=Tt(t,t=>t[ee]===$e.NA)});let l,c,h,u,d,f,g,m,y,v,x,b=!1;n("Transform Patterns",()=>{b=!1,l=(0,s.A)(i,t=>{const n=t[ee];if(N(n)){const t=n.source;return 1!==t.length||"^"===t||"$"===t||"."===t||n.ignoreCase?2!==t.length||"\\"!==t[0]||nt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?e.useSticky?he(n):ce(n):t[1]:t}if((0,kt.A)(n))return b=!0,{exec:n};if("object"==typeof n)return b=!0,n;if("string"==typeof n){if(1===n.length)return n;{const t=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(t);return e.useSticky?he(r):ce(r)}}throw Error("non exhaustive match")})}),n("misc mapping",()=>{c=(0,s.A)(i,t=>t.tokenTypeIdx),h=(0,s.A)(i,t=>{const e=t.GROUP;if(e!==$e.SKIPPED){if((0,p.A)(e))return e;if((0,mt.A)(e))return!1;throw Error("non exhaustive match")}}),u=(0,s.A)(i,t=>{const e=t.LONGER_ALT;if(e){return(0,Z.A)(e)?(0,s.A)(e,t=>At(i,t)):[At(i,e)]}}),d=(0,s.A)(i,t=>t.PUSH_MODE),f=(0,s.A)(i,t=>(0,o.A)(t,"POP_MODE"))}),n("Line Terminator Handling",()=>{const t=me(e.lineTerminatorCharacters);g=(0,s.A)(i,t=>!1),"onlyOffset"!==e.positionTracking&&(g=(0,s.A)(i,e=>(0,o.A)(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===ge(e,t)&&te(t,e.PATTERN)))}),n("Misc Mapping #2",()=>{m=(0,s.A)(i,de),y=(0,s.A)(l,pe),v=(0,_t.A)(i,(t,e)=>{const n=e.GROUP;return(0,p.A)(n)&&n!==$e.SKIPPED&&(t[n]=[]),t},{}),x=(0,s.A)(l,(t,e)=>({pattern:l[e],longerAlt:u[e],canLineTerminator:g[e],isCustom:m[e],short:y[e],group:h[e],push:d[e],pop:f[e],tokenTypeIdx:c[e],tokenType:i[e]}))});let w=!0,T=[];return e.safeMode||n("First Char Optimization",()=>{T=(0,_t.A)(i,(t,n,i)=>{if("string"==typeof n.PATTERN){const e=be(n.PATTERN.charCodeAt(0));ye(t,e,x[i])}else if((0,Z.A)(n.START_CHARS_HINT)){let e;(0,r.A)(n.START_CHARS_HINT,n=>{const r=be("string"==typeof n?n.charCodeAt(0):n);e!==r&&(e=r,ye(t,r,x[i]))})}else if(N(n.PATTERN))if(n.PATTERN.unicode)w=!1,e.ensureOptimizations&&Kt(`${Wt}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const s=Vt(n.PATTERN,e.ensureOptimizations);(0,a.A)(s)&&(w=!1),(0,r.A)(s,e=>{ye(t,e,x[i])})}else e.ensureOptimizations&&Kt(`${Wt}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return t},[])}),{emptyGroups:v,patternIdxToConfig:x,charCodeToPatternIdxToConfig:T,hasCustom:b,canBeOptimized:w}}function se(t,e){let n=[];const i=function(t){const e=(0,Ct.A)(t,t=>!(0,o.A)(t,ee)),n=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Oe.MISSING_PATTERN,tokenTypes:[t]})),r=$t(t,e);return{errors:n,valid:r}}(t);n=n.concat(i.errors);const a=function(t){const e=(0,Ct.A)(t,t=>{const e=t[ee];return!(N(e)||(0,kt.A)(e)||(0,o.A)(e,"exec")||(0,p.A)(e))}),n=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Oe.INVALID_PATTERN,tokenTypes:[t]})),r=$t(t,e);return{errors:n,valid:r}}(i.valid),l=a.valid;return n=n.concat(a.errors),n=n.concat(function(t){let e=[];const n=(0,Ct.A)(t,t=>N(t[ee]));return e=e.concat(function(t){class e extends yt.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}const n=(0,Ct.A)(t,t=>{const n=t.PATTERN;try{const t=Yt(n),r=new e;return r.visit(t),r.found}catch(r){return oe.test(n.source)}}),r=(0,s.A)(n,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Oe.EOI_ANCHOR_FOUND,tokenTypes:[t]}));return r}(n)),e=e.concat(function(t){class e extends yt.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}const n=(0,Ct.A)(t,t=>{const n=t.PATTERN;try{const t=Yt(n),r=new e;return r.visit(t),r.found}catch(r){return le.test(n.source)}}),r=(0,s.A)(n,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Oe.SOI_ANCHOR_FOUND,tokenTypes:[t]}));return r}(n)),e=e.concat(function(t){const e=(0,Ct.A)(t,t=>{const e=t[ee];return e instanceof RegExp&&(e.multiline||e.global)}),n=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Oe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}));return n}(n)),e=e.concat(function(t){const e=[];let n=(0,s.A)(t,n=>(0,_t.A)(t,(t,r)=>(n.PATTERN.source!==r.PATTERN.source||nt(e,r)||r.PATTERN===$e.NA||(e.push(r),t.push(r)),t),[]));n=Bt(n);const r=(0,Ct.A)(n,t=>t.length>1),i=(0,s.A)(r,t=>{const e=(0,s.A)(t,t=>t.name);return{message:`The same RegExp pattern ->${Ft(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Oe.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}});return i}(n)),e=e.concat(function(t){const e=(0,Ct.A)(t,t=>t.PATTERN.test("")),n=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Oe.EMPTY_MATCH_PATTERN,tokenTypes:[t]}));return n}(n)),e}(l)),n=n.concat(function(t){const e=(0,Ct.A)(t,t=>{if(!(0,o.A)(t,"GROUP"))return!1;const e=t.GROUP;return e!==$e.SKIPPED&&e!==$e.NA&&!(0,p.A)(e)}),n=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Oe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}));return n}(l)),n=n.concat(function(t,e){const n=(0,Ct.A)(t,t=>void 0!==t.PUSH_MODE&&!nt(e,t.PUSH_MODE)),r=(0,s.A)(n,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Oe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}));return r}(l,e)),n=n.concat(function(t){const e=[],n=(0,_t.A)(t,(t,e,n)=>{const r=e.PATTERN;return r===$e.NA||((0,p.A)(r)?t.push({str:r,idx:n,tokenType:e}):N(r)&&function(t){const e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===(0,zt.A)(e,e=>-1!==t.source.indexOf(e))}(r)&&t.push({str:r.source,idx:n,tokenType:e})),t},[]);return(0,r.A)(t,(t,i)=>{(0,r.A)(n,({str:n,idx:r,tokenType:a})=>{if(i<r&&function(t,e){if(N(e)){if(/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source))return!1;const n=e.exec(t);return null!==n&&0===n.index}if((0,kt.A)(e))return e(t,0,[],{});if((0,o.A)(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}(n,t.PATTERN)){const n=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${t.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:n,type:Oe.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}})}),e}(l)),n}const oe=/[^\\][$]/;const le=/[^\\[][\^]|^\^/;function ce(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function he(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function ue(t,e,n){const a=[];let s=!1;const l=Bt((0,dt.A)((0,i.A)(t.modes))),c=Tt(l,t=>t[ee]===$e.NA),h=me(n);return e&&(0,r.A)(c,t=>{const e=ge(t,h);if(!1!==e){const n=function(t,e){if(e.issue===Oe.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${t.name}> Token Type\n\t Root cause: ${e.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Oe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${t.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(t,e),r={message:n,type:e.issue,tokenType:t};a.push(r)}else(0,o.A)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(s=!0):te(h,t.PATTERN)&&(s=!0)}),e&&!s&&a.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Oe.NO_LINE_BREAKS_FLAGS}),a}function de(t){const e=t.PATTERN;if(N(e))return!1;if((0,kt.A)(e))return!0;if((0,o.A)(e,"exec"))return!0;if((0,p.A)(e))return!1;throw Error("non exhaustive match")}function pe(t){return!(!(0,p.A)(t)||1!==t.length)&&t.charCodeAt(0)}const fe={test:function(t){const e=t.length;for(let n=this.lastIndex;n<e;n++){const e=t.charCodeAt(n);if(10===e)return this.lastIndex=n+1,!0;if(13===e)return 10===t.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function ge(t,e){if((0,o.A)(t,"LINE_BREAKS"))return!1;if(N(t.PATTERN)){try{te(e,t.PATTERN)}catch(n){return{issue:Oe.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}if((0,p.A)(t.PATTERN))return!1;if(de(t))return{issue:Oe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function me(t){return(0,s.A)(t,t=>(0,p.A)(t)?t.charCodeAt(0):t)}function ye(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}const ve=256;let xe=[];function be(t){return t<ve?t:xe[t]}var we=n(9008),Te=n(9921),ke=n(6666);function Ee(t){const e=(new Date).getTime(),n=t();return{time:(new Date).getTime()-e,value:n}}function Ae(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function _e(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let Ce=1;const Se={};function Re(t){const e=function(t){let e=(0,l.A)(t),n=t,r=!0;for(;r;){n=Bt((0,dt.A)((0,s.A)(n,t=>t.CATEGORIES)));const t=$t(n,e);e=e.concat(t),(0,a.A)(t)?r=!1:n=t}return e}(t);!function(t){(0,r.A)(t,t=>{var e;De(t)||(Se[Ce]=t,t.tokenTypeIdx=Ce++),Ie(t)&&!(0,Z.A)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ie(t)||(t.CATEGORIES=[]),e=t,(0,o.A)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return(0,o.A)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})})}(e),function(t){(0,r.A)(t,t=>{Le([],t)})}(e),function(t){(0,r.A)(t,t=>{t.categoryMatches=[],(0,r.A)(t.categoryMatchesMap,(e,n)=>{t.categoryMatches.push(Se[n].tokenTypeIdx)})})}(e),(0,r.A)(e,t=>{t.isParent=t.categoryMatches.length>0})}function Le(t,e){(0,r.A)(t,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,r.A)(e.CATEGORIES,n=>{const r=t.concat(e);nt(r,n)||Le(r,n)})}function De(t){return(0,o.A)(t,"tokenTypeIdx")}function Ie(t){return(0,o.A)(t,"CATEGORIES")}function Ne(t){return(0,o.A)(t,"tokenTypeIdx")}const Me={buildUnableToPopLexerModeMessage:t=>`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(t,e,n,r,i,a)=>`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`};var Oe;!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(Oe||(Oe={}));const Pe={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Me,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Pe);class $e{constructor(t,e=Pe){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${t}>`);const{time:r,value:i}=Ee(e),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=w({},Pe,e);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Pe.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fe;else if(this.config.lineTerminatorCharacters===Pe.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,Z.A)(t)?n={modes:{defaultMode:(0,l.A)(t)},defaultMode:ne}:(i=!1,n=(0,l.A)(t))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(t){const e=[];return(0,o.A)(t,ne)||e.push({message:"A MultiMode Lexer cannot be initialized without a <"+ne+"> property in its definition\n",type:Oe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,o.A)(t,re)||e.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:Oe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,o.A)(t,re)&&(0,o.A)(t,ne)&&!(0,o.A)(t.modes,t.defaultMode)&&e.push({message:`A MultiMode Lexer cannot be initialized with a ${ne}: <${t.defaultMode}>which does not exist\n`,type:Oe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,o.A)(t,re)&&(0,r.A)(t.modes,(t,n)=>{(0,r.A)(t,(i,a)=>{if((0,mt.A)(i))e.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${a}>\n`,type:Oe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,o.A)(i,"LONGER_ALT")){const a=(0,Z.A)(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];(0,r.A)(a,r=>{(0,mt.A)(r)||nt(t,r)||e.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${r.name}> on token <${i.name}> outside of mode <${n}>\n`,type:Oe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),e}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(ue(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},(0,r.A)(n.modes,(t,e)=>{n.modes[e]=Tt(t,t=>(0,mt.A)(t))});const h=(0,x.A)(n.modes);if((0,r.A)(n.modes,(t,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(se(t,h))}),(0,a.A)(this.lexerDefinitionErrors)){let r;Re(t),this.TRACE_INIT("analyzeTokenTypes",()=>{r=ae(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=w({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!(0,a.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const t=(0,s.A)(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}(0,r.A)(this.lexerDefinitionWarning,t=>{qt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(ie?(this.chopInput=we.A,this.match=this.matchWithTest):(this.updateLastIndex=Te.A,this.match=this.matchWithExec),i&&(this.handleModes=Te.A),!1===this.trackStartLines&&(this.computeNewColumn=we.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Te.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const t=(0,_t.A)(this.canModeBeOptimized,(t,e,n)=>(!1===e&&t.push(n),t),[]);if(e.ensureOptimizations&&!(0,a.A)(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Ut={}}),this.TRACE_INIT("toFastProperties",()=>{c(this)})})}tokenize(t,e=this.defaultMode){if(!(0,a.A)(this.lexerDefinitionErrors)){const t=(0,s.A)(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(t,e)}tokenizeInternal(t,e){let n,i,a,s,o,l,c,h,u,d,p,f,g,m,y;const v=t,b=v.length;let w=0,T=0;const k=this.hasCustom?0:Math.floor(t.length/10),E=new Array(k),A=[];let _=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=function(t){const e={},n=(0,x.A)(t);return(0,r.A)(n,n=>{const r=t[n];if(!(0,Z.A)(r))throw Error("non exhaustive match");e[n]=[]}),e}(this.emptyGroups),R=this.trackStartLines,L=this.config.lineTerminatorsPattern;let D=0,I=[],N=[];const M=[],O=[];let P;function $(){return I}function B(t){const e=be(t),n=N[e];return void 0===n?O:n}Object.freeze(O);const F=t=>{if(1===M.length&&void 0===t.tokenType.PUSH_MODE){const e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);A.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})}else{M.pop();const t=(0,ke.A)(M);I=this.patternIdxToConfig[t],N=this.charCodeToPatternIdxToConfig[t],D=I.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;P=N&&e?B:$}};function z(t){M.push(t),N=this.charCodeToPatternIdxToConfig[t],I=this.patternIdxToConfig[t],D=I.length,D=I.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;P=N&&e?B:$}let K;z.call(this,e);const q=this.config.recoveryEnabled;for(;w<b;){l=null;const e=v.charCodeAt(w),r=P(e),x=r.length;for(n=0;n<x;n++){K=r[n];const i=K.pattern;c=null;const u=K.short;if(!1!==u?e===u&&(l=i):!0===K.isCustom?(y=i.exec(v,w,E,S),null!==y?(l=y[0],void 0!==y.payload&&(c=y.payload)):l=null):(this.updateLastIndex(i,w),l=this.match(i,t,w)),null!==l){if(o=K.longerAlt,void 0!==o){const e=o.length;for(a=0;a<e;a++){const e=I[o[a]],n=e.pattern;if(h=null,!0===e.isCustom?(y=n.exec(v,w,E,S),null!==y?(s=y[0],void 0!==y.payload&&(h=y.payload)):s=null):(this.updateLastIndex(n,w),s=this.match(n,t,w)),s&&s.length>l.length){l=s,c=h,K=e;break}}}break}}if(null!==l){if(u=l.length,d=K.group,void 0!==d&&(p=K.tokenTypeIdx,f=this.createTokenInstance(l,w,p,K.tokenType,_,C,u),this.handlePayload(f,c),!1===d?T=this.addToken(E,T,f):S[d].push(f)),t=this.chopInput(t,u),w+=u,C=this.computeNewColumn(C,u),!0===R&&!0===K.canLineTerminator){let t,e,n=0;L.lastIndex=0;do{t=L.test(l),!0===t&&(e=L.lastIndex-1,n++)}while(!0===t);0!==n&&(_+=n,C=u-e,this.updateTokenEndLineColumnLocation(f,d,e,n,_,C,u))}this.handleModes(K,F,z,f)}else{const e=w,n=_,r=C;let a=!1===q;for(;!1===a&&w<b;)for(t=this.chopInput(t,1),w++,i=0;i<D;i++){const e=I[i],n=e.pattern,r=e.short;if(!1!==r?v.charCodeAt(w)===r&&(a=!0):!0===e.isCustom?a=null!==n.exec(v,w,E,S):(this.updateLastIndex(n,w),a=null!==n.exec(t)),!0===a)break}if(g=w-e,C=this.computeNewColumn(C,g),m=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,e,g,n,r,(0,ke.A)(M)),A.push({offset:e,line:n,column:r,length:g,message:m}),!1===q)break}}return this.hasCustom||(E.length=T),{tokens:E,groups:S,errors:A}}handleModes(t,e,n,r){if(!0===t.pop){const i=t.push;e(r),void 0!==i&&n.call(this,i)}else void 0!==t.push&&n.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,n,r,i,a,s){let o,l;void 0!==e&&(o=n===s-1,l=o?-1:0,1===r&&!0===o||(t.endLine=i+l,t.endColumn=a-1-l))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,n,r){return{image:t,startOffset:e,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(t,e,n,r,i,a){return{image:t,startOffset:e,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(t,e,n,r,i,a,s){return{image:t,startOffset:e,endOffset:e+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(t,e,n){return t.push(n),e}addTokenUsingMemberAccess(t,e,n){return t[e]=n,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,n){return!0===t.test(e)?e.substring(n,t.lastIndex):null}matchWithExec(t,e){const n=t.exec(e);return null!==n?n[0]:null}}function Be(t){return Fe(t)?t.LABEL:t.name}function Fe(t){return(0,p.A)(t.LABEL)&&""!==t.LABEL}$e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",$e.NA=/NOT_APPLICABLE/;const ze="parent",Ke="categories",qe="label",Ue="group",je="push_mode",Ye="pop_mode",Ge="longer_alt",We="line_breaks",Ve="start_chars_hint";function He(t){return function(t){const e=t.pattern,n={};n.name=t.name,(0,mt.A)(e)||(n.PATTERN=e);if((0,o.A)(t,ze))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";(0,o.A)(t,Ke)&&(n.CATEGORIES=t[Ke]);Re([n]),(0,o.A)(t,qe)&&(n.LABEL=t[qe]);(0,o.A)(t,Ue)&&(n.GROUP=t[Ue]);(0,o.A)(t,Ye)&&(n.POP_MODE=t[Ye]);(0,o.A)(t,je)&&(n.PUSH_MODE=t[je]);(0,o.A)(t,Ge)&&(n.LONGER_ALT=t[Ge]);(0,o.A)(t,We)&&(n.LINE_BREAKS=t[We]);(0,o.A)(t,Ve)&&(n.START_CHARS_HINT=t[Ve]);return n}(t)}const Xe=He({name:"EOF",pattern:$e.NA});function Ze(t,e,n,r,i,a,s,o){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Qe(t,e){return Ae(t,e)}Re([Xe]);const Je={buildMismatchTokenMessage:({expected:t,actual:e,previous:n,ruleName:r})=>`Expecting ${Fe(t)?`--\x3e ${Be(t)} <--`:`token of type --\x3e ${t.name} <--`} but found --\x3e '${e.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:t,ruleName:e})=>"Redundant input, expecting EOF but found: "+t.image,buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:r,ruleName:i}){const a="Expecting: ",o="\nbut found: '"+Ft(e).image+"'";if(r)return a+r+o;{const e=(0,_t.A)(t,(t,e)=>t.concat(e),[]),n=(0,s.A)(e,t=>`[${(0,s.A)(t,t=>Be(t)).join(", ")}]`);return a+`one of these possible Token sequences:\n${(0,s.A)(n,(t,e)=>` ${e+1}. ${t}`).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",a="\nbut found: '"+Ft(e).image+"'";if(n)return i+n+a;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,s.A)(t,t=>`[${(0,s.A)(t,t=>Be(t)).join(",")}]`).join(" ,")}>`+a}};Object.freeze(Je);const tn={buildRuleNotFoundError:(t,e)=>"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"},en={buildDuplicateFoundError(t,e){const n=t.name,r=Ft(e),i=r.idx,a=ot(r),s=(o=r)instanceof Y?o.terminalType.name:o instanceof P?o.nonTerminalName:"";var o;let l=`->${a}${i>0?i:""}<- ${s?`with argument: ->${s}<-`:""}\n appears more than once (${e.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:t=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(t){const e=(0,s.A)(t.prefixPath,t=>Be(t)).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){const e=(0,s.A)(t.prefixPath,t=>Be(t)).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(t){let e=ot(t.repetition);0!==t.repetition.idx&&(e+=t.repetition.idx);return`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:t=>"deprecated",buildEmptyAlternationError:t=>`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:t=>`An Alternation cannot have more than 256 alternatives:\n<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(t){const e=t.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${e} --\x3e ${(0,s.A)(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:t=>"deprecated",buildDuplicateRuleNameError(t){let e;e=t.topLevelRule instanceof $?t.topLevelRule.name:t.topLevelRule;return`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};class nn extends W{constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){(0,r.A)((0,i.A)(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){const e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{const e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:e,type:Mr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}var rn=n(8139),an=n(2528);const sn=function(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var s=t[i];e(r,s,n(s),t)}return r};const on=function(t,e,n,r){return(0,H.A)(t,function(t,i,a){e(r,t,n(t),a)}),r};const ln=function(t,e){return function(n,r){var i=(0,Z.A)(n)?sn:on,a=e?e():{};return i(n,t,(0,k.A)(r,2),a)}};var cn=Object.prototype.hasOwnProperty;const hn=ln(function(t,e,n){cn.call(t,n)?t[n].push(e):(0,an.A)(t,n,[e])});const un=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||void 0===e?1:(0,u.A)(e),h(t,0,(e=r-e)<0?0:e)):[]};class dn extends lt{constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,l.A)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,l.A)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){const r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}}updateExpectedNext(){(0,a.A)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class pn extends dn{constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){const t=e.concat(n),r=new B({definition:t});this.possibleTokTypes=pt(r),this.found=!0}}}class fn extends lt{constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class gn extends fn{walkMany(t,e,n){if(t.idx===this.occurrence){const t=Ft(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof Y&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkMany(t,e,n)}}class mn extends fn{walkManySep(t,e,n){if(t.idx===this.occurrence){const t=Ft(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof Y&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkManySep(t,e,n)}}class yn extends fn{walkAtLeastOne(t,e,n){if(t.idx===this.occurrence){const t=Ft(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof Y&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOne(t,e,n)}}class vn extends fn{walkAtLeastOneSep(t,e,n){if(t.idx===this.occurrence){const t=Ft(e.concat(n));this.result.isEndOfRule=void 0===t,t instanceof Y&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOneSep(t,e,n)}}function xn(t,e,n=[]){n=(0,l.A)(n);let i=[],s=0;function o(r){const a=xn(r.concat(d(t,s+1)),e,n);return i.concat(a)}for(;n.length<e&&s<t.length;){const e=t[s];if(e instanceof B)return o(e.definition);if(e instanceof P)return o(e.definition);if(e instanceof F)i=o(e.definition);else{if(e instanceof z){return o(e.definition.concat([new q({definition:e.definition})]))}if(e instanceof K){return o([new B({definition:e.definition}),new q({definition:[new Y({terminalType:e.separator})].concat(e.definition)})])}if(e instanceof U){const t=e.definition.concat([new q({definition:[new Y({terminalType:e.separator})].concat(e.definition)})]);i=o(t)}else if(e instanceof q){const t=e.definition.concat([new q({definition:e.definition})]);i=o(t)}else{if(e instanceof j)return(0,r.A)(e.definition,t=>{!1===(0,a.A)(t.definition)&&(i=o(t.definition))}),i;if(!(e instanceof Y))throw Error("non exhaustive match");n.push(e.terminalType)}}s++}return i.push({partialPath:n,suffixDef:d(t,s)}),i}function bn(t,e,n,r){const i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE";let c=!1;const h=e.length,u=h-r-1,p=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!(0,a.A)(f);){const t=f.pop();if(t===o){c&&(0,ke.A)(f).idx<=u&&f.pop();continue}const r=t.def,g=t.idx,m=t.ruleStack,y=t.occurrenceStack;if((0,a.A)(r))continue;const v=r[0];if(v===i){const t={idx:g,def:d(r),ruleStack:un(m),occurrenceStack:un(y)};f.push(t)}else if(v instanceof Y)if(g<h-1){const t=g+1;if(n(e[t],v.terminalType)){const e={idx:t,def:d(r),ruleStack:m,occurrenceStack:y};f.push(e)}}else{if(g!==h-1)throw Error("non exhaustive match");p.push({nextTokenType:v.terminalType,nextTokenOccurrence:v.idx,ruleStack:m,occurrenceStack:y}),c=!0}else if(v instanceof P){const t=(0,l.A)(m);t.push(v.nonTerminalName);const e=(0,l.A)(y);e.push(v.idx);const n={idx:g,def:v.definition.concat(s,d(r)),ruleStack:t,occurrenceStack:e};f.push(n)}else if(v instanceof F){const t={idx:g,def:d(r),ruleStack:m,occurrenceStack:y};f.push(t),f.push(o);const e={idx:g,def:v.definition.concat(d(r)),ruleStack:m,occurrenceStack:y};f.push(e)}else if(v instanceof z){const t=new q({definition:v.definition,idx:v.idx}),e={idx:g,def:v.definition.concat([t],d(r)),ruleStack:m,occurrenceStack:y};f.push(e)}else if(v instanceof K){const t=new Y({terminalType:v.separator}),e=new q({definition:[t].concat(v.definition),idx:v.idx}),n={idx:g,def:v.definition.concat([e],d(r)),ruleStack:m,occurrenceStack:y};f.push(n)}else if(v instanceof U){const t={idx:g,def:d(r),ruleStack:m,occurrenceStack:y};f.push(t),f.push(o);const e=new Y({terminalType:v.separator}),n=new q({definition:[e].concat(v.definition),idx:v.idx}),i={idx:g,def:v.definition.concat([n],d(r)),ruleStack:m,occurrenceStack:y};f.push(i)}else if(v instanceof q){const t={idx:g,def:d(r),ruleStack:m,occurrenceStack:y};f.push(t),f.push(o);const e=new q({definition:v.definition,idx:v.idx}),n={idx:g,def:v.definition.concat([e],d(r)),ruleStack:m,occurrenceStack:y};f.push(n)}else if(v instanceof j)for(let e=v.definition.length-1;e>=0;e--){const t={idx:g,def:v.definition[e].definition.concat(d(r)),ruleStack:m,occurrenceStack:y};f.push(t),f.push(o)}else if(v instanceof B)f.push({idx:g,def:v.definition.concat(d(r)),ruleStack:m,occurrenceStack:y});else{if(!(v instanceof $))throw Error("non exhaustive match");f.push(wn(v,g,m,y))}}return p}function wn(t,e,n,r){const i=(0,l.A)(n);i.push(t.name);const a=(0,l.A)(r);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var Tn;function kn(t){if(t instanceof F||"Option"===t)return Tn.OPTION;if(t instanceof q||"Repetition"===t)return Tn.REPETITION;if(t instanceof z||"RepetitionMandatory"===t)return Tn.REPETITION_MANDATORY;if(t instanceof K||"RepetitionMandatoryWithSeparator"===t)return Tn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof U||"RepetitionWithSeparator"===t)return Tn.REPETITION_WITH_SEPARATOR;if(t instanceof j||"Alternation"===t)return Tn.ALTERNATION;throw Error("non exhaustive match")}function En(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,a=kn(r);return a===Tn.ALTERNATION?Nn(e,n,i):Mn(e,n,a,i)}function An(t,e,n,i){const a=t.length,l=at(t,t=>at(t,t=>1===t.length));if(e)return function(e){const r=(0,s.A)(e,t=>t.GATE);for(let i=0;i<a;i++){const e=t[i],a=e.length,s=r[i];if(void 0===s||!1!==s.call(this))t:for(let t=0;t<a;t++){const r=e[t],a=r.length;for(let t=0;t<a;t++){const e=this.LA(t+1);if(!1===n(e,r[t]))continue t}return i}}};if(l&&!i){const e=(0,s.A)(t,t=>(0,dt.A)(t)),n=(0,_t.A)(e,(t,e,n)=>((0,r.A)(e,e=>{(0,o.A)(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=n),(0,r.A)(e.categoryMatches,e=>{(0,o.A)(t,e)||(t[e]=n)})}),t),{});return function(){const t=this.LA(1);return n[t.tokenTypeIdx]}}return function(){for(let e=0;e<a;e++){const r=t[e],i=r.length;t:for(let t=0;t<i;t++){const i=r[t],a=i.length;for(let t=0;t<a;t++){const e=this.LA(t+1);if(!1===n(e,i[t]))continue t}return e}}}}function _n(t,e,n){const i=at(t,t=>1===t.length),s=t.length;if(i&&!n){const e=(0,dt.A)(t);if(1===e.length&&(0,a.A)(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=(0,_t.A)(e,(t,e,n)=>(t[e.tokenTypeIdx]=!0,(0,r.A)(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){t:for(let n=0;n<s;n++){const r=t[n],i=r.length;for(let t=0;t<i;t++){const n=this.LA(t+1);if(!1===e(n,r[t]))continue t}return!0}return!1}}!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(Tn||(Tn={}));class Cn extends lt{constructor(t,e,n){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)}walkOption(t,e,n){this.checkIsTarget(t,Tn.OPTION,e,n)||super.walkOption(t,e,n)}walkAtLeastOne(t,e,n){this.checkIsTarget(t,Tn.REPETITION_MANDATORY,e,n)||super.walkOption(t,e,n)}walkAtLeastOneSep(t,e,n){this.checkIsTarget(t,Tn.REPETITION_MANDATORY_WITH_SEPARATOR,e,n)||super.walkOption(t,e,n)}walkMany(t,e,n){this.checkIsTarget(t,Tn.REPETITION,e,n)||super.walkOption(t,e,n)}walkManySep(t,e,n){this.checkIsTarget(t,Tn.REPETITION_WITH_SEPARATOR,e,n)||super.walkOption(t,e,n)}}class Sn extends W{constructor(t,e,n){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=n,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Tn.OPTION)}visitRepetition(t){this.checkIsTarget(t,Tn.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Tn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Tn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Tn.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Tn.ALTERNATION)}}function Rn(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function Ln(t){let e=[""];for(let n=0;n<t.length;n++){const r=t[n],i=[];for(let t=0;t<e.length;t++){const n=e[t];i.push(n+"_"+r.tokenTypeIdx);for(let t=0;t<r.categoryMatches.length;t++){const e="_"+r.categoryMatches[t];i.push(n+e)}}e=i}return e}function Dn(t,e,n){for(let r=0;r<t.length;r++){if(r===n)continue;const i=t[r];for(let t=0;t<e.length;t++){if(!0===i[e[t]])return!1}}return!0}function In(t,e){const n=(0,s.A)(t,t=>xn([t],1)),i=Rn(n.length),o=(0,s.A)(n,t=>{const e={};return(0,r.A)(t,t=>{const n=Ln(t.partialPath);(0,r.A)(n,t=>{e[t]=!0})}),e});let l=n;for(let s=1;s<=e;s++){const t=l;l=Rn(t.length);for(let n=0;n<t.length;n++){const c=t[n];for(let t=0;t<c.length;t++){const h=c[t].partialPath,u=c[t].suffixDef,d=Ln(h);if(Dn(o,d,n)||(0,a.A)(u)||h.length===e){const t=i[n];if(!1===On(t,h)){t.push(h);for(let t=0;t<d.length;t++){const e=d[t];o[n][e]=!0}}}else{const t=xn(u,s+1,h);l[n]=l[n].concat(t),(0,r.A)(t,t=>{const e=Ln(t.partialPath);(0,r.A)(e,t=>{o[n][t]=!0})})}}}}return i}function Nn(t,e,n,r){const i=new Sn(t,Tn.ALTERNATION,r);return e.accept(i),In(i.result,n)}function Mn(t,e,n,r){const i=new Sn(t,n);e.accept(i);const a=i.result,s=new Cn(e,t,n).startWalking();return In([new B({definition:a}),new B({definition:s})],r)}function On(t,e){t:for(let n=0;n<t.length;n++){const r=t[n];if(r.length===e.length){for(let t=0;t<r.length;t++){const n=e[t],i=r[t];if(!1===(n===i||void 0!==i.categoryMatchesMap[n.tokenTypeIdx]))continue t}return!0}}return!1}function Pn(t){return at(t,t=>at(t,t=>at(t,t=>(0,a.A)(t.categoryMatches))))}function $n(t,e,n,a){const o=(0,rn.A)(t,t=>function(t,e){const n=new zn;t.accept(n);const r=n.allProductions,a=hn(r,Bn),o=_(a,t=>t.length>1),l=(0,s.A)((0,i.A)(o),n=>{const r=Ft(n),i=e.buildDuplicateFoundError(t,n),a=ot(r),s={message:i,type:Mr.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:r.idx},o=Fn(r);return o&&(s.parameter=o),s});return l}(t,n)),l=function(t,e,n){const i=[],a=(0,s.A)(e,t=>t.name);return(0,r.A)(t,t=>{const e=t.name;if(nt(a,e)){const r=n.buildNamespaceConflictError(t);i.push({message:r,type:Mr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}}),i}(t,e,n),c=(0,rn.A)(t,t=>function(t,e){const n=new Un;t.accept(n);const r=n.alternations,i=(0,rn.A)(r,n=>n.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:n}),type:Mr.TOO_MANY_ALTS,ruleName:t.name,occurrence:n.idx}]:[]);return i}(t,n)),h=(0,rn.A)(t,e=>function(t,e,n,r){const i=[],a=(0,_t.A)(e,(e,n)=>n.name===t.name?e+1:e,0);if(a>1){const e=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});i.push({message:e,type:Mr.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}(e,t,a,n));return o.concat(l,c,h)}function Bn(t){return`${ot(t)}_#_${t.idx}_#_${Fn(t)}`}function Fn(t){return t instanceof Y?t.terminalType.name:t instanceof P?t.nonTerminalName:""}class zn extends W{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}}function Kn(t,e,n,r=[]){const i=[],s=qn(e.definition);if((0,a.A)(s))return[];{const e=t.name;nt(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:Mr.LEFT_RECURSION,ruleName:e});const a=$t(s,r.concat([t])),o=(0,rn.A)(a,e=>{const i=(0,l.A)(r);return i.push(e),Kn(t,e,n,i)});return i.concat(o)}}function qn(t){let e=[];if((0,a.A)(t))return e;const n=Ft(t);if(n instanceof P)e.push(n.referencedRule);else if(n instanceof B||n instanceof F||n instanceof z||n instanceof K||n instanceof U||n instanceof q)e=e.concat(qn(n.definition));else if(n instanceof j)e=(0,dt.A)((0,s.A)(n.definition,t=>qn(t.definition)));else if(!(n instanceof Y))throw Error("non exhaustive match");const r=st(n),i=t.length>1;if(r&&i){const n=d(t);return e.concat(qn(n))}return e}class Un extends W{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}}function jn(t,e,n){const i=new Un;t.accept(i);let a=i.alternations;a=Tt(a,t=>!0===t.ignoreAmbiguities);const o=(0,rn.A)(a,i=>{const a=i.idx,o=i.maxLookahead||e,l=Nn(a,t,o,i),c=function(t,e,n,i){const a=[],o=(0,_t.A)(t,(n,i,s)=>(!0===e.definition[s].ignoreAmbiguities||(0,r.A)(i,i=>{const o=[s];(0,r.A)(t,(t,n)=>{s!==n&&On(t,i)&&!0!==e.definition[n].ignoreAmbiguities&&o.push(n)}),o.length>1&&!On(a,i)&&(a.push(i),n.push({alts:o,path:i}))}),n),[]),l=(0,s.A)(o,t=>{const r=(0,s.A)(t.alts,t=>t+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:r,prefixPath:t.path}),type:Mr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:t.alts}});return l}(l,i,t,n),h=function(t,e,n,r){const i=(0,_t.A)(t,(t,e,n)=>{const r=(0,s.A)(e,t=>({idx:n,path:t}));return t.concat(r)},[]),a=Bt((0,rn.A)(i,t=>{if(!0===e.definition[t.idx].ignoreAmbiguities)return[];const a=t.idx,o=t.path,l=(0,Ct.A)(i,t=>{return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx<a&&(n=t.path,r=o,n.length<r.length&&at(n,(t,e)=>{const n=r[e];return t===n||n.categoryMatchesMap[t.tokenTypeIdx]}));var n,r});return(0,s.A)(l,t=>{const i=[t.idx+1,a+1],s=0===e.idx?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:Mr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}})}));return a}(l,i,t,n);return c.concat(h)});return o}class Yn extends W{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}}function Gn(t){const e=(0,vt.A)(t,{errMsgProvider:tn}),n={};return(0,r.A)(t.rules,t=>{n[t.name]=t}),function(t,e){const n=new nn(t,e);return n.resolveRefs(),n.errors}(n,e.errMsgProvider)}const Wn="MismatchedTokenException",Vn="NoViableAltException",Hn="EarlyExitException",Xn="NotAllInputParsedException",Zn=[Wn,Vn,Hn,Xn];function Qn(t){return nt(Zn,t.name)}Object.freeze(Zn);class Jn extends Error{constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class tr extends Jn{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=Wn}}class er extends Jn{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=Vn}}class nr extends Jn{constructor(t,e){super(t,e),this.name=Xn}}class rr extends Jn{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=Hn}}const ir={},ar="InRuleRecoveryException";class sr extends Error{constructor(t){super(t),this.name=ar}}function or(t,e,n,r,i,a,s){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(void 0===l){const t=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[t],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,h=l.occurrence;const u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=Xe,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,n,c)}const lr=1024,cr=1280,hr=1536;function ur(t,e,n){return n|e|t}class dr{constructor(t){var e;this.maxLookahead=null!==(e=null==t?void 0:t.maxLookahead)&&void 0!==e?e:Ir.maxLookahead}validate(t){const e=this.validateNoLeftRecursion(t.rules);if((0,a.A)(e)){const n=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...e,...n,...r,...i]}return e}validateNoLeftRecursion(t){return(0,rn.A)(t,t=>Kn(t,t,en))}validateEmptyOrAlternatives(t){return(0,rn.A)(t,t=>function(t,e){const n=new Un;t.accept(n);const r=n.alternations;return(0,rn.A)(r,n=>{const r=un(n.definition);return(0,rn.A)(r,(r,i)=>{const s=bn([r],[],Ae,1);return(0,a.A)(s)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:n,emptyChoiceIdx:i}),type:Mr.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:n.idx,alternative:i+1}]:[]})})}(t,en))}validateAmbiguousAlternationAlternatives(t,e){return(0,rn.A)(t,t=>jn(t,e,en))}validateSomeNonEmptyLookaheadPath(t,e){return function(t,e,n){const i=[];return(0,r.A)(t,t=>{const s=new Yn;t.accept(s);const o=s.allProductions;(0,r.A)(o,r=>{const s=kn(r),o=r.maxLookahead||e,l=Mn(r.idx,t,s,o)[0];if((0,a.A)((0,dt.A)(l))){const e=n.buildEmptyRepetitionError({topLevelRule:t,repetition:r});i.push({message:e,type:Mr.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}})}),i}(t,e,en)}buildLookaheadForAlternation(t){return function(t,e,n,r,i,a){const s=Nn(t,e,n);return a(s,r,Pn(s)?_e:Ae,i)}(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,An)}buildLookaheadForOptional(t){return function(t,e,n,r,i,a){const s=Mn(t,e,i,n),o=Pn(s)?_e:Ae;return a(s[0],o,r)}(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,kn(t.prodType),_n)}}const pr=new class extends W{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}};function fr(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset)}function gr(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function mr(t,e){Object.defineProperty(t,"name",{enumerable:!1,configurable:!0,writable:!1,value:e})}function yr(t,e){const n=(0,x.A)(t),r=n.length;for(let i=0;i<r;i++){const r=t[n[i]],a=r.length;for(let t=0;t<a;t++){const n=r[t];void 0===n.tokenTypeIdx&&this[n.name](n.children,e)}}}function vr(t,e){const n=function(){};mr(n,t+"BaseSemantics");const r={visit:function(t,e){if((0,Z.A)(t)&&(t=t[0]),!(0,mt.A)(t))return this[t.name](t.children,e)},validateVisitor:function(){const t=function(t,e){const n=function(t,e){const n=(0,Ct.A)(e,e=>!1===(0,kt.A)(t[e])),r=(0,s.A)(n,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:xr.MISSING_METHOD,methodName:e}));return Bt(r)}(t,e);return n}(this,e);if(!(0,a.A)(t)){const e=(0,s.A)(t,t=>t.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${e.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=e,n}var xr;!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(xr||(xr={}));var br=n(3149);const wr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(wr);const Tr=!0,kr=Math.pow(2,8)-1,Er=He({name:"RECORDING_PHASE_TOKEN",pattern:$e.NA});Re([Er]);const Ar=Ze(Er,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Ar);const _r={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function Cr(t,e,n,r=!1){Lr(n);const i=(0,ke.A)(this.recordingProdStack),a=(0,kt.A)(e)?e:e.DEF,s=new t({definition:[],idx:n});return r&&(s.separator=e.SEP),(0,o.A)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),wr}function Sr(t,e){Lr(e);const n=(0,ke.A)(this.recordingProdStack),i=!1===(0,Z.A)(t),a=!1===i?t:t.DEF,s=new j({definition:[],idx:e,ignoreAmbiguities:i&&!0===t.IGNORE_AMBIGUITIES});(0,o.A)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const l=J(a,t=>(0,kt.A)(t.GATE));return s.hasPredicates=l,n.definition.push(s),(0,r.A)(a,t=>{const e=new B({definition:[]});s.definition.push(e),(0,o.A)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:(0,o.A)(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),wr}function Rr(t){return 0===t?"":`${t}`}function Lr(t){if(t<0||t>kr){const e=new Error(`Invalid DSL Method idx value: <${t}>\n\tIdx value must be a none negative value smaller than ${kr+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}const Dr=Ze(Xe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Dr);const Ir=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Je,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Nr=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Mr,Or;function Pr(t=void 0){return function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Mr||(Mr={}));class $r{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;const e=this.className;this.TRACE_INIT("toFastProps",()=>{c(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),(0,r.A)(this.definedRulesNames,t=>{const e=this[t].originalGrammarAction;let n;this.TRACE_INIT(`${t} Rule`,()=>{n=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=n})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Gn({rules:(0,i.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if((0,a.A)(n)&&!1===this.skipValidations){const n=(t={rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),errMsgProvider:en,grammarName:e},$n((t=(0,vt.A)(t,{errMsgProvider:en})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)),r=function(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return(0,s.A)(e,t=>Object.assign({type:Mr.CUSTOM_LOOKAHEAD_VALIDATION},t))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),grammarName:e});this.definitionErrors=this.definitionErrors.concat(n,r)}var t}),(0,a.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const t=function(t){const e={};return(0,r.A)(t,t=>{const n=new gt(t).startWalking();w(e,n)}),e}((0,i.A)(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null===(e=(t=this.lookaheadStrategy).initialize)||void 0===e||e.call(t,{rules:(0,i.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,i.A)(this.gastProductionsCache))})),!$r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,a.A)(this.definitionErrors))throw t=(0,s.A)(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`)})}constructor(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(e),n.initLexerAdapter(),n.initLooksAhead(e),n.initRecognizerEngine(t,e),n.initRecoverable(e),n.initTreeBuilder(e),n.initContentAssist(),n.initGastRecorder(e),n.initPerformanceTracer(e),(0,o.A)(e,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,o.A)(e,"skipValidations")?e.skipValidations:Ir.skipValidations}}$r.DEFER_DEFINITION_ERRORS_HANDLING=!1,Or=$r,[class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,o.A)(t,"recoveryEnabled")?t.recoveryEnabled:Ir.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=or)}getTokenToInsert(t){const e=Ze(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,n,r){const i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let c=this.LA(1);const h=()=>{const t=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:t,ruleName:this.getCurrRuleFullName()}),n=new tr(e,l,this.LA(0));n.resyncedTokens=un(s),this.SAVE_ERROR(n)};for(;!o;){if(this.tokenMatcher(c,r))return void h();if(n.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,n){return!1!==n&&!this.tokenMatcher(this.LA(1),t)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))}getFollowsForInRuleRecovery(t,e){const n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){const t=this.SKIP_TOKEN();return this.consumeToken(),t}throw new sr("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if((0,a.A)(e))return!1;const n=this.LA(1);return void 0!==(0,zt.A)(e,t=>this.tokenMatcher(n,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){const e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return nt(n,t)}findReSyncTokenType(){const t=this.flattenFollowSet();let e=this.LA(1),n=2;for(;;){const r=(0,zt.A)(t,t=>Qe(e,t));if(void 0!==r)return r;e=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return ir;const t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const t=this.RULE_STACK,e=this.RULE_OCCURRENCE_STACK;return(0,s.A)(t,(n,r)=>0===r?ir:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:e[r],inRule:this.shortRuleNameToFullName(t[r-1])})}flattenFollowSet(){const t=(0,s.A)(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return(0,dt.A)(t)}getFollowSetFromFollowKey(t){if(t===ir)return[Xe];const e=t.ruleName+t.idxInCallingRule+ft+t.inRule;return this.resyncFollows[e]}addToResyncTokens(t,e){return this.tokenMatcher(t,Xe)||e.push(t),e}reSyncTo(t){const e=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return un(e)}attemptInRepetitionRecovery(t,e,n,r,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,l.A)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return(0,s.A)(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},class{initLooksAhead(t){this.dynamicTokensEnabled=(0,o.A)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Ir.dynamicTokensEnabled,this.maxLookahead=(0,o.A)(t,"maxLookahead")?t.maxLookahead:Ir.maxLookahead,this.lookaheadStrategy=(0,o.A)(t,"lookaheadStrategy")?t.lookaheadStrategy:new dr({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){(0,r.A)(t,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:e,repetition:n,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=function(t){pr.reset(),t.accept(pr);const e=pr.dslMethods;return pr.reset(),e}(t);(0,r.A)(e,e=>{const n=0===e.idx?"":e.idx;this.TRACE_INIT(`${ot(e)}${n}`,()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:e.idx,rule:t,maxLookahead:e.maxLookahead||this.maxLookahead,hasPredicates:e.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=ur(this.fullRuleNameToShort[t.name],256,e.idx);this.setLaFuncCache(r,n)})}),(0,r.A)(n,e=>{this.computeLookaheadFunc(t,e.idx,768,"Repetition",e.maxLookahead,ot(e))}),(0,r.A)(i,e=>{this.computeLookaheadFunc(t,e.idx,512,"Option",e.maxLookahead,ot(e))}),(0,r.A)(a,e=>{this.computeLookaheadFunc(t,e.idx,lr,"RepetitionMandatory",e.maxLookahead,ot(e))}),(0,r.A)(s,e=>{this.computeLookaheadFunc(t,e.idx,hr,"RepetitionMandatoryWithSeparator",e.maxLookahead,ot(e))}),(0,r.A)(o,e=>{this.computeLookaheadFunc(t,e.idx,cr,"RepetitionWithSeparator",e.maxLookahead,ot(e))})})})}computeLookaheadFunc(t,e,n,r,i,a){this.TRACE_INIT(`${a}${0===e?"":e}`,()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:e,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),s=ur(this.fullRuleNameToShort[t.name],n,e);this.setLaFuncCache(s,a)})}getKeyForAutomaticLookahead(t,e){return ur(this.getLastExplicitRuleShortName(),t,e)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(0,o.A)(t,"nodeLocationTracking")?t.nodeLocationTracking:Ir.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=gr,this.setNodeLocationFromNode=gr,this.cstPostRule=Te.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=fr,this.setNodeLocationFromNode=fr,this.cstPostRule=Te.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=Te.A,this.setInitialNodeLocation=Te.A}else this.cstInvocationStateUpdate=Te.A,this.cstFinallyStateUpdate=Te.A,this.cstPostTerminal=Te.A,this.cstPostNonTerminal=Te.A,this.cstPostRule=Te.A}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){const e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){const e={name:t,children:Object.create(null)};this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?n.endOffset=e.endOffset:n.startOffset=NaN}cstPostTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,a;i=e,a=t,void 0===(r=n).children[a]?r.children[a]=[i]:r.children[a].push(i),this.setNodeLocationFromToken(n.location,e)}cstPostNonTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if((0,mt.A)(this.baseCstVisitorConstructor)){const t=vr(this.className,(0,x.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,mt.A)(this.baseCstVisitorWithDefaultsConstructor)){const t=function(t,e,n){const i=function(){};mr(i,t+"BaseSemanticsWithDefaults");const a=Object.create(n.prototype);return(0,r.A)(e,t=>{a[t]=yr}),(i.prototype=a).constructor=i,i}(this.className,(0,x.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){const t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Dr}LA(t){const e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Dr:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=_e,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,o.A)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,Z.A)(t)){if((0,a.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,Z.A)(t))this.tokensMap=(0,_t.A)(t,(t,e)=>(t[e.name]=e,t),{});else if((0,o.A)(t,"modes")&&at((0,dt.A)((0,i.A)(t.modes)),Ne)){const e=(0,dt.A)((0,i.A)(t.modes)),n=ut(e);this.tokensMap=(0,_t.A)(n,(t,e)=>(t[e.name]=e,t),{})}else{if(!(0,br.A)(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,l.A)(t)}this.tokensMap.EOF=Xe;const n=(0,o.A)(t,"modes")?(0,dt.A)((0,i.A)(t.modes)):(0,i.A)(t),r=at(n,t=>(0,a.A)(t.categoryMatches));this.tokenMatcher=r?_e:Ae,Re((0,i.A)(this.tokensMap))}defineRule(t,e,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=(0,o.A)(n,"resyncEnabled")?n.resyncEnabled:Nr.resyncEnabled,i=(0,o.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:Nr.recoveryValueFunc,a=this.ruleShortNameIdx<<12;let s;return this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a,s=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(s){return this.invokeRuleCatch(s,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,n)}catch(s){return this.invokeRuleCatch(s,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:e})}invokeRuleCatch(t,e,n){const r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Qn(t)){const e=t;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(e.resyncedTokens=this.reSyncTo(r),this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];return t.recoveredNode=!0,t}return n(t)}if(this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(r)return this.moveToTerminatedState(),n(t);throw e}throw t}optionInternal(t,e){const n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)}optionInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(t,e){const n=this.getKeyForAutomaticLookahead(lr,t);return this.atLeastOneInternalLogic(t,e,n)}atLeastOneInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,Tn.REPETITION_MANDATORY,e.ERR_MSG);{let t=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],i,lr,t,yn)}atLeastOneSepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(hr,t);this.atLeastOneSepFirstInternalLogic(t,e,n)}atLeastOneSepFirstInternalLogic(t,e,n){const r=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Tn.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);{r.call(this);const e=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,r,vn],e,hr,t,vn)}}manyInternal(t,e){const n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)}manyInternalLogic(t,e,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],i,768,t,gn,a)}manySepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(cr,t);this.manySepFirstInternalLogic(t,e,n)}manySepFirstInternalLogic(t,e,n){const r=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const e=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,r,mn],e,cr,t,mn)}}repetitionSepSecondInternal(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,hr,t,i)}doSingleRepetition(t){const e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){const n=this.getKeyForAutomaticLookahead(256,e),r=(0,Z.A)(t)?t:t.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new nr(e,t))}}subruleInternal(t,e,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=e,r=t.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(i){throw this.subruleInternalError(i,n,t.ruleName)}}subruleInternalError(t,e,n){throw Qn(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,e,n){let r;try{const e=this.LA(1);!0===this.tokenMatcher(e,t)?(this.consumeToken(),r=e):this.consumeInternalError(t,e,n)}catch(i){r=this.consumeInternalRecovery(t,e,i)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r}consumeInternalError(t,e,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new tr(r,e,i))}consumeInternalRecovery(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const i=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,i)}catch(r){throw r.name===ar?n:r}}}saveRecogState(){const t=this.errors,e=(0,l.A)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Xe)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(t){return t.call(this)}consume(t,e,n){return this.consumeInternal(e,t,n)}subrule(t,e,n){return this.subruleInternal(e,t,n)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,n=Nr){if(nt(this.definedRulesNames,t)){const e={message:en.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Mr.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(e)}this.definedRulesNames.push(t);const r=this.defineRule(t,e,n);return this[t]=r,r}OVERRIDE_RULE(t,e,n=Nr){const r=function(t,e,n){const r=[];let i;return nt(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Mr.INVALID_RULE_OVERRIDE,ruleName:t})),r}(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(t,e,n);return this[t]=i,i}BACKTRACK(t,e){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return t.apply(this,e),!0}catch(r){if(Qn(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return t=(0,i.A)(this.gastProductionsCache),(0,s.A)(t,G);var t}},class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=(0,o.A)(t,"errorMessageProvider")?t.errorMessageProvider:Ir.errorMessageProvider}SAVE_ERROR(t){if(Qn(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,l.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,l.A)(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,n){const r=this.getCurrRuleFullName(),i=Mn(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new rr(s,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){const n=this.getCurrRuleFullName(),r=Nn(t,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new er(s,this.LA(1),a))}},class{initContentAssist(){}computeContentAssist(t,e){const n=this.gastProductionsCache[t];if((0,mt.A)(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return bn([n],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){const e=Ft(t.ruleStack),n=this.getGAstProductions()[e];return new pn(n,t).startWalking()}},class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){const e=t>0?t:"";this[`CONSUME${e}`]=function(e,n){return this.consumeInternalRecord(e,t,n)},this[`SUBRULE${e}`]=function(e,n){return this.subruleInternalRecord(e,t,n)},this[`OPTION${e}`]=function(e){return this.optionInternalRecord(e,t)},this[`OR${e}`]=function(e){return this.orInternalRecord(e,t)},this[`MANY${e}`]=function(e){this.manyInternalRecord(t,e)},this[`MANY_SEP${e}`]=function(e){this.manySepFirstInternalRecord(t,e)},this[`AT_LEAST_ONE${e}`]=function(e){this.atLeastOneInternalRecord(t,e)},this[`AT_LEAST_ONE_SEP${e}`]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}}this.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},this.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const t=this;for(let e=0;e<10;e++){const n=e>0?e:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Dr}topLevelRuleRecord(t,e){try{const n=new $({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(r){throw n}throw n}}optionInternalRecord(t,e){return Cr.call(this,F,t,e)}atLeastOneInternalRecord(t,e){Cr.call(this,z,e,t)}atLeastOneSepFirstInternalRecord(t,e){Cr.call(this,K,e,t,Tr)}manyInternalRecord(t,e){Cr.call(this,q,e,t)}manySepFirstInternalRecord(t,e){Cr.call(this,U,e,t,Tr)}orInternalRecord(t,e){return Sr.call(this,t,e)}subruleInternalRecord(t,e,n){if(Lr(e),!t||!1===(0,o.A)(t,"ruleName")){const n=new Error(`<SUBRULE${Rr(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,ke.A)(this.recordingProdStack),i=t.ruleName,a=new P({idx:e,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?_r:wr}consumeInternalRecord(t,e,n){if(Lr(e),!De(t)){const n=new Error(`<CONSUME${Rr(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,ke.A)(this.recordingProdStack),i=new Y({idx:e,terminalType:t,label:null==n?void 0:n.LABEL});return r.definition.push(i),Ar}},class{initPerformanceTracer(t){if((0,o.A)(t,"traceInitPerf")){const e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Ir.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--\x3e <${t}>`);const{time:r,value:i}=Ee(e),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(e,n);r&&(r.get||r.set)?Object.defineProperty(Or.prototype,n,r):Or.prototype[n]=t.prototype[n]})});class Br extends $r{constructor(t,e=Ir){const n=(0,l.A)(e);n.outputCst=!1,super(t,n)}}},165(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function o(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,s,o=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function d(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}n.d(e,{A:()=>Xd});var p="undefined"==typeof window?null:window,f=p?p.navigator:null;p&&p.document;var g,m,y,v,x,b,w,T,k,E,A,_,C,S,R,L,D,I,N,M,O,P,$,B,F,z,K,q,U=u(""),j=u({}),Y=u(function(){}),G="undefined"==typeof HTMLElement?"undefined":u(HTMLElement),W=function(t){return t&&t.instanceString&&H(t.instanceString)?t.instanceString():null},V=function(t){return null!=t&&u(t)==U},H=function(t){return null!=t&&u(t)===Y},X=function(t){return!tt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},Z=function(t){return null!=t&&u(t)===j&&!X(t)&&t.constructor===Object},Q=function(t){return null!=t&&u(t)===u(1)&&!isNaN(t)},J=function(t){return"undefined"===G?void 0:null!=t&&t instanceof HTMLElement},tt=function(t){return et(t)||nt(t)},et=function(t){return"collection"===W(t)&&t._private.single},nt=function(t){return"collection"===W(t)&&!t._private.single},rt=function(t){return"core"===W(t)},it=function(t){return"stylesheet"===W(t)},at=function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},st=function(t){return function(t){return null!=t&&u(t)===j}(t)&&H(t.then)},ot=function(t,e){e||(e=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return t.join("$")});var n=function(){var r,i=arguments,a=e.apply(this,i),s=n.cache;return(r=s[a])||(r=s[a]=t.apply(this,i)),r};return n.cache={},n},lt=ot(function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),ct=ot(function(t){return t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),ht=ot(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),ut=function(t){return at(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},dt=function(t,e){return t.slice(-1*e.length)===e},pt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",ft="rgb[a]?\\(("+pt+"[%]?)\\s*,\\s*("+pt+"[%]?)\\s*,\\s*("+pt+"[%]?)(?:\\s*,\\s*("+pt+"))?\\)",gt="rgb[a]?\\((?:"+pt+"[%]?)\\s*,\\s*(?:"+pt+"[%]?)\\s*,\\s*(?:"+pt+"[%]?)(?:\\s*,\\s*(?:"+pt+"))?\\)",mt="hsl[a]?\\(("+pt+")\\s*,\\s*("+pt+"[%])\\s*,\\s*("+pt+"[%])(?:\\s*,\\s*("+pt+"))?\\)",yt="hsl[a]?\\((?:"+pt+")\\s*,\\s*(?:"+pt+"[%])\\s*,\\s*(?:"+pt+"[%])(?:\\s*,\\s*(?:"+pt+"))?\\)",vt=function(t,e){return t<e?-1:t>e?1:0},xt=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,n=1;n<e.length;n++){var r=e[n];if(null!=r)for(var i=Object.keys(r),a=0;a<i.length;a++){var s=i[a];t[s]=r[s]}}return t},bt=function(t){return(X(t)?t:null)||function(t){return wt[t.toLowerCase()]}(t)||function(t){if((4===t.length||7===t.length)&&"#"===t[0]){var e,n,r,i=16;return 4===t.length?(e=parseInt(t[1]+t[1],i),n=parseInt(t[2]+t[2],i),r=parseInt(t[3]+t[3],i)):(e=parseInt(t[1]+t[2],i),n=parseInt(t[3]+t[4],i),r=parseInt(t[5]+t[6],i)),[e,n,r]}}(t)||function(t){var e,n=new RegExp("^"+ft+"$").exec(t);if(n){e=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;e.push(Math.floor(a))}var s=r[1]||r[2]||r[3],o=r[1]&&r[2]&&r[3];if(s&&!o)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;e.push(l)}}return e}(t)||function(t){var e,n,r,i,a,s,o,l;function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var h=new RegExp("^"+mt+"$").exec(t);if(h){if((n=parseInt(h[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(h[2]))<0||r>100)return;if(r/=100,(i=parseFloat(h[3]))<0||i>100)return;if(i/=100,void 0!==(a=h[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)s=o=l=Math.round(255*i);else{var u=i<.5?i*(1+r):i+r-i*r,d=2*i-u;s=Math.round(255*c(d,u,n+1/3)),o=Math.round(255*c(d,u,n)),l=Math.round(255*c(d,u,n-1/3))}e=[s,o,l,a]}return e}(t)},wt={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Tt=function(t){for(var e=t.map,n=t.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(Z(a))throw Error("Tried to set map with object key");i<n.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},kt=function(t){for(var e=t.map,n=t.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(Z(a))throw Error("Tried to get map with object key");if(null==(e=e[a]))return e}return e},Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function At(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _t(){if(m)return g;return m=1,g=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function Ct(){if(b)return x;b=1;var t=function(){if(v)return y;v=1;var t="object"==typeof Et&&Et&&Et.Object===Object&&Et;return y=t}(),e="object"==typeof self&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return x=n}function St(){if(_)return A;_=1;var t=function(){if(E)return k;E=1;var t=/\s/;return k=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n},k}(),e=/^\s+/;return A=function(n){return n?n.slice(0,t(n)+1).replace(e,""):n},A}function Rt(){if(S)return C;S=1;var t=Ct().Symbol;return C=t}function Lt(){if(M)return N;M=1;var t=Rt(),e=function(){if(L)return R;L=1;var t=Rt(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,i=t?t.toStringTag:void 0;return R=function(t){var e=n.call(t,i),a=t[i];try{t[i]=void 0;var s=!0}catch(l){}var o=r.call(t);return s&&(e?t[i]=a:delete t[i]),o}}(),n=function(){if(I)return D;I=1;var t=Object.prototype.toString;return D=function(e){return t.call(e)}}(),r=t?t.toStringTag:void 0;return N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?e(t):n(t)}}function Dt(){if(B)return $;B=1;var t=Lt(),e=P?O:(P=1,O=function(t){return null!=t&&"object"==typeof t});return $=function(n){return"symbol"==typeof n||e(n)&&"[object Symbol]"==t(n)}}var It=function(){if(q)return K;q=1;var t=_t(),e=function(){if(T)return w;T=1;var t=Ct();return w=function(){return t.Date.now()}}(),n=function(){if(z)return F;z=1;var t=St(),e=_t(),n=Dt(),r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;return F=function(o){if("number"==typeof o)return o;if(n(o))return NaN;if(e(o)){var l="function"==typeof o.valueOf?o.valueOf():o;o=e(l)?l+"":l}if("string"!=typeof o)return 0===o?o:+o;o=t(o);var c=i.test(o);return c||a.test(o)?s(o.slice(2),c?2:8):r.test(o)?NaN:+o}}(),r=Math.max,i=Math.min;return K=function(a,s,o){var l,c,h,u,d,p,f=0,g=!1,m=!1,y=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function v(t){var e=l,n=c;return l=c=void 0,f=t,u=a.apply(n,e)}function x(t){var e=t-p;return void 0===p||e>=s||e<0||m&&t-f>=h}function b(){var t=e();if(x(t))return w(t);d=setTimeout(b,function(t){var e=s-(t-p);return m?i(e,h-(t-f)):e}(t))}function w(t){return d=void 0,y&&l?v(t):(l=c=void 0,u)}function T(){var t=e(),n=x(t);if(l=arguments,c=this,p=t,n){if(void 0===d)return function(t){return f=t,d=setTimeout(b,s),g?v(t):u}(p);if(m)return clearTimeout(d),d=setTimeout(b,s),v(p)}return void 0===d&&(d=setTimeout(b,s)),u}return s=n(s)||0,t(o)&&(g=!!o.leading,h=(m="maxWait"in o)?r(n(o.maxWait)||0,s):h,y="trailing"in o?!!o.trailing:y),T.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},T.flush=function(){return void 0===d?u:w(e())},T},K}(),Nt=At(It),Mt=p?p.performance:null,Ot=Mt&&Mt.now?function(){return Mt.now()}:function(){return Date.now()},Pt=function(){if(p){if(p.requestAnimationFrame)return function(t){p.requestAnimationFrame(t)};if(p.mozRequestAnimationFrame)return function(t){p.mozRequestAnimationFrame(t)};if(p.webkitRequestAnimationFrame)return function(t){p.webkitRequestAnimationFrame(t)};if(p.msRequestAnimationFrame)return function(t){p.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Ot())},1e3/60)}}(),$t=function(t){return Pt(t)},Bt=Ot,Ft=9261,zt=5381,Kt=function(t){for(var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft;!(e=t.next()).done;)n=65599*n+e.value|0;return n},qt=function(t){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft)+t|0},Ut=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt;return(e<<5)+e+t|0},jt=function(t){return 2097152*t[0]+t[1]},Yt=function(t,e){return[qt(t[0],e[0]),Ut(t[1],e[1])]},Gt=function(t,e){var n={value:0,done:!1},r=0,i=t.length;return Kt({next:function(){return r<i?n.value=t[r++]:n.done=!0,n}},e)},Wt=function(t,e){var n={value:0,done:!1},r=0,i=t.length;return Kt({next:function(){return r<i?n.value=t.charCodeAt(r++):n.done=!0,n}},e)},Vt=function(){return Ht(arguments)},Ht=function(t){for(var e,n=0;n<t.length;n++){var r=t[n];e=0===n?Wt(r):Wt(r,e)}return e};function Xt(t,e,n){if(0===n)return t;var r=(e.x1+e.x2)/2,i=(e.y1+e.y2)/2,a=e.w/e.h,s=1/a,o=function(t,e,n,r,i){var a=i*Math.PI/180;return{x:Math.cos(a)*(t-n)-Math.sin(a)*(e-r)+n,y:Math.sin(a)*(t-n)+Math.cos(a)*(e-r)+r}}(t.x,t.y,r,i,n),l=function(t,e,n,r,i,a){return{x:(t-n)*i+n,y:(e-r)*a+r}}(o.x,o.y,r,i,a,s);return{x:l.x,y:l.y}}var Zt=!0,Qt=null!=console.warn,Jt=null!=console.trace,te=Number.MAX_SAFE_INTEGER||9007199254740991,ee=function(){return!0},ne=function(){return!1},re=function(){return 0},ie=function(){},ae=function(t){throw new Error(t)},se=function(t){if(void 0===t)return Zt;Zt=!!t},oe=function(t){se()&&(Qt?console.warn(t):(console.log(t),Jt&&console.trace()))},le=function(t){return null==t?t:X(t)?t.slice():Z(t)?function(t){return xt({},t)}(t):t},ce=function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},he={},ue=function(){return he},de=function(t){var e=Object.keys(t);return function(n){for(var r={},i=0;i<e.length;i++){var a=e[i],s=null==n?void 0:n[a];r[a]=void 0===s?t[a]:s}return r}},pe=function(t,e,n){for(var r=t.length-1;r>=0;r--)t[r]===e&&t.splice(r,1)},fe=function(t){t.splice(0,t.length)},ge=function(t,e,n){return n&&(e=ht(n,e)),t[e]},me=function(t,e,n,r){n&&(e=ht(n,e)),t[e]=r},ye="undefined"!=typeof Map?Map:function(){return a(function t(){i(this,t),this._obj={}},[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}])}(),ve=function(){return a(function t(e){if(i(this,t),this._obj=Object.create(null),this.size=0,null!=e){var n;n=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var r=0;r<n.length;r++)this.add(n[r])}},[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)}},{key:"delete",value:function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(t){return 1===this._obj[t]}},{key:"toArray",value:function(){var t=this;return Object.keys(this._obj).filter(function(e){return t.has(e)})}},{key:"forEach",value:function(t,e){return this.toArray().forEach(t,e)}}])}(),xe="undefined"!==("undefined"==typeof Set?"undefined":u(Set))?Set:ve,be=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&rt(t)){var r=e.group;if(null==r&&(r=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===r:!!e.pannable,active:!1,classes:new xe,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var a=e.renderedPosition,s=t.pan(),o=t.zoom();i.position={x:(a.x-s.x)/o,y:(a.y-s.y)/o}}var l=[];X(e.classes)?l=e.classes:V(e.classes)&&(l=e.classes.split(/\s+/));for(var c=0,h=l.length;c<h;c++){var u=l[c];u&&""!==u&&i.classes.add(u)}this.createEmitter(),(void 0===n||n)&&this.restore();var d=e.style||e.css;d&&(oe("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(d))}else ae("An element must be of type `nodes` or `edges`; you specified `"+r+"`")}else ae("An element must have a core reference and parameters set")},we=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(e,n,r){var i;Z(e)&&!tt(e)&&(e=(i=e).roots||i.root,n=i.visit,r=i.directed),r=2!==arguments.length||H(n)?r:n,n=H(n)?n:function(){};for(var a,s=this._private.cy,o=e=V(e)?this.filter(e):e,l=[],c=[],h={},u={},d={},p=0,f=this.byGroup(),g=f.nodes,m=f.edges,y=0;y<o.length;y++){var v=o[y],x=v.id();v.isNode()&&(l.unshift(v),t.bfs&&(d[x]=!0,c.push(v)),u[x]=0)}for(var b,w=function(){var e=t.bfs?l.shift():l.pop(),i=e.id();if(t.dfs){if(d[i])return 0;d[i]=!0,c.push(e)}var s,o=u[i],f=h[i],y=null!=f?f.source():null,v=null!=f?f.target():null,x=null==f?void 0:e.same(y)?v[0]:y[0];if(!0===(s=n(e,f,x,p++,o)))return a=e,1;if(!1===s)return 1;for(var b=e.connectedEdges().filter(function(t){return(!r||t.source().same(e))&&m.has(t)}),w=0;w<b.length;w++){var T=b[w],k=T.connectedNodes().filter(function(t){return!t.same(e)&&g.has(t)}),E=k.id();0===k.length||d[E]||(k=k[0],l.push(k),t.bfs&&(d[E]=!0,c.push(k)),h[E]=T,u[E]=u[i]+1)}};0!==l.length&&(0===(b=w())||1!==b););for(var T=s.collection(),k=0;k<c.length;k++){var E=c[k],A=h[E.id()];null!=A&&T.push(A),T.push(E)}return{path:s.collection(T),found:s.collection(a)}}},Te={breadthFirstSearch:we({bfs:!0}),depthFirstSearch:we({dfs:!0})};Te.bfs=Te.breadthFirstSearch,Te.dfs=Te.depthFirstSearch;var ke,Ee,Ae,_e={exports:{}},Ce=_e.exports;function Se(){return ke||(ke=1,function(t){(function(){var e,n,r,i,a,s,o,l,c,h,u,d,p,f,g;r=Math.floor,h=Math.min,n=function(t,e){return t<e?-1:t>e?1:0},c=function(t,e,i,a,s){var o;if(null==i&&(i=0),null==s&&(s=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=t.length);i<a;)s(e,t[o=r((i+a)/2)])<0?a=o:i=o+1;return[].splice.apply(t,[i,i-i].concat(e)),e},s=function(t,e,r){return null==r&&(r=n),t.push(e),f(t,0,t.length-1,r)},a=function(t,e){var r,i;return null==e&&(e=n),r=t.pop(),t.length?(i=t[0],t[0]=r,g(t,0,e)):i=r,i},l=function(t,e,r){var i;return null==r&&(r=n),i=t[0],t[0]=e,g(t,0,r),i},o=function(t,e,r){var i;return null==r&&(r=n),t.length&&r(t[0],e)<0&&(e=(i=[t[0],e])[0],t[0]=i[1],g(t,0,r)),e},i=function(t,e){var i,a,s,o,l,c;for(null==e&&(e=n),l=[],a=0,s=(o=function(){c=[];for(var e=0,n=r(t.length/2);0<=n?e<n:e>n;0<=n?e++:e--)c.push(e);return c}.apply(this).reverse()).length;a<s;a++)i=o[a],l.push(g(t,i,e));return l},p=function(t,e,r){var i;if(null==r&&(r=n),-1!==(i=t.indexOf(e)))return f(t,0,i,r),g(t,i,r)},u=function(t,e,r){var a,s,l,c,h;if(null==r&&(r=n),!(s=t.slice(0,e)).length)return s;for(i(s,r),l=0,c=(h=t.slice(e)).length;l<c;l++)a=h[l],o(s,a,r);return s.sort(r).reverse()},d=function(t,e,r){var s,o,l,u,d,p,f,g,m;if(null==r&&(r=n),10*e<=t.length){if(!(l=t.slice(0,e).sort(r)).length)return l;for(o=l[l.length-1],u=0,p=(f=t.slice(e)).length;u<p;u++)r(s=f[u],o)<0&&(c(l,s,0,null,r),l.pop(),o=l[l.length-1]);return l}for(i(t,r),m=[],d=0,g=h(e,t.length);0<=g?d<g:d>g;0<=g?++d:--d)m.push(a(t,r));return m},f=function(t,e,r,i){var a,s,o;for(null==i&&(i=n),a=t[r];r>e&&i(a,s=t[o=r-1>>1])<0;)t[r]=s,r=o;return t[r]=a},g=function(t,e,r){var i,a,s,o,l;for(null==r&&(r=n),a=t.length,l=e,s=t[e],i=2*e+1;i<a;)(o=i+1)<a&&!(r(t[i],t[o])<0)&&(i=o),t[e]=t[i],i=2*(e=i)+1;return t[e]=s,f(t,l,e,r)},e=function(){function t(t){this.cmp=null!=t?t:n,this.nodes=[]}return t.push=s,t.pop=a,t.replace=l,t.pushpop=o,t.heapify=i,t.updateItem=p,t.nlargest=u,t.nsmallest=d,t.prototype.push=function(t){return s(this.nodes,t,this.cmp)},t.prototype.pop=function(){return a(this.nodes,this.cmp)},t.prototype.peek=function(){return this.nodes[0]},t.prototype.contains=function(t){return-1!==this.nodes.indexOf(t)},t.prototype.replace=function(t){return l(this.nodes,t,this.cmp)},t.prototype.pushpop=function(t){return o(this.nodes,t,this.cmp)},t.prototype.heapify=function(){return i(this.nodes,this.cmp)},t.prototype.updateItem=function(t){return p(this.nodes,t,this.cmp)},t.prototype.clear=function(){return this.nodes=[]},t.prototype.empty=function(){return 0===this.nodes.length},t.prototype.size=function(){return this.nodes.length},t.prototype.clone=function(){var e;return(e=new t).nodes=this.nodes.slice(0),e},t.prototype.toArray=function(){return this.nodes.slice(0)},t.prototype.insert=t.prototype.push,t.prototype.top=t.prototype.peek,t.prototype.front=t.prototype.peek,t.prototype.has=t.prototype.contains,t.prototype.copy=t.prototype.clone,t}(),t.exports=e}).call(Ce)}(_e)),_e.exports}var Re,Le=At(Ae?Ee:(Ae=1,Ee=Se())),De=de({root:null,weight:function(t){return 1},directed:!1}),Ie={dijkstra:function(t){if(!Z(t)){var e=arguments;t={root:e[0],weight:e[1],directed:e[2]}}var n=De(t),r=n.root,i=n.weight,a=n.directed,s=this,o=i,l=V(r)?this.filter(r)[0]:r[0],c={},h={},u={},d=this.byGroup(),p=d.nodes,f=d.edges;f.unmergeBy(function(t){return t.isLoop()});for(var g=function(t){return c[t.id()]},m=function(t,e){c[t.id()]=e,y.updateItem(t)},y=new Le(function(t,e){return g(t)-g(e)}),v=0;v<p.length;v++){var x=p[v];c[x.id()]=x.same(l)?0:1/0,y.push(x)}for(var b=function(t,e){for(var n,r=(a?t.edgesTo(e):t.edgesWith(e)).intersect(f),i=1/0,s=0;s<r.length;s++){var l=r[s],c=o(l);(c<i||!n)&&(i=c,n=l)}return{edge:n,dist:i}};y.size()>0;){var w=y.pop(),T=g(w),k=w.id();if(u[k]=T,T!==1/0)for(var E=w.neighborhood().intersect(p),A=0;A<E.length;A++){var _=E[A],C=_.id(),S=b(w,_),R=T+S.dist;R<g(_)&&(m(_,R),h[C]={node:w,edge:S.edge})}}return{distanceTo:function(t){var e=V(t)?p.filter(t)[0]:t[0];return u[e.id()]},pathTo:function(t){var e=V(t)?p.filter(t)[0]:t[0],n=[],r=e,i=r.id();if(e.length>0)for(n.unshift(e);h[i];){var a=h[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return s.spawn(n)}}}},Ne={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),n=e.nodes,r=e.edges,i=n.length,a=new Array(i),s=n,o=function(t){for(var e=0;e<a.length;e++){if(a[e].has(t))return e}},l=0;l<i;l++)a[l]=this.spawn(n[l]);for(var c=r.sort(function(e,n){return t(e)-t(n)}),h=0;h<c.length;h++){var u=c[h],d=u.source()[0],p=u.target()[0],f=o(d),g=o(p),m=a[f],y=a[g];f!==g&&(s.merge(u),m.merge(y),a.splice(g,1))}return s}},Me=de({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),Oe={aStar:function(t){var e=this.cy(),n=Me(t),r=n.root,i=n.goal,a=n.heuristic,s=n.directed,o=n.weight;r=e.collection(r)[0],i=e.collection(i)[0];var l,c,h=r.id(),u=i.id(),d={},p={},f={},g=new Le(function(t,e){return p[t.id()]-p[e.id()]}),m=new xe,y={},v={},x=function(t,e){g.push(t),m.add(e)},b=function(){l=g.pop(),c=l.id(),m.delete(c)},w=function(t){return m.has(t)};x(r,h),d[h]=0,p[h]=a(r);for(var T=0;g.size()>0;){if(b(),T++,c===u){for(var k=[],E=i,A=u,_=v[A];k.unshift(E),null!=_&&k.unshift(_),null!=(E=y[A]);)_=v[A=E.id()];return{found:!0,distance:d[c],path:this.spawn(k),steps:T}}f[c]=!0;for(var C=l._private.edges,S=0;S<C.length;S++){var R=C[S];if(this.hasElementWithId(R.id())&&(!s||R.data("source")===c)){var L=R.source(),D=R.target(),I=L.id()!==c?L:D,N=I.id();if(this.hasElementWithId(N)&&!f[N]){var M=d[c]+o(R);w(N)?M<d[N]&&(d[N]=M,p[N]=M+a(I),y[N]=l,v[N]=R):(d[N]=M,p[N]=M+a(I),x(I,N),y[N]=l,v[N]=R)}}}}return{found:!1,distance:void 0,path:void 0,steps:T}}},Pe=de({weight:function(t){return 1},directed:!1}),$e={floydWarshall:function(t){for(var e=this.cy(),n=Pe(t),r=n.weight,i=n.directed,a=r,s=this.byGroup(),o=s.nodes,l=s.edges,c=o.length,h=c*c,u=function(t){return o.indexOf(t)},d=function(t){return o[t]},p=new Array(h),f=0;f<h;f++){var g=f%c,m=(f-g)/c;p[f]=m===g?0:1/0}for(var y=new Array(h),v=new Array(h),x=0;x<l.length;x++){var b=l[x],w=b.source()[0],T=b.target()[0];if(w!==T){var k=u(w),E=u(T),A=k*c+E,_=a(b);if(p[A]>_&&(p[A]=_,y[A]=E,v[A]=b),!i){var C=E*c+k;!i&&p[C]>_&&(p[C]=_,y[C]=k,v[C]=b)}}}for(var S=0;S<c;S++)for(var R=0;R<c;R++)for(var L=R*c+S,D=0;D<c;D++){var I=R*c+D,N=S*c+D;p[L]+p[N]<p[I]&&(p[I]=p[L]+p[N],y[I]=y[L])}var M=function(t){return u(function(t){return(V(t)?e.filter(t):t)[0]}(t))},O={distance:function(t,e){var n=M(t),r=M(e);return p[n*c+r]},path:function(t,n){var r=M(t),i=M(n),a=d(r);if(r===i)return a.collection();if(null==y[r*c+i])return e.collection();var s,o=e.collection(),l=r;for(o.merge(a);r!==i;)l=r,r=y[r*c+i],s=v[l*c+r],o.merge(s),o.merge(d(r));return o}};return O}},Be=de({weight:function(t){return 1},directed:!1,root:null}),Fe={bellmanFord:function(t){var e=this,n=Be(t),r=n.weight,i=n.directed,a=n.root,s=r,o=this,l=this.cy(),c=this.byGroup(),h=c.edges,u=c.nodes,d=u.length,p=new ye,f=!1,g=[];a=l.collection(a)[0],h.unmergeBy(function(t){return t.isLoop()});for(var m=h.length,y=function(t){var e=p.get(t.id());return e||(e={},p.set(t.id(),e)),e},v=function(t){return(V(t)?l.$(t):t)[0]},x=0;x<d;x++){var b=u[x],w=y(b);b.same(a)?w.dist=0:w.dist=1/0,w.pred=null,w.edge=null}for(var T=!1,k=function(t,e,n,r,i,a){var s=r.dist+a;s<i.dist&&!n.same(r.edge)&&(i.dist=s,i.pred=t,i.edge=n,T=!0)},E=1;E<d;E++){T=!1;for(var A=0;A<m;A++){var _=h[A],C=_.source(),S=_.target(),R=s(_),L=y(C),D=y(S);k(C,0,_,L,D,R),i||k(S,0,_,D,L,R)}if(!T)break}if(T)for(var I=[],N=0;N<m;N++){var M=h[N],O=M.source(),P=M.target(),$=s(M),B=y(O).dist,F=y(P).dist;if(B+$<F||!i&&F+$<B){if(f||(oe("Graph contains a negative weight cycle for Bellman-Ford"),f=!0),!1===t.findNegativeWeightCycles)break;var z=[];B+$<F&&z.push(O),!i&&F+$<B&&z.push(P);for(var K=z.length,q=0;q<K;q++){var U=z[q],j=[U];j.push(y(U).edge);for(var Y=y(U).pred;-1===j.indexOf(Y);)j.push(Y),j.push(y(Y).edge),Y=y(Y).pred;for(var G=(j=j.slice(j.indexOf(Y)))[0].id(),W=0,H=2;H<j.length;H+=2)j[H].id()<G&&(G=j[H].id(),W=H);(j=j.slice(W).concat(j.slice(0,W))).push(j[0]);var X=j.map(function(t){return t.id()}).join(",");-1===I.indexOf(X)&&(g.push(o.spawn(j)),I.push(X))}}}return{distanceTo:function(t){return y(v(t)).dist},pathTo:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=v(t);;){if(null==i)return e.spawn();var s=y(i),l=s.edge,c=s.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=c}return o.spawn(r)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},ze=Math.sqrt(2),Ke=function(t,e,n){0===n.length&&ae("Karger-Stein must be run on a connected (sub)graph");for(var r=n[t],i=r[1],a=r[2],s=e[i],o=e[a],l=n,c=l.length-1;c>=0;c--){var h=l[c],u=h[1],d=h[2];(e[u]===s&&e[d]===o||e[u]===o&&e[d]===s)&&l.splice(c,1)}for(var p=0;p<l.length;p++){var f=l[p];f[1]===o?(l[p]=f.slice(),l[p][1]=s):f[2]===o&&(l[p]=f.slice(),l[p][2]=s)}for(var g=0;g<e.length;g++)e[g]===o&&(e[g]=s);return l},qe=function(t,e,n,r){for(;n>r;){var i=Math.floor(Math.random()*e.length);e=Ke(i,t,e),n--}return e},Ue={kargerStein:function(){var t=this,e=this.byGroup(),n=e.nodes,r=e.edges;r.unmergeBy(function(t){return t.isLoop()});var i=n.length,a=r.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),o=Math.floor(i/ze);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=r[c];l.push([c,n.indexOf(h.source()),n.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),f=new Array(i),g=new Array(i),m=function(t,e){for(var n=0;n<i;n++)e[n]=t[n]},y=0;y<=s;y++){for(var v=0;v<i;v++)f[v]=v;var x=qe(f,l.slice(),i,o),b=x.slice();m(f,g);var w=qe(f,x,o,2),T=qe(g,b,o,2);w.length<=T.length&&w.length<u?(u=w.length,d=w,m(f,p)):T.length<=w.length&&T.length<u&&(u=T.length,d=T,m(g,p))}for(var k=this.spawn(d.map(function(t){return r[t[0]]})),E=this.spawn(),A=this.spawn(),_=p[0],C=0;C<p.length;C++){var S=p[C],R=n[C];S===_?E.merge(R):A.merge(R)}var L=function(e){var n=t.spawn();return e.forEach(function(e){n.merge(e),e.connectedEdges().forEach(function(e){t.contains(e)&&!k.contains(e)&&n.merge(e)})}),n},D=[L(E),L(A)];return{cut:k,components:D,partition1:E,partition2:A}}ae("At least 2 nodes are required for Karger-Stein algorithm")}},je=function(t,e,n){return{x:t.x*e+n.x,y:t.y*e+n.y}},Ye=function(t,e,n){return{x:(t.x-n.x)/e,y:(t.y-n.y)/e}},Ge=function(t){return{x:t[0],y:t[1]}},We=function(t,e){return Math.atan2(e,t)-Math.PI/2},Ve=Math.log2||function(t){return Math.log(t)/Math.log(2)},He=function(t){return t>0?1:t<0?-1:0},Xe=function(t,e){return Math.sqrt(Ze(t,e))},Ze=function(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},Qe=function(t){for(var e=t.length,n=0,r=0;r<e;r++)n+=t[r];for(var i=0;i<e;i++)t[i]=t[i]/n;return t},Je=function(t,e,n,r){return(1-r)*(1-r)*t+2*(1-r)*r*e+r*r*n},tn=function(t,e,n,r){return{x:Je(t.x,e.x,n.x,r),y:Je(t.y,e.y,n.y,r)}},en=function(t,e,n){return Math.max(t,Math.min(n,e))},nn=function(t){if(null==t)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=t.x1&&null!=t.y1){if(null!=t.x2&&null!=t.y2&&t.x2>=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},rn=function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},an=function(t,e,n){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},sn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},on=function(t){var e,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)e=n=r=i=a[0];else if(2===a.length)e=r=a[0],i=n=a[1];else if(4===a.length){var s=l(a,4);e=s[0],n=s[1],r=s[2],i=s[3]}return t.x1-=i,t.x2+=n,t.y1-=e,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},ln=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},cn=function(t,e){return!(t.x1>e.x2)&&(!(e.x1>t.x2)&&(!(t.x2<e.x1)&&(!(e.x2<t.x1)&&(!(t.y2<e.y1)&&(!(e.y2<t.y1)&&(!(t.y1>e.y2)&&!(e.y1>t.y2)))))))},hn=function(t,e,n){return t.x1<=e&&e<=t.x2&&t.y1<=n&&n<=t.y2},un=function(t,e){return hn(t,e.x,e.y)},dn=function(t,e){return hn(t,e.x1,e.y1)&&hn(t,e.x2,e.y2)},pn=null!==(Re=Math.hypot)&&void 0!==Re?Re:function(t,e){return Math.sqrt(t*t+e*e)};function fn(t,e,n,r,i,a){var s=function(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var n=function(t,e){return{x:t.x+e.x,y:t.y+e.y}},r=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},i=function(t,e){return{x:t.x*e,y:t.y*e}},a=function(t,e){return t.x*e.y-t.y*e.x},s=function(t){var e=pn(t.x,t.y);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},o=function(t,e,s,o){var l=r(e,t),c=r(o,s),h=a(l,c);if(Math.abs(h)<1e-9)return n(t,i(l,.5));var u=a(r(s,t),c)/h;return n(t,i(l,u))},l=t.map(function(t){return{x:t.x,y:t.y}});(function(t){for(var e=0,n=0;n<t.length;n++){var r=t[n],i=t[(n+1)%t.length];e+=r.x*i.y-i.x*r.y}return e/2})(l)<0&&l.reverse();for(var c=l.length,h=[],u=0;u<c;u++){var d=l[u],p=l[(u+1)%c],f=r(p,d),g=s({x:f.y,y:-f.x});h.push(g)}for(var m=h.map(function(t,r){return{p1:n(l[r],i(t,e)),p2:n(l[(r+1)%c],i(t,e))}}),y=[],v=0;v<c;v++){var x=m[(v-1+c)%c],b=m[v],w=o(x.p1,x.p2,b.p1,b.p2);y.push(w)}return y}(Sn(t,e,n,r,i),a),o=nn();return s.forEach(function(t){return an(o,t.x,t.y)}),o}var gn=function(t,e,n,r,i,a,s){var o,l,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",h="auto"===c?Mn(i,a):c,u=i/2,d=a/2,p=(h=Math.min(h,u,d))!==u,f=h!==d;if(p){var g=r-d-s;if((o=Cn(t,e,n,r,n-u+h-s,g,n+u-h+s,g,!1)).length>0)return o}if(f){var m=n+u+s;if((o=Cn(t,e,n,r,m,r-d+h-s,m,r+d-h+s,!1)).length>0)return o}if(p){var y=r+d+s;if((o=Cn(t,e,n,r,n-u+h-s,y,n+u-h+s,y,!1)).length>0)return o}if(f){var v=n-u-s;if((o=Cn(t,e,n,r,v,r-d+h-s,v,r+d-h+s,!1)).length>0)return o}var x=n-u+h,b=r-d+h;if((l=An(t,e,n,r,x,b,h+s)).length>0&&l[0]<=x&&l[1]<=b)return[l[0],l[1]];var w=n+u-h,T=r-d+h;if((l=An(t,e,n,r,w,T,h+s)).length>0&&l[0]>=w&&l[1]<=T)return[l[0],l[1]];var k=n+u-h,E=r+d-h;if((l=An(t,e,n,r,k,E,h+s)).length>0&&l[0]>=k&&l[1]>=E)return[l[0],l[1]];var A=n-u+h,_=r+d-h;return(l=An(t,e,n,r,A,_,h+s)).length>0&&l[0]<=A&&l[1]>=_?[l[0],l[1]]:[]},mn=function(t,e,n,r,i,a,s){var o=s,l=Math.min(n,i),c=Math.max(n,i),h=Math.min(r,a),u=Math.max(r,a);return l-o<=t&&t<=c+o&&h-o<=e&&e<=u+o},yn=function(t,e,n,r,i,a,s,o,l){var c=Math.min(n,s,i)-l,h=Math.max(n,s,i)+l,u=Math.min(r,o,a)-l,d=Math.max(r,o,a)+l;return!(t<c||t>h||e<u||e>d)},vn=function(t,e,n,r,i,a,s,o){var l=[];!function(t,e,n,r,i){var a,s,o,l,c,h,u,d;0===t&&(t=1e-5),o=-27*(r/=t)+(e/=t)*(9*(n/=t)-e*e*2),a=(s=(3*n-e*e)/9)*s*s+(o/=54)*o,i[1]=0,u=e/3,a>0?(c=(c=o+Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),h=(h=o-Math.sqrt(a))<0?-Math.pow(-h,1/3):Math.pow(h,1/3),i[0]=-u+c+h,u+=(c+h)/2,i[4]=i[2]=-u,u=Math.sqrt(3)*(-h+c)/2,i[3]=u,i[5]=-u):(i[5]=i[3]=0,0===a?(d=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3),i[0]=2*d-u,i[4]=i[2]=-(d+u)):(l=(s=-s)*s*s,l=Math.acos(o/Math.sqrt(l)),d=2*Math.sqrt(s),i[0]=-u+d*Math.cos(l/3),i[2]=-u+d*Math.cos((l+2*Math.PI)/3),i[4]=-u+d*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*s+4*i*i-4*i*s+s*s+r*r-4*r*a+2*r*o+4*a*a-4*a*o+o*o,9*n*i-3*n*n-3*n*s-6*i*i+3*i*s+9*r*a-3*r*r-3*r*o-6*a*a+3*a*o,3*n*n-6*n*i+n*s-n*t+2*i*i+2*i*t-s*t+3*r*r-6*r*a+r*o-r*e+2*a*a+2*a*e-o*e,1*n*i-n*n+n*t-i*t+r*a-r*r+r*e-a*e,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&l[h]>=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p,f=-1,g=0;g<c.length;g++)u=Math.pow(1-c[g],2)*n+2*(1-c[g])*c[g]*i+c[g]*c[g]*s,d=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*a+c[g]*c[g]*o,p=Math.pow(u-t,2)+Math.pow(d-e,2),f>=0?p<f&&(f=p):f=p;return f},xn=function(t,e,n,r,i,a){var s=[t-n,e-r],o=[i-n,a-r],l=o[0]*o[0]+o[1]*o[1],c=s[0]*s[0]+s[1]*s[1],h=s[0]*o[0]+s[1]*o[1],u=h*h/l;return h<0?c:u>l?(t-i)*(t-i)+(e-a)*(e-a):c-u},bn=function(t,e,n){for(var r,i,a,s,o=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(a=n[2*(l+1)],s=n[2*(l+1)+1]):(a=n[2*(l+1-n.length/2)],s=n[2*(l+1-n.length/2)+1]),r==t&&a==t);else{if(!(r>=t&&t>=a||r<=t&&t<=a))continue;(t-r)/(a-r)*(s-i)+i>e&&o++}return o%2!=0},wn=function(t,e,n,r,i,a,s,o,l){var c,h=new Array(n.length);null!=o[0]?(c=Math.atan(o[1]/o[0]),o[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=o;for(var u,d=Math.cos(-c),p=Math.sin(-c),f=0;f<h.length/2;f++)h[2*f]=a/2*(n[2*f]*d-n[2*f+1]*p),h[2*f+1]=s/2*(n[2*f+1]*d+n[2*f]*p),h[2*f]+=r,h[2*f+1]+=i;if(l>0){var g=kn(h,-l);u=Tn(g)}else u=h;return bn(t,e,u)},Tn=function(t){for(var e,n,r,i,a,s,o,l,c=new Array(t.length/2),h=0;h<t.length/4;h++){e=t[4*h],n=t[4*h+1],r=t[4*h+2],i=t[4*h+3],h<t.length/4-1?(a=t[4*(h+1)],s=t[4*(h+1)+1],o=t[4*(h+1)+2],l=t[4*(h+1)+3]):(a=t[0],s=t[1],o=t[2],l=t[3]);var u=Cn(e,n,r,i,a,s,o,l,!0);c[2*h]=u[0],c[2*h+1]=u[1]}return c},kn=function(t,e){for(var n,r,i,a,s=new Array(2*t.length),o=0;o<t.length/2;o++){n=t[2*o],r=t[2*o+1],o<t.length/2-1?(i=t[2*(o+1)],a=t[2*(o+1)+1]):(i=t[0],a=t[1]);var l=a-r,c=-(i-n),h=Math.sqrt(l*l+c*c),u=l/h,d=c/h;s[4*o]=n+u*e,s[4*o+1]=r+d*e,s[4*o+2]=i+u*e,s[4*o+3]=a+d*e}return s},En=function(t,e,n,r,i,a,s){return t-=i,e-=a,(t/=n/2+s)*t+(e/=r/2+s)*e<=1},An=function(t,e,n,r,i,a,s){var o=[n-t,r-e],l=[t-i,e-a],c=o[0]*o[0]+o[1]*o[1],h=2*(l[0]*o[0]+l[1]*o[1]),u=h*h-4*c*(l[0]*l[0]+l[1]*l[1]-s*s);if(u<0)return[];var d=(-h+Math.sqrt(u))/(2*c),p=(-h-Math.sqrt(u))/(2*c),f=Math.min(d,p),g=Math.max(d,p),m=[];if(f>=0&&f<=1&&m.push(f),g>=0&&g<=1&&m.push(g),0===m.length)return[];var y=m[0]*o[0]+t,v=m[0]*o[1]+e;return m.length>1?m[0]==m[1]?[y,v]:[y,v,m[1]*o[0]+t,m[1]*o[1]+e]:[y,v]},_n=function(t,e,n){return e<=t&&t<=n||n<=t&&t<=e?t:t<=e&&e<=n||n<=e&&e<=t?e:n},Cn=function(t,e,n,r,i,a,s,o,l){var c=t-i,h=n-t,u=s-i,d=e-a,p=r-e,f=o-a,g=u*d-f*c,m=h*d-p*c,y=f*h-u*p;if(0!==y){var v=g/y,x=m/y,b=-.001;return b<=v&&v<=1.001&&b<=x&&x<=1.001||l?[t+v*h,e+v*p]:[]}return 0===g||0===m?_n(t,n,s)===s?[s,o]:_n(t,n,i)===i?[i,a]:_n(i,s,n)===n?[n,r]:[]:[]},Sn=function(t,e,n,r,i){var a=[],s=r/2,o=i/2,l=e,c=n;a.push({x:l+s*t[0],y:c+o*t[1]});for(var h=1;h<t.length/2;h++)a.push({x:l+s*t[2*h],y:c+o*t[2*h+1]});return a},Rn=function(t,e,n,r,i,a,s,o){var l,c,h,u,d,p,f=[],g=new Array(n.length),m=!0;if(null==a&&(m=!1),m){for(var y=0;y<g.length/2;y++)g[2*y]=n[2*y]*a+r,g[2*y+1]=n[2*y+1]*s+i;if(o>0){var v=kn(g,-o);c=Tn(v)}else c=g}else c=n;for(var x=0;x<c.length/2;x++)h=c[2*x],u=c[2*x+1],x<c.length/2-1?(d=c[2*(x+1)],p=c[2*(x+1)+1]):(d=c[0],p=c[1]),0!==(l=Cn(t,e,r,i,h,u,d,p)).length&&f.push(l[0],l[1]);return f},Ln=function(t,e,n){var r=[t[0]-e[0],t[1]-e[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),a=(i-n)/i;return a<0&&(a=1e-5),[e[0]+a*r[0],e[1]+a*r[1]]},Dn=function(t,e){var n=Nn(t,e);return n=In(n)},In=function(t){for(var e,n,r=t.length/2,i=1/0,a=1/0,s=-1/0,o=-1/0,l=0;l<r;l++)e=t[2*l],n=t[2*l+1],i=Math.min(i,e),s=Math.max(s,e),a=Math.min(a,n),o=Math.max(o,n);for(var c=2/(s-i),h=2/(o-a),u=0;u<r;u++)e=t[2*u]=t[2*u]*c,n=t[2*u+1]=t[2*u+1]*h,i=Math.min(i,e),s=Math.max(s,e),a=Math.min(a,n),o=Math.max(o,n);if(a<-1)for(var d=0;d<r;d++)n=t[2*d+1]=t[2*d+1]+(-1-a);return t},Nn=function(t,e){var n=1/t*2*Math.PI,r=t%2==0?Math.PI/2+n/2:Math.PI/2;r+=e;for(var i,a=new Array(2*t),s=0;s<t;s++)i=s*n+r,a[2*s]=Math.cos(i),a[2*s+1]=Math.sin(-i);return a},Mn=function(t,e){return Math.min(t/4,e/4,8)},On=function(t,e){return Math.min(t/10,e/10,8)},Pn=function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}};function $n(t,e){function n(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=t[(n+1)%t.length],a={x:i.x-r.x,y:i.y-r.y},s={x:-a.y,y:a.x},o=Math.sqrt(s.x*s.x+s.y*s.y);e.push({x:s.x/o,y:s.y/o})}return e}function r(t,e){var n,r=1/0,i=-1/0,a=s(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,l=o.x*e.x+o.y*e.y;r=Math.min(r,l),i=Math.max(i,l)}}catch(c){a.e(c)}finally{a.f()}return{min:r,max:i}}function i(t,e){return!(t.max<e.min||e.max<t.min)}var a,o=s([].concat(c(n(t)),c(n(e))));try{for(o.s();!(a=o.n()).done;){var l=a.value;if(!i(r(t,l),r(e,l)))return!1}}catch(h){o.e(h)}finally{o.f()}return!0}var Bn=de({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),Fn={pageRank:function(t){for(var e=Bn(t),n=e.dampingFactor,r=e.precision,i=e.iterations,a=e.weight,s=this._private.cy,o=this.byGroup(),l=o.nodes,c=o.edges,h=l.length,u=h*h,d=c.length,p=new Array(u),f=new Array(h),g=(1-n)/h,m=0;m<h;m++){for(var y=0;y<h;y++){p[m*h+y]=0}f[m]=0}for(var v=0;v<d;v++){var x=c[v],b=x.data("source"),w=x.data("target");if(b!==w){var T=l.indexOfId(b),k=l.indexOfId(w),E=a(x);p[k*h+T]+=E,f[T]+=E}}for(var A=1/h+g,_=0;_<h;_++)if(0===f[_])for(var C=0;C<h;C++){p[C*h+_]=A}else for(var S=0;S<h;S++){var R=S*h+_;p[R]=p[R]/f[_]+g}for(var L,D=new Array(h),I=new Array(h),N=0;N<h;N++)D[N]=1;for(var M=0;M<i;M++){for(var O=0;O<h;O++)I[O]=0;for(var P=0;P<h;P++)for(var $=0;$<h;$++){var B=P*h+$;I[P]+=p[B]*D[$]}Qe(I),L=D,D=I,I=L;for(var F=0,z=0;z<h;z++){var K=L[z]-D[z];F+=K*K}if(F<r)break}return{rank:function(t){return t=s.collection(t)[0],D[l.indexOf(t)]}}}},zn=de({root:null,weight:function(t){return 1},directed:!1,alpha:0}),Kn={degreeCentralityNormalized:function(t){t=zn(t);var e=this.cy(),n=this.nodes(),r=n.length;if(t.directed){for(var i={},a={},s=0,o=0,l=0;l<r;l++){var c=n[l],h=c.id();t.root=c;var u=this.degreeCentrality(t);s<u.indegree&&(s=u.indegree),o<u.outdegree&&(o=u.outdegree),i[h]=u.indegree,a[h]=u.outdegree}return{indegree:function(t){return 0==s?0:(V(t)&&(t=e.filter(t)),i[t.id()]/s)},outdegree:function(t){return 0===o?0:(V(t)&&(t=e.filter(t)),a[t.id()]/o)}}}for(var d={},p=0,f=0;f<r;f++){var g=n[f];t.root=g;var m=this.degreeCentrality(t);p<m.degree&&(p=m.degree),d[g.id()]=m.degree}return{degree:function(t){return 0===p?0:(V(t)&&(t=e.filter(t)),d[t.id()]/p)}}},degreeCentrality:function(t){t=zn(t);var e=this.cy(),n=this,r=t,i=r.root,a=r.weight,s=r.directed,o=r.alpha;if(i=e.collection(i)[0],s){for(var l=i.connectedEdges(),c=l.filter(function(t){return t.target().same(i)&&n.has(t)}),h=l.filter(function(t){return t.source().same(i)&&n.has(t)}),u=c.length,d=h.length,p=0,f=0,g=0;g<c.length;g++)p+=a(c[g]);for(var m=0;m<h.length;m++)f+=a(h[m]);return{indegree:Math.pow(u,1-o)*Math.pow(p,o),outdegree:Math.pow(d,1-o)*Math.pow(f,o)}}for(var y=i.connectedEdges().intersection(n),v=y.length,x=0,b=0;b<y.length;b++)x+=a(y[b]);return{degree:Math.pow(v,1-o)*Math.pow(x,o)}}};Kn.dc=Kn.degreeCentrality,Kn.dcn=Kn.degreeCentralityNormalised=Kn.degreeCentralityNormalized;var qn=de({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Un={closenessCentralityNormalized:function(t){for(var e=qn(t),n=e.harmonic,r=e.weight,i=e.directed,a=this.cy(),s={},o=0,l=this.nodes(),c=this.floydWarshall({weight:r,directed:i}),h=0;h<l.length;h++){for(var u=0,d=l[h],p=0;p<l.length;p++)if(h!==p){var f=c.distance(d,l[p]);u+=n?1/f:f}n||(u=1/u),o<u&&(o=u),s[d.id()]=u}return{closeness:function(t){return 0==o?0:(t=V(t)?a.filter(t)[0].id():t.id(),s[t]/o)}}},closenessCentrality:function(t){var e=qn(t),n=e.root,r=e.weight,i=e.directed,a=e.harmonic;n=this.filter(n)[0];for(var s=this.dijkstra({root:n,weight:r,directed:i}),o=0,l=this.nodes(),c=0;c<l.length;c++){var h=l[c];if(!h.same(n)){var u=s.distanceTo(h);o+=a?1/u:u}}return a?o:1/o}};Un.cc=Un.closenessCentrality,Un.ccn=Un.closenessCentralityNormalised=Un.closenessCentralityNormalized;var jn=de({weight:null,directed:!1}),Yn={betweennessCentrality:function(t){for(var e=jn(t),n=e.directed,r=e.weight,i=null!=r,a=this.cy(),s=this.nodes(),o={},l={},c=0,h=function(t,e){l[t]=e,e>c&&(c=e)},u=function(t){return l[t]},d=0;d<s.length;d++){var p=s[d],f=p.id();o[f]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),h(f,0)}for(var g=function(){for(var t=s[m].id(),e=[],n={},l={},c={},d=new Le(function(t,e){return c[t]-c[e]}),p=0;p<s.length;p++){var f=s[p].id();n[f]=[],l[f]=0,c[f]=1/0}for(l[t]=1,c[t]=0,d.push(t);!d.empty();){var g=d.pop();if(e.push(g),i)for(var y=0;y<o[g].length;y++){var v=o[g][y],x=a.getElementById(g),b=void 0;b=x.edgesTo(v).length>0?x.edgesTo(v)[0]:v.edgesTo(x)[0];var w=r(b);v=v.id(),c[v]>c[g]+w&&(c[v]=c[g]+w,d.nodes.indexOf(v)<0?d.push(v):d.updateItem(v),l[v]=0,n[v]=[]),c[v]==c[g]+w&&(l[v]=l[v]+l[g],n[v].push(g))}else for(var T=0;T<o[g].length;T++){var k=o[g][T].id();c[k]==1/0&&(d.push(k),c[k]=c[g]+1),c[k]==c[g]+1&&(l[k]=l[k]+l[g],n[k].push(g))}}for(var E={},A=0;A<s.length;A++)E[s[A].id()]=0;for(;e.length>0;){for(var _=e.pop(),C=0;C<n[_].length;C++){var S=n[_][C];E[S]=E[S]+l[S]/l[_]*(1+E[_])}_!=s[m].id()&&h(_,u(_)+E[_])}},m=0;m<s.length;m++)g();var y={betweenness:function(t){var e=a.collection(t).id();return u(e)},betweennessNormalized:function(t){if(0==c)return 0;var e=a.collection(t).id();return u(e)/c}};return y.betweennessNormalised=y.betweennessNormalized,y}};Yn.bc=Yn.betweennessCentrality;var Gn=de({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Wn=function(t,e){for(var n=0,r=0;r<e.length;r++)n+=e[r](t);return n},Vn=function(t,e){for(var n,r=0;r<e;r++){n=0;for(var i=0;i<e;i++)n+=t[i*e+r];for(var a=0;a<e;a++)t[a*e+r]=t[a*e+r]/n}},Hn=function(t,e,n){for(var r=new Array(n*n),i=0;i<n;i++){for(var a=0;a<n;a++)r[i*n+a]=0;for(var s=0;s<n;s++)for(var o=0;o<n;o++)r[i*n+o]+=t[i*n+s]*e[s*n+o]}return r},Xn=function(t,e,n){for(var r=t.slice(0),i=1;i<n;i++)t=Hn(t,r,e);return t},Zn=function(t,e,n){for(var r=new Array(e*e),i=0;i<e*e;i++)r[i]=Math.pow(t[i],n);return Vn(r,e),r},Qn=function(t,e,n,r){for(var i=0;i<n;i++){if(Math.round(t[i]*Math.pow(10,r))/Math.pow(10,r)!==Math.round(e[i]*Math.pow(10,r))/Math.pow(10,r))return!1}return!0},Jn=function(t,e){for(var n=0;n<t.length;n++)if(!e[n]||t[n].id()!==e[n].id())return!1;return!0},tr=function(t){for(var e=this.nodes(),n=this.edges(),r=this.cy(),i=function(t){return Gn(t)}(t),a={},s=0;s<e.length;s++)a[e[s].id()]=s;for(var o,l=e.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<n.length;d++){var p=n[d],f=a[p.source().id()],g=a[p.target().id()],m=Wn(p,i.attributes);h[f*l+g]+=m,h[g*l+f]+=m}!function(t,e,n){for(var r=0;r<e;r++)t[r*e+r]=n}(h,l,i.multFactor),Vn(h,l);for(var y=!0,v=0;y&&v<i.maxIterations;)y=!1,o=Xn(h,l,i.expandFactor),h=Zn(o,l,i.inflateFactor),Qn(h,o,c,4)||(y=!0),v++;var x=function(t,e,n,r){for(var i=[],a=0;a<e;a++){for(var s=[],o=0;o<e;o++)Math.round(1e3*t[a*e+o])/1e3>0&&s.push(n[o]);0!==s.length&&i.push(r.collection(s))}return i}(h,l,e,r);return x=function(t){for(var e=0;e<t.length;e++)for(var n=0;n<t.length;n++)e!=n&&Jn(t[e],t[n])&&t.splice(n,1);return t}(x),x},er={markovClustering:tr,mcl:tr},nr=function(t){return t},rr=function(t,e){return Math.abs(e-t)},ir=function(t,e,n){return t+rr(e,n)},ar=function(t,e,n){return t+Math.pow(n-e,2)},sr=function(t){return Math.sqrt(t)},or=function(t,e,n){return Math.max(t,rr(e,n))},lr=function(t,e,n,r,i){for(var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:nr,s=r,o=0;o<t;o++)s=i(s,e(o),n(o));return a(s)},cr={euclidean:function(t,e,n){return t>=2?lr(t,e,n,0,ar,sr):lr(t,e,n,0,ir)},squaredEuclidean:function(t,e,n){return lr(t,e,n,0,ar)},manhattan:function(t,e,n){return lr(t,e,n,0,ir)},max:function(t,e,n){return lr(t,e,n,-1/0,or)}};function hr(t,e,n,r,i,a){var s;return s=H(t)?t:cr[t]||cr.euclidean,0===e&&H(t)?s(i,a):s(e,n,r,i,a)}cr["squared-euclidean"]=cr.squaredEuclidean,cr.squaredeuclidean=cr.squaredEuclidean;var ur=de({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dr=function(t){return ur(t)},pr=function(t,e,n,r,i){var a="kMedoids"!==i?function(t){return n[t]}:function(t){return r[t](n)},s=n,o=e;return hr(t,r.length,a,function(t){return r[t](e)},s,o)},fr=function(t,e,n){for(var r=n.length,i=new Array(r),a=new Array(r),s=new Array(e),o=null,l=0;l<r;l++)i[l]=t.min(n[l]).value,a[l]=t.max(n[l]).value;for(var c=0;c<e;c++){o=[];for(var h=0;h<r;h++)o[h]=Math.random()*(a[h]-i[h])+i[h];s[c]=o}return s},gr=function(t,e,n,r,i){for(var a=1/0,s=0,o=0;o<e.length;o++){var l=pr(n,t,e[o],r,i);l<a&&(a=l,s=o)}return s},mr=function(t,e,n){for(var r=[],i=null,a=0;a<e.length;a++)n[(i=e[a]).id()]===t&&r.push(i);return r},yr=function(t,e,n){return Math.abs(e-t)<=n},vr=function(t,e,n){for(var r=0;r<t.length;r++)for(var i=0;i<t[r].length;i++){if(Math.abs(t[r][i]-e[r][i])>n)return!1}return!0},xr=function(t,e,n){for(var r=0;r<n;r++)if(t===e[r])return!0;return!1},br=function(t,e){var n=new Array(e);if(t.length<50)for(var r=0;r<e;r++){for(var i=t[Math.floor(Math.random()*t.length)];xr(i,n,r);)i=t[Math.floor(Math.random()*t.length)];n[r]=i}else for(var a=0;a<e;a++)n[a]=t[Math.floor(Math.random()*t.length)];return n},wr=function(t,e,n){for(var r=0,i=0;i<e.length;i++)r+=pr("manhattan",e[i],t,n,"kMedoids");return r},Tr=function(t,e,n,r,i){for(var a,s,o=0;o<e.length;o++)for(var l=0;l<t.length;l++)r[o][l]=Math.pow(n[o][l],i.m);for(var c=0;c<t.length;c++)for(var h=0;h<i.attributes.length;h++){a=0,s=0;for(var u=0;u<e.length;u++)a+=r[u][c]*i.attributes[h](e[u]),s+=r[u][c];t[c][h]=a/s}},kr=function(t,e,n,r,i){for(var a=0;a<t.length;a++)e[a]=t[a].slice();for(var s,o,l,c=2/(i.m-1),h=0;h<n.length;h++)for(var u=0;u<r.length;u++){s=0;for(var d=0;d<n.length;d++)o=pr(i.distance,r[u],n[h],i.attributes,"cmeans"),l=pr(i.distance,r[u],n[d],i.attributes,"cmeans"),s+=Math.pow(o/l,c);t[u][h]=1/s}},Er=function(t){var e,n,r,i,a,s=this.cy(),o=this.nodes(),l=dr(t);i=new Array(o.length);for(var c=0;c<o.length;c++)i[c]=new Array(l.k);r=new Array(o.length);for(var h=0;h<o.length;h++)r[h]=new Array(l.k);for(var u=0;u<o.length;u++){for(var d=0,p=0;p<l.k;p++)r[u][p]=Math.random(),d+=r[u][p];for(var f=0;f<l.k;f++)r[u][f]=r[u][f]/d}n=new Array(l.k);for(var g=0;g<l.k;g++)n[g]=new Array(l.attributes.length);a=new Array(o.length);for(var m=0;m<o.length;m++)a[m]=new Array(l.k);for(var y=!0,v=0;y&&v<l.maxIterations;)y=!1,Tr(n,o,r,a,l),kr(r,i,n,o,l),vr(r,i,l.sensitivityThreshold)||(y=!0),v++;return e=function(t,e,n,r){for(var i,a,s=new Array(n.k),o=0;o<s.length;o++)s[o]=[];for(var l=0;l<e.length;l++){i=-1/0,a=-1;for(var c=0;c<e[0].length;c++)e[l][c]>i&&(i=e[l][c],a=c);s[a].push(t[l])}for(var h=0;h<s.length;h++)s[h]=r.collection(s[h]);return s}(o,r,l,s),{clusters:e,degreeOfMembership:r}},Ar={kMeans:function(t){var e,n=this.cy(),r=this.nodes(),i=null,a=dr(t),s=new Array(a.k),o={};a.testMode?"number"==typeof a.testCentroids?(a.testCentroids,e=fr(r,a.k,a.attributes)):e="object"===u(a.testCentroids)?a.testCentroids:fr(r,a.k,a.attributes):e=fr(r,a.k,a.attributes);for(var l=!0,c=0;l&&c<a.maxIterations;){for(var h=0;h<r.length;h++)o[(i=r[h]).id()]=gr(i,e,a.distance,a.attributes,"kMeans");l=!1;for(var d=0;d<a.k;d++){var p=mr(d,r,o);if(0!==p.length){for(var f=a.attributes.length,g=e[d],m=new Array(f),y=new Array(f),v=0;v<f;v++){y[v]=0;for(var x=0;x<p.length;x++)i=p[x],y[v]+=a.attributes[v](i);m[v]=y[v]/p.length,yr(m[v],g[v],a.sensitivityThreshold)||(l=!0)}e[d]=m,s[d]=n.collection(p)}}c++}return s},kMedoids:function(t){var e,n,r=this.cy(),i=this.nodes(),a=null,s=dr(t),o=new Array(s.k),l={},c=new Array(s.k);s.testMode?"number"==typeof s.testCentroids||(e="object"===u(s.testCentroids)?s.testCentroids:br(i,s.k)):e=br(i,s.k);for(var h=!0,d=0;h&&d<s.maxIterations;){for(var p=0;p<i.length;p++)l[(a=i[p]).id()]=gr(a,e,s.distance,s.attributes,"kMedoids");h=!1;for(var f=0;f<e.length;f++){var g=mr(f,i,l);if(0!==g.length){c[f]=wr(e[f],g,s.attributes);for(var m=0;m<g.length;m++)(n=wr(g[m],g,s.attributes))<c[f]&&(c[f]=n,e[f]=g[m],h=!0);o[f]=r.collection(g)}}d++}return o},fuzzyCMeans:Er,fcm:Er},_r=de({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),Cr={single:"min",complete:"max"},Sr=function(t,e,n,r,i){for(var a,s=0,o=1/0,l=i.attributes,c=function(t,e){return hr(i.distance,l.length,function(e){return l[e](t)},function(t){return l[t](e)},t,e)},h=0;h<t.length;h++){var u=t[h].key,d=n[u][r[u]];d<o&&(s=u,o=d)}if("threshold"===i.mode&&o>=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p,f=e[s],g=e[r[s]];p="dendrogram"===i.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},t[f.index]=p,t.splice(g.index,1),e[f.key]=p;for(var m=0;m<t.length;m++){var y=t[m];f.key===y.key?a=1/0:"min"===i.linkage?(a=n[f.key][y.key],n[f.key][y.key]>n[g.key][y.key]&&(a=n[g.key][y.key])):"max"===i.linkage?(a=n[f.key][y.key],n[f.key][y.key]<n[g.key][y.key]&&(a=n[g.key][y.key])):a="mean"===i.linkage?(n[f.key][y.key]*f.size+n[g.key][y.key]*g.size)/(f.size+g.size):"dendrogram"===i.mode?c(y.value,f.value):c(y.value[0],f.value[0]),n[f.key][y.key]=n[y.key][f.key]=a}for(var v=0;v<t.length;v++){var x=t[v].key;if(r[x]===f.key||r[x]===g.key){for(var b=x,w=0;w<t.length;w++){var T=t[w].key;n[x][T]<n[x][b]&&(b=T)}r[x]=b}t[v].index=v}return f.key=g.key=f.index=g.index=null,!0},Rr=function(t,e,n){t&&(t.value?e.push(t.value):(t.left&&Rr(t.left,e),t.right&&Rr(t.right,e)))},Lr=function(t,e){if(!t)return"";if(t.left&&t.right){var n=Lr(t.left,e),r=Lr(t.right,e),i=e.add({group:"nodes",data:{id:n+","+r}});return e.add({group:"edges",data:{source:n,target:i.id()}}),e.add({group:"edges",data:{source:r,target:i.id()}}),i.id()}return t.value?t.value.id():void 0},Dr=function(t,e,n){if(!t)return[];var r=[],i=[],a=[];return 0===e?(t.left&&Rr(t.left,r),t.right&&Rr(t.right,i),a=r.concat(i),[n.collection(a)]):1===e?t.value?[n.collection(t.value)]:(t.left&&Rr(t.left,r),t.right&&Rr(t.right,i),[n.collection(r),n.collection(i)]):t.value?[n.collection(t.value)]:(t.left&&(r=Dr(t.left,e-1,n)),t.right&&(i=Dr(t.right,e-1,n)),r.concat(i))},Ir=function(t){for(var e=this.cy(),n=this.nodes(),r=function(t){var e=_r(t),n=Cr[e.linkage];return null!=n&&(e.linkage=n),e}(t),i=r.attributes,a=function(t,e){return hr(r.distance,i.length,function(e){return i[e](t)},function(t){return i[t](e)},t,e)},s=[],o=[],l=[],c=[],h=0;h<n.length;h++){var u={value:"dendrogram"===r.mode?n[h]:[n[h]],key:h,index:h};s[h]=u,c[h]=u,o[h]=[],l[h]=0}for(var d=0;d<s.length;d++)for(var p=0;p<=d;p++){var f=void 0;f="dendrogram"===r.mode?d===p?1/0:a(s[d].value,s[p].value):d===p?1/0:a(s[d].value[0],s[p].value[0]),o[d][p]=f,o[p][d]=f,f<o[d][l[d]]&&(l[d]=p)}for(var g,m=Sr(s,c,o,l,r);m;)m=Sr(s,c,o,l,r);return"dendrogram"===r.mode?(g=Dr(s[0],r.dendrogramDepth,e),r.addDendrogram&&Lr(s[0],e)):(g=new Array(s.length),s.forEach(function(t,n){t.key=t.index=null,g[n]=e.collection(t.value)})),g},Nr={hierarchicalClustering:Ir,hca:Ir},Mr=de({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Or=function(t,e,n,r){var i=function(t,e){return r[e](t)};return-hr(t,r.length,function(t){return i(e,t)},function(t){return i(n,t)},e,n)},Pr=function(t,e){var n=null;return n="median"===e?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n<t.length&&t.splice(n,t.length-n),e>0&&t.splice(0,e)):t=t.slice(e,n);for(var a=0,s=t.length-1;s>=0;s--){var o=t[s];i?isFinite(o)||(t[s]=-1/0,a++):t.splice(s,1)}r&&t.sort(function(t,e){return t-e});var l=t.length,c=Math.floor(l/2);return l%2!=0?t[c+1+a]:(t[c-1+a]+t[c+a])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=0,i=0,a=e;a<n;a++){var s=t[a];isFinite(s)&&(r+=s,i++)}return r/i}(t):"min"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=1/0,i=e;i<n;i++){var a=t[i];isFinite(a)&&(r=Math.min(a,r))}return r}(t):"max"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=-1/0,i=e;i<n;i++){var a=t[i];isFinite(a)&&(r=Math.max(a,r))}return r}(t):e,n},$r=function(t,e,n){for(var r=[],i=0;i<t;i++){for(var a=-1,s=-1/0,o=0;o<n.length;o++){var l=n[o];e[i*t+l]>s&&(a=l,s=e[i*t+l])}a>0&&r.push(a)}for(var c=0;c<n.length;c++)r[n[c]]=n[c];return r},Br=function(t){for(var e,n,r,i,a,s,o=this.cy(),l=this.nodes(),c=function(t){var e=t.damping,n=t.preference;.5<=e&&e<1||ae("Damping must range on [0.5, 1). Got: ".concat(e));var r=["median","mean","min","max"];return r.some(function(t){return t===n})||Q(n)||ae("Preference must be one of [".concat(r.map(function(t){return"'".concat(t,"'")}).join(", "),"] or a number. Got: ").concat(n)),Mr(t)}(t),h={},u=0;u<l.length;u++)h[l[u].id()]=u;n=(e=l.length)*e,r=new Array(n);for(var d=0;d<n;d++)r[d]=-1/0;for(var p=0;p<e;p++)for(var f=0;f<e;f++)p!==f&&(r[p*e+f]=Or(c.distance,l[p],l[f],c.attributes));i=Pr(r,c.preference);for(var g=0;g<e;g++)r[g*e+g]=i;a=new Array(n);for(var m=0;m<n;m++)a[m]=0;s=new Array(n);for(var y=0;y<n;y++)s[y]=0;for(var v=new Array(e),x=new Array(e),b=new Array(e),w=0;w<e;w++)v[w]=0,x[w]=0,b[w]=0;for(var T,k=new Array(e*c.minIterations),E=0;E<k.length;E++)k[E]=0;for(T=0;T<c.maxIterations;T++){for(var A=0;A<e;A++){for(var _=-1/0,C=-1/0,S=-1,R=0,L=0;L<e;L++)v[L]=a[A*e+L],(R=s[A*e+L]+r[A*e+L])>=_?(C=_,_=R,S=L):R>C&&(C=R);for(var D=0;D<e;D++)a[A*e+D]=(1-c.damping)*(r[A*e+D]-_)+c.damping*v[D];a[A*e+S]=(1-c.damping)*(r[A*e+S]-C)+c.damping*v[S]}for(var I=0;I<e;I++){for(var N=0,M=0;M<e;M++)v[M]=s[M*e+I],x[M]=Math.max(0,a[M*e+I]),N+=x[M];N-=x[I],x[I]=a[I*e+I],N+=x[I];for(var O=0;O<e;O++)s[O*e+I]=(1-c.damping)*Math.min(0,N-x[O])+c.damping*v[O];s[I*e+I]=(1-c.damping)*(N-x[I])+c.damping*v[I]}for(var P=0,$=0;$<e;$++){var B=s[$*e+$]+a[$*e+$]>0?1:0;k[T%c.minIterations*e+$]=B,P+=B}if(P>0&&(T>=c.minIterations-1||T==c.maxIterations-1)){for(var F=0,z=0;z<e;z++){b[z]=0;for(var K=0;K<c.minIterations;K++)b[z]+=k[K*e+z];0!==b[z]&&b[z]!==c.minIterations||F++}if(F===e)break}}for(var q=function(t,e,n){for(var r=[],i=0;i<t;i++)e[i*t+i]+n[i*t+i]>0&&r.push(i);return r}(e,a,s),U=function(t,e,n){for(var r=$r(t,e,n),i=0;i<n.length;i++){for(var a=[],s=0;s<r.length;s++)r[s]===n[i]&&a.push(s);for(var o=-1,l=-1/0,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=e[a[u]*t+a[c]];h>l&&(o=c,l=h)}n[i]=a[o]}return $r(t,e,n)}(e,r,q),j={},Y=0;Y<q.length;Y++)j[q[Y]]=[];for(var G=0;G<l.length;G++){var W=U[h[l[G].id()]];null!=W&&j[W].push(l[G])}for(var V=new Array(q.length),H=0;H<q.length;H++)V[H]=o.collection(j[q[H]]);return V},Fr={affinityPropagation:Br,ap:Br},zr=de({root:void 0,directed:!1}),Kr={hierholzer:function(t){if(!Z(t)){var e=arguments;t={root:e[0],directed:e[1]}}var n,r,i,a=zr(t),s=a.root,o=a.directed,l=this,c=!1;s&&(i=V(s)?this.filter(s)[0].id():s[0].id());var h={},u={};o?l.forEach(function(t){var e=t.id();if(t.isNode()){var i=t.indegree(!0),a=t.outdegree(!0),s=i-a,o=a-i;1==s?n?c=!0:n=e:1==o?r?c=!0:r=e:(o>1||s>1)&&(c=!0),h[e]=[],t.outgoers().forEach(function(t){t.isEdge()&&h[e].push(t.id())})}else u[e]=[void 0,t.target().id()]}):l.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(n?r?c=!0:r=e:n=e),h[e]=[],t.connectedEdges().forEach(function(t){return h[e].push(t.id())})):u[e]=[t.source().id(),t.target().id()]});var d={found:!1,trail:void 0};if(c)return d;if(r&&n)if(o){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(t){for(var e,n,r,i=t,a=[t];h[i].length;)e=h[i].shift(),n=u[e][0],i!=(r=u[e][1])?(h[r]=h[r].filter(function(t){return t!=e}),i=r):o||i==n||(h[n]=h[n].filter(function(t){return t!=e}),i=n),a.unshift(e),a.unshift(i);return a},f=[],g=[];for(g=p(i);1!=g.length;)0==h[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var m in f.unshift(l.getElementById(g.shift())),h)if(h[m].length)return d;return d.found=!0,d.trail=this.spawn(f,!0),d}},qr=function(){var t=this,e={},n=0,r=0,i=[],a=[],s={},o=function(l,c,h){l===h&&(r+=1),e[c]={id:n,low:n++,cutVertex:!1};var u,d,p,f,g=t.getElementById(c).connectedEdges().intersection(t);0===g.size()?i.push(t.spawn(t.getElementById(c))):g.forEach(function(n){u=n.source().id(),d=n.target().id(),(p=u===c?d:u)!==h&&(f=n.id(),s[f]||(s[f]=!0,a.push({x:c,y:p,edge:n})),p in e?e[c].low=Math.min(e[c].low,e[p].id):(o(l,p,c),e[c].low=Math.min(e[c].low,e[p].low),e[c].id<=e[p].low&&(e[c].cutVertex=!0,function(n,r){for(var s=a.length-1,o=[],l=t.spawn();a[s].x!=n||a[s].y!=r;)o.push(a.pop().edge),s--;o.push(a.pop().edge),o.forEach(function(n){var r=n.connectedNodes().intersection(t);l.merge(n),r.forEach(function(n){var r=n.id(),i=n.connectedEdges().intersection(t);l.merge(n),e[r].cutVertex?l.merge(i.filter(function(t){return t.isLoop()})):l.merge(i)})}),i.push(l)}(c,p))))})};t.forEach(function(t){if(t.isNode()){var n=t.id();n in e||(r=0,o(n,n),e[n].cutVertex=r>1)}});var l=Object.keys(e).filter(function(t){return e[t].cutVertex}).map(function(e){return t.getElementById(e)});return{cut:t.spawn(l),components:i}},Ur=function(){var t=this,e={},n=0,r=[],i=[],a=t.spawn(t),s=function(o){if(i.push(o),e[o]={index:n,low:n++,explored:!1},t.getElementById(o).connectedEdges().intersection(t).forEach(function(t){var n=t.target().id();n!==o&&(n in e||s(n),e[n].explored||(e[o].low=Math.min(e[o].low,e[n].low)))}),e[o].index===e[o].low){for(var l=t.spawn();;){var c=i.pop();if(l.merge(t.getElementById(c)),e[c].low=e[o].index,e[c].explored=!0,c===o)break}var h=l.edgesWith(l),u=l.merge(h);r.push(u),a=a.difference(u)}};return t.forEach(function(t){if(t.isNode()){var n=t.id();n in e||s(n)}}),{cut:a,components:r}},jr={};[Te,Ie,Ne,Oe,$e,Fe,Ue,Fn,Kn,Un,Yn,er,Ar,Nr,Fr,Kr,{hopcroftTarjanBiconnected:qr,htbc:qr,htb:qr,hopcroftTarjanBiconnectedComponents:qr},{tarjanStronglyConnected:Ur,tsc:Ur,tscc:Ur,tarjanStronglyConnectedComponents:Ur}].forEach(function(t){xt(jr,t)});var Yr=function(t){if(!(this instanceof Yr))return new Yr(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Yr.prototype={fulfill:function(t){return Gr(this,1,"fulfillValue",t)},reject:function(t){return Gr(this,2,"rejectReason",t)},then:function(t,e){var n=this,r=new Yr;return n.onFulfilled.push(Hr(t,r,"fulfill")),n.onRejected.push(Hr(e,r,"reject")),Wr(n),r.proxy}};var Gr=function(t,e,n,r){return 0===t.state&&(t.state=e,t[n]=r,Wr(t)),t},Wr=function(t){1===t.state?Vr(t,"onFulfilled",t.fulfillValue):2===t.state&&Vr(t,"onRejected",t.rejectReason)},Vr=function(t,e,n){if(0!==t[e].length){var r=t[e];t[e]=[];var i=function(){for(var t=0;t<r.length;t++)r[t](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},Hr=function(t,e,n){return function(r){if("function"!=typeof t)e[n].call(e,r);else{var i;try{i=t(r)}catch(a){return void e.reject(a)}Xr(e,i)}}},Xr=function(t,e){if(t!==e&&t.proxy!==e){var n;if("object"===u(e)&&null!==e||"function"==typeof e)try{n=e.then}catch(i){return void t.reject(i)}if("function"!=typeof n)t.fulfill(e);else{var r=!1;try{n.call(e,function(n){r||(r=!0,n===e?t.reject(new TypeError("circular thenable chain")):Xr(t,n))},function(e){r||(r=!0,t.reject(e))})}catch(i){r||t.reject(i)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};Yr.all=function(t){return new Yr(function(e,n){for(var r=new Array(t.length),i=0,a=function(n,a){r[n]=a,++i===t.length&&e(r)},s=0;s<t.length;s++)(function(e){var r=t[e];null!=r&&null!=r.then?r.then(function(t){a(e,t)},function(t){n(t)}):a(e,r)})(s)})},Yr.resolve=function(t){return new Yr(function(e,n){e(t)})},Yr.reject=function(t){return new Yr(function(e,n){n(t)})};var Zr="undefined"!=typeof Promise?Promise:Yr,Qr=function(t,e,n){var r=rt(t),i=!r,a=this._private=xt({duration:1e3},e,n);if(a.target=t,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&H(a.complete)&&a.completes.push(a.complete),i){var s=t.position();a.startPosition=a.startPosition||{x:s.x,y:s.y},a.startStyle=a.startStyle||t.cy().style().getAnimationStartStyle(t,a.style)}if(r){var o=t.pan();a.startPan={x:o.x,y:o.y},a.startZoom=t.zoom()}this.length=1,this[0]=this},Jr=Qr.prototype;xt(Jr,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var e=t.target._private.animation;(t.queue?e.queue:e.current).push(this),tt(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},progress:function(t){var e=this._private,n=e.playing;return void 0===t?e.progress:(n&&this.pause(),e.progress=t,e.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var t=this._private,e=t.playing;e&&this.pause(),t.progress=1-t.progress,t.started=!1;var n=function(e,n){var r=t[e];null!=r&&(t[e]=t[n],t[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),t.style)for(var r=0;r<t.style.length;r++){var i=t.style[r],a=i.name,s=t.startStyle[a];t.startStyle[a]=i,t.style[r]=s}return e&&this.play(),this},promise:function(t){var e,n=this._private;if("frame"===t)e=n.frames;else e=n.completes;return new Zr(function(t,n){e.push(function(){t()})})}}),Jr.complete=Jr.completed,Jr.run=Jr.play,Jr.running=Jr.playing;var ti,ei,ni,ri,ii,ai,si,oi,li,ci,hi,ui,di,pi,fi,gi,mi,yi,vi,xi,bi,wi,Ti,ki,Ei,Ai,_i,Ci,Si,Ri,Li,Di,Ii,Ni,Mi,Oi,Pi,$i,Bi,Fi,zi,Ki,qi,Ui,ji,Yi,Gi,Wi,Vi,Hi,Xi,Zi,Qi,Ji,ta,ea,na,ra,ia,aa,sa,oa,la,ca,ha,ua,da,pa,fa,ga,ma,ya,va,xa,ba,wa,Ta,ka,Ea,Aa,_a,Ca,Sa,Ra,La,Da,Ia={animated:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return!1;var n=e[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<e.length;n++){e[n]._private.animation.queue=[]}return this}},delay:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this}},delayAnimation:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this}},animation:function(){return function(t,e){var n=this,r=void 0!==n.length,i=r?n:[n],a=this._private.cy||this,s=!r,o=!s;if(!a.styleEnabled())return this;var l=a.style();if(t=xt({},t,e),0===Object.keys(t).length)return new Qr(i[0],t);switch(void 0===t.duration&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200}if(o&&(t.style=l.getPropsList(t.style||t.css),t.css=void 0),o&&null!=t.renderedPosition){var c=t.renderedPosition,h=a.pan(),u=a.zoom();t.position=Ye(c,u,h)}if(s&&null!=t.panBy){var d=t.panBy,p=a.pan();t.pan={x:p.x+d.x,y:p.y+d.y}}var f=t.center||t.centre;if(s&&null!=f){var g=a.getCenterPan(f.eles,t.zoom);null!=g&&(t.pan=g)}if(s&&null!=t.fit){var m=t.fit,y=a.getFitViewport(m.eles||m.boundingBox,m.padding);null!=y&&(t.pan=y.pan,t.zoom=y.zoom)}if(s&&Z(t.zoom)){var v=a.getZoomedViewport(t.zoom);null!=v?(v.zoomed&&(t.zoom=v.zoom),v.panned&&(t.pan=v.pan)):t.zoom=null}return new Qr(i[0],t)}},animate:function(){return function(t,e){var n=this,r=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;e&&(t=xt({},t,e));for(var i=0;i<r.length;i++){var a=r[i],s=a.animated()&&(void 0===t.queue||t.queue);a.animation(t,s?{queue:!0}:void 0).play()}return this}},stop:function(){return function(t,e){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var a=0;a<r.length;a++){for(var s=r[a]._private,o=s.animation.current,l=0;l<o.length;l++){var c=o[l]._private;e&&(c.duration=0)}t&&(s.animation.queue=[]),e||(s.animation.current=[])}return i.notify("draw"),this}}};function Na(){if(ei)return ti;ei=1;var t=Array.isArray;return ti=t}function Ma(){if(ci)return li;ci=1;var t,e=function(){if(oi)return si;oi=1;var t=Ct()["__core-js_shared__"];return si=t}(),n=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return li=function(t){return!!n&&n in t}}function Oa(){if(pi)return di;pi=1;var t=function(){if(ai)return ii;ai=1;var t=Lt(),e=_t();return ii=function(n){if(!e(n))return!1;var r=t(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}(),e=Ma(),n=_t(),r=function(){if(ui)return hi;ui=1;var t=Function.prototype.toString;return hi=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}}(),i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,o=a.toString,l=s.hasOwnProperty,c=RegExp("^"+o.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return di=function(a){return!(!n(a)||e(a))&&(t(a)?c:i).test(r(a))}}function Pa(){if(yi)return mi;yi=1;var t=Oa(),e=(gi||(gi=1,fi=function(t,e){return null==t?void 0:t[e]}),fi);return mi=function(n,r){var i=e(n,r);return t(i)?i:void 0},mi}function $a(){if(xi)return vi;xi=1;var t=Pa()(Object,"create");return vi=t}function Ba(){if(Di)return Li;Di=1;var t=function(){if(wi)return bi;wi=1;var t=$a();return bi=function(){this.__data__=t?t(null):{},this.size=0}}(),e=ki?Ti:(ki=1,Ti=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),n=function(){if(Ai)return Ei;Ai=1;var t=$a(),e=Object.prototype.hasOwnProperty;return Ei=function(n){var r=this.__data__;if(t){var i=r[n];return"__lodash_hash_undefined__"===i?void 0:i}return e.call(r,n)?r[n]:void 0},Ei}(),r=function(){if(Ci)return _i;Ci=1;var t=$a(),e=Object.prototype.hasOwnProperty;return _i=function(n){var r=this.__data__;return t?void 0!==r[n]:e.call(r,n)},_i}(),i=function(){if(Ri)return Si;Ri=1;var t=$a();return Si=function(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=t&&void 0===n?"__lodash_hash_undefined__":n,this},Si}();function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Li=a}function Fa(){if(Oi)return Mi;return Oi=1,Mi=function(t,e){return t===e||t!=t&&e!=e}}function za(){if($i)return Pi;$i=1;var t=Fa();return Pi=function(e,n){for(var r=e.length;r--;)if(t(e[r][0],n))return r;return-1},Pi}function Ka(){if(Wi)return Gi;Wi=1;var t=Ni?Ii:(Ni=1,Ii=function(){this.__data__=[],this.size=0}),e=function(){if(Fi)return Bi;Fi=1;var t=za(),e=Array.prototype.splice;return Bi=function(n){var r=this.__data__,i=t(r,n);return!(i<0||(i==r.length-1?r.pop():e.call(r,i,1),--this.size,0))},Bi}(),n=function(){if(Ki)return zi;Ki=1;var t=za();return zi=function(e){var n=this.__data__,r=t(n,e);return r<0?void 0:n[r][1]},zi}(),r=function(){if(Ui)return qi;Ui=1;var t=za();return qi=function(e){return t(this.__data__,e)>-1}}(),i=function(){if(Yi)return ji;Yi=1;var t=za();return ji=function(e,n){var r=this.__data__,i=t(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this},ji}();function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Gi=a}function qa(){if(Zi)return Xi;Zi=1;var t=Ba(),e=Ka(),n=function(){if(Hi)return Vi;Hi=1;var t=Pa()(Ct(),"Map");return Vi=t}();return Xi=function(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}}function Ua(){if(ea)return ta;ea=1;var t=Ji?Qi:(Ji=1,Qi=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return ta=function(e,n){var r=e.__data__;return t(n)?r["string"==typeof n?"string":"hash"]:r.map},ta}function ja(){if(ua)return ha;ua=1;var t=qa(),e=function(){if(ra)return na;ra=1;var t=Ua();return na=function(e){var n=t(this,e).delete(e);return this.size-=n?1:0,n}}(),n=function(){if(aa)return ia;aa=1;var t=Ua();return ia=function(e){return t(this,e).get(e)}}(),r=function(){if(oa)return sa;oa=1;var t=Ua();return sa=function(e){return t(this,e).has(e)}}(),i=function(){if(ca)return la;ca=1;var t=Ua();return la=function(e,n){var r=t(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this},la}();function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,ha=a}function Ya(){if(ga)return fa;ga=1;var t=function(){if(pa)return da;pa=1;var t=ja();function e(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var i=function(){var t=arguments,e=r?r.apply(this,t):t[0],a=i.cache;if(a.has(e))return a.get(e);var s=n.apply(this,t);return i.cache=a.set(e,s)||a,s};return i.cache=new(e.Cache||t),i}return e.Cache=t,da=e}();return fa=function(e){var n=t(e,function(t){return 500===r.size&&r.clear(),t}),r=n.cache;return n},fa}function Ga(){if(ya)return ma;ya=1;var t=Ya(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(e,function(t,e,i,a){r.push(i?a.replace(n,"$1"):e||t)}),r});return ma=r}function Wa(){if(xa)return va;return xa=1,va=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i},va}function Va(){if(ka)return Ta;ka=1;var t=function(){if(wa)return ba;wa=1;var t=Rt(),e=Wa(),n=Na(),r=Dt(),i=t?t.prototype:void 0,a=i?i.toString:void 0;return ba=function t(i){if("string"==typeof i)return i;if(n(i))return e(i,t)+"";if(r(i))return a?a.call(i):"";var s=i+"";return"0"==s&&1/i==-1/0?"-0":s},ba}();return Ta=function(e){return null==e?"":t(e)}}function Ha(){if(Aa)return Ea;Aa=1;var t=Na(),e=function(){if(ri)return ni;ri=1;var t=Na(),e=Dt(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return ni=function(i,a){if(t(i))return!1;var s=typeof i;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=i&&!e(i))||r.test(i)||!n.test(i)||null!=a&&i in Object(a)},ni}(),n=Ga(),r=Va();return Ea=function(i,a){return t(i)?i:e(i,a)?[i]:n(r(i))},Ea}function Xa(){if(Ca)return _a;Ca=1;var t=Dt();return _a=function(e){if("string"==typeof e||t(e))return e;var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}}var Za,Qa,Ja,ts,es,ns,rs,is,as,ss,os,ls,cs=function(){if(Da)return La;Da=1;var t=function(){if(Ra)return Sa;Ra=1;var t=Ha(),e=Xa();return Sa=function(n,r){for(var i=0,a=(r=t(r,n)).length;null!=n&&i<a;)n=n[e(r[i++])];return i&&i==a?n:void 0},Sa}();return La=function(e,n,r){var i=null==e?void 0:t(e,n);return void 0===i?r:i},La}(),hs=At(cs);function us(){if(ts)return Ja;ts=1;var t=function(){if(Qa)return Za;Qa=1;var t=Pa(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(n){}}();return Za=e}();return Ja=function(e,n,r){"__proto__"==n&&t?t(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r},Ja}function ds(){if(ss)return as;ss=1;var t=function(){if(ns)return es;ns=1;var t=us(),e=Fa(),n=Object.prototype.hasOwnProperty;return es=function(r,i,a){var s=r[i];n.call(r,i)&&e(s,a)&&(void 0!==a||i in r)||t(r,i,a)},es}(),e=Ha(),n=function(){if(is)return rs;is=1;var t=/^(?:0|[1-9]\d*)$/;return rs=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}}(),r=_t(),i=Xa();return as=function(a,s,o,l){if(!r(a))return a;for(var c=-1,h=(s=e(s,a)).length,u=h-1,d=a;null!=d&&++c<h;){var p=i(s[c]),f=o;if("__proto__"===p||"constructor"===p||"prototype"===p)return a;if(c!=u){var g=d[p];void 0===(f=l?l(g,p,d):void 0)&&(f=r(g)?g:n(s[c+1])?[]:{})}t(d,p,f),d=d[p]}return a},as}var ps,fs,gs,ms,ys=function(){if(ls)return os;ls=1;var t=ds();return os=function(e,n,r){return null==e?e:t(e,n,r)},os}(),vs=At(ys);var xs=function(){if(ms)return gs;ms=1;var t=Wa(),e=(fs||(fs=1,ps=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}),ps),n=Na(),r=Dt(),i=Ga(),a=Xa(),s=Va();return gs=function(o){return n(o)?t(o,a):r(o)?[o]:e(i(s(o)))}}(),bs=At(xs),ws={data:function(t){return t=xt({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(t){},beforeSet:function(t,e){},onSet:function(t){},canSet:function(t){return!0}},t),function(e,n){var r=t,i=this,a=void 0!==i.length,s=a?i:[i],l=a?i[0]:i;if(V(e)){var c,h=-1!==e.indexOf(".")&&bs(e);if(r.allowGetting&&void 0===n)return l&&(r.beforeGet(l),c=h&&void 0===l._private[r.field][e]?hs(l._private[r.field],h):l._private[r.field][e]),c;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[e]){var u=o({},e,n);r.beforeSet(i,u);for(var d=0,p=s.length;d<p;d++){var f=s[d];r.canSet(f)&&(h&&void 0===l._private[r.field][e]?vs(f._private[r.field],h,n):f._private[r.field][e]=n)}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&Z(e)){var g,m,y=e,v=Object.keys(y);r.beforeSet(i,y);for(var x=0;x<v.length;x++){if(m=y[g=v[x]],!r.immutableKeys[g])for(var b=0;b<s.length;b++){var w=s[b];r.canSet(w)&&(w._private[r.field][g]=m)}}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&H(e)){var T=e;i.on(r.bindingEvent,T)}else if(r.allowGetting&&void 0===e){var k;return l&&(r.beforeGet(l),k=l._private[r.field]),k}return i}},removeData:function(t){return t=xt({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},t),function(e){var n=t,r=this,i=void 0!==r.length?r:[r];if(V(e)){for(var a=e.split(/\s+/),s=a.length,o=0;o<s;o++){var l=a[o];if(!at(l))if(!n.immutableKeys[l])for(var c=0,h=i.length;c<h;c++)i[c]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===e){for(var u=0,d=i.length;u<d;u++)for(var p=i[u]._private[n.field],f=Object.keys(p),g=0;g<f.length;g++){var m=f[g];!n.immutableKeys[m]&&(p[m]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}}},Ts={eventAliasesOn:function(t){var e=t;e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(t,e){var n=this,r=Array.prototype.slice.call(arguments,0);return new Zr(function(t,e){var i=r.concat([function(e){n.off.apply(n,a),t(e)}]),a=i.concat([]);n.on.apply(n,i)})}}},ks={};[Ia,ws,Ts].forEach(function(t){xt(ks,t)});var Es={animate:ks.animate(),animation:ks.animation(),animated:ks.animated(),clearQueue:ks.clearQueue(),delay:ks.delay(),delayAnimation:ks.delayAnimation(),stop:ks.stop()},As={classes:function(t){var e=this;if(void 0===t){var n=[];return e[0]._private.classes.forEach(function(t){return n.push(t)}),n}X(t)||(t=(t||"").match(/\S+/g)||[]);for(var r=[],i=new xe(t),a=0;a<e.length;a++){for(var s=e[a],o=s._private,l=o.classes,c=!1,h=0;h<t.length;h++){var u=t[h];if(!l.has(u)){c=!0;break}}c||(c=l.size!==t.length),c&&(o.classes=i,r.push(s))}return r.length>0&&this.spawn(r).updateStyle().emit("class"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){X(t)||(t=t.match(/\S+/g)||[]);for(var n=this,r=void 0===e,i=[],a=0,s=n.length;a<s;a++)for(var o=n[a],l=o._private.classes,c=!1,h=0;h<t.length;h++){var u=t[h],d=l.has(u),p=!1;e||r&&!d?(l.add(u),p=!0):(!e||r&&d)&&(l.delete(u),p=!0),!c&&p&&(i.push(o),c=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var n=this;if(null==e)e=250;else if(0===e)return n;return n.addClass(t),setTimeout(function(){n.removeClass(t)},e),n}};As.className=As.classNames=As.classes;var _s={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:pt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};_s.variable="(?:[\\w-.]|(?:\\\\"+_s.metaChar+"))+",_s.className="(?:[\\w-]|(?:\\\\"+_s.metaChar+"))+",_s.value=_s.string+"|"+_s.number,_s.id=_s.variable,function(){var t,e,n;for(t=_s.comparatorOp.split("|"),n=0;n<t.length;n++)e=t[n],_s.comparatorOp+="|@"+e;for(t=_s.comparatorOp.split("|"),n=0;n<t.length;n++)(e=t[n]).indexOf("!")>=0||"="!==e&&(_s.comparatorOp+="|\\!"+e)}();var Cs=0,Ss=1,Rs=2,Ls=3,Ds=4,Is=5,Ns=6,Ms=7,Os=8,Ps=9,$s=10,Bs=11,Fs=12,zs=13,Ks=14,qs=15,Us=16,js=17,Ys=18,Gs=19,Ws=20,Vs=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,e){return function(t,e){return-1*vt(t,e)}(t.selector,e.selector)}),Hs=function(){for(var t,e={},n=0;n<Vs.length;n++)e[(t=Vs[n]).selector]=t.matches;return e}(),Xs="("+Vs.map(function(t){return t.selector}).join("|")+")",Zs=function(t){return t.replace(new RegExp("\\\\("+_s.metaChar+")","g"),function(t,e){return e})},Qs=function(t,e,n){t[t.length-1]=n},Js=[{name:"group",query:!0,regex:"("+_s.group+")",populate:function(t,e,n){var r=l(n,1)[0];e.checks.push({type:Cs,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Xs,populate:function(t,e,n){var r=l(n,1)[0];e.checks.push({type:Ms,value:r})}},{name:"id",query:!0,regex:"\\#("+_s.id+")",populate:function(t,e,n){var r=l(n,1)[0];e.checks.push({type:Os,value:Zs(r)})}},{name:"className",query:!0,regex:"\\.("+_s.className+")",populate:function(t,e,n){var r=l(n,1)[0];e.checks.push({type:Ps,value:Zs(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+_s.variable+")\\s*\\]",populate:function(t,e,n){var r=l(n,1)[0];e.checks.push({type:Ds,field:Zs(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+_s.variable+")\\s*("+_s.comparatorOp+")\\s*("+_s.value+")\\s*\\]",populate:function(t,e,n){var r=l(n,3),i=r[0],a=r[1],s=r[2];s=null!=new RegExp("^"+_s.string+"$").exec(s)?s.substring(1,s.length-1):parseFloat(s),e.checks.push({type:Ls,field:Zs(i),operator:a,value:s})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+_s.boolOp+")\\s*("+_s.variable+")\\s*\\]",populate:function(t,e,n){var r=l(n,2),i=r[0],a=r[1];e.checks.push({type:Is,field:Zs(a),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+_s.meta+")\\s*("+_s.comparatorOp+")\\s*("+_s.number+")\\s*\\]\\]",populate:function(t,e,n){var r=l(n,3),i=r[0],a=r[1],s=r[2];e.checks.push({type:Ns,field:Zs(i),operator:a,value:parseFloat(s)})}},{name:"nextQuery",separator:!0,regex:_s.separator,populate:function(t,e){var n=t.currentSubject,r=t.edgeCount,i=t.compoundCount,a=t[t.length-1];return null!=n&&(a.subject=n,t.currentSubject=null),a.edgeCount=r,a.compoundCount=i,t.edgeCount=0,t.compoundCount=0,t[t.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:_s.directedEdge,populate:function(t,e){if(null==t.currentSubject){var n={checks:[]},r=e,i={checks:[]};return n.checks.push({type:Bs,source:r,target:i}),Qs(t,0,n),t.edgeCount++,i}var a={checks:[]},s=e,o={checks:[]};return a.checks.push({type:Fs,source:s,target:o}),Qs(t,0,a),t.edgeCount++,o}},{name:"undirectedEdge",separator:!0,regex:_s.undirectedEdge,populate:function(t,e){if(null==t.currentSubject){var n={checks:[]},r=e,i={checks:[]};return n.checks.push({type:$s,nodes:[r,i]}),Qs(t,0,n),t.edgeCount++,i}var a={checks:[]},s=e,o={checks:[]};return a.checks.push({type:Ks,node:s,neighbor:o}),Qs(t,0,a),o}},{name:"child",separator:!0,regex:_s.child,populate:function(t,e){if(null==t.currentSubject){var n={checks:[]},r={checks:[]},i=t[t.length-1];return n.checks.push({type:qs,parent:i,child:r}),Qs(t,0,n),t.compoundCount++,r}if(t.currentSubject===e){var a={checks:[]},s=t[t.length-1],o={checks:[]},l={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:Gs,left:s,right:o,subject:l}),l.checks=e.checks,e.checks=[{type:Ws}],h.checks.push({type:Ws}),o.checks.push({type:js,parent:h,child:c}),Qs(t,0,a),t.currentSubject=l,t.compoundCount++,c}var u={checks:[]},d={checks:[]},p=[{type:js,parent:u,child:d}];return u.checks=e.checks,e.checks=p,t.compoundCount++,d}},{name:"descendant",separator:!0,regex:_s.descendant,populate:function(t,e){if(null==t.currentSubject){var n={checks:[]},r={checks:[]},i=t[t.length-1];return n.checks.push({type:Us,ancestor:i,descendant:r}),Qs(t,0,n),t.compoundCount++,r}if(t.currentSubject===e){var a={checks:[]},s=t[t.length-1],o={checks:[]},l={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:Gs,left:s,right:o,subject:l}),l.checks=e.checks,e.checks=[{type:Ws}],h.checks.push({type:Ws}),o.checks.push({type:Ys,ancestor:h,descendant:c}),Qs(t,0,a),t.currentSubject=l,t.compoundCount++,c}var u={checks:[]},d={checks:[]},p=[{type:Ys,ancestor:u,descendant:d}];return u.checks=e.checks,e.checks=p,t.compoundCount++,d}},{name:"subject",modifier:!0,regex:_s.subject,populate:function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return oe("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=e;var n=t[t.length-1].checks[0],r=null==n?null:n.type;r===Bs?n.type=zs:r===$s&&(n.type=Ks,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Js.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var to=function(t){for(var e,n,r,i=0;i<Js.length;i++){var a=Js[i],s=a.name,o=t.match(a.regexObj);if(null!=o){n=o,e=a,r=s;var l=o[0];t=t.substring(l.length);break}}return{expr:e,match:n,name:r,remaining:t}},eo={parse:function(t){var e=this,n=e.inputText=t,r=e[0]={checks:[]};for(e.length=1,n=function(t){var e=t.match(/^\s+/);if(e){var n=e[0];t=t.substring(n.length)}return t}(n);;){var i=to(n);if(null==i.expr)return oe("The selector `"+t+"`is invalid"),!1;var a=i.match.slice(1),s=i.expr.populate(e,r,a);if(!1===s)return!1;if(null!=s&&(r=s),(n=i.remaining).match(/^\s*$/))break}var o=e[e.length-1];null!=e.currentSubject&&(o.subject=e.currentSubject),o.edgeCount=e.edgeCount,o.compoundCount=e.compoundCount;for(var l=0;l<e.length;l++){var c=e[l];if(c.compoundCount>0&&c.edgeCount>0)return oe("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return oe("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===c.edgeCount&&oe("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return null==t?"":t},e=function(e){return V(e)?'"'+e+'"':t(e)},n=function(t){return" "+t+" "},r=function(r,a){var s=r.type,o=r.value;switch(s){case Cs:var l=t(o);return l.substring(0,l.length-1);case Ls:var c=r.field,h=r.operator;return"["+c+n(t(h))+e(o)+"]";case Is:var u=r.operator,d=r.field;return"["+t(u)+d+"]";case Ds:return"["+r.field+"]";case Ns:var p=r.operator;return"[["+r.field+n(t(p))+e(o)+"]]";case Ms:return o;case Os:return"#"+o;case Ps:return"."+o;case js:case qs:return i(r.parent,a)+n(">")+i(r.child,a);case Ys:case Us:return i(r.ancestor,a)+" "+i(r.descendant,a);case Gs:var f=i(r.left,a),g=i(r.subject,a),m=i(r.right,a);return f+(f.length>0?" ":"")+g+m;case Ws:return""}},i=function(t,e){return t.checks.reduce(function(n,i,a){return n+(e===t&&0===a?"$":"")+r(i,e)},"")},a="",s=0;s<this.length;s++){var o=this[s];a+=i(o,o.subject),this.length>1&&s<this.length-1&&(a+=", ")}return this.toStringCache=a,a}},no=function(t,e,n){var r,i,a,s=V(t),o=Q(t),l=V(n),c=!1,h=!1,u=!1;switch(e.indexOf("!")>=0&&(e=e.replace("!",""),h=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),c=!0),(s||l||c)&&(i=s||o?""+t:"",a=""+n),c&&(t=i=i.toLowerCase(),n=a=a.toLowerCase()),e){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=t===n;break;case">":u=!0,r=t>n;break;case">=":u=!0,r=t>=n;break;case"<":u=!0,r=t<n;break;case"<=":u=!0,r=t<=n;break;default:r=!1}return!h||null==t&&u||(r=!r),r},ro=function(t,e){return t.data(e)},io=[],ao=function(t,e){return t.checks.every(function(t){return io[t.type](t,e)})};io[Cs]=function(t,e){var n=t.value;return"*"===n||n===e.group()},io[Ms]=function(t,e){return function(t,e){return Hs[t](e)}(t.value,e)},io[Os]=function(t,e){var n=t.value;return e.id()===n},io[Ps]=function(t,e){var n=t.value;return e.hasClass(n)},io[Ns]=function(t,e){var n=t.field,r=t.operator,i=t.value;return no(function(t,e){return t[e]()}(e,n),r,i)},io[Ls]=function(t,e){var n=t.field,r=t.operator,i=t.value;return no(ro(e,n),r,i)},io[Is]=function(t,e){var n=t.field,r=t.operator;return function(t,e){switch(e){case"?":return!!t;case"!":return!t;case"^":return void 0===t}}(ro(e,n),r)},io[Ds]=function(t,e){var n=t.field;return t.operator,void 0!==ro(e,n)},io[$s]=function(t,e){var n=t.nodes[0],r=t.nodes[1],i=e.source(),a=e.target();return ao(n,i)&&ao(r,a)||ao(r,i)&&ao(n,a)},io[Ks]=function(t,e){return ao(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&ao(t.neighbor,e)})},io[Bs]=function(t,e){return ao(t.source,e.source())&&ao(t.target,e.target())},io[Fs]=function(t,e){return ao(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&ao(t.target,e)})},io[zs]=function(t,e){return ao(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&ao(t.source,e)})},io[qs]=function(t,e){return ao(t.child,e)&&ao(t.parent,e.parent())},io[js]=function(t,e){return ao(t.parent,e)&&e.children().some(function(e){return ao(t.child,e)})},io[Us]=function(t,e){return ao(t.descendant,e)&&e.ancestors().some(function(e){return ao(t.ancestor,e)})},io[Ys]=function(t,e){return ao(t.ancestor,e)&&e.descendants().some(function(e){return ao(t.descendant,e)})},io[Gs]=function(t,e){return ao(t.subject,e)&&ao(t.left,e)&&ao(t.right,e)},io[Ws]=function(){return!0},io[Ss]=function(t,e){return t.value.has(e)},io[Rs]=function(t,e){return(0,t.value)(e)};var so={matches:function(t){for(var e=0;e<this.length;e++){var n=this[e];if(ao(n,t))return!0}return!1},filter:function(t){var e=this;if(1===e.length&&1===e[0].checks.length&&e[0].checks[0].type===Os)return t.getElementById(e[0].checks[0].value).collection();var n=function(t){for(var n=0;n<e.length;n++){var r=e[n];if(ao(r,t))return!0}return!1};return null==e.text()&&(n=function(){return!0}),t.filter(n)}},oo=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==t||V(t)&&t.match(/^\s*$/)||(tt(t)?this.addQuery({checks:[{type:Ss,value:t.collection()}]}):H(t)?this.addQuery({checks:[{type:Rs,value:t}]}):V(t)?this.parse(t)||(this.invalid=!0):ae("A selector must be created from a string; found "))},lo=oo.prototype;[eo,so].forEach(function(t){return xt(lo,t)}),lo.text=function(){return this.inputText},lo.size=function(){return this.length},lo.eq=function(t){return this[t]},lo.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},lo.addQuery=function(t){this[this.length++]=t},lo.selector=lo.toString;var co={allAre:function(t){var e=new oo(t);return this.every(function(t){return e.matches(t)})},is:function(t){var e=new oo(t);return this.some(function(t){return e.matches(t)})},some:function(t,e){for(var n=0;n<this.length;n++){if(e?t.apply(e,[this[n],n,this]):t(this[n],n,this))return!0}return!1},every:function(t,e){for(var n=0;n<this.length;n++){if(!(e?t.apply(e,[this[n],n,this]):t(this[n],n,this)))return!1}return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every(function(e){return t.hasElementWithId(e.id())}))},anySame:function(t){return t=this.cy().collection(t),this.some(function(e){return t.hasElementWithId(e.id())})},allAreNeighbors:function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every(function(t){return e.hasElementWithId(t.id())})},contains:function(t){t=this.cy().collection(t);var e=this;return t.every(function(t){return e.hasElementWithId(t.id())})}};co.allAreNeighbours=co.allAreNeighbors,co.has=co.contains,co.equal=co.equals=co.same;var ho,uo,po=function(t,e){return function(n,r,i,a){var s,o=n,l=this;if(null==o?s="":tt(o)&&1===o.length&&(s=o.id()),1===l.length&&s){var c=l[0]._private,h=c.traversalCache=c.traversalCache||{},u=h[e]=h[e]||[],d=Wt(s),p=u[d];return p||(u[d]=t.call(l,n,r,i,a))}return t.call(l,n,r,i,a)}},fo={parent:function(t){var e=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var i=this[r]._private.parent;i&&e.push(i)}return this.spawn(e,!0).filter(t)},parents:function(t){for(var e=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];e.push(i)}n=n.parent()}return this.spawn(e,!0).filter(t)},commonAncestors:function(t){for(var e,n=0;n<this.length;n++){var r=this[n].parents();e=(e=e||r).intersect(r)}return e.filter(t)},orphans:function(t){return this.stdFilter(function(t){return t.isOrphan()}).filter(t)},nonorphans:function(t){return this.stdFilter(function(t){return t.isChild()}).filter(t)},children:po(function(t){for(var e=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,i=0;i<r.length;i++)e.push(r[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(t){return this.parent().children().not(this).filter(t)},isParent:function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},isChildless:function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},isChild:function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},isOrphan:function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},descendants:function(t){var e=[];return function t(n){for(var r=0;r<n.length;r++){var i=n[r];e.push(i),i.children().nonempty()&&t(i.children())}}(this.children()),this.spawn(e,!0).filter(t)}};function go(t,e,n,r){for(var i=[],a=new xe,s=t.cy().hasCompoundNodes(),o=0;o<t.length;o++){var l=t[o];n?i.push(l):s&&r(i,a,l)}for(;i.length>0;){var c=i.shift();e(c),a.add(c.id()),s&&r(i,a,c)}return t}function mo(t,e,n){if(n.isParent())for(var r=n._private.children,i=0;i<r.length;i++){var a=r[i];e.has(a.id())||t.push(a)}}function yo(t,e,n){if(n.isChild()){var r=n._private.parent;e.has(r.id())||t.push(r)}}function vo(t,e,n){yo(t,e,n),mo(t,e,n)}fo.forEachDown=function(t){return go(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],mo)},fo.forEachUp=function(t){return go(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],yo)},fo.forEachUpAndDown=function(t){return go(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],vo)},fo.ancestors=fo.parents,(ho=uo={data:ks.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ks.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ks.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ks.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ks.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ks.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=ho.data,ho.removeAttr=ho.removeData;var xo,bo,wo=uo,To={};function ko(t){return function(e){var n=this;if(void 0===e&&(e=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,s=0;s<a.length;s++){var o=a[s];!e&&o.isLoop()||(r+=t(i,o))}return r}}}function Eo(t,e){return function(n){for(var r,i=this.nodes(),a=0;a<i.length;a++){var s=i[a][t](n);void 0===s||void 0!==r&&!e(s,r)||(r=s)}return r}}xt(To,{degree:ko(function(t,e){return e.source().same(e.target())?2:1}),indegree:ko(function(t,e){return e.target().same(t)?1:0}),outdegree:ko(function(t,e){return e.source().same(t)?1:0})}),xt(To,{minDegree:Eo("degree",function(t,e){return t<e}),maxDegree:Eo("degree",function(t,e){return t>e}),minIndegree:Eo("indegree",function(t,e){return t<e}),maxIndegree:Eo("indegree",function(t,e){return t>e}),minOutdegree:Eo("outdegree",function(t,e){return t<e}),maxOutdegree:Eo("outdegree",function(t,e){return t>e})}),xt(To,{totalDegree:function(t){for(var e=0,n=this.nodes(),r=0;r<n.length;r++)e+=n[r].degree(t);return e}});var Ao=function(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];if(!i.locked()){var a=i._private.position,s={x:null!=e.x?e.x-a.x:0,y:null!=e.y?e.y-a.y:0};!i.isParent()||0===s.x&&0===s.y||i.children().shift(s,n),i.dirtyBoundingBoxCache()}}},_o={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(t){t.updateCompoundBounds()},beforeSet:function(t,e){Ao(t,e,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};xo=bo={position:ks.data(_o),silentPosition:ks.data(xt({},_o,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,e){Ao(t,e,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,e){if(Z(t))e?this.silentPosition(t):this.position(t);else if(H(t)){var n=t,r=this.cy();r.startBatch();for(var i=0;i<this.length;i++){var a,s=this[i];(a=n(s,i))&&(e?s.silentPosition(a):s.position(a))}r.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,e,n){var r;if(Z(t)?(r={x:Q(t.x)?t.x:0,y:Q(t.y)?t.y:0},n=e):V(t)&&Q(e)&&((r={x:0,y:0})[t]=e),null!=r){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s=this[a];if(!(i.hasCompoundNodes()&&s.isChild()&&s.ancestors().anySame(this))){var o=s.position(),l={x:o.x+r.x,y:o.y+r.y};n?s.silentPosition(l):s.position(l)}}i.endBatch()}return this},silentShift:function(t,e){return Z(t)?this.shift(t,!0):V(t)&&Q(e)&&this.shift(t,e,!0),this},renderedPosition:function(t,e){var n=this[0],r=this.cy(),i=r.zoom(),a=r.pan(),s=Z(t)?t:void 0,o=void 0!==s||void 0!==e&&V(t);if(n&&n.isNode()){if(!o){var l=n.position();return s=je(l,i,a),void 0===t?s:s[t]}for(var c=0;c<this.length;c++){var h=this[c];void 0!==e?h.position(t,(e-a[t])/i):void 0!==s&&h.position(Ye(s,i,a))}}else if(!o)return;return this},relativePosition:function(t,e){var n=this[0],r=this.cy(),i=Z(t)?t:void 0,a=void 0!==i||void 0!==e&&V(t),s=r.hasCompoundNodes();if(n&&n.isNode()){if(!a){var o=n.position(),l=s?n.parent():null,c=l&&l.length>0,h=c;c&&(l=l[0]);var u=h?l.position():{x:0,y:0};return i={x:o.x-u.x,y:o.y-u.y},void 0===t?i:i[t]}for(var d=0;d<this.length;d++){var p=this[d],f=s?p.parent():null,g=f&&f.length>0,m=g;g&&(f=f[0]);var y=m?f.position():{x:0,y:0};void 0!==e?p.position(t,e+y[t]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},xo.modelPosition=xo.point=xo.position,xo.modelPositions=xo.points=xo.positions,xo.renderedPoint=xo.renderedPosition,xo.relativePoint=xo.relativePosition;var Co,So,Ro=bo;Co=So={},So.renderedBoundingBox=function(t){var e=this.boundingBox(t),n=this.cy(),r=n.zoom(),i=n.pan(),a=e.x1*r+i.x,s=e.x2*r+i.x,o=e.y1*r+i.y,l=e.y2*r+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}},So.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(e){if(e.isParent()){var n=e._private;n.compoundBoundsClean=!1,n.bbCache=null,t||e.emitAndNotify("bounds")}}),this):this},So.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function n(t){if(t.isParent()){var e=t._private,n=t.children(),r="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),s=e.position;0!==a.w&&0!==a.h||((a={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=s.x-a.w/2,a.x2=s.x+a.w/2,a.y1=s.y-a.h/2,a.y2=s.y+a.h/2);var o=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(o=100*o/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var c=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(c=100*c/i.height.val);var h=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(h=100*h/i.height.val);var u=y(i.width.val-a.w,o,l),d=u.biasDiff,p=u.biasComplementDiff,f=y(i.height.val-a.h,c,h),g=f.biasDiff,m=f.biasComplementDiff;e.autoPadding=function(t,e,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return t>0?n.pfValue*t:0;case"height":return e>0?n.pfValue*e:0;case"average":return t>0&&e>0?n.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?n.pfValue*e:n.pfValue*t:0;case"max":return t>0&&e>0?t>e?n.pfValue*t:n.pfValue*e:0;default:return 0}}(a.w,a.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(a.w,i.width.val),s.x=(-d+a.x1+a.x2+p)/2,e.autoHeight=Math.max(a.h,i.height.val),s.y=(-g+a.y1+a.y2+m)/2}function y(t,e,n){var r=0,i=0,a=e+n;return t>0&&a>0&&(r=e/a*t,i=n/a*t),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;r<this.length;r++){var i=this[r],a=i._private;a.compoundBoundsClean&&!t||(n(i),e.batching()||(a.compoundBoundsClean=!0))}return this};var Lo=function(t){return t===1/0||t===-1/0?0:t},Do=function(t,e,n,r,i){r-e!==0&&i-n!==0&&null!=e&&null!=n&&null!=r&&null!=i&&(t.x1=e<t.x1?e:t.x1,t.x2=r>t.x2?r:t.x2,t.y1=n<t.y1?n:t.y1,t.y2=i>t.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Io=function(t,e){return null==e?t:Do(t,e.x1,e.y1,e.x2,e.y2)},No=function(t,e,n){return ge(t,e,n)},Mo=function(t,e,n){if(!e.cy().headless()){var r,i,a=e._private,s=a.rstyle,o=s.arrowWidth/2;if("none"!==e.pstyle(n+"-arrow-shape").value){"source"===n?(r=s.srcX,i=s.srcY):"target"===n?(r=s.tgtX,i=s.tgtY):(r=s.midX,i=s.midY);var l=a.arrowBounds=a.arrowBounds||{},c=l[n]=l[n]||{};c.x1=r-o,c.y1=i-o,c.x2=r+o,c.y2=i+o,c.w=c.x2-c.x1,c.h=c.y2-c.y1,sn(c,1),Do(t,c.x1,c.y1,c.x2,c.y2)}}},Oo=function(t,e,n){if(!e.cy().headless()){var r;r=n?n+"-":"";var i=e._private,a=i.rstyle;if(e.pstyle(r+"label").strValue){var s,o,l,c,h=e.pstyle("text-halign"),u=e.pstyle("text-valign"),d=No(a,"labelWidth",n),p=No(a,"labelHeight",n),f=No(a,"labelX",n),g=No(a,"labelY",n),m=e.pstyle(r+"text-margin-x").pfValue,y=e.pstyle(r+"text-margin-y").pfValue,v=e.isEdge(),x=e.pstyle(r+"text-rotation"),b=e.pstyle("text-outline-width").pfValue,w=e.pstyle("text-border-width").pfValue/2,T=e.pstyle("text-background-padding").pfValue,k=p,E=d,A=E/2,_=k/2;if(v)s=f-A,o=f+A,l=g-_,c=g+_;else{switch(h.value){case"left":s=f-E,o=f;break;case"center":s=f-A,o=f+A;break;case"right":s=f,o=f+E}switch(u.value){case"top":l=g-k,c=g;break;case"center":l=g-_,c=g+_;break;case"bottom":l=g,c=g+k}}var C=m-Math.max(b,w)-T-2,S=m+Math.max(b,w)+T+2,R=y-Math.max(b,w)-T-2,L=y+Math.max(b,w)+T+2;s+=C,o+=S,l+=R,c+=L;var D=n||"main",I=i.labelBounds,N=I[D]=I[D]||{};N.x1=s,N.y1=l,N.x2=o,N.y2=c,N.w=o-s,N.h=c-l,N.leftPad=C,N.rightPad=S,N.topPad=R,N.botPad=L;var M=v&&"autorotate"===x.strValue,O=null!=x.pfValue&&0!==x.pfValue;if(M||O){var P=M?No(i.rstyle,"labelAngle",n):x.pfValue,$=Math.cos(P),B=Math.sin(P),F=(s+o)/2,z=(l+c)/2;if(!v){switch(h.value){case"left":F=o;break;case"right":F=s}switch(u.value){case"top":z=c;break;case"bottom":z=l}}var K=function(t,e){return{x:(t-=F)*$-(e-=z)*B+F,y:t*B+e*$+z}},q=K(s,l),U=K(s,c),j=K(o,l),Y=K(o,c);s=Math.min(q.x,U.x,j.x,Y.x),o=Math.max(q.x,U.x,j.x,Y.x),l=Math.min(q.y,U.y,j.y,Y.y),c=Math.max(q.y,U.y,j.y,Y.y)}var G=D+"Rot",W=I[G]=I[G]||{};W.x1=s,W.y1=l,W.x2=o,W.y2=c,W.w=o-s,W.h=c-l,Do(t,s,l,o,c),Do(i.labelBounds.all,s,l,o,c)}return t}},Po=function(t,e){if(!e.cy().headless()){var n=e.pstyle("outline-opacity").value,r=e.pstyle("outline-width").value+e.pstyle("outline-offset").value;$o(t,e,n,r,"outside",r/2)}},$o=function(t,e,n,r,i,a){if(!(0===n||r<=0||"inside"===i)){var s=e.cy(),o=e.pstyle("shape").value,l=s.renderer().nodeShapes[o],c=e.position(),h=c.x,u=c.y,d=e.width(),p=e.height();if(l.hasMiterBounds){"center"===i&&(r/=2);var f=l.miterBounds(h,u,d,p,r);Io(t,f)}else null!=a&&a>0&&on(t,[a,a,a,a])}},Bo=function(t,e){var n,r,i,a,s,o,l,c=t._private.cy,h=c.styleEnabled(),u=c.headless(),d=nn(),p=t._private,f=t.isNode(),g=t.isEdge(),m=p.rstyle,y=f&&h?t.pstyle("bounds-expansion").pfValue:[0],v=function(t){return"none"!==t.pstyle("display").value},x=!h||v(t)&&(!g||v(t.source())&&v(t.target()));if(x){var b=0;h&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(b=t.pstyle("overlay-padding").value);var w=0;h&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(w=t.pstyle("underlay-padding").value);var T=Math.max(b,w),k=0;if(h&&(k=t.pstyle("width").pfValue/2),f&&e.includeNodes){var E=t.position();s=E.x,o=E.y;var A=t.outerWidth()/2,_=t.outerHeight()/2;Do(d,n=s-A,i=o-_,r=s+A,a=o+_),h&&Po(d,t),h&&e.includeOutlines&&!u&&Po(d,t),h&&function(t,e){if(!e.cy().headless()){var n=e.pstyle("border-opacity").value,r=e.pstyle("border-width").pfValue,i=e.pstyle("border-position").value;$o(t,e,n,r,i)}}(d,t)}else if(g&&e.includeEdges)if(h&&!u){var C=t.pstyle("curve-style").strValue;if(n=Math.min(m.srcX,m.midX,m.tgtX),r=Math.max(m.srcX,m.midX,m.tgtX),i=Math.min(m.srcY,m.midY,m.tgtY),a=Math.max(m.srcY,m.midY,m.tgtY),Do(d,n-=k,i-=k,r+=k,a+=k),"haystack"===C){var S=m.haystackPts;if(S&&2===S.length){if(n=S[0].x,i=S[0].y,n>(r=S[1].x)){var R=n;n=r,r=R}if(i>(a=S[1].y)){var L=i;i=a,a=L}Do(d,n-k,i-k,r+k,a+k)}}else if("bezier"===C||"unbundled-bezier"===C||dt(C,"segments")||dt(C,"taxi")){var D;switch(C){case"bezier":case"unbundled-bezier":D=m.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":D=m.linePts}if(null!=D)for(var I=0;I<D.length;I++){var N=D[I];n=N.x-k,r=N.x+k,i=N.y-k,a=N.y+k,Do(d,n,i,r,a)}}}else{var M=t.source().position(),O=t.target().position();if((n=M.x)>(r=O.x)){var P=n;n=r,r=P}if((i=M.y)>(a=O.y)){var $=i;i=a,a=$}Do(d,n-=k,i-=k,r+=k,a+=k)}if(h&&e.includeEdges&&g&&(Mo(d,t,"mid-source"),Mo(d,t,"mid-target"),Mo(d,t,"source"),Mo(d,t,"target")),h)if("yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,F=t.pstyle("ghost-offset-y").pfValue;Do(d,d.x1+B,d.y1+F,d.x2+B,d.y2+F)}var z=p.bodyBounds=p.bodyBounds||{};ln(z,d),on(z,y),sn(z,1),h&&(n=d.x1,r=d.x2,i=d.y1,a=d.y2,Do(d,n-T,i-T,r+T,a+T));var K=p.overlayBounds=p.overlayBounds||{};ln(K,d),on(K,y),sn(K,1);var q=p.labelBounds=p.labelBounds||{};null!=q.all?((l=q.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):q.all=nn(),h&&e.includeLabels&&(e.includeMainLabels&&Oo(d,t,null),g&&(e.includeSourceLabels&&Oo(d,t,"source"),e.includeTargetLabels&&Oo(d,t,"target")))}return d.x1=Lo(d.x1),d.y1=Lo(d.y1),d.x2=Lo(d.x2),d.y2=Lo(d.y2),d.w=Lo(d.x2-d.x1),d.h=Lo(d.y2-d.y1),d.w>0&&d.h>0&&x&&(on(d,y),sn(d,1)),d},Fo=function(t){var e=0,n=function(t){return(t?1:0)<<e++},r=0;return r+=n(t.incudeNodes),r+=n(t.includeEdges),r+=n(t.includeLabels),r+=n(t.includeMainLabels),r+=n(t.includeSourceLabels),r+=n(t.includeTargetLabels),r+=n(t.includeOverlays),r+=n(t.includeOutlines)},zo=function(t){var e=function(t){return Math.round(t)};if(t.isEdge()){var n=t.source().position(),r=t.target().position();return Gt([e(n.x),e(n.y),e(r.x),e(r.y)])}var i=t.position();return Gt([e(i.x),e(i.y)])},Ko=function(t,e){var n,r=t._private,i=t.isEdge(),a=(null==e?Uo:Fo(e))===Uo;if(null==r.bbCache?(n=Bo(t,qo),r.bbCache=n,r.bbCachePosKey=zo(t)):n=r.bbCache,!a){var s=t.isNode();n=nn(),(e.includeNodes&&s||e.includeEdges&&!s)&&(e.includeOverlays?Io(n,r.overlayBounds):Io(n,r.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Io(n,r.labelBounds.all):(e.includeMainLabels&&Io(n,r.labelBounds.mainRot),e.includeSourceLabels&&Io(n,r.labelBounds.sourceRot),e.includeTargetLabels&&Io(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},qo={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Uo=Fo(qo),jo=de(qo);So.boundingBox=function(t){var e,n=void 0===t||void 0===t.useCache||!0===t.useCache,r=ot(function(t){var e=t._private;return null==e.bbCache||e.styleDirty||e.bbCachePosKey!==zo(t)},function(t){return t.id()});if(n&&1===this.length&&!r(this[0]))t=void 0===t?qo:jo(t),e=Ko(this[0],t);else{e=nn();var i=jo(t=t||qo),a=this,s=a.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),s&&this.recalculateRenderedStyle(n),this.updateCompoundBounds(!n);for(var o=0;o<a.length;o++){var l=a[o];r(l)&&l.dirtyBoundingBoxCache(),Io(e,Ko(l,i))}}return e.x1=Lo(e.x1),e.y1=Lo(e.y1),e.x2=Lo(e.x2),e.y2=Lo(e.y2),e.w=Lo(e.x2-e.x1),e.h=Lo(e.y2-e.y1),e},So.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},So.boundingBoxAt=function(t){var e=this.nodes(),n=this.cy(),r=n.hasCompoundNodes(),i=n.collection();if(r&&(i=e.filter(function(t){return t.isParent()}),e=e.not(i)),Z(t)){var a=t;t=function(){return a}}n.startBatch(),e.forEach(function(e,n){return e._private.bbAtOldPos=t(e,n)}).silentPositions(t),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var s=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}}(this.boundingBox({useCache:!1}));return e.silentPositions(function(t){return t._private.bbAtOldPos}),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),n.endBatch(),s},Co.boundingbox=Co.bb=Co.boundingBox,Co.renderedBoundingbox=Co.renderedBoundingBox;var Yo,Go,Wo=So;Yo=Go={};var Vo=function(t){t.uppercaseName=ut(t.name),t.autoName="auto"+t.uppercaseName,t.labelName="label"+t.uppercaseName,t.outerName="outer"+t.uppercaseName,t.uppercaseOuterName=ut(t.outerName),Yo[t.name]=function(){var e=this[0],n=e._private,r=n.cy._private.styleEnabled;if(e){if(r){if(e.isParent())return e.updateCompoundBounds(),n[t.autoName]||0;var i=e.pstyle(t.name);return"label"===i.strValue?(e.recalculateRenderedStyle(),n.rstyle[t.labelName]||0):i.pfValue}return 1}},Yo["outer"+t.uppercaseName]=function(){var e=this[0],n=e._private.cy._private.styleEnabled;if(e){if(n){var r=e[t.name](),i=e.pstyle("border-position").value;return r+("center"===i?e.pstyle("border-width").pfValue:"outside"===i?2*e.pstyle("border-width").pfValue:0)+2*e.padding()}return 1}},Yo["rendered"+t.uppercaseName]=function(){var e=this[0];if(e)return e[t.name]()*this.cy().zoom()},Yo["rendered"+t.uppercaseOuterName]=function(){var e=this[0];if(e)return e[t.outerName]()*this.cy().zoom()}};Vo({name:"width"}),Vo({name:"height"}),Go.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),void 0!==e.autoPadding?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},Go.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},Go.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var Ho=Go,Xo={controlPoints:{get:function(t){return t.renderer().getControlPoints(t)},mult:!0},segmentPoints:{get:function(t){return t.renderer().getSegmentPoints(t)},mult:!0},sourceEndpoint:{get:function(t){return t.renderer().getSourceEndpoint(t)}},targetEndpoint:{get:function(t){return t.renderer().getTargetEndpoint(t)}},midpoint:{get:function(t){return t.renderer().getEdgeMidpoint(t)}}},Zo=Object.keys(Xo).reduce(function(t,e){var n=Xo[e],r=function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)}(e);return t[e]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace())return e(t)}(this,n.get)},n.mult?t[r]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace()){var n=t.cy(),r=n.pan(),i=n.zoom();return e(t).map(function(t){return je(t,i,r)})}}(this,n.get)}:t[r]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace()){var n=t.cy();return je(e(t),n.zoom(),n.pan())}}(this,n.get)},t},{}),Qo=xt({},Ro,Wo,Ho,Zo),Jo=function(t,e){this.recycle(t,e)};function tl(){return!1}function el(){return!0}Jo.prototype={instanceString:function(){return"event"},recycle:function(t,e){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=tl,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?el:tl):null!=t&&t.type?e=t:this.type=t,null!=e&&(this.originalEvent=e.originalEvent,this.type=null!=e.type?e.type:this.type,this.cy=e.cy,this.target=e.target,this.position=e.position,this.renderedPosition=e.renderedPosition,this.namespace=e.namespace,this.layout=e.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*r+i.x,y:n.y*r+i.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=el;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=el;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=el,this.stopPropagation()},isDefaultPrevented:tl,isPropagationStopped:tl,isImmediatePropagationStopped:tl};var nl=/^([^.]+)(\.(?:[^.]+))?$/,rl={qualifierCompare:function(t,e){return t===e},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(t){return t},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},il=Object.keys(rl),al={};function sl(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:al,e=arguments.length>1?arguments[1]:void 0,n=0;n<il.length;n++){var r=il[n];this[r]=t[r]||rl[r]}this.context=e||this.context,this.listeners=[],this.emitting=0}var ol=sl.prototype,ll=function(t,e,n,r,i,a,s){H(r)&&(i=r,r=null),s&&(a=null==a?s:xt({},a,s));for(var o=X(n)?n:n.split(/\s+/),l=0;l<o.length;l++){var c=o[l];if(!at(c)){var h=c.match(nl);if(h)if(!1===e(t,c,h[1],h[2]?h[2]:null,r,i,a))break}}},cl=function(t,e){return t.addEventFields(t.context,e),new Jo(e.type,e)},hl=function(t,e,n){if("event"!==W(n))if(Z(n))e(t,cl(t,n));else for(var r=X(n)?n:n.split(/\s+/),i=0;i<r.length;i++){var a=r[i];if(!at(a)){var s=a.match(nl);if(s){var o=s[1],l=s[2]?s[2]:null;e(t,cl(t,{type:o,namespace:l,target:t.context}))}}}else e(t,n)};ol.on=ol.addListener=function(t,e,n,r,i){return ll(this,function(t,e,n,r,i,a,s){H(a)&&t.listeners.push({event:e,callback:a,type:n,namespace:r,qualifier:i,conf:s})},t,e,n,r,i),this},ol.one=function(t,e,n,r){return this.on(t,e,n,r,{one:!0})},ol.removeListener=ol.off=function(t,e,n,r){var i=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var a=this.listeners,s=function(s){var o=a[s];ll(i,function(e,n,r,i,l,c){if((o.type===r||"*"===t)&&(!i&&".*"!==o.namespace||o.namespace===i)&&(!l||e.qualifierCompare(o.qualifier,l))&&(!c||o.callback===c))return a.splice(s,1),!1},t,e,n,r)},o=a.length-1;o>=0;o--)s(o);return this},ol.removeAllListeners=function(){return this.removeListener("*")},ol.emit=ol.trigger=function(t,e,n){var r=this.listeners,i=r.length;return this.emitting++,X(e)||(e=[e]),hl(this,function(t,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var s=function(){var n=r[o];if(n.type===a.type&&(!n.namespace||n.namespace===a.namespace||".*"===n.namespace)&&t.eventMatches(t.context,n,a)){var i=[a];null!=e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}}(i,e),t.beforeEmit(t.context,n,a),n.conf&&n.conf.one&&(t.listeners=t.listeners.filter(function(t){return t!==n}));var s=t.callbackContext(t.context,n,a),l=n.callback.apply(s,i);t.afterEmit(t.context,n,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},o=0;o<i;o++)s();t.bubble(t.context)&&!a.isPropagationStopped()&&t.parent(t.context).emit(a,e)},t),this.emitting--,this};var ul={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&et(n.target)&&r.matches(n.target)},addEventFields:function(t,e){e.cy=t.cy(),e.target=t},callbackContext:function(t,e,n){return null!=e.qualifier?n.target:t},beforeEmit:function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},dl=function(t){return V(t)?new oo(t):t},pl={createEmitter:function(){for(var t=0;t<this.length;t++){var e=this[t],n=e._private;n.emitter||(n.emitter=new sl(ul,e))}return this},emitter:function(){return this._private.emitter},on:function(t,e,n){for(var r=dl(e),i=0;i<this.length;i++){this[i].emitter().on(t,r,n)}return this},removeListener:function(t,e,n){for(var r=dl(e),i=0;i<this.length;i++){this[i].emitter().removeListener(t,r,n)}return this},removeAllListeners:function(){for(var t=0;t<this.length;t++){this[t].emitter().removeAllListeners()}return this},one:function(t,e,n){for(var r=dl(e),i=0;i<this.length;i++){this[i].emitter().one(t,r,n)}return this},once:function(t,e,n){for(var r=dl(e),i=0;i<this.length;i++){this[i].emitter().on(t,r,n,{once:!0,onceCollection:this})}},emit:function(t,e){for(var n=0;n<this.length;n++){this[n].emitter().emit(t,e)}return this},emitAndNotify:function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this}};ks.eventAliasesOn(pl);var fl={nodes:function(t){return this.filter(function(t){return t.isNode()}).filter(t)},edges:function(t){return this.filter(function(t){return t.isEdge()}).filter(t)},byGroup:function(){for(var t=this.spawn(),e=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?t.push(r):e.push(r)}return{nodes:t,edges:e}},filter:function(t,e){if(void 0===t)return this;if(V(t)||tt(t))return new oo(t).filter(this);if(H(t)){for(var n=this.spawn(),r=this,i=0;i<r.length;i++){var a=r[i];(e?t.apply(e,[a,i,r]):t(a,i,r))&&n.push(a)}return n}return this.spawn()},not:function(t){if(t){V(t)&&(t=this.filter(t));for(var e=this.spawn(),n=0;n<this.length;n++){var r=this[n];t.has(r)||e.push(r)}return e}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(t){if(V(t)){var e=t;return this.filter(e)}for(var n=this.spawn(),r=t,i=this.length<t.length,a=i?this:r,s=i?r:this,o=0;o<a.length;o++){var l=a[o];s.has(l)&&n.push(l)}return n},xor:function(t){var e=this._private.cy;V(t)&&(t=e.$(t));var n=this.spawn(),r=t,i=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],a=i._private.data.id;e.hasElementWithId(a)||n.push(i)}};return i(this,r),i(r,this),n},diff:function(t){var e=this._private.cy;V(t)&&(t=e.$(t));var n=this.spawn(),r=this.spawn(),i=this.spawn(),a=t,s=function(t,e,n){for(var r=0;r<t.length;r++){var a=t[r],s=a._private.data.id;e.hasElementWithId(s)?i.merge(a):n.push(a)}};return s(this,a,n),s(a,this,r),{left:n,right:r,both:i}},add:function(t){var e=this._private.cy;if(!t)return this;if(V(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=this.spawnSelf(),i=0;i<t.length;i++){var a=t[i],s=!this.has(a);s&&r.push(a)}return r},merge:function(t){var e=this._private,n=e.cy;if(!t)return this;if(t&&V(t)){var r=t;t=n.mutableElements().filter(r)}for(var i=e.map,a=0;a<t.length;a++){var s=t[a],o=s._private.data.id;if(!i.has(o)){var l=this.length++;this[l]=s,i.set(o,{ele:s,index:l})}}return this},unmergeAt:function(t){var e=this[t].id(),n=this._private.map;this[t]=void 0,n.delete(e);var r=t===this.length-1;if(this.length>1&&!r){var i=this.length-1,a=this[i],s=a._private.data.id;this[i]=void 0,this[t]=a,n.set(s,{ele:a,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,n=t._private.data.id,r=e.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&V(t)){var n=t;t=e.mutableElements().filter(n)}for(var r=0;r<t.length;r++)this.unmergeOne(t[r]);return this},unmergeBy:function(t){for(var e=this.length-1;e>=0;e--){t(this[e])&&this.unmergeAt(e)}return this},map:function(t,e){for(var n=[],r=this,i=0;i<r.length;i++){var a=r[i],s=e?t.apply(e,[a,i,r]):t(a,i,r);n.push(s)}return n},reduce:function(t,e){for(var n=e,r=this,i=0;i<r.length;i++)n=t(n,r[i],i,r);return n},max:function(t,e){for(var n,r=-1/0,i=this,a=0;a<i.length;a++){var s=i[a],o=e?t.apply(e,[s,a,i]):t(s,a,i);o>r&&(r=o,n=s)}return{value:r,ele:n}},min:function(t,e){for(var n,r=1/0,i=this,a=0;a<i.length;a++){var s=i[a],o=e?t.apply(e,[s,a,i]):t(s,a,i);o<r&&(r=o,n=s)}return{value:r,ele:n}}},gl=fl;gl.u=gl["|"]=gl["+"]=gl.union=gl.or=gl.add,gl["\\"]=gl["!"]=gl["-"]=gl.difference=gl.relativeComplement=gl.subtract=gl.not,gl.n=gl["&"]=gl["."]=gl.and=gl.intersection=gl.intersect,gl["^"]=gl["(+)"]=gl["(-)"]=gl.symmetricDifference=gl.symdiff=gl.xor,gl.fnFilter=gl.filterFn=gl.stdFilter=gl.filter,gl.complement=gl.abscomp=gl.absoluteComplement;var ml=function(t,e){var n=t.cy().hasCompoundNodes();function r(t){var e=t.pstyle("z-compound-depth");return"auto"===e.value?n?t.zDepth():0:"bottom"===e.value?-1:"top"===e.value?te:0}var i=r(t)-r(e);if(0!==i)return i;function a(t){return"auto"===t.pstyle("z-index-compare").value&&t.isNode()?1:0}var s=a(t)-a(e);if(0!==s)return s;var o=t.pstyle("z-index").value-e.pstyle("z-index").value;return 0!==o?o:t.poolIndex()-e.poolIndex()},yl={forEach:function(t,e){if(H(t))for(var n=this.length,r=0;r<n;r++){var i=this[r];if(!1===(e?t.apply(e,[i,r,this]):t(i,r,this)))break}return this},toArray:function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},slice:function(t,e){var n=[],r=this.length;null==e&&(e=r),null==t&&(t=0),t<0&&(t=r+t),e<0&&(e=r+e);for(var i=t;i>=0&&i<e&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(t){return this[t]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(t){if(!H(t))return this;var e=this.toArray().sort(t);return this.spawn(e)},sortByZIndex:function(){return this.sort(ml)},zDepth:function(){var t=this[0];if(t){var e=t._private;if("nodes"===e.group){var n=e.data.parent?t.parents().size():0;return t.isParent()?n:te-1}var r=e.source,i=e.target,a=r.zDepth(),s=i.zDepth();return Math.max(a,s,0)}}};yl.each=yl.forEach;var vl;vl="undefined",("undefined"==typeof Symbol?"undefined":u(Symbol))!=vl&&u(Symbol.iterator)!=vl&&(yl[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},n=0,r=this.length;return o({next:function(){return n<r?e.value=t[n++]:(e.value=void 0,e.done=!0),e}},Symbol.iterator,function(){return this})});var xl=de({nodeDimensionsIncludeLabels:!1}),bl={layoutDimensions:function(t){var e;if(t=xl(t),this.takesUpSpace())if(t.nodeDimensionsIncludeLabels){var n=this.boundingBox();e={w:n.w,h:n.h}}else e={w:this.outerWidth(),h:this.outerHeight()};else e={w:0,h:0};return 0!==e.w&&0!==e.h||(e.w=e.h=1),e},layoutPositions:function(t,e,n){var r=this.nodes().filter(function(t){return!t.isParent()}),i=this.cy(),a=e.eles,s=function(t){return t.id()},o=ot(n,s);t.emit({type:"layoutstart",layout:t}),t.animations=[];var l=e.spacingFactor&&1!==e.spacingFactor,c=function(){if(!l)return null;for(var t=nn(),e=0;e<r.length;e++){var n=r[e],i=o(n,e);an(t,i.x,i.y)}return t}(),h=ot(function(t,n){var r=o(t,n);l&&(r=function(t,e,n){var r=e.x1+e.w/2,i=e.y1+e.h/2;return{x:r+(n.x-r)*t,y:i+(n.y-i)*t}}(Math.abs(e.spacingFactor),c,r));return null!=e.transform&&(r=e.transform(t,r)),r},s);if(e.animate){for(var u=0;u<r.length;u++){var d=r[u],p=h(d,u);if(null==e.animateFilter||e.animateFilter(d,u)){var f=d.animation({position:p,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(f)}else d.position(p)}if(e.fit){var g=i.animation({fit:{boundingBox:a.boundingBoxAt(h),padding:e.padding},duration:e.animationDuration,easing:e.animationEasing});t.animations.push(g)}else if(void 0!==e.zoom&&void 0!==e.pan){var m=i.animation({zoom:e.zoom,pan:e.pan,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(m)}t.animations.forEach(function(t){return t.play()}),t.one("layoutready",e.ready),t.emit({type:"layoutready",layout:t}),Zr.all(t.animations.map(function(t){return t.promise()})).then(function(){t.one("layoutstop",e.stop),t.emit({type:"layoutstop",layout:t})})}else r.positions(h),e.fit&&i.fit(e.eles,e.padding),null!=e.zoom&&i.zoom(e.zoom),e.pan&&i.pan(e.pan),t.one("layoutready",e.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",e.stop),t.emit({type:"layoutstop",layout:t});return this},layout:function(t){return this.cy().makeLayout(xt({},t,{eles:this}))}};function wl(t,e,n){var r,i=n._private,a=i.styleCache=i.styleCache||[];return null!=(r=a[t])?r:r=a[t]=e(n)}function Tl(t,e){return t=Wt(t),function(n){return wl(t,e,n)}}function kl(t,e){t=Wt(t);var n=function(t){return e.call(t)};return function(){var e=this[0];if(e)return wl(t,n,e)}}bl.createLayout=bl.makeLayout=bl.layout;var El={recalculateRenderedStyle:function(t){var e=this.cy(),n=e.renderer(),r=e.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t,e=this.cy(),n=function(t){return t._private.styleCache=null};e.hasCompoundNodes()?((t=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(t.connectedEdges()),t.forEach(n)):this.forEach(function(t){n(t),t.connectedEdges().forEach(n)});return this},updateStyle:function(t){var e=this._private.cy;if(!e.styleEnabled())return this;if(e.batching())return e._private.batchStyleEles.merge(this),this;var n=this;t=!(!t&&void 0!==t),e.hasCompoundNodes()&&(n=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var r=n;return t?r.emitAndNotify("style"):r.emit("style"),n.forEach(function(t){return t._private.styleDirty=!0}),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var e=0;e<this.length;e++){var n=this[e];n._private.styleDirty&&(n._private.styleDirty=!1,t.style().apply(n))}},parsedStyle:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var i=n._private.style[t];return null!=i?i:e?r.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var n=e.pstyle(t);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=this[0];return n?e.style().getRenderedStyle(n,t):void 0},style:function(t,e){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(Z(t)){var a=t;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(V(t)){if(void 0===e){var s=this[0];return s?i.getStylePropertyValue(s,t):void 0}i.applyBypass(this,t,e,r),this.emitAndNotify("style")}else if(void 0===t){var o=this[0];return o?i.getRawStyle(o):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var n=!1,r=e.style(),i=this;if(void 0===t)for(var a=0;a<i.length;a++){var s=i[a];r.removeAllBypasses(s,n)}else{t=t.split(/\s+/);for(var o=0;o<i.length;o++){var l=i[o];r.removeBypasses(l,t,n)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var t=this.cy();if(!t.styleEnabled())return 1;var e=t.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle("opacity").value;if(!e)return i;var a=r.data.parent?n.parents():null;if(a)for(var s=0;s<a.length;s++){i*=a[s].pstyle("opacity").value}return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var t=this[0],e=t.cy().hasCompoundNodes();return t?e?0===t.effectiveOpacity():0===t.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Al(t,e){var n=t._private.data.parent?t.parents():null;if(n)for(var r=0;r<n.length;r++){if(!e(n[r]))return!1}return!0}function _l(t){var e=t.ok,n=t.edgeOkViaNode||t.ok,r=t.parentOk||t.ok;return function(){var t=this.cy();if(!t.styleEnabled())return!0;var i=this[0],a=t.hasCompoundNodes();if(i){var s=i._private;if(!e(i))return!1;if(i.isNode())return!a||Al(i,r);var o=s.source,l=s.target;return n(o)&&(!a||Al(o,n))&&(o===l||n(l)&&(!a||Al(l,n)))}}}var Cl=Tl("eleTakesUpSpace",function(t){return"element"===t.pstyle("display").value&&0!==t.width()&&(!t.isNode()||0!==t.height())});El.takesUpSpace=kl("takesUpSpace",_l({ok:Cl}));var Sl=Tl("eleInteractive",function(t){return"yes"===t.pstyle("events").value&&"visible"===t.pstyle("visibility").value&&Cl(t)}),Rl=Tl("parentInteractive",function(t){return"visible"===t.pstyle("visibility").value&&Cl(t)});El.interactive=kl("interactive",_l({ok:Sl,parentOk:Rl,edgeOkViaNode:Cl})),El.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var Ll=Tl("eleVisible",function(t){return"visible"===t.pstyle("visibility").value&&0!==t.pstyle("opacity").pfValue&&Cl(t)}),Dl=Cl;El.visible=kl("visible",_l({ok:Ll,edgeOkViaNode:Dl})),El.hidden=function(){var t=this[0];if(t)return!t.visible()},El.isBundledBezier=kl("isBundledBezier",function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())}),El.bypass=El.css=El.style,El.renderedCss=El.renderedStyle,El.removeBypass=El.removeCss=El.removeStyle,El.pstyle=El.parsedStyle;var Il={};function Nl(t){return function(){var e=arguments,n=[];if(2===e.length){var r=e[0],i=e[1];this.on(t.event,r,i)}else if(1===e.length&&H(e[0])){var a=e[0];this.on(t.event,a)}else if(0===e.length||1===e.length&&X(e[0])){for(var s=1===e.length?e[0]:null,o=0;o<this.length;o++){var l=this[o],c=!t.ableField||l._private[t.ableField],h=l._private[t.field]!=t.value;if(t.overrideAble){var u=t.overrideAble(l);if(void 0!==u&&(c=u,!u))return this}c&&(l._private[t.field]=t.value,h&&n.push(l))}var d=this.spawn(n);d.updateStyle(),d.emit(t.event),s&&d.emit(s)}return this}}function Ml(t){Il[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var n=t.overrideField(e);if(void 0!==n)return n}return e._private[t.field]}},Il[t.on]=Nl({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Il[t.off]=Nl({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Ml({field:"locked",overrideField:function(t){return!!t.cy().autolock()||void 0},on:"lock",off:"unlock"}),Ml({field:"grabbable",overrideField:function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},on:"grabify",off:"ungrabify"}),Ml({field:"selected",ableField:"selectable",overrideAble:function(t){return!t.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),Ml({field:"selectable",overrideField:function(t){return!t.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),Il.deselect=Il.unselect,Il.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Ml({field:"active",on:"activate",off:"unactivate"}),Ml({field:"pannable",on:"panify",off:"unpanify"}),Il.inactive=function(){var t=this[0];if(t)return!t._private.active};var Ol={},Pl=function(t){return function(e){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode()){for(var a=!1,s=i.connectedEdges(),o=0;o<s.length;o++){var l=s[o],c=l.source(),h=l.target();if(t.noIncomingEdges&&h===i&&c!==i||t.noOutgoingEdges&&c===i&&h!==i){a=!0;break}}a||n.push(i)}}return this.spawn(n,!0).filter(e)}},$l=function(t){return function(e){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target();t.outgoing&&l===i?(n.push(o),n.push(c)):t.incoming&&c===i&&(n.push(o),n.push(l))}}return this.spawn(n,!0).filter(e)}},Bl=function(t){return function(e){for(var n=this,r=[],i={};;){var a=t.outgoing?n.outgoers():n.incomers();if(0===a.length)break;for(var s=!1,o=0;o<a.length;o++){var l=a[o],c=l.id();i[c]||(i[c]=!0,r.push(l),s=!0)}if(!s)break;n=a}return this.spawn(r,!0).filter(e)}};function Fl(t){return function(e){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[t.attr];i&&n.push(i)}return this.spawn(n,!0).filter(e)}}function zl(t){return function(e){var n=[],r=this._private.cy,i=t||{};V(e)&&(e=r.$(e));for(var a=0;a<e.length;a++)for(var s=e[a]._private.edges,o=0;o<s.length;o++){var l=s[o],c=l._private.data,h=this.hasElementWithId(c.source)&&e.hasElementWithId(c.target),u=e.hasElementWithId(c.source)&&this.hasElementWithId(c.target);if(h||u){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!h)continue;if(i.thisIsTgt&&!u)continue}n.push(l)}}return this.spawn(n,!0)}}function Kl(t){return t=xt({},{codirected:!1},t),function(e){for(var n=[],r=this.edges(),i=t,a=0;a<r.length;a++)for(var s=r[a]._private,o=s.source,l=o._private.data.id,c=s.data.target,h=o._private.edges,u=0;u<h.length;u++){var d=h[u],p=d._private.data,f=p.target,g=p.source,m=f===c&&g===l,y=l===f&&c===g;(i.codirected&&m||!i.codirected&&(m||y))&&n.push(d)}return this.spawn(n,!0).filter(e)}}Ol.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},xt(Ol,{roots:Pl({noIncomingEdges:!0}),leaves:Pl({noOutgoingEdges:!0}),outgoers:po($l({outgoing:!0}),"outgoers"),successors:Bl({outgoing:!0}),incomers:po($l({incoming:!0}),"incomers"),predecessors:Bl({})}),xt(Ol,{neighborhood:po(function(t){for(var e=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),c=o.target(),h=i===l?c:l;h.length>0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Ol.neighbourhood=Ol.neighborhood,Ol.closedNeighbourhood=Ol.closedNeighborhood,Ol.openNeighbourhood=Ol.openNeighborhood,xt(Ol,{source:po(function(t){var e,n=this[0];return n&&(e=n._private.source||n.cy().collection()),e&&t?e.filter(t):e},"source"),target:po(function(t){var e,n=this[0];return n&&(e=n._private.target||n.cy().collection()),e&&t?e.filter(t):e},"target"),sources:Fl({attr:"source"}),targets:Fl({attr:"target"})}),xt(Ol,{edgesWith:po(zl(),"edgesWith"),edgesTo:po(zl({thisIsSrc:!0}),"edgesTo")}),xt(Ol,{connectedEdges:po(function(t){for(var e=[],n=0;n<this.length;n++){var r=this[n];if(r.isNode())for(var i=r._private.edges,a=0;a<i.length;a++){var s=i[a];e.push(s)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:po(function(t){for(var e=[],n=0;n<this.length;n++){var r=this[n];r.isEdge()&&(e.push(r.source()[0]),e.push(r.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:po(Kl(),"parallelEdges"),codirectedEdges:po(Kl({codirected:!0}),"codirectedEdges")}),xt(Ol,{components:function(t){var e=this,n=e.cy(),r=n.collection(),i=null==t?e.nodes():t.nodes(),a=[];null!=t&&i.empty()&&(i=t.sources());var s=function(t,e){r.merge(t),i.unmerge(t),e.merge(t)};if(i.empty())return e.spawn();var o=function(){var t=n.collection();a.push(t);var r=i[0];s(r,t),e.bfs({directed:!1,roots:r,visit:function(e){return s(e,t)}}),t.forEach(function(n){n.connectedEdges().forEach(function(n){e.has(n)&&t.has(n.source())&&t.has(n.target())&&t.merge(n)})})};do{o()}while(i.length>0);return a},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Ol.componentsOf=Ol.components;var ql=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new ye,a=!1;if(e){if(e.length>0&&Z(e[0])&&!et(e[0])){a=!0;for(var s=[],o=new xe,l=0,c=e.length;l<c;l++){var h=e[l];null==h.data&&(h.data={});var u=h.data;if(null==u.id)u.id=ce();else if(t.hasElementWithId(u.id)||o.has(u.id))continue;var d=new be(t,h,!1);s.push(d),o.add(u.id)}e=s}}else e=[];this.length=0;for(var p=0,f=e.length;p<f;p++){var g=e[p][0];if(null!=g){var m=g._private.data.id;n&&i.has(m)||(n&&i.set(m,{index:this.length,ele:g}),this[this.length]=g,this.length++)}}this._private={eles:this,cy:t,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(t){this.lazyMap=t},rebuildMap:function(){for(var t=this.lazyMap=new ye,e=this.eles,n=0;n<e.length;n++){var r=e[n];t.set(r.id(),{index:n,ele:r})}}},n&&(this._private.map=i),a&&!r&&this.restore()}else ae("A collection must have a reference to the core")},Ul=be.prototype=ql.prototype=Object.create(Array.prototype);Ul.instanceString=function(){return"collection"},Ul.spawn=function(t,e){return new ql(this.cy(),t,e)},Ul.spawnSelf=function(){return this.spawn(this)},Ul.cy=function(){return this._private.cy},Ul.renderer=function(){return this._private.cy.renderer()},Ul.element=function(){return this[0]},Ul.collection=function(){return nt(this)?this:new ql(this._private.cy,[this])},Ul.unique=function(){return new ql(this._private.cy,this,!0)},Ul.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},Ul.getElementById=function(t){t=""+t;var e=this._private.cy,n=this._private.map.get(t);return n?n.ele:new ql(e)},Ul.$id=Ul.getElementById,Ul.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},Ul.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},Ul.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},Ul.json=function(t){var e=this.element(),n=this.cy();if(null==e&&t)return this;if(null!=e){var r=e._private;if(Z(t)){if(n.startBatch(),t.data){e.data(t.data);var i=r.data;if(e.isEdge()){var a=!1,s={},o=t.data.source,l=t.data.target;null!=o&&o!=i.source&&(s.source=""+o,a=!0),null!=l&&l!=i.target&&(s.target=""+l,a=!0),a&&(e=e.move(s))}else{var c="parent"in t.data,h=t.data.parent;!c||null==h&&null==i.parent||h==i.parent||(void 0===h&&(h=null),null!=h&&(h=""+h),e=e.move({parent:h}))}}t.position&&e.position(t.position);var u=function(n,i,a){var s=t[n];null!=s&&s!==r[n]&&(s?e[i]():e[a]())};return u("removed","remove","restore"),u("selected","select","unselect"),u("selectable","selectify","unselectify"),u("locked","lock","unlock"),u("grabbable","grabify","ungrabify"),u("pannable","panify","unpanify"),null!=t.classes&&e.classes(t.classes),n.endBatch(),this}if(void 0===t){var d={data:le(r.data),position:le(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:(null,"")},p=0;return r.classes.forEach(function(t){return d.classes+=0===p++?t:" "+t}),d}}},Ul.jsons=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e].json();t.push(n)}return t},Ul.clone=function(){for(var t=this.cy(),e=[],n=0;n<this.length;n++){var r=this[n].json(),i=new be(t,r,!1);e.push(i)}return new ql(t,e)},Ul.copy=Ul.clone,Ul.restore=function(){for(var t,e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),s=a._private,o=[],l=[],c=0,h=i.length;c<h;c++){var u=i[c];r&&!u.removed()||(u.isNode()?o.push(u):l.push(u))}t=o.concat(l);var d=function(){t.splice(e,1),e--};for(e=0;e<t.length;e++){var p=t[e],f=p._private,g=f.data;if(p.clearTraversalCache(),r||f.removed)if(void 0===g.id)g.id=ce();else if(Q(g.id))g.id=""+g.id;else{if(at(g.id)||!V(g.id)){ae("Can not create element with invalid string ID `"+g.id+"`"),d();continue}if(a.hasElementWithId(g.id)){ae("Can not create second element with ID `"+g.id+"`"),d();continue}}else;var m=g.id;if(p.isNode()){var y=f.position;null==y.x&&(y.x=0),null==y.y&&(y.y=0)}if(p.isEdge()){for(var v=p,x=["source","target"],b=x.length,w=!1,T=0;T<b;T++){var k=x[T],E=g[k];Q(E)&&(E=g[k]=""+g[k]),null==E||""===E?(ae("Can not create edge `"+m+"` with unspecified "+k),w=!0):a.hasElementWithId(E)||(ae("Can not create edge `"+m+"` with nonexistant "+k+" `"+E+"`"),w=!0)}if(w){d();continue}var A=a.getElementById(g.source),_=a.getElementById(g.target);A.same(_)?A._private.edges.push(v):(A._private.edges.push(v),_._private.edges.push(v)),v._private.source=A,v._private.target=_}f.map=new ye,f.map.set(m,{ele:p,index:0}),f.removed=!1,r&&a.addToPool(p)}for(var C=0;C<o.length;C++){var S=o[C],R=S._private.data;Q(R.parent)&&(R.parent=""+R.parent);var L=R.parent;if(null!=L||S._private.parent){var D=S._private.parent?a.collection().merge(S._private.parent):a.getElementById(L);if(D.empty())R.parent=void 0;else if(D[0].removed())oe("Node added with missing parent, reference to parent removed"),R.parent=void 0,S._private.parent=null;else{for(var I=!1,N=D;!N.empty();){if(S.same(N)){I=!0,R.parent=void 0;break}N=N.parent()}I||(D[0]._private.children.push(S),S._private.parent=D[0],s.hasCompoundNodes=!0)}}}if(t.length>0){for(var M=t.length===i.length?i:new ql(a,t),O=0;O<M.length;O++){var P=M[O];P.isNode()||(P.parallelEdges().clearTraversalCache(),P.source().clearTraversalCache(),P.target().clearTraversalCache())}(s.hasCompoundNodes?a.collection().merge(M).merge(M.connectedNodes()).merge(M.parent()):M).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(n),n?M.emitAndNotify("add"):r&&M.emit("add")}return i},Ul.removed=function(){var t=this[0];return t&&t._private.removed},Ul.inside=function(){var t=this[0];return t&&!t._private.removed},Ul.remove=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function s(t){var n=i[t.id()];e&&t.removed()||n||(i[t.id()]=!0,t.isNode()?(r.push(t),function(t){for(var e=t._private.edges,n=0;n<e.length;n++)s(e[n])}(t),function(t){for(var e=t._private.children,n=0;n<e.length;n++)s(e[n])}(t)):r.unshift(t))}for(var o=0,l=n.length;o<l;o++){s(n[o])}function c(t,e){var n=t._private.edges;pe(n,e),t.clearTraversalCache()}function h(t){t.clearTraversalCache()}var u=[];function d(t,e){e=e[0];var n=(t=t[0])._private.children,r=t.id();pe(n,e),e._private.parent=null,u.ids[r]||(u.ids[r]=!0,u.push(t))}u.ids={},n.dirtyCompoundBoundsCache(),e&&a.removeFromPool(r);for(var p=0;p<r.length;p++){var f=r[p];if(f.isEdge()){var g=f.source()[0],m=f.target()[0];c(g,f),c(m,f);for(var y=f.parallelEdges(),v=0;v<y.length;v++){var x=y[v];h(x),x.isBundledBezier()&&x.dirtyBoundingBoxCache()}}else{var b=f.parent();0!==b.length&&d(b,f)}e&&(f._private.removed=!0)}var w=a._private.elements;a._private.hasCompoundNodes=!1;for(var T=0;T<w.length;T++){if(w[T].isParent()){a._private.hasCompoundNodes=!0;break}}var k=new ql(this.cy(),r);k.size()>0&&(t?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var E=0;E<u.length;E++){var A=u[E];e&&A.removed()||A.updateStyle()}return k},Ul.move=function(t){var e=this._private.cy,n=this,r=!1,i=!1,a=function(t){return null==t?t:""+t};if(void 0!==t.source||void 0!==t.target){var s=a(t.source),o=a(t.target),l=null!=s&&e.hasElementWithId(s),c=null!=o&&e.hasElementWithId(o);(l||c)&&(e.batch(function(){n.remove(r,i),n.emitAndNotify("moveout");for(var t=0;t<n.length;t++){var e=n[t],a=e._private.data;e.isEdge()&&(l&&(a.source=s),c&&(a.target=o))}n.restore(r,i)}),n.emitAndNotify("move"))}else if(void 0!==t.parent){var h=a(t.parent);if(null===h||e.hasElementWithId(h)){var u=null===h?void 0:h;e.batch(function(){var t=n.remove(r,i);t.emitAndNotify("moveout");for(var e=0;e<n.length;e++){var a=n[e],s=a._private.data;a.isNode()&&(s.parent=u)}t.restore(r,i)}),n.emitAndNotify("move")}}return this},[jr,Es,As,co,fo,wo,To,Qo,pl,fl,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var t=this[0];if(t)return t._private.group}},yl,bl,El,Il,Ol].forEach(function(t){xt(Ul,t)});var jl={add:function(t){var e,n=this;if(tt(t)){var r=t;if(r._private.cy===n)e=r.restore();else{for(var i=[],a=0;a<r.length;a++){var s=r[a];i.push(s.json())}e=new ql(n,i)}}else if(X(t)){e=new ql(n,t)}else if(Z(t)&&(X(t.nodes)||X(t.edges))){for(var o=t,l=[],c=["nodes","edges"],h=0,u=c.length;h<u;h++){var d=c[h],p=o[d];if(X(p))for(var f=0,g=p.length;f<g;f++){var m=xt({group:d},p[f]);l.push(m)}}e=new ql(n,l)}else{e=new be(n,t).collection()}return e},remove:function(t){if(tt(t));else if(V(t)){var e=t;t=this.$(e)}return t.remove()}};function Yl(t,e,n,r){var i=.1,a="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var s=0;s<4;++s)if("number"!=typeof arguments[s]||isNaN(arguments[s])||!isFinite(arguments[s]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var o=a?new Float32Array(11):new Array(11);function l(t,e){return 1-3*e+3*t}function c(t,e){return 3*e-6*t}function h(t){return 3*t}function u(t,e,n){return((l(e,n)*t+c(e,n))*t+h(e))*t}function d(t,e,n){return 3*l(e,n)*t*t+2*c(e,n)*t+h(e)}function p(e){for(var r=0,a=1;10!==a&&o[a]<=e;++a)r+=i;--a;var s=r+(e-o[a])/(o[a+1]-o[a])*i,l=d(s,t,n);return l>=.001?function(e,r){for(var i=0;i<4;++i){var a=d(r,t,n);if(0===a)return r;r-=(u(r,t,n)-e)/a}return r}(e,s):0===l?s:function(e,r,i){var a,s,o=0;do{(a=u(s=r+(i-r)/2,t,n)-e)>0?i=s:r=s}while(Math.abs(a)>1e-7&&++o<10);return s}(e,r,r+i)}var f=!1;function g(){f=!0,t===e&&n===r||function(){for(var e=0;e<11;++e)o[e]=u(e*i,t,n)}()}var m=function(i){return f||g(),t===e&&n===r?i:0===i?0:1===i?1:u(p(i),e,r)};m.getControlPoints=function(){return[{x:t,y:e},{x:n,y:r}]};var y="generateBezier("+[t,e,n,r]+")";return m.toString=function(){return y},m}var Gl=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function n(n,r){var i={dx:n.v,dv:t(n)},a=e(n,.5*r,i),s=e(n,.5*r,a),o=e(n,r,s),l=1/6*(i.dx+2*(a.dx+s.dx)+o.dx),c=1/6*(i.dv+2*(a.dv+s.dv)+o.dv);return n.x=n.x+l*r,n.v=n.v+c*r,n}return function t(e,r,i){var a,s,o,l={x:-1,v:0,tension:null,friction:null},c=[0],h=0,u=1e-4;for(e=parseFloat(e)||500,r=parseFloat(r)||20,i=i||null,l.tension=e,l.friction=r,s=(a=null!==i)?(h=t(e,r))/i*.016:.016;o=n(o||l,s),c.push(1+o.x),h+=16,Math.abs(o.x)>u&&Math.abs(o.v)>u;);return a?function(t){return c[t*(c.length-1)|0]}:h}}(),Wl=function(t,e,n,r){var i=Yl(t,e,n,r);return function(t,e,n){return t+(e-t)*i(n)}},Vl={linear:function(t,e,n){return t+(e-t)*n},ease:Wl(.25,.1,.25,1),"ease-in":Wl(.42,0,1,1),"ease-out":Wl(0,0,.58,1),"ease-in-out":Wl(.42,0,.58,1),"ease-in-sine":Wl(.47,0,.745,.715),"ease-out-sine":Wl(.39,.575,.565,1),"ease-in-out-sine":Wl(.445,.05,.55,.95),"ease-in-quad":Wl(.55,.085,.68,.53),"ease-out-quad":Wl(.25,.46,.45,.94),"ease-in-out-quad":Wl(.455,.03,.515,.955),"ease-in-cubic":Wl(.55,.055,.675,.19),"ease-out-cubic":Wl(.215,.61,.355,1),"ease-in-out-cubic":Wl(.645,.045,.355,1),"ease-in-quart":Wl(.895,.03,.685,.22),"ease-out-quart":Wl(.165,.84,.44,1),"ease-in-out-quart":Wl(.77,0,.175,1),"ease-in-quint":Wl(.755,.05,.855,.06),"ease-out-quint":Wl(.23,1,.32,1),"ease-in-out-quint":Wl(.86,0,.07,1),"ease-in-expo":Wl(.95,.05,.795,.035),"ease-out-expo":Wl(.19,1,.22,1),"ease-in-out-expo":Wl(1,0,0,1),"ease-in-circ":Wl(.6,.04,.98,.335),"ease-out-circ":Wl(.075,.82,.165,1),"ease-in-out-circ":Wl(.785,.135,.15,.86),spring:function(t,e,n){if(0===n)return Vl.linear;var r=Gl(t,e,n);return function(t,e,n){return t+(e-t)*r(n)}},"cubic-bezier":Wl};function Hl(t,e,n,r,i){if(1===r)return n;if(e===n)return n;var a=i(e,n,r);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function Xl(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function Zl(t,e,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var s=Xl(t,i),o=Xl(e,i);if(Q(s)&&Q(o))return Hl(a,s,o,n,r);if(X(s)&&X(o)){for(var l=[],c=0;c<o.length;c++){var h=s[c],u=o[c];if(null!=h&&null!=u){var d=Hl(a,h,u,n,r);l.push(d)}else l.push(u)}return l}}function Ql(t,e,n,r){var i=!r,a=t._private,s=e._private,o=s.easing,l=s.startTime,c=(r?t:t.cy()).style();if(!s.easingImpl)if(null==o)s.easingImpl=Vl.linear;else{var h,u,d;if(V(o))h=c.parse("transition-timing-function",o).value;else h=o;V(h)?(u=h,d=[]):(u=h[1],d=h.slice(2).map(function(t){return+t})),d.length>0?("spring"===u&&d.push(s.duration),s.easingImpl=Vl[u].apply(null,d)):s.easingImpl=Vl[u]}var p,f=s.easingImpl;if(p=0===s.duration?1:(n-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),null==s.delay){var g=s.startPosition,m=s.position;if(m&&i&&!t.locked()){var y={};Jl(g.x,m.x)&&(y.x=Zl(g.x,m.x,p,f)),Jl(g.y,m.y)&&(y.y=Zl(g.y,m.y,p,f)),t.position(y)}var v=s.startPan,x=s.pan,b=a.pan,w=null!=x&&r;w&&(Jl(v.x,x.x)&&(b.x=Zl(v.x,x.x,p,f)),Jl(v.y,x.y)&&(b.y=Zl(v.y,x.y,p,f)),t.emit("pan"));var T=s.startZoom,k=s.zoom,E=null!=k&&r;E&&(Jl(T,k)&&(a.zoom=en(a.minZoom,Zl(T,k,p,f),a.maxZoom)),t.emit("zoom")),(w||E)&&t.emit("viewport");var A=s.style;if(A&&A.length>0&&i){for(var _=0;_<A.length;_++){var C=A[_],S=C.name,R=C,L=s.startStyle[S],D=Zl(L,R,p,f,c.properties[L.name]);c.overrideBypass(t,S,D)}t.emit("style")}}return s.progress=p,p}function Jl(t,e){return null!=t&&null!=e&&(!(!Q(t)||!Q(e))||!(!t||!e))}function tc(t,e,n,r){var i=e._private;i.started=!0,i.startTime=n-i.progress*i.duration}function ec(t,e){var n=e._private.aniEles,r=[];function i(e,n){var i=e._private,a=i.animation.current,s=i.animation.queue,o=!1;if(0===a.length){var l=s.shift();l&&a.push(l)}for(var c=function(t){for(var e=t.length-1;e>=0;e--){(0,t[e])()}t.splice(0,t.length)},h=a.length-1;h>=0;h--){var u=a[h],d=u._private;d.stopped?(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||tc(0,u,t),Ql(e,u,t,n),d.applying&&(d.applying=!1),c(d.frames),null!=d.step&&d.step(t),u.completed()&&(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.completes)),o=!0)}return n||0!==a.length||0!==s.length||r.push(e),o}for(var a=!1,s=0;s<n.length;s++){var o=i(n[s]);a=a||o}var l=i(e,!0);(a||l)&&(n.length>0?e.notify("draw",n):e.notify("draw")),n.unmerge(r),e.emit("step")}var nc={animate:ks.animate(),animation:ks.animation(),animated:ks.animated(),clearQueue:ks.clearQueue(),delay:ks.delay(),delayAnimation:ks.delayAnimation(),stop:ks.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender(function(e,n){ec(n,t)},e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&$t(function(n){ec(n,t),e()})}()}}},rc={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,n){var r=e.qualifier;return null==r||t!==n.target&&et(n.target)&&r.matches(n.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,n){return null!=e.qualifier?n.target:t}},ic=function(t){return V(t)?new oo(t):t},ac={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new sl(rc,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,n){return this.emitter().on(t,ic(e),n),this},removeListener:function(t,e,n){return this.emitter().removeListener(t,ic(e),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,n){return this.emitter().one(t,ic(e),n),this},once:function(t,e,n){return this.emitter().one(t,ic(e),n),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};ks.eventAliasesOn(ac);var sc={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};sc.jpeg=sc.jpg;var oc={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var n=t.name,r=e.extension("layout",n);if(null!=r){var i;i=V(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$();var a=new r(xt({},t,{cy:e,eles:i}));return a}ae("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else ae("A `name` must be specified to make a layout");else ae("Layout options must be specified to make a layout")}};oc.createLayout=oc.makeLayout=oc.layout;var lc={notify:function(t,e){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();null!=e&&r.merge(e)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach(function(n){var r=t.batchNotifications[n];r.empty()?e.notify(n):e.notify(n,r)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch(function(){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],a=t[i];e.getElementById(i).data(a)}})}},cc=de({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),hc={renderTo:function(t,e,n,r){return this._private.renderer.renderTo(t,e,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(t){var e=this,n=e.extension("renderer",t.name);if(null!=n){void 0!==t.wheelSensitivity&&oe("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var r=cc(t);r.cy=e,e._private.renderer=new n(r),this.notify("init")}else ae("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var t=this;t.notify("destroy");var e=t.container();if(e)for(e._cyreg=null;e.childNodes.length>0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};hc.invalidateDimensions=hc.resize;var uc={collection:function(t,e){return V(t)?this.$(t):tt(t)?t.collection():X(t)?(e||(e={}),new ql(this,t,e.unique,e.removed)):new ql(this)},nodes:function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},edges:function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};uc.elements=uc.filter=uc.$;var dc={},pc="t";dc.apply=function(t){for(var e=this,n=e._private.cy.collection(),r=0;r<t.length;r++){var i=t[r],a=e.getContextMeta(i);if(!a.empty){var s=e.getContextStyle(a),o=e.applyContextStyle(a,s,i);i._private.appliedInitStyle?e.updateTransitions(i,o.diffProps):i._private.appliedInitStyle=!0,e.updateStyleHints(i)&&n.push(i)}}return n},dc.getPropertiesDiff=function(t,e){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=t+"-"+e,a=r[i];if(a)return a;for(var s=[],o={},l=0;l<n.length;l++){var c=n[l],h=t[l]===pc,u=e[l]===pc,d=h!==u,p=c.mappedProperties.length>0;if(d||u&&p){var f=void 0;d&&p||d?f=c.properties:p&&(f=c.mappedProperties);for(var g=0;g<f.length;g++){for(var m=f[g],y=m.name,v=!1,x=l+1;x<n.length;x++){var b=n[x];if(e[x]===pc&&(v=null!=b.properties[m.name]))break}o[y]||v||(o[y]=!0,s.push(y))}}}return r[i]=s,s},dc.getContextMeta=function(t){for(var e,n=this,r="",i=t._private.styleCxtKey||"",a=0;a<n.length;a++){var s=n[a];r+=s.selector&&s.selector.matches(t)?pc:"f"}return e=n.getPropertiesDiff(i,r),t._private.styleCxtKey=r,{key:r,diffPropNames:e,empty:0===e.length}},dc.getContextStyle=function(t){var e=t.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var r={_private:{key:e}},i=0;i<this.length;i++){var a=this[i];if(e[i]===pc)for(var s=0;s<a.properties.length;s++){var o=a.properties[s];r[o.name]=o}}return n[e]=r,r},dc.applyContextStyle=function(t,e,n){for(var r=t.diffPropNames,i={},a=this.types,s=0;s<r.length;s++){var o=r[s],l=e[o],c=n.pstyle(o);if(!l){if(!c)continue;l=c.bypass?{name:o,deleteBypassed:!0}:{name:o,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(n))===h.prevFnValue)continue}var u=i[o]={prev:c};this.applyParsedProperty(n,l),u.next=n.pstyle(o),u.next&&u.next.bypass&&(u.next=u.next.bypassed)}}return{diffProps:i}},dc.updateStyleHints=function(t){var e=t._private,n=this,r=n.propertyGroupNames,i=n.propertyGroupKeys,a=function(t,e,r){return n.getPropertiesHash(t,e,r)},s=e.styleKey;if(t.removed())return!1;var o="nodes"===e.group,l=t._private.style;r=Object.keys(l);for(var c=0;c<i.length;c++){var h=i[c];e.styleKeys[h]=[Ft,zt]}for(var u=function(t,n){return e.styleKeys[n][0]=qt(t,e.styleKeys[n][0])},d=function(t,n){return e.styleKeys[n][1]=Ut(t,e.styleKeys[n][1])},p=function(t,e){u(t,e),d(t,e)},f=function(t,e){for(var n=0;n<t.length;n++){var r=t.charCodeAt(n);u(r,e),d(r,e)}},g=function(t){return-128<t&&t<128&&Math.floor(t)!==t?2e9-(1024*t|0):t},m=0;m<r.length;m++){var y=r[m],v=l[y];if(null!=v){var x=this.properties[y],b=x.type,w=x.groupKey,T=void 0;null!=x.hashOverride?T=x.hashOverride(t,v):null!=v.pfValue&&(T=v.pfValue);var k=null==x.enums?v.value:null,E=null!=T,A=E||null!=k,_=v.units;if(b.number&&A&&!b.multiple)p(g(E?T:k),w),E||null==_||f(_,w);else f(v.strValue,w)}}for(var C,S,R=[Ft,zt],L=0;L<i.length;L++){var D=i[L],I=e.styleKeys[D];R[0]=qt(I[0],R[0]),R[1]=Ut(I[1],R[1])}e.styleKey=(C=R[0],S=R[1],2097152*C+S);var N=e.styleKeys;e.labelDimsKey=jt(N.labelDimensions);var M=a(t,["label"],N.labelDimensions);if(e.labelKey=jt(M),e.labelStyleKey=jt(Yt(N.commonLabel,M)),!o){var O=a(t,["source-label"],N.labelDimensions);e.sourceLabelKey=jt(O),e.sourceLabelStyleKey=jt(Yt(N.commonLabel,O));var P=a(t,["target-label"],N.labelDimensions);e.targetLabelKey=jt(P),e.targetLabelStyleKey=jt(Yt(N.commonLabel,P))}if(o){var $=e.styleKeys,B=$.nodeBody,F=$.nodeBorder,z=$.nodeOutline,K=$.backgroundImage,q=$.compound,U=$.pie,j=$.stripe,Y=[B,F,z,K,q,U,j].filter(function(t){return null!=t}).reduce(Yt,[Ft,zt]);e.nodeKey=jt(Y),e.hasPie=null!=U&&U[0]!==Ft&&U[1]!==zt,e.hasStripe=null!=j&&j[0]!==Ft&&j[1]!==zt}return s!==e.styleKey},dc.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},dc.applyParsedProperty=function(t,e){var n,r=this,i=e,a=t._private.style,s=r.types,o=r.properties[i.name].type,l=i.bypass,c=a[i.name],h=c&&c.bypass,u=t._private,d="mapping",p=function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},f=function(){var e=p(c),n=p(i);r.checkTriggers(t,i.name,e,n)};if("curve-style"===e.name&&t.isEdge()&&("bezier"!==e.value&&t.isLoop()||"haystack"===e.value&&(t.source().isParent()||t.target().isParent()))&&(i=e=this.parse(e.name,"bezier",l)),i.delete)return a[i.name]=void 0,f(),!0;if(i.deleteBypassed)return c?!!c.bypass&&(c.bypassed=void 0,f(),!0):(f(),!0);if(i.deleteBypass)return c?!!c.bypass&&(a[i.name]=c.bypassed,f(),!0):(f(),!0);var g=function(){oe("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")};switch(i.mapped){case s.mapData:for(var m,y=i.field.split("."),v=u.data,x=0;x<y.length&&v;x++){v=v[y[x]]}if(null==v)return g(),!1;if(!Q(v))return oe("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+v+"` for `"+t.id()+"` is non-numeric)"),!1;var b=i.fieldMax-i.fieldMin;if((m=0===b?0:(v-i.fieldMin)/b)<0?m=0:m>1&&(m=1),o.color){var w=i.valueMin[0],T=i.valueMax[0],k=i.valueMin[1],E=i.valueMax[1],A=i.valueMin[2],_=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],S=null==i.valueMax[3]?1:i.valueMax[3],R=[Math.round(w+(T-w)*m),Math.round(k+(E-k)*m),Math.round(A+(_-A)*m),Math.round(C+(S-C)*m)];n={bypass:i.bypass,name:i.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else{if(!o.number)return!1;var L=i.valueMin+(i.valueMax-i.valueMin)*m;n=this.parse(i.name,L,i.bypass,d)}if(!n)return g(),!1;n.mapping=i,i=n;break;case s.data:for(var D=i.field.split("."),I=u.data,N=0;N<D.length&&I;N++){I=I[D[N]]}if(null!=I&&(n=this.parse(i.name,I,i.bypass,d)),!n)return g(),!1;n.mapping=i,i=n;break;case s.fn:var M=i.value,O=null!=i.fnValue?i.fnValue:M(t);if(i.prevFnValue=O,null==O)return oe("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+t.id()+"` is null)"),!1;if(!(n=this.parse(i.name,O,i.bypass,d)))return oe("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+t.id()+"` is invalid)"),!1;n.mapping=le(i),i=n;break;case void 0:break;default:return!1}return l?(i.bypassed=h?c.bypassed:c,a[i.name]=i):h?c.bypassed=i:a[i.name]=i,f(),!0},dc.cleanElements=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),e)for(var i=r._private.style,a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o];null!=l&&(l.bypass?l.bypassed=null:i[o]=null)}else r._private.style={}}},dc.update=function(){this._private.cy.mutableElements().updateStyle()},dc.updateTransitions=function(t,e){var n=this,r=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var o={},l=!1,c=0;c<i.length;c++){var h=i[c],u=t.pstyle(h),d=e[h];if(d){var p=d.prev,f=null!=d.next?d.next:u,g=!1,m=void 0,y=1e-6;p&&(Q(p.pfValue)&&Q(f.pfValue)?(g=f.pfValue-p.pfValue,m=p.pfValue+y*g):Q(p.value)&&Q(f.value)?(g=f.value-p.value,m=p.value+y*g):X(p.value)&&X(f.value)&&(g=p.value[0]!==f.value[0]||p.value[1]!==f.value[1]||p.value[2]!==f.value[2],m=p.strValue),g&&(o[h]=f.strValue,this.applyBypass(t,h,m),l=!0))}}if(!l)return;r.transitioning=!0,new Zr(function(e){s>0?t.delayAnimation(s).play().promise().then(e):e()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),r.transitioning=!1)},dc.checkTrigger=function(t,e,n,r,i,a){var s=this.properties[e],o=i(s);t.removed()||null!=o&&o(n,r,t)&&a(s)},dc.checkZOrderTrigger=function(t,e,n,r){var i=this;this.checkTrigger(t,e,n,r,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},dc.checkBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},dc.checkConnectedEdgesBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkParallelEdgesBoundsTrigger=function(t,e,n,r){this.checkTrigger(t,e,n,r,function(t){return t.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkTriggers=function(t,e,n,r){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,n,r),this.checkBoundsTrigger(t,e,n,r),this.checkConnectedEdgesBoundsTrigger(t,e,n,r),this.checkParallelEdgesBoundsTrigger(t,e,n,r)};var fc={applyBypass:function(t,e,n,r){var i=[];if("*"===e||"**"===e){if(void 0!==n)for(var a=0;a<this.properties.length;a++){var s=this.properties[a].name,o=this.parse(s,n,!0);o&&i.push(o)}}else if(V(e)){var l=this.parse(e,n,!0);l&&i.push(l)}else{if(!Z(e))return!1;var c=e;r=n;for(var h=Object.keys(c),u=0;u<h.length;u++){var d=h[u],p=c[d];if(void 0===p&&(p=c[ct(d)]),void 0!==p){var f=this.parse(d,p,!0);f&&i.push(f)}}}if(0===i.length)return!1;for(var g=!1,m=0;m<t.length;m++){for(var y=t[m],v={},x=void 0,b=0;b<i.length;b++){var w=i[b];if(r){var T=y.pstyle(w.name);x=v[w.name]={prev:T}}g=this.applyParsedProperty(y,le(w))||g,r&&(x.next=y.pstyle(w.name))}g&&this.updateStyleHints(y),r&&this.updateTransitions(y,v,true)}return g},overrideBypass:function(t,e,n){e=lt(e);for(var r=0;r<t.length;r++){var i=t[r],a=i._private.style[e],s=this.properties[e].type,o=s.color,l=s.mutiple,c=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=o?"rgb("+n.join(",")+")":l?n.join(" "):""+n,this.updateStyleHints(i)):this.applyBypass(i,e,n),this.checkTriggers(i,e,c,n)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,n){for(var r=0;r<t.length;r++){for(var i=t[r],a={},s=0;s<e.length;s++){var o=e[s],l=this.properties[o],c=i.pstyle(l.name);if(c&&c.bypass){var h=this.parse(o,"",!0),u=a[l.name]={prev:c};this.applyParsedProperty(i,h),u.next=i.pstyle(l.name)}}this.updateStyleHints(i),n&&this.updateTransitions(i,a,true)}}},gc={getEmSizeInPixels:function(){var t=this.containerCss("font-size");return null!=t?parseFloat(t):1},containerCss:function(t){var e=this._private.cy,n=e.container(),r=e.window();if(r&&n&&r.getComputedStyle)return r.getComputedStyle(n).getPropertyValue(t)}},mc={getRenderedStyle:function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},getRawStyle:function(t,e){var n=this;if(t=t[0]){for(var r={},i=0;i<n.properties.length;i++){var a=n.properties[i],s=n.getStylePropertyValue(t,a.name,e);null!=s&&(r[a.name]=s,r[ct(a.name)]=s)}return r}},getIndexedStyle:function(t,e,n,r){var i=t.pstyle(e)[n][r];return null!=i?i:t.cy().style().getDefaultProperty(e)[n][0]},getStylePropertyValue:function(t,e,n){if(t=t[0]){var r=this.properties[e];r.alias&&(r=r.pointsTo);var i=r.type,a=t.pstyle(r.name);if(a){var s=a.value,o=a.units,l=a.strValue;if(n&&i.number&&null!=s&&Q(s)){var c=t.cy().zoom(),h=function(t){return t*c},u=function(t,e){return h(t)+e},d=X(s);return(d?o.every(function(t){return null!=t}):null!=o)?d?s.map(function(t,e){return u(t,o[e])}).join(" "):u(s,o):d?s.map(function(t){return V(t)?t:""+h(t)}).join(" "):""+h(s)}if(null!=l)return l}return null}},getAnimationStartStyle:function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r].name,a=t.pstyle(i);void 0!==a&&(a=Z(a)?this.parse(i,a.strValue):this.parse(i,a)),a&&(n[i]=a)}return n},getPropsList:function(t){var e=[],n=t,r=this.properties;if(n)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],o=n[s],l=r[s]||r[lt(s)],c=this.parse(l.name,o);c&&e.push(c)}return e},getNonDefaultPropertiesHash:function(t,e,n){var r,i,a,s,o,l,c=n.slice();for(o=0;o<e.length;o++)if(r=e[o],null!=(i=t.pstyle(r,!1)))if(null!=i.pfValue)c[0]=qt(s,c[0]),c[1]=Ut(s,c[1]);else for(a=i.strValue,l=0;l<a.length;l++)s=a.charCodeAt(l),c[0]=qt(s,c[0]),c[1]=Ut(s,c[1]);return c}};mc.getPropertiesHash=mc.getNonDefaultPropertiesHash;var yc={appendFromJson:function(t){for(var e=this,n=0;n<t.length;n++){var r=t[n],i=r.selector,a=r.style||r.css,s=Object.keys(a);e.selector(i);for(var o=0;o<s.length;o++){var l=s[o],c=a[l];e.css(l,c)}}return e},fromJson:function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},json:function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var n=this[e],r=n.selector,i=n.properties,a={},s=0;s<i.length;s++){var o=i[s];a[o.name]=o.strValue}t.push({selector:r?r.toString():"core",style:a})}return t}},vc={appendFromString:function(t){var e,n,r,i=this,a=""+t;function s(){a=a.length>e.length?a.substr(e.length):""}function o(){n=n.length>r.length?n.substr(r.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(a.match(/^\s*$/))break;var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){oe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}e=l[0];var c=l[1];if("core"!==c)if(new oo(c).invalid){oe("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();continue}var h=l[2],u=!1;n=h;for(var d=[];;){if(n.match(/^\s*$/))break;var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){oe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),u=!0;break}r=p[0];var f=p[1],g=p[2];if(this.properties[f])i.parse(f,g)?(d.push({name:f,val:g}),o()):(oe("Skipping property: Invalid property definition in: "+r),o());else oe("Skipping property: Invalid property name in: "+r),o()}if(u){s();break}i.selector(c);for(var m=0;m<d.length;m++){var y=d[m];i.css(y.name,y.val)}s()}return i},fromString:function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e}},xc={};!function(){var t=pt,e=gt,n=yt,r=function(t){return"^"+t+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},i=function(r){var i=t+"|\\w+|"+e+"|"+n+"|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},a=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];xc.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:r("data")},layoutData:{mapping:!0,regex:r("layoutData")},scratch:{mapping:!0,regex:r("scratch")},mapData:{mapping:!0,regex:i("mapData")},mapLayoutData:{mapping:!0,regex:i("mapLayoutData")},mapScratch:{mapping:!0,regex:i("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:a,singleRegexMatchValue:!0},urls:{regexes:a,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(t,e){switch(t.length){case 2:return"deg"!==e[0]&&"rad"!==e[0]&&"deg"!==e[1]&&"rad"!==e[1];case 1:return V(t[0])||"deg"===e[0]||"rad"===e[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(t){var e=t.length;return 1===e||2===e||4===e}}};var s={zeroNonZero:function(t,e){return(null==t||null==e)&&t!==e||(0==t&&0!=e||0!=t&&0==e)},any:function(t,e){return t!=e},emptyNonEmpty:function(t,e){var n=at(t),r=at(e);return n&&!r||!n&&r}},o=xc.types,l=[{name:"label",type:o.text,triggersBounds:s.any,triggersZOrder:s.emptyNonEmpty},{name:"text-rotation",type:o.textRotation,triggersBounds:s.any},{name:"text-margin-x",type:o.bidirectionalSize,triggersBounds:s.any},{name:"text-margin-y",type:o.bidirectionalSize,triggersBounds:s.any}],c=[{name:"source-label",type:o.text,triggersBounds:s.any},{name:"source-text-rotation",type:o.textRotation,triggersBounds:s.any},{name:"source-text-margin-x",type:o.bidirectionalSize,triggersBounds:s.any},{name:"source-text-margin-y",type:o.bidirectionalSize,triggersBounds:s.any},{name:"source-text-offset",type:o.size,triggersBounds:s.any}],h=[{name:"target-label",type:o.text,triggersBounds:s.any},{name:"target-text-rotation",type:o.textRotation,triggersBounds:s.any},{name:"target-text-margin-x",type:o.bidirectionalSize,triggersBounds:s.any},{name:"target-text-margin-y",type:o.bidirectionalSize,triggersBounds:s.any},{name:"target-text-offset",type:o.size,triggersBounds:s.any}],u=[{name:"font-family",type:o.fontFamily,triggersBounds:s.any},{name:"font-style",type:o.fontStyle,triggersBounds:s.any},{name:"font-weight",type:o.fontWeight,triggersBounds:s.any},{name:"font-size",type:o.size,triggersBounds:s.any},{name:"text-transform",type:o.textTransform,triggersBounds:s.any},{name:"text-wrap",type:o.textWrap,triggersBounds:s.any},{name:"text-overflow-wrap",type:o.textOverflowWrap,triggersBounds:s.any},{name:"text-max-width",type:o.size,triggersBounds:s.any},{name:"text-outline-width",type:o.size,triggersBounds:s.any},{name:"line-height",type:o.positiveNumber,triggersBounds:s.any}],d=[{name:"text-valign",type:o.valign,triggersBounds:s.any},{name:"text-halign",type:o.halign,triggersBounds:s.any},{name:"color",type:o.color},{name:"text-outline-color",type:o.color},{name:"text-outline-opacity",type:o.zeroOneNumber},{name:"text-background-color",type:o.color},{name:"text-background-opacity",type:o.zeroOneNumber},{name:"text-background-padding",type:o.size,triggersBounds:s.any},{name:"text-border-opacity",type:o.zeroOneNumber},{name:"text-border-color",type:o.color},{name:"text-border-width",type:o.size,triggersBounds:s.any},{name:"text-border-style",type:o.borderStyle,triggersBounds:s.any},{name:"text-background-shape",type:o.textBackgroundShape,triggersBounds:s.any},{name:"text-justification",type:o.justification},{name:"box-select-labels",type:o.bool,triggersBounds:s.any}],p=[{name:"events",type:o.bool,triggersZOrder:s.any},{name:"text-events",type:o.bool,triggersZOrder:s.any},{name:"box-selection",type:o.boxSelection,triggersZOrder:s.any}],f=[{name:"display",type:o.display,triggersZOrder:s.any,triggersBounds:s.any,triggersBoundsOfConnectedEdges:s.any,triggersBoundsOfParallelEdges:function(t,e,n){return t!==e&&"bezier"===n.pstyle("curve-style").value}},{name:"visibility",type:o.visibility,triggersZOrder:s.any},{name:"opacity",type:o.zeroOneNumber,triggersZOrder:s.zeroNonZero},{name:"text-opacity",type:o.zeroOneNumber},{name:"min-zoomed-font-size",type:o.size},{name:"z-compound-depth",type:o.zCompoundDepth,triggersZOrder:s.any},{name:"z-index-compare",type:o.zIndexCompare,triggersZOrder:s.any},{name:"z-index",type:o.number,triggersZOrder:s.any}],g=[{name:"overlay-padding",type:o.size,triggersBounds:s.any},{name:"overlay-color",type:o.color},{name:"overlay-opacity",type:o.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"overlay-shape",type:o.overlayShape,triggersBounds:s.any},{name:"overlay-corner-radius",type:o.cornerRadius}],m=[{name:"underlay-padding",type:o.size,triggersBounds:s.any},{name:"underlay-color",type:o.color},{name:"underlay-opacity",type:o.zeroOneNumber,triggersBounds:s.zeroNonZero},{name:"underlay-shape",type:o.overlayShape,triggersBounds:s.any},{name:"underlay-corner-radius",type:o.cornerRadius}],y=[{name:"transition-property",type:o.propList},{name:"transition-duration",type:o.time},{name:"transition-delay",type:o.time},{name:"transition-timing-function",type:o.easing}],v=function(t,e){return"label"===e.value?-t.poolIndex():e.pfValue},x=[{name:"height",type:o.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"width",type:o.nodeSize,triggersBounds:s.any,hashOverride:v},{name:"shape",type:o.nodeShape,triggersBounds:s.any},{name:"shape-polygon-points",type:o.polygonPointList,triggersBounds:s.any},{name:"corner-radius",type:o.cornerRadius},{name:"background-color",type:o.color},{name:"background-fill",type:o.fill},{name:"background-opacity",type:o.zeroOneNumber},{name:"background-blacken",type:o.nOneOneNumber},{name:"background-gradient-stop-colors",type:o.colors},{name:"background-gradient-stop-positions",type:o.percentages},{name:"background-gradient-direction",type:o.gradientDirection},{name:"padding",type:o.sizeMaybePercent,triggersBounds:s.any},{name:"padding-relative-to",type:o.paddingRelativeTo,triggersBounds:s.any},{name:"bounds-expansion",type:o.boundsExpansion,triggersBounds:s.any}],b=[{name:"border-color",type:o.color},{name:"border-opacity",type:o.zeroOneNumber},{name:"border-width",type:o.size,triggersBounds:s.any},{name:"border-style",type:o.borderStyle},{name:"border-cap",type:o.lineCap},{name:"border-join",type:o.lineJoin},{name:"border-dash-pattern",type:o.numbers},{name:"border-dash-offset",type:o.number},{name:"border-position",type:o.linePosition}],w=[{name:"outline-color",type:o.color},{name:"outline-opacity",type:o.zeroOneNumber},{name:"outline-width",type:o.size,triggersBounds:s.any},{name:"outline-style",type:o.borderStyle},{name:"outline-offset",type:o.size,triggersBounds:s.any}],T=[{name:"background-image",type:o.urls},{name:"background-image-crossorigin",type:o.bgCrossOrigin},{name:"background-image-opacity",type:o.zeroOneNumbers},{name:"background-image-containment",type:o.bgContainment},{name:"background-image-smoothing",type:o.bools},{name:"background-position-x",type:o.bgPos},{name:"background-position-y",type:o.bgPos},{name:"background-width-relative-to",type:o.bgRelativeTo},{name:"background-height-relative-to",type:o.bgRelativeTo},{name:"background-repeat",type:o.bgRepeat},{name:"background-fit",type:o.bgFit},{name:"background-clip",type:o.bgClip},{name:"background-width",type:o.bgWH},{name:"background-height",type:o.bgWH},{name:"background-offset-x",type:o.bgPos},{name:"background-offset-y",type:o.bgPos}],k=[{name:"position",type:o.position,triggersBounds:s.any},{name:"compound-sizing-wrt-labels",type:o.compoundIncludeLabels,triggersBounds:s.any},{name:"min-width",type:o.size,triggersBounds:s.any},{name:"min-width-bias-left",type:o.sizeMaybePercent,triggersBounds:s.any},{name:"min-width-bias-right",type:o.sizeMaybePercent,triggersBounds:s.any},{name:"min-height",type:o.size,triggersBounds:s.any},{name:"min-height-bias-top",type:o.sizeMaybePercent,triggersBounds:s.any},{name:"min-height-bias-bottom",type:o.sizeMaybePercent,triggersBounds:s.any}],E=[{name:"line-style",type:o.lineStyle},{name:"line-color",type:o.color},{name:"line-fill",type:o.fill},{name:"line-cap",type:o.lineCap},{name:"line-opacity",type:o.zeroOneNumber},{name:"line-dash-pattern",type:o.numbers},{name:"line-dash-offset",type:o.number},{name:"line-outline-width",type:o.size},{name:"line-outline-color",type:o.color},{name:"line-gradient-stop-colors",type:o.colors},{name:"line-gradient-stop-positions",type:o.percentages},{name:"curve-style",type:o.curveStyle,triggersBounds:s.any,triggersBoundsOfParallelEdges:function(t,e){return t!==e&&("bezier"===t||"bezier"===e)}},{name:"haystack-radius",type:o.zeroOneNumber,triggersBounds:s.any},{name:"source-endpoint",type:o.edgeEndpoint,triggersBounds:s.any},{name:"target-endpoint",type:o.edgeEndpoint,triggersBounds:s.any},{name:"control-point-step-size",type:o.size,triggersBounds:s.any},{name:"control-point-distances",type:o.bidirectionalSizes,triggersBounds:s.any},{name:"control-point-weights",type:o.numbers,triggersBounds:s.any},{name:"segment-distances",type:o.bidirectionalSizes,triggersBounds:s.any},{name:"segment-weights",type:o.numbers,triggersBounds:s.any},{name:"segment-radii",type:o.numbers,triggersBounds:s.any},{name:"radius-type",type:o.radiusType,triggersBounds:s.any},{name:"taxi-turn",type:o.bidirectionalSizeMaybePercent,triggersBounds:s.any},{name:"taxi-turn-min-distance",type:o.size,triggersBounds:s.any},{name:"taxi-direction",type:o.axisDirection,triggersBounds:s.any},{name:"taxi-radius",type:o.number,triggersBounds:s.any},{name:"edge-distances",type:o.edgeDistances,triggersBounds:s.any},{name:"arrow-scale",type:o.positiveNumber,triggersBounds:s.any},{name:"loop-direction",type:o.angle,triggersBounds:s.any},{name:"loop-sweep",type:o.angle,triggersBounds:s.any},{name:"source-distance-from-node",type:o.size,triggersBounds:s.any},{name:"target-distance-from-node",type:o.size,triggersBounds:s.any}],A=[{name:"ghost",type:o.bool,triggersBounds:s.any},{name:"ghost-offset-x",type:o.bidirectionalSize,triggersBounds:s.any},{name:"ghost-offset-y",type:o.bidirectionalSize,triggersBounds:s.any},{name:"ghost-opacity",type:o.zeroOneNumber}],_=[{name:"selection-box-color",type:o.color},{name:"selection-box-opacity",type:o.zeroOneNumber},{name:"selection-box-border-color",type:o.color},{name:"selection-box-border-width",type:o.size},{name:"active-bg-color",type:o.color},{name:"active-bg-opacity",type:o.zeroOneNumber},{name:"active-bg-size",type:o.size},{name:"outside-texture-bg-color",type:o.color},{name:"outside-texture-bg-opacity",type:o.zeroOneNumber}],C=[];xc.pieBackgroundN=16,C.push({name:"pie-size",type:o.sizeMaybePercent}),C.push({name:"pie-hole",type:o.sizeMaybePercent}),C.push({name:"pie-start-angle",type:o.angle});for(var S=1;S<=xc.pieBackgroundN;S++)C.push({name:"pie-"+S+"-background-color",type:o.color}),C.push({name:"pie-"+S+"-background-size",type:o.percent}),C.push({name:"pie-"+S+"-background-opacity",type:o.zeroOneNumber});var R=[];xc.stripeBackgroundN=16,R.push({name:"stripe-size",type:o.sizeMaybePercent}),R.push({name:"stripe-direction",type:o.axisDirectionPrimary});for(var L=1;L<=xc.stripeBackgroundN;L++)R.push({name:"stripe-"+L+"-background-color",type:o.color}),R.push({name:"stripe-"+L+"-background-size",type:o.percent}),R.push({name:"stripe-"+L+"-background-opacity",type:o.zeroOneNumber});var D=[],I=xc.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:o.arrowShape,triggersBounds:s.any},{name:"arrow-color",type:o.color},{name:"arrow-fill",type:o.arrowFill},{name:"arrow-width",type:o.arrowWidth}].forEach(function(t){I.forEach(function(e){var n=e+"-"+t.name,r=t.type,i=t.triggersBounds;D.push({name:n,type:r,triggersBounds:i})})},{});var N=xc.properties=[].concat(p,y,f,g,m,A,d,u,l,c,h,x,b,w,T,C,R,k,E,D,_),M=xc.propertyGroups={behavior:p,transition:y,visibility:f,overlay:g,underlay:m,ghost:A,commonLabel:d,labelDimensions:u,mainLabel:l,sourceLabel:c,targetLabel:h,nodeBody:x,nodeBorder:b,nodeOutline:w,backgroundImage:T,pie:C,stripe:R,compound:k,edgeLine:E,edgeArrow:D,core:_},O=xc.propertyGroupNames={};(xc.propertyGroupKeys=Object.keys(M)).forEach(function(t){O[t]=M[t].map(function(t){return t.name}),M[t].forEach(function(e){return e.groupKey=t})});var P=xc.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];xc.propertyNames=N.map(function(t){return t.name});for(var $=0;$<N.length;$++){var B=N[$];N[B.name]=B}for(var F=0;F<P.length;F++){var z=P[F],K=N[z.pointsTo],q={name:z.name,alias:!0,pointsTo:K};N.push(q),N[z.name]=q}}(),xc.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},xc.getDefaultProperties=function(){var t=this._private;if(null!=t.defaultProperties)return t.defaultProperties;for(var e=xt({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var n=1;n<=xc.pieBackgroundN;n++){var r=e.name.replace("{{i}}",n),i=e.value;t[r]=i}return t},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var n=1;n<=xc.stripeBackgroundN;n++){var r=e.name.replace("{{i}}",n),i=e.value;t[r]=i}return t},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(t,e){return xc.arrowPrefixes.forEach(function(n){var r=n+"-"+e.name,i=e.value;t[r]=i}),t},{})),n={},r=0;r<this.properties.length;r++){var i=this.properties[r];if(!i.pointsTo){var a=i.name,s=e[a],o=this.parse(a,s);n[a]=o}}return t.defaultProperties=n,t.defaultProperties},xc.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var bc={parse:function(t,e,n,r){var i=this;if(H(e))return i.parseImplWarn(t,e,n,r);var a,s=Vt(t,""+e,n?"t":"f","mapping"===r||!0===r||!1===r||null==r?"dontcare":r),o=i.propCache=i.propCache||[];return(a=o[s])||(a=o[s]=i.parseImplWarn(t,e,n,r)),(n||"mapping"===r)&&(a=le(a))&&(a.value=le(a.value)),a},parseImplWarn:function(t,e,n,r){var i=this.parseImpl(t,e,n,r);return i||null==e||oe("The style property `".concat(t,": ").concat(e,"` is invalid")),!i||"width"!==i.name&&"height"!==i.name||"label"!==e||oe("The style value of `label` is deprecated for `"+i.name+"`"),i}};bc.parseImpl=function(t,e,n,r){var i=this;t=lt(t);var a=i.properties[t],s=e,o=i.types;if(!a)return null;if(void 0===e)return null;a.alias&&(a=a.pointsTo,t=a.name);var l=V(e);l&&(e=e.trim());var c,h,u=a.type;if(!u)return null;if(n&&(""===e||null===e))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(H(e))return{name:t,value:e,strValue:"fn",mapped:o.fn,bypass:n};if(!l||r||e.length<7||"a"!==e[1]);else{if(e.length>=7&&"d"===e[0]&&(c=new RegExp(o.data.regex).exec(e))){if(n)return!1;var d=o.data;return{name:t,value:c,strValue:""+e,mapped:d,field:c[1],bypass:n}}if(e.length>=10&&"m"===e[0]&&(h=new RegExp(o.mapData.regex).exec(e))){if(n)return!1;if(u.multiple)return!1;var p=o.mapData;if(!u.color&&!u.number)return!1;var f=this.parse(t,h[4]);if(!f||f.mapped)return!1;var g=this.parse(t,h[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return oe("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+f.strValue+"`"),this.parse(t,f.strValue);if(u.color){var m=f.value,y=g.value;if(!(m[0]!==y[0]||m[1]!==y[1]||m[2]!==y[2]||m[3]!==y[3]&&(null!=m[3]&&1!==m[3]||null!=y[3]&&1!==y[3])))return!1}return{name:t,value:h,strValue:""+e,mapped:p,field:h[1],fieldMin:parseFloat(h[2]),fieldMax:parseFloat(h[3]),valueMin:f.value,valueMax:g.value,bypass:n}}}if(u.multiple&&"multiple"!==r){var v;if(v=l?e.split(/\s+/):X(e)?e:[e],u.evenMultiple&&v.length%2!=0)return null;for(var x=[],b=[],w=[],T="",k=!1,E=0;E<v.length;E++){var A=i.parse(t,v[E],n,"multiple");k=k||V(A.value),x.push(A.value),w.push(null!=A.pfValue?A.pfValue:A.value),b.push(A.units),T+=(E>0?" ":"")+A.strValue}return u.validate&&!u.validate(x,b)?null:u.singleEnum&&k?1===x.length&&V(x[0])?{name:t,value:x[0],strValue:x[0],bypass:n}:null:{name:t,value:x,pfValue:w,strValue:T,bypass:n,units:b}}var _,C,S=function(){for(var r=0;r<u.enums.length;r++){if(u.enums[r]===e)return{name:t,value:e,strValue:""+e,bypass:n}}return null};if(u.number){var R,L="px";if(u.units&&(R=u.units),u.implicitUnits&&(L=u.implicitUnits),!u.unitless)if(l){var D="px|em"+(u.allowPercent?"|\\%":"");R&&(D=R);var I=e.match("^("+pt+")("+D+")?$");I&&(e=I[1],R=I[2]||L)}else R&&!u.implicitUnits||(R=L);if(e=parseFloat(e),isNaN(e)&&void 0===u.enums)return null;if(isNaN(e)&&void 0!==u.enums)return e=s,S();if(u.integer&&(!Q(C=e)||Math.floor(C)!==C))return null;if(void 0!==u.min&&(e<u.min||u.strictMin&&e===u.min)||void 0!==u.max&&(e>u.max||u.strictMax&&e===u.max))return null;var N={name:t,value:e,strValue:""+e+(R||""),units:R,bypass:n};return u.unitless||"px"!==R&&"em"!==R?N.pfValue=e:N.pfValue="px"!==R&&R?this.getEmSizeInPixels()*e:e,"ms"!==R&&"s"!==R||(N.pfValue="ms"===R?e:1e3*e),"deg"!==R&&"rad"!==R||(N.pfValue="rad"===R?e:(_=e,Math.PI*_/180)),"%"===R&&(N.pfValue=e/100),N}if(u.propList){var M=[],O=""+e;if("none"===O);else{for(var P=O.split(/\s*,\s*|\s+/),$=0;$<P.length;$++){var B=P[$].trim();i.properties[B]?M.push(B):oe("`"+B+"` is not a valid property name")}if(0===M.length)return null}return{name:t,value:M,strValue:0===M.length?"none":M.join(" "),bypass:n}}if(u.color){var F=bt(e);return F?{name:t,value:F,pfValue:F,strValue:"rgb("+F[0]+","+F[1]+","+F[2]+")",bypass:n}:null}if(u.regex||u.regexes){if(u.enums){var z=S();if(z)return z}for(var K=u.regexes?u.regexes:[u.regex],q=0;q<K.length;q++){var U=new RegExp(K[q]).exec(e);if(U)return{name:t,value:u.singleRegexMatchValue?U[1]:U,strValue:""+e,bypass:n}}return null}return u.string?{name:t,value:""+e,strValue:""+e,bypass:n}:u.enums?S():null};var wc=function(t){if(!(this instanceof wc))return new wc(t);rt(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):ae("A style must have a core reference")},Tc=wc.prototype;Tc.instanceString=function(){return"style"},Tc.clear=function(){for(var t=this._private,e=t.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0),e.forEach(function(t){var e=t[0]._private;e.styleDirty=!0,e.appliedInitStyle=!1}),this},Tc.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Tc.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},Tc.selector=function(t){var e="core"===t?null:new oo(t),n=this.length++;return this[n]={selector:e,properties:[],mappedProperties:[],index:n},this},Tc.css=function(){var t=arguments;if(1===t.length)for(var e=t[0],n=0;n<this.properties.length;n++){var r=this.properties[n],i=e[r.name];void 0===i&&(i=e[ct(r.name)]),void 0!==i&&this.cssRule(r.name,i)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},Tc.style=Tc.css,Tc.cssRule=function(t,e){var n=this.parse(t,e);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.name.match(/stripe-(\d+)-background-size/)&&n.value&&(this._private.hasStripe=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},Tc.append=function(t){return it(t)?t.appendToStyle(this):X(t)?this.appendFromJson(t):V(t)&&this.appendFromString(t),this},wc.fromJson=function(t,e){var n=new wc(t);return n.fromJson(e),n},wc.fromString=function(t,e){return new wc(t).fromString(e)},[dc,fc,gc,mc,yc,vc,xc,bc].forEach(function(t){xt(Tc,t)}),wc.types=Tc.types,wc.properties=Tc.properties,wc.propertyGroups=Tc.propertyGroups,wc.propertyGroupNames=Tc.propertyGroupNames,wc.propertyGroupKeys=Tc.propertyGroupKeys;var kc={style:function(t){t&&this.setStyle(t).update();return this._private.style},setStyle:function(t){var e=this._private;return it(t)?e.style=t.generateStyle(this):X(t)?e.style=wc.fromJson(this,t):V(t)?e.style=wc.fromString(this,t):e.style=wc(this),e.style},updateStyle:function(){this.mutableElements().updateStyle()}},Ec={autolock:function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},autoungrabify:function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},autounselectify:function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},selectionType:function(t){var e=this._private;return null==e.selectionType&&(e.selectionType="single"),void 0===t?e.selectionType:("additive"!==t&&"single"!==t||(e.selectionType=t),this)},panningEnabled:function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},userPanningEnabled:function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},zoomingEnabled:function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},userZoomingEnabled:function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},boxSelectionEnabled:function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},pan:function(){var t,e,n,r,i,a=arguments,s=this._private.pan;switch(a.length){case 0:return s;case 1:if(V(a[0]))return s[t=a[0]];if(Z(a[0])){if(!this._private.panningEnabled)return this;r=(n=a[0]).x,i=n.y,Q(r)&&(s.x=r),Q(i)&&(s.y=i),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[1],"x"!==(t=a[0])&&"y"!==t||!Q(e)||(s[t]=e),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(t,e){var n,r,i,a,s,o=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(o.length){case 1:Z(t)&&(a=(i=o[0]).x,s=i.y,Q(a)&&(l.x+=a),Q(s)&&(l.y+=s),this.emit("pan viewport"));break;case 2:r=e,"x"!==(n=t)&&"y"!==n||!Q(r)||(l[n]+=r),this.emit("pan viewport")}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(t,e){var n=this.getFitViewport(t,e);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(t,e){if(Q(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n,r;if(V(t)){var i=t;t=this.$(i)}else if(Z(r=t)&&Q(r.x1)&&Q(r.x2)&&Q(r.y1)&&Q(r.y2)){var a=t;(n={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else tt(t)||(t=this.mutableElements());if(!tt(t)||!t.empty()){n=n||t.boundingBox();var s,o=this.width(),l=this.height();if(e=Q(e)?e:0,!isNaN(o)&&!isNaN(l)&&o>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:s=(s=(s=Math.min((o-2*e)/n.w,(l-2*e)/n.h))>this._private.maxZoom?this._private.maxZoom:s)<this._private.minZoom?this._private.minZoom:s,pan:{x:(o-s*(n.x1+n.x2))/2,y:(l-s*(n.y1+n.y2))/2}}}}},zoomRange:function(t,e){var n=this._private;if(null==e){var r=t;t=r.min,e=r.max}return Q(t)&&Q(e)&&t<=e?(n.minZoom=t,n.maxZoom=e):Q(t)&&void 0===e&&t<=n.maxZoom?n.minZoom=t:Q(e)&&void 0===t&&e>=n.minZoom&&(n.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,n,r=this._private,i=r.pan,a=r.zoom,s=!1;if(r.zoomingEnabled||(s=!0),Q(t)?n=t:Z(t)&&(n=t.level,null!=t.position?e=je(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||r.panningEnabled||(s=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)<r.minZoom?r.minZoom:n,s||!Q(n)||n===a||null!=e&&(!Q(e.x)||!Q(e.y)))return null;if(null!=e){var o=i,l=a,c=n;return{zoomed:!0,panned:!0,zoom:c,pan:{x:-c/l*(e.x-o.x)+e.x,y:-c/l*(e.y-o.y)+e.y}}}return{zoomed:!0,panned:!1,zoom:n,pan:i}},zoom:function(t){if(void 0===t)return this._private.zoom;var e=this.getZoomedViewport(t),n=this._private;return null!=e&&e.zoomed?(n.zoom=e.zoom,e.panned&&(n.pan.x=e.pan.x,n.pan.y=e.pan.y),this.emit("zoom"+(e.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(t){var e=this._private,n=!0,r=!0,i=[],a=!1,s=!1;if(!t)return this;if(Q(t.zoom)||(n=!1),Z(t.pan)||(r=!1),!n&&!r)return this;if(n){var o=t.zoom;o<e.minZoom||o>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=o,i.push("zoom"))}if(r&&(!a||!t.cancelOnFailedZoom)&&e.panningEnabled){var l=t.pan;Q(l.x)&&(e.pan.x=l.x,s=!1),Q(l.y)&&(e.pan.y=l.y,s=!1),s||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(V(t)){var n=t;t=this.mutableElements().filter(n)}else tt(t)||(t=this.mutableElements());if(0!==t.length){var r=t.boundingBox(),i=this.width(),a=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(r.x1+r.x2))/2,y:(a-e*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t,e,n=this._private,r=n.container,i=this;return n.sizeCache=n.sizeCache||(r?(t=i.window().getComputedStyle(r),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:r.clientWidth-e("padding-left")-e("padding-right"),height:r.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-t.x)/e,x2:(n.x2-t.x)/e,y1:(n.y1-t.y)/e,y2:(n.y2-t.y)/e};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Ec.centre=Ec.center,Ec.autolockNodes=Ec.autolock,Ec.autoungrabifyNodes=Ec.autoungrabify;var Ac={data:ks.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ks.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ks.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ks.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ac.attr=Ac.data,Ac.removeAttr=Ac.removeData;var _c=function(t){var e=this,n=(t=xt({},t)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=e;var a=void 0!==p&&void 0!==n&&!t.headless,s=t;s.layout=xt({name:a?"grid":"null"},s.layout),s.renderer=xt({name:a?"canvas":"null"},s.renderer);var o=function(t,e,n){return void 0!==e?e:void 0!==n?n:t},l=this._private={container:n,ready:!1,options:s,elements:new ql(this),listeners:[],aniEles:new ql(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:o(!0,s.zoomingEnabled),userZoomingEnabled:o(!0,s.userZoomingEnabled),panningEnabled:o(!0,s.panningEnabled),userPanningEnabled:o(!0,s.userPanningEnabled),boxSelectionEnabled:o(!0,s.boxSelectionEnabled),autolock:o(!1,s.autolock,s.autolockNodes),autoungrabify:o(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:o(!1,s.autounselectify),styleEnabled:void 0===s.styleEnabled?a:s.styleEnabled,zoom:Q(s.zoom)?s.zoom:1,pan:{x:Z(s.pan)&&Q(s.pan.x)?s.pan.x:0,y:Z(s.pan)&&Q(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:o(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});l.styleEnabled&&e.setStyle([]);var c=xt({},s,s.renderer);e.initRenderer(c);!function(t,e){if(t.some(st))return Zr.all(t).then(e);e(t)}([s.style,s.elements],function(t){var n=t[0],a=t[1];l.styleEnabled&&e.style().append(n),function(t,n,r){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(Z(t)||X(t))&&e.add(t),e.one("layoutready",function(t){e.notifications(!0),e.emit(t),e.one("load",n),e.emitAndNotify("load")}).one("layoutstop",function(){e.one("done",r),e.emit("done")});var a=xt({},e._private.options.layout);a.eles=e.elements(),e.layout(a).run()}(a,function(){e.startAnimationLoop(),l.ready=!0,H(s.ready)&&e.on("ready",s.ready);for(var t=0;t<i.length;t++){var n=i[t];e.on("ready",n)}r&&(r.readies=[]),e.emit("ready")},s.done)})},Cc=_c.prototype;xt(Cc,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},destroy:function(){var t=this;if(!t.destroyed())return t.stopAnimationLoop(),t.destroyRenderer(),this.emit("destroy"),t._private.destroyed=!0,t},hasElementWithId:function(t){return this._private.elements.hasElementWithId(t)},getElementById:function(t){return this._private.elements.getElementById(t)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(t){return this._private.elements.merge(t),this},removeFromPool:function(t){return this._private.elements.unmerge(t),this},container:function(){return this._private.container||null},window:function(){if(null==this._private.container)return p;var t=this._private.container.ownerDocument;return void 0===t||null==t?p:t.defaultView||p},mount:function(t){if(null!=t){var e=this,n=e._private,r=n.options;return!J(t)&&J(t[0])&&(t=t[0]),e.stopAnimationLoop(),e.destroyRenderer(),n.container=t,n.styleEnabled=!0,e.invalidateSize(),e.initRenderer(xt({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),e.startAnimationLoop(),e.style(r.style),e.emit("mount"),e}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:"null"}),t.emit("unmount"),t},options:function(){return le(this._private.options)},json:function(t){var e=this,n=e._private,r=e.mutableElements();if(Z(t)){if(e.startBatch(),t.elements){var i={},a=function(t,n){for(var r=[],a=[],s=0;s<t.length;s++){var o=t[s];if(o.data.id){var l=""+o.data.id,c=e.getElementById(l);i[l]=!0,0!==c.length?a.push({ele:c,json:o}):n?(o.group=n,r.push(o)):r.push(o)}else oe("cy.json() cannot handle elements without an ID attribute")}e.add(r);for(var h=0;h<a.length;h++){var u=a[h],d=u.ele,p=u.json;d.json(p)}};if(X(t.elements))a(t.elements);else for(var s=["nodes","edges"],o=0;o<s.length;o++){var l=s[o],c=t.elements[l];X(c)&&a(c,l)}var h=e.collection();r.filter(function(t){return!i[t.id()]}).forEach(function(t){t.isParent()?h.merge(t):t.remove()}),h.forEach(function(t){return t.children().move({parent:null})}),h.forEach(function(t){return function(t){return e.getElementById(t.id())}(t).remove()})}t.style&&e.style(t.style),null!=t.zoom&&t.zoom!==n.zoom&&e.zoom(t.zoom),t.pan&&(t.pan.x===n.pan.x&&t.pan.y===n.pan.y||e.pan(t.pan)),t.data&&e.data(t.data);for(var u=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],d=0;d<u.length;d++){var p=u[d];null!=t[p]&&e[p](t[p])}return e.endBatch(),this}var f={};!!t?f.elements=this.elements().map(function(t){return t.json()}):(f.elements={},r.forEach(function(t){var e=t.group();f.elements[e]||(f.elements[e]=[]),f.elements[e].push(t.json())})),this._private.styleEnabled&&(f.style=e.style().json()),f.data=le(e.data());var g=n.options;return f.zoomingEnabled=n.zoomingEnabled,f.userZoomingEnabled=n.userZoomingEnabled,f.zoom=n.zoom,f.minZoom=n.minZoom,f.maxZoom=n.maxZoom,f.panningEnabled=n.panningEnabled,f.userPanningEnabled=n.userPanningEnabled,f.pan=le(n.pan),f.boxSelectionEnabled=n.boxSelectionEnabled,f.renderer=le(g.renderer),f.hideEdgesOnViewport=g.hideEdgesOnViewport,f.textureOnViewport=g.textureOnViewport,f.wheelSensitivity=g.wheelSensitivity,f.motionBlur=g.motionBlur,f.multiClickDebounceTime=g.multiClickDebounceTime,f}}),Cc.$id=Cc.getElementById,[jl,nc,ac,sc,oc,lc,hc,uc,kc,Ec,Ac].forEach(function(t){xt(Cc,t)});var Sc={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}},Rc={maximal:!1,acyclic:!1},Lc=function(t){return t.scratch("breadthfirst")},Dc=function(t,e){return t.scratch("breadthfirst",e)};function Ic(t){this.options=xt({},Sc,Rc,t)}Ic.prototype.run=function(){var t,e=this.options,n=e.cy,r=e.eles,i=r.nodes().filter(function(t){return t.isChildless()}),a=r,s=e.directed,o=e.acyclic||e.maximal||e.maximalAdjustments>0,l=!!e.boundingBox,c=nn(l?e.boundingBox:structuredClone(n.extent()));if(tt(e.roots))t=e.roots;else if(X(e.roots)){for(var h=[],u=0;u<e.roots.length;u++){var d=e.roots[u],p=n.getElementById(d);h.push(p)}t=n.collection(h)}else if(V(e.roots))t=n.$(e.roots);else if(s)t=i.roots();else{var f=r.components();t=n.collection();for(var g=function(){var e=f[m],n=e.maxDegree(!1),r=e.filter(function(t){return t.degree(!1)===n});t=t.add(r)},m=0;m<f.length;m++)g()}var y=[],v={},x=function(t,e){null==y[e]&&(y[e]=[]);var n=y[e].length;y[e].push(t),Dc(t,{index:n,depth:e})};a.bfs({roots:t,directed:e.directed,visit:function(t,e,n,r,i){var a=t[0],s=a.id();a.isChildless()&&x(a,i),v[s]=!0}});for(var b=[],w=0;w<i.length;w++){var T=i[w];v[T.id()]||b.push(T)}var k=function(t){for(var e=y[t],n=0;n<e.length;n++){var r=e[n];null!=r?Dc(r,{depth:t,index:n}):(e.splice(n,1),n--)}},E=function(t,n){for(var i=Lc(t),a=t.incomers().filter(function(t){return t.isNode()&&r.has(t)}),s=-1,o=t.id(),l=0;l<a.length;l++){var c=a[l],h=Lc(c);s=Math.max(s,h.depth)}if(i.depth<=s){if(!e.acyclic&&n[o])return null;var u=s+1;return function(t,e){var n=Lc(t),r=n.depth,i=n.index;y[r][i]=null,t.isChildless()&&x(t,e)}(t,u),n[o]=u,!0}return!1};if(s&&o){var A=[],_={},C=function(t){return A.push(t)},S=function(){return A.shift()};for(i.forEach(function(t){return A.push(t)});A.length>0;){var R=S(),L=E(R,_);if(L)R.outgoers().filter(function(t){return t.isNode()&&r.has(t)}).forEach(C);else if(null===L){oe("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var D=0;if(e.avoidOverlap)for(var I=0;I<i.length;I++){var N=i[I].layoutDimensions(e),M=N.w,O=N.h;D=Math.max(D,M,O)}var P={},$=function(t){if(P[t.id()])return P[t.id()];for(var e=Lc(t).depth,n=t.neighborhood(),r=0,a=0,s=0;s<n.length;s++){var o=n[s];if(!o.isEdge()&&!o.isParent()&&i.has(o)){var l=Lc(o);if(null!=l){var c=l.index,h=l.depth;if(null!=c&&null!=h){var u=y[h].length;h<e&&(r+=c/u,a++)}}}}return r/=a=Math.max(1,a),0===a&&(r=0),P[t.id()]=r,r},B=function(t,e){var n=$(t)-$(e);return 0===n?vt(t.id(),e.id()):n};void 0!==e.depthSort&&(B=e.depthSort);for(var F=y.length,z=0;z<F;z++)y[z].sort(B),k(z);for(var K=[],q=0;q<b.length;q++)K.push(b[q]);K.length&&(y.unshift(K),F=y.length,function(){for(var t=0;t<F;t++)k(t)}());for(var U=0,j=0;j<F;j++)U=Math.max(y[j].length,U);var Y=c.x1+c.w/2,G=c.y1+c.h/2,W=i.reduce(function(t,n){return r=n.boundingBox({includeLabels:e.nodeDimensionsIncludeLabels}),{w:-1===t.w?r.w:(t.w+r.w)/2,h:-1===t.h?r.h:(t.h+r.h)/2};var r},{w:-1,h:-1}),H=Math.max(1===F?0:l?(c.h-2*e.padding-W.h)/(F-1):(c.h-2*e.padding-W.h)/(F+1),D),Z=y.reduce(function(t,e){return Math.max(t,e.length)},0),Q={downward:0,leftward:90,upward:180,rightward:-90};-1===Object.keys(Q).indexOf(e.direction)&&ae("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Q).join(", ")));return r.nodes().layoutPositions(this,e,function(t){return Xt(function(t){var n=Lc(t),r=n.depth,i=n.index;if(e.circle){var a=Math.min(c.w/2/F,c.h/2/F),s=(a=Math.max(a,D))*r+a-(F>0&&y[0].length<=3?a/2:0),o=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(s=1),{x:Y+s*Math.cos(o),y:G+s*Math.sin(o)}}var h=y[r].length,u=Math.max(1===h?0:l?(c.w-2*e.padding-W.w)/((e.grid?Z:h)-1):(c.w-2*e.padding-W.w)/((e.grid?Z:h)+1),D);return{x:Y+(i+1-(h+1)/2)*u,y:G+(r+1-(F+1)/2)*H}}(t),c,Q[e.direction])}),this};var Nc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Mc(t){this.options=xt({},Nc,t)}Mc.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,a=r.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s,o=nn(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=o.x1+o.w/2,c=o.y1+o.h/2,h=(void 0===e.sweep?2*Math.PI-2*Math.PI/a.length:e.sweep)/Math.max(1,a.length-1),u=0,d=0;d<a.length;d++){var p=a[d].layoutDimensions(e),f=p.w,g=p.h;u=Math.max(u,f,g)}if(s=Q(e.radius)?e.radius:a.length<=1?0:Math.min(o.h,o.w)/2-u,a.length>1&&e.avoidOverlap){u*=1.75;var m=Math.cos(h)-Math.cos(0),y=Math.sin(h)-Math.sin(0),v=Math.sqrt(u*u/(m*m+y*y));s=Math.max(v,s)}return r.nodes().layoutPositions(this,e,function(t,n){var r=e.startAngle+n*h*(i?1:-1),a=s*Math.cos(r),o=s*Math.sin(r);return{x:l+a,y:c+o}}),this};var Oc,Pc={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function $c(t){this.options=xt({},Pc,t)}$c.prototype.run=function(){for(var t=this.options,e=t,n=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,r=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=nn(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o=s.x1+s.w/2,l=s.y1+s.h/2,c=[],h=0,u=0;u<a.length;u++){var d,p=a[u];d=e.concentric(p),c.push({value:d,node:p}),p._private.scratch.concentric=d}a.updateStyle();for(var f=0;f<a.length;f++){var g=a[f].layoutDimensions(e);h=Math.max(h,g.w,g.h)}c.sort(function(t,e){return e.value-t.value});for(var m=e.levelWidth(a),y=[[]],v=y[0],x=0;x<c.length;x++){var b=c[x];if(v.length>0)Math.abs(v[0].value-b.value)>=m&&(v=[],y.push(v));v.push(b)}var w=h+e.minNodeSpacing;if(!e.avoidOverlap){var T=y.length>0&&y[0].length>1,k=(Math.min(s.w,s.h)/2-w)/(y.length+T?1:0);w=Math.min(w,k)}for(var E=0,A=0;A<y.length;A++){var _=y[A],C=void 0===e.sweep?2*Math.PI-2*Math.PI/_.length:e.sweep,S=_.dTheta=C/Math.max(1,_.length-1);if(_.length>1&&e.avoidOverlap){var R=Math.cos(S)-Math.cos(0),L=Math.sin(S)-Math.sin(0),D=Math.sqrt(w*w/(R*R+L*L));E=Math.max(D,E)}_.r=E,E+=w}if(e.equidistant){for(var I=0,N=0,M=0;M<y.length;M++){var O=y[M].r-N;I=Math.max(I,O)}N=0;for(var P=0;P<y.length;P++){var $=y[P];0===P&&(N=$.r),$.r=N,N+=I}}for(var B={},F=0;F<y.length;F++)for(var z=y[F],K=z.dTheta,q=z.r,U=0;U<z.length;U++){var j=z[U],Y=e.startAngle+(n?1:-1)*K*U,G={x:o+q*Math.cos(Y),y:l+q*Math.sin(Y)};B[j.node.id()]=G}return i.nodes().layoutPositions(this,e,function(t){var e=t.id();return B[e]}),this};var Bc={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,e){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(t){return 2048},nodeOverlap:4,idealEdgeLength:function(t){return 32},edgeElasticity:function(t){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Fc(t){this.options=xt({},Bc,t),this.options.layout=this;var e=this.options.eles.nodes(),n=this.options.eles.edges().filter(function(t){var n=t.source().data("id"),r=t.target().data("id"),i=e.some(function(t){return t.data("id")===n}),a=e.some(function(t){return t.data("id")===r});return!i||!a});this.options.eles=this.options.eles.not(n)}Fc.prototype.run=function(){var t=this.options,e=t.cy,n=this;n.stopped=!1,!0!==t.animate&&!1!==t.animate||n.emit({type:"layoutstart",layout:n}),Oc=!0===t.debug;var r=zc(e,n,t);Oc&&(void 0)(r),t.randomize&&Uc(r);var i=Bt(),a=function(){Yc(r,e,t),!0===t.fit&&e.fit(t.padding)},s=function(e){return!(n.stopped||e>=t.numIter)&&(Gc(r,t),r.temperature=r.temperature*t.coolingFactor,!(r.temperature<t.minTemp))},o=function(){if(!0===t.animate||!1===t.animate)a(),n.one("layoutstop",t.stop),n.emit({type:"layoutstop",layout:n});else{var e=t.eles.nodes(),i=jc(r,t,e);e.layoutPositions(n,t,i)}},l=0,c=!0;if(!0===t.animate){var h=function(){for(var e=0;c&&e<t.refresh;)c=s(l),l++,e++;c?(Bt()-i>=t.animationThreshold&&a(),$t(h)):(ih(r,t),o())};h()}else{for(;c;)c=s(l),l++;ih(r,t),o()}return this},Fc.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Fc.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var zc=function(t,e,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=nn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=n.eles.components(),l={},c=0;c<o.length;c++)for(var h=o[c],u=0;u<h.length;u++){l[h[u].id()]=c}for(c=0;c<s.nodeSize;c++){var d=(y=i[c]).layoutDimensions(n);(N={}).isLocked=y.locked(),N.id=y.data("id"),N.parentId=y.data("parent"),N.cmptId=l[y.id()],N.children=[],N.positionX=y.position("x"),N.positionY=y.position("y"),N.offsetX=0,N.offsetY=0,N.height=d.w,N.width=d.h,N.maxX=N.positionX+N.width/2,N.minX=N.positionX-N.width/2,N.maxY=N.positionY+N.height/2,N.minY=N.positionY-N.height/2,N.padLeft=parseFloat(y.style("padding")),N.padRight=parseFloat(y.style("padding")),N.padTop=parseFloat(y.style("padding")),N.padBottom=parseFloat(y.style("padding")),N.nodeRepulsion=H(n.nodeRepulsion)?n.nodeRepulsion(y):n.nodeRepulsion,s.layoutNodes.push(N),s.idToIndex[N.id]=c}var p=[],f=0,g=-1,m=[];for(c=0;c<s.nodeSize;c++){var y,v=(y=s.layoutNodes[c]).parentId;null!=v?s.layoutNodes[s.idToIndex[v]].children.push(y.id):(p[++g]=y.id,m.push(y.id))}for(s.graphSet.push(m);f<=g;){var x=p[f++],b=s.idToIndex[x],w=s.layoutNodes[b].children;if(w.length>0){s.graphSet.push(w);for(c=0;c<w.length;c++)p[++g]=w[c]}}for(c=0;c<s.graphSet.length;c++){var T=s.graphSet[c];for(u=0;u<T.length;u++){var k=s.idToIndex[T[u]];s.indexToGraph[k]=c}}for(c=0;c<s.edgeSize;c++){var E=r[c],A={};A.id=E.data("id"),A.sourceId=E.data("source"),A.targetId=E.data("target");var _=H(n.idealEdgeLength)?n.idealEdgeLength(E):n.idealEdgeLength,C=H(n.edgeElasticity)?n.edgeElasticity(E):n.edgeElasticity,S=s.idToIndex[A.sourceId],R=s.idToIndex[A.targetId];if(s.indexToGraph[S]!=s.indexToGraph[R]){for(var L=Kc(A.sourceId,A.targetId,s),D=s.graphSet[L],I=0,N=s.layoutNodes[S];-1===D.indexOf(N.id);)N=s.layoutNodes[s.idToIndex[N.parentId]],I++;for(N=s.layoutNodes[R];-1===D.indexOf(N.id);)N=s.layoutNodes[s.idToIndex[N.parentId]],I++;_*=I*n.nestingFactor}A.idealLength=_,A.elasticity=C,s.layoutEdges.push(A)}return s},Kc=function(t,e,n){var r=qc(t,e,0,n);return 2>r.count?0:r.graph},qc=function(t,e,n,r){var i=r.graphSet[n];if(-1<i.indexOf(t)&&-1<i.indexOf(e))return{count:2,graph:n};for(var a=0,s=0;s<i.length;s++){var o=i[s],l=r.idToIndex[o],c=r.layoutNodes[l].children;if(0!==c.length){var h=r.indexToGraph[r.idToIndex[c[0]]],u=qc(t,e,h,r);if(0!==u.count){if(1!==u.count)return u;if(2===++a)break}}}return{count:a,graph:n}},Uc=function(t,e){for(var n=t.clientWidth,r=t.clientHeight,i=0;i<t.nodeSize;i++){var a=t.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*n,a.positionY=Math.random()*r)}},jc=function(t,e,n){var r=t.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return e.boundingBox&&(n.forEach(function(e){var n=t.layoutNodes[t.idToIndex[e.data("id")]];i.x1=Math.min(i.x1,n.positionX),i.x2=Math.max(i.x2,n.positionX),i.y1=Math.min(i.y1,n.positionY),i.y2=Math.max(i.y2,n.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(n,a){var s=t.layoutNodes[t.idToIndex[n.data("id")]];if(e.boundingBox){var o=0===i.w?.5:(s.positionX-i.x1)/i.w,l=0===i.h?.5:(s.positionY-i.y1)/i.h;return{x:r.x1+o*r.w,y:r.y1+l*r.h}}return{x:s.positionX,y:s.positionY}}},Yc=function(t,e,n){var r=n.layout,i=n.eles.nodes(),a=jc(t,n,i);i.positions(a),!0!==t.ready&&(t.ready=!0,r.one("layoutready",n.ready),r.emit({type:"layoutready",layout:this}))},Gc=function(t,e,n){Wc(t,e),Qc(t),Jc(t,e),th(t),eh(t)},Wc=function(t,e){for(var n=0;n<t.graphSet.length;n++)for(var r=t.graphSet[n],i=r.length,a=0;a<i;a++)for(var s=t.layoutNodes[t.idToIndex[r[a]]],o=a+1;o<i;o++){var l=t.layoutNodes[t.idToIndex[r[o]]];Hc(s,l,t,e)}},Vc=function(t){return 2*t*Math.random()-1},Hc=function(t,e,n,r){if(t.cmptId===e.cmptId||n.isCompound){var i=e.positionX-t.positionX,a=e.positionY-t.positionY;0===i&&0===a&&(i=Vc(1),a=Vc(1));var s=Xc(t,e,i,a);if(s>0)var o=(c=r.nodeOverlap*s)*i/(g=Math.sqrt(i*i+a*a)),l=c*a/g;else{var c,h=Zc(t,i,a),u=Zc(e,-1*i,-1*a),d=u.x-h.x,p=u.y-h.y,f=d*d+p*p,g=Math.sqrt(f);o=(c=(t.nodeRepulsion+e.nodeRepulsion)/f)*d/g,l=c*p/g}t.isLocked||(t.offsetX-=o,t.offsetY-=l),e.isLocked||(e.offsetX+=o,e.offsetY+=l)}},Xc=function(t,e,n,r){if(n>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(r>0)var a=t.maxY-e.minY;else a=e.maxY-t.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Zc=function(t,e,n){var r=t.positionX,i=t.positionY,a=t.height||1,s=t.width||1,o=n/e,l=a/s,c={};return 0===e&&0<n||0===e&&0>n?(c.x=r,c.y=i+a/2,c):0<e&&-1*l<=o&&o<=l?(c.x=r+s/2,c.y=i+s*n/2/e,c):0>e&&-1*l<=o&&o<=l?(c.x=r-s/2,c.y=i-s*n/2/e,c):0<n&&(o<=-1*l||o>=l)?(c.x=r+a*e/2/n,c.y=i+a/2,c):0>n&&(o<=-1*l||o>=l)?(c.x=r-a*e/2/n,c.y=i-a/2,c):c},Qc=function(t,e){for(var n=0;n<t.edgeSize;n++){var r=t.layoutEdges[n],i=t.idToIndex[r.sourceId],a=t.layoutNodes[i],s=t.idToIndex[r.targetId],o=t.layoutNodes[s],l=o.positionX-a.positionX,c=o.positionY-a.positionY;if(0!==l||0!==c){var h=Zc(a,l,c),u=Zc(o,-1*l,-1*c),d=u.x-h.x,p=u.y-h.y,f=Math.sqrt(d*d+p*p),g=Math.pow(r.idealLength-f,2)/r.elasticity;if(0!==f)var m=g*d/f,y=g*p/f;else m=0,y=0;a.isLocked||(a.offsetX+=m,a.offsetY+=y),o.isLocked||(o.offsetX-=m,o.offsetY-=y)}}},Jc=function(t,e){if(0!==e.gravity)for(var n=0;n<t.graphSet.length;n++){var r=t.graphSet[n],i=r.length;if(0===n)var a=t.clientHeight/2,s=t.clientWidth/2;else{var o=t.layoutNodes[t.idToIndex[r[0]]],l=t.layoutNodes[t.idToIndex[o.parentId]];a=l.positionX,s=l.positionY}for(var c=0;c<i;c++){var h=t.layoutNodes[t.idToIndex[r[c]]];if(!h.isLocked){var u=a-h.positionX,d=s-h.positionY,p=Math.sqrt(u*u+d*d);if(p>1){var f=e.gravity*u/p,g=e.gravity*d/p;h.offsetX+=f,h.offsetY+=g}}}}},th=function(t,e){var n=[],r=0,i=-1;for(n.push.apply(n,t.graphSet[0]),i+=t.graphSet[0].length;r<=i;){var a=n[r++],s=t.idToIndex[a],o=t.layoutNodes[s],l=o.children;if(0<l.length&&!o.isLocked){for(var c=o.offsetX,h=o.offsetY,u=0;u<l.length;u++){var d=t.layoutNodes[t.idToIndex[l[u]]];d.offsetX+=c,d.offsetY+=h,n[++i]=l[u]}o.offsetX=0,o.offsetY=0}}},eh=function(t,e){for(var n=0;n<t.nodeSize;n++){0<(i=t.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(n=0;n<t.nodeSize;n++){if(!(0<(i=t.layoutNodes[n]).children.length||i.isLocked)){var r=nh(i.offsetX,i.offsetY,t.temperature);i.positionX+=r.x,i.positionY+=r.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,rh(i,t)}}for(n=0;n<t.nodeSize;n++){var i;0<(i=t.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},nh=function(t,e,n){var r=Math.sqrt(t*t+e*e);if(r>n)var i={x:n*t/r,y:n*e/r};else i={x:t,y:e};return i},rh=function(t,e){var n=t.parentId;if(null!=n){var r=e.layoutNodes[e.idToIndex[n]],i=!1;return(null==r.maxX||t.maxX+r.padRight>r.maxX)&&(r.maxX=t.maxX+r.padRight,i=!0),(null==r.minX||t.minX-r.padLeft<r.minX)&&(r.minX=t.minX-r.padLeft,i=!0),(null==r.maxY||t.maxY+r.padBottom>r.maxY)&&(r.maxY=t.maxY+r.padBottom,i=!0),(null==r.minY||t.minY-r.padTop<r.minY)&&(r.minY=t.minY-r.padTop,i=!0),i?rh(r,e):void 0}},ih=function(t,e){for(var n=t.layoutNodes,r=[],i=0;i<n.length;i++){var a=n[i],s=a.cmptId;(r[s]=r[s]||[]).push(a)}var o=0;for(i=0;i<r.length;i++){if(g=r[i]){g.x1=1/0,g.x2=-1/0,g.y1=1/0,g.y2=-1/0;for(var l=0;l<g.length;l++){var c=g[l];g.x1=Math.min(g.x1,c.positionX-c.width/2),g.x2=Math.max(g.x2,c.positionX+c.width/2),g.y1=Math.min(g.y1,c.positionY-c.height/2),g.y2=Math.max(g.y2,c.positionY+c.height/2)}g.w=g.x2-g.x1,g.h=g.y2-g.y1,o+=g.w*g.h}}r.sort(function(t,e){return e.w*e.h-t.w*t.h});var h=0,u=0,d=0,p=0,f=Math.sqrt(o)*t.clientWidth/t.clientHeight;for(i=0;i<r.length;i++){var g;if(g=r[i]){for(l=0;l<g.length;l++){(c=g[l]).isLocked||(c.positionX+=h-g.x1,c.positionY+=u-g.y1)}h+=g.w+e.componentSpacing,d+=g.w+e.componentSpacing,p=Math.max(p,g.h),d>f&&(u+=p+e.componentSpacing,h=0,d=0,p=0)}}},ah={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function sh(t){this.options=xt({},ah,t)}sh.prototype.run=function(){var t=this.options,e=t,n=t.cy,r=e.eles,i=r.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=nn(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,e,function(t){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),c=Math.round(a.w/a.h*o),h=function(t){if(null==t)return Math.min(l,c);Math.min(l,c)==l?l=t:c=t},u=function(t){if(null==t)return Math.max(l,c);Math.max(l,c)==l?l=t:c=t},d=e.rows,p=null!=e.cols?e.cols:e.columns;if(null!=d&&null!=p)l=d,c=p;else if(null!=d&&null==p)l=d,c=Math.ceil(s/l);else if(null==d&&null!=p)c=p,l=Math.ceil(s/c);else if(c*l>s){var f=h(),g=u();(f-1)*g>=s?h(f-1):(g-1)*f>=s&&u(g-1)}else for(;c*l<s;){var m=h(),y=u();(y+1)*m>=s?u(y+1):h(m+1)}var v=a.w/c,x=a.h/l;if(e.condense&&(v=0,x=0),e.avoidOverlap)for(var b=0;b<i.length;b++){var w=i[b],T=w._private.position;null!=T.x&&null!=T.y||(T.x=0,T.y=0);var k=w.layoutDimensions(e),E=e.avoidOverlapPadding,A=k.w+E,_=k.h+E;v=Math.max(v,A),x=Math.max(x,_)}for(var C={},S=function(t,e){return!!C["c-"+t+"-"+e]},R=function(t,e){C["c-"+t+"-"+e]=!0},L=0,D=0,I=function(){++D>=c&&(D=0,L++)},N={},M=0;M<i.length;M++){var O=i[M],P=e.position(O);if(P&&(void 0!==P.row||void 0!==P.col)){var $={row:P.row,col:P.col};if(void 0===$.col)for($.col=0;S($.row,$.col);)$.col++;else if(void 0===$.row)for($.row=0;S($.row,$.col);)$.row++;N[O.id()]=$,R($.row,$.col)}}i.layoutPositions(this,e,function(t,e){var n,r;if(t.locked()||t.isParent())return!1;var i=N[t.id()];if(i)n=i.col*v+v/2+a.x1,r=i.row*x+x/2+a.y1;else{for(;S(L,D);)I();n=D*v+v/2+a.x1,r=L*x+x/2+a.y1,R(L,D),I()}return{x:n,y:r}})}return this};var oh={ready:function(){},stop:function(){}};function lh(t){this.options=xt({},oh,t)}lh.prototype.run=function(){var t=this.options,e=t.eles,n=this;return t.cy,n.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),n.one("layoutready",t.ready),n.emit("layoutready"),n.one("layoutstop",t.stop),n.emit("layoutstop"),this},lh.prototype.stop=function(){return this};var ch={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function hh(t){this.options=xt({},ch,t)}hh.prototype.run=function(){var t=this.options,e=t.eles.nodes(),n=H(t.positions);return e.layoutPositions(this,t,function(e,r){var i=function(e){if(null==t.positions)return function(t){return{x:t.x,y:t.y}}(e.position());if(n)return t.positions(e);var r=t.positions[e._private.data.id];return null==r?null:r}(e);return!e.locked()&&null!=i&&i}),this};var uh={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function dh(t){this.options=xt({},uh,t)}dh.prototype.run=function(){var t=this.options,e=t.cy,n=t.eles,r=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()});return n.nodes().layoutPositions(this,t,function(t,e){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}}),this};var ph=[{name:"breadthfirst",impl:Ic},{name:"circle",impl:Mc},{name:"concentric",impl:$c},{name:"cose",impl:Fc},{name:"grid",impl:sh},{name:"null",impl:lh},{name:"preset",impl:hh},{name:"random",impl:dh}];function fh(t){this.options=t,this.notifications=0}var gh=function(){},mh=function(){throw new Error("A headless instance can not render images")};fh.prototype={recalculateRenderedStyle:gh,notify:function(){this.notifications++},init:gh,isHeadless:function(){return!0},png:mh,jpg:mh};var yh={arrowShapeWidth:.3,registerArrowShapes:function(){var t=this.arrowShapes={},e=this,n=function(t,e,n,r,i,a,s){var o=i.x-n/2-s,l=i.x+n/2+s,c=i.y-n/2-s,h=i.y+n/2+s;return o<=t&&t<=l&&c<=e&&e<=h},r=function(t,e,n,r,i){var a=t*Math.cos(r)-e*Math.sin(r),s=(t*Math.sin(r)+e*Math.cos(r))*n;return{x:a*n+i.x,y:s+i.y}},i=function(t,e,n,i){for(var a=[],s=0;s<t.length;s+=2){var o=t[s],l=t[s+1];a.push(r(o,l,e,n,i))}return a},a=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.x,r.y)}return e},s=function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").pfValue*2},o=function(r,o){V(o)&&(o=t[o]),t[r]=xt({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(t,e,n,r,s,o){var l=a(i(this.points,n+2*o,r,s));return bn(t,e,l)},roughCollide:n,draw:function(t,n,r,a){var s=i(this.points,n,r,a);e.arrowShapeImpl("polygon")(t,s)},spacing:function(t){return 0},gap:s},o)};o("none",{collide:ne,roughCollide:ne,draw:ie,spacing:re,gap:re}),o("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),o("arrow","triangle"),o("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(t,n,a,s,o){var l=i(this.points,n,a,s),c=this.controlPoint,h=r(c[0],c[1],n,a,s);e.arrowShapeImpl(this.name)(t,l,h)},gap:function(t){return.8*s(t)}}),o("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(t,e,n,r,s,o,l){var c=a(i(this.points,n+2*l,r,s)),h=a(i(this.pointsTee,n+2*l,r,s));return bn(t,e,c)||bn(t,e,h)},draw:function(t,n,r,a,s){var o=i(this.points,n,r,a),l=i(this.pointsTee,n,r,a);e.arrowShapeImpl(this.name)(t,o,l)}}),o("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(t,e,n,r,s,o,l){var c=s,h=Math.pow(c.x-t,2)+Math.pow(c.y-e,2)<=Math.pow((n+2*l)*this.radius,2),u=a(i(this.points,n+2*l,r,s));return bn(t,e,u)||h},draw:function(t,n,r,a,s){var o=i(this.pointsTr,n,r,a);e.arrowShapeImpl(this.name)(t,o,a.x,a.y,this.radius*n)},spacing:function(t){return e.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius}}),o("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(t,e){var n=this.baseCrossLinePts.slice(),r=e/t;return n[3]=n[3]-r,n[5]=n[5]-r,n},collide:function(t,e,n,r,s,o,l){var c=a(i(this.points,n+2*l,r,s)),h=a(i(this.crossLinePts(n,o),n+2*l,r,s));return bn(t,e,c)||bn(t,e,h)},draw:function(t,n,r,a,s){var o=i(this.points,n,r,a),l=i(this.crossLinePts(n,s),n,r,a);e.arrowShapeImpl(this.name)(t,o,l)}}),o("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(t){return.525*s(t)}}),o("circle",{radius:.15,collide:function(t,e,n,r,i,a,s){var o=i;return Math.pow(o.x-t,2)+Math.pow(o.y-e,2)<=Math.pow((n+2*s)*this.radius,2)},draw:function(t,n,r,i,a){e.arrowShapeImpl(this.name)(t,i.x,i.y,this.radius*n)},spacing:function(t){return e.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius}}),o("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(t){return 1},gap:function(t){return 1}}),o("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),o("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").value}}),o("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(t){return.95*t.pstyle("width").pfValue*t.pstyle("arrow-scale").value}})}},vh={projectIntoViewport:function(t,e){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],a=r[1],s=r[4],o=n.pan(),l=n.zoom();return[((t-i)/s-o.x)/l,((e-a)/s-o.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),n=this.cy.window().getComputedStyle(t),r=function(t){return parseFloat(n.getPropertyValue(t))},i=r("padding-left"),a=r("padding-right"),s=r("padding-top"),o=r("padding-bottom"),l=r("border-left-width"),c=r("border-right-width"),h=r("border-top-width"),u=(r("border-bottom-width"),t.clientWidth),d=t.clientHeight,p=i+a,f=s+o,g=l+c,m=e.width/(u+g),y=u-p,v=d-f,x=e.left+i+l,b=e.top+s+h;return this.containerBB=[x,b,y,v,m]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,n,r){return this.findNearestElements(t,e,n,r)[0]},findNearestElements:function(t,e,n,r){var i,a,s=this,o=this,l=o.getCachedZSortedEles(),c=[],h=o.cy.zoom(),u=o.cy.hasCompoundNodes(),d=(r?24:8)/h,p=(r?8:2)/h,f=(r?8:2)/h,g=1/0;function m(t,e){if(t.isNode()){if(a)return;a=t,c.push(t)}if(t.isEdge()&&(null==e||e<g))if(i){if(i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value)for(var n=0;n<c.length;n++)if(c[n].isEdge()){c[n]=t,i=t,g=null!=e?e:g;break}}else c.push(t),i=t,g=null!=e?e:g}function y(n){var r=n.outerWidth()+2*p,i=n.outerHeight()+2*p,a=r/2,l=i/2,c=n.position(),h="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,u=n._private.rscratch;if(c.x-a<=t&&t<=c.x+a&&c.y-l<=e&&e<=c.y+l&&o.nodeShapes[s.getNodeShape(n)].checkPoint(t,e,0,r,i,c.x,c.y,h,u))return m(n,0),!0}function v(n){var r,i=n._private,a=i.rscratch,l=n.pstyle("width").pfValue,h=n.pstyle("arrow-scale").value,p=l/2+d,f=p*p,g=2*p,v=i.source,x=i.target;if("segments"===a.edgeType||"straight"===a.edgeType||"haystack"===a.edgeType){for(var b=a.allpts,w=0;w+3<b.length;w+=2)if(mn(t,e,b[w],b[w+1],b[w+2],b[w+3],g)&&f>(r=xn(t,e,b[w],b[w+1],b[w+2],b[w+3])))return m(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(b=a.allpts,w=0;w+5<a.allpts.length;w+=4)if(yn(t,e,b[w],b[w+1],b[w+2],b[w+3],b[w+4],b[w+5],g)&&f>(r=vn(t,e,b[w],b[w+1],b[w+2],b[w+3],b[w+4],b[w+5])))return m(n,r),!0;v=v||i.source,x=x||i.target;var T=s.getArrowWidth(l,h),k=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w<k.length;w++){var E=k[w],A=o.arrowShapes[n.pstyle(E.name+"-arrow-shape").value],_=n.pstyle("width").pfValue;if(A.roughCollide(t,e,T,E.angle,{x:E.x,y:E.y},_,d)&&A.collide(t,e,T,E.angle,{x:E.x,y:E.y},_,d))return m(n),!0}u&&c.length>0&&(y(v),y(x))}function x(t,e,n){return ge(t,e,n)}function b(n,r){var i,a=n._private,s=f;i=r?r+"-":"",n.boundingBox();var o=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var c=x(a.rscratch,"labelX",r),h=x(a.rscratch,"labelY",r),u=x(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,g=o.x1-s-d,y=o.x2+s-d,v=o.y1-s-p,b=o.y2+s-p;if(u){var w=Math.cos(u),T=Math.sin(u),k=function(t,e){return{x:(t-=c)*w-(e-=h)*T+c,y:t*T+e*w+h}},E=k(g,v),A=k(g,b),_=k(y,v),C=k(y,b),S=[E.x+d,E.y+p,_.x+d,_.y+p,C.x+d,C.y+p,A.x+d,A.y+p];if(bn(t,e,S))return m(n),!0}else if(hn(o,t,e))return m(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var T=l[w];T.isNode()?y(T)||b(T):v(T)||b(T)||b(T,"source")||b(T,"target")}return c},getAllInBox:function(t,e,n,r){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),s=[],o=Math.min(t,n),c=Math.max(t,n),h=Math.min(e,r),u=Math.max(e,r),d=nn({x1:t=o,y1:e=h,x2:n=c,y2:r=u}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],f=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(t,e,n){return ge(t,e,n)}function m(t,e){var n=t._private,r=a;t.boundingBox();var i=n.labelBounds.main;if(!i)return null;var s=g(n.rscratch,"labelX",e),o=g(n.rscratch,"labelY",e),l=g(n.rscratch,"labelAngle",e),c=t.pstyle("text-margin-x").pfValue,h=t.pstyle("text-margin-y").pfValue,u=i.x1-r-c,d=i.x2+r-c,p=i.y1-r-h,f=i.y2+r-h;if(l){var m=Math.cos(l),y=Math.sin(l),v=function(t,e){return{x:(t-=s)*m-(e-=o)*y+s,y:t*y+e*m+o}};return[v(u,p),v(d,p),v(d,f),v(u,f)]}return[{x:u,y:p},{x:d,y:p},{x:d,y:f},{x:u,y:f}]}function y(t,e,n,r){function i(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}return i(t,n,r)!==i(e,n,r)&&i(t,e,n)!==i(t,e,r)}for(var v=0;v<i.length;v++){var x=i[v];if(x.isNode()){var b=x,w="yes"===b.pstyle("text-events").strValue,T=b.pstyle("box-selection").strValue,k="yes"===b.pstyle("box-select-labels").strValue;if("none"===T)continue;var E=("overlap"===T||k)&&w,A=b.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:E});if("contain"===T){var _=!1;if(k&&w){var C=m(b);C&&$n(C,p)&&(s.push(b),_=!0)}!_&&dn(d,A)&&s.push(b)}else if("overlap"===T&&cn(d,A)){var S=b.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1});if($n([{x:S.x1,y:S.y1},{x:S.x2,y:S.y1},{x:S.x2,y:S.y2},{x:S.x1,y:S.y2}],p))s.push(b);else{var R=m(b);R&&$n(R,p)&&s.push(b)}}}else{var L=x,D=L._private,I=D.rscratch,N=L.pstyle("box-selection").strValue;if("none"===N)continue;if("contain"===N){if(null!=I.startX&&null!=I.startY&&!hn(d,I.startX,I.startY))continue;if(null!=I.endX&&null!=I.endY&&!hn(d,I.endX,I.endY))continue;if("bezier"===I.edgeType||"multibezier"===I.edgeType||"self"===I.edgeType||"compound"===I.edgeType||"segments"===I.edgeType||"haystack"===I.edgeType){for(var M=D.rstyle.bezierPts||D.rstyle.linePts||D.rstyle.haystackPts,O=!0,P=0;P<M.length;P++)if(!un(d,M[P])){O=!1;break}O&&s.push(L)}else"straight"===I.edgeType&&s.push(L)}else if("overlap"===N){var $=!1;if(null!=I.startX&&null!=I.startY&&null!=I.endX&&null!=I.endY&&(hn(d,I.startX,I.startY)||hn(d,I.endX,I.endY)))s.push(L),$=!0;else if(!$&&"haystack"===I.edgeType)for(var B=D.rstyle.haystackPts,F=0;F<B.length;F++)if(un(d,B[F])){s.push(L),$=!0;break}if(!$){var z=D.rstyle.bezierPts||D.rstyle.linePts||D.rstyle.haystackPts;if((!z||z.length<2)&&"straight"===I.edgeType&&null!=I.startX&&null!=I.startY&&null!=I.endX&&null!=I.endY&&(z=[{x:I.startX,y:I.startY},{x:I.endX,y:I.endY}]),!z||z.length<2)continue;for(var K=0;K<z.length-1;K++){for(var q=z[K],U=z[K+1],j=0;j<f.length;j++){var Y=l(f[j],2);if(y(q,U,Y[0],Y[1])){s.push(L),$=!0;break}}if($)break}}}}}return s}},xh={calculateArrowAngles:function(t){var e,n,r,i,a,s,o=t._private.rscratch,l="haystack"===o.edgeType,c="bezier"===o.edgeType,h="multibezier"===o.edgeType,u="segments"===o.edgeType,d="compound"===o.edgeType,p="self"===o.edgeType;if(l?(r=o.haystackPts[0],i=o.haystackPts[1],a=o.haystackPts[2],s=o.haystackPts[3]):(r=o.arrowStartX,i=o.arrowStartY,a=o.arrowEndX,s=o.arrowEndY),g=o.midX,m=o.midY,u)e=r-o.segpts[0],n=i-o.segpts[1];else if(h||d||p||c){var f=o.allpts;e=r-Je(f[0],f[2],f[4],.1),n=i-Je(f[1],f[3],f[5],.1)}else e=r-g,n=i-m;o.srcArrowAngle=We(e,n);var g=o.midX,m=o.midY;if(l&&(g=(r+a)/2,m=(i+s)/2),e=a-r,n=s-i,u)if((f=o.allpts).length/2%2==0){var y=(A=f.length/2)-2;e=f[A]-f[y],n=f[A+1]-f[y+1]}else if(o.isRound)e=o.midVector[1],n=-o.midVector[0];else{y=(A=f.length/2-1)-2;e=f[A]-f[y],n=f[A+1]-f[y+1]}else if(h||d||p){var v,x,b,w,f=o.allpts;if(o.ctrlpts.length/2%2==0){var T=(k=(E=f.length/2-1)+2)+2;v=Je(f[E],f[k],f[T],0),x=Je(f[E+1],f[k+1],f[T+1],0),b=Je(f[E],f[k],f[T],1e-4),w=Je(f[E+1],f[k+1],f[T+1],1e-4)}else{var k,E;T=(k=f.length/2-1)+2;v=Je(f[E=k-2],f[k],f[T],.4999),x=Je(f[E+1],f[k+1],f[T+1],.4999),b=Je(f[E],f[k],f[T],.5),w=Je(f[E+1],f[k+1],f[T+1],.5)}e=b-v,n=w-x}if(o.midtgtArrowAngle=We(e,n),o.midDispX=e,o.midDispY=n,e*=-1,n*=-1,u)if((f=o.allpts).length/2%2==0);else if(!o.isRound){var A,_=(A=f.length/2-1)+2;e=-(f[_]-f[A]),n=-(f[_+1]-f[A+1])}if(o.midsrcArrowAngle=We(e,n),u)e=a-o.segpts[o.segpts.length-2],n=s-o.segpts[o.segpts.length-1];else if(h||d||p||c){var C=(f=o.allpts).length;e=a-Je(f[C-6],f[C-4],f[C-2],.9),n=s-Je(f[C-5],f[C-3],f[C-1],.9)}else e=a-g,n=s-m;o.tgtArrowAngle=We(e,n)}};xh.getArrowWidth=xh.getArrowHeight=function(t,e){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[t+", "+e];return r||(r=Math.max(Math.pow(13.37*t,.9),29)*e,n[t+", "+e]=r,r)};var bh,wh,Th,kh,Eh,Ah,_h,Ch,Sh,Rh,Lh,Dh,Ih,Nh,Mh,Oh,Ph,$h={},Bh={},Fh=function(t,e,n){n.x=e.x-t.x,n.y=e.y-t.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},zh=function(t,e,n,r,i){var a,s;if(t!==Ph?Fh(e,t,$h):((s=$h).x=-1*(a=Bh).x,s.y=-1*a.y,s.nx=-1*a.nx,s.ny=-1*a.ny,s.ang=a.ang>0?-(Math.PI-a.ang):Math.PI+a.ang),Fh(e,n,Bh),Th=$h.nx*Bh.ny-$h.ny*Bh.nx,kh=$h.nx*Bh.nx-$h.ny*-Bh.ny,_h=Math.asin(Math.max(-1,Math.min(1,Th))),Math.abs(_h)<1e-6)return bh=e.x,wh=e.y,void(Sh=Lh=0);Eh=1,Ah=!1,kh<0?_h<0?_h=Math.PI+_h:(_h=Math.PI-_h,Eh=-1,Ah=!0):_h>0&&(Eh=-1,Ah=!0),Lh=void 0!==e.radius?e.radius:r,Ch=_h/2,Dh=Math.min($h.len/2,Bh.len/2),i?(Rh=Math.abs(Math.cos(Ch)*Lh/Math.sin(Ch)))>Dh?(Rh=Dh,Sh=Math.abs(Rh*Math.sin(Ch)/Math.cos(Ch))):Sh=Lh:(Rh=Math.min(Dh,Lh),Sh=Math.abs(Rh*Math.sin(Ch)/Math.cos(Ch))),Mh=e.x+Bh.nx*Rh,Oh=e.y+Bh.ny*Rh,bh=Mh-Bh.ny*Sh*Eh,wh=Oh+Bh.nx*Sh*Eh,Ih=e.x+$h.nx*Rh,Nh=e.y+$h.ny*Rh,Ph=e};function Kh(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function qh(t,e,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(zh(t,e,n,r,i),{cx:bh,cy:wh,radius:Sh,startX:Ih,startY:Nh,stopX:Mh,stopY:Oh,startAngle:$h.ang+Math.PI/2*Eh,endAngle:Bh.ang-Math.PI/2*Eh,counterClockwise:Ah})}var Uh=.01,jh=Math.sqrt(.02),Yh={};function Gh(t){var e=[];if(null!=t){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e.push({x:r,y:i})}return e}}Yh.findMidptPtsEtc=function(t,e){var n,r=e.posPts,i=e.intersectionPts,a=e.vectorNormInverse,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),c=null!=s.units&&null!=o.units;switch(t.pstyle("edge-distances").value){case"node-position":n=r;break;case"intersection":n=i;break;case"endpoints":if(c){var h=l(this.manualEndptToPx(t.source()[0],s),2),u=h[0],d=h[1],p=l(this.manualEndptToPx(t.target()[0],o),2),f=p[0],g=p[1],m={x1:u,y1:d,x2:f,y2:g};a=function(t,e,n,r){var i=r-e,a=n-t,s=Math.sqrt(a*a+i*i);return{x:-i/s,y:a/s}}(u,d,f,g),n=m}else oe("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),n=i}return{midptPts:n,vectorNormInverse:a}},Yh.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=n._private,i=r.rscratch;if(!i.haystack){var a=2*Math.random()*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=2*Math.random()*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var s=r.source,o=r.target,l=s.position(),c=o.position(),h=s.width(),u=o.width(),d=s.height(),p=o.height(),f=n.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*h*f+l.x,i.source.y*d*f+l.y,i.target.x*u*f+c.x,i.target.y*p*f+c.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},Yh.findSegmentsPoints=function(t,e){var n=t._private.rscratch,r=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),o=Math.min(r.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=s.pfValue[s.pfValue.length-1];n.edgeType="segments",n.segpts=[],n.radii=[],n.isArcRadius=[];for(var h=0;h<o;h++){var u=r.pfValue[h],d=i.pfValue[h],p=1-u,f=u,g=this.findMidptPtsEtc(t,e),m=g.midptPts,y=g.vectorNormInverse,v={x:m.x1*p+m.x2*f,y:m.y1*p+m.y2*f};n.segpts.push(v.x+y.x*d,v.y+y.y*d),n.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),n.isArcRadius.push("arc-radius"===(void 0!==s.pfValue[h]?s.pfValue[h]:c))}},Yh.findLoopPoints=function(t,e,n,r){var i=t._private.rscratch,a=e.dirCounts,s=e.srcPos,o=t.pstyle("control-point-distances"),l=o?o.pfValue[0]:void 0,c=t.pstyle("loop-direction").pfValue,h=t.pstyle("loop-sweep").pfValue,u=t.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=n,p=u;r&&(d=0,p=l);var f=c-Math.PI/2,g=f-h/2,m=f+h/2,y=String(c+"_"+h);d=void 0===a[y]?a[y]=0:++a[y],i.ctrlpts=[s.x+1.4*Math.cos(g)*p*(d/3+1),s.y+1.4*Math.sin(g)*p*(d/3+1),s.x+1.4*Math.cos(m)*p*(d/3+1),s.y+1.4*Math.sin(m)*p*(d/3+1)]},Yh.findCompoundLoopPoints=function(t,e,n,r){var i=t._private.rscratch;i.edgeType="compound";var a=e.srcPos,s=e.tgtPos,o=e.srcW,l=e.srcH,c=e.tgtW,h=e.tgtH,u=t.pstyle("control-point-step-size").pfValue,d=t.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,f=n,g=u;r&&(f=0,g=p);var m={x:a.x-o/2,y:a.y-l/2},y={x:s.x-c/2,y:s.y-h/2},v={x:Math.min(m.x,y.x),y:Math.min(m.y,y.y)},x=Math.max(.5,Math.log(o*Uh)),b=Math.max(.5,Math.log(c*Uh));i.ctrlpts=[v.x,v.y-(1+Math.pow(50,1.12)/100)*g*(f/3+1)*x,v.x-(1+Math.pow(50,1.12)/100)*g*(f/3+1)*b,v.y]},Yh.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Yh.findBezierPoints=function(t,e,n,r,i){var a=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),l=t.pstyle("control-point-weights"),c=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,u=l.value[0],d=r;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var f=(.5-e.eles.length/2+n)*s*(i?-1:1),g=void 0,m=He(f);d&&(h=o?o.pfValue[p]:s,u=l.value[p]);var y=void 0!==(g=r?h:void 0!==h?m*h:void 0)?g:f,v=1-u,x=u,b=this.findMidptPtsEtc(t,e),w=b.midptPts,T=b.vectorNormInverse,k={x:w.x1*v+w.x2*x,y:w.y1*v+w.y2*x};a.ctrlpts.push(k.x+T.x*y,k.y+T.y*y)}},Yh.findTaxiPoints=function(t,e){var n=t._private.rscratch;n.edgeType="segments";var r="vertical",i="horizontal",a="leftward",s="rightward",o="downward",l="upward",c=e.posPts,h=e.srcW,u=e.srcH,d=e.tgtW,p=e.tgtH,f="node-position"!==t.pstyle("edge-distances").value,g=t.pstyle("taxi-direction").value,m=g,y=t.pstyle("taxi-turn"),v="%"===y.units,x=y.pfValue,b=x<0,w=t.pstyle("taxi-turn-min-distance").pfValue,T=f?(h+d)/2:0,k=f?(u+p)/2:0,E=c.x2-c.x1,A=c.y2-c.y1,_=function(t,e){return t>0?Math.max(t-e,0):Math.min(t+e,0)},C=_(E,T),S=_(A,k),R=!1;"auto"===m?g=Math.abs(C)>Math.abs(S)?i:r:m===l||m===o?(g=r,R=!0):m!==a&&m!==s||(g=i,R=!0);var L,D=g===r,I=D?S:C,N=D?A:E,M=He(N),O=!1;(R&&(v||b)||!(m===o&&N<0||m===l&&N>0||m===a&&N>0||m===s&&N<0)||(I=(M*=-1)*Math.abs(I),O=!0),v)?L=(x<0?1+x:x)*I:L=(x<0?I:0)+x*M;var P=function(t){return Math.abs(t)<w||Math.abs(t)>=Math.abs(I)},$=P(L),B=P(Math.abs(I)-Math.abs(L));if(($||B)&&!O)if(D){var F=Math.abs(N)<=u/2,z=Math.abs(E)<=d/2;if(F){var K=(c.x1+c.x2)/2,q=c.y1,U=c.y2;n.segpts=[K,q,K,U]}else if(z){var j=(c.y1+c.y2)/2,Y=c.x1,G=c.x2;n.segpts=[Y,j,G,j]}else n.segpts=[c.x1,c.y2]}else{var W=Math.abs(N)<=h/2,V=Math.abs(A)<=p/2;if(W){var H=(c.y1+c.y2)/2,X=c.x1,Z=c.x2;n.segpts=[X,H,Z,H]}else if(V){var Q=(c.x1+c.x2)/2,J=c.y1,tt=c.y2;n.segpts=[Q,J,Q,tt]}else n.segpts=[c.x2,c.y1]}else if(D){var et=c.y1+L+(f?u/2*M:0),nt=c.x1,rt=c.x2;n.segpts=[nt,et,rt,et]}else{var it=c.x1+L+(f?h/2*M:0),at=c.y1,st=c.y2;n.segpts=[it,at,it,st]}if(n.isRound){var ot=t.pstyle("taxi-radius").value,lt="arc-radius"===t.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(ot),n.isArcRadius=new Array(n.segpts.length/2).fill(lt)}},Yh.tryToCorrectInvalidPoints=function(t,e){var n=t._private.rscratch;if("bezier"===n.edgeType){var r=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,c=e.srcShape,h=e.tgtShape,u=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,f=e.tgtRs,g=!Q(n.startX)||!Q(n.startY),m=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),v=!Q(n.arrowEndX)||!Q(n.arrowEndY),x=3*(this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth),b=Xe({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=b<x,T=Xe({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),k=T<x,E=!1;if(g||m||w){E=!0;var A={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},_=Math.sqrt(A.x*A.x+A.y*A.y),C={x:A.x/_,y:A.y/_},S=Math.max(a,s),R={x:n.ctrlpts[0]+2*C.x*S,y:n.ctrlpts[1]+2*C.y*S},L=c.intersectLine(r.x,r.y,a,s,R.x,R.y,0,u,p);w?(n.ctrlpts[0]=n.ctrlpts[0]+C.x*(x-b),n.ctrlpts[1]=n.ctrlpts[1]+C.y*(x-b)):(n.ctrlpts[0]=L[0]+C.x*x,n.ctrlpts[1]=L[1]+C.y*x)}if(y||v||k){E=!0;var D={x:n.ctrlpts[0]-i.x,y:n.ctrlpts[1]-i.y},I=Math.sqrt(D.x*D.x+D.y*D.y),N={x:D.x/I,y:D.y/I},M=Math.max(a,s),O={x:n.ctrlpts[0]+2*N.x*M,y:n.ctrlpts[1]+2*N.y*M},P=h.intersectLine(i.x,i.y,o,l,O.x,O.y,0,d,f);k?(n.ctrlpts[0]=n.ctrlpts[0]+N.x*(x-T),n.ctrlpts[1]=n.ctrlpts[1]+N.y*(x-T)):(n.ctrlpts[0]=P[0]+N.x*x,n.ctrlpts[1]=P[1]+N.y*x)}E&&this.findEndpoints(t)}},Yh.storeAllpts=function(t){var e=t._private.rscratch;if("multibezier"===e.edgeType||"bezier"===e.edgeType||"self"===e.edgeType||"compound"===e.edgeType){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var n=0;n+1<e.ctrlpts.length;n+=2)e.allpts.push(e.ctrlpts[n],e.ctrlpts[n+1]),n+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[n]+e.ctrlpts[n+2])/2,(e.ctrlpts[n+1]+e.ctrlpts[n+3])/2);var r;e.allpts.push(e.endX,e.endY),e.ctrlpts.length/2%2==0?(r=e.allpts.length/2-1,e.midX=e.allpts[r],e.midY=e.allpts[r+1]):(r=e.allpts.length/2-3,e.midX=Je(e.allpts[r],e.allpts[r+2],e.allpts[r+4],.5),e.midY=Je(e.allpts[r+1],e.allpts[r+3],e.allpts[r+5],.5))}else if("straight"===e.edgeType)e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if("segments"===e.edgeType){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var a=e.radii[i/2-1],s=e.isArcRadius[i/2-1];e.roundCorners.push(qh({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:a},{x:e.allpts[i+2],y:e.allpts[i+3]},a,s))}}if(e.segpts.length%4==0){var o=e.segpts.length/2,l=o-2;e.midX=(e.segpts[l]+e.segpts[o])/2,e.midY=(e.segpts[l+1]+e.segpts[o+1])/2}else{var c=e.segpts.length/2-1;if(e.isRound){var h={x:e.segpts[c],y:e.segpts[c+1]},u=e.roundCorners[c/2];if(0===u.radius){var d={x:e.segpts[c+2],y:e.segpts[c+3]};e.midX=h.x,e.midY=h.y,e.midVector=[h.y-d.y,d.x-h.x]}else{var p=[h.x-u.cx,h.y-u.cy],f=u.radius/Math.sqrt(Math.pow(p[0],2)+Math.pow(p[1],2));p=p.map(function(t){return t*f}),e.midX=u.cx+p[0],e.midY=u.cy+p[1],e.midVector=p}}else e.midX=e.segpts[c],e.midY=e.segpts[c+1]}}},Yh.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||Q(e.startX)&&Q(e.startY)&&Q(e.endX)&&Q(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,oe("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Yh.findEdgeControlPoints=function(t){var e=this;if(t&&0!==t.length){for(var n=this,r=n.cy.hasCompoundNodes(),i=new ye,a=function(t,e){return[].concat(c(t),[e?1:0]).join("-")},s=[],o=[],l=0;l<t.length;l++){var h=t[l],u=h._private,d=h.pstyle("curve-style").value;if(!h.removed()&&h.takesUpSpace())if("haystack"!==d){var p="unbundled-bezier"===d||dt(d,"segments")||"straight"===d||"straight-triangle"===d||dt(d,"taxi"),f="unbundled-bezier"===d||"bezier"===d,g=u.source,m=u.target,y=[g.poolIndex(),m.poolIndex()].sort(),v=a(y,p),x=i.get(v);null==x&&(x={eles:[]},s.push({pairId:y,edgeIsUnbundled:p}),i.set(v,x)),x.eles.push(h),p&&(x.hasUnbundled=!0),f&&(x.hasBezier=!0)}else o.push(h)}for(var b=function(){var t,o=s[w],l=o.pairId,c=o.edgeIsUnbundled,h=a(l,c),u=i.get(h);if(!u.hasUnbundled){var d=u.eles[0].parallelEdges().filter(function(t){return t.isBundledBezier()});fe(u.eles),d.forEach(function(t){return u.eles.push(t)}),u.eles.sort(function(t,e){return t.poolIndex()-e.poolIndex()})}var p=u.eles[0],f=p.source(),g=p.target();if(f.poolIndex()>g.poolIndex()){var m=f;f=g,g=m}var y=u.srcPos=f.position(),v=u.tgtPos=g.position(),x=u.srcW=f.outerWidth(),b=u.srcH=f.outerHeight(),T=u.tgtW=g.outerWidth(),k=u.tgtH=g.outerHeight(),E=u.srcShape=n.nodeShapes[e.getNodeShape(f)],A=u.tgtShape=n.nodeShapes[e.getNodeShape(g)],_=u.srcCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,C=u.tgtCornerRadius="auto"===g.pstyle("corner-radius").value?"auto":g.pstyle("corner-radius").pfValue,S=u.tgtRs=g._private.rscratch,R=u.srcRs=f._private.rscratch;u.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var L=0;L<u.eles.length;L++){var D=u.eles[L],I=D[0]._private.rscratch,N=D.pstyle("curve-style").value,M="unbundled-bezier"===N||dt(N,"segments")||dt(N,"taxi"),O=!f.same(D.source());if(!u.calculatedIntersection&&f!==g&&(u.hasBezier||u.hasUnbundled)){u.calculatedIntersection=!0;var P=E.intersectLine(y.x,y.y,x,b,v.x,v.y,0,_,R),$=u.srcIntn=P,B=A.intersectLine(v.x,v.y,T,k,y.x,y.y,0,C,S),F=u.tgtIntn=B,z=u.intersectionPts={x1:P[0],x2:B[0],y1:P[1],y2:B[1]},K=u.posPts={x1:y.x,x2:v.x,y1:y.y,y2:v.y},q=B[1]-P[1],U=B[0]-P[0],j=Math.sqrt(U*U+q*q);Q(j)&&j>=jh||(j=Math.sqrt(Math.max(U*U,Uh)+Math.max(q*q,Uh)));var Y=u.vector={x:U,y:q},G=u.vectorNorm={x:Y.x/j,y:Y.y/j},W={x:-G.y,y:G.x};u.nodesOverlap=!Q(j)||A.checkPoint(P[0],P[1],0,T,k,v.x,v.y,C,S)||E.checkPoint(B[0],B[1],0,x,b,y.x,y.y,_,R),u.vectorNormInverse=W,t={nodesOverlap:u.nodesOverlap,dirCounts:u.dirCounts,calculatedIntersection:!0,hasBezier:u.hasBezier,hasUnbundled:u.hasUnbundled,eles:u.eles,srcPos:v,srcRs:S,tgtPos:y,tgtRs:R,srcW:T,srcH:k,tgtW:x,tgtH:b,srcIntn:F,tgtIntn:$,srcShape:A,tgtShape:E,posPts:{x1:K.x2,y1:K.y2,x2:K.x1,y2:K.y1},intersectionPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},vector:{x:-Y.x,y:-Y.y},vectorNorm:{x:-G.x,y:-G.y},vectorNormInverse:{x:-W.x,y:-W.y}}}var V=O?t:u;I.nodesOverlap=V.nodesOverlap,I.srcIntn=V.srcIntn,I.tgtIntn=V.tgtIntn,I.isRound=N.startsWith("round"),r&&(f.isParent()||f.isChild()||g.isParent()||g.isChild())&&(f.parents().anySame(g)||g.parents().anySame(f)||f.same(g)&&f.isParent())?e.findCompoundLoopPoints(D,V,L,M):f===g?e.findLoopPoints(D,V,L,M):N.endsWith("segments")?e.findSegmentsPoints(D,V):N.endsWith("taxi")?e.findTaxiPoints(D,V):"straight"===N||!M&&u.eles.length%2==1&&L===Math.floor(u.eles.length/2)?e.findStraightEdgePoints(D):e.findBezierPoints(D,V,L,M,O),e.findEndpoints(D),e.tryToCorrectInvalidPoints(D,V),e.checkForInvalidEdgeWarning(D),e.storeAllpts(D),e.storeEdgeProjections(D),e.calculateArrowAngles(D),e.recalculateEdgeLabelProjections(D),e.calculateLabelAngles(D)}},w=0;w<s.length;w++)b();this.findHaystackPoints(o)}},Yh.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"segments"===e.edgeType)return Gh(e.segpts)},Yh.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var n=e.edgeType;if("bezier"===n||"multibezier"===n||"self"===n||"compound"===n)return Gh(e.ctrlpts)},Yh.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var Wh={manualEndptToPx:function(t,e){var n=t.position(),r=t.outerWidth(),i=t.outerHeight(),a=t._private.rscratch;if(2===e.value.length){var s=[e.pfValue[0],e.pfValue[1]];return"%"===e.units[0]&&(s[0]=s[0]*r),"%"===e.units[1]&&(s[1]=s[1]*i),s[0]+=n.x,s[1]+=n.y,s}var o=e.pfValue[0];o=-Math.PI/2+o;var l=2*Math.max(r,i),c=[n.x+Math.cos(o)*l,n.y+Math.sin(o)*l];return this.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,r,i,c[0],c[1],0,"auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,a)},findEndpoints:function(t){var e,n,r,i,a,s,o,l,c,h=this,u=t.source()[0],d=t.target()[0],p=u.position(),f=d.position(),g=t.pstyle("target-arrow-shape").value,m=t.pstyle("source-arrow-shape").value,y=t.pstyle("target-distance-from-node").pfValue,v=t.pstyle("source-distance-from-node").pfValue,x=u._private.rscratch,b=d._private.rscratch,w=t.pstyle("curve-style").value,T=t._private.rscratch,k=T.edgeType,E=dt(w,"taxi"),A="self"===k||"compound"===k,_="bezier"===k||"multibezier"===k||A,C="bezier"!==k,S="straight"===k||"segments"===k,R="segments"===k,L=_||C||S,D=A||E,I=t.pstyle("source-endpoint"),N=D?"outside-to-node":I.value,M="auto"===u.pstyle("corner-radius").value?"auto":u.pstyle("corner-radius").pfValue,O=t.pstyle("target-endpoint"),P=D?"outside-to-node":O.value,$="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue;T.srcManEndpt=I,T.tgtManEndpt=O;var B=null!==(e=2===(null==O||null===(n=O.pfValue)||void 0===n?void 0:n.length)?O.pfValue:null)&&void 0!==e?e:[0,0],F=null!==(r=2===(null==I||null===(i=I.pfValue)||void 0===i?void 0:i.length)?I.pfValue:null)&&void 0!==r?r:[0,0];if(_){var z=[T.ctrlpts[0],T.ctrlpts[1]];s=C?[T.ctrlpts[T.ctrlpts.length-2],T.ctrlpts[T.ctrlpts.length-1]]:z,o=z}else if(S){var K=R?T.segpts.slice(0,2):[f.x+B[0],f.y+B[1]];s=R?T.segpts.slice(T.segpts.length-2):[p.x+F[0],p.y+F[1]],o=K}if("inside-to-node"===P)a=[f.x,f.y];else if(O.units)a=this.manualEndptToPx(d,O);else if("outside-to-line"===P)a=T.tgtIntn;else if("outside-to-node"===P||"outside-to-node-or-label"===P?l=s:"outside-to-line"!==P&&"outside-to-line-or-label"!==P||(l=[p.x,p.y]),a=h.nodeShapes[this.getNodeShape(d)].intersectLine(f.x,f.y,d.outerWidth(),d.outerHeight(),l[0],l[1],0,$,b),"outside-to-node-or-label"===P||"outside-to-line-or-label"===P){var q=d._private.rscratch,U=q.labelWidth,j=q.labelHeight,Y=q.labelX,G=q.labelY,W=U/2,V=j/2,H=d.pstyle("text-valign").value;"top"===H?G-=V:"bottom"===H&&(G+=V);var X=d.pstyle("text-halign").value;"left"===X?Y-=W:"right"===X&&(Y+=W);var Z=Rn(l[0],l[1],[Y-W,G-V,Y+W,G-V,Y+W,G+V,Y-W,G+V],f.x,f.y);if(Z.length>0){var J=p,tt=Ze(J,Ge(a)),et=Ze(J,Ge(Z)),nt=tt;if(et<tt&&(a=Z,nt=et),Z.length>2)Ze(J,{x:Z[2],y:Z[3]})<nt&&(a=[Z[2],Z[3]])}}var rt=Ln(a,s,h.arrowShapes[g].spacing(t)+y),it=Ln(a,s,h.arrowShapes[g].gap(t)+y);if(T.endX=it[0],T.endY=it[1],T.arrowEndX=rt[0],T.arrowEndY=rt[1],"inside-to-node"===N)a=[p.x,p.y];else if(I.units)a=this.manualEndptToPx(u,I);else if("outside-to-line"===N)a=T.srcIntn;else if("outside-to-node"===N||"outside-to-node-or-label"===N?c=o:"outside-to-line"!==N&&"outside-to-line-or-label"!==N||(c=[f.x,f.y]),a=h.nodeShapes[this.getNodeShape(u)].intersectLine(p.x,p.y,u.outerWidth(),u.outerHeight(),c[0],c[1],0,M,x),"outside-to-node-or-label"===N||"outside-to-line-or-label"===N){var at=u._private.rscratch,st=at.labelWidth,ot=at.labelHeight,lt=at.labelX,ct=at.labelY,ht=st/2,ut=ot/2,pt=u.pstyle("text-valign").value;"top"===pt?ct-=ut:"bottom"===pt&&(ct+=ut);var ft=u.pstyle("text-halign").value;"left"===ft?lt-=ht:"right"===ft&&(lt+=ht);var gt=Rn(c[0],c[1],[lt-ht,ct-ut,lt+ht,ct-ut,lt+ht,ct+ut,lt-ht,ct+ut],p.x,p.y);if(gt.length>0){var mt=f,yt=Ze(mt,Ge(a)),vt=Ze(mt,Ge(gt)),xt=yt;if(vt<yt&&(a=[gt[0],gt[1]],xt=vt),gt.length>2)Ze(mt,{x:gt[2],y:gt[3]})<xt&&(a=[gt[2],gt[3]])}}var bt=Ln(a,o,h.arrowShapes[m].spacing(t)+v),wt=Ln(a,o,h.arrowShapes[m].gap(t)+v);T.startX=wt[0],T.startY=wt[1],T.arrowStartX=bt[0],T.arrowStartY=bt[1],L&&(Q(T.startX)&&Q(T.startY)&&Q(T.endX)&&Q(T.endY)?T.badLine=!1:T.badLine=!0)},getSourceEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),"haystack"===e.edgeType?{x:e.haystackPts[0],y:e.haystackPts[1]}:{x:e.arrowStartX,y:e.arrowStartY}},getTargetEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),"haystack"===e.edgeType?{x:e.haystackPts[2],y:e.haystackPts[3]}:{x:e.arrowEndX,y:e.arrowEndY}}},Vh={};function Hh(t,e,n){for(var r=function(t,e,n,r){return Je(t,e,n,r)},i=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var s=t.bezierProjPcts[a];i.push({x:r(n[0],n[2],n[4],s),y:r(n[1],n[3],n[5],s)})}}Vh.storeEdgeProjections=function(t){var e=t._private,n=e.rscratch,r=n.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===r||"bezier"===r||"self"===r||"compound"===r){e.rstyle.bezierPts=[];for(var i=0;i+5<n.allpts.length;i+=4)Hh(this,t,n.allpts.slice(i,i+6))}else if("segments"===r){var a=e.rstyle.linePts=[];for(i=0;i+1<n.allpts.length;i+=2)a.push({x:n.allpts[i],y:n.allpts[i+1]})}else if("haystack"===r){var s=n.haystackPts;e.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},Vh.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Xh={recalculateNodeLabelProjection:function(t){var e=t.pstyle("label").strValue;if(!at(e)){var n,r,i=t._private,a=t.width(),s=t.height(),o=t.padding(),l=t.position(),c=t.pstyle("text-halign").strValue,h=t.pstyle("text-valign").strValue,u=i.rscratch,d=i.rstyle;switch(c){case"left":n=l.x-a/2-o;break;case"right":n=l.x+a/2+o;break;default:n=l.x}switch(h){case"top":r=l.y-s/2-o;break;case"bottom":r=l.y+s/2+o;break;default:r=l.y}u.labelX=n,u.labelY=r,d.labelX=n,d.labelY=r,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},Zh=function(t,e){var n=Math.atan(e/t);return 0===t&&n<0&&(n*=-1),n},Qh=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Zh(n,r)};Xh.recalculateEdgeLabelProjections=function(t){var e,n=t._private,r=n.rscratch,i=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:r.midX,y:r.midY};var s=function(t,e,r){me(n.rscratch,t,e,r),me(n.rstyle,t,e,r)};s("labelX",null,e.x),s("labelY",null,e.y);var o=Zh(r.midDispX,r.midDispY);s("labelAutoAngle",null,o);var l=function(){if(l.cache)return l.cache;for(var t=[],e=0;e+5<r.allpts.length;e+=4){var a={x:r.allpts[e],y:r.allpts[e+1]},s={x:r.allpts[e+2],y:r.allpts[e+3]},o={x:r.allpts[e+4],y:r.allpts[e+5]};t.push({p0:a,p1:s,p2:o,startDist:0,length:0,segments:[]})}var c=n.rstyle.bezierPts,h=i.bezierProjPcts.length;function u(t,e,n,r,i){var a=Xe(e,n),s=t.segments[t.segments.length-1],o={p0:e,p1:n,t0:r,t1:i,startDist:s?s.startDist+s.length:0,length:a};t.segments.push(o),t.length+=a}for(var d=0;d<t.length;d++){var p=t[d],f=t[d-1];f&&(p.startDist=f.startDist+f.length),u(p,p.p0,c[d*h],0,i.bezierProjPcts[0]);for(var g=0;g<h-1;g++)u(p,c[d*h+g],c[d*h+g+1],i.bezierProjPcts[g],i.bezierProjPcts[g+1]);u(p,c[d*h+h-1],p.p2,i.bezierProjPcts[h-1],1)}return l.cache=t},c=function(n){var i,o="source"===n;if(a[n]){var c=t.pstyle(n+"-text-offset").pfValue;switch(r.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var h,u=l(),d=0,p=0,f=0;f<u.length;f++){for(var g=u[o?f:u.length-1-f],m=0;m<g.segments.length;m++){var y=g.segments[o?m:g.segments.length-1-m],v=f===u.length-1&&m===g.segments.length-1;if(d=p,(p+=y.length)>=c||v){h={cp:g,segment:y};break}}if(h)break}var x=h.cp,b=h.segment,w=(c-d)/b.length,T=b.t1-b.t0,k=o?b.t0+T*w:b.t1-T*w;k=en(0,k,1),e=tn(x.p0,x.p1,x.p2,k),i=function(t,e,n,r){var i=en(0,r-.001,1),a=en(0,r+.001,1),s=tn(t,e,n,i),o=tn(t,e,n,a);return Qh(s,o)}(x.p0,x.p1,x.p2,k);break;case"straight":case"segments":case"haystack":for(var E,A,_,C,S=0,R=r.allpts.length,L=0;L+3<R&&(o?(_={x:r.allpts[L],y:r.allpts[L+1]},C={x:r.allpts[L+2],y:r.allpts[L+3]}):(_={x:r.allpts[R-2-L],y:r.allpts[R-1-L]},C={x:r.allpts[R-4-L],y:r.allpts[R-3-L]}),A=S,!((S+=E=Xe(_,C))>=c));L+=2);var D=(c-A)/E;D=en(0,D,1),e=function(t,e,n,r){var i=e.x-t.x,a=e.y-t.y,s=Xe(t,e),o=i/s,l=a/s;return n=null==n?0:n,r=null!=r?r:n*s,{x:t.x+o*r,y:t.y+l*r}}(_,C,D),i=Qh(_,C)}s("labelX",n,e.x),s("labelY",n,e.y),s("labelAutoAngle",n,i)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Xh.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Xh.applyPrefixedLabelDimensions=function(t,e){var n=t._private,r=this.getLabelText(t,e),i=Wt(r,t._private.labelDimsKey);if(ge(n.rscratch,"prefixedLabelDimsKey",e)!==i){me(n.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(t,r),s=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=ge(n.rscratch,"labelWrapCachedLines",e)||[],c="wrap"!==o?1:Math.max(l.length,1),h=a.height/c,u=h*s,d=a.width,p=a.height+(c-1)*(s-1)*h;me(n.rstyle,"labelWidth",e,d),me(n.rscratch,"labelWidth",e,d),me(n.rstyle,"labelHeight",e,p),me(n.rscratch,"labelHeight",e,p),me(n.rscratch,"labelLineHeight",e,u)}},Xh.getLabelText=function(t,e){var n=t._private,r=e?e+"-":"",i=t.pstyle(r+"label").strValue,a=t.pstyle("text-transform").value,o=function(t,r){return r?(me(n.rscratch,t,e,r),r):ge(n.rscratch,t,e)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if("wrap"===l){var c=o("labelKey");if(null!=c&&o("labelWrapKey")===c)return o("labelWrapCachedText");for(var h=i.split("\n"),u=t.pstyle("text-max-width").pfValue,d="anywhere"===t.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;g<h.length;g++){var m=h[g],y=this.calculateLabelDimensions(t,m).width;if(d){var v=m.split("").join("");m=v}if(y>u){var x,b="",w=0,T=s(m.matchAll(f));try{for(T.s();!(x=T.n()).done;){var k=x.value,E=k[0],A=m.substring(w,k.index);w=k.index+E.length;var _=0===b.length?A:b+A+E;this.calculateLabelDimensions(t,_).width<=u?b+=A+E:(b&&p.push(b),b=A+E)}}catch(D){T.e(D)}finally{T.f()}b.match(/^[\s\u200b]+$/)||p.push(b)}else p.push(m)}o("labelWrapCachedLines",p),i=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",c)}else if("ellipsis"===l){var C=t.pstyle("text-max-width").pfValue,S="",R=!1;if(this.calculateLabelDimensions(t,i).width<C)return i;for(var L=0;L<i.length;L++){if(this.calculateLabelDimensions(t,S+i[L]+"…").width>C)break;S+=i[L],L===i.length-1&&(R=!0)}return R||(S+="…"),S}return i},Xh.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,n=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Xh.calculateLabelDimensions=function(t,e){var n=this.cy.window().document,r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue,a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,o=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!o){o=this.labelCalcCanvas=n.createElement("canvas"),l=this.labelCalcCanvasContext=o.getContext("2d");var c=o.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}l.font="".concat(r," ").concat(s," ").concat(i,"px ").concat(a);for(var h=0,u=0,d=e.split("\n"),p=0;p<d.length;p++){var f=d[p],g=l.measureText(f),m=Math.ceil(g.width),y=i;h=Math.max(m,h),u+=y}return{width:h+=0,height:u+=0}},Xh.calculateLabelAngle=function(t,e){var n=t._private.rscratch,r=t.isEdge(),i=e?e+"-":"",a=t.pstyle(i+"text-rotation"),s=a.strValue;return"none"===s?0:r&&"autorotate"===s?n.labelAutoAngle:"autorotate"===s?0:a.pfValue},Xh.calculateLabelAngles=function(t){var e=this,n=t.isEdge(),r=t._private.rscratch;r.labelAngle=e.calculateLabelAngle(t),n&&(r.sourceLabelAngle=e.calculateLabelAngle(t,"source"),r.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var Jh={},tu=!1;Jh.getNodeShape=function(t){var e=t.pstyle("shape").value;if("cutrectangle"===e&&(t.width()<28||t.height()<28))return tu||(oe("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),tu=!0),"rectangle";if(t.isParent())return"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle";if("polygon"===e){var n=t.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return e};var eu={registerCalculationListeners:function(){var t=this.cy,e=t.collection(),n=this,r=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),n)for(var r=0;r<t.length;r++){var i=t[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}};n.binder(t).on("bounds.* dirty.*",function(t){var e=t.target;r(e)}).on("style.* background.*",function(t){var e=t.target;r(e,!1)});var i=function(i){if(i){var a=n.onUpdateEleCalcsFns;e.cleanStyle();for(var s=0;s<e.length;s++){var o=e[s],l=o._private.rstyle;o.isNode()&&!l.cleanConnected&&(r(o.connectedEdges()),l.cleanConnected=!0)}if(a)for(var c=0;c<a.length;c++){(0,a[c])(i,e)}n.recalculateRenderedStyle(e),e=t.collection()}};n.flushRenderedStyleQueue=function(){i(!0)},n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var n=function(t){return t._private.rstyle.cleanConnected};if(0!==t.length){var r=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var s=t[a],o=s._private,l=o.rstyle;!s.isEdge()||n(s.source())&&n(s.target())||(l.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(t){return!t._private.rstyle.clean&&t.isBundledBezier()})&&(l.clean=!1),e&&l.clean||s.removed()||"none"!==s.pstyle("display").value&&("nodes"===o.group?i.push(s):r.push(s),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(r);for(var p=0;p<r.length;p++){var f=r[p]._private,g=f.rstyle,m=f.rscratch;g.srcX=m.arrowStartX,g.srcY=m.arrowStartY,g.tgtX=m.arrowEndX,g.tgtY=m.arrowEndY,g.midX=m.midX,g.midY=m.midY,g.labelAngle=m.labelAngle,g.sourceLabelAngle=m.sourceLabelAngle,g.targetLabelAngle=m.targetLabelAngle}}}}},nu={updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],n=0;n<t.length;n++){var r=(i=t[n])._private.rscratch;i.grabbed()&&!i.isParent()?e.push(i):r.inDragLayer?t.drag.push(i):t.nondrag.push(i)}for(n=0;n<e.length;n++){var i=e[n];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(ml),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e}},ru={};[vh,xh,Yh,Wh,Vh,Xh,Jh,eu,nu].forEach(function(t){xt(ru,t)});var iu={getCachedImage:function(t,e,n){var r=this.imageCache=this.imageCache||{},i=r[t];if(i)return i.image.complete||i.image.addEventListener("load",n),i.image;var a=(i=r[t]=r[t]||{}).image=new Image;a.addEventListener("load",n),a.addEventListener("error",function(){a.error=!0});var s="data:";return t.substring(0,5).toLowerCase()===s||(e="null"===e?null:e,a.crossOrigin=e),a.src=t,a}},au={registerBinding:function(t,e,n,r){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],s=0;s<t.length;s++){var o=t[s];if(void 0!==o){var l=this.binder(o);a.push(l.on.apply(l,i))}}return a}return(l=this.binder(t)).on.apply(l,i)}};au.binder=function(t){var e,n=this,r=n.cy.window(),i=t===r||t===r.document||t===r.document.body||(e=t,"undefined"!=typeof HTMLElement&&e instanceof HTMLElement);if(null==n.supportsPassiveEvents){var a=!1;try{var s=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});r.addEventListener("test",null,s)}catch(l){}n.supportsPassiveEvents=a}var o=function(e,r,a){var s=Array.prototype.slice.call(arguments);return i&&n.supportsPassiveEvents&&(s[2]={capture:null!=a&&a,passive:!1,once:!1}),n.bindings.push({target:t,args:s}),(t.addEventListener||t.on).apply(t,s),this};return{on:o,addEventListener:o,addListener:o,bind:o}},au.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},au.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},au.load=function(){var t=this,e=t.cy.window(),n=function(t){return t.selected()},r=function(e,n,r,i){null==e&&(e=t.cy);for(var a=0;a<n.length;a++){var s=n[a];e.emit({originalEvent:r,type:s,position:i})}},i=function(t){return t.shiftKey||t.metaKey||t.ctrlKey},a=function(e,n){var r=!0;if(t.cy.hasCompoundNodes()&&e&&e.pannable())for(var i=0;n&&i<n.length;i++){if((e=n[i]).isNode()&&e.isParent()&&!e.pannable()){r=!1;break}}else r=!0;return r},s=function(t){t[0]._private.rscratch.inDragLayer=!0},o=function(t){t[0]._private.rscratch.isGrabTarget=!0},l=function(t,e){var n=e.addToList;n.has(t)||!t.grabbable()||t.locked()||(n.merge(t),function(t){t[0]._private.grabbed=!0}(t))},c=function(e,n){n=n||{};var r=e.cy().hasCompoundNodes();n.inDragLayer&&(e.forEach(s),e.neighborhood().stdFilter(function(t){return!r||t.isEdge()}).forEach(s)),n.addToList&&e.forEach(function(t){l(t,n)}),function(t,e){if(t.cy().hasCompoundNodes()&&(null!=e.inDragLayer||null!=e.addToList)){var n=t.descendants();e.inDragLayer&&(n.forEach(s),n.connectedEdges().forEach(s)),e.addToList&&l(n,e)}}(e,n),d(e,{inDragLayer:n.inDragLayer}),t.updateCachedGrabbedEles()},h=c,u=function(e){e&&(t.getCachedZSortedEles().forEach(function(t){!function(t){t[0]._private.grabbed=!1}(t),function(t){t[0]._private.rscratch.inDragLayer=!1}(t),function(t){t[0]._private.rscratch.isGrabTarget=!1}(t)}),t.updateCachedGrabbedEles())},d=function(t,e){if((null!=e.inDragLayer||null!=e.addToList)&&t.cy().hasCompoundNodes()){var n=t.ancestors().orphans();if(!n.same(t)){var r=n.descendants().spawnSelf().merge(n).unmerge(t).unmerge(t.descendants()),i=r.connectedEdges();e.inDragLayer&&(i.forEach(s),r.forEach(s)),e.addToList&&r.forEach(function(t){l(t,e)})}}},p=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},f="undefined"!=typeof MutationObserver,g="undefined"!=typeof ResizeObserver;f?(t.removeObserver=new MutationObserver(function(e){for(var n=0;n<e.length;n++){var r=e[n].removedNodes;if(r)for(var i=0;i<r.length;i++){if(r[i]===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(e){t.destroy()});var m=Nt(function(){t.cy.resize()},100);f&&(t.styleObserver=new MutationObserver(m),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",m),g&&(t.resizeObserver=new ResizeObserver(m),t.resizeObserver.observe(t.container));var y=function(){t.invalidateContainerClientCoordsCache()};!function(t,e){for(;null!=t;)e(t),t=t.parentNode}(t.container,function(e){t.registerBinding(e,"transitionend",y),t.registerBinding(e,"animationend",y),t.registerBinding(e,"scroll",y)}),t.registerBinding(t.container,"contextmenu",function(t){t.preventDefault()});var v=function(e){for(var n=t.findContainerClientCoords(),r=n[0],i=n[1],a=n[2],s=n[3],o=e.touches?e.touches:[e],l=!1,c=0;c<o.length;c++){var h=o[c];if(r<=h.clientX&&h.clientX<=r+a&&i<=h.clientY&&h.clientY<=i+s){l=!0;break}}if(!l)return!1;for(var u=t.container,d=e.target.parentNode,p=!1;d;){if(d===u){p=!0;break}d=d.parentNode}return!!p};t.registerBinding(t.container,"mousedown",function(e){if(v(e)&&(1!==t.hoverData.which||1===e.which)){e.preventDefault(),p(),t.hoverData.capture=!0,t.hoverData.which=e.which;var n=t.cy,i=[e.clientX,e.clientY],a=t.projectIntoViewport(i[0],i[1]),s=t.selection,l=t.findNearestElements(a[0],a[1],!0,!1),u=l[0],d=t.dragData.possibleDragElements;t.hoverData.mdownPos=a,t.hoverData.mdownGPos=i;var f=function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}};if(3==e.which){t.hoverData.cxtStarted=!0;var g={originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}};u?(u.activate(),u.emit(g),t.hoverData.down=u):n.emit(g),t.hoverData.downTime=(new Date).getTime(),t.hoverData.cxtDragged=!1}else if(1==e.which){if(u&&u.activate(),null!=u&&t.nodeIsGrabbable(u)){if(o(u),u.selected()){d=t.dragData.possibleDragElements=n.collection();var m=n.$(function(e){return e.isNode()&&e.selected()&&t.nodeIsGrabbable(e)});c(m,{addToList:d}),u.emit(f("grabon")),m.forEach(function(t){t.emit(f("grab"))})}else d=t.dragData.possibleDragElements=n.collection(),h(u,{addToList:d}),u.emit(f("grabon")).emit(f("grab"));t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=u,t.hoverData.downs=l,t.hoverData.downTime=(new Date).getTime(),r(u,["mousedown","tapstart","vmousedown"],e,{x:a[0],y:a[1]}),null==u?(s[4]=1,t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint("select",!0),t.redraw()):u.pannable()&&(s[4]=1),t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var e=t.hoverData.down;e?e.emit(f("taphold")):n.emit(f("taphold"))}},t.tapholdDuration)}s[0]=s[2]=a[0],s[1]=s[3]=a[1]}},!1);var x,b,w,T=function(t){var e=t.getRootNode();if(e&&11===e.nodeType&&void 0!==e.host)return e}(t.container);t.registerBinding([e,T],"mousemove",function(e){if(t.hoverData.capture||v(e)){var n=!1,s=t.cy,o=s.zoom(),l=[e.clientX,e.clientY],h=t.projectIntoViewport(l[0],l[1]),d=t.hoverData.mdownPos,p=t.hoverData.mdownGPos,f=t.selection,g=null;t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.selecting||(g=t.findNearestElement(h[0],h[1],!0,!1));var m,y=t.hoverData.last,x=t.hoverData.down,b=[h[0]-f[2],h[1]-f[3]],w=t.dragData.possibleDragElements;if(p){var T=l[0]-p[0],k=T*T,E=l[1]-p[1],A=k+E*E;t.hoverData.isOverThresholdDrag=m=A>=t.desktopTapThreshold2}var _=i(e);m&&(t.hoverData.tapholdCancelled=!0);n=!0,r(g,["mousemove","vmousemove","tapdrag"],e,{x:h[0],y:h[1]});var C=function(t){return{originalEvent:e,type:t,position:{x:h[0],y:h[1]}}},S=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||s.emit(C("boxstart")),f[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(m){var R=C("cxtdrag");x?x.emit(R):s.emit(R),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(C("cxtdragout")),t.hoverData.cxtOver=g,g&&g.emit(C("cxtdragover")))}}else if(t.hoverData.dragging){if(n=!0,s.panningEnabled()&&s.userPanningEnabled()){var L;if(t.hoverData.justStartedPan){var D=t.hoverData.mdownPos;L={x:(h[0]-D[0])*o,y:(h[1]-D[1])*o},t.hoverData.justStartedPan=!1}else L={x:b[0]*o,y:b[1]*o};s.panBy(L),s.emit(C("dragpan")),t.hoverData.dragged=!0}h=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=f[4]||null!=x&&!x.pannable()){if(x&&x.pannable()&&x.active()&&x.unactivate(),x&&x.grabbed()||g==y||(y&&r(y,["mouseout","tapdragout"],e,{x:h[0],y:h[1]}),g&&r(g,["mouseover","tapdragover"],e,{x:h[0],y:h[1]}),t.hoverData.last=g),x)if(m){if(s.boxSelectionEnabled()&&_)x&&x.grabbed()&&(u(w),x.emit(C("freeon")),w.emit(C("free")),t.dragData.didDrag&&(x.emit(C("dragfreeon")),w.emit(C("dragfree")))),S();else if(x&&x.grabbed()&&t.nodeIsDraggable(x)){var I=!t.dragData.didDrag;I&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||c(w,{inDragLayer:!0});var N={x:0,y:0};if(Q(b[0])&&Q(b[1])&&(N.x+=b[0],N.y+=b[1],I)){var M=t.hoverData.dragDelta;M&&Q(M[0])&&Q(M[1])&&(N.x+=M[0],N.y+=M[1])}t.hoverData.draggingEles=!0,w.silentShift(N).emit(C("position")).emit(C("drag")),t.redrawHint("drag",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(b[0]),e.push(b[1])):(e[0]+=b[0],e[1]+=b[1])}();n=!0}else if(m){if(t.hoverData.dragging||!s.boxSelectionEnabled()||!_&&s.panningEnabled()&&s.userPanningEnabled()){if(!t.hoverData.selecting&&s.panningEnabled()&&s.userPanningEnabled()){a(x,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,f[4]=0,t.data.bgActivePosistion=Ge(d),t.redrawHint("select",!0),t.redraw())}}else S();x&&x.pannable()&&x.active()&&x.unactivate()}return f[2]=h[0],f[3]=h[1],n?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}},!1),t.registerBinding(e,"mouseup",function(e){if((1!==t.hoverData.which||1===e.which||!t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var a=t.cy,s=t.projectIntoViewport(e.clientX,e.clientY),o=t.selection,l=t.findNearestElement(s[0],s[1],!0,!1),c=t.dragData.possibleDragElements,h=t.hoverData.down,d=i(e);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,h&&h.unactivate();var p=function(t){return{originalEvent:e,type:t,position:{x:s[0],y:s[1]}}};if(3===t.hoverData.which){var f=p("cxttapend");if(h?h.emit(f):a.emit(f),!t.hoverData.cxtDragged){var g=p("cxttap");h?h.emit(g):a.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],e,{x:s[0],y:s[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(r(h,["click","tap","vclick"],e,{x:s[0],y:s[1]}),b=!1,e.timeStamp-w<=a.multiClickDebounceTime()?(x&&clearTimeout(x),b=!0,w=null,r(h,["dblclick","dbltap","vdblclick"],e,{x:s[0],y:s[1]})):(x=setTimeout(function(){b||r(h,["oneclick","onetap","voneclick"],e,{x:s[0],y:s[1]})},a.multiClickDebounceTime()),w=e.timeStamp)),null!=h||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(a.$(n).unselect(["tapunselect"]),c.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=c=a.collection()),l!=h||t.dragData.didDrag||t.hoverData.selecting||null!=l&&l._private.selectable&&(t.hoverData.dragging||("additive"===a.selectionType()||d?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):d||(a.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var m=a.collection(t.getAllInBox(o[0],o[1],o[2],o[3]));t.redrawHint("select",!0),m.length>0&&t.redrawHint("eles",!0),a.emit(p("boxend"));var y=function(t){return t.selectable()&&!t.selected()};"additive"===a.selectionType()||d||a.$(n).unmerge(m).unselect(),m.emit(p("box")).stdFilter(y).select().emit(p("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!o[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=h&&h.grabbed();u(c),v&&(h.emit(p("freeon")),c.emit(p("free")),t.dragData.didDrag&&(h.emit(p("dragfreeon")),c.emit(p("dragfree"))))}}o[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}},!1);var k,E,A,_,C,S,R,L,D,I,N,M,O,P,$=[],B=1e5,F=function(e){var n=!1,r=e.deltaY;if(null==r&&(null!=e.wheelDeltaY?r=e.wheelDeltaY/4:null!=e.wheelDelta&&(r=e.wheelDelta/4)),0!==r){if(null==k)if($.length>=4){var i=$;if(k=function(t,e){for(var n=0;n<t.length;n++)if(t[n]%e!==0)return!1;return!0}(i,5),!k){var a=Math.abs(i[0]);k=function(t){for(var e=Math.abs(t[0]),n=1;n<t.length;n++)if(Math.abs(t[n])!==e)return!1;return!0}(i)&&a>5}if(k)for(var s=0;s<i.length;s++)B=Math.min(Math.abs(i[s]),B)}else $.push(r),n=!0;else k&&(B=Math.min(Math.abs(r),B));if(!t.scrollingPage){var o=t.cy,l=o.zoom(),c=o.pan(),h=t.projectIntoViewport(e.clientX,e.clientY),u=[h[0]*l+c.x,h[1]*l+c.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||0!==t.selection[4])e.preventDefault();else if(o.panningEnabled()&&o.userPanningEnabled()&&o.zoomingEnabled()&&o.userZoomingEnabled()){var d;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150),n&&Math.abs(r)>5&&(r=5*He(r)),d=r/-250,k&&(d/=B,d*=3),d*=t.wheelSensitivity,1===e.deltaMode&&(d*=33);var p=o.zoom()*Math.pow(10,d);"gesturechange"===e.type&&(p=t.gestureStartZoom*e.scale),o.zoom({level:p,renderedPosition:{x:u[0],y:u[1]}}),o.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:h[0],y:h[1]}})}}}};t.registerBinding(t.container,"wheel",F,!0),t.registerBinding(e,"scroll",function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(e){t.hasTouchStarted||F(e)},!0),t.registerBinding(t.container,"mouseout",function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),t.registerBinding(t.container,"mouseover",function(e){var n=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var z,K,q,U,j,Y,G,W=function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))},V=function(t,e,n,r){return(n-t)*(n-t)+(r-e)*(r-e)};if(t.registerBinding(t.container,"touchstart",z=function(e){if(t.hasTouchStarted=!0,v(e)){p(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var n=t.cy,i=t.touchData.now,a=t.touchData.earlier;if(e.touches[0]){var s=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(e.touches[1]){s=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);i[2]=s[0],i[3]=s[1]}if(e.touches[2]){s=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);i[4]=s[0],i[5]=s[1]}var l=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};if(e.touches[1]){t.touchData.singleTouchMoved=!0,u(t.dragData.touchDragEles);var d=t.findContainerClientCoords();I=d[0],N=d[1],M=d[2],O=d[3],E=e.touches[0].clientX-I,A=e.touches[0].clientY-N,_=e.touches[1].clientX-I,C=e.touches[1].clientY-N,P=0<=E&&E<=M&&0<=_&&_<=M&&0<=A&&A<=O&&0<=C&&C<=O;var f=n.pan(),g=n.zoom();S=W(E,A,_,C),R=V(E,A,_,C),D=[((L=[(E+_)/2,(A+C)/2])[0]-f.x)/g,(L[1]-f.y)/g];if(R<4e4&&!e.touches[2]){var m=t.findNearestElement(i[0],i[1],!0,!0),y=t.findNearestElement(i[2],i[3],!0,!0);return m&&m.isNode()?(m.activate().emit(l("cxttapstart")),t.touchData.start=m):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),t.touchData.start=y):n.emit(l("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])n.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var x=t.findNearestElements(i[0],i[1],!0,!0),b=x[0];if(null!=b&&(b.activate(),t.touchData.start=b,t.touchData.starts=x,t.nodeIsGrabbable(b))){var w=t.dragData.touchDragEles=n.collection(),T=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),b.selected()?(T=n.$(function(e){return e.selected()&&t.nodeIsGrabbable(e)}),c(T,{addToList:w})):h(b,{addToList:w}),o(b),b.emit(l("grabon")),T?T.forEach(function(t){t.emit(l("grab"))}):b.emit(l("grab"))}r(b,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==b&&(t.data.bgActivePosistion={x:s[0],y:s[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||r(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})},t.tapholdDuration)}if(e.touches.length>=1){for(var k=t.touchData.startPosition=[null,null,null,null,null,null],$=0;$<i.length;$++)k[$]=a[$]=i[$];var B=e.touches[0];t.touchData.startGPosition=[B.clientX,B.clientY]}}},!1),t.registerBinding(e,"touchmove",K=function(e){var n=t.touchData.capture;if(n||v(e)){var i=t.selection,s=t.cy,o=t.touchData.now,l=t.touchData.earlier,h=s.zoom();if(e.touches[0]){var d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);o[0]=d[0],o[1]=d[1]}if(e.touches[1]){d=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);o[2]=d[0],o[3]=d[1]}if(e.touches[2]){d=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);o[4]=d[0],o[5]=d[1]}var p,f=function(t){return{originalEvent:e,type:t,position:{x:o[0],y:o[1]}}},g=t.touchData.startGPosition;if(n&&e.touches[0]&&g){for(var m=[],y=0;y<o.length;y++)m[y]=o[y]-l[y];var x=e.touches[0].clientX-g[0],b=x*x,w=e.touches[0].clientY-g[1];p=b+w*w>=t.touchTapThreshold2}if(n&&t.touchData.cxt){e.preventDefault();var T=e.touches[0].clientX-I,k=e.touches[0].clientY-N,L=e.touches[1].clientX-I,M=e.touches[1].clientY-N,O=V(T,k,L,M);if(O/R>=2.25||O>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var $=f("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit($),t.touchData.start=null):s.emit($)}}if(n&&t.touchData.cxt){$=f("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit($):s.emit($),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var B=t.findNearestElement(o[0],o[1],!0,!0);t.touchData.cxtOver&&B===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit(f("cxtdragout")),t.touchData.cxtOver=B,B&&B.emit(f("cxtdragover")))}else if(n&&e.touches[2]&&s.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||s.emit(f("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(o[0]+o[2]+o[4])/3,i[3]=(o[1]+o[3]+o[5])/3):(i[0]=(o[0]+o[2]+o[4])/3,i[1]=(o[1]+o[3]+o[5])/3,i[2]=(o[0]+o[2]+o[4])/3+1,i[3]=(o[1]+o[3]+o[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(n&&e.touches[1]&&!t.touchData.didSelect&&s.zoomingEnabled()&&s.panningEnabled()&&s.userZoomingEnabled()&&s.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),et=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var F=0;F<et.length;F++){var z=et[F]._private;z.grabbed=!1,z.rscratch.inDragLayer=!1}}var K=t.touchData.start,q=(T=e.touches[0].clientX-I,k=e.touches[0].clientY-N,L=e.touches[1].clientX-I,M=e.touches[1].clientY-N,W(T,k,L,M)),U=q/S;if(P){var j=(T-E+(L-_))/2,Y=(k-A+(M-C))/2,G=s.zoom(),H=G*U,X=s.pan(),Z=D[0]*G+X.x,J=D[1]*G+X.y,tt={x:-H/G*(Z-X.x-j)+Z,y:-H/G*(J-X.y-Y)+J};if(K&&K.active()){var et=t.dragData.touchDragEles;u(et),t.redrawHint("drag",!0),t.redrawHint("eles",!0),K.unactivate().emit(f("freeon")),et.emit(f("free")),t.dragData.didDrag&&(K.emit(f("dragfreeon")),et.emit(f("dragfree")))}s.viewport({zoom:H,pan:tt,cancelOnFailedZoom:!0}),s.emit(f("pinchzoom")),S=q,E=T,A=k,_=L,C=M,t.pinching=!0}if(e.touches[0]){d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);o[0]=d[0],o[1]=d[1]}if(e.touches[1]){d=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);o[2]=d[0],o[3]=d[1]}if(e.touches[2]){d=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);o[4]=d[0],o[5]=d[1]}}else if(e.touches[0]&&!t.touchData.didSelect){var nt=t.touchData.start,rt=t.touchData.last;if(t.hoverData.draggingEles||t.swipePanning||(B=t.findNearestElement(o[0],o[1],!0,!0)),n&&null!=nt&&e.preventDefault(),n&&null!=nt&&t.nodeIsDraggable(nt))if(p){et=t.dragData.touchDragEles;var it=!t.dragData.didDrag;it&&c(et,{inDragLayer:!0}),t.dragData.didDrag=!0;var at={x:0,y:0};if(Q(m[0])&&Q(m[1]))if(at.x+=m[0],at.y+=m[1],it)t.redrawHint("eles",!0),(st=t.touchData.dragDelta)&&Q(st[0])&&Q(st[1])&&(at.x+=st[0],at.y+=st[1]);t.hoverData.draggingEles=!0,et.silentShift(at).emit(f("position")).emit(f("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==l[0]&&t.touchData.startPosition[1]==l[1]&&t.redrawHint("eles",!0),t.redraw()}else{var st;0===(st=t.touchData.dragDelta=t.touchData.dragDelta||[]).length?(st.push(m[0]),st.push(m[1])):(st[0]+=m[0],st[1]+=m[1])}if(r(nt||B,["touchmove","tapdrag","vmousemove"],e,{x:o[0],y:o[1]}),nt&&nt.grabbed()||B==rt||(rt&&rt.emit(f("tapdragout")),B&&B.emit(f("tapdragover"))),t.touchData.last=B,n)for(F=0;F<o.length;F++)o[F]&&t.touchData.startPosition[F]&&p&&(t.touchData.singleTouchMoved=!0);if(n&&(null==nt||nt.pannable())&&s.panningEnabled()&&s.userPanningEnabled()){a(nt,t.touchData.starts)&&(e.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=Ge(t.touchData.startPosition)),t.swipePanning?(s.panBy({x:m[0]*h,y:m[1]*h}),s.emit(f("dragpan"))):p&&(t.swipePanning=!0,s.panBy({x:x*h,y:w*h}),s.emit(f("dragpan")),nt&&(nt.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);o[0]=d[0],o[1]=d[1]}}for(y=0;y<o.length;y++)l[y]=o[y];n&&e.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(e,"touchcancel",q=function(e){var n=t.touchData.start;t.touchData.capture=!1,n&&n.unactivate()}),t.registerBinding(e,"touchend",U=function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var a=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var s=t.cy,o=s.zoom(),l=t.touchData.now,c=t.touchData.earlier;if(e.touches[0]){var h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);l[0]=h[0],l[1]=h[1]}if(e.touches[1]){h=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);l[2]=h[0],l[3]=h[1]}if(e.touches[2]){h=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);l[4]=h[0],l[5]=h[1]}var d,p=function(t){return{originalEvent:e,type:t,position:{x:l[0],y:l[1]}}};if(i&&i.unactivate(),t.touchData.cxt){if(d=p("cxttapend"),i?i.emit(d):s.emit(d),!t.touchData.cxtDragged){var f=p("cxttap");i?i.emit(f):s.emit(f)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=s.collection(t.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,t.redrawHint("select",!0),s.emit(p("boxend"));g.emit(p("box")).stdFilter(function(t){return t.selectable()&&!t.selected()}).select().emit(p("boxselect")),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var m=t.dragData.touchDragEles;if(null!=i){var y=i._private.grabbed;u(m),t.redrawHint("drag",!0),t.redrawHint("eles",!0),y&&(i.emit(p("freeon")),m.emit(p("free")),t.dragData.didDrag&&(i.emit(p("dragfreeon")),m.emit(p("dragfree")))),r(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]}),i.unactivate(),t.touchData.start=null}else{var v=t.findNearestElement(l[0],l[1],!0,!0);r(v,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]})}var x=t.touchData.startPosition[0]-l[0],b=x*x,w=t.touchData.startPosition[1]-l[1],T=(b+w*w)*o*o;t.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],e,{x:l[0],y:l[1]}),j=!1,e.timeStamp-G<=s.multiClickDebounceTime()?(Y&&clearTimeout(Y),j=!0,G=null,r(i,["dbltap","vdblclick"],e,{x:l[0],y:l[1]})):(Y=setTimeout(function(){j||r(i,["onetap","voneclick"],e,{x:l[0],y:l[1]})},s.multiClickDebounceTime()),G=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&T<t.touchTapThreshold2&&!t.pinching&&("single"===s.selectionType()?(s.$(n).unmerge(i).unselect(["tapunselect"]),i.select(["tapselect"])):i.selected()?i.unselect(["tapunselect"]):i.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}for(var k=0;k<l.length;k++)c[k]=l[k];t.dragData.didDrag=!1,0===e.touches.length&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),e.touches.length<2&&(1===e.touches.length&&(t.touchData.startGPosition=[e.touches[0].clientX,e.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())}},!1),"undefined"==typeof TouchEvent){var H=[],X=function(t){return{clientX:t.clientX,clientY:t.clientY,force:1,identifier:t.pointerId,pageX:t.pageX,pageY:t.pageY,radiusX:t.width/2,radiusY:t.height/2,screenX:t.screenX,screenY:t.screenY,target:t.target}},Z=function(t){H.push(function(t){return{event:t,touch:X(t)}}(t))},J=function(t){for(var e=0;e<H.length;e++){if(H[e].event.pointerId===t.pointerId)return void H.splice(e,1)}},tt=function(t){t.touches=H.map(function(t){return t.touch})},et=function(t){return"mouse"===t.pointerType||4===t.pointerType};t.registerBinding(t.container,"pointerdown",function(t){et(t)||(t.preventDefault(),Z(t),tt(t),z(t))}),t.registerBinding(t.container,"pointerup",function(t){et(t)||(J(t),tt(t),U(t))}),t.registerBinding(t.container,"pointercancel",function(t){et(t)||(J(t),tt(t),q())}),t.registerBinding(t.container,"pointermove",function(t){et(t)||(t.preventDefault(),function(t){var e=H.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=X(t)}(t),tt(t),K(t))})}};var su={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl("polygon",t,e,n,r,i,this.points)},intersectLine:function(t,e,n,r,i,a,s,o){return Rn(i,a,this.points,t,e,n/2,r/2,s)},checkPoint:function(t,e,n,r,i,a,s,o){return wn(t,e,this.points,a,s,r,i,[0,-1],n)},hasMiterBounds:"rectangle"!==t,miterBounds:function(t,e,n,r,i,a){return fn(this.points,t,e,n,r,i)}}}};su.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl(this.name,t,e,n,r,i)},intersectLine:function(t,e,n,r,i,a,s,o){return function(t,e,n,r,i,a){var s=n-t,o=r-e;s/=i,o/=a;var l=Math.sqrt(s*s+o*o),c=l-1;if(c<0)return[];var h=c/l;return[(n-t)*h+t,(r-e)*h+e]}(i,a,t,e,n/2+s,r/2+s)},checkPoint:function(t,e,n,r,i,a,s,o){return En(t,e,r,i,a,s,n)}}},su.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(t,n,r,i,a,s,o){if(void 0!==s[o]&&s[o+"-cx"]===t&&s[o+"-cy"]===n)return s[o];s[o]=new Array(e.length/2),s[o+"-cx"]=t,s[o+"-cy"]=n;var l=r/2,c=i/2;a="auto"===a?On(r,i):a;for(var h=new Array(e.length/2),u=0;u<e.length/2;u++)h[u]={x:t+l*e[2*u],y:n+c*e[2*u+1]};var d,p,f,g,m=h.length;for(p=h[m-1],d=0;d<m;d++)f=h[d%m],g=h[(d+1)%m],s[o][d]=qh(p,f,g,a),p=f,f=g;return s[o]},draw:function(t,e,n,r,i,a,s){this.renderer.nodeShapeImpl("round-polygon",t,e,n,r,i,this.points,this.getOrCreateCorners(e,n,r,i,a,s,"drawCorners"))},intersectLine:function(t,e,n,r,i,a,s,o,l){return function(t,e,n,r,i,a,s,o,l){var c,h=[],u=new Array(2*n.length);l.forEach(function(n,a){0===a?(u[u.length-2]=n.startX,u[u.length-1]=n.startY):(u[4*a-2]=n.startX,u[4*a-1]=n.startY),u[4*a]=n.stopX,u[4*a+1]=n.stopY,0!==(c=An(t,e,r,i,n.cx,n.cy,n.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Cn(t,e,r,i,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(h.length>2){for(var p=[h[0],h[1]],f=Math.pow(p[0]-t,2)+Math.pow(p[1]-e,2),g=1;g<h.length/2;g++){var m=Math.pow(h[2*g]-t,2)+Math.pow(h[2*g+1]-e,2);m<=f&&(p[0]=h[2*g],p[1]=h[2*g+1],f=m)}return p}return h}(i,a,this.points,t,e,0,0,0,this.getOrCreateCorners(t,e,n,r,o,l,"corners"))},checkPoint:function(t,e,n,r,i,a,s,o,l){return function(t,e,n,r,i,a,s,o){for(var l=new Array(2*n.length),c=0;c<o.length;c++){var h=o[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-t,2)+Math.pow(h.cy-e,2)<=Math.pow(h.radius,2))return!0}return bn(t,e,l)}(t,e,this.points,0,0,0,0,this.getOrCreateCorners(a,s,r,i,o,l,"corners"))}}},su.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Dn(4,0),draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl(this.name,t,e,n,r,i,this.points,a)},intersectLine:function(t,e,n,r,i,a,s,o){return gn(i,a,t,e,n,r,s,o)},checkPoint:function(t,e,n,r,i,a,s,o){var l=r/2,c=i/2;o="auto"===o?Mn(r,i):o;var h=2*(o=Math.min(l,c,o));return!!wn(t,e,this.points,a,s,r,i-h,[0,-1],n)||(!!wn(t,e,this.points,a,s,r-h,i,[0,-1],n)||(!!En(t,e,h,h,a-l+o,s-c+o,n)||(!!En(t,e,h,h,a+l-o,s-c+o,n)||(!!En(t,e,h,h,a+l-o,s+c-o,n)||!!En(t,e,h,h,a-l+o,s+c-o,n)))))}}},su.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:Dn(4,0),draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl(this.name,t,e,n,r,i,null,a)},generateCutTrianglePts:function(t,e,n,r,i){var a="auto"===i?this.cornerLength:i,s=e/2,o=t/2,l=n-o,c=n+o,h=r-s,u=r+s;return{topLeft:[l,h+a,l+a,h,l+a,h+a],topRight:[c-a,h,c,h+a,c-a,h+a],bottomRight:[c,u-a,c-a,u,c-a,u-a],bottomLeft:[l+a,u,l,u-a,l+a,u-a]}},intersectLine:function(t,e,n,r,i,a,s,o){var l=this.generateCutTrianglePts(n+2*s,r+2*s,t,e,o),c=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return Rn(i,a,c,t,e)},checkPoint:function(t,e,n,r,i,a,s,o){var l="auto"===o?this.cornerLength:o;if(wn(t,e,this.points,a,s,r,i-2*l,[0,-1],n))return!0;if(wn(t,e,this.points,a,s,r-2*l,i,[0,-1],n))return!0;var c=this.generateCutTrianglePts(r,i,a,s);return bn(t,e,c.topLeft)||bn(t,e,c.topRight)||bn(t,e,c.bottomRight)||bn(t,e,c.bottomLeft)}}},su.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Dn(4,0),draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl(this.name,t,e,n,r,i)},intersectLine:function(t,e,n,r,i,a,s,o){var l=this.generateBarrelBezierPts(n+2*s,r+2*s,t,e),c=function(t){var e=tn({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),n=tn({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),r=tn({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.85);return[t[0],t[1],e.x,e.y,n.x,n.y,r.x,r.y,t[4],t[5]]},h=[].concat(c(l.topLeft),c(l.topRight),c(l.bottomRight),c(l.bottomLeft));return Rn(i,a,h,t,e)},generateBarrelBezierPts:function(t,e,n,r){var i=e/2,a=t/2,s=n-a,o=n+a,l=r-i,c=r+i,h=Pn(t,e),u=h.heightOffset,d=h.widthOffset,p=h.ctrlPtOffsetPct*t,f={topLeft:[s,l+u,s+p,l,s+d,l],topRight:[o-d,l,o-p,l,o,l+u],bottomRight:[o,c-u,o-p,c,o-d,c],bottomLeft:[s+d,c,s+p,c,s,c-u]};return f.topLeft.isTop=!0,f.topRight.isTop=!0,f.bottomLeft.isBottom=!0,f.bottomRight.isBottom=!0,f},checkPoint:function(t,e,n,r,i,a,s,o){var l=Pn(r,i),c=l.heightOffset,h=l.widthOffset;if(wn(t,e,this.points,a,s,r,i-2*c,[0,-1],n))return!0;if(wn(t,e,this.points,a,s,r-2*h,i,[0,-1],n))return!0;for(var u=this.generateBarrelBezierPts(r,i,a,s),d=function(t,e,n){var r,i,a=n[4],s=n[2],o=n[0],l=n[5],c=n[1],h=Math.min(a,o),u=Math.max(a,o),d=Math.min(l,c),p=Math.max(l,c);if(h<=t&&t<=u&&d<=e&&e<=p){var f=[(r=a)-2*(i=s)+o,2*(i-r),r],g=function(t,e,n,r){var i=e*e-4*t*(n-=r);if(i<0)return[];var a=Math.sqrt(i),s=2*t;return[(-e+a)/s,(-e-a)/s]}(f[0],f[1],f[2],t).filter(function(t){return 0<=t&&t<=1});if(g.length>0)return g[0]}return null},p=Object.keys(u),f=0;f<p.length;f++){var g=u[p[f]],m=d(t,e,g);if(null!=m){var y=g[5],v=g[3],x=g[1],b=Je(y,v,x,m);if(g.isTop&&b<=e)return!0;if(g.isBottom&&e<=b)return!0}}return!1}}},su.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Dn(4,0),draw:function(t,e,n,r,i,a){this.renderer.nodeShapeImpl(this.name,t,e,n,r,i,this.points,a)},intersectLine:function(t,e,n,r,i,a,s,o){var l=e-(r/2+s),c=Cn(i,a,t,e,t-(n/2+s),l,t+(n/2+s),l,!1);return c.length>0?c:gn(i,a,t,e,n,r,s,o)},checkPoint:function(t,e,n,r,i,a,s,o){var l=2*(o="auto"===o?Mn(r,i):o);if(wn(t,e,this.points,a,s,r,i-l,[0,-1],n))return!0;if(wn(t,e,this.points,a,s,r-l,i,[0,-1],n))return!0;var c=r/2+2*n,h=i/2+2*n;return!!bn(t,e,[a-c,s-h,a-c,s,a+c,s,a+c,s-h])||(!!En(t,e,l,l,a+r/2-o,s+i/2-o,n)||!!En(t,e,l,l,a-r/2+o,s+i/2-o,n))}}},su.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Dn(3,0)),this.generateRoundPolygon("round-triangle",Dn(3,0)),this.generatePolygon("rectangle",Dn(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",Dn(5,0)),this.generateRoundPolygon("round-pentagon",Dn(5,0)),this.generatePolygon("hexagon",Dn(6,0)),this.generateRoundPolygon("round-hexagon",Dn(6,0)),this.generatePolygon("heptagon",Dn(7,0)),this.generateRoundPolygon("round-heptagon",Dn(7,0)),this.generatePolygon("octagon",Dn(8,0)),this.generateRoundPolygon("round-octagon",Dn(8,0));var r=new Array(20),i=Nn(5,0),a=Nn(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[2*o]*=s,a[2*o+1]*=s;for(o=0;o<5;o++)r[4*o]=i[2*o],r[4*o+1]=i[2*o+1],r[4*o+2]=a[2*o],r[4*o+3]=a[2*o+1];r=In(r),this.generatePolygon("star",r),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),t.makePolygon=function(t){var n,r="polygon-"+t.join("$");return(n=this[r])?n:e.generatePolygon(r,t)}};var ou={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||ue();var e=this;void 0===e.averageRedrawTime&&(e.averageRedrawTime=0),void 0===e.lastRedrawTime&&(e.lastRedrawTime=0),void 0===e.lastDrawTime&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},beforeRender:function(t,e){if(!this.destroyed){null==e&&ae("Priority is not optional for beforeRender");var n=this.beforeRenderCallbacks;n.push({fn:t,priority:e}),n.sort(function(t,e){return e.priority-t.priority})}}},lu=function(t,e,n){for(var r=t.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(e,n)};ou.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var n=function(r){if(!t.destroyed){if(e.batching());else if(t.requestedFrame&&!t.skipFrame){lu(t,!0,r);var i=Bt();t.render(t.renderOptions);var a=t.lastDrawTime=Bt();void 0===t.averageRedrawTime&&(t.averageRedrawTime=a-i),void 0===t.redrawCount&&(t.redrawCount=0),t.redrawCount++,void 0===t.redrawTotalTime&&(t.redrawTotalTime=0);var s=a-i;t.redrawTotalTime+=s,t.lastRedrawTime=s,t.averageRedrawTime=t.averageRedrawTime/2+s/2,t.requestedFrame=!1}else lu(t,!1,r);t.skipFrame=!1,$t(n)}};$t(n)}};var cu=function(t){this.init(t)},hu=cu.prototype;hu.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],hu.init=function(t){var e=this;e.options=t,e.cy=t.cy;var n=e.container=t.cy.container(),r=e.cy.window();if(r){var i=r.document,a=i.head,s="__________cytoscape_stylesheet",o="__________cytoscape_container",l=null!=i.getElementById(s);if(n.className.indexOf(o)<0&&(n.className=(n.className||"")+" "+o),!l){var c=i.createElement("style");c.id=s,c.textContent="."+o+" { position: relative; }",a.insertBefore(c,a.children[0])}"static"===r.getComputedStyle(n).getPropertyValue("position")&&oe("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.webgl=t.webgl,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=Q(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},hu.notify=function(t,e){var n=this,r=n.cy;this.destroyed||("init"!==t?"destroy"!==t?(("add"===t||"remove"===t||"move"===t&&r.hasCompoundNodes()||"load"===t||"zorder"===t||"mount"===t)&&n.invalidateCachedZSortedEles(),"viewport"===t&&n.redrawHint("select",!0),"gc"===t&&n.redrawHint("gc",!0),"load"!==t&&"resize"!==t&&"mount"!==t||(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):n.destroy():n.load())},hu.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var n=t.bindings[e],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch(i){}},hu.isHeadless=function(){return!1},[yh,ru,iu,au,su,ou].forEach(function(t){xt(hu,t)});var uu=1e3/60,du=function(t){return function(){var e=this,n=this.renderer;if(!e.dequeueingSetup){e.dequeueingSetup=!0;var r=Nt(function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()},t.deqRedrawThreshold),i=t.priority||ie;n.beforeRender(function(i,a){var s=Bt(),o=n.averageRedrawTime,l=n.lastRedrawTime,c=[],h=n.cy.extent(),u=n.getPixelRatio();for(i||n.flushRenderedStyleQueue();;){var d=Bt(),p=d-s,f=d-a;if(l<uu){var g=uu-(i?o:0);if(f>=t.deqFastCost*g)break}else if(i){if(p>=t.deqCost*l||p>=t.deqAvgCost*o)break}else if(f>=t.deqNoDrawCost*uu)break;var m=t.deq(e,u,h);if(!(m.length>0))break;for(var y=0;y<m.length;y++)c.push(m[y])}c.length>0&&(t.onDeqd(e,c),!i&&t.shouldRedraw(e,c,u,h)&&r())},i(e))}}},pu=function(){return a(function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne;i(this,t),this.idsByKey=new ye,this.keyForId=new ye,this.cachesByLvl=new ye,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=n},[{key:"getIdsFor",value:function(t){null==t&&ae("Can not get id list for null key");var e=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new xe,e.set(t,n)),n}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e),r=this.getKey(t);this.deleteIdForKey(n,e),this.addIdForKey(r,e),this.keyForId.set(e,r)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteIdForKey(n,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,n=this.lvls,r=e.get(t);return r||(r=new ye,e.set(t,r),n.push(t)),r}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var n=this.getKey(t),r=this.getCache(n,e);return null!=r&&this.updateKeyMappingFor(t),r}},{key:"getForCachedKey",value:function(t,e){var n=this.keyForId.get(t.id());return this.getCache(n,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var n=this.getKey(t);return this.hasCache(n,e)}},{key:"setCache",value:function(t,e,n){n.key=t,this.getCachesAt(e).set(t,n)}},{key:"set",value:function(t,e,n){var r=this.getKey(t);this.setCache(r,e,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var n=this.getKey(t);this.deleteCache(n,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach(function(n){return e.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var e=t.id(),n=this.keyForId.get(e);this.deleteKeyMappingFor(t);var r=this.doesEleInvalidateKey(t);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),fu=7.99,gu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},mu=de({getKey:null,doesEleInvalidateKey:ne,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ee,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yu=function(t,e){var n=this;n.renderer=t,n.onDequeues=[];var r=mu(e);xt(n,r),n.lookup=new pu(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},vu=yu.prototype;vu.reasons=gu,vu.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},vu.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},vu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Le(function(t,e){return e.reqs-t.reqs})},vu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},vu.getElement=function(t,e,n,r,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(null==r&&(r=Math.ceil(Ve(o*n))),r<-4)r=-4;else if(o>=7.99||r>3)return null;var c=Math.pow(2,r),h=e.h*c,u=e.w*c,d=s.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,d))return null;var p,f=l.get(t,r);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=h<=25?25:h<=50?50:50*Math.ceil(h/50),h>1024||u>1024)return null;var g=a.getTextureQueue(p),m=g[g.length-2],y=function(){return a.recycleTexture(p,u)||a.addTexture(p,u)};m||(m=g[g.length-1]),m||(m=y()),m.width-m.usedWidth<u&&(m=y());for(var v,x=function(t){return t&&t.scaledLabelShown===d},b=i&&i===gu.dequeue,w=i&&i===gu.highQuality,T=i&&i===gu.downscale,k=r+1;k<=3;k++){var E=l.get(t,k);if(E){v=E;break}}var A=v&&v.level===r+1?v:null,_=function(){m.context.drawImage(A.texture.canvas,A.x,0,A.width,A.height,m.usedWidth,0,u,h)};if(m.context.setTransform(1,0,0,1,0,0),m.context.clearRect(m.usedWidth,0,u,p),x(A))_();else if(x(v)){if(!w)return a.queueElement(t,v.level-1),v;for(var C=v.level;C>r;C--)A=a.getElement(t,e,n,C,gu.downscale);_()}else{var S;if(!b&&!w&&!T)for(var R=r-1;R>=-4;R--){var L=l.get(t,R);if(L){S=L;break}}if(x(S))return a.queueElement(t,r),S;m.context.translate(m.usedWidth,0),m.context.scale(c,c),this.drawElement(m.context,t,e,d,!1),m.context.scale(1/c,1/c),m.context.translate(-m.usedWidth,0)}return f={x:m.usedWidth,texture:m,level:r,scale:c,width:u,height:h,scaledLabelShown:d},m.usedWidth+=Math.ceil(u+8),m.eleCaches.push(f),l.set(t,r,f),a.checkTextureFullness(m),f},vu.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},vu.invalidateElement=function(t){var e=this,n=e.lookup,r=[];if(n.isInvalid(t)){for(var i=-4;i<=3;i++){var a=n.getForCachedKey(t,i);a&&r.push(a)}if(n.invalidate(t))for(var s=0;s<r.length;s++){var o=r[s],l=o.texture;l.invalidatedWidth+=o.width,o.invalidated=!0,e.checkTextureUtility(l)}e.removeFromQueue(t)}},vu.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},vu.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?pe(e,t):t.fullnessChecks++},vu.retireTexture=function(t){var e=t.height,n=this.getTextureQueue(e),r=this.lookup;pe(n,t),t.retired=!0;for(var i=t.eleCaches,a=0;a<i.length;a++){var s=i[a];r.deleteCache(s.key,s.level)}fe(i),this.getRetiredTextureQueue(e).push(t)},vu.addTexture=function(t,e){var n={};return this.getTextureQueue(t).push(n),n.eleCaches=[],n.height=t,n.width=Math.max(1024,e),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=this.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n},vu.recycleTexture=function(t,e){for(var n=this.getTextureQueue(t),r=this.getRetiredTextureQueue(t),i=0;i<r.length;i++){var a=r[i];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,fe(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),pe(r,a),n.push(a),a}},vu.queueElement=function(t,e){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(t),a=r[i];if(a)a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,n.updateItem(a);else{var s={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(s),r[i]=s}},vu.dequeue=function(t){for(var e=this,n=e.getElementQueue(),r=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s<1&&n.size()>0;s++){var o=n.pop(),l=o.key,c=o.eles[0],h=a.hasCache(c,o.level);if(r[l]=null,!h){i.push(o);var u=e.getBoundingBox(c);e.getElement(c,u,t,o.level,gu.dequeue)}}return i},vu.removeFromQueue=function(t){var e=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(t),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=te,e.updateItem(i),e.pop(),n[r]=null):i.eles.unmerge(t))},vu.onDequeue=function(t){this.onDequeues.push(t)},vu.offDequeue=function(t){pe(this.onDequeues,t)},vu.setupDequeueing=du({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,n){return t.dequeue(e,n)},onDeqd:function(t,e){for(var n=0;n<t.onDequeues.length;n++){(0,t.onDequeues[n])(e)}},shouldRedraw:function(t,e,n,r){for(var i=0;i<e.length;i++)for(var a=e[i].eles,s=0;s<a.length;s++){var o=a[s].boundingBox();if(cn(o,r))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var xu=function(t){var e=this,n=e.renderer=t,r=n.cy;e.layersByLevel={},e.firstGet=!0,e.lastInvalidationTime=Bt()-500,e.skipping=!1,e.eleTxrDeqs=r.collection(),e.scheduleElementRefinement=Nt(function(){e.refineElementTextures(e.eleTxrDeqs),e.eleTxrDeqs.unmerge(e.eleTxrDeqs)},50),n.beforeRender(function(t,n){n-e.lastInvalidationTime<=250?e.skipping=!0:e.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);e.layersQueue=new Le(function(t,e){return e.reqs-t.reqs}),e.setupDequeueing()},bu=xu.prototype,wu=0,Tu=Math.pow(2,53)-1;bu.makeLayer=function(t,e){var n=Math.pow(2,e),r=Math.ceil(t.w*n),i=Math.ceil(t.h*n),a=this.renderer.makeOffscreenCanvas(r,i),s={id:wu=++wu%Tu,bb:t,level:e,width:r,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},o=s.context,l=-s.bb.x1,c=-s.bb.y1;return o.scale(n,n),o.translate(l,c),s},bu.getLayers=function(t,e,n){var r=this,i=r.renderer.cy.zoom(),a=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(Ve(i*e)))<-4)n=-4;else if(i>=3.99||n>2)return null;r.validateLayersElesOrdering(n,t);var s,o,l=r.layersByLevel,c=Math.pow(2,n),h=l[n]=l[n]||[];if(r.levelIsComplete(n,t))return h;!function(){var e=function(e){if(r.validateLayersElesOrdering(e,t),r.levelIsComplete(e,t))return o=l[e],!0},i=function(t){if(!o)for(var r=n+t;-4<=r&&r<=2&&!e(r);r+=t);};i(1),i(-1);for(var a=h.length-1;a>=0;a--){var s=h[a];s.invalid&&pe(h,s)}}();var u=function(e){var i=(e=e||{}).after;!function(){if(!s){s=nn();for(var e=0;e<t.length;e++)rn(s,t[e].boundingBox())}}();var a=Math.ceil(s.w*c),o=Math.ceil(s.h*c);if(a>32767||o>32767)return null;if(a*o>16e6)return null;var l=r.makeLayer(s,n);if(null!=i){var u=h.indexOf(i)+1;h.splice(u,0,l)}else(void 0===e.insert||e.insert)&&h.unshift(l);return l};if(r.skipping&&!a)return null;for(var d=null,p=t.length/1,f=!a,g=0;g<t.length;g++){var m=t[g],y=m._private.rscratch,v=y.imgLayerCaches=y.imgLayerCaches||{},x=v[n];if(x)d=x;else{if((!d||d.eles.length>=p||!dn(d.bb,m.boundingBox()))&&!(d=u({insert:!0,after:d})))return null;o||f?r.queueLayer(d,m):r.drawEleInLayer(d,m,n,e),d.eles.push(m),v[n]=d}}return o||(f?null:h)},bu.getEleLevelForLayerLevel=function(t,e){return t},bu.drawEleInLayer=function(t,e,n,r){var i=this.renderer,a=t.context,s=e.boundingBox();0!==s.w&&0!==s.h&&e.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(a,!1),i.drawCachedElement(a,e,null,null,n,true),i.setImgSmoothing(a,!0))},bu.levelIsComplete=function(t,e){var n=this.layersByLevel[t];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var a=n[i];if(a.reqs>0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===e.length},bu.validateLayersElesOrdering=function(t,e){var n=this.layersByLevel[t];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],a=-1,s=0;s<e.length;s++)if(i.eles[0]===e[s]){a=s;break}if(a<0)this.invalidateLayer(i);else{var o=a;for(s=0;s<i.eles.length;s++)if(i.eles[s]!==e[o+s]){this.invalidateLayer(i);break}}}},bu.updateElementsInLayers=function(t,e){for(var n=et(t[0]),r=0;r<t.length;r++)for(var i=n?null:t[r],a=n?t[r]:t[r].ele,s=a._private.rscratch,o=s.imgLayerCaches=s.imgLayerCaches||{},l=-4;l<=2;l++){var c=o[l];c&&(i&&this.getEleLevelForLayerLevel(c.level)!==i.level||e(c,a,i))}},bu.haveLayers=function(){for(var t=!1,e=-4;e<=2;e++){var n=this.layersByLevel[e];if(n&&n.length>0){t=!0;break}}return t},bu.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=Bt(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,function(t,n,r){e.invalidateLayer(t)}))},bu.invalidateLayer=function(t){if(this.lastInvalidationTime=Bt(),!t.invalid){var e=t.level,n=t.eles,r=this.layersByLevel[e];pe(r,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<n.length;i++){var a=n[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},bu.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(t,n,r){var i=t.replacement;if(i||((i=t.replacement=e.makeLayer(t.bb,t.level)).replaces=t,i.eles=t.eles),!i.reqs)for(var a=0;a<i.eles.length;a++)e.queueLayer(i,i.eles[a])})},bu.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},bu.queueLayer=function(t,e){var n=this.layersQueue,r=t.elesQueue,i=r.hasId=r.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;r.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}},bu.dequeue=function(t){for(var e=this,n=e.layersQueue,r=[],i=0;i<1&&0!==n.size();){var a=n.peek();if(a.replacement)n.pop();else if(a.replaces&&a!==a.replaces.replacement)n.pop();else if(a.invalid)n.pop();else{var s=a.elesQueue.shift();s&&(e.drawEleInLayer(a,s,a.level,t),i++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(n.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}}return r},bu.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],n=t.replaces,r=e.indexOf(n);if(!(r<0||n.invalid)){e[r]=t;for(var i=0;i<t.eles.length;i++){var a=t.eles[i]._private,s=a.imgLayerCaches=a.imgLayerCaches||{};s&&(s[t.level]=t)}this.requestRedraw()}},bu.requestRedraw=Nt(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),bu.setupDequeueing=du({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e){return t.dequeue(e)},onDeqd:ie,shouldRedraw:ee,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var ku,Eu={};function Au(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.lineTo(r.x,r.y)}}function _u(t,e,n){for(var r,i=0;i<e.length;i++){var a=e[i];0===i&&(r=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(n.x,n.y,r.x,r.y)}function Cu(t,e,n){t.beginPath&&t.beginPath();for(var r=e,i=0;i<r.length;i++){var a=r[i];t.lineTo(a.x,a.y)}var s=n,o=n[0];t.moveTo(o.x,o.y);for(i=1;i<s.length;i++){a=s[i];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function Su(t,e,n,r,i){t.beginPath&&t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1);var a=e,s=a[0];t.moveTo(s.x,s.y);for(var o=0;o<a.length;o++){var l=a[o];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}function Ru(t,e,n,r){t.arc(e,n,r,0,2*Math.PI,!1)}Eu.arrowShapeImpl=function(t){return(ku||(ku={polygon:Au,"triangle-backcurve":_u,"triangle-tee":Cu,"circle-triangle":Su,"triangle-cross":Cu,circle:Ru}))[t]};var Lu={drawElement:function(t,e,n,r,i,a){e.isNode()?this.drawNode(t,e,n,r,i,a):this.drawEdge(t,e,n,r,i,a)},drawElementOverlay:function(t,e){e.isNode()?this.drawNodeOverlay(t,e):this.drawEdgeOverlay(t,e)},drawElementUnderlay:function(t,e){e.isNode()?this.drawNodeUnderlay(t,e):this.drawEdgeUnderlay(t,e)},drawCachedElementPortion:function(t,e,n,r,i,a,s,o){var l=this,c=n.getBoundingBox(e);if(0!==c.w&&0!==c.h){var h=n.getElement(e,c,r,i,a);if(null!=h){var u=o(l,e);if(0===u)return;var d,p,f,g,m,y,v=s(l,e),x=c.x1,b=c.y1,w=c.w,T=c.h;if(0!==v){var k=n.getRotationPoint(e);f=k.x,g=k.y,t.translate(f,g),t.rotate(v),(m=l.getImgSmoothing(t))||l.setImgSmoothing(t,!0);var E=n.getRotationOffset(e);d=E.x,p=E.y}else d=x,p=b;1!==u&&(y=t.globalAlpha,t.globalAlpha=y*u),t.drawImage(h.texture.canvas,h.x,0,h.width,h.height,d,p,w,T),1!==u&&(t.globalAlpha=y),0!==v&&(t.rotate(-v),t.translate(-f,-g),m||l.setImgSmoothing(t,!1))}else n.drawElement(t,e)}}},Du=function(){return 0},Iu=function(t,e){return t.getTextAngle(e,null)},Nu=function(t,e){return t.getTextAngle(e,"source")},Mu=function(t,e){return t.getTextAngle(e,"target")},Ou=function(t,e){return e.effectiveOpacity()},Pu=function(t,e){return e.pstyle("text-opacity").pfValue*e.effectiveOpacity()};Lu.drawCachedElement=function(t,e,n,r,i,a){var s=this,o=s.data,l=o.eleTxrCache,c=o.lblTxrCache,h=o.slbTxrCache,u=o.tlbTxrCache,d=e.boundingBox(),p=!0===a?l.reasons.highQuality:null;if(0!==d.w&&0!==d.h&&e.visible()&&(!r||cn(d,r))){var f=e.isEdge(),g=e.element()._private.rscratch.badLine;s.drawElementUnderlay(t,e),s.drawCachedElementPortion(t,e,l,n,i,p,Du,Ou),f&&g||s.drawCachedElementPortion(t,e,c,n,i,p,Iu,Pu),f&&!g&&(s.drawCachedElementPortion(t,e,h,n,i,p,Nu,Pu),s.drawCachedElementPortion(t,e,u,n,i,p,Mu,Pu)),s.drawElementOverlay(t,e)}},Lu.drawElements=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];this.drawElement(t,r)}},Lu.drawCachedElements=function(t,e,n,r){for(var i=0;i<e.length;i++){var a=e[i];this.drawCachedElement(t,a,n,r)}},Lu.drawCachedNodes=function(t,e,n,r){for(var i=0;i<e.length;i++){var a=e[i];a.isNode()&&this.drawCachedElement(t,a,n,r)}},Lu.drawLayeredElements=function(t,e,n,r){var i=this.data.lyrTxrCache.getLayers(e,n);if(i)for(var a=0;a<i.length;a++){var s=i[a],o=s.bb;0!==o.w&&0!==o.h&&t.drawImage(s.canvas,o.x1,o.y1,o.w,o.h)}else this.drawCachedElements(t,e,n,r)};var $u={drawEdge:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=this,o=e._private.rscratch;if((!a||e.visible())&&!o.badLine&&null!=o.allpts&&!isNaN(o.allpts[0])){var l;n&&(l=n,t.translate(-l.x1,-l.y1));var c=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,u=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,f=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,m=e.pstyle("line-outline-color").value,y=c*h,v=c*h,x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===u?(s.eleStrokeStyle(t,e,n),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=f,s.eleStrokeStyle(t,e,n),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;s.drawArrowheads(t,e,n)};if(t.lineJoin="round","yes"===e.pstyle("ghost").value){var w=e.pstyle("ghost-offset-x").pfValue,T=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,E=y*k;t.translate(w,T),x(E),b(E),t.translate(-w,-T)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;t.lineWidth=p+g,t.lineCap=f,g>0?(s.colorStrokeStyle(t,m[0],m[1],m[2],n),"straight-triangle"===u?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")):t.lineCap="butt"}();i&&s.drawEdgeUnderlay(t,e),x(),b(),i&&s.drawEdgeOverlay(t,e),s.drawElementText(t,e,null,r),n&&t.translate(l.x1,l.y1)}}},Bu=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,n){if(n.visible()){var r=n.pstyle("".concat(t,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),s=n._private.rscratch,o=2*n.pstyle("".concat(t,"-padding")).pfValue,l=n.pstyle("".concat(t,"-color")).value;e.lineWidth=o,"self"!==s.edgeType||a?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,l[0],l[1],l[2],r),i.drawEdgePath(n,e,s.allpts,"solid")}}}};$u.drawEdgeOverlay=Bu("overlay"),$u.drawEdgeUnderlay=Bu("underlay"),$u.drawEdgePath=function(t,e,n,r){var i,a=t._private.rscratch,o=e,l=!1,c=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,u=t.pstyle("line-dash-offset").pfValue;if(c){var d=n.join("$");a.pathCacheKey&&a.pathCacheKey===d?(i=e=a.pathCache,l=!0):(i=e=new Path2D,a.pathCacheKey=d,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(h),o.lineDashOffset=u;break;case"solid":o.setLineDash([])}if(!l&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+3<n.length;p+=4)e.quadraticCurveTo(n[p],n[p+1],n[p+2],n[p+3]);break;case"straight":case"haystack":for(var f=2;f+1<n.length;f+=2)e.lineTo(n[f],n[f+1]);break;case"segments":if(a.isRound){var g,m=s(a.roundCorners);try{for(m.s();!(g=m.n()).done;){Kh(e,g.value)}}catch(v){m.e(v)}finally{m.f()}e.lineTo(n[n.length-2],n[n.length-1])}else for(var y=2;y+1<n.length;y+=2)e.lineTo(n[y],n[y+1])}e=o,c?e.stroke(i):e.stroke(),e.setLineDash&&e.setLineDash([])},$u.drawEdgeTrianglePath=function(t,e,n){e.fillStyle=e.strokeStyle;for(var r=t.pstyle("width").pfValue,i=0;i+1<n.length;i+=2){var a=[n[i+2]-n[i],n[i+3]-n[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),o=[a[1]/s,-a[0]/s],l=[o[0]*r/2,o[1]*r/2];e.beginPath(),e.moveTo(n[i]-l[0],n[i+1]-l[1]),e.lineTo(n[i]+l[0],n[i+1]+l[1]),e.lineTo(n[i+2],n[i+3]),e.closePath(),e.fill()}},$u.drawArrowheads=function(t,e,n){var r=e._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(t,e,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(t,e,"mid-target",r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(t,e,"mid-source",r.midX,r.midY,r.midsrcArrowAngle,n),i||this.drawArrowhead(t,e,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},$u.drawArrowhead=function(t,e,n,r,i,a,s){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(a)||null==a)){var o=this,l=e.pstyle(n+"-arrow-shape").value;if("none"!==l){var c="hollow"===e.pstyle(n+"-arrow-fill").value?"both":"filled",h=e.pstyle(n+"-arrow-fill").value,u=e.pstyle("width").pfValue,d=e.pstyle(n+"-arrow-width"),p="match-line"===d.value?u:d.pfValue;"%"===d.units&&(p*=u);var f=e.pstyle("opacity").value;void 0===s&&(s=f);var g=t.globalCompositeOperation;1===s&&"hollow"!==h||(t.globalCompositeOperation="destination-out",o.colorFillStyle(t,255,255,255,1),o.colorStrokeStyle(t,255,255,255,1),o.drawArrowShape(e,t,c,u,l,p,r,i,a),t.globalCompositeOperation=g);var m=e.pstyle(n+"-arrow-color").value;o.colorFillStyle(t,m[0],m[1],m[2],s),o.colorStrokeStyle(t,m[0],m[1],m[2],s),o.drawArrowShape(e,t,h,u,l,p,r,i,a)}}},$u.drawArrowShape=function(t,e,n,r,i,a,s,o,l){var c,h=this,u=this.usePaths()&&"triangle-cross"!==i,d=!1,p=e,f={x:s,y:o},g=t.pstyle("arrow-scale").value,m=this.getArrowWidth(r,g),y=h.arrowShapes[i];if(u){var v=h.arrowPathCache=h.arrowPathCache||[],x=Wt(i),b=v[x];null!=b?(c=e=b,d=!0):(c=e=new Path2D,v[x]=c)}d||(e.beginPath&&e.beginPath(),u?y.draw(e,1,0,{x:0,y:0},1):y.draw(e,m,l,f,r),e.closePath&&e.closePath()),e=p,u&&(e.translate(s,o),e.rotate(l),e.scale(m,m)),"filled"!==n&&"both"!==n||(u?e.fill(c):e.fill()),"hollow"!==n&&"both"!==n||(e.lineWidth=a/(u?m:1),e.lineJoin="miter",u?e.stroke(c):e.stroke()),u&&(e.scale(1/m,1/m),e.rotate(-l),e.translate(-s,-o))};var Fu={safeDrawImage:function(t,e,n,r,i,a,s,o,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{t.drawImage(e,n,r,i,a,s,o,l,c)}catch(h){oe(h)}},drawInscribedImage:function(t,e,n,r,i){var a=this,s=n.position(),o=s.x,l=s.y,c=n.cy().style(),h=c.getIndexedStyle.bind(c),u=h(n,"background-fit","value",r),d=h(n,"background-repeat","value",r),p=n.width(),f=n.height(),g=2*n.padding(),m=p+("inner"===h(n,"background-width-relative-to","value",r)?0:g),y=f+("inner"===h(n,"background-height-relative-to","value",r)?0:g),v=n._private.rscratch,x="node"===h(n,"background-clip","value",r),b=h(n,"background-image-opacity","value",r)*i,w=h(n,"background-image-smoothing","value",r),T=n.pstyle("corner-radius").value;"auto"!==T&&(T=n.pstyle("corner-radius").pfValue);var k=e.width||e.cachedW,E=e.height||e.cachedH;null!=k&&null!=E||(document.body.appendChild(e),k=e.cachedW=e.width||e.offsetWidth,E=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var A=k,_=E;if("auto"!==h(n,"background-width","value",r)&&(A="%"===h(n,"background-width","units",r)?h(n,"background-width","pfValue",r)*m:h(n,"background-width","pfValue",r)),"auto"!==h(n,"background-height","value",r)&&(_="%"===h(n,"background-height","units",r)?h(n,"background-height","pfValue",r)*y:h(n,"background-height","pfValue",r)),0!==A&&0!==_){if("contain"===u)A*=C=Math.min(m/A,y/_),_*=C;else if("cover"===u){var C;A*=C=Math.max(m/A,y/_),_*=C}var S=o-m/2,R=h(n,"background-position-x","units",r),L=h(n,"background-position-x","pfValue",r);S+="%"===R?(m-A)*L:L;var D=h(n,"background-offset-x","units",r),I=h(n,"background-offset-x","pfValue",r);S+="%"===D?(m-A)*I:I;var N=l-y/2,M=h(n,"background-position-y","units",r),O=h(n,"background-position-y","pfValue",r);N+="%"===M?(y-_)*O:O;var P=h(n,"background-offset-y","units",r),$=h(n,"background-offset-y","pfValue",r);N+="%"===P?(y-_)*$:$,v.pathCache&&(S-=o,N-=l,o=0,l=0);var B=t.globalAlpha;t.globalAlpha=b;var F=a.getImgSmoothing(t),z=!1;if("no"===w&&F?(a.setImgSmoothing(t,!1),z=!0):"yes"!==w||F||(a.setImgSmoothing(t,!0),z=!0),"no-repeat"===d)x&&(t.save(),v.pathCache?t.clip(v.pathCache):(a.nodeShapes[a.getNodeShape(n)].draw(t,o,l,m,y,T,v),t.clip())),a.safeDrawImage(t,e,0,0,k,E,S,N,A,_),x&&t.restore();else{var K=t.createPattern(e,d);t.fillStyle=K,a.nodeShapes[a.getNodeShape(n)].draw(t,o,l,m,y,T,v),t.translate(S,N),t.fill(),t.translate(-S,-N)}t.globalAlpha=B,z&&a.setImgSmoothing(t,F)}}},zu={};function Ku(t,e,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5,s=Math.min(a,r/2,i/2);t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+r-s,n),t.quadraticCurveTo(e+r,n,e+r,n+s),t.lineTo(e+r,n+i-s),t.quadraticCurveTo(e+r,n+i,e+r-s,n+i),t.lineTo(e+s,n+i),t.quadraticCurveTo(e,n+i,e,n+i-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()}zu.eleTextBiggerThanMin=function(t,e){if(!e){var n=t.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Ve(n*r));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e<t.pstyle("min-zoomed-font-size").pfValue)},zu.drawElementText=function(t,e,n,r,i){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=this;if(null==r){if(a&&!s.eleTextBiggerThanMin(e))return}else if(!1===r)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,h=e.pstyle("label"),u=e.pstyle("source-label"),d=e.pstyle("target-label");if(c||(!h||!h.value)&&(!u||!u.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p,f=!n;n&&(p=n,t.translate(-p.x1,-p.y1)),null==i?(s.drawText(t,e,null,f,a),e.isEdge()&&(s.drawText(t,e,"source",f,a),s.drawText(t,e,"target",f,a))):s.drawText(t,e,i,f,a),n&&t.translate(p.x1,p.y1)},zu.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((e=this.fontCaches[n]).context===t)return e;return e={context:t},this.fontCaches.push(e),e},zu.setupTextStyle=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=n?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,c=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=r+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)},zu.getTextAngle=function(t,e){var n,r=t._private.rscratch,i=e?e+"-":"",a=t.pstyle(i+"text-rotation");if("autorotate"===a.strValue){var s=ge(r,"labelAngle",e);n=t.isEdge()?s:0}else n="none"===a.strValue?0:a.pfValue;return n},zu.drawText=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private.rscratch,s=i?e.effectiveOpacity():1;if(!i||0!==s&&0!==e.pstyle("text-opacity").value){"main"===n&&(n=null);var o,l,c=ge(a,"labelX",n),h=ge(a,"labelY",n),u=this.getLabelText(e,n);if(null!=u&&""!==u&&!isNaN(c)&&!isNaN(h)){this.setupTextStyle(t,e,i);var d,p=n?n+"-":"",f=ge(a,"labelWidth",n),g=ge(a,"labelHeight",n),m=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,v=e.isEdge(),x=e.pstyle("text-halign").value,b=e.pstyle("text-valign").value;switch(v&&(x="center",b="center"),c+=m,h+=y,0!==(d=r?this.getTextAngle(e,n):0)&&(o=c,l=h,t.translate(o,l),t.rotate(d),c=0,h=0),b){case"top":break;case"center":h+=g/2;break;case"bottom":h+=g}var w=e.pstyle("text-background-opacity").value,T=e.pstyle("text-border-opacity").value,k=e.pstyle("text-border-width").pfValue,E=e.pstyle("text-background-padding").pfValue,A=e.pstyle("text-background-shape").strValue,_="round-rectangle"===A||"roundrectangle"===A,C="circle"===A;if(w>0||k>0&&T>0){var S=t.fillStyle,R=t.strokeStyle,L=t.lineWidth,D=e.pstyle("text-background-color").value,I=e.pstyle("text-border-color").value,N=e.pstyle("text-border-style").value,M=w>0,O=k>0&&T>0,P=c-E;switch(x){case"left":P-=f;break;case"center":P-=f/2}var $=h-g-E,B=f+2*E,F=g+2*E;if(M&&(t.fillStyle="rgba(".concat(D[0],",").concat(D[1],",").concat(D[2],",").concat(w*s,")")),O&&(t.strokeStyle="rgba(".concat(I[0],",").concat(I[1],",").concat(I[2],",").concat(T*s,")"),t.lineWidth=k,t.setLineDash))switch(N){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=k/4,t.setLineDash([]);break;default:t.setLineDash([])}if(_?(t.beginPath(),Ku(t,P,$,B,F,2)):C?(t.beginPath(),function(t,e,n,r,i){var a=Math.min(r,i)/2,s=e+r/2,o=n+i/2;t.beginPath(),t.arc(s,o,a,0,2*Math.PI),t.closePath()}(t,P,$,B,F)):(t.beginPath(),t.rect(P,$,B,F)),M&&t.fill(),O&&t.stroke(),O&&"double"===N){var z=k/2;t.beginPath(),_?Ku(t,P+z,$+z,B-2*z,F-2*z,2):t.rect(P+z,$+z,B-2*z,F-2*z),t.stroke()}t.fillStyle=S,t.strokeStyle=R,t.lineWidth=L,t.setLineDash&&t.setLineDash([])}var K=2*e.pstyle("text-outline-width").pfValue;if(K>0&&(t.lineWidth=K),"wrap"===e.pstyle("text-wrap").value){var q=ge(a,"labelWrapCachedLines",n),U=ge(a,"labelLineHeight",n),j=f/2,Y=this.getLabelJustification(e);switch("auto"===Y||("left"===x?"left"===Y?c+=-f:"center"===Y&&(c+=-j):"center"===x?"left"===Y?c+=-j:"right"===Y&&(c+=j):"right"===x&&("center"===Y?c+=j:"right"===Y&&(c+=f))),b){case"top":case"center":case"bottom":h-=(q.length-1)*U}for(var G=0;G<q.length;G++)K>0&&t.strokeText(q[G],c,h),t.fillText(q[G],c,h),h+=U}else K>0&&t.strokeText(u,c,h),t.fillText(u,c,h);0!==d&&(t.rotate(-d),t.translate(-o,-l))}}};var qu={drawNode:function(t,e,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,c=e._private,h=c.rscratch,u=e.position();if(Q(u.x)&&Q(u.y)&&(!o||e.visible())){var d,p,f=o?e.effectiveOpacity():1,g=l.usePaths(),m=!1,y=e.padding();r=e.width()+2*y,i=e.height()+2*y,n&&(p=n,t.translate(-p.x1,-p.y1));for(var v=e.pstyle("background-image").value,x=new Array(v.length),b=new Array(v.length),w=0,T=0;T<v.length;T++){var k=v[T];if(x[T]=null!=k&&"none"!==k){var E=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",T);w++,b[T]=l.getCachedImage(k,E,function(){c.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var A=e.pstyle("background-blacken").value,_=e.pstyle("border-width").pfValue,C=e.pstyle("background-opacity").value*f,S=e.pstyle("border-color").value,R=e.pstyle("border-style").value,L=e.pstyle("border-join").value,D=e.pstyle("border-cap").value,I=e.pstyle("border-position").value,N=e.pstyle("border-dash-pattern").pfValue,M=e.pstyle("border-dash-offset").pfValue,O=e.pstyle("border-opacity").value*f,P=e.pstyle("outline-width").pfValue,$=e.pstyle("outline-color").value,B=e.pstyle("outline-style").value,F=e.pstyle("outline-opacity").value*f,z=e.pstyle("outline-offset").value,K=e.pstyle("corner-radius").value;"auto"!==K&&(K=e.pstyle("corner-radius").pfValue);var q=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;l.eleFillStyle(t,e,n)},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;l.colorStrokeStyle(t,S[0],S[1],S[2],e)},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(t,$[0],$[1],$[2],e)},Y=function(t,e,n,r){var i,a=l.nodePathCache=l.nodePathCache||[],s=Vt("polygon"===n?n+","+r.join(","):n,""+e,""+t,""+K),o=a[s],c=!1;return null!=o?(i=o,c=!0,h.pathCache=i):(i=new Path2D,a[s]=h.pathCache=i),{path:i,cacheHit:c}},G=e.pstyle("shape").strValue,W=e.pstyle("shape-polygon-points").pfValue;if(g){t.translate(u.x,u.y);var V=Y(r,i,G,W);d=V.path,m=V.cacheHit}var H=function(){if(!m){var n=u;g&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(e)].draw(d||t,n.x,n.y,r,i,K,h)}g?t.fill(d):t.fill()},X=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=c.backgrounding,a=0,s=0;s<b.length;s++){var o=e.cy().style().getIndexedStyle(e,"background-image-containment","value",s);r&&"over"===o||!r&&"inside"===o?a++:x[s]&&b[s].complete&&!b[s].error&&(a++,l.drawInscribedImage(t,b[s],e,s,n))}c.backgrounding=!(a===w),i!==c.backgrounding&&e.updateStyle(!1)},Z=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(e)&&(l.drawPie(t,e,a),n&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,r,i,K,h)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasStripe(e)&&(t.save(),g?t.clip(h.pathCache):(l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,r,i,K,h),t.clip()),l.drawStripe(t,e,a),t.restore(),n&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,r,i,K,h)))},tt=function(){var e=(A>0?A:-A)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),n=A>0?0:255;0!==A&&(l.colorFillStyle(t,n,n,n,e),g?t.fill(d):t.fill())},et=function(){if(_>0){if(t.lineWidth=_,t.lineCap=D,t.lineJoin=L,t.setLineDash)switch(R){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(N),t.lineDashOffset=M;break;case"solid":case"double":t.setLineDash([])}if("center"!==I){if(t.save(),t.lineWidth*=2,"inside"===I)g?t.clip(d):t.clip();else{var e=new Path2D;e.rect(-r/2-_,-i/2-_,r+2*_,i+2*_),e.addPath(d),t.clip(e,"evenodd")}g?t.stroke(d):t.stroke(),t.restore()}else g?t.stroke(d):t.stroke();if("double"===R){t.lineWidth=_/3;var n=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(d):t.stroke(),t.globalCompositeOperation=n}t.setLineDash&&t.setLineDash([])}},nt=function(){if(P>0){if(t.lineWidth=P,t.lineCap="butt",t.setLineDash)switch(B){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var n=u;g&&(n={x:0,y:0});var a=l.getNodeShape(e),s=_;"inside"===I&&(s=0),"outside"===I&&(s*=2);var o,c=(r+s+(P+z))/r,h=(i+s+(P+z))/i,d=r*c,p=i*h,f=l.nodeShapes[a].points;if(g)o=Y(d,p,a,f).path;if("ellipse"===a)l.drawEllipsePath(o||t,n.x,n.y,d,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var m=0,y=0,v=0;"round-diamond"===a?m=1.4*(s+z+P):"round-heptagon"===a?(m=1.075*(s+z+P),v=-(s/2+z+P)/35):"round-hexagon"===a?m=1.12*(s+z+P):"round-pentagon"===a?(m=1.13*(s+z+P),v=-(s/2+z+P)/15):"round-tag"===a?(m=1.12*(s+z+P),y=.07*(s/2+P+z)):"round-triangle"===a&&(m=(s+z+P)*(Math.PI/2),v=-(s+z/2+P)/Math.PI),0!==m&&(d=r*(c=(r+m)/r),["round-hexagon","round-tag"].includes(a)||(p=i*(h=(i+m)/i)));for(var x=d/2,b=p/2,w=(K="auto"===K?On(d,p):K)+(s+P+z)/2,T=new Array(f.length/2),k=new Array(f.length/2),E=0;E<f.length/2;E++)T[E]={x:n.x+y+x*f[2*E],y:n.y+v+b*f[2*E+1]};var A,C,S,R,L=T.length;for(C=T[L-1],A=0;A<L;A++)S=T[A%L],R=T[(A+1)%L],k[A]=qh(C,S,R,w),C=S,S=R;l.drawRoundPolygonPath(o||t,n.x+y,n.y+v,r*c,i*h,f,k)}else if(["roundrectangle","round-rectangle"].includes(a))K="auto"===K?Mn(d,p):K,l.drawRoundRectanglePath(o||t,n.x,n.y,d,p,K+(s+P+z)/2);else if(["cutrectangle","cut-rectangle"].includes(a))K="auto"===K?8:K,l.drawCutRectanglePath(o||t,n.x,n.y,d,p,null,K+(s+P+z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(a))K="auto"===K?Mn(d,p):K,l.drawBottomRoundRectanglePath(o||t,n.x,n.y,d,p,K+(s+P+z)/2);else if("barrel"===a)l.drawBarrelPath(o||t,n.x,n.y,d,p);else if(a.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(a)){f=Tn(kn(f,(s+P+z)/r)),l.drawPolygonPath(o||t,n.x,n.y,r,i,f)}else{f=Tn(kn(f,-((s+P+z)/r))),l.drawPolygonPath(o||t,n.x,n.y,r,i,f)}if(g?t.stroke(o):t.stroke(),"double"===B){t.lineWidth=s/3;var D=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(o):t.stroke(),t.globalCompositeOperation=D}t.setLineDash&&t.setLineDash([])}};if("yes"===e.pstyle("ghost").value){var rt=e.pstyle("ghost-offset-x").pfValue,it=e.pstyle("ghost-offset-y").pfValue,at=e.pstyle("ghost-opacity").value,st=at*f;t.translate(rt,it),j(),nt(),q(at*C),H(),X(st,!0),U(at*O),et(),Z(0!==A||0!==_),J(0!==A||0!==_),X(st,!1),tt(st),t.translate(-rt,-it)}g&&t.translate(-u.x,-u.y),s&&l.drawNodeUnderlay(t,e,u,r,i),g&&t.translate(u.x,u.y),j(),nt(),q(),H(),X(f,!0),U(),et(),Z(0!==A||0!==_),J(0!==A||0!==_),X(f,!1),tt(),g&&t.translate(-u.x,-u.y),l.drawElementText(t,e,null,a),s&&l.drawNodeOverlay(t,e,u,r,i),n&&t.translate(p.x1,p.y1)}}},Uu=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,n,r,i,a){if(n.visible()){var s=n.pstyle("".concat(t,"-padding")).pfValue,o=n.pstyle("".concat(t,"-opacity")).value,l=n.pstyle("".concat(t,"-color")).value,c=n.pstyle("".concat(t,"-shape")).value,h=n.pstyle("".concat(t,"-corner-radius")).value;if(o>0){if(r=r||n.position(),null==i||null==a){var u=n.padding();i=n.width()+2*u,a=n.height()+2*u}this.colorFillStyle(e,l[0],l[1],l[2],o),this.nodeShapes[c].draw(e,r.x,r.y,i+2*s,a+2*s,h),e.fill()}}}};qu.drawNodeOverlay=Uu("overlay"),qu.drawNodeUnderlay=Uu("underlay"),qu.hasPie=function(t){return(t=t[0])._private.hasPie},qu.hasStripe=function(t){return(t=t[0])._private.hasStripe},qu.drawPie=function(t,e,n,r){e=e[0],r=r||e.position();var i,a=e.cy().style(),s=e.pstyle("pie-size"),o=e.pstyle("pie-hole"),l=e.pstyle("pie-start-angle").pfValue,c=r.x,h=r.y,u=e.width(),d=e.height(),p=Math.min(u,d)/2,f=0;if(this.usePaths()&&(c=0,h=0),"%"===s.units?p*=s.pfValue:void 0!==s.pfValue&&(p=s.pfValue/2),"%"===o.units?i=p*o.pfValue:void 0!==o.pfValue&&(i=o.pfValue/2),!(i>=p))for(var g=1;g<=a.pieBackgroundN;g++){var m=e.pstyle("pie-"+g+"-background-size").value,y=e.pstyle("pie-"+g+"-background-color").value,v=e.pstyle("pie-"+g+"-background-opacity").value*n,x=m/100;x+f>1&&(x=1-f);var b=1.5*Math.PI+2*Math.PI*f,w=(b+=l)+2*Math.PI*x;0===m||f>=1||f+x>1||(0===i?(t.beginPath(),t.moveTo(c,h),t.arc(c,h,p,b,w),t.closePath()):(t.beginPath(),t.arc(c,h,p,b,w),t.arc(c,h,i,w,b,!0),t.closePath()),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),f+=x)}},qu.drawStripe=function(t,e,n,r){e=e[0],r=r||e.position();var i=e.cy().style(),a=r.x,s=r.y,o=e.width(),l=e.height(),c=0,h=this.usePaths();t.save();var u=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(u){case"vertical":break;case"righward":t.rotate(-Math.PI/2)}var p=o,f=l;"%"===d.units?(p*=d.pfValue,f*=d.pfValue):void 0!==d.pfValue&&(p=d.pfValue,f=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=f/2;for(var g=1;g<=i.stripeBackgroundN;g++){var m=e.pstyle("stripe-"+g+"-background-size").value,y=e.pstyle("stripe-"+g+"-background-color").value,v=e.pstyle("stripe-"+g+"-background-opacity").value*n,x=m/100;x+c>1&&(x=1-c),0===m||c>=1||c+x>1||(t.beginPath(),t.rect(a,s+f*c,p,f*x),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),c+=x)}t.restore()};var ju,Yu={};function Gu(t,e,n){var r=t.createShader(e);if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(r));return r}function Wu(t,e,n){void 0===n&&(n=e);var r=t.makeOffscreenCanvas(e,n),i=r.context=r.getContext("2d");return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}function Vu(t){var e=t.pixelRatio,n=t.cy.zoom(),r=t.cy.pan();return{zoom:n*e,pan:{x:r.x*e,y:r.y*e}}}function Hu(t){return"solid"===t.pstyle("background-fill").value&&("none"===t.pstyle("background-image").strValue&&(0===t.pstyle("border-width").value||(0===t.pstyle("border-opacity").value||"solid"===t.pstyle("border-style").value)))}function Xu(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Zu(t,e,n){var r=t[0]/255,i=t[1]/255,a=t[2]/255,s=e,o=n||new Array(4);return o[0]=r*s,o[1]=i*s,o[2]=a*s,o[3]=s,o}function Qu(t,e){var n=e||new Array(4);return n[0]=(255&t)/255,n[1]=(t>>8&255)/255,n[2]=(t>>16&255)/255,n[3]=(t>>24&255)/255,n}function Ju(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function td(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function ed(t,e,n){switch(e){case t.FLOAT:return new Float32Array(n);case t.INT:return new Int32Array(n)}}function nd(t,e,n,r,i,a){switch(e){case t.FLOAT:return new Float32Array(n.buffer,a*r,i);case t.INT:return new Int32Array(n.buffer,a*r,i)}}function rd(t,e,n,r){var i=l(td(t,n),3),a=i[0],s=i[1],o=i[2],c=ed(t,s,e*a),h=a*o,u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(r),s===t.FLOAT?t.vertexAttribPointer(r,a,s,!1,h,0):s===t.INT&&t.vertexAttribIPointer(r,a,s,h,0),t.vertexAttribDivisor(r,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;p<e;p++)d[p]=nd(t,s,c,h,a,p);return u.dataArray=c,u.stride=h,u.size=a,u.getView=function(t){return d[t]},u.setPoint=function(t,e,n){var r=d[t];r[0]=e,r[1]=n},u.bufferSubData=function(e){t.bindBuffer(t.ARRAY_BUFFER,u),e?t.bufferSubData(t.ARRAY_BUFFER,0,c,0,e*a):t.bufferSubData(t.ARRAY_BUFFER,0,c)},u}Yu.getPixelRatio=function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=this.cy.window(),n=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/n},Yu.paintCache=function(t){for(var e,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((e=n[i]).context===t){r=!1;break}return r&&(e={context:t},n.push(e)),e},Yu.createGradientStyleFor=function(t,e,n,r,i){var a,s=this.usePaths(),o=n.pstyle(e+"-gradient-stop-colors").value,l=n.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===r)if(n.isEdge()){var c=n.sourceEndpoint(),h=n.targetEndpoint(),u=n.midpoint(),d=Xe(c,u),p=Xe(h,u);a=t.createRadialGradient(u.x,u.y,0,u.x,u.y,Math.max(d,p))}else{var f=s?{x:0,y:0}:n.position(),g=n.paddedWidth(),m=n.paddedHeight();a=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(g,m))}else if(n.isEdge()){var y=n.sourceEndpoint(),v=n.targetEndpoint();a=t.createLinearGradient(y.x,y.y,v.x,v.y)}else{var x=s?{x:0,y:0}:n.position(),b=n.paddedWidth()/2,w=n.paddedHeight()/2;switch(n.pstyle("background-gradient-direction").value){case"to-bottom":a=t.createLinearGradient(x.x,x.y-w,x.x,x.y+w);break;case"to-top":a=t.createLinearGradient(x.x,x.y+w,x.x,x.y-w);break;case"to-left":a=t.createLinearGradient(x.x+b,x.y,x.x-b,x.y);break;case"to-right":a=t.createLinearGradient(x.x-b,x.y,x.x+b,x.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(x.x-b,x.y-w,x.x+b,x.y+w);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(x.x-b,x.y+w,x.x+b,x.y-w);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(x.x+b,x.y-w,x.x-b,x.y+w);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(x.x+b,x.y+w,x.x-b,x.y-w)}}if(!a)return null;for(var T=l.length===o.length,k=o.length,E=0;E<k;E++)a.addColorStop(T?l[E]:E/(k-1),"rgba("+o[E][0]+","+o[E][1]+","+o[E][2]+","+i+")");return a},Yu.gradientFillStyle=function(t,e,n,r){var i=this.createGradientStyleFor(t,"background",e,n,r);if(!i)return null;t.fillStyle=i},Yu.colorFillStyle=function(t,e,n,r,i){t.fillStyle="rgba("+e+","+n+","+r+","+i+")"},Yu.eleFillStyle=function(t,e,n){var r=e.pstyle("background-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientFillStyle(t,e,r,n);else{var i=e.pstyle("background-color").value;this.colorFillStyle(t,i[0],i[1],i[2],n)}},Yu.gradientStrokeStyle=function(t,e,n,r){var i=this.createGradientStyleFor(t,"line",e,n,r);if(!i)return null;t.strokeStyle=i},Yu.colorStrokeStyle=function(t,e,n,r,i){t.strokeStyle="rgba("+e+","+n+","+r+","+i+")"},Yu.eleStrokeStyle=function(t,e,n){var r=e.pstyle("line-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientStrokeStyle(t,e,r,n);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(t,i[0],i[1],i[2],n)}},Yu.matchCanvasSize=function(t){var e=this,n=e.data,r=e.findContainerClientCoords(),i=r[2],a=r[3],s=e.getPixelRatio(),o=e.motionBlurPxRatio;t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]&&t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG]||(s=o);var l,c=i*s,h=a*s;if(c!==e.canvasWidth||h!==e.canvasHeight){e.fontCaches=null;var u=n.canvasContainer;u.style.width=i+"px",u.style.height=a+"px";for(var d=0;d<e.CANVAS_LAYERS;d++)(l=n.canvases[d]).width=c,l.height=h,l.style.width=i+"px",l.style.height=a+"px";for(d=0;d<e.BUFFER_COUNT;d++)(l=n.bufferCanvases[d]).width=c,l.height=h,l.style.width=i+"px",l.style.height=a+"px";e.textureMult=1,s<=1&&(l=n.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,l.width=c*e.textureMult,l.height=h*e.textureMult),e.canvasWidth=c,e.canvasHeight=h,e.pixelRatio=s}},Yu.renderTo=function(t,e,n,r){this.render({forcedContext:t,forcedZoom:e,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},Yu.clearCanvas=function(){var t=this,e=t.data;function n(e){e.clearRect(0,0,t.canvasWidth,t.canvasHeight)}n(e.contexts[t.NODE]),n(e.contexts[t.DRAG])},Yu.render=function(t){var e=this;t=t||ue();var n=e.cy,r=t.forcedContext,i=t.drawAllLayers,a=t.drawOnlyNodeLayer,s=t.forcedZoom,o=t.forcedPan,l=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,c=e.data,h=c.canvasNeedsRedraw,u=e.textureOnViewport&&!r&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),d=void 0!==t.motionBlur?t.motionBlur:e.motionBlur,p=e.motionBlurPxRatio,f=n.hasCompoundNodes(),g=e.hoverData.draggingEles,m=!(!e.hoverData.selecting&&!e.touchData.selecting),y=d=d&&!r&&e.motionBlurEnabled&&!m;r||(e.prevPxRatio!==l&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=l),!r&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),d&&(null==e.mbFrames&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(y=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!u&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var v=n.style(),x=n.zoom(),b=void 0!==s?s:x,w=n.pan(),T={x:w.x,y:w.y},k={zoom:x,pan:{x:w.x,y:w.y}},E=e.prevViewport;void 0===E||k.zoom!==E.zoom||k.pan.x!==E.pan.x||k.pan.y!==E.pan.y||g&&!f||(e.motionBlurPxRatio=1),o&&(T=o),b*=l,T.x*=l,T.y*=l;var A=e.getCachedZSortedEles();function _(t,n,r,i,a){var s=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",e.colorFillStyle(t,255,255,255,e.motionBlurTransparency),t.fillRect(n,r,i,a),t.globalCompositeOperation=s}function C(t,n){var a,l,h,u;e.clearingMotionBlur||t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]&&t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]?(a=T,l=b,h=e.canvasWidth,u=e.canvasHeight):(a={x:w.x*p,y:w.y*p},l=x*p,h=e.canvasWidth*p,u=e.canvasHeight*p),t.setTransform(1,0,0,1,0,0),"motionBlur"===n?_(t,0,0,h,u):r||void 0!==n&&!n||t.clearRect(0,0,h,u),i||(t.translate(a.x,a.y),t.scale(l,l)),o&&t.translate(o.x,o.y),s&&t.scale(s,s)}if(u||(e.textureDrawLastFrame=!1),u){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=n.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var S=e.data.bufferContexts[e.TEXTURE_BUFFER];S.setTransform(1,0,0,1,0,0),S.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:S,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult}),(k=e.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:e.canvasWidth,height:e.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var R=c.contexts[e.NODE],L=e.textureCache.texture;k=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),d?_(R,0,0,k.width,k.height):R.clearRect(0,0,k.width,k.height);var D=v.core("outside-texture-bg-color").value,I=v.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,D[0],D[1],D[2],I),R.fillRect(0,0,k.width,k.height);x=n.zoom();C(R,!1),R.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),R.drawImage(L,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else e.textureOnViewport&&!r&&(e.textureCache=null);var N=n.extent(),M=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),O=e.hideEdgesOnViewport&&M,P=[];if(P[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,P[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),P[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,P[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||i||a||P[e.NODE]){var $=d&&!P[e.NODE]&&1!==p;C(R=r||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:c.contexts[e.NODE]),d&&!$?"motionBlur":void 0),O?e.drawCachedNodes(R,A.nondrag,l,N):e.drawLayeredElements(R,A.nondrag,l,N),e.debug&&e.drawDebugPoints(R,A.nondrag),i||d||(h[e.NODE]=!1)}if(!a&&(h[e.DRAG]||i||P[e.DRAG])){$=d&&!P[e.DRAG]&&1!==p;C(R=r||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:c.contexts[e.DRAG]),d&&!$?"motionBlur":void 0),O?e.drawCachedNodes(R,A.drag,l,N):e.drawCachedElements(R,A.drag,l,N),e.debug&&e.drawDebugPoints(R,A.drag),i||d||(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,C),d&&1!==p){var B=c.contexts[e.NODE],F=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],z=c.contexts[e.DRAG],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],q=function(t,n,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,e.canvasWidth,e.canvasHeight):_(t,0,0,e.canvasWidth,e.canvasHeight);var i=p;t.drawImage(n,0,0,e.canvasWidth*i,e.canvasHeight*i,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||P[e.NODE])&&(q(B,F,P[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||P[e.DRAG])&&(q(z,K,P[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=k,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!u,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},100)),r||n.emit("render")},Yu.drawSelectionRectangle=function(t,e){var n=this,r=n.cy,i=n.data,a=r.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=i.canvasNeedsRedraw,c=t.forcedContext;if(n.showFps||!s&&l[n.SELECT_BOX]&&!o){var h=c||i.contexts[n.SELECT_BOX];if(e(h),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var u=n.cy.zoom(),d=a.core("selection-box-border-width").value/u;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){u=n.cy.zoom();var p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/u,0,2*Math.PI),h.fill()}var f=n.lastRedrawTime;if(n.showFps&&f){f=Math.round(f);var g=Math.round(1e3/f),m="1 frame = "+f+" ms = "+g+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!ju){var y=h.measureText(m);ju=y.actualBoundingBoxAscent}h.fillText(m,0,ju);h.strokeRect(0,ju+10,250,20),h.fillRect(0,ju+10,250*Math.min(g/60,1),20)}o||(l[n.SELECT_BOX]=!1)}};var id="undefined"!=typeof Float32Array?Float32Array:Array;function ad(){var t=new id(9);return id!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function sd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function od(t,e,n){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=s,t[4]=o,t[5]=l,t[6]=d*r+p*s+c,t[7]=d*i+p*o+h,t[8]=d*a+p*l+u,t}function ld(t,e,n){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=Math.sin(n),p=Math.cos(n);return t[0]=p*r+d*s,t[1]=p*i+d*o,t[2]=p*a+d*l,t[3]=p*s-d*r,t[4]=p*o-d*i,t[5]=p*l-d*a,t[6]=c,t[7]=h,t[8]=u,t}function cd(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var hd=function(){return a(function t(e,n,r,a){i(this,t),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=a(e,n,n),this.scratch=a(e,n,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(t){var e=t.w,n=t.h,r=this.texHeight,i=this.texSize,a=r/n,s=e*a,o=n*a;return s>i&&(s=e*(a=i/e),o=n*a),{scale:a,texW:s,texH:o}}},{key:"draw",value:function(t,e,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var i=this.texSize,a=this.texRows,s=this.texHeight,o=this.getScale(e),l=o.scale,c=o.texW,h=o.texH,u=function(t,r){if(n&&r){var i=r.context,a=t.x,o=t.row,c=a,h=s*o;i.save(),i.translate(c,h),i.scale(l,l),n(i,e),i.restore()}},d=[null,null],p=function(){u(r.freePointer,r.canvas),d[0]={x:r.freePointer.x,y:r.freePointer.row*s,w:c,h},d[1]={x:r.freePointer.x+c,y:r.freePointer.row*s,w:0,h},r.freePointer.x+=c,r.freePointer.x==i&&(r.freePointer.x=0,r.freePointer.row++)},f=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+c<=i)p();else{if(this.freePointer.row>=a-1)return!1;this.freePointer.x===i?(f(),p()):this.enableWrapping?function(){var t=r.scratch,e=r.canvas;t.clear(),u({x:0,row:0},t);var n=i-r.freePointer.x,a=c-n,o=s,l=r.freePointer.x,p=r.freePointer.row*s,f=n;e.context.drawImage(t,0,0,f,o,l,p,f,o),d[0]={x:l,y:p,w:f,h};var g=n,m=(r.freePointer.row+1)*s,y=a;e&&e.context.drawImage(t,g,0,y,o,0,m,y,o),d[1]={x:0,y:m,w:y,h},r.freePointer.x=a,r.freePointer.row++}():(f(),p())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(t){if(this.locked)return!1;var e=this.texSize,n=this.texRows,r=this.getScale(t).texW;return!(this.freePointer.x+r>e)||this.freePointer.row<n-1}},{key:"bufferIfNeeded",value:function(t){this.texture||(this.texture=function(t){var e=t.createTexture();return e.buffer=function(n){t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},e.deleteTexture=function(){t.deleteTexture(e)},e}(t,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),ud=function(){return a(function t(e,n,r,a){i(this,t),this.r=e,this.texSize=n,this.texRows=r,this.createTextureCanvas=a,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set},[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var t=this.r,e=this.texSize,n=this.texRows,r=this.createTextureCanvas;return new hd(t,e,n,r)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var t=this.r,e=this.texSize,n=this.texRows,r=this.createTextureCanvas,i=Math.floor(e/n);this.scratch=r(t,e,i,"scratch")}return this.scratch}},{key:"draw",value:function(t,e,n){var r=this.styleKeyToAtlas.get(t);return r||((r=this.atlases[this.atlases.length-1])&&r.canFit(e)||(r&&r.lock(),r=this._createAtlas(),this.atlases.push(r)),r.draw(t,e,n),this.styleKeyToAtlas.set(t,r)),r}},{key:"getAtlas",value:function(t){return this.styleKeyToAtlas.get(t)}},{key:"hasAtlas",value:function(t){return this.styleKeyToAtlas.has(t)}},{key:"markKeyForGC",value:function(t){this.markedKeys.add(t)}},{key:"gc",value:function(){var t=this,e=this.markedKeys;if(0!==e.size){var n,r=[],i=new Map,a=null,o=s(this.atlases);try{var h=function(){var o,h,u=n.value,d=u.getKeys(),p=(h=d,(o=e).intersection?o.intersection(h):new Set(c(o).filter(function(t){return h.has(t)})));if(0===p.size)return r.push(u),d.forEach(function(t){return i.set(t,u)}),1;a||(a=t._createAtlas(),r.push(a));var f,g=s(d);try{for(g.s();!(f=g.n()).done;){var m=f.value;if(!p.has(m)){var y=l(u.getOffsets(m),2),v=y[0],x=y[1];a.canFit({w:v.w+x.w,h:v.h})||(a.lock(),a=t._createAtlas(),r.push(a)),u.canvas&&(t._copyTextureToNewAtlas(m,u,a),i.set(m,a))}}}catch(b){g.e(b)}finally{g.f()}u.dispose()};for(o.s();!(n=o.n()).done;)h()}catch(u){o.e(u)}finally{o.f()}this.atlases=r,this.styleKeyToAtlas=i,this.markedKeys=new Set}else console.log("nothing to garbage collect")}},{key:"_copyTextureToNewAtlas",value:function(t,e,n){var r=l(e.getOffsets(t),2),i=r[0],a=r[1];if(0===a.w)n.draw(t,i,function(t){t.drawImage(e.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h)});else{var s=this._getScratchCanvas();s.clear(),s.context.drawImage(e.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h),s.context.drawImage(e.canvas,a.x,a.y,a.w,a.h,i.w,0,a.w,a.h);var o=i.w+a.w,c=i.h;n.draw(t,{w:o,h:c},function(t){t.drawImage(s,0,0,o,c,0,0,o,c)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}();var dd=function(){return a(function t(e,n){i(this,t),this.r=e,this.globalOptions=n,this.atlasSize=n.webglTexSize,this.maxAtlasesPerBatch=n.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map},[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(t,e){var n=this.globalOptions,r=n.webglTexSize,i=n.createTextureCanvas,a=e.texRows,s=this._cacheScratchCanvas(i),o=new ud(this.r,r,a,s);this.collections.set(t,o)}},{key:"addRenderType",value:function(t,e){var n=e.collection;if(!this.collections.has(n))throw new Error("invalid atlas collection name '".concat(n,"'"));var r=this.collections.get(n),i=xt({type:t,atlasCollection:r},e);this.renderTypes.set(t,i)}},{key:"getRenderTypeOpts",value:function(t){return this.renderTypes.get(t)}},{key:"getAtlasCollection",value:function(t){return this.collections.get(t)}},{key:"_cacheScratchCanvas",value:function(t){var e=-1,n=-1,r=null;return function(i,a,s,o){return o?(r&&a==e&&s==n||(e=a,n=s,r=t(i,a,s)),r):t(i,a,s)}}},{key:"_key",value:function(t,e){return"".concat(t,"-").concat(e)}},{key:"invalidate",value:function(t){var e,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.forceRedraw,a=void 0!==i&&i,o=r.filterEle,l=void 0===o?function(){return!0}:o,c=r.filterType,h=void 0===c?function(){return!0}:c,u=!1,d=!1,p=s(t);try{for(p.s();!(e=p.n()).done;){var f=e.value;if(l(f)){var g,m=s(this.renderTypes.values());try{var y=function(){var t=g.value,e=t.type;if(h(e)){var r=n.collections.get(t.collection),i=t.getKey(f),s=Array.isArray(i)?i:[i];if(a)s.forEach(function(t){return r.markKeyForGC(t)}),d=!0;else{var o=t.getID?t.getID(f):f.id(),l=n._key(e,o),c=n.typeAndIdToKey.get(l);void 0===c||Xu(s,c)||(u=!0,n.typeAndIdToKey.delete(l),c.forEach(function(t){return r.markKeyForGC(t)}))}}};for(m.s();!(g=m.n()).done;)y()}catch(v){m.e(v)}finally{m.f()}}}}catch(v){p.e(v)}finally{p.f()}return d&&(this.gc(),u=!1),u}},{key:"gc",value:function(){var t,e=s(this.collections.values());try{for(e.s();!(t=e.n()).done;){t.value.gc()}}catch(n){e.e(n)}finally{e.f()}}},{key:"getOrCreateAtlas",value:function(t,e,n,r){var i=this.renderTypes.get(e),a=this.collections.get(i.collection),s=!1,o=a.draw(r,n,function(e){i.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,n.w,n.h),e.clip(),i.drawElement(e,t,n,!0,!0),e.restore()):i.drawElement(e,t,n,!0,!0),s=!0});if(s){var l=i.getID?i.getID(t):t.id(),c=this._key(e,l);this.typeAndIdToKey.has(c)?this.typeAndIdToKey.get(c).push(r):this.typeAndIdToKey.set(c,[r])}return o}},{key:"getAtlasInfo",value:function(t,e){var n=this,r=this.renderTypes.get(e),i=r.getKey(t);return(Array.isArray(i)?i:[i]).map(function(i){var a=r.getBoundingBox(t,i),s=n.getOrCreateAtlas(t,e,a,i),o=l(s.getOffsets(i),2),c=o[0];return{atlas:s,tex:c,tex1:c,tex2:o[1],bb:a}})}},{key:"getDebugInfo",value:function(){var t,e=[],n=s(this.collections);try{for(n.s();!(t=n.n()).done;){var r=l(t.value,2),i=r[0],a=r[1].getCounts(),o=a.keyCount,c=a.atlasCount;e.push({type:i,keyCount:o,atlasCount:c})}}catch(h){n.e(h)}finally{n.f()}return e}}])}(),pd=function(){return a(function t(e){i(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,e){return e})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(t)}},{key:"getAtlasIndexForBatch",value:function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e}}])}(),fd={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},gd=1,md=2,yd=function(){return a(function t(e,n,r){i(this,t),this.r=e,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Wu,this.atlasManager=new dd(e,r),this.batchManager=new pd(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(fd.SCREEN),this.pickingProgram=this._createShaderProgram(fd.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(t,e){this.atlasManager.addAtlasCollection(t,e)}},{key:"addTextureAtlasRenderType",value:function(t,e){this.atlasManager.addRenderType(t,e)}},{key:"addSimpleShapeRenderType",value:function(t,e){this.simpleShapeOptions.set(t,e)}},{key:"invalidate",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return e?n.invalidate(t,{filterType:function(t){return t===e},forceRedraw:!0}):n.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var e=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),i="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x<q.y)? 1.570796327 : 0.0;\n for( int i=0; i<5; i++ ) {\n vec2 cs = vec2(cos(w),sin(w));\n vec2 u = ab*vec2( cs.x,cs.y);\n vec2 v = ab*vec2(-cs.y,cs.x);\n w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));\n }\n \n // compute final point and distance\n float d = length(p-ab*vec2(cos(w),sin(w)));\n \n // return signed distance\n return (dot(p/ab,p/ab)>1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(t.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),a=function(t,e,n){var r=Gu(t,t.VERTEX_SHADER,e),i=Gu(t,t.FRAGMENT_SHADER,n),a=t.createProgram();if(t.attachShader(a,r),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}(e,n,i);a.aPosition=e.getAttribLocation(a,"aPosition"),a.aIndex=e.getAttribLocation(a,"aIndex"),a.aVertType=e.getAttribLocation(a,"aVertType"),a.aTransform=e.getAttribLocation(a,"aTransform"),a.aAtlasId=e.getAttribLocation(a,"aAtlasId"),a.aTex=e.getAttribLocation(a,"aTex"),a.aPointAPointB=e.getAttribLocation(a,"aPointAPointB"),a.aPointCPointD=e.getAttribLocation(a,"aPointCPointD"),a.aLineWidth=e.getAttribLocation(a,"aLineWidth"),a.aColor=e.getAttribLocation(a,"aColor"),a.aCornerRadius=e.getAttribLocation(a,"aCornerRadius"),a.aBorderColor=e.getAttribLocation(a,"aBorderColor"),a.uPanZoomMatrix=e.getUniformLocation(a,"uPanZoomMatrix"),a.uAtlasSize=e.getUniformLocation(a,"uAtlasSize"),a.uBGColor=e.getUniformLocation(a,"uBGColor"),a.uZoom=e.getUniformLocation(a,"uZoom"),a.uTextures=[];for(var s=0;s<this.batchManager.getMaxAtlasesPerBatch();s++)a.uTextures.push(e.getUniformLocation(a,"uTexture".concat(s)));return a}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var e=this.maxInstances,n=this.gl,r=this.program,i=n.createVertexArray();return n.bindVertexArray(i),function(t,e,n,r){var i=l(td(t,e),2),a=i[0],s=i[1],o=ed(t,s,r),c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,o,t.STATIC_DRAW),s===t.FLOAT?t.vertexAttribPointer(n,a,s,!1,0,0):s===t.INT&&t.vertexAttribIPointer(n,a,s,0,0),t.enableVertexAttribArray(n),t.bindBuffer(t.ARRAY_BUFFER,null)}(n,"vec2",r.aPosition,t),this.transformBuffer=function(t,e,n){for(var r=new Float32Array(9*e),i=new Array(e),a=0;a<e;a++){var s=9*a*4;i[a]=new Float32Array(r.buffer,s,9)}var o=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,r.byteLength,t.DYNAMIC_DRAW);for(var l=0;l<3;l++){var c=n+l;t.enableVertexAttribArray(c),t.vertexAttribPointer(c,3,t.FLOAT,!1,36,12*l),t.vertexAttribDivisor(c,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),o.getMatrixView=function(t){return i[t]},o.setData=function(t,e){i[e].set(t,0)},o.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferSubData(t.ARRAY_BUFFER,0,r)},o}(n,e,r.aTransform),this.indexBuffer=rd(n,e,"vec4",r.aIndex),this.vertTypeBuffer=rd(n,e,"int",r.aVertType),this.atlasIdBuffer=rd(n,e,"int",r.aAtlasId),this.texBuffer=rd(n,e,"vec4",r.aTex),this.pointAPointBBuffer=rd(n,e,"vec4",r.aPointAPointB),this.pointCPointDBuffer=rd(n,e,"vec4",r.aPointCPointD),this.lineWidthBuffer=rd(n,e,"vec2",r.aLineWidth),this.colorBuffer=rd(n,e,"vec4",r.aColor),this.cornerRadiusBuffer=rd(n,e,"vec4",r.aCornerRadius),this.borderColorBuffer=rd(n,e,"vec4",r.aBorderColor),n.bindVertexArray(null),i}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(t){return dt(t,"Buffer")}).map(function(e){return t[e]})),this._buffers}},{key:"startFrame",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fd.SCREEN;this.panZoomMatrix=t,this.renderTarget=e,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,e){return!!t.visible()&&(!e||!e.isVisible||e.isVisible(t))}},{key:"drawTexture",value:function(t,e,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(t,a)&&(!t.isEdge()||this._isValidEdge(t))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(t);if(o===gd)return;if(o==md)return void this.drawPickingRectangle(t,e,n)}var c,h=s(r.getAtlasInfo(t,n));try{for(h.s();!(c=h.n()).done;){var u=c.value,d=u.atlas,p=u.tex1,f=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var g=i.getAtlasIndexForBatch(d),m=0,y=[[p,!0],[f,!1]];m<y.length;m++){var v=l(y[m],2),x=v[0],b=v[1];if(0!=x.w){var w=this.instanceCount;this.vertTypeBuffer.getView(w)[0]=0,Qu(e,this.indexBuffer.getView(w)),this.atlasIdBuffer.getView(w)[0]=g;var T=this.texBuffer.getView(w);T[0]=x.x,T[1]=x.y,T[2]=x.w,T[3]=x.h;var k=this.transformBuffer.getMatrixView(w);this.setTransformMatrix(t,k,a,u,b),this.instanceCount++,b||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(E){h.e(E)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(t,e,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=t.pstyle(n.shapeProps.padding).pfValue),r){var s=r.bb,o=r.tex1,l=r.tex2,c=o.w/(o.w+l.w);i||(c=1-c);var h=this._getAdjustedBB(s,a,i,c);this._applyTransformMatrix(e,h,n,t)}else{var u=n.getBoundingBox(t),d=this._getAdjustedBB(u,a,!0,1);this._applyTransformMatrix(e,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,e,n,r){var i,a;sd(t);var s=n.getRotation?n.getRotation(r):0;if(0!==s){var o=n.getRotationPoint(r);od(t,t,[o.x,o.y]),ld(t,t,s);var l=n.getRotationOffset(r);i=l.x+(e.xOffset||0),a=l.y+(e.yOffset||0)}else i=e.x1,a=e.y1;od(t,t,[i,a]),cd(t,t,[e.w,e.h])}},{key:"_getAdjustedBB",value:function(t,e,n,r){var i=t.x1,a=t.y1,s=t.w,o=t.h;e&&(i-=e,a-=e,s+=2*e,o+=2*e);var l=0,c=s*r;return n&&r<1?s=c:!n&&r<1&&(i+=l=s-c,s=c),{x1:i,y1:a,w:s,h:o,xOffset:l,yOffset:t.yOffset}}},{key:"drawPickingRectangle",value:function(t,e,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,Qu(e,this.indexBuffer.getView(i)),Zu([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(t,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,e,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(t,r)){var i=r.shapeProps,a=this._getVertTypeForShape(t,i.shape);if(void 0===a||r.isSimple&&!r.isSimple(t))this.drawTexture(t,e,n);else{var s=this.instanceCount;if(this.vertTypeBuffer.getView(s)[0]=a,5===a||6===a){var o=r.getBoundingBox(t),l=this._getCornerRadius(t,i.radius,o),c=this.cornerRadiusBuffer.getView(s);c[0]=l,c[1]=l,c[2]=l,c[3]=l,6===a&&(c[0]=0,c[2]=0)}Qu(e,this.indexBuffer.getView(s)),Zu(t.pstyle(i.color).value,t.pstyle(i.opacity).value,this.colorBuffer.getView(s));var h=this.lineWidthBuffer.getView(s);if(h[0]=0,h[1]=0,i.border){var u=t.pstyle("border-width").value;if(u>0){Zu(t.pstyle("border-color").value,t.pstyle("border-opacity").value,this.borderColorBuffer.getView(s));var d=t.pstyle("border-position").value;if("inside"===d)h[0]=0,h[1]=-u;else if("outside"===d)h[0]=u,h[1]=0;else{var p=u/2;h[0]=p,h[1]=-p}}}var f=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,f,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(t,e){switch(t.pstyle(e).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(t,e,n){var r=n.w,i=n.h;if("auto"===t.pstyle(e).value)return Mn(r,i);var a=t.pstyle(e).pfValue,s=r/2,o=i/2;return Math.min(a,o,s)}},{key:"drawEdgeArrow",value:function(t,e,n){if(t.visible()){var r,i,a,s=t._private.rscratch;if("source"===n?(r=s.arrowStartX,i=s.arrowStartY,a=s.srcArrowAngle):(r=s.arrowEndX,i=s.arrowEndY,a=s.tgtArrowAngle),!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(a)||null==a))if("none"!==t.pstyle(n+"-arrow-shape").value){var o=t.pstyle(n+"-arrow-color").value,l=t.pstyle("opacity").value*t.pstyle("line-opacity").value,c=t.pstyle("width").pfValue,h=t.pstyle("arrow-scale").value,u=this.r.getArrowWidth(c,h),d=this.instanceCount,p=this.transformBuffer.getMatrixView(d);sd(p),od(p,p,[r,i]),cd(p,p,[u,u]),ld(p,p,a),this.vertTypeBuffer.getView(d)[0]=3,Qu(e,this.indexBuffer.getView(d)),Zu(o,l,this.colorBuffer.getView(d)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(t,e){if(t.visible()){var n=this._getEdgePoints(t);if(n){var r=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,a=t.pstyle("width").pfValue,s=t.pstyle("line-color").value,o=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,Qu(e,this.indexBuffer.getView(l)),Zu(s,o,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=a;var c=this.pointAPointBBuffer.getView(l);c[0]=n[0],c[1]=n[1],c[2]=n[2],c[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var h=0;h<n.length-2;h+=2){var u=this.instanceCount;this.vertTypeBuffer.getView(u)[0]=2,Qu(e,this.indexBuffer.getView(u)),Zu(s,o,this.colorBuffer.getView(u)),this.lineWidthBuffer.getView(u)[0]=a;var d=n[h-2],p=n[h-1],f=n[h],g=n[h+1],m=n[h+2],y=n[h+3],v=n[h+4],x=n[h+5];0==h&&(d=2*f-m+.001,p=2*g-y+.001),h==n.length-4&&(v=2*m-f+.001,x=2*y-g+.001);var b=this.pointAPointBBuffer.getView(u);b[0]=d,b[1]=p,b[2]=f,b[3]=g;var w=this.pointCPointDBuffer.getView(u);w[0]=m,w[1]=y,w[2]=v,w[3]=x,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var e=t._private.rscratch;return!e.badLine&&null!=e.allpts&&!isNaN(e.allpts[0])}},{key:"_getEdgePoints",value:function(t){var e=t._private.rscratch;if(this._isValidEdge(t)){var n=e.allpts;if(4==n.length)return n;var r=this._getNumSegments(t);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(t){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,e){if(4==t.length)return t;for(var n=Array(2*(e+1)),r=0;r<=e;r++)if(0==r)n[0]=t[0],n[1]=t[1];else if(r==e)n[2*r]=t[t.length-2],n[2*r+1]=t[t.length-1];else{var i=r/e;this._setCurvePoint(t,i,n,2*r)}return n}},{key:"_setCurvePoint",value:function(t,e,n,r){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a<i.length;a+=2){var s=(1-e)*t[a]+e*t[a+2],o=(1-e)*t[a+1]+e*t[a+3];i[a]=s,i[a+1]=o}return this._setCurvePoint(i,e,n,r)}n[r]=t[0],n[r+1]=t[1]}},{key:"endBatch",value:function(){var t=this.gl,e=this.vao,n=this.vertexCount,r=this.instanceCount;if(0!==r){var i=this.renderTarget.picking?this.pickingProgram:this.program;t.useProgram(i),t.bindVertexArray(e);var a,o=s(this.buffers);try{for(o.s();!(a=o.n()).done;){a.value.bufferSubData(r)}}catch(f){o.e(f)}finally{o.f()}for(var l,c,h=this.batchManager.getAtlases(),u=0;u<h.length;u++)h[u].bufferIfNeeded(t);for(var d=0;d<h.length;d++)t.activeTexture(t.TEXTURE0+d),t.bindTexture(t.TEXTURE_2D,h[d].texture),t.uniform1i(i.uTextures[d],d);t.uniform1f(i.uZoom,(l=this.r,c=l.pixelRatio,l.cy.zoom()*c)),t.uniformMatrix3fv(i.uPanZoomMatrix,!1,this.panZoomMatrix),t.uniform1i(i.uAtlasSize,this.batchManager.getAtlasSize());var p=Zu(this.bgColor,1);t.uniform4fv(i.uBGColor,p),t.drawArraysInstanced(t.TRIANGLES,0,n,r),t.bindVertexArray(null),t.bindTexture(t.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:r,atlasCount:h.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var t=this.atlasManager.getDebugInfo(),e=t.reduce(function(t,e){return t+e.atlasCount},0),n=this.batchDebugInfo,r=n.reduce(function(t,e){return t+e.count},0);return{atlasInfo:t,totalAtlases:e,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:r}}}])}(),vd={};function xd(t,e){var n=t._private.rscratch;return ge(n,"labelWrapCachedLines",e)||[]}vd.initWebgl=function(t,e){var n=this,r=n.data.contexts[n.WEBGL];t.bgColor=function(t){var e=t.cy.container(),n=e&&e.style&&e.style.backgroundColor||"white";return bt(n)}(n),t.webglTexSize=Math.min(t.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=t.webglDebug,n.webglDebugShowAtlases=t.webglDebugShowAtlases,n.pickingFrameBuffer=function(t){var e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var n=t.createTexture();return t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0),t.bindFramebuffer(t.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,r){t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,r,0,t.RGBA,t.UNSIGNED_BYTE,null)},e}(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new yd(n,r,t);var i=function(t){return function(e){return n.getTextAngle(e,t)}},a=function(t){return function(e){var n=e.pstyle(t);return n&&n.value}},o=function(t){return function(e){return e.pstyle("".concat(t,"-opacity")).value>0}},c=function(t){return"yes"===t.pstyle("text-events").strValue?md:gd},h=function(t){var e=t.position(),n=e.x,r=e.y,i=t.outerWidth(),a=t.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:h,isSimple:Hu,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:h,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:h,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:c,getKey:bd(e.getLabelKey,null),getBoundingBox:wd(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:c,getKey:bd(e.getSourceLabelKey,"source"),getBoundingBox:wd(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:c,getKey:bd(e.getTargetLabelKey,"target"),getBoundingBox:wd(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=Nt(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(t,e){var r=!1;e&&e.length>0&&(r|=n.drawing.invalidate(e)),r&&u()}),function(t){var e=t.render;t.render=function(n){n=n||{};var r=t.cy;t.webgl&&(r.zoom()>fu?(!function(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}(t),e.call(t,n)):(!function(t){var e=function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}(t),Ed(t,n,fd.SCREEN)))};var n=t.matchCanvasSize;t.matchCanvasSize=function(e){n.call(t,e),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0},t.findNearestElements=function(e,n,r,i){return function(t,e,n){var r,i,a,o=function(t,e,n){var r,i,a,s,o=Vu(t),c=o.pan,h=o.zoom,u=function(t,e,n,r,i){var a=r*n+e.x,s=i*n+e.y;return[a,s=Math.round(t.canvasHeight-s)]}(t,c,h,e,n),d=l(u,2),p=d[0],f=d[1],g=6;if(r=p-g/2,i=f-g/2,s=g,0===(a=g)||0===s)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),Ed(t,null,fd.PICKING),t.pickingFrameBuffer.needsDraw=!1);var y=a*s,v=new Uint8Array(4*y);m.readPixels(r,i,a,s,m.RGBA,m.UNSIGNED_BYTE,v),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var x=new Set,b=0;b<y;b++){var w=Ju(v.slice(4*b,4*b+4))-1;w>=0&&x.add(w)}return x}(t,e,n),c=t.getCachedZSortedEles(),h=s(o);try{for(h.s();!(a=h.n()).done;){var u=c[a.value];if(!r&&u.isNode()&&(r=u),!i&&u.isEdge()&&(i=u),r&&i)break}}catch(d){h.e(d)}finally{h.f()}return[r,i].filter(Boolean)}(t,e,n)};var r=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){r.call(t),t.pickingFrameBuffer.needsDraw=!0};var i=t.notify;t.notify=function(e,n){i.call(t,e,n),"viewport"===e||"bounds"===e?t.pickingFrameBuffer.needsDraw=!0:"background"===e&&t.drawing.invalidate(n,{type:"node-body"})}}(n)};var bd=function(t,e){return function(n){var r=t(n),i=xd(n,e);return i.length>1?i.map(function(t,e){return"".concat(r,"_").concat(e)}):r}},wd=function(t,e){return function(n,r){var i=t(n);if("string"==typeof r){var a=r.indexOf("_");if(a>0){var s=Number(r.substring(a+1)),o=xd(n,e),l=i.h/o.length,c=l*s,h=i.y1+c;return{x1:i.x1,w:i.w,y1:h,h:l,yOffset:c}}}return i}};function Td(t,e){var n=t.canvasWidth,r=t.canvasHeight,i=Vu(t),a=i.pan,s=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,n,r),e.translate(a.x,a.y),e.scale(s,s)}function kd(t,e,n){var r=t.drawing;e+=1,n.isNode()?(r.drawNode(n,e,"node-underlay"),r.drawNode(n,e,"node-body"),r.drawTexture(n,e,"label"),r.drawNode(n,e,"node-overlay")):(r.drawEdgeLine(n,e),r.drawEdgeArrow(n,e,"source"),r.drawEdgeArrow(n,e,"target"),r.drawTexture(n,e,"label"),r.drawTexture(n,e,"edge-source-label"),r.drawTexture(n,e,"edge-target-label"))}function Ed(t,e,n){var r;t.webglDebug&&(r=performance.now());var i=t.drawing,a=0;if(n.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&function(t,e){t.drawSelectionRectangle(e,function(e){return Td(t,e)})}(t,e),t.data.canvasNeedsRedraw[t.NODE]||n.picking){var o=t.data.contexts[t.WEBGL];n.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var l=function(t){var e=t.canvasWidth,n=t.canvasHeight,r=Vu(t),i=r.pan,a=r.zoom,s=ad();od(s,s,[i.x,i.y]),cd(s,s,[a,a]);var o=ad();!function(t,e,n){t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1}(o,e,n);var l,c,h,u,d,p,f,g,m,y,v,x,b,w,T,k,E,A,_,C,S,R=ad();return l=R,h=s,u=(c=o)[0],d=c[1],p=c[2],f=c[3],g=c[4],m=c[5],y=c[6],v=c[7],x=c[8],b=h[0],w=h[1],T=h[2],k=h[3],E=h[4],A=h[5],_=h[6],C=h[7],S=h[8],l[0]=b*u+w*f+T*y,l[1]=b*d+w*g+T*v,l[2]=b*p+w*m+T*x,l[3]=k*u+E*f+A*y,l[4]=k*d+E*g+A*v,l[5]=k*p+E*m+A*x,l[6]=_*u+C*f+S*y,l[7]=_*d+C*g+S*v,l[8]=_*p+C*m+S*x,R}(t),c=t.getCachedZSortedEles();if(a=c.length,i.startFrame(l,n),n.screen){for(var h=0;h<c.nondrag.length;h++)kd(t,h,c.nondrag[h]);for(var u=0;u<c.drag.length;u++)kd(t,u,c.drag[u])}else if(n.picking)for(var d=0;d<c.length;d++)kd(t,d,c[d]);i.endFrame(),n.screen&&t.webglDebugShowAtlases&&(function(t){var e=t.data.contexts[t.NODE];e.save(),Td(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}(t),function(t){var e=function(e,n,r){for(var i=e.atlasManager.getAtlasCollection(n),a=t.data.contexts[t.NODE],s=i.atlases,o=0;o<s.length;o++){var l=s[o].canvas;if(l){var c=l.width,h=l.height,u=c*o,d=l.height*r;a.save(),a.scale(.4,.4),a.drawImage(l,u,d),a.strokeStyle="black",a.rect(u,d,c,h),a.stroke(),a.restore()}}},n=0;e(t.drawing,"node",n++),e(t.drawing,"label",n++)}(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var p=performance.now(),f=Math.ceil(p-r),g=i.getDebugInfo(),m=["".concat(a," elements"),"".concat(g.totalInstances," instances"),"".concat(g.batchCount," batches"),"".concat(g.totalAtlases," atlases"),"".concat(g.wrappedCount," wrapped textures"),"".concat(g.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(n.name,") - frame time ").concat(f,"ms")),console.log("Totals:"),console.log(" ".concat(m)),console.log("Texture Atlases Used:");var y,v=s(g.atlasInfo);try{for(v.s();!(y=v.n()).done;){var x=y.value;console.log(" ".concat(x.type,": ").concat(x.keyCount," keys, ").concat(x.atlasCount," atlases"))}}catch(b){v.e(b)}finally{v.f()}console.log("")}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,i.gc())}for(var Ad={drawPolygonPath:function(t,e,n,r,i,a){var s=r/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],n+o*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+s*a[2*l],n+o*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(t,e,n,r,i,a,s){s.forEach(function(e){return Kh(t,e)}),t.closePath()},drawRoundRectanglePath:function(t,e,n,r,i,a){var s=r/2,o=i/2,l="auto"===a?Mn(r,i):Math.min(a,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.arcTo(e+s,n-o,e+s,n,l),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.arcTo(e-s,n-o,e,n-o,l),t.lineTo(e,n-o),t.closePath()},drawBottomRoundRectanglePath:function(t,e,n,r,i,a){var s=r/2,o=i/2,l="auto"===a?Mn(r,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,n-o),t.lineTo(e+s,n-o),t.lineTo(e+s,n),t.arcTo(e+s,n+o,e,n+o,l),t.arcTo(e-s,n+o,e-s,n,l),t.lineTo(e-s,n-o),t.lineTo(e,n-o),t.closePath()},drawCutRectanglePath:function(t,e,n,r,i,a,s){var o=r/2,l=i/2,c="auto"===s?8:s;t.beginPath&&t.beginPath(),t.moveTo(e-o+c,n-l),t.lineTo(e+o-c,n-l),t.lineTo(e+o,n-l+c),t.lineTo(e+o,n+l-c),t.lineTo(e+o-c,n+l),t.lineTo(e-o+c,n+l),t.lineTo(e-o,n+l-c),t.lineTo(e-o,n-l+c),t.closePath()},drawBarrelPath:function(t,e,n,r,i){var a=r/2,s=i/2,o=e-a,l=e+a,c=n-s,h=n+s,u=Pn(r,i),d=u.widthOffset,p=u.heightOffset,f=u.ctrlPtOffsetPct*d;t.beginPath&&t.beginPath(),t.moveTo(o,c+p),t.lineTo(o,h-p),t.quadraticCurveTo(o+f,h,o+d,h),t.lineTo(l-d,h),t.quadraticCurveTo(l-f,h,l,h-p),t.lineTo(l,c+p),t.quadraticCurveTo(l-f,c,l-d,c),t.lineTo(o+d,c),t.quadraticCurveTo(o+f,c,o,c+p),t.closePath()}},_d=Math.sin(0),Cd=Math.cos(0),Sd={},Rd={},Ld=Math.PI/40,Dd=0*Math.PI;Dd<2*Math.PI;Dd+=Ld)Sd[Dd]=Math.sin(Dd),Rd[Dd]=Math.cos(Dd);Ad.drawEllipsePath=function(t,e,n,r,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,n,r/2,i/2,0,0,2*Math.PI);else for(var a,s,o=r/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=Ld)a=e-o*Sd[c]*_d+o*Rd[c]*Cd,s=n+l*Rd[c]*_d+l*Sd[c]*Cd,0===c?t.moveTo(a,s):t.lineTo(a,s);t.closePath()};var Id={};function Nd(t){var e=t.indexOf(",");return t.substr(e+1)}function Md(t,e,n){var r=function(){return e.toDataURL(n,t.quality)};switch(t.output){case"blob-promise":return new Zr(function(r,i){try{e.toBlob(function(t){null!=t?r(t):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},n,t.quality)}catch(a){i(a)}});case"blob":return function(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return new Blob([r],{type:e})}(Nd(r()),n);case"base64":return Nd(r());default:return r()}}Id.createBuffer=function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,[n,n.getContext("2d")]},Id.bufferCanvasImage=function(t){var e=this.cy,n=e.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=t.full?Math.ceil(n.w):r[2],a=t.full?Math.ceil(n.h):r[3],s=Q(t.maxWidth)||Q(t.maxHeight),o=this.getPixelRatio(),l=1;if(void 0!==t.scale)i*=t.scale,a*=t.scale,l=t.scale;else if(s){var c=1/0,h=1/0;Q(t.maxWidth)&&(c=l*t.maxWidth/i),Q(t.maxHeight)&&(h=l*t.maxHeight/a),i*=l=Math.min(c,h),a*=l}s||(i*=o,a*=o,l*=o);var u=document.createElement("canvas");u.width=i,u.height=a,u.style.width=i+"px",u.style.height=a+"px";var d=u.getContext("2d");if(i>0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var f=e.pan(),g={x:f.x*l,y:f.y*l};l*=e.zoom(),d.translate(g.x,g.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-g.x,-g.y)}t.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=t.bg,d.rect(0,0,i,a),d.fill())}return u},Id.png=function(t){return Md(t,this.bufferCanvasImage(t),"image/png")},Id.jpg=function(t){return Md(t,this.bufferCanvasImage(t),"image/jpeg")};var Od={nodeShapeImpl:function(t,e,n,r,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,n,r,i,a);case"polygon":return this.drawPolygonPath(e,n,r,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,n,r,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,n,r,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,n,r,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,n,r,i,a,o);case"barrel":return this.drawBarrelPath(e,n,r,i,a)}}},Pd=Bd,$d=Bd.prototype;function Bd(t){var e=this,n=e.cy.window().document;t.webgl&&($d.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array($d.CANVAS_LAYERS),contexts:new Array($d.CANVAS_LAYERS),canvasNeedsRedraw:new Array($d.CANVAS_LAYERS),bufferCanvases:new Array($d.BUFFER_COUNT),bufferContexts:new Array($d.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var a=e.data.canvasContainer.style;e.data.canvasContainer.style[r]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[r]=i;var o={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};f&&f.userAgent.match(/msie|trident|edge/i)&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var l=0;l<$d.CANVAS_LAYERS;l++){var c=e.data.canvases[l]=n.createElement("canvas"),h=$d.CANVAS_TYPES[l];e.data.contexts[l]=c.getContext(h),e.data.contexts[l]||ae("Could not create canvas of type "+h),Object.keys(o).forEach(function(t){c.style[t]=o[t]}),c.style.position="absolute",c.setAttribute("data-id","layer"+l),c.style.zIndex=String($d.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(c),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[$d.NODE].setAttribute("data-id","layer"+$d.NODE+"-node"),e.data.canvases[$d.SELECT_BOX].setAttribute("data-id","layer"+$d.SELECT_BOX+"-selectbox"),e.data.canvases[$d.DRAG].setAttribute("data-id","layer"+$d.DRAG+"-drag"),e.data.canvases[$d.WEBGL]&&e.data.canvases[$d.WEBGL].setAttribute("data-id","layer"+$d.WEBGL+"-webgl");for(l=0;l<$d.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=n.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var u=nn(),d=function(t){return{x:-t.w/2,y:-t.h/2}},p=function(t){return t[0]._private.nodeKey},g=function(t){return t[0]._private.labelStyleKey},m=function(t){return t[0]._private.sourceLabelStyleKey},y=function(t){return t[0]._private.targetLabelStyleKey},v=function(t,n,r,i,a){return e.drawElement(t,n,r,!1,!1,a)},x=function(t,n,r,i,a){return e.drawElementText(t,n,r,i,"main",a)},b=function(t,n,r,i,a){return e.drawElementText(t,n,r,i,"source",a)},w=function(t,n,r,i,a){return e.drawElementText(t,n,r,i,"target",a)},T=function(t){return t.boundingBox(),t[0]._private.bodyBounds},k=function(t){return t.boundingBox(),t[0]._private.labelBounds.main||u},E=function(t){return t.boundingBox(),t[0]._private.labelBounds.source||u},A=function(t){return t.boundingBox(),t[0]._private.labelBounds.target||u},_=function(t,e){return e},C=function(t){return{x:((e=T(t)).x1+e.x2)/2,y:(e.y1+e.y2)/2};var e},S=function(t,e,n){var r=t?t+"-":"";return{x:e.x+n.pstyle(r+"text-margin-x").pfValue,y:e.y+n.pstyle(r+"text-margin-y").pfValue}},R=function(t,e,n){var r=t[0]._private.rscratch;return{x:r[e],y:r[n]}},L=function(t){return S("",R(t,"labelX","labelY"),t)},D=function(t){return S("source",R(t,"sourceLabelX","sourceLabelY"),t)},I=function(t){return S("target",R(t,"targetLabelX","targetLabelY"),t)},N=function(t){return d(T(t))},M=function(t){return d(E(t))},O=function(t){return d(A(t))},P=function(t){var e=k(t),n=d(k(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":n.x=-e.w-(e.leftPad||0);break;case"right":n.x=-(e.rightPad||0)}switch(t.pstyle("text-valign").value){case"top":n.y=-e.h-(e.topPad||0);break;case"bottom":n.y=-(e.botPad||0)}}return n},$=e.data.eleTxrCache=new yu(e,{getKey:p,doesEleInvalidateKey:function(t){var e=t[0]._private;return!(e.oldBackgroundTimestamp===e.backgroundTimestamp)},drawElement:v,getBoundingBox:T,getRotationPoint:C,getRotationOffset:N,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),B=e.data.lblTxrCache=new yu(e,{getKey:g,drawElement:x,getBoundingBox:k,getRotationPoint:L,getRotationOffset:P,isVisible:_}),F=e.data.slbTxrCache=new yu(e,{getKey:m,drawElement:b,getBoundingBox:E,getRotationPoint:D,getRotationOffset:M,isVisible:_}),z=e.data.tlbTxrCache=new yu(e,{getKey:y,drawElement:w,getBoundingBox:A,getRotationPoint:I,getRotationOffset:O,isVisible:_}),K=e.data.lyrTxrCache=new xu(e);e.onUpdateEleCalcs(function(t,e){$.invalidateElements(e),B.invalidateElements(e),F.invalidateElements(e),z.invalidateElements(e),K.invalidateElements(e);for(var n=0;n<e.length;n++){var r=e[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}});var q=function(t){for(var e=0;e<t.length;e++)K.enqueueElementRefinement(t[e].ele)};$.onDequeue(q),B.onDequeue(q),F.onDequeue(q),z.onDequeue(q),t.webgl&&e.initWebgl(t,{getStyleKey:p,getLabelKey:g,getSourceLabelKey:m,getTargetLabelKey:y,drawElement:v,drawLabel:x,drawSourceLabel:b,drawTargetLabel:w,getElementBox:T,getLabelBox:k,getSourceLabelBox:E,getTargetLabelBox:A,getElementRotationPoint:C,getElementRotationOffset:N,getLabelRotationPoint:L,getSourceLabelRotationPoint:D,getTargetLabelRotationPoint:I,getLabelRotationOffset:P,getSourceLabelRotationOffset:M,getTargetLabelRotationOffset:O})}$d.CANVAS_LAYERS=3,$d.SELECT_BOX=0,$d.DRAG=1,$d.NODE=2,$d.WEBGL=3,$d.CANVAS_TYPES=["2d","2d","2d","webgl2"],$d.BUFFER_COUNT=3,$d.TEXTURE_BUFFER=0,$d.MOTIONBLUR_BUFFER_NODE=1,$d.MOTIONBLUR_BUFFER_DRAG=2,$d.redrawHint=function(t,e){var n=this;switch(t){case"eles":n.data.canvasNeedsRedraw[$d.NODE]=e;break;case"drag":n.data.canvasNeedsRedraw[$d.DRAG]=e;break;case"select":n.data.canvasNeedsRedraw[$d.SELECT_BOX]=e;break;case"gc":n.data.gc=!0}};var Fd="undefined"!=typeof Path2D;$d.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},$d.usePaths=function(){return Fd&&this.pathsEnabled},$d.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},$d.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},$d.makeOffscreenCanvas=function(t,e){var n;"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":u(OffscreenCanvas))?n=new OffscreenCanvas(t,e):((n=this.cy.window().document.createElement("canvas")).width=t,n.height=e);return n},[Eu,Lu,$u,Fu,zu,qu,Yu,vd,Ad,Id,Od].forEach(function(t){xt($d,t)});var zd=[{type:"layout",extensions:ph},{type:"renderer",extensions:[{name:"null",impl:fh},{name:"base",impl:cu},{name:"canvas",impl:Pd}]}],Kd={},qd={};function Ud(t,e,n){var r=n,i=function(n){oe("Can not register `"+e+"` for `"+t+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===t){if(_c.prototype[e])return i(e);_c.prototype[e]=n}else if("collection"===t){if(ql.prototype[e])return i(e);ql.prototype[e]=n}else if("layout"===t){for(var a=function(t){this.options=t,n.call(this,t),Z(this._private)||(this._private={}),this._private.cy=t.cy,this._private.listeners=[],this.createEmitter()},s=a.prototype=Object.create(n.prototype),o=[],l=0;l<o.length;l++){var c=o[l];s[c]=s[c]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var h=n.prototype.stop;s.stop=function(){var t=this.options;if(t&&t.animate){var e=this.animations;if(e)for(var n=0;n<e.length;n++)e[n].stop()}return h?h.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var u=function(t){return t._private.cy},d={addEventFields:function(t,e){e.layout=t,e.cy=u(t),e.target=t},bubble:function(){return!0},parent:function(t){return u(t)}};xt(s,{createEmitter:function(){return this._private.emitter=new sl(d,this),this},emitter:function(){return this._private.emitter},on:function(t,e){return this.emitter().on(t,e),this},one:function(t,e){return this.emitter().one(t,e),this},once:function(t,e){return this.emitter().one(t,e),this},removeListener:function(t,e){return this.emitter().removeListener(t,e),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(t,e){return this.emitter().emit(t,e),this}}),ks.eventAliasesOn(s),r=a}else if("renderer"===t&&"null"!==e&&"base"!==e){var p=jd("renderer","base"),f=p.prototype,g=n,m=n.prototype,y=function(){p.apply(this,arguments),g.apply(this,arguments)},v=y.prototype;for(var x in f){var b=f[x];if(null!=m[x])return i(x);v[x]=b}for(var w in m)v[w]=m[w];f.clientFunctions.forEach(function(t){v[t]=v[t]||function(){ae("Renderer does not implement `renderer."+t+"()` on its prototype")}}),r=y}else if("__proto__"===t||"constructor"===t||"prototype"===t)return ae(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Tt({map:Kd,keys:[t,e],value:r})}function jd(t,e){return kt({map:Kd,keys:[t,e]})}function Yd(t,e,n,r,i){return Tt({map:qd,keys:[t,e,n,r],value:i})}function Gd(t,e,n,r){return kt({map:qd,keys:[t,e,n,r]})}var Wd=function(){return 2===arguments.length?jd.apply(null,arguments):3===arguments.length?Ud.apply(null,arguments):4===arguments.length?Gd.apply(null,arguments):5===arguments.length?Yd.apply(null,arguments):void ae("Invalid extension access syntax")};_c.prototype.extension=Wd,zd.forEach(function(t){t.extensions.forEach(function(e){Ud(t.type,e.name,e.impl)})});var Vd=function(){if(!(this instanceof Vd))return new Vd;this.length=0},Hd=Vd.prototype;Hd.instanceString=function(){return"stylesheet"},Hd.selector=function(t){return this[this.length++]={selector:t,properties:[]},this},Hd.css=function(t,e){var n=this.length-1;if(V(t))this[n].properties.push({name:t,value:e});else if(Z(t))for(var r=t,i=Object.keys(r),a=0;a<i.length;a++){var s=i[a],o=r[s];if(null!=o){var l=wc.properties[s]||wc.properties[ct(s)];if(null!=l){var c=l.name,h=o;this[n].properties.push({name:c,value:h})}}}return this},Hd.style=Hd.css,Hd.generateStyle=function(t){var e=new wc(t);return this.appendToStyle(e)},Hd.appendToStyle=function(t){for(var e=0;e<this.length;e++){var n=this[e],r=n.selector,i=n.properties;t.selector(r);for(var a=0;a<i.length;a++){var s=i[a];t.css(s.name,s.value)}}return t};var Xd=function(t){return void 0===t&&(t={}),Z(t)?new _c(t):V(t)?Wd.apply(Wd,arguments):void 0};Xd.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Xd),t.apply(null,e),this},Xd.warnings=function(t){return se(t)},Xd.version="3.33.1",Xd.stylesheet=Xd.Stylesheet=Vd},1444(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function i(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function a(t){return t}n.d(e,{JLW:()=>so,l78:()=>f,tlR:()=>p,qrM:()=>bo,Yu4:()=>To,IA3:()=>Eo,Wi0:()=>_o,PGM:()=>Co,OEq:()=>Ro,y8u:()=>Io,olC:()=>Mo,IrU:()=>Po,oDi:()=>Fo,Q7f:()=>Ko,cVp:()=>Uo,lUB:()=>co,Lx9:()=>Yo,nVG:()=>Jo,uxU:()=>tl,Xf2:()=>rl,GZz:()=>al,UPb:()=>ol,dyv:()=>sl,GPZ:()=>jn,Sk5:()=>Xn,bEH:()=>Rr,n8j:()=>po,T9B:()=>r,jkA:()=>i,rLf:()=>mo,WH:()=>Br,m4Y:()=>gi,UMr:()=>$r,w7C:()=>Ds,zt:()=>Is,Ltv:()=>Ns,UAC:()=>Ii,DCK:()=>ha,TUC:()=>Ki,Agd:()=>Li,t6C:()=>_i,wXd:()=>Si,ABi:()=>$i,Ui6:()=>Zi,rGn:()=>qi,ucG:()=>Ci,YPH:()=>Pi,Mol:()=>zi,PGu:()=>Bi,GuW:()=>Fi,hkb:()=>cr});var s=1e-6;function o(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function c(t){return e=>+t(e)}function h(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function u(){return!this.__axis}function d(t,e){var n=[],r=null,i=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,m=1===t||4===t?-1:1,y=4===t||2===t?"x":"y",v=1===t||3===t?o:l;function x(o){var l=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,x=null==i?e.tickFormat?e.tickFormat.apply(e,n):a:i,b=Math.max(d,0)+f,w=e.range(),T=+w[0]+g,k=+w[w.length-1]+g,E=(e.bandwidth?h:c)(e.copy(),g),A=o.selection?o.selection():o,_=A.selectAll(".domain").data([null]),C=A.selectAll(".tick").data(l,e).order(),S=C.exit(),R=C.enter().append("g").attr("class","tick"),L=C.select("line"),D=C.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(R),L=L.merge(R.append("line").attr("stroke","currentColor").attr(y+"2",m*d)),D=D.merge(R.append("text").attr("fill","currentColor").attr(y,m*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),o!==A&&(_=_.transition(o),C=C.transition(o),L=L.transition(o),D=D.transition(o),S=S.transition(o).attr("opacity",s).attr("transform",function(t){return isFinite(t=E(t))?v(t+g):this.getAttribute("transform")}),R.attr("opacity",s).attr("transform",function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:E(t))+g)})),S.remove(),_.attr("d",4===t||2===t?p?"M"+m*p+","+T+"H"+g+"V"+k+"H"+m*p:"M"+g+","+T+"V"+k:p?"M"+T+","+m*p+"V"+g+"H"+k+"V"+m*p:"M"+T+","+g+"H"+k),C.attr("opacity",1).attr("transform",function(t){return v(E(t)+g)}),L.attr(y+"2",m*d),D.attr(y,m*b).text(x),A.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),A.each(function(){this.__axis=E})}return x.scale=function(t){return arguments.length?(e=t,x):e},x.ticks=function(){return n=Array.from(arguments),x},x.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),x):n.slice()},x.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),x):r&&r.slice()},x.tickFormat=function(t){return arguments.length?(i=t,x):i},x.tickSize=function(t){return arguments.length?(d=p=+t,x):d},x.tickSizeInner=function(t){return arguments.length?(d=+t,x):d},x.tickSizeOuter=function(t){return arguments.length?(p=+t,x):p},x.tickPadding=function(t){return arguments.length?(f=+t,x):f},x.offset=function(t){return arguments.length?(g=+t,x):g},x}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function m(t){return null==t?g:function(){return this.querySelector(t)}}function y(){return[]}function v(t){return null==t?y:function(){return this.querySelectorAll(t)}}function x(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function b(t){return function(){return this.matches(t)}}function w(t){return function(e){return e.matches(t)}}var T=Array.prototype.find;function k(){return this.firstElementChild}var E=Array.prototype.filter;function A(){return Array.from(this.children)}function _(t){return new Array(t.length)}function C(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function S(t,e,n,r,i,a){for(var s,o=0,l=e.length,c=a.length;o<c;++o)(s=e[o])?(s.__data__=a[o],r[o]=s):n[o]=new C(t,a[o]);for(;o<l;++o)(s=e[o])&&(i[o]=s)}function R(t,e,n,r,i,a,s){var o,l,c,h=new Map,u=e.length,d=a.length,p=new Array(u);for(o=0;o<u;++o)(l=e[o])&&(p[o]=c=s.call(l,l.__data__,o,e)+"",h.has(c)?i[o]=l:h.set(c,l));for(o=0;o<d;++o)c=s.call(t,a[o],o,a)+"",(l=h.get(c))?(r[o]=l,l.__data__=a[o],h.delete(c)):n[o]=new C(t,a[o]);for(o=0;o<u;++o)(l=e[o])&&h.get(p[o])===l&&(i[o]=l)}function L(t){return t.__data__}function D(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function I(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}C.prototype={constructor:C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var N="http://www.w3.org/1999/xhtml";const M={svg:"http://www.w3.org/2000/svg",xhtml:N,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function O(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function $(t){return function(){this.removeAttributeNS(t.space,t.local)}}function B(t,e){return function(){this.setAttribute(t,e)}}function F(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function K(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function j(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Y(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function G(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function W(t){return function(){delete this[t]}}function V(t,e){return function(){this[t]=e}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function X(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function J(t,e){for(var n=Z(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function tt(t,e){for(var n=Z(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function et(t){return function(){J(this,t)}}function nt(t){return function(){tt(this,t)}}function rt(t,e){return function(){(e.apply(this,arguments)?J:tt)(this,t)}}function it(){this.textContent=""}function at(t){return function(){this.textContent=t}}function st(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ot(){this.innerHTML=""}function lt(t){return function(){this.innerHTML=t}}function ct(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ht(){this.nextSibling&&this.parentNode.appendChild(this)}function ut(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===N&&e.documentElement.namespaceURI===N?e.createElement(t):e.createElementNS(n,t)}}function pt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ft(t){var e=O(t);return(e.local?pt:dt)(e)}function gt(){return null}function mt(){var t=this.parentNode;t&&t.removeChild(this)}function yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function bt(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var s=0,o=i.length;s<o;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function wt(t,e,n){var r=q(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Tt(t,e){return function(){return wt(this,t,e)}}function kt(t,e){return function(){return wt(this,t,e.apply(this,arguments))}}Q.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Et=[null];function At(t,e){this._groups=t,this._parents=e}function _t(){return new At([[document.documentElement]],Et)}At.prototype=_t.prototype={constructor:At,select:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s,o=e[i],l=o.length,c=r[i]=new Array(l),h=0;h<l;++h)(a=o[h])&&(s=t.call(a,a.__data__,h,o))&&("__data__"in a&&(s.__data__=a.__data__),c[h]=s);return new At(r,this._parents)},selectAll:function(t){t="function"==typeof t?x(t):v(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var s,o=e[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(r.push(t.call(s,s.__data__,c,o)),i.push(s));return new At(r,i)},selectChild:function(t){return this.select(null==t?k:function(t){return function(){return T.call(this.children,t)}}("function"==typeof t?t:w(t)))},selectChildren:function(t){return this.selectAll(null==t?A:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:w(t)))},filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s=e[i],o=s.length,l=r[i]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new At(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,L);var n,r=e?R:S,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var s=a.length,o=new Array(s),l=new Array(s),c=new Array(s),h=0;h<s;++h){var u=i[h],d=a[h],p=d.length,f=D(t.call(u,u&&u.__data__,h,i)),g=f.length,m=l[h]=new Array(g),y=o[h]=new Array(g);r(u,d,m,y,c[h]=new Array(p),f,e);for(var v,x,b=0,w=0;b<g;++b)if(v=m[b]){for(b>=w&&(w=b+1);!(x=y[w])&&++w<g;);v._next=x||null}}return(o=new At(o,i))._enter=l,o._exit=c,o},enter:function(){return new At(this._enter||this._groups.map(_),this._parents)},exit:function(){return new At(this._exit||this._groups.map(_),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var c,h=n[l],u=r[l],d=h.length,p=o[l]=new Array(d),f=0;f<d;++f)(c=h[f]||u[f])&&(p[f]=c);for(;l<i;++l)o[l]=n[l];return new At(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,s=i[a];--a>=0;)(r=i[a])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=I);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var s,o=n[a],l=o.length,c=i[a]=new Array(l),h=0;h<l;++h)(s=o[h])&&(c[h]=s);c.sort(e)}return new At(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],s=0,o=a.length;s<o;++s)(i=a[s])&&t.call(i,i.__data__,s,a);return this},attr:function(t,e){var n=O(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?$:P:"function"==typeof e?n.local?K:z:n.local?F:B)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?U:"function"==typeof e?Y:j)(t,e,null==n?"":n)):G(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?W:"function"==typeof e?H:V)(t,e)):this.node()[t]},classed:function(t,e){var n=X(t+"");if(arguments.length<2){for(var r=Z(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?rt:e?et:nt)(n,e))},text:function(t){return arguments.length?this.each(null==t?it:("function"==typeof t?st:at)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?ct:lt)(t)):this.node().innerHTML},raise:function(){return this.each(ht)},lower:function(){return this.each(ut)},append:function(t){var e="function"==typeof t?t:ft(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:ft(t),r=null==e?gt:"function"==typeof e?e:m(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(mt)},clone:function(t){return this.select(t?vt:yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),s=a.length;if(!(arguments.length<2)){for(o=e?bt:xt,r=0;r<s;++r)this.each(o(a[r],e,n));return this}var o=this.node().__on;if(o)for(var l,c=0,h=o.length;c<h;++c)for(r=0,l=o[c];r<s;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?kt:Tt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,s=i.length;a<s;++a)(r=i[a])&&(yield r)}};const Ct=_t;var St={value:()=>{}};function Rt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Lt(r)}function Lt(t){this._=t}function Dt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function It(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=St,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Lt.prototype=Rt.prototype={constructor:Lt,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<o;)if(n=(t=a[s]).type)i[n]=It(i[n],t.name,e);else if(null==e)for(n in i)i[n]=It(i[n],t.name,null);return this}for(;++s<o;)if((n=(t=a[s]).type)&&(n=Dt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Lt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const Nt=Rt;var Mt,Ot,Pt=0,$t=0,Bt=0,Ft=0,zt=0,Kt=0,qt="object"==typeof performance&&performance.now?performance:Date,Ut="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jt(){return zt||(Ut(Yt),zt=qt.now()+Kt)}function Yt(){zt=0}function Gt(){this._call=this._time=this._next=null}function Wt(t,e,n){var r=new Gt;return r.restart(t,e,n),r}function Vt(){zt=(Ft=qt.now())+Kt,Pt=$t=0;try{!function(){jt(),++Pt;for(var t,e=Mt;e;)(t=zt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pt}()}finally{Pt=0,function(){var t,e,n=Mt,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mt=e);Ot=t,Xt(r)}(),zt=0}}function Ht(){var t=qt.now(),e=t-Ft;e>1e3&&(Kt-=e,Ft=t)}function Xt(t){Pt||($t&&($t=clearTimeout($t)),t-zt>24?(t<1/0&&($t=setTimeout(Vt,t-qt.now()-Kt)),Bt&&(Bt=clearInterval(Bt))):(Bt||(Ft=qt.now(),Bt=setInterval(Ht,1e3)),Pt=1,Ut(Vt)))}function Zt(t,e,n){var r=new Gt;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}Gt.prototype=Wt.prototype={constructor:Gt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?jt():+n)+(null==e?0:+e),this._next||Ot===this||(Ot?Ot._next=this:Mt=this,Ot=this),this._call=t,this._time=n,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var Qt=Nt("start","end","cancel","interrupt"),Jt=[];function te(t,e,n,r,i,a){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(s,n.delay,n.time),n.delay<=t&&s(t-n.delay)}function s(a){var c,h,u,d;if(1!==n.state)return l();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return Zt(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[c])}if(Zt(function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(a))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(u=n.tween.length),c=0,h=-1;c<u;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=d);r.length=h+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,s=r.length;++a<s;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Wt(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Qt,tween:Jt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ee(t,e){var n=re(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ne(t,e){var n=re(t,e);if(n.state>3)throw new Error("too late; already running");return n}function re(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ie(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ae,se=180/Math.PI,oe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function le(t,e,n,r,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*se,skewX:Math.atan(l)*se,scaleX:s,scaleY:o}}function ce(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,s){var o=[],l=[];return a=t(a),s=t(s),function(t,r,i,a,s,o){if(t!==i||r!==a){var l=s.push("translate(",null,e,null,n);o.push({i:l-4,x:ie(t,i)},{i:l-2,x:ie(r,a)})}else(i||a)&&s.push("translate("+i+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,o,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ie(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,s.rotate,o,l),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ie(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,s.skewX,o,l),function(t,e,n,r,a,s){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");s.push({i:o-4,x:ie(t,n)},{i:o-2,x:ie(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,o,l),a=s=null,function(t){for(var e,n=-1,r=l.length;++n<r;)o[(e=l[n]).i]=e.x(t);return o.join("")}}}var he=ce(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?oe:le(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),ue=ce(function(t){return null==t?oe:(ae||(ae=document.createElementNS("http://www.w3.org/2000/svg","g")),ae.setAttribute("transform",t),(t=ae.transform.baseVal.consolidate())?le((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):oe)},", ",")",")");function de(t,e){var n,r;return function(){var i=ne(this,t),a=i.tween;if(a!==n)for(var s=0,o=(r=n=a).length;s<o;++s)if(r[s].name===e){(r=r.slice()).splice(s,1);break}i.tween=r}}function pe(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ne(this,t),s=a.tween;if(s!==r){i=(r=s).slice();for(var o={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=o;break}l===c&&i.push(o)}a.tween=i}}function fe(t,e,n){var r=t._id;return t.each(function(){var t=ne(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return re(t,r).value[e]}}function ge(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function me(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ye(){}var ve=.7,xe=1/ve,be="\\s*([+-]?\\d+)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Te="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,Ee=new RegExp(`^rgb\\(${be},${be},${be}\\)$`),Ae=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),_e=new RegExp(`^rgba\\(${be},${be},${be},${we}\\)$`),Ce=new RegExp(`^rgba\\(${Te},${Te},${Te},${we}\\)$`),Se=new RegExp(`^hsl\\(${we},${Te},${Te}\\)$`),Re=new RegExp(`^hsla\\(${we},${Te},${Te},${we}\\)$`),Le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function De(){return this.rgb().formatHex()}function Ie(){return this.rgb().formatRgb()}function Ne(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Me(e):3===n?new Be(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Oe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Oe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ee.exec(t))?new Be(e[1],e[2],e[3],1):(e=Ae.exec(t))?new Be(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=_e.exec(t))?Oe(e[1],e[2],e[3],e[4]):(e=Ce.exec(t))?Oe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Se.exec(t))?je(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?je(e[1],e[2]/100,e[3]/100,e[4]):Le.hasOwnProperty(t)?Me(Le[t]):"transparent"===t?new Be(NaN,NaN,NaN,0):null}function Me(t){return new Be(t>>16&255,t>>8&255,255&t,1)}function Oe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Be(t,e,n,r)}function Pe(t){return t instanceof ye||(t=Ne(t)),t?new Be((t=t.rgb()).r,t.g,t.b,t.opacity):new Be}function $e(t,e,n,r){return 1===arguments.length?Pe(t):new Be(t,e,n,null==r?1:r)}function Be(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Fe(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}`}function ze(){const t=Ke(this.opacity);return`${1===t?"rgb(":"rgba("}${qe(this.r)}, ${qe(this.g)}, ${qe(this.b)}${1===t?")":`, ${t})`}`}function Ke(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function qe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ue(t){return((t=qe(t))<16?"0":"")+t.toString(16)}function je(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ge(t,e,n,r)}function Ye(t){if(t instanceof Ge)return new Ge(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=Ne(t)),!t)return new Ge;if(t instanceof Ge)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),s=NaN,o=a-i,l=(a+i)/2;return o?(s=e===a?(n-r)/o+6*(n<r):n===a?(r-e)/o+2:(e-n)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Ge(s,o,l,t.opacity)}function Ge(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function We(t){return(t=(t||0)%360)<0?t+360:t}function Ve(t){return Math.max(0,Math.min(1,t||0))}function He(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Xe(t,e,n,r,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*r+s*i)/6}ge(ye,Ne,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:De,formatHex:De,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ye(this).formatHsl()},formatRgb:Ie,toString:Ie}),ge(Be,$e,me(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Be(qe(this.r),qe(this.g),qe(this.b),Ke(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fe,formatHex:Fe,formatHex8:function(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}${Ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ze,toString:ze})),ge(Ge,function(t,e,n,r){return 1===arguments.length?Ye(t):new Ge(t,e,n,null==r?1:r)},me(ye,{brighter(t){return t=null==t?xe:Math.pow(xe,t),new Ge(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Ge(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Be(He(t>=240?t-240:t+120,i,r),He(t,i,r),He(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ge(We(this.h),Ve(this.s),Ve(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ke(this.opacity);return`${1===t?"hsl(":"hsla("}${We(this.h)}, ${100*Ve(this.s)}%, ${100*Ve(this.l)}%${1===t?")":`, ${t})`}`}}));const Ze=t=>()=>t;function Qe(t,e){return function(n){return t+n*e}}function Je(t){return 1===(t=+t)?tn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ze(isNaN(e)?n:e)}}function tn(t,e){var n=e-t;return n?Qe(t,n):Ze(isNaN(t)?e:t)}const en=function t(e){var n=Je(e);function r(t,e){var r=n((t=$e(t)).r,(e=$e(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),s=tn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function nn(t){return function(e){var n,r,i=e.length,a=new Array(i),s=new Array(i),o=new Array(i);for(n=0;n<i;++n)r=$e(e[n]),a[n]=r.r||0,s[n]=r.g||0,o[n]=r.b||0;return a=t(a),s=t(s),o=t(o),r.opacity=1,function(t){return r.r=a(t),r.g=s(t),r.b=o(t),r+""}}}nn(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],s=r>0?t[r-1]:2*i-a,o=r<e-1?t[r+2]:2*a-i;return Xe((n-r/e)*e,s,i,a,o)}}),nn(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],s=t[(r+1)%e],o=t[(r+2)%e];return Xe((n-r/e)*e,i,a,s,o)}});var rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,an=new RegExp(rn.source,"g");function sn(t,e){var n,r,i,a=rn.lastIndex=an.lastIndex=0,s=-1,o=[],l=[];for(t+="",e+="";(n=rn.exec(t))&&(r=an.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:ie(n,r)})),a=an.lastIndex;return a<e.length&&(i=e.slice(a),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)o[(n=l[r]).i]=n.x(t);return o.join("")})}function on(t,e){var n;return("number"==typeof e?ie:e instanceof Ne?en:(n=Ne(e))?(e=n,en):sn)(t,e)}function ln(t){return function(){this.removeAttribute(t)}}function cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hn(t,e,n){var r,i,a=n+"";return function(){var s=this.getAttribute(t);return s===a?null:s===r?i:i=e(r=s,n)}}function un(t,e,n){var r,i,a=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===r?i:i=e(r=s,n)}}function dn(t,e,n){var r,i,a;return function(){var s,o,l=n(this);if(null!=l)return(s=this.getAttribute(t))===(o=l+"")?null:s===r&&o===i?a:(i=o,a=e(r=s,l));this.removeAttribute(t)}}function pn(t,e,n){var r,i,a;return function(){var s,o,l=n(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:s===r&&o===i?a:(i=o,a=e(r=s,l));this.removeAttributeNS(t.space,t.local)}}function fn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function gn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function mn(t,e){return function(){ee(this,t).delay=+e.apply(this,arguments)}}function yn(t,e){return e=+e,function(){ee(this,t).delay=e}}function vn(t,e){return function(){ne(this,t).duration=+e.apply(this,arguments)}}function xn(t,e){return e=+e,function(){ne(this,t).duration=e}}var bn=Ct.prototype.constructor;function wn(t){return function(){this.style.removeProperty(t)}}var Tn=0;function kn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function En(){return++Tn}var An=Ct.prototype;kn.prototype=function(t){return Ct().transition(t)}.prototype={constructor:kn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=m(t));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s)for(var o,l,c=r[s],h=c.length,u=a[s]=new Array(h),d=0;d<h;++d)(o=c[d])&&(l=t.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),u[d]=l,te(u[d],e,n,d,u,re(o,n)));return new kn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=v(t));for(var r=this._groups,i=r.length,a=[],s=[],o=0;o<i;++o)for(var l,c=r[o],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=t.call(l,l.__data__,u,c),f=re(l,n),g=0,m=p.length;g<m;++g)(d=p[g])&&te(d,e,n,g,p,f);a.push(p),s.push(l)}return new kn(a,s,e,n)},selectChild:An.selectChild,selectChildren:An.selectChildren,filter:function(t){"function"!=typeof t&&(t=b(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,s=e[i],o=s.length,l=r[i]=[],c=0;c<o;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new kn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),s=new Array(r),o=0;o<a;++o)for(var l,c=e[o],h=n[o],u=c.length,d=s[o]=new Array(u),p=0;p<u;++p)(l=c[p]||h[p])&&(d[p]=l);for(;o<r;++o)s[o]=e[o];return new kn(s,this._parents,this._name,this._id)},selection:function(){return new bn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=En(),r=this._groups,i=r.length,a=0;a<i;++a)for(var s,o=r[a],l=o.length,c=0;c<l;++c)if(s=o[c]){var h=re(s,e);te(s,t,n,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new kn(r,this._parents,t,n)},call:An.call,nodes:An.nodes,node:An.node,size:An.size,empty:An.empty,each:An.each,on:function(t,e){var n=this._id;return arguments.length<2?re(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?ee:ne;return function(){var s=a(this,t),o=s.on;o!==r&&(i=(r=o).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=O(t),r="transform"===n?ue:on;return this.attrTween(t,"function"==typeof e?(n.local?pn:dn)(n,r,fe(this,"attr."+t,e)):null==e?(n.local?cn:ln)(n):(n.local?un:hn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=O(t);return this.tween(n,(r.local?fn:gn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?he:on;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=G(this,t),s=(this.style.removeProperty(t),G(this,t));return a===s?null:a===n&&s===r?i:i=e(n=a,r=s)}}(t,r)).on("end.style."+t,wn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var s=G(this,t),o=n(this),l=o+"";return null==o&&(this.style.removeProperty(t),l=o=G(this,t)),s===l?null:s===r&&l===i?a:(i=l,a=e(r=s,o))}}(t,r,fe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,s="style."+e,o="end."+s;return function(){var l=ne(this,t),c=l.on,h=null==l.value[s]?a||(a=wn(e)):void 0;c===n&&i===h||(r=(n=c).copy()).on(o,i=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var s=G(this,t);return s===a?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(fe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=re(this.node(),n).tween,a=0,s=i.length;a<s;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?de:pe)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?mn:yn)(e,t)):re(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?vn:xn)(e,t)):re(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ne(this,t).ease=e}}(e,t)):re(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ne(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){0===--i&&a()}};n.each(function(){var n=ne(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),n.on=e}),0===i&&a()})},[Symbol.iterator]:An[Symbol.iterator]};var _n={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Cn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Ct.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var n,r,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):s=!1;s&&delete t.__transition}}(this,t)})},Ct.prototype.transition=function(t){var e,n;t instanceof kn?(e=t._id,t=t._name):(e=En(),(n=_n).time=jt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var s,o=r[a],l=o.length,c=0;c<l;++c)(s=o[c])&&te(s,t,e,c,o,n||Cn(s,e));return new kn(r,this._parents,t,e)};const{abs:Sn,max:Rn,min:Ln}=Math;function Dn(t){return[+t[0],+t[1]]}function In(t){return[Dn(t[0]),Dn(t[1])]}["w","e"].map(Nn),["n","s"].map(Nn),["n","w","e","s","nw","ne","sw","se"].map(Nn);function Nn(t){return{type:t}}function Mn(t,e){if(!isFinite(t)||0===t)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function On(t){return(t=Mn(Math.abs(t)))?t[1]:NaN}var Pn,$n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bn(t){if(!(e=$n.exec(t)))throw new Error("invalid format: "+t);var e;return new Fn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Fn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function zn(t,e){var n=Mn(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Bn.prototype=Fn.prototype,Fn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Kn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>zn(100*t,e),r:zn,s:function(t,e){var n=Mn(t,e);if(!n)return Pn=void 0,t.toPrecision(e);var r=n[0],i=n[1],a=i-(Pn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Mn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function qn(t){return t}var Un,jn,Yn,Gn=Array.prototype.map,Wn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vn(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?qn:(e=Gn.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(t.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?qn:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Gn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t,e){var n=(t=Bn(t)).fill,u=t.align,d=t.sign,p=t.symbol,f=t.zero,g=t.width,m=t.comma,y=t.precision,v=t.trim,x=t.type;"n"===x?(m=!0,x="g"):Kn[x]||(void 0===y&&(y=12),v=!0,x="g"),(f||"0"===n&&"="===u)&&(f=!0,n="0",u="=");var b=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),w=("$"===p?a:/[%p]/.test(x)?l:"")+(e&&void 0!==e.suffix?e.suffix:""),T=Kn[x],k=/[defgprs%]/.test(x);function E(t){var e,i,a,l=b,p=w;if("c"===x)p=T(t)+p,t="";else{var E=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:T(Math.abs(t),y),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0===+t&&"+"!==d&&(E=!1),l=(E?"("===d?d:c:"-"===d||"("===d?"":d)+l,p=("s"!==x||isNaN(t)||void 0===Pn?"":Wn[8+Pn/3])+p+(E&&"("===d?")":""),k)for(e=-1,i=t.length;++e<i;)if(48>(a=t.charCodeAt(e))||a>57){p=(46===a?s+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}m&&!f&&(t=r(t,1/0));var A=l.length+t.length+p.length,_=A<g?new Array(g-A+1).join(n):"";switch(m&&f&&(t=r(_+t,_.length?g-p.length:1/0),_=""),u){case"<":t=l+t+p+_;break;case"=":t=l+_+t+p;break;case"^":t=_.slice(0,A=_.length>>1)+l+t+p+_.slice(A);break;default:t=_+l+t+p}return o(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),E.toString=function(){return t+""},E}return{format:u,formatPrefix:function(t,e){var n=3*Math.max(-8,Math.min(8,Math.floor(On(e)/3))),r=Math.pow(10,-n),i=u(((t=Bn(t)).type="f",t),{suffix:Wn[8+n/3]});return function(t){return i(r*t)}}}}function Hn(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Xn(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Qn)):void 0===e&&(e=Zn);for(var n,r,i,a,s,o=new er(t),l=[o];n=l.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,a=s-1;a>=0;--a)l.push(r=i[a]=new er(i[a])),r.parent=n,r.depth=n.depth+1;return o.eachBefore(tr)}function Zn(t){return t.children}function Qn(t){return Array.isArray(t)?t[1]:null}function Jn(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function tr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function er(t){this.data=t,this.depth=this.height=0,this.parent=null}function nr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function rr(t,e,n,r,i){for(var a,s=t.children,o=-1,l=s.length,c=t.value&&(r-e)/t.value;++o<l;)(a=s[o]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function ir(t,e,n,r,i){for(var a,s=t.children,o=-1,l=s.length,c=t.value&&(i-n)/t.value;++o<l;)(a=s[o]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Un=Vn({thousands:",",grouping:[3],currency:["$",""]}),jn=Un.format,Yn=Un.formatPrefix,er.prototype=Xn.prototype={constructor:er,count:function(){return this.eachAfter(Hn)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)s.push(n[r]);for(;a=o.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,a=[i],s=-1;i=a.pop();)if(t.call(e,i,++s,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return Xn(this).eachBefore(Jn)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}};const ar=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var s,o,l,c,h,u,d,p,f,g,m,y=[],v=e.children,x=0,b=0,w=v.length,T=e.value;x<w;){l=i-n,c=a-r;do{h=v[b++].value}while(!h&&b<w);for(u=d=h,m=h*h*(g=Math.max(c/l,l/c)/(T*t)),f=Math.max(d/m,m/u);b<w;++b){if(h+=o=v[b].value,o<u&&(u=o),o>d&&(d=o),m=h*h*g,(p=Math.max(d/m,m/u))>f){h-=o;break}f=p}y.push(s={value:h,dice:l<c,children:v.slice(x,b)}),s.dice?rr(s,n,r,i,T?r+=c*h/T:a):ir(s,n,r,T?n+=l*h/T:i,a),T-=h,x=b}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function sr(t){if("function"!=typeof t)throw new Error;return t}function or(){return 0}function lr(t){return function(){return t}}function cr(){var t=ar,e=!1,n=1,r=1,i=[0],a=or,s=or,o=or,l=or,c=or;function h(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(u),i=[0],e&&t.eachBefore(nr),t}function u(e){var n=i[e.depth],r=e.x0+n,h=e.y0+n,u=e.x1-n,d=e.y1-n;u<r&&(r=u=(r+u)/2),d<h&&(h=d=(h+d)/2),e.x0=r,e.y0=h,e.x1=u,e.y1=d,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,h+=s(e)-n,(u-=o(e)-n)<r&&(r=u=(r+u)/2),(d-=l(e)-n)<h&&(h=d=(h+d)/2),t(e,r,h,u,d))}return h.round=function(t){return arguments.length?(e=!!t,h):e},h.size=function(t){return arguments.length?(n=+t[0],r=+t[1],h):[n,r]},h.tile=function(e){return arguments.length?(t=sr(e),h):t},h.padding=function(t){return arguments.length?h.paddingInner(t).paddingOuter(t):h.paddingInner()},h.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:lr(+t),h):a},h.paddingOuter=function(t){return arguments.length?h.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):h.paddingTop()},h.paddingTop=function(t){return arguments.length?(s="function"==typeof t?t:lr(+t),h):s},h.paddingRight=function(t){return arguments.length?(o="function"==typeof t?t:lr(+t),h):o},h.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:lr(+t),h):l},h.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:lr(+t),h):c},h}const hr=Math.PI/180,ur=180/Math.PI,dr=.96422,pr=.82521,fr=4/29,gr=6/29,mr=3*gr*gr,yr=gr*gr*gr;function vr(t){if(t instanceof xr)return new xr(t.l,t.a,t.b,t.opacity);if(t instanceof _r)return Cr(t);t instanceof Be||(t=Pe(t));var e,n,r=kr(t.r),i=kr(t.g),a=kr(t.b),s=br((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=s:(e=br((.4360747*r+.3850649*i+.1430804*a)/dr),n=br((.0139322*r+.0971045*i+.7141733*a)/pr)),new xr(116*s-16,500*(e-s),200*(s-n),t.opacity)}function xr(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function br(t){return t>yr?Math.pow(t,1/3):t/mr+fr}function wr(t){return t>gr?t*t*t:mr*(t-fr)}function Tr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Er(t){if(t instanceof _r)return new _r(t.h,t.c,t.l,t.opacity);if(t instanceof xr||(t=vr(t)),0===t.a&&0===t.b)return new _r(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ur;return new _r(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ar(t,e,n,r){return 1===arguments.length?Er(t):new _r(t,e,n,null==r?1:r)}function _r(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Cr(t){if(isNaN(t.h))return new xr(t.l,0,0,t.opacity);var e=t.h*hr;return new xr(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Sr(t){return function(e,n){var r=t((e=Ar(e)).h,(n=Ar(n)).h),i=tn(e.c,n.c),a=tn(e.l,n.l),s=tn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=s(t),e+""}}}ge(xr,function(t,e,n,r){return 1===arguments.length?vr(t):new xr(t,e,n,null==r?1:r)},me(ye,{brighter(t){return new xr(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new xr(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Be(Tr(3.1338561*(e=dr*wr(e))-1.6168667*(t=1*wr(t))-.4906146*(n=pr*wr(n))),Tr(-.9787684*e+1.9161415*t+.033454*n),Tr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ge(_r,Ar,me(ye,{brighter(t){return new _r(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new _r(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Cr(this).rgb()}}));const Rr=Sr(function(t,e){var n=e-t;return n?Qe(t,n>180||n<-180?n-360*Math.round(n/360):n):Ze(isNaN(t)?e:t)});Sr(tn);function Lr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Dr extends Map{constructor(t,e=Or){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[n,r]of t)this.set(n,r)}get(t){return super.get(Ir(this,t))}has(t){return super.has(Ir(this,t))}set(t,e){return super.set(Nr(this,t),e)}delete(t){return super.delete(Mr(this,t))}}Set;function Ir({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Nr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Mr({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Or(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Pr=Symbol("implicit");function $r(){var t=new Dr,e=[],n=[],r=Pr;function i(i){let a=t.get(i);if(void 0===a){if(r!==Pr)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Dr;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return $r(e,n).unknown(r)},Lr.apply(i,arguments),i}function Br(){var t,e,n=$r().unknown(void 0),r=n.domain,i=n.range,a=0,s=1,o=!1,l=0,c=0,h=.5;function u(){var n=r().length,u=s<a,d=u?s:a,p=u?a:s;t=(p-d)/Math.max(1,n-l+2*c),o&&(t=Math.floor(t)),d+=(p-d-t*(n-l))*h,e=t*(1-l),o&&(d=Math.round(d),e=Math.round(e));var f=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}(n).map(function(e){return d+t*e});return i(u?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),u()):r()},n.range=function(t){return arguments.length?([a,s]=t,a=+a,s=+s,u()):[a,s]},n.rangeRound=function(t){return[a,s]=t,a=+a,s=+s,o=!0,u()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,u()):o},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),u()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},n.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),u()):h},n.copy=function(){return Br(r(),[a,s]).round(o).paddingInner(l).paddingOuter(c).align(h)},Lr.apply(u(),arguments)}const Fr=Math.sqrt(50),zr=Math.sqrt(10),Kr=Math.sqrt(2);function qr(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=Fr?10:a>=zr?5:a>=Kr?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/c<t&&++o,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*c<t&&++o,l*c>e&&--l),l<o&&.5<=n&&n<2?qr(t,e,2*n):[o,l,c]}function Ur(t,e,n){return qr(t=+t,e=+e,n=+n)[2]}function jr(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?Ur(e,t,n):Ur(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Yr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Gr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wr(t){let e,n,r;function i(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=Yr,n=(e,n)=>Yr(t(e),n),r=(e,n)=>t(e)-n):(e=t===Yr||t===Gr?t:Vr,n=t,r=t),{left:i,center:function(t,e,n=0,a=t.length){const s=i(t,e,n,a-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<=0?i=e+1:a=e}while(i<a)}return i}}}function Vr(){return 0}const Hr=Wr(Yr),Xr=Hr.right,Zr=(Hr.left,Wr(function(t){return null===t?NaN:+t}).center,Xr);function Qr(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),s=new Array(r);for(n=0;n<i;++n)a[n]=ni(t[n],e[n]);for(;n<r;++n)s[n]=e[n];return function(t){for(n=0;n<i;++n)s[n]=a[n](t);return s}}function Jr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ti(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ni(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}function ei(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function ni(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Ze(e):("number"===i?ie:"string"===i?(n=Ne(e))?(e=n,en):sn:e instanceof Ne?en:e instanceof Date?Jr:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Qr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ti:ie:ei))(t,e)}function ri(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function ii(t){return+t}var ai=[0,1];function si(t){return t}function oi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function li(t,e,n){var r=t[0],i=t[1],a=e[0],s=e[1];return i<r?(r=oi(i,r),a=n(s,a)):(r=oi(r,i),a=n(a,s)),function(t){return a(r(t))}}function ci(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=oi(t[s],t[s+1]),a[s]=n(e[s],e[s+1]);return function(e){var n=Zr(t,e,1,r)-1;return a[n](i[n](e))}}function hi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ui(){var t,e,n,r,i,a,s=ai,o=ai,l=ni,c=si;function h(){var t,e,n,l=Math.min(s.length,o.length);return c!==si&&(t=s[0],e=s[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),r=l>2?ci:li,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),o,l)))(t(c(e)))}return u.invert=function(n){return c(e((a||(a=r(o,s.map(t),ie)))(n)))},u.domain=function(t){return arguments.length?(s=Array.from(t,ii),h()):s.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),h()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),l=ri,h()},u.clamp=function(t){return arguments.length?(c=!!t||si,h()):c!==si},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(n=t,u):n},function(n,r){return t=n,e=r,h()}}function di(){return ui()(si,si)}function pi(t,e,n,r){var i,a=jr(t,e,n);switch((r=Bn(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(On(e)/3)))-On(Math.abs(t)))}(a,s))||(r.precision=i),Yn(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,On(e)-On(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-On(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return jn(r)}function fi(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[i,a,s]=r?qr(e,t,n):qr(t,e,n);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(r)if(s<0)for(let c=0;c<o;++c)l[c]=(a-c)/-s;else for(let c=0;c<o;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(i+c)/-s;else for(let c=0;c<o;++c)l[c]=(i+c)*s;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return pi(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),s=0,o=a.length-1,l=a[s],c=a[o],h=10;for(c<l&&(i=l,l=c,c=i,i=s,s=o,o=i);h-- >0;){if((i=Ur(l,c,n))===r)return a[s]=l,a[o]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function gi(){var t=di();return t.copy=function(){return hi(t,gi())},Lr.apply(t,arguments),fi(t)}const mi=1e3,yi=6e4,vi=36e5,xi=864e5,bi=6048e5,wi=2592e6,Ti=31536e6,ki=new Date,Ei=new Date;function Ai(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;let o;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=n=>Ai(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}),n&&(i.count=(e,r)=>(ki.setTime(+e),Ei.setTime(+r),t(ki),t(Ei),Math.floor(n(ki,Ei))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t===0:e=>i.count(0,e)%t===0):i:null)),i}const _i=Ai(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);_i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Ai(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):_i:null);_i.range;const Ci=Ai(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mi)},(t,e)=>(e-t)/mi,t=>t.getUTCSeconds()),Si=(Ci.range,Ai(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mi)},(t,e)=>{t.setTime(+t+e*yi)},(t,e)=>(e-t)/yi,t=>t.getMinutes())),Ri=(Si.range,Ai(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*yi)},(t,e)=>(e-t)/yi,t=>t.getUTCMinutes())),Li=(Ri.range,Ai(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mi-t.getMinutes()*yi)},(t,e)=>{t.setTime(+t+e*vi)},(t,e)=>(e-t)/vi,t=>t.getHours())),Di=(Li.range,Ai(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vi)},(t,e)=>(e-t)/vi,t=>t.getUTCHours())),Ii=(Di.range,Ai(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yi)/xi,t=>t.getDate()-1)),Ni=(Ii.range,Ai(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/xi,t=>t.getUTCDate()-1)),Mi=(Ni.range,Ai(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/xi,t=>Math.floor(t/xi)));Mi.range;function Oi(t){return Ai(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yi)/bi)}const Pi=Oi(0),$i=Oi(1),Bi=Oi(2),Fi=Oi(3),zi=Oi(4),Ki=Oi(5),qi=Oi(6);Pi.range,$i.range,Bi.range,Fi.range,zi.range,Ki.range,qi.range;function Ui(t){return Ai(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/bi)}const ji=Ui(0),Yi=Ui(1),Gi=Ui(2),Wi=Ui(3),Vi=Ui(4),Hi=Ui(5),Xi=Ui(6),Zi=(ji.range,Yi.range,Gi.range,Wi.range,Vi.range,Hi.range,Xi.range,Ai(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Qi=(Zi.range,Ai(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Ji=(Qi.range,Ai(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Ji.every=t=>isFinite(t=Math.floor(t))&&t>0?Ai(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null;Ji.range;const ta=Ai(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ta.every=t=>isFinite(t=Math.floor(t))&&t>0?Ai(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null;ta.range;function ea(t,e,n,r,i,a){const s=[[Ci,1,mi],[Ci,5,5e3],[Ci,15,15e3],[Ci,30,3e4],[a,1,yi],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,vi],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,xi],[r,2,1728e5],[n,1,bi],[e,1,wi],[e,3,7776e6],[t,1,Ti]];function o(e,n,r){const i=Math.abs(n-e)/r,a=Wr(([,,t])=>t).right(s,i);if(a===s.length)return t.every(jr(e/Ti,n/Ti,r));if(0===a)return _i.every(Math.max(jr(e,n,r),1));const[o,l]=s[i/s[a-1][2]<s[a][2]/i?a-1:a];return o.every(l)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:o(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},o]}const[na,ra]=ea(ta,Qi,ji,Mi,Di,Ri),[ia,aa]=ea(Ji,Zi,Pi,Ii,Li,Si);function sa(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function oa(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function la(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var ca,ha,ua={"-":"",_:" ",0:"0"},da=/^\s*\d+/,pa=/^%/,fa=/[\\^$*+?|[\]().{}]/g;function ga(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function ma(t){return t.replace(fa,"\\$&")}function ya(t){return new RegExp("^(?:"+t.map(ma).join("|")+")","i")}function va(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function xa(t,e,n){var r=da.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ba(t,e,n){var r=da.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wa(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=da.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Aa(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _a(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ca(t,e,n){var r=da.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Sa(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ra(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function La(t,e,n){var r=da.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Da(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ia(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Na(t,e,n){var r=da.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=da.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Oa(t,e,n){var r=da.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Pa(t,e,n){var r=pa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function $a(t,e,n){var r=da.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ba(t,e,n){var r=da.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Fa(t,e){return ga(t.getDate(),e,2)}function za(t,e){return ga(t.getHours(),e,2)}function Ka(t,e){return ga(t.getHours()%12||12,e,2)}function qa(t,e){return ga(1+Ii.count(Ji(t),t),e,3)}function Ua(t,e){return ga(t.getMilliseconds(),e,3)}function ja(t,e){return Ua(t,e)+"000"}function Ya(t,e){return ga(t.getMonth()+1,e,2)}function Ga(t,e){return ga(t.getMinutes(),e,2)}function Wa(t,e){return ga(t.getSeconds(),e,2)}function Va(t){var e=t.getDay();return 0===e?7:e}function Ha(t,e){return ga(Pi.count(Ji(t)-1,t),e,2)}function Xa(t){var e=t.getDay();return e>=4||0===e?zi(t):zi.ceil(t)}function Za(t,e){return t=Xa(t),ga(zi.count(Ji(t),t)+(4===Ji(t).getDay()),e,2)}function Qa(t){return t.getDay()}function Ja(t,e){return ga($i.count(Ji(t)-1,t),e,2)}function ts(t,e){return ga(t.getFullYear()%100,e,2)}function es(t,e){return ga((t=Xa(t)).getFullYear()%100,e,2)}function ns(t,e){return ga(t.getFullYear()%1e4,e,4)}function rs(t,e){var n=t.getDay();return ga((t=n>=4||0===n?zi(t):zi.ceil(t)).getFullYear()%1e4,e,4)}function is(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ga(e/60|0,"0",2)+ga(e%60,"0",2)}function as(t,e){return ga(t.getUTCDate(),e,2)}function ss(t,e){return ga(t.getUTCHours(),e,2)}function os(t,e){return ga(t.getUTCHours()%12||12,e,2)}function ls(t,e){return ga(1+Ni.count(ta(t),t),e,3)}function cs(t,e){return ga(t.getUTCMilliseconds(),e,3)}function hs(t,e){return cs(t,e)+"000"}function us(t,e){return ga(t.getUTCMonth()+1,e,2)}function ds(t,e){return ga(t.getUTCMinutes(),e,2)}function ps(t,e){return ga(t.getUTCSeconds(),e,2)}function fs(t){var e=t.getUTCDay();return 0===e?7:e}function gs(t,e){return ga(ji.count(ta(t)-1,t),e,2)}function ms(t){var e=t.getUTCDay();return e>=4||0===e?Vi(t):Vi.ceil(t)}function ys(t,e){return t=ms(t),ga(Vi.count(ta(t),t)+(4===ta(t).getUTCDay()),e,2)}function vs(t){return t.getUTCDay()}function xs(t,e){return ga(Yi.count(ta(t)-1,t),e,2)}function bs(t,e){return ga(t.getUTCFullYear()%100,e,2)}function ws(t,e){return ga((t=ms(t)).getUTCFullYear()%100,e,2)}function Ts(t,e){return ga(t.getUTCFullYear()%1e4,e,4)}function ks(t,e){var n=t.getUTCDay();return ga((t=n>=4||0===n?Vi(t):Vi.ceil(t)).getUTCFullYear()%1e4,e,4)}function Es(){return"+0000"}function As(){return"%"}function _s(t){return+t}function Cs(t){return Math.floor(+t/1e3)}function Ss(t){return new Date(t)}function Rs(t){return t instanceof Date?+t:+new Date(+t)}function Ls(t,e,n,r,i,a,s,o,l,c){var h=di(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),b=c("%Y");function w(t){return(l(t)<t?p:o(t)<t?f:s(t)<t?g:a(t)<t?m:r(t)<t?i(t)<t?y:v:n(t)<t?x:b)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?d(Array.from(t,Rs)):d().map(Ss)},h.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},h.tickFormat=function(t,e){return null==e?w:c(e)},h.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],s=t[i];return s<a&&(n=r,r=i,i=n,n=a,a=s,s=n),t[r]=e.floor(a),t[i]=e.ceil(s),t}(n,t)):h},h.copy=function(){return hi(h,Ls(t,e,n,r,i,a,s,o,l,c))},h}function Ds(){return Lr.apply(Ls(ia,aa,Ji,Zi,Pi,Ii,Li,Si,Ci,ha).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){ca=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=ya(i),h=va(i),u=ya(a),d=va(a),p=ya(s),f=va(s),g=ya(o),m=va(o),y=ya(l),v=va(l),x={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return o[t.getMonth()]},c:null,d:Fa,e:Fa,f:ja,g:es,G:rs,H:za,I:Ka,j:qa,L:Ua,m:Ya,M:Ga,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:_s,s:Cs,S:Wa,u:Va,U:Ha,V:Za,w:Qa,W:Ja,x:null,X:null,y:ts,Y:ns,Z:is,"%":As},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:as,e:as,f:hs,g:ws,G:ks,H:ss,I:os,j:ls,L:cs,m:us,M:ds,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:_s,s:Cs,S:ps,u:fs,U:gs,V:ys,w:vs,W:xs,x:null,X:null,y:bs,Y:Ts,Z:Es,"%":As},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:Ra,e:Ra,f:Oa,g:Aa,G:Ea,H:Da,I:Da,j:La,L:Ma,m:Sa,M:Ia,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=h.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ca,Q:$a,s:Ba,S:Na,u:ba,U:wa,V:Ta,w:xa,W:ka,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Aa,Y:Ea,Z:_a,"%":Pa};function T(t,e){return function(n){var r,i,a,s=[],o=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++o<c;)37===t.charCodeAt(o)&&(s.push(t.slice(l,o)),null!=(i=ua[r=t.charAt(++o)])?r=t.charAt(++o):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),s.push(r),l=o+1);return s.push(t.slice(l,o)),s.join("")}}function k(t,e){return function(n){var r,i,a=la(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=oa(la(a.y,0,1))).getUTCDay(),r=i>4||0===i?Yi.ceil(r):Yi(r),r=Ni.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=sa(la(a.y,0,1))).getDay(),r=i>4||0===i?$i.ceil(r):$i(r),r=Ii.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?oa(la(a.y,0,1)).getUTCDay():sa(la(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,oa(a)):sa(a)}}function E(t,e,n,r){for(var i,a,s=0,o=e.length,l=n.length;s<o;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(a=w[i in ua?e.charAt(s++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=T(n,x),x.X=T(r,x),x.c=T(e,x),b.x=T(n,b),b.X=T(r,b),b.c=T(e,b),{format:function(t){var e=T(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=T(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),ha=ca.format,ca.parse,ca.utcFormat,ca.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Is=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Ns(t){return"string"==typeof t?new At([[document.querySelector(t)]],[document.documentElement]):new At([[t]],Et)}function Ms(t){return function(){return t}}const Os=Math.abs,Ps=Math.atan2,$s=Math.cos,Bs=Math.max,Fs=Math.min,zs=Math.sin,Ks=Math.sqrt,qs=1e-12,Us=Math.PI,js=Us/2,Ys=2*Us;function Gs(t){return t>=1?js:t<=-1?-js:Math.asin(t)}const Ws=Math.PI,Vs=2*Ws,Hs=1e-6,Xs=Vs-Hs;function Zs(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Qs{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Zs:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Zs;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,s=this._y1,o=n-t,l=r-e,c=a-t,h=s-e,u=c*c+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Hs)if(Math.abs(h*o-l*c)>Hs&&i){let d=n-a,p=r-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((Ws-Math.acos((f+u-g)/(2*m*y)))/2),x=v/y,b=v/m;Math.abs(x-1)>Hs&&this._append`L${t+x*c},${e+x*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+b*o},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),o=n*Math.sin(r),l=t+s,c=e+o,h=1^a,u=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Hs||Math.abs(this._y1-c)>Hs)&&this._append`L${l},${c}`,n&&(u<0&&(u=u%Vs+Vs),u>Xs?this._append`A${n},${n},0,1,${h},${t-s},${e-o}A${n},${n},0,1,${h},${this._x1=l},${this._y1=c}`:u>Hs&&this._append`A${n},${n},0,${+(u>=Ws)},${h},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Js(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Qs(e)}function to(t){return t.innerRadius}function eo(t){return t.outerRadius}function no(t){return t.startAngle}function ro(t){return t.endAngle}function io(t){return t&&t.padAngle}function ao(t,e,n,r,i,a,s){var o=t-n,l=e-r,c=(s?a:-a)/Ks(o*o+l*l),h=c*l,u=-c*o,d=t+h,p=e+u,f=n+h,g=r+u,m=(d+f)/2,y=(p+g)/2,v=f-d,x=g-p,b=v*v+x*x,w=i-a,T=d*g-f*p,k=(x<0?-1:1)*Ks(Bs(0,w*w*b-T*T)),E=(T*x-v*k)/b,A=(-T*v-x*k)/b,_=(T*x+v*k)/b,C=(-T*v+x*k)/b,S=E-m,R=A-y,L=_-m,D=C-y;return S*S+R*R>L*L+D*D&&(E=_,A=C),{cx:E,cy:A,x01:-h,y01:-u,x11:E*(i/w-1),y11:A*(i/w-1)}}function so(){var t=to,e=eo,n=Ms(0),r=null,i=no,a=ro,s=io,o=null,l=Js(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=i.apply(this,arguments)-js,g=a.apply(this,arguments)-js,m=Os(g-f),y=g>f;if(o||(o=c=l()),p<d&&(h=p,p=d,d=h),p>qs)if(m>Ys-qs)o.moveTo(p*$s(f),p*zs(f)),o.arc(0,0,p,f,g,!y),d>qs&&(o.moveTo(d*$s(g),d*zs(g)),o.arc(0,0,d,g,f,y));else{var v,x,b=f,w=g,T=f,k=g,E=m,A=m,_=s.apply(this,arguments)/2,C=_>qs&&(r?+r.apply(this,arguments):Ks(d*d+p*p)),S=Fs(Os(p-d)/2,+n.apply(this,arguments)),R=S,L=S;if(C>qs){var D=Gs(C/d*zs(_)),I=Gs(C/p*zs(_));(E-=2*D)>qs?(T+=D*=y?1:-1,k-=D):(E=0,T=k=(f+g)/2),(A-=2*I)>qs?(b+=I*=y?1:-1,w-=I):(A=0,b=w=(f+g)/2)}var N=p*$s(b),M=p*zs(b),O=d*$s(k),P=d*zs(k);if(S>qs){var $,B=p*$s(w),F=p*zs(w),z=d*$s(T),K=d*zs(T);if(m<Us)if($=function(t,e,n,r,i,a,s,o){var l=n-t,c=r-e,h=s-i,u=o-a,d=u*l-h*c;if(!(d*d<qs))return[t+(d=(h*(e-a)-u*(t-i))/d)*l,e+d*c]}(N,M,z,K,B,F,O,P)){var q=N-$[0],U=M-$[1],j=B-$[0],Y=F-$[1],G=1/zs(((u=(q*j+U*Y)/(Ks(q*q+U*U)*Ks(j*j+Y*Y)))>1?0:u<-1?Us:Math.acos(u))/2),W=Ks($[0]*$[0]+$[1]*$[1]);R=Fs(S,(d-W)/(G-1)),L=Fs(S,(p-W)/(G+1))}else R=L=0}A>qs?L>qs?(v=ao(z,K,N,M,p,L,y),x=ao(B,F,O,P,p,L,y),o.moveTo(v.cx+v.x01,v.cy+v.y01),L<S?o.arc(v.cx,v.cy,L,Ps(v.y01,v.x01),Ps(x.y01,x.x01),!y):(o.arc(v.cx,v.cy,L,Ps(v.y01,v.x01),Ps(v.y11,v.x11),!y),o.arc(0,0,p,Ps(v.cy+v.y11,v.cx+v.x11),Ps(x.cy+x.y11,x.cx+x.x11),!y),o.arc(x.cx,x.cy,L,Ps(x.y11,x.x11),Ps(x.y01,x.x01),!y))):(o.moveTo(N,M),o.arc(0,0,p,b,w,!y)):o.moveTo(N,M),d>qs&&E>qs?R>qs?(v=ao(O,P,B,F,d,-R,y),x=ao(N,M,z,K,d,-R,y),o.lineTo(v.cx+v.x01,v.cy+v.y01),R<S?o.arc(v.cx,v.cy,R,Ps(v.y01,v.x01),Ps(x.y01,x.x01),!y):(o.arc(v.cx,v.cy,R,Ps(v.y01,v.x01),Ps(v.y11,v.x11),!y),o.arc(0,0,d,Ps(v.cy+v.y11,v.cx+v.x11),Ps(x.cy+x.y11,x.cx+x.x11),y),o.arc(x.cx,x.cy,R,Ps(x.y11,x.x11),Ps(x.y01,x.x01),!y))):o.arc(0,0,d,k,T,y):o.lineTo(O,P)}else o.moveTo(0,0);if(o.closePath(),c)return o=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Us/2;return[$s(r)*n,zs(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ms(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ms(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ms(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ms(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ms(+t),c):a},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Ms(+t),c):s},c.context=function(t){return arguments.length?(o=null==t?null:t,c):o},c}Array.prototype.slice;function oo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lo(t){this._context=t}function co(t){return new lo(t)}function ho(t){return t[0]}function uo(t){return t[1]}function po(t,e){var n=Ms(!0),r=null,i=co,a=null,s=Js(o);function o(o){var l,c,h,u=(o=oo(o)).length,d=!1;for(null==r&&(a=i(h=s())),l=0;l<=u;++l)!(l<u&&n(c=o[l],l,o))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(c,l,o),+e(c,l,o));if(h)return a=null,h+""||null}return t="function"==typeof t?t:void 0===t?ho:Ms(t),e="function"==typeof e?e:void 0===e?uo:Ms(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Ms(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ms(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function fo(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function go(t){return t}function mo(){var t=go,e=fo,n=null,r=Ms(0),i=Ms(Ys),a=Ms(0);function s(s){var o,l,c,h,u,d=(s=oo(s)).length,p=0,f=new Array(d),g=new Array(d),m=+r.apply(this,arguments),y=Math.min(Ys,Math.max(-Ys,i.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,a.apply(this,arguments)),x=v*(y<0?-1:1);for(o=0;o<d;++o)(u=g[f[o]=o]=+t(s[o],o,s))>0&&(p+=u);for(null!=e?f.sort(function(t,n){return e(g[t],g[n])}):null!=n&&f.sort(function(t,e){return n(s[t],s[e])}),o=0,c=p?(y-d*x)/p:0;o<d;++o,m=h)l=f[o],h=m+((u=g[l])>0?u*c:0)+x,g[l]={data:s[l],index:o,value:u,startAngle:m,endAngle:h,padAngle:v};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ms(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ms(+t),s):i},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ms(+t),s):a},s}function yo(){}function vo(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function xo(t){this._context=t}function bo(t){return new xo(t)}function wo(t){this._context=t}function To(t){return new wo(t)}function ko(t){this._context=t}function Eo(t){return new ko(t)}lo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wo.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ko.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class Ao{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function _o(t){return new Ao(t,!0)}function Co(t){return new Ao(t,!1)}function So(t,e){this._basis=new xo(t),this._beta=e}So.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],s=t[n]-i,o=e[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*s),this._beta*e[l]+(1-this._beta)*(a+r*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ro=function t(e){function n(t){return 1===e?new xo(t):new So(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Lo(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Do(t,e){this._context=t,this._k=(1-e)/6}Do.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Lo(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Lo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Io=function t(e){function n(t){return new Do(t,e)}return n.tension=function(e){return t(+e)},n}(0);function No(t,e){this._context=t,this._k=(1-e)/6}No.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Lo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mo=function t(e){function n(t){return new No(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Oo(t,e){this._context=t,this._k=(1-e)/6}Oo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Lo(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Po=function t(e){function n(t){return new Oo(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $o(t,e,n){var r=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>qs){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>qs){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,a,s,t._x2,t._y2)}function Bo(t,e){this._context=t,this._alpha=e}Bo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fo=function t(e){function n(t){return e?new Bo(t,e):new Do(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zo(t,e){this._context=t,this._alpha=e}zo.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ko=function t(e){function n(t){return e?new zo(t,e):new No(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function qo(t,e){this._context=t,this._alpha=e}qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$o(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Uo=function t(e){function n(t){return e?new qo(t,e):new Oo(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function jo(t){this._context=t}function Yo(t){return new jo(t)}function Go(t){return t<0?-1:1}function Wo(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(Go(a)+Go(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Vo(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ho(t,e,n){var r=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-r)/3;t._context.bezierCurveTo(r+o,i+o*e,a-o,s-o*n,a,s)}function Xo(t){this._context=t}function Zo(t){this._context=new Qo(t)}function Qo(t){this._context=t}function Jo(t){return new Xo(t)}function tl(t){return new Zo(t)}function el(t){this._context=t}function nl(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function rl(t){return new el(t)}function il(t,e){this._context=t,this._t=e}function al(t){return new il(t,.5)}function sl(t){return new il(t,0)}function ol(t){return new il(t,1)}function ll(t,e,n){this.k=t,this.x=e,this.y=n}jo.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ho(this,this._t0,Vo(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ho(this,Vo(this,n=Wo(this,t,e)),n);break;default:Ho(this,this._t0,n=Wo(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Zo.prototype=Object.create(Xo.prototype)).point=function(t,e){Xo.prototype.point.call(this,e,t)},Qo.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=nl(t),i=nl(e),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new ll(1,0,0);ll.prototype},567(t,e,n){"use strict";n.d(e,{Zp:()=>Me});var r=n(8058),i=n(3456),a=0;const s=function(t){var e=++a;return(0,i.A)(t)+e};var o=n(9142),l=n(1717),c=n(4722),h=Math.ceil,u=Math.max;const d=function(t,e,n,r){for(var i=-1,a=u(h((e-t)/(n||1)),0),s=Array(a);a--;)s[r?a:++i]=t,t+=n;return s};var p=n(6832),f=n(3631);const g=function(t){return function(e,n,r){return r&&"number"!=typeof r&&(0,p.A)(e,n,r)&&(n=r=void 0),e=(0,f.A)(e),void 0===n?(n=e,e=0):n=(0,f.A)(n),r=void 0===r?e<n?1:-1:(0,f.A)(r),d(e,n,r,t)}}();var m=n(697);class y{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return v(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&v(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,x)),n=n._prev;return"["+t.join(", ")+"]"}}function v(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function x(t,e){if("_next"!==t&&"_prev"!==t)return e}var b=o.A(1);function w(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new m.T,i=0,a=0;r.A(t.nodes(),function(t){n.setNode(t,{v:t,in:0,out:0})}),r.A(t.edges(),function(t){var r=n.edge(t.v,t.w)||0,s=e(t),o=r+s;n.setEdge(t.v,t.w,o),a=Math.max(a,n.node(t.v).out+=s),i=Math.max(i,n.node(t.w).in+=s)});var s=g(a+i+3).map(function(){return new y}),o=i+1;return r.A(n.nodes(),function(t){k(s,o,n.node(t))}),{graph:n,buckets:s,zeroIdx:o}}(t,e||b),i=function(t,e,n){var r,i=[],a=e[e.length-1],s=e[0];for(;t.nodeCount();){for(;r=s.dequeue();)T(t,e,n,r);for(;r=a.dequeue();)T(t,e,n,r);if(t.nodeCount())for(var o=e.length-2;o>0;--o)if(r=e[o].dequeue()){i=i.concat(T(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return l.A(c.A(i,function(e){return t.outEdges(e.v,e.w)}))}function T(t,e,n,i,a){var s=a?[]:void 0;return r.A(t.inEdges(i.v),function(r){var i=t.edge(r),o=t.node(r.v);a&&s.push({v:r.v,w:r.w}),o.out-=i,k(e,n,o)}),r.A(t.outEdges(i.v),function(r){var i=t.edge(r),a=r.w,s=t.node(a);s.in-=i,k(e,n,s)}),t.removeNode(i.v),s}function k(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}function E(t){var e="greedy"===t.graph().acyclicer?w(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(s){Object.prototype.hasOwnProperty.call(i,s)||(i[s]=!0,n[s]=!0,r.A(t.outEdges(s),function(t){Object.prototype.hasOwnProperty.call(n,t.w)?e.push(t):a(t.w)}),delete n[s])}return r.A(t.nodes(),a),e}(t);r.A(e,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,s("rev"))})}var A=n(7222),_=n(5507),C=n(6964);const S=function(t,e){return(0,_.A)(t,e,function(e,n){return(0,C.A)(t,n)})};var R=n(5255),L=n(7424);const D=function(t){return(0,L.A)((0,R.A)(t,void 0,l.A),t+"")}(function(t,e){return null==t?{}:S(t,e)});var I=n(3068),N=n(2559);const M=function(t,e){return t>e};var O=n(9008);const P=function(t){return t&&t.length?(0,N.A)(t,O.A,M):void 0};var $=n(6666),B=n(2528),F=n(9841),z=n(6307);const K=function(t,e){var n={};return e=(0,z.A)(e,3),(0,F.A)(t,function(t,r,i){(0,B.A)(n,r,e(t,r,i))}),n};var q=n(9592),U=n(6452),j=n(9622),Y=n(1917);const G=function(){return Y.A.Date.now()};function W(t,e,n,r){var i;do{i=s(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function V(t){var e=new m.T({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.A(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),r.A(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function H(t,e){var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;if(!s&&!o)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=c*s/o,r=c):(s<0&&(l=-l),n=l,r=l*o/s),{x:i+n,y:a+r}}function X(t){var e=c.A(g(Q(t)+1),function(){return[]});return r.A(t.nodes(),function(n){var r=t.node(n),i=r.rank;q.A(i)||(e[i][r.order]=n)}),e}function Z(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),W(t,"border",i,e)}function Q(t){return P(c.A(t.nodes(),function(e){var n=t.node(e).rank;if(!q.A(n))return n}))}function J(t,e){var n=G();try{return e()}finally{console.log(t+" time: "+(G()-n)+"ms")}}function tt(t,e){return e()}function et(t,e,n,r,i,a){var s={width:0,height:0,rank:a,borderType:e},o=i[e][a-1],l=W(t,"border",s,n);i[e][a]=l,t.setParent(l,r),o&&t.setEdge(o,l,{weight:1})}function nt(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.A(t.nodes(),function(e){at(t.node(e))}),r.A(t.edges(),function(e){var n=t.edge(e);r.A(n.points,at),Object.prototype.hasOwnProperty.call(n,"y")&&at(n)})}(t),"lr"!==e&&"rl"!==e||(!function(t){r.A(t.nodes(),function(e){st(t.node(e))}),r.A(t.edges(),function(e){var n=t.edge(e);r.A(n.points,st),Object.prototype.hasOwnProperty.call(n,"x")&&st(n)})}(t),rt(t))}function rt(t){r.A(t.nodes(),function(e){it(t.node(e))}),r.A(t.edges(),function(e){it(t.edge(e))})}function it(t){var e=t.width;t.width=t.height,t.height=e}function at(t){t.y=-t.y}function st(t){var e=t.x;t.x=t.y,t.y=e}function ot(t){t.graph().dummyChains=[],r.A(t.edges(),function(e){!function(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a===r+1)return;t.removeEdge(e);var c,h,u=void 0;for(h=0,++r;r<a;++h,++r)o.points=[],c=W(t,"edge",u={width:0,height:0,edgeLabel:o,edgeObj:e,rank:r},"_d"),r===l&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),t.setEdge(n,c,{weight:o.weight},s),0===h&&t.graph().dummyChains.push(c),n=c;t.setEdge(n,i,{weight:o.weight},s)}(t,e)})}var lt=n(6224);const ct=function(t,e){return t&&t.length?(0,N.A)(t,(0,z.A)(e,2),lt.A):void 0};function ht(t){var e={};r.A(t.sources(),function n(r){var i=t.node(r);if(Object.prototype.hasOwnProperty.call(e,r))return i.rank;e[r]=!0;var a=U.A(c.A(t.outEdges(r),function(e){return n(e.w)-t.edge(e).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a})}function ut(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function dt(t){var e,n,r=new m.T({directed:!1}),i=t.nodes()[0],a=t.nodeCount();for(r.setNode(i,{});pt(r,t)<a;)e=ft(r,t),n=r.hasNode(e.v)?ut(t,e):-ut(t,e),gt(r,t,n);return r}function pt(t,e){return r.A(t.nodes(),function n(i){r.A(e.nodeEdges(i),function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||ut(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))})}),t.nodeCount()}function ft(t,e){return ct(e.edges(),function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return ut(e,n)})}function gt(t,e,n){r.A(t.nodes(),function(t){e.node(t).rank+=n})}var mt=n(473),yt=n(4092);o.A(1);o.A(1);n(4453),n(9137),n(8446),n(9703);(0,n(805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var vt="\\ud800-\\udfff",xt="["+vt+"]",bt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",wt="\\ud83c[\\udffb-\\udfff]",Tt="[^"+vt+"]",kt="(?:\\ud83c[\\udde6-\\uddff]){2}",Et="[\\ud800-\\udbff][\\udc00-\\udfff]",At="(?:"+bt+"|"+wt+")"+"?",_t="[\\ufe0e\\ufe0f]?",Ct=_t+At+("(?:\\u200d(?:"+[Tt,kt,Et].join("|")+")"+_t+At+")*"),St="(?:"+[Tt+bt+"?",bt,kt,Et,xt].join("|")+")";RegExp(wt+"(?="+wt+")|"+St+Ct,"g");function Rt(){}Rt.prototype=new Error;var Lt=n(2049);function Dt(t,e,n){Lt.A(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.A(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);It(t,e,"post"===n,s,i,a)}),a}function It(t,e,n,i,a,s){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,n||s.push(e),r.A(a(e),function(e){It(t,e,n,i,a,s)}),n&&s.push(e))}n(1471);function Nt(t){t=function(t){var e=(new m.T).setGraph(t.graph());return r.A(t.nodes(),function(n){e.setNode(n,t.node(n))}),r.A(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}(t),ht(t);var e,n=dt(t);for(Pt(n),Mt(n,t);e=Bt(n);)zt(n,t,e,Ft(n,t,e))}function Mt(t,e){var n=function(t,e){return Dt(t,e,"post")}(t,t.nodes());n=n.slice(0,n.length-1),r.A(n,function(n){!function(t,e,n){var r=t.node(n),i=r.parent;t.edge(n,i).cutvalue=Ot(t,e,n)}(t,e,n)})}function Ot(t,e,n){var i=t.node(n).parent,a=!0,s=e.edge(n,i),o=0;return s||(a=!1,s=e.edge(i,n)),o=s.weight,r.A(e.nodeEdges(n),function(r){var s,l,c=r.v===n,h=c?r.w:r.v;if(h!==i){var u=c===a,d=e.edge(r).weight;if(o+=u?d:-d,s=n,l=h,t.hasEdge(s,l)){var p=t.edge(n,h).cutvalue;o+=u?-p:p}}}),o}function Pt(t,e){arguments.length<2&&(e=t.nodes()[0]),$t(t,{},1,e)}function $t(t,e,n,i,a){var s=n,o=t.node(i);return e[i]=!0,r.A(t.neighbors(i),function(r){Object.prototype.hasOwnProperty.call(e,r)||(n=$t(t,e,n,r,i))}),o.low=s,o.lim=n++,a?o.parent=a:delete o.parent,n}function Bt(t){return mt.A(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Ft(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),s=t.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var c=yt.A(e.edges(),function(e){return l===Kt(t,t.node(e.v),o)&&l!==Kt(t,t.node(e.w),o)});return ct(c,function(t){return ut(e,t)})}function zt(t,e,n,i){var a=n.v,s=n.w;t.removeEdge(a,s),t.setEdge(i.v,i.w,{}),Pt(t),Mt(t,e),function(t,e){var n=mt.A(t.nodes(),function(t){return!e.node(t).parent}),i=function(t,e){return Dt(t,e,"pre")}(t,n);i=i.slice(1),r.A(i,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}(t,e)}function Kt(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}function qt(t){switch(t.graph().ranker){case"network-simplex":default:jt(t);break;case"tight-tree":!function(t){ht(t),dt(t)}(t);break;case"longest-path":Ut(t)}}Nt.initLowLimValues=Pt,Nt.initCutValues=Mt,Nt.calcCutValue=Ot,Nt.leaveEdge=Bt,Nt.enterEdge=Ft,Nt.exchangeEdges=zt;var Ut=ht;function jt(t){Nt(t)}var Yt=n(2866),Gt=n(3130);function Wt(t){var e=W(t,"root",{},"_root"),n=function(t){var e={};function n(i,a){var s=t.children(i);s&&s.length&&r.A(s,function(t){n(t,a+1)}),e[i]=a}return r.A(t.children(),function(t){n(t,1)}),e}(t),i=P(Yt.A(n))-1,a=2*i+1;t.graph().nestingRoot=e,r.A(t.edges(),function(e){t.edge(e).minlen*=a});var s=function(t){return Gt.A(t.edges(),function(e,n){return e+t.edge(n).weight},0)}(t)+1;r.A(t.children(),function(r){Vt(t,e,a,s,i,n,r)}),t.graph().nodeRankFactor=a}function Vt(t,e,n,i,a,s,o){var l=t.children(o);if(l.length){var c=Z(t,"_bt"),h=Z(t,"_bb"),u=t.node(o);t.setParent(c,o),u.borderTop=c,t.setParent(h,o),u.borderBottom=h,r.A(l,function(r){Vt(t,e,n,i,a,s,r);var l=t.node(r),u=l.borderTop?l.borderTop:r,d=l.borderBottom?l.borderBottom:r,p=l.borderTop?i:2*i,f=u!==d?1:a-s[o]+1;t.setEdge(c,u,{weight:p,minlen:f,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:f,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,c,{weight:0,minlen:a+s[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:n})}var Ht=n(4507);const Xt=function(t){return(0,Ht.A)(t,5)};function Zt(t,e,n){var i=function(t){var e;for(;t.hasNode(e=s("_root")););return e}(t),a=new m.T({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return r.A(t.nodes(),function(s){var o=t.node(s),l=t.parent(s);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(a.setNode(s),a.setParent(s,l||i),r.A(t[n](s),function(e){var n=e.v===s?e.w:e.v,r=a.edge(n,s),i=q.A(r)?0:r.weight;a.setEdge(n,s,{weight:t.edge(e).weight+i})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(s,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),a}var Qt=n(2851);const Jt=function(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var o=r<a?e[r]:void 0;n(s,t[r],o)}return s};const te=function(t,e){return Jt(t||[],e||[],Qt.A)};var ee=n(7671),ne=n(5572),re=n(6318),ie=n(2568);const ae=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t};var se=n(2789),oe=n(1882);const le=function(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,a=(0,oe.A)(t),s=void 0!==e,o=null===e,l=e==e,c=(0,oe.A)(e);if(!o&&!c&&!a&&t>e||a&&s&&l&&!o&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t<e||c&&n&&i&&!r&&!a||o&&n&&i||!s&&i||!l)return-1}return 0};const ce=function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,s=i.length,o=n.length;++r<s;){var l=le(i[r],a[r]);if(l)return r>=o?l:l*("desc"==n[r]?-1:1)}return t.index-e.index};const he=function(t,e,n){e=e.length?(0,ne.A)(e,function(t){return(0,Lt.A)(t)?function(e){return(0,re.A)(e,1===t.length?t[0]:t)}:t}):[O.A];var r=-1;e=(0,ne.A)(e,(0,se.A)(z.A));var i=(0,ie.A)(t,function(t,n,i){return{criteria:(0,ne.A)(e,function(e){return e(t)}),index:++r,value:t}});return ae(i,function(t,e){return ce(t,e,n)})};const ue=(0,n(4326).A)(function(t,e){if(null==t)return[];var n=e.length;return n>1&&(0,p.A)(t,e[0],e[1])?e=[]:n>2&&(0,p.A)(e[0],e[1],e[2])&&(e=[e[0]]),he(t,(0,ee.A)(e,1),[])});function de(t,e){for(var n=0,r=1;r<e.length;++r)n+=pe(t,e[r-1],e[r]);return n}function pe(t,e,n){for(var i=te(n,c.A(n,function(t,e){return e})),a=l.A(c.A(e,function(e){return ue(c.A(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")})),s=1;s<n.length;)s<<=1;var o=2*s-1;s-=1;var h=c.A(new Array(o),function(){return 0}),u=0;return r.A(a.forEach(function(t){var e=t.pos+s;h[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=h[e+1]),h[e=e-1>>1]+=t.weight;u+=t.weight*n})),u}function fe(t,e){var n={};return r.A(t,function(t,e){var r=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};q.A(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),r.A(e.edges(),function(t){var e=n[t.v],r=n[t.w];q.A(e)||q.A(r)||(r.indegree++,e.out.push(n[t.w]))}),function(t){var e=[];function n(t){return function(e){e.merged||(q.A(e.barycenter)||q.A(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0===--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.A(a.in.reverse(),n(a)),r.A(a.out,i(a))}return c.A(yt.A(e,function(t){return!t.merged}),function(t){return D(t,["vs","i","barycenter","weight"])})}(yt.A(n,function(t){return!t.indegree}))}function ge(t,e){var n,i=function(t,e){var n={lhs:[],rhs:[]};return r.A(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")}),a=i.lhs,s=ue(i.rhs,function(t){return-t.i}),o=[],c=0,h=0,u=0;a.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),u=me(o,s,u),r.A(a,function(t){u+=t.vs.length,o.push(t.vs),c+=t.barycenter*t.weight,h+=t.weight,u=me(o,s,u)});var d={vs:l.A(o)};return h&&(d.barycenter=c/h,d.weight=h),d}function me(t,e,n){for(var r;e.length&&(r=$.A(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function ye(t,e,n,i){var a=t.children(e),s=t.node(e),o=s?s.borderLeft:void 0,h=s?s.borderRight:void 0,u={};o&&(a=yt.A(a,function(t){return t!==o&&t!==h}));var d=function(t,e){return c.A(e,function(e){var n=t.inEdges(e);if(n.length){var r=Gt.A(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:r.sum/r.weight,weight:r.weight}}return{v:e}})}(t,a);r.A(d,function(e){if(t.children(e.v).length){var r=ye(t,e.v,n,i);u[e.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(a=e,s=r,q.A(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s});var p=fe(d,n);!function(t,e){r.A(t,function(t){t.vs=l.A(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}(p,u);var f=ge(p,i);if(o&&(f.vs=l.A([o,f.vs,h]),t.predecessors(o).length)){var g=t.node(t.predecessors(o)[0]),m=t.node(t.predecessors(h)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+g.order+m.order)/(f.weight+2),f.weight+=2}return f}function ve(t){var e=Q(t),n=xe(t,g(1,e+1),"inEdges"),i=xe(t,g(e-1,-1,-1),"outEdges"),a=function(t){var e={},n=yt.A(t.nodes(),function(e){return!t.children(e).length}),i=P(c.A(n,function(e){return t.node(e).rank})),a=c.A(g(i+1),function(){return[]}),s=ue(n,function(e){return t.node(e).rank});return r.A(s,function n(i){if(!j.A(e,i)){e[i]=!0;var s=t.node(i);a[s.rank].push(i),r.A(t.successors(i),n)}}),a}(t);we(t,a);for(var s,o=Number.POSITIVE_INFINITY,l=0,h=0;h<4;++l,++h){be(l%2?n:i,l%4>=2);var u=de(t,a=X(t));u<o&&(h=0,s=Xt(a),o=u)}we(t,s)}function xe(t,e,n){return c.A(e,function(e){return Zt(t,e,n)})}function be(t,e){var n=new m.T;r.A(t,function(t){var i=t.graph().root,a=ye(t,i,n,e);r.A(a.vs,function(e,n){t.node(e).order=n}),function(t,e,n){var i,a={};r.A(n,function(n){for(var r,s,o=t.parent(n);o;){if((r=t.parent(o))?(s=a[r],a[r]=o):(s=i,i=o),s&&s!==o)return void e.setEdge(s,o);o=r}})}(t,n,a.vs)})}function we(t,e){r.A(e,function(e){r.A(e,function(e,n){t.node(e).order=n})})}function Te(t){var e=function(t){var e={},n=0;function i(a){var s=n;r.A(t.children(a),i),e[a]={low:s,lim:n++}}return r.A(t.children(),i),e}(t);r.A(t.graph().dummyChains,function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,s=[],o=[],l=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),s.push(i)}while(i&&(e[i].low>l||c>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)o.push(i);return{path:s.concat(o.reverse()),lca:a}}(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,c=s[l],h=!0;n!==i.w;){if(r=t.node(n),h){for(;(c=s[l])!==o&&t.node(c).maxRank<r.rank;)l++;c===o&&(h=!1)}if(!h){for(;l<s.length-1&&t.node(c=s[l+1]).minRank<=r.rank;)l++;c=s[l]}t.setParent(n,c),n=t.successors(n)[0]}})}var ke=n(9922);const Ee=function(t,e){return t&&(0,F.A)(t,(0,ke.A)(e))};var Ae=n(7132),_e=n(9999);const Ce=function(t,e){return null==t?t:(0,Ae.A)(t,(0,ke.A)(e),_e.A)};function Se(t,e){var n={};return Gt.A(e,function(e,i){var a=0,s=0,o=e.length,l=$.A(i);return r.A(i,function(e,c){var h=function(t,e){if(t.node(e).dummy)return mt.A(t.predecessors(e),function(e){return t.node(e).dummy})}(t,e),u=h?t.node(h).order:o;(h||e===l)&&(r.A(i.slice(s,c+1),function(e){r.A(t.predecessors(e),function(r){var i=t.node(r),s=i.order;!(s<a||u<s)||i.dummy&&t.node(e).dummy||Re(n,r,e)})}),s=c+1,a=u)}),i}),n}function Re(t,e,n){if(e>n){var r=e;e=n,n=r}Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=t[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Le(t,e,n){if(e>n){var r=e;e=n,n=r}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],n)}function De(t,e,n,i,a){var s={},o=function(t,e,n,i){var a=new m.T,s=t.graph(),o=function(t,e,n){return function(r,i,a){var s,o=r.node(i),l=r.node(a),c=0;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=-o.width/2;break;case"r":s=o.width/2}if(s&&(c+=n?s:-s),s=0,c+=(o.dummy?e:t)/2,c+=(l.dummy?e:t)/2,c+=l.width/2,Object.prototype.hasOwnProperty.call(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,i);return r.A(e,function(e){var i;r.A(e,function(e){var r=n[e];if(a.setNode(r),i){var s=n[i],l=a.edge(s,r);a.setEdge(s,r,Math.max(o(t,e,i),l||0))}i=e})}),a}(t,e,n,a),l=a?"borderLeft":"borderRight";function c(t,e){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return c(function(t){s[t]=o.inEdges(t).reduce(function(t,e){return Math.max(t,s[e.v]+o.edge(e))},0)},o.predecessors.bind(o)),c(function(e){var n=o.outEdges(e).reduce(function(t,e){return Math.min(t,s[e.w]-o.edge(e))},Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[e]=Math.max(s[e],n))},o.successors.bind(o)),r.A(i,function(t){s[t]=s[n[t]]}),s}function Ie(t){var e,n=X(t),i=A.A(Se(t,n),function(t,e){var n={};function i(e,i,a,s,o){var l;r.A(g(i,a),function(i){l=e[i],t.node(l).dummy&&r.A(t.predecessors(l),function(e){var r=t.node(e);r.dummy&&(r.order<s||r.order>o)&&Re(n,e,l)})})}return Gt.A(e,function(e,n){var a,s=-1,o=0;return r.A(n,function(r,l){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(a=t.node(c[0]).order,i(n,o,l,s,a),o=l,s=a)}i(n,o,n.length,a,e.length)}),n}),n}(t,n)),a={};r.A(["u","d"],function(s){e="u"===s?n:Yt.A(n).reverse(),r.A(["l","r"],function(n){"r"===n&&(e=c.A(e,function(t){return Yt.A(t).reverse()}));var o=("u"===s?t.predecessors:t.successors).bind(t),l=function(t,e,n,i){var a={},s={},o={};return r.A(e,function(t){r.A(t,function(t,e){a[t]=t,s[t]=t,o[t]=e})}),r.A(e,function(t){var e=-1;r.A(t,function(t){var r=i(t);if(r.length){r=ue(r,function(t){return o[t]});for(var l=(r.length-1)/2,c=Math.floor(l),h=Math.ceil(l);c<=h;++c){var u=r[c];s[t]===t&&e<o[u]&&!Le(n,t,u)&&(s[u]=t,s[t]=a[t]=a[u],e=o[u])}}})}),{root:a,align:s}}(0,e,i,o),h=De(t,e,l.root,l.align,"r"===n);"r"===n&&(h=K(h,function(t){return-t})),a[s+n]=h})});var s=function(t,e){return ct(Yt.A(e),function(e){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return Ce(e,function(e,i){var a=function(t,e){return t.node(e).width}(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)}),n-r})}(t,a);return function(t,e){var n=Yt.A(e),i=U.A(n),a=P(n);r.A(["u","d"],function(n){r.A(["l","r"],function(r){var s,o=n+r,l=t[o];if(l!==e){var c=Yt.A(l);(s="l"===r?i-U.A(c):a-P(c))&&(t[o]=K(l,function(t){return t+s}))}})})}(a,s),function(t,e){return K(t.ul,function(n,r){if(e)return t[e.toLowerCase()][r];var i=ue(c.A(t,r));return(i[1]+i[2])/2})}(a,t.graph().align)}function Ne(t){(function(t){var e=X(t),n=t.graph().ranksep,i=0;r.A(e,function(e){var a=P(c.A(e,function(e){return t.node(e).height}));r.A(e,function(e){t.node(e).y=i+a/2}),i+=a+n})})(t=V(t)),Ee(Ie(t),function(e,n){t.node(n).x=e})}function Me(t,e){var n=e&&e.debugTiming?J:tt;n("layout",()=>{var e=n(" buildLayoutGraph",()=>function(t){var e=new m.T({multigraph:!0,compound:!0}),n=je(t.graph());return e.setGraph(A.A({},Pe,Ue(n,Oe),D(n,$e))),r.A(t.nodes(),function(n){var r=je(t.node(n));e.setNode(n,I.A(Ue(r,Be),Fe)),e.setParent(n,t.parent(n))}),r.A(t.edges(),function(n){var r=je(t.edge(n));e.setEdge(n,A.A({},Ke,Ue(r,ze),D(r,qe)))}),e}(t));n(" runLayout",()=>function(t,e){e(" makeSpaceForEdgeLabels",()=>function(t){var e=t.graph();e.ranksep/=2,r.A(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(t)),e(" removeSelfEdges",()=>function(t){r.A(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}(t)),e(" acyclic",()=>E(t)),e(" nestingGraph.run",()=>Wt(t)),e(" rank",()=>qt(V(t))),e(" injectEdgeLabelProxies",()=>function(t){r.A(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};W(t,"edge-proxy",i,"_ep")}})}(t)),e(" removeEmptyRanks",()=>function(t){var e=U.A(c.A(t.nodes(),function(e){return t.node(e).rank})),n=[];r.A(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var i=0,a=t.graph().nodeRankFactor;r.A(n,function(e,n){q.A(e)&&n%a!==0?--i:i&&r.A(e,function(e){t.node(e).rank+=i})})}(t)),e(" nestingGraph.cleanup",()=>function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.A(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}(t)),e(" normalizeRanks",()=>function(t){var e=U.A(c.A(t.nodes(),function(e){return t.node(e).rank}));r.A(t.nodes(),function(n){var r=t.node(n);j.A(r,"rank")&&(r.rank-=e)})}(t)),e(" assignRankMinMax",()=>function(t){var e=0;r.A(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=P(e,r.maxRank))}),t.graph().maxRank=e}(t)),e(" removeEdgeLabelProxies",()=>function(t){r.A(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}(t)),e(" normalize.run",()=>ot(t)),e(" parentDummyChains",()=>Te(t)),e(" addBorderSegments",()=>function(t){r.A(t.children(),function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.A(i,e),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,o=a.maxRank+1;s<o;++s)et(t,"borderLeft","_bl",n,a,s),et(t,"borderRight","_br",n,a,s)}})}(t)),e(" order",()=>ve(t)),e(" insertSelfEdges",()=>function(t){var e=X(t);r.A(e,function(e){var n=0;r.A(e,function(e,i){var a=t.node(e);a.order=i+n,r.A(a.selfEdges,function(e){W(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")}),delete a.selfEdges})})}(t)),e(" adjustCoordinateSystem",()=>function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||rt(t)}(t)),e(" position",()=>Ne(t)),e(" positionSelfEdges",()=>function(t){r.A(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,s=n.x-i,o=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],n.label.x=n.x,n.label.y=n.y}})}(t)),e(" removeBorderNodes",()=>function(t){r.A(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node($.A(n.borderLeft)),s=t.node($.A(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),r.A(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)),e(" normalize.undo",()=>function(t){r.A(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}(t)),e(" fixupEdgeLabelCoords",()=>function(t){r.A(t.edges(),function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(t)),e(" undoCoordinateSystem",()=>nt(t)),e(" translateGraph",()=>function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,s=t.graph(),o=s.marginx||0,l=s.marginy||0;function c(t){var r=t.x,s=t.y,o=t.width,l=t.height;e=Math.min(e,r-o/2),n=Math.max(n,r+o/2),i=Math.min(i,s-l/2),a=Math.max(a,s+l/2)}r.A(t.nodes(),function(e){c(t.node(e))}),r.A(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,"x")&&c(n)}),e-=o,i-=l,r.A(t.nodes(),function(n){var r=t.node(n);r.x-=e,r.y-=i}),r.A(t.edges(),function(n){var a=t.edge(n);r.A(a.points,function(t){t.x-=e,t.y-=i}),Object.prototype.hasOwnProperty.call(a,"x")&&(a.x-=e),Object.prototype.hasOwnProperty.call(a,"y")&&(a.y-=i)}),s.width=n-e+o,s.height=a-i+l}(t)),e(" assignNodeIntersects",()=>function(t){r.A(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),s=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=s,r=a),i.points.unshift(H(a,n)),i.points.push(H(s,r))})}(t)),e(" reversePoints",()=>function(t){r.A(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}(t)),e(" acyclic.undo",()=>function(t){r.A(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}(t))}(e,n)),n(" updateInputGraph",()=>function(t,e){r.A(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),r.A(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e))})}var Oe=["nodesep","edgesep","ranksep","marginx","marginy"],Pe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$e=["acyclicer","ranker","rankdir","align"],Be=["width","height"],Fe={width:0,height:0},ze=["minlen","weight","width","height","labeloffset"],Ke={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},qe=["labelpos"];function Ue(t,e){return K(D(t,e),Number)}function je(t){var e={};return r.A(t,function(t,n){e[n.toLowerCase()]=t}),e}},1471(t,e,n){"use strict";n.d(e,{T:()=>v});var r=n(9142),i=n(9610),a=n(7422),s=n(4092),o=n(6401),l=n(8058),c=n(9592),h=n(7671),u=n(4326),d=n(7371),p=n(3533);const f=(0,u.A)(function(t){return(0,d.A)((0,h.A)(t,1,p.A,!0))});var g=n(2866),m=n(3130),y="\0";class v{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.A(void 0),this._defaultEdgeLabelFn=r.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[y]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return i.A(t)||(t=r.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return a.A(this._nodes)}sources(){var t=this;return s.A(this.nodes(),function(e){return o.A(t._in[e])})}sinks(){var t=this;return s.A(this.nodes(),function(e){return o.A(t._out[e])})}setNodes(t,e){var n=arguments,r=this;return l.A(t,function(t){n.length>1?r.setNode(t,e):r.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=y,this._children[t]={},this._children[y][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),l.A(a.A(this._in[t]),e),delete this._in[t],delete this._preds[t],l.A(a.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.A(e))e=y;else{for(var n=e+="";!c.A(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==y)return e}}children(t){if(c.A(t)&&(t=y),this._isCompound){var e=this._children[t];if(e)return a.A(e)}else{if(t===y)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return a.A(e)}successors(t){var e=this._sucs[t];if(e)return a.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return f(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;l.A(this._nodes,function(n,r){t(r)&&e.setNode(r,n)}),l.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))});var r={};function i(t){var a=n.parent(t);return void 0===a||e.hasNode(a)?(r[t]=a,a):a in r?r[a]:i(a)}return this._isCompound&&l.A(e.nodes(),function(t){e.setParent(t,i(t))}),e}setDefaultEdgeLabel(t){return i.A(t)||(t=r.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return m.A(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this}setEdge(){var t,e,n,r,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,c.A(n)||(n=""+n);var s=w(this._isDirected,t,e,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(!c.A(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(t,e,n);var o=function(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};r&&(o.name=r);return o}(this._isDirected,t,e,n);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[s]=o,x(this._preds[e],t),x(this._sucs[t],e),this._in[e][s]=o,this._out[t][s]=o,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,n);return this._edgeLabels[r]}hasEdge(t,e,n){var r=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(t,e,n){var r=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],b(this._preds[e],t),b(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=g.A(n);return e?s.A(r,function(t){return t.v===e}):r}}outEdges(t,e){var n=this._out[t];if(n){var r=g.A(n);return e?s.A(r,function(t){return t.w===e}):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}function x(t,e){t[e]?t[e]++:t[e]=1}function b(t,e){--t[e]||delete t[e]}function w(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(c.A(r)?"\0":r)}function T(t,e){return w(t,e.v,e.w,e.name)}v.prototype._nodeCount=0,v.prototype._edgeCount=0},697(t,e,n){"use strict";n.d(e,{T:()=>r.T});var r=n(1471)},2130(t,e,n){"use strict";n.d(e,{default:()=>fi});class r extends Error{constructor(t,e){var n,i,a="KaTeX parse error: "+t,s=e&&e.loc;if(s&&s.start<=s.end){var o=s.lexer.input;n=s.start,i=s.end,n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,i).replace(/[^]/g,"$&̲");a+=(n>15?"…"+o.slice(n-15,n):o.slice(0,n))+l+(i+15<o.length?o.slice(i,i+15)+"…":o.slice(i))}super(a),this.name="ParseError",Object.setPrototypeOf(this,r.prototype),this.position=n,null!=n&&null!=i&&(this.length=i-n),this.rawMessage=t}}var i=/([A-Z])/g,a=t=>t.replace(i,"-$1").toLowerCase(),s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},o=/[&><"']/g,l=t=>String(t).replace(o,t=>s[t]),c=t=>"ordgroup"===t.type||"color"===t.type?1===t.body.length?c(t.body[0]):t:"font"===t.type?c(t.body):t,h=new Set(["mathord","textord","atom"]),u=t=>h.has(c(t).type),d={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>"Infinity"===t?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function p(t){if("default"in t)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class f{constructor(t){for(var e of(void 0===t&&(t={}),t=t||{},Object.keys(d))){var n=d[e],r=t[e];this[e]=void 0!==r?n.processor?n.processor(r):r:p(n)}}reportNonstrict(t,e,n){var i=this.strict;if("function"==typeof i&&(i=i(t,e,n)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",n);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,n){var r=this.strict;if("function"==typeof r)try{r=r(t,e,n)}catch(i){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+e+" ["+t+"]"),!1)))}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var e=(t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?":"!==e[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"})(t.url);if(null==e)return!1;t.protocol=e}var n="function"==typeof this.trust?this.trust(t):this.trust;return Boolean(n)}}class g{constructor(t,e,n){this.id=t,this.size=e,this.cramped=n}sup(){return m[y[this.id]]}sub(){return m[v[this.id]]}fracNum(){return m[x[this.id]]}fracDen(){return m[b[this.id]]}cramp(){return m[w[this.id]]}text(){return m[T[this.id]]}isTight(){return this.size>=2}}var m=[new g(0,0,!1),new g(1,0,!0),new g(2,1,!1),new g(3,1,!0),new g(4,2,!1),new g(5,2,!0),new g(6,3,!1),new g(7,3,!0)],y=[4,5,4,5,6,7,6,7],v=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],w=[1,1,3,3,5,5,7,7],T=[0,1,2,3,2,3,2,3],k={DISPLAY:m[0],TEXT:m[2],SCRIPT:m[4],SCRIPTSCRIPT:m[6]},E=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var A=[];function _(t){for(var e=0;e<A.length;e+=2)if(t>=A[e]&&t<=A[e+1])return!0;return!1}E.forEach(t=>t.blocks.forEach(t=>A.push(...t)));var C=80,S={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class R{constructor(t){this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(t=>t.toText()).join("")}}var L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},I=function(t){return"string"!=typeof t&&(t=t.unit),t in L||t in D||"ex"===t},N=function(t,e){var n;if(t.unit in L)n=L[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)n=e.fontMetrics().cssEmPerMu;else{var i;if(i=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)n=i.fontMetrics().xHeight;else{if("em"!==t.unit)throw new r("Invalid unit: '"+t.unit+"'");n=i.fontMetrics().quad}i!==e&&(n*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)},M=function(t){return+t.toFixed(4)+"em"},O=function(t){return t.filter(t=>t).join(" ")},P=function(t,e,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var r=e.getColor();r&&(this.style.color=r)}},$=function(t){var e=document.createElement(t);for(var n of(e.className=O(this.classes),Object.keys(this.style)))e.style[n]=this.style[n];for(var r of Object.keys(this.attributes))e.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e},B=/[\s"'>/=\x00-\x1f]/,F=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+l(O(this.classes))+'"');var n="";for(var i of Object.keys(this.style))n+=a(i)+":"+this.style[i]+";";for(var s of(n&&(e+=' style="'+l(n)+'"'),Object.keys(this.attributes))){if(B.test(s))throw new r("Invalid attribute name '"+s+"'");e+=" "+s+'="'+l(this.attributes[s])+'"'}e+=">";for(var o=0;o<this.children.length;o++)e+=this.children[o].toMarkup();return e+="</"+t+">"};class z{constructor(t,e,n,r){P.call(this,t,n,r),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return $.call(this,"span")}toMarkup(){return F.call(this,"span")}}class K{constructor(t,e,n,r){P.call(this,e,r),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return $.call(this,"a")}toMarkup(){return F.call(this,"a")}}class q{constructor(t,e,n){this.alt=e,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");for(var e of(t.src=this.src,t.alt=this.alt,t.className="mord",Object.keys(this.style)))t.style[e]=this.style[e];return t}toMarkup(){var t='<img src="'+l(this.src)+'" alt="'+l(this.alt)+'"',e="";for(var n of Object.keys(this.style))e+=a(n)+":"+this.style[n]+";";return e&&(t+=' style="'+l(e)+'"'),t+="'/>"}}var U={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class j{constructor(t,e,n,r,i,a,s,o){this.text=t,this.height=e||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0;var l=function(t){for(var e=0;e<E.length;e++)for(var n=E[e],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(t>=i[0]&&t<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=U[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),e=null;for(var n of(this.italic>0&&((e=document.createElement("span")).style.marginRight=M(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=O(this.classes)),Object.keys(this.style)))(e=e||document.createElement("span")).style[n]=this.style[n];return e?(e.appendChild(t),e):t}toMarkup(){var t=!1,e="<span";this.classes.length&&(t=!0,e+=' class="',e+=l(O(this.classes)),e+='"');var n="";for(var r of(this.italic>0&&(n+="margin-right:"+this.italic+"em;"),Object.keys(this.style)))n+=a(r)+":"+this.style[r]+";";n&&(t=!0,e+=' style="'+l(n)+'"');var i=l(this.text);return t?(e+=">",e+=i,e+="</span>"):i}}class Y{constructor(t,e){this.children=t||[],this.attributes=e||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var e of Object.keys(this.attributes))t+=" "+e+'="'+l(this.attributes[e])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>"}}class G{constructor(t,e){this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",S[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+l(this.alternate)+'"/>':'<path d="'+l(S[this.pathName])+'"/>'}}class W{constructor(t){this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var t="<line";for(var e of Object.keys(this.attributes))t+=" "+e+'="'+l(this.attributes[e])+'"';return t+="/>"}}var V={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},H={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},X={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Z(t,e,n){if(!V[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),i=V[e][r];if(!i&&t[0]in X&&(r=X[t[0]].charCodeAt(0),i=V[e][r]),i||"text"!==n||_(r)&&(i=V[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Q={};var J={bin:1,close:1,inner:1,open:1,punct:1,rel:1},tt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},et={math:{},text:{}};function nt(t,e,n,r,i,a){et[t][i]={font:e,group:n,replace:r},a&&r&&(et[t][r]=et[t][i])}var rt="math",it="text",at="main",st="ams",ot="accent-token",lt="bin",ct="close",ht="inner",ut="mathord",dt="op-token",pt="open",ft="punct",gt="rel",mt="spacing",yt="textord";nt(rt,at,gt,"≡","\\equiv",!0),nt(rt,at,gt,"≺","\\prec",!0),nt(rt,at,gt,"≻","\\succ",!0),nt(rt,at,gt,"","\\sim",!0),nt(rt,at,gt,"⊥","\\perp"),nt(rt,at,gt,"⪯","\\preceq",!0),nt(rt,at,gt,"⪰","\\succeq",!0),nt(rt,at,gt,"≃","\\simeq",!0),nt(rt,at,gt,"","\\mid",!0),nt(rt,at,gt,"≪","\\ll",!0),nt(rt,at,gt,"≫","\\gg",!0),nt(rt,at,gt,"≍","\\asymp",!0),nt(rt,at,gt,"∥","\\parallel"),nt(rt,at,gt,"⋈","\\bowtie",!0),nt(rt,at,gt,"⌣","\\smile",!0),nt(rt,at,gt,"⊑","\\sqsubseteq",!0),nt(rt,at,gt,"⊒","\\sqsupseteq",!0),nt(rt,at,gt,"≐","\\doteq",!0),nt(rt,at,gt,"⌢","\\frown",!0),nt(rt,at,gt,"∋","\\ni",!0),nt(rt,at,gt,"∝","\\propto",!0),nt(rt,at,gt,"⊢","\\vdash",!0),nt(rt,at,gt,"⊣","\\dashv",!0),nt(rt,at,gt,"∋","\\owns"),nt(rt,at,ft,".","\\ldotp"),nt(rt,at,ft,"⋅","\\cdotp"),nt(rt,at,yt,"#","\\#"),nt(it,at,yt,"#","\\#"),nt(rt,at,yt,"&","\\&"),nt(it,at,yt,"&","\\&"),nt(rt,at,yt,"ℵ","\\aleph",!0),nt(rt,at,yt,"∀","\\forall",!0),nt(rt,at,yt,"ℏ","\\hbar",!0),nt(rt,at,yt,"∃","\\exists",!0),nt(rt,at,yt,"∇","\\nabla",!0),nt(rt,at,yt,"♭","\\flat",!0),nt(rt,at,yt,"","\\ell",!0),nt(rt,at,yt,"♮","\\natural",!0),nt(rt,at,yt,"♣","\\clubsuit",!0),nt(rt,at,yt,"℘","\\wp",!0),nt(rt,at,yt,"♯","\\sharp",!0),nt(rt,at,yt,"♢","\\diamondsuit",!0),nt(rt,at,yt,"","\\Re",!0),nt(rt,at,yt,"♡","\\heartsuit",!0),nt(rt,at,yt,"","\\Im",!0),nt(rt,at,yt,"♠","\\spadesuit",!0),nt(rt,at,yt,"§","\\S",!0),nt(it,at,yt,"§","\\S"),nt(rt,at,yt,"¶","\\P",!0),nt(it,at,yt,"¶","\\P"),nt(rt,at,yt,"†","\\dag"),nt(it,at,yt,"†","\\dag"),nt(it,at,yt,"†","\\textdagger"),nt(rt,at,yt,"‡","\\ddag"),nt(it,at,yt,"‡","\\ddag"),nt(it,at,yt,"‡","\\textdaggerdbl"),nt(rt,at,ct,"⎱","\\rmoustache",!0),nt(rt,at,pt,"⎰","\\lmoustache",!0),nt(rt,at,ct,"⟯","\\rgroup",!0),nt(rt,at,pt,"⟮","\\lgroup",!0),nt(rt,at,lt,"∓","\\mp",!0),nt(rt,at,lt,"⊖","\\ominus",!0),nt(rt,at,lt,"⊎","\\uplus",!0),nt(rt,at,lt,"⊓","\\sqcap",!0),nt(rt,at,lt,"","\\ast"),nt(rt,at,lt,"⊔","\\sqcup",!0),nt(rt,at,lt,"◯","\\bigcirc",!0),nt(rt,at,lt,"∙","\\bullet",!0),nt(rt,at,lt,"‡","\\ddagger"),nt(rt,at,lt,"≀","\\wr",!0),nt(rt,at,lt,"⨿","\\amalg"),nt(rt,at,lt,"&","\\And"),nt(rt,at,gt,"⟵","\\longleftarrow",!0),nt(rt,at,gt,"⇐","\\Leftarrow",!0),nt(rt,at,gt,"⟸","\\Longleftarrow",!0),nt(rt,at,gt,"⟶","\\longrightarrow",!0),nt(rt,at,gt,"⇒","\\Rightarrow",!0),nt(rt,at,gt,"⟹","\\Longrightarrow",!0),nt(rt,at,gt,"↔","\\leftrightarrow",!0),nt(rt,at,gt,"⟷","\\longleftrightarrow",!0),nt(rt,at,gt,"⇔","\\Leftrightarrow",!0),nt(rt,at,gt,"⟺","\\Longleftrightarrow",!0),nt(rt,at,gt,"↦","\\mapsto",!0),nt(rt,at,gt,"⟼","\\longmapsto",!0),nt(rt,at,gt,"↗","\\nearrow",!0),nt(rt,at,gt,"↩","\\hookleftarrow",!0),nt(rt,at,gt,"↪","\\hookrightarrow",!0),nt(rt,at,gt,"↘","\\searrow",!0),nt(rt,at,gt,"↼","\\leftharpoonup",!0),nt(rt,at,gt,"⇀","\\rightharpoonup",!0),nt(rt,at,gt,"↙","\\swarrow",!0),nt(rt,at,gt,"↽","\\leftharpoondown",!0),nt(rt,at,gt,"⇁","\\rightharpoondown",!0),nt(rt,at,gt,"↖","\\nwarrow",!0),nt(rt,at,gt,"⇌","\\rightleftharpoons",!0),nt(rt,st,gt,"≮","\\nless",!0),nt(rt,st,gt,"","\\@nleqslant"),nt(rt,st,gt,"","\\@nleqq"),nt(rt,st,gt,"⪇","\\lneq",!0),nt(rt,st,gt,"≨","\\lneqq",!0),nt(rt,st,gt,"","\\@lvertneqq"),nt(rt,st,gt,"⋦","\\lnsim",!0),nt(rt,st,gt,"⪉","\\lnapprox",!0),nt(rt,st,gt,"⊀","\\nprec",!0),nt(rt,st,gt,"⋠","\\npreceq",!0),nt(rt,st,gt,"⋨","\\precnsim",!0),nt(rt,st,gt,"⪹","\\precnapprox",!0),nt(rt,st,gt,"≁","\\nsim",!0),nt(rt,st,gt,"","\\@nshortmid"),nt(rt,st,gt,"∤","\\nmid",!0),nt(rt,st,gt,"⊬","\\nvdash",!0),nt(rt,st,gt,"⊭","\\nvDash",!0),nt(rt,st,gt,"⋪","\\ntriangleleft"),nt(rt,st,gt,"⋬","\\ntrianglelefteq",!0),nt(rt,st,gt,"⊊","\\subsetneq",!0),nt(rt,st,gt,"","\\@varsubsetneq"),nt(rt,st,gt,"⫋","\\subsetneqq",!0),nt(rt,st,gt,"","\\@varsubsetneqq"),nt(rt,st,gt,"≯","\\ngtr",!0),nt(rt,st,gt,"","\\@ngeqslant"),nt(rt,st,gt,"","\\@ngeqq"),nt(rt,st,gt,"⪈","\\gneq",!0),nt(rt,st,gt,"≩","\\gneqq",!0),nt(rt,st,gt,"","\\@gvertneqq"),nt(rt,st,gt,"⋧","\\gnsim",!0),nt(rt,st,gt,"⪊","\\gnapprox",!0),nt(rt,st,gt,"⊁","\\nsucc",!0),nt(rt,st,gt,"⋡","\\nsucceq",!0),nt(rt,st,gt,"⋩","\\succnsim",!0),nt(rt,st,gt,"⪺","\\succnapprox",!0),nt(rt,st,gt,"≆","\\ncong",!0),nt(rt,st,gt,"","\\@nshortparallel"),nt(rt,st,gt,"∦","\\nparallel",!0),nt(rt,st,gt,"⊯","\\nVDash",!0),nt(rt,st,gt,"⋫","\\ntriangleright"),nt(rt,st,gt,"⋭","\\ntrianglerighteq",!0),nt(rt,st,gt,"","\\@nsupseteqq"),nt(rt,st,gt,"⊋","\\supsetneq",!0),nt(rt,st,gt,"","\\@varsupsetneq"),nt(rt,st,gt,"⫌","\\supsetneqq",!0),nt(rt,st,gt,"","\\@varsupsetneqq"),nt(rt,st,gt,"⊮","\\nVdash",!0),nt(rt,st,gt,"⪵","\\precneqq",!0),nt(rt,st,gt,"⪶","\\succneqq",!0),nt(rt,st,gt,"","\\@nsubseteqq"),nt(rt,st,lt,"⊴","\\unlhd"),nt(rt,st,lt,"⊵","\\unrhd"),nt(rt,st,gt,"↚","\\nleftarrow",!0),nt(rt,st,gt,"↛","\\nrightarrow",!0),nt(rt,st,gt,"⇍","\\nLeftarrow",!0),nt(rt,st,gt,"⇏","\\nRightarrow",!0),nt(rt,st,gt,"↮","\\nleftrightarrow",!0),nt(rt,st,gt,"⇎","\\nLeftrightarrow",!0),nt(rt,st,gt,"△","\\vartriangle"),nt(rt,st,yt,"ℏ","\\hslash"),nt(rt,st,yt,"▽","\\triangledown"),nt(rt,st,yt,"◊","\\lozenge"),nt(rt,st,yt,"Ⓢ","\\circledS"),nt(rt,st,yt,"®","\\circledR"),nt(it,st,yt,"®","\\circledR"),nt(rt,st,yt,"∡","\\measuredangle",!0),nt(rt,st,yt,"∄","\\nexists"),nt(rt,st,yt,"℧","\\mho"),nt(rt,st,yt,"Ⅎ","\\Finv",!0),nt(rt,st,yt,"⅁","\\Game",!0),nt(rt,st,yt,"","\\backprime"),nt(rt,st,yt,"▲","\\blacktriangle"),nt(rt,st,yt,"▼","\\blacktriangledown"),nt(rt,st,yt,"■","\\blacksquare"),nt(rt,st,yt,"⧫","\\blacklozenge"),nt(rt,st,yt,"★","\\bigstar"),nt(rt,st,yt,"∢","\\sphericalangle",!0),nt(rt,st,yt,"∁","\\complement",!0),nt(rt,st,yt,"ð","\\eth",!0),nt(it,at,yt,"ð","ð"),nt(rt,st,yt,"","\\diagup"),nt(rt,st,yt,"╲","\\diagdown"),nt(rt,st,yt,"□","\\square"),nt(rt,st,yt,"□","\\Box"),nt(rt,st,yt,"◊","\\Diamond"),nt(rt,st,yt,"¥","\\yen",!0),nt(it,st,yt,"¥","\\yen",!0),nt(rt,st,yt,"✓","\\checkmark",!0),nt(it,st,yt,"✓","\\checkmark"),nt(rt,st,yt,"ℶ","\\beth",!0),nt(rt,st,yt,"ℸ","\\daleth",!0),nt(rt,st,yt,"ℷ","\\gimel",!0),nt(rt,st,yt,"ϝ","\\digamma",!0),nt(rt,st,yt,"ϰ","\\varkappa"),nt(rt,st,pt,"┌","\\@ulcorner",!0),nt(rt,st,ct,"┐","\\@urcorner",!0),nt(rt,st,pt,"└","\\@llcorner",!0),nt(rt,st,ct,"┘","\\@lrcorner",!0),nt(rt,st,gt,"≦","\\leqq",!0),nt(rt,st,gt,"⩽","\\leqslant",!0),nt(rt,st,gt,"⪕","\\eqslantless",!0),nt(rt,st,gt,"≲","\\lesssim",!0),nt(rt,st,gt,"⪅","\\lessapprox",!0),nt(rt,st,gt,"≊","\\approxeq",!0),nt(rt,st,lt,"⋖","\\lessdot"),nt(rt,st,gt,"⋘","\\lll",!0),nt(rt,st,gt,"≶","\\lessgtr",!0),nt(rt,st,gt,"⋚","\\lesseqgtr",!0),nt(rt,st,gt,"⪋","\\lesseqqgtr",!0),nt(rt,st,gt,"≑","\\doteqdot"),nt(rt,st,gt,"≓","\\risingdotseq",!0),nt(rt,st,gt,"≒","\\fallingdotseq",!0),nt(rt,st,gt,"∽","\\backsim",!0),nt(rt,st,gt,"⋍","\\backsimeq",!0),nt(rt,st,gt,"⫅","\\subseteqq",!0),nt(rt,st,gt,"⋐","\\Subset",!0),nt(rt,st,gt,"⊏","\\sqsubset",!0),nt(rt,st,gt,"≼","\\preccurlyeq",!0),nt(rt,st,gt,"⋞","\\curlyeqprec",!0),nt(rt,st,gt,"≾","\\precsim",!0),nt(rt,st,gt,"⪷","\\precapprox",!0),nt(rt,st,gt,"⊲","\\vartriangleleft"),nt(rt,st,gt,"⊴","\\trianglelefteq"),nt(rt,st,gt,"⊨","\\vDash",!0),nt(rt,st,gt,"⊪","\\Vvdash",!0),nt(rt,st,gt,"⌣","\\smallsmile"),nt(rt,st,gt,"⌢","\\smallfrown"),nt(rt,st,gt,"≏","\\bumpeq",!0),nt(rt,st,gt,"≎","\\Bumpeq",!0),nt(rt,st,gt,"≧","\\geqq",!0),nt(rt,st,gt,"⩾","\\geqslant",!0),nt(rt,st,gt,"⪖","\\eqslantgtr",!0),nt(rt,st,gt,"≳","\\gtrsim",!0),nt(rt,st,gt,"⪆","\\gtrapprox",!0),nt(rt,st,lt,"⋗","\\gtrdot"),nt(rt,st,gt,"⋙","\\ggg",!0),nt(rt,st,gt,"≷","\\gtrless",!0),nt(rt,st,gt,"⋛","\\gtreqless",!0),nt(rt,st,gt,"⪌","\\gtreqqless",!0),nt(rt,st,gt,"≖","\\eqcirc",!0),nt(rt,st,gt,"≗","\\circeq",!0),nt(rt,st,gt,"≜","\\triangleq",!0),nt(rt,st,gt,"","\\thicksim"),nt(rt,st,gt,"≈","\\thickapprox"),nt(rt,st,gt,"⫆","\\supseteqq",!0),nt(rt,st,gt,"⋑","\\Supset",!0),nt(rt,st,gt,"⊐","\\sqsupset",!0),nt(rt,st,gt,"≽","\\succcurlyeq",!0),nt(rt,st,gt,"⋟","\\curlyeqsucc",!0),nt(rt,st,gt,"≿","\\succsim",!0),nt(rt,st,gt,"⪸","\\succapprox",!0),nt(rt,st,gt,"⊳","\\vartriangleright"),nt(rt,st,gt,"⊵","\\trianglerighteq"),nt(rt,st,gt,"⊩","\\Vdash",!0),nt(rt,st,gt,"","\\shortmid"),nt(rt,st,gt,"∥","\\shortparallel"),nt(rt,st,gt,"≬","\\between",!0),nt(rt,st,gt,"⋔","\\pitchfork",!0),nt(rt,st,gt,"∝","\\varpropto"),nt(rt,st,gt,"◀","\\blacktriangleleft"),nt(rt,st,gt,"∴","\\therefore",!0),nt(rt,st,gt,"∍","\\backepsilon"),nt(rt,st,gt,"▶","\\blacktriangleright"),nt(rt,st,gt,"∵","\\because",!0),nt(rt,st,gt,"⋘","\\llless"),nt(rt,st,gt,"⋙","\\gggtr"),nt(rt,st,lt,"⊲","\\lhd"),nt(rt,st,lt,"⊳","\\rhd"),nt(rt,st,gt,"≂","\\eqsim",!0),nt(rt,at,gt,"⋈","\\Join"),nt(rt,st,gt,"≑","\\Doteq",!0),nt(rt,st,lt,"∔","\\dotplus",!0),nt(rt,st,lt,"","\\smallsetminus"),nt(rt,st,lt,"⋒","\\Cap",!0),nt(rt,st,lt,"⋓","\\Cup",!0),nt(rt,st,lt,"⩞","\\doublebarwedge",!0),nt(rt,st,lt,"⊟","\\boxminus",!0),nt(rt,st,lt,"⊞","\\boxplus",!0),nt(rt,st,lt,"⋇","\\divideontimes",!0),nt(rt,st,lt,"⋉","\\ltimes",!0),nt(rt,st,lt,"⋊","\\rtimes",!0),nt(rt,st,lt,"⋋","\\leftthreetimes",!0),nt(rt,st,lt,"⋌","\\rightthreetimes",!0),nt(rt,st,lt,"⋏","\\curlywedge",!0),nt(rt,st,lt,"⋎","\\curlyvee",!0),nt(rt,st,lt,"⊝","\\circleddash",!0),nt(rt,st,lt,"⊛","\\circledast",!0),nt(rt,st,lt,"⋅","\\centerdot"),nt(rt,st,lt,"⊺","\\intercal",!0),nt(rt,st,lt,"⋒","\\doublecap"),nt(rt,st,lt,"⋓","\\doublecup"),nt(rt,st,lt,"⊠","\\boxtimes",!0),nt(rt,st,gt,"⇢","\\dashrightarrow",!0),nt(rt,st,gt,"⇠","\\dashleftarrow",!0),nt(rt,st,gt,"⇇","\\leftleftarrows",!0),nt(rt,st,gt,"⇆","\\leftrightarrows",!0),nt(rt,st,gt,"⇚","\\Lleftarrow",!0),nt(rt,st,gt,"↞","\\twoheadleftarrow",!0),nt(rt,st,gt,"↢","\\leftarrowtail",!0),nt(rt,st,gt,"↫","\\looparrowleft",!0),nt(rt,st,gt,"⇋","\\leftrightharpoons",!0),nt(rt,st,gt,"↶","\\curvearrowleft",!0),nt(rt,st,gt,"↺","\\circlearrowleft",!0),nt(rt,st,gt,"↰","\\Lsh",!0),nt(rt,st,gt,"⇈","\\upuparrows",!0),nt(rt,st,gt,"↿","\\upharpoonleft",!0),nt(rt,st,gt,"⇃","\\downharpoonleft",!0),nt(rt,at,gt,"⊶","\\origof",!0),nt(rt,at,gt,"⊷","\\imageof",!0),nt(rt,st,gt,"⊸","\\multimap",!0),nt(rt,st,gt,"↭","\\leftrightsquigarrow",!0),nt(rt,st,gt,"⇉","\\rightrightarrows",!0),nt(rt,st,gt,"⇄","\\rightleftarrows",!0),nt(rt,st,gt,"↠","\\twoheadrightarrow",!0),nt(rt,st,gt,"↣","\\rightarrowtail",!0),nt(rt,st,gt,"↬","\\looparrowright",!0),nt(rt,st,gt,"↷","\\curvearrowright",!0),nt(rt,st,gt,"↻","\\circlearrowright",!0),nt(rt,st,gt,"↱","\\Rsh",!0),nt(rt,st,gt,"⇊","\\downdownarrows",!0),nt(rt,st,gt,"↾","\\upharpoonright",!0),nt(rt,st,gt,"⇂","\\downharpoonright",!0),nt(rt,st,gt,"⇝","\\rightsquigarrow",!0),nt(rt,st,gt,"⇝","\\leadsto"),nt(rt,st,gt,"⇛","\\Rrightarrow",!0),nt(rt,st,gt,"↾","\\restriction"),nt(rt,at,yt,"","`"),nt(rt,at,yt,"$","\\$"),nt(it,at,yt,"$","\\$"),nt(it,at,yt,"$","\\textdollar"),nt(rt,at,yt,"%","\\%"),nt(it,at,yt,"%","\\%"),nt(rt,at,yt,"_","\\_"),nt(it,at,yt,"_","\\_"),nt(it,at,yt,"_","\\textunderscore"),nt(rt,at,yt,"∠","\\angle",!0),nt(rt,at,yt,"∞","\\infty",!0),nt(rt,at,yt,"","\\prime"),nt(rt,at,yt,"△","\\triangle"),nt(rt,at,yt,"Γ","\\Gamma",!0),nt(rt,at,yt,"Δ","\\Delta",!0),nt(rt,at,yt,"Θ","\\Theta",!0),nt(rt,at,yt,"Λ","\\Lambda",!0),nt(rt,at,yt,"Ξ","\\Xi",!0),nt(rt,at,yt,"Π","\\Pi",!0),nt(rt,at,yt,"Σ","\\Sigma",!0),nt(rt,at,yt,"Υ","\\Upsilon",!0),nt(rt,at,yt,"Φ","\\Phi",!0),nt(rt,at,yt,"Ψ","\\Psi",!0),nt(rt,at,yt,"Ω","\\Omega",!0),nt(rt,at,yt,"A","Α"),nt(rt,at,yt,"B","Β"),nt(rt,at,yt,"E","Ε"),nt(rt,at,yt,"Z","Ζ"),nt(rt,at,yt,"H","Η"),nt(rt,at,yt,"I","Ι"),nt(rt,at,yt,"K","Κ"),nt(rt,at,yt,"M","Μ"),nt(rt,at,yt,"N","Ν"),nt(rt,at,yt,"O","Ο"),nt(rt,at,yt,"P","Ρ"),nt(rt,at,yt,"T","Τ"),nt(rt,at,yt,"X","Χ"),nt(rt,at,yt,"¬","\\neg",!0),nt(rt,at,yt,"¬","\\lnot"),nt(rt,at,yt,"","\\top"),nt(rt,at,yt,"⊥","\\bot"),nt(rt,at,yt,"∅","\\emptyset"),nt(rt,st,yt,"∅","\\varnothing"),nt(rt,at,ut,"α","\\alpha",!0),nt(rt,at,ut,"β","\\beta",!0),nt(rt,at,ut,"γ","\\gamma",!0),nt(rt,at,ut,"δ","\\delta",!0),nt(rt,at,ut,"ϵ","\\epsilon",!0),nt(rt,at,ut,"ζ","\\zeta",!0),nt(rt,at,ut,"η","\\eta",!0),nt(rt,at,ut,"θ","\\theta",!0),nt(rt,at,ut,"ι","\\iota",!0),nt(rt,at,ut,"κ","\\kappa",!0),nt(rt,at,ut,"λ","\\lambda",!0),nt(rt,at,ut,"μ","\\mu",!0),nt(rt,at,ut,"ν","\\nu",!0),nt(rt,at,ut,"ξ","\\xi",!0),nt(rt,at,ut,"ο","\\omicron",!0),nt(rt,at,ut,"π","\\pi",!0),nt(rt,at,ut,"ρ","\\rho",!0),nt(rt,at,ut,"σ","\\sigma",!0),nt(rt,at,ut,"τ","\\tau",!0),nt(rt,at,ut,"υ","\\upsilon",!0),nt(rt,at,ut,"ϕ","\\phi",!0),nt(rt,at,ut,"χ","\\chi",!0),nt(rt,at,ut,"ψ","\\psi",!0),nt(rt,at,ut,"ω","\\omega",!0),nt(rt,at,ut,"ε","\\varepsilon",!0),nt(rt,at,ut,"ϑ","\\vartheta",!0),nt(rt,at,ut,"ϖ","\\varpi",!0),nt(rt,at,ut,"ϱ","\\varrho",!0),nt(rt,at,ut,"ς","\\varsigma",!0),nt(rt,at,ut,"φ","\\varphi",!0),nt(rt,at,lt,"","*",!0),nt(rt,at,lt,"+","+"),nt(rt,at,lt,"","-",!0),nt(rt,at,lt,"⋅","\\cdot",!0),nt(rt,at,lt,"∘","\\circ",!0),nt(rt,at,lt,"÷","\\div",!0),nt(rt,at,lt,"±","\\pm",!0),nt(rt,at,lt,"×","\\times",!0),nt(rt,at,lt,"∩","\\cap",!0),nt(rt,at,lt,"","\\cup",!0),nt(rt,at,lt,"","\\setminus",!0),nt(rt,at,lt,"∧","\\land"),nt(rt,at,lt,"","\\lor"),nt(rt,at,lt,"∧","\\wedge",!0),nt(rt,at,lt,"","\\vee",!0),nt(rt,at,yt,"√","\\surd"),nt(rt,at,pt,"⟨","\\langle",!0),nt(rt,at,pt,"","\\lvert"),nt(rt,at,pt,"∥","\\lVert"),nt(rt,at,ct,"?","?"),nt(rt,at,ct,"!","!"),nt(rt,at,ct,"⟩","\\rangle",!0),nt(rt,at,ct,"","\\rvert"),nt(rt,at,ct,"∥","\\rVert"),nt(rt,at,gt,"=","="),nt(rt,at,gt,":",":"),nt(rt,at,gt,"≈","\\approx",!0),nt(rt,at,gt,"≅","\\cong",!0),nt(rt,at,gt,"≥","\\ge"),nt(rt,at,gt,"≥","\\geq",!0),nt(rt,at,gt,"←","\\gets"),nt(rt,at,gt,">","\\gt",!0),nt(rt,at,gt,"∈","\\in",!0),nt(rt,at,gt,"","\\@not"),nt(rt,at,gt,"⊂","\\subset",!0),nt(rt,at,gt,"⊃","\\supset",!0),nt(rt,at,gt,"⊆","\\subseteq",!0),nt(rt,at,gt,"⊇","\\supseteq",!0),nt(rt,st,gt,"⊈","\\nsubseteq",!0),nt(rt,st,gt,"⊉","\\nsupseteq",!0),nt(rt,at,gt,"⊨","\\models"),nt(rt,at,gt,"←","\\leftarrow",!0),nt(rt,at,gt,"≤","\\le"),nt(rt,at,gt,"≤","\\leq",!0),nt(rt,at,gt,"<","\\lt",!0),nt(rt,at,gt,"→","\\rightarrow",!0),nt(rt,at,gt,"→","\\to"),nt(rt,st,gt,"≱","\\ngeq",!0),nt(rt,st,gt,"≰","\\nleq",!0),nt(rt,at,mt," ","\\ "),nt(rt,at,mt," ","\\space"),nt(rt,at,mt," ","\\nobreakspace"),nt(it,at,mt," ","\\ "),nt(it,at,mt," "," "),nt(it,at,mt," ","\\space"),nt(it,at,mt," ","\\nobreakspace"),nt(rt,at,mt,null,"\\nobreak"),nt(rt,at,mt,null,"\\allowbreak"),nt(rt,at,ft,",",","),nt(rt,at,ft,";",";"),nt(rt,st,lt,"⊼","\\barwedge",!0),nt(rt,st,lt,"⊻","\\veebar",!0),nt(rt,at,lt,"⊙","\\odot",!0),nt(rt,at,lt,"⊕","\\oplus",!0),nt(rt,at,lt,"⊗","\\otimes",!0),nt(rt,at,yt,"∂","\\partial",!0),nt(rt,at,lt,"⊘","\\oslash",!0),nt(rt,st,lt,"⊚","\\circledcirc",!0),nt(rt,st,lt,"⊡","\\boxdot",!0),nt(rt,at,lt,"△","\\bigtriangleup"),nt(rt,at,lt,"▽","\\bigtriangledown"),nt(rt,at,lt,"†","\\dagger"),nt(rt,at,lt,"⋄","\\diamond"),nt(rt,at,lt,"⋆","\\star"),nt(rt,at,lt,"◃","\\triangleleft"),nt(rt,at,lt,"▹","\\triangleright"),nt(rt,at,pt,"{","\\{"),nt(it,at,yt,"{","\\{"),nt(it,at,yt,"{","\\textbraceleft"),nt(rt,at,ct,"}","\\}"),nt(it,at,yt,"}","\\}"),nt(it,at,yt,"}","\\textbraceright"),nt(rt,at,pt,"{","\\lbrace"),nt(rt,at,ct,"}","\\rbrace"),nt(rt,at,pt,"[","\\lbrack",!0),nt(it,at,yt,"[","\\lbrack",!0),nt(rt,at,ct,"]","\\rbrack",!0),nt(it,at,yt,"]","\\rbrack",!0),nt(rt,at,pt,"(","\\lparen",!0),nt(rt,at,ct,")","\\rparen",!0),nt(it,at,yt,"<","\\textless",!0),nt(it,at,yt,">","\\textgreater",!0),nt(rt,at,pt,"⌊","\\lfloor",!0),nt(rt,at,ct,"⌋","\\rfloor",!0),nt(rt,at,pt,"⌈","\\lceil",!0),nt(rt,at,ct,"⌉","\\rceil",!0),nt(rt,at,yt,"\\","\\backslash"),nt(rt,at,yt,"","|"),nt(rt,at,yt,"","\\vert"),nt(it,at,yt,"|","\\textbar",!0),nt(rt,at,yt,"∥","\\|"),nt(rt,at,yt,"∥","\\Vert"),nt(it,at,yt,"∥","\\textbardbl"),nt(it,at,yt,"~","\\textasciitilde"),nt(it,at,yt,"\\","\\textbackslash"),nt(it,at,yt,"^","\\textasciicircum"),nt(rt,at,gt,"↑","\\uparrow",!0),nt(rt,at,gt,"⇑","\\Uparrow",!0),nt(rt,at,gt,"↓","\\downarrow",!0),nt(rt,at,gt,"⇓","\\Downarrow",!0),nt(rt,at,gt,"↕","\\updownarrow",!0),nt(rt,at,gt,"⇕","\\Updownarrow",!0),nt(rt,at,dt,"∐","\\coprod"),nt(rt,at,dt,"","\\bigvee"),nt(rt,at,dt,"⋀","\\bigwedge"),nt(rt,at,dt,"⨄","\\biguplus"),nt(rt,at,dt,"⋂","\\bigcap"),nt(rt,at,dt,"","\\bigcup"),nt(rt,at,dt,"∫","\\int"),nt(rt,at,dt,"∫","\\intop"),nt(rt,at,dt,"∬","\\iint"),nt(rt,at,dt,"∭","\\iiint"),nt(rt,at,dt,"∏","\\prod"),nt(rt,at,dt,"∑","\\sum"),nt(rt,at,dt,"⨂","\\bigotimes"),nt(rt,at,dt,"⨁","\\bigoplus"),nt(rt,at,dt,"⨀","\\bigodot"),nt(rt,at,dt,"∮","\\oint"),nt(rt,at,dt,"∯","\\oiint"),nt(rt,at,dt,"∰","\\oiiint"),nt(rt,at,dt,"⨆","\\bigsqcup"),nt(rt,at,dt,"∫","\\smallint"),nt(it,at,ht,"…","\\textellipsis"),nt(rt,at,ht,"…","\\mathellipsis"),nt(it,at,ht,"…","\\ldots",!0),nt(rt,at,ht,"…","\\ldots",!0),nt(rt,at,ht,"⋯","\\@cdots",!0),nt(rt,at,ht,"⋱","\\ddots",!0),nt(rt,at,yt,"⋮","\\varvdots"),nt(it,at,yt,"⋮","\\varvdots"),nt(rt,at,ot,"ˊ","\\acute"),nt(rt,at,ot,"ˋ","\\grave"),nt(rt,at,ot,"¨","\\ddot"),nt(rt,at,ot,"~","\\tilde"),nt(rt,at,ot,"ˉ","\\bar"),nt(rt,at,ot,"˘","\\breve"),nt(rt,at,ot,"ˇ","\\check"),nt(rt,at,ot,"^","\\hat"),nt(rt,at,ot,"⃗","\\vec"),nt(rt,at,ot,"˙","\\dot"),nt(rt,at,ot,"˚","\\mathring"),nt(rt,at,ut,"","\\@imath"),nt(rt,at,ut,"","\\@jmath"),nt(rt,at,yt,"ı","ı"),nt(rt,at,yt,"ȷ","ȷ"),nt(it,at,yt,"ı","\\i",!0),nt(it,at,yt,"ȷ","\\j",!0),nt(it,at,yt,"ß","\\ss",!0),nt(it,at,yt,"æ","\\ae",!0),nt(it,at,yt,"œ","\\oe",!0),nt(it,at,yt,"ø","\\o",!0),nt(it,at,yt,"Æ","\\AE",!0),nt(it,at,yt,"Œ","\\OE",!0),nt(it,at,yt,"Ø","\\O",!0),nt(it,at,ot,"ˊ","\\'"),nt(it,at,ot,"ˋ","\\`"),nt(it,at,ot,"ˆ","\\^"),nt(it,at,ot,"˜","\\~"),nt(it,at,ot,"ˉ","\\="),nt(it,at,ot,"˘","\\u"),nt(it,at,ot,"˙","\\."),nt(it,at,ot,"¸","\\c"),nt(it,at,ot,"˚","\\r"),nt(it,at,ot,"ˇ","\\v"),nt(it,at,ot,"¨",'\\"'),nt(it,at,ot,"˝","\\H"),nt(it,at,ot,"◯","\\textcircled");var vt={"--":!0,"---":!0,"``":!0,"''":!0};nt(it,at,yt,"","--",!0),nt(it,at,yt,"","\\textendash"),nt(it,at,yt,"—","---",!0),nt(it,at,yt,"—","\\textemdash"),nt(it,at,yt,"","`",!0),nt(it,at,yt,"","\\textquoteleft"),nt(it,at,yt,"","'",!0),nt(it,at,yt,"","\\textquoteright"),nt(it,at,yt,"“","``",!0),nt(it,at,yt,"“","\\textquotedblleft"),nt(it,at,yt,"”","''",!0),nt(it,at,yt,"”","\\textquotedblright"),nt(rt,at,yt,"°","\\degree",!0),nt(it,at,yt,"°","\\degree"),nt(it,at,yt,"°","\\textdegree",!0),nt(rt,at,yt,"£","\\pounds"),nt(rt,at,yt,"£","\\mathsterling",!0),nt(it,at,yt,"£","\\pounds"),nt(it,at,yt,"£","\\textsterling",!0),nt(rt,st,yt,"✠","\\maltese"),nt(it,st,yt,"✠","\\maltese");for(var xt='0123456789/@."',bt=0;bt<14;bt++){var wt=xt.charAt(bt);nt(rt,at,yt,wt,wt)}for(var Tt='0123456789!@*()-=+";:?/.,',kt=0;kt<25;kt++){var Et=Tt.charAt(kt);nt(it,at,yt,Et,Et)}for(var At="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",_t=0;_t<52;_t++){var Ct=At.charAt(_t);nt(rt,at,ut,Ct,Ct),nt(it,at,yt,Ct,Ct)}nt(rt,st,yt,"C",""),nt(it,st,yt,"C",""),nt(rt,st,yt,"H",""),nt(it,st,yt,"H",""),nt(rt,st,yt,"N",""),nt(it,st,yt,"N",""),nt(rt,st,yt,"P",""),nt(it,st,yt,"P",""),nt(rt,st,yt,"Q",""),nt(it,st,yt,"Q",""),nt(rt,st,yt,"R",""),nt(it,st,yt,"R",""),nt(rt,st,yt,"Z",""),nt(it,st,yt,"Z",""),nt(rt,at,ut,"h",""),nt(it,at,ut,"h","");for(var St="",Rt=0;Rt<52;Rt++){var Lt=At.charAt(Rt);nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56320+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56372+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56424+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56580+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56684+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56736+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56788+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56840+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56944+Rt)),nt(it,at,yt,Lt,St),Rt<26&&(nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56632+Rt)),nt(it,at,yt,Lt,St),nt(rt,at,ut,Lt,St=String.fromCharCode(55349,56476+Rt)),nt(it,at,yt,Lt,St))}nt(rt,at,ut,"k",St=String.fromCharCode(55349,56668)),nt(it,at,yt,"k",St);for(var Dt=0;Dt<10;Dt++){var It=Dt.toString();nt(rt,at,ut,It,St=String.fromCharCode(55349,57294+Dt)),nt(it,at,yt,It,St),nt(rt,at,ut,It,St=String.fromCharCode(55349,57314+Dt)),nt(it,at,yt,It,St),nt(rt,at,ut,It,St=String.fromCharCode(55349,57324+Dt)),nt(it,at,yt,It,St),nt(rt,at,ut,It,St=String.fromCharCode(55349,57334+Dt)),nt(it,at,yt,It,St)}for(var Nt="ÐÞþ",Mt=0;Mt<3;Mt++){var Ot=Nt.charAt(Mt);nt(rt,at,ut,Ot,Ot),nt(it,at,yt,Ot,Ot)}var Pt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],$t=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Bt=function(t,e,n){if(et[n][t]){var r=et[n][t].replace;r&&(t=r)}return{value:t,metrics:Z(t,e,n)}},Ft=function(t,e,n,r,i){var a,s=Bt(t,e,n),o=s.metrics;if(t=s.value,o){var l=o.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),a=new j(t,o.height,o.depth,l,o.skew,o.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+n+"'"),a=new j(t,0,0,0,0,0,i);if(r){a.maxFontSize=r.sizeMultiplier,r.style.isTight()&&a.classes.push("mtight");var c=r.getColor();c&&(a.style.color=c)}return a},zt=function(t,e,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Bt(t,"Main-Bold",e).metrics?Ft(t,"Main-Bold",e,n,r.concat(["mathbf"])):"\\"===t||"main"===et[e][t].font?Ft(t,"Main-Regular",e,n,r):Ft(t,"AMS-Regular",e,n,r.concat(["amsrm"]))},Kt=function(t,e,n){var i=t.mode,a=t.text,s=["mord"],o="math"===i||"text"===i&&e.font,l=o?e.font:e.fontFamily,c="",h="";if(55349===a.charCodeAt(0)&&([c,h]=((t,e)=>{var n=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,i="math"===e?0:1;if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return[Pt[a][2],Pt[a][i]]}if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return[$t[s][2],$t[s][i]]}if(120485===n||120486===n)return[Pt[0][2],Pt[0][i]];if(120486<n&&n<120782)return["",""];throw new r("Unsupported character: "+t)})(a,i)),c.length>0)return Ft(a,c,i,e,s.concat(h));if(l){var u,d;if("boldsymbol"===l){var p=function(t,e,n,r,i){return"textord"!==i&&Bt(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,i,0,0,n);u=p.fontName,d=[p.fontClass]}else o?(u=Jt[l].fontName,d=[l]):(u=Qt(l,e.fontWeight,e.fontShape),d=[l,e.fontWeight,e.fontShape]);if(Bt(a,u,i).metrics)return Ft(a,u,i,e,s.concat(d));if(vt.hasOwnProperty(a)&&"Typewriter"===u.slice(0,10)){for(var f=[],g=0;g<a.length;g++)f.push(Ft(a[g],u,i,e,s.concat(d)));return Vt(f)}}if("mathord"===n)return Ft(a,"Math-Italic",i,e,s.concat(["mathnormal"]));if("textord"===n){var m=et[i][a]&&et[i][a].font;if("ams"===m){var y=Qt("amsrm",e.fontWeight,e.fontShape);return Ft(a,y,i,e,s.concat("amsrm",e.fontWeight,e.fontShape))}if("main"!==m&&m){var v=Qt(m,e.fontWeight,e.fontShape);return Ft(a,v,i,e,s.concat(v,e.fontWeight,e.fontShape))}var x=Qt("textrm",e.fontWeight,e.fontShape);return Ft(a,x,i,e,s.concat(e.fontWeight,e.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},qt=(t,e)=>{if(O(t.classes)!==O(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||0!==t.italic&&t.hasClass("mathnormal"))return!1;if(1===t.classes.length){var n=t.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r of Object.keys(t.style))if(t.style[r]!==e.style[r])return!1;for(var i of Object.keys(e.style))if(t.style[i]!==e.style[i])return!1;return!0},Ut=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof j&&r instanceof j&&qt(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,t.splice(e+1,1),e--)}return t},jt=function(t){for(var e=0,n=0,r=0,i=0;i<t.children.length;i++){var a=t.children[i];a.height>e&&(e=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}t.height=e,t.depth=n,t.maxFontSize=r},Yt=function(t,e,n,r){var i=new z(t,e,n,r);return jt(i),i},Gt=(t,e,n,r)=>new z(t,e,n,r),Wt=function(t,e,n){var r=Yt([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=M(r.height),r.maxFontSize=1,r},Vt=function(t){var e=new R(t);return jt(e),e},Ht=function(t,e){return t instanceof R?Yt([],[t],e):t},Xt=function(t,e){for(var{children:n,depth:r}=function(t){if("individualShift"===t.positionType){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,i=r,a=1;a<e.length;a++){var s=-e[a].shift-i-e[a].elem.depth,o=s-(e[a-1].elem.height+e[a-1].elem.depth);i+=s,n.push({type:"kern",size:o}),n.push(e[a])}return{children:n,depth:r}}var l;if("top"===t.positionType){for(var c=t.positionData,h=0;h<t.children.length;h++){var u=t.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===t.positionType)l=-t.positionData;else{var d=t.children[0];if("elem"!==d.type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)l=-d.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");l=-d.elem.depth}}return{children:t.children,depth:l}}(t),i=0,a=0;a<n.length;a++){var s=n[a];if("elem"===s.type){var o=s.elem;i=Math.max(i,o.maxFontSize,o.height)}}i+=2;var l=Yt(["pstrut"],[]);l.style.height=M(i);for(var c=[],h=r,u=r,d=r,p=0;p<n.length;p++){var f=n[p];if("kern"===f.type)d+=f.size;else{var g=f.elem,m=f.wrapperClasses||[],y=f.wrapperStyle||{},v=Yt(m,[l,g],void 0,y);v.style.top=M(-i-d-g.depth),f.marginLeft&&(v.style.marginLeft=f.marginLeft),f.marginRight&&(v.style.marginRight=f.marginRight),c.push(v),d+=g.height+g.depth}h=Math.min(h,d),u=Math.max(u,d)}var x,b=Yt(["vlist"],c);if(b.style.height=M(u),h<0){var w=Yt([],[]),T=Yt(["vlist"],[w]);T.style.height=M(-h);var k=Yt(["vlist-s"],[new j("")]);x=[Yt(["vlist-r"],[b,k]),Yt(["vlist-r"],[T])]}else x=[Yt(["vlist-r"],[b])];var E=Yt(["vlist-t"],x);return 2===x.length&&E.classes.push("vlist-t2"),E.height=u,E.depth=-h,E},Zt=(t,e)=>{var n=Yt(["mspace"],[],e),r=N(t,e);return n.style.marginRight=M(r),n},Qt=function(t,e,n){var r="";switch(t){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=t}return r+"-"+("textbf"===e&&"textit"===n?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},Jt={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},te={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ee=function(t,e){var[n,r,i]=te[t],a=new G(n),s=new Y([a],{width:M(r),height:M(i),style:"width:"+M(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),o=Gt(["overlay"],[s],e);return o.height=i,o.style.height=M(i),o.style.width=M(r),o},ne={number:3,unit:"mu"},re={number:4,unit:"mu"},ie={number:5,unit:"mu"},ae={mord:{mop:ne,mbin:re,mrel:ie,minner:ne},mop:{mord:ne,mop:ne,mrel:ie,minner:ne},mbin:{mord:re,mop:re,mopen:re,minner:re},mrel:{mord:ie,mop:ie,mopen:ie,minner:ie},mopen:{},mclose:{mop:ne,mbin:re,mrel:ie,minner:ne},mpunct:{mord:ne,mop:ne,mrel:ie,mopen:ne,mclose:ne,mpunct:ne,minner:ne},minner:{mord:ne,mop:ne,mbin:re,mrel:ie,mopen:ne,mpunct:ne,minner:ne}},se={mord:{mop:ne},mop:{mord:ne,mop:ne},mbin:{},mrel:{},mopen:{},mclose:{mop:ne},mpunct:{},minner:{mop:ne}},oe={},le={},ce={};function he(t){for(var{type:e,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)oe[n[l]]=o;e&&(a&&(le[e]=a),s&&(ce[e]=s))}function ue(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;he({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var de=function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},pe=function(t){return"ordgroup"===t.type?t.body:[t]},fe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),ge=new Set(["rightmost","mrel","mclose","mpunct"]),me={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT},ye={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ve=function(t,e,n,r){void 0===r&&(r=[null,null]);for(var i=[],a=0;a<t.length;a++){var s=Ee(t[a],e);if(s instanceof R){var o=s.children;i.push(...o)}else i.push(s)}if(Ut(i),!n)return i;var l=e;if(1===t.length){var c=t[0];"sizing"===c.type?l=e.havingSize(c.size):"styling"===c.type&&(l=e.havingStyle(me[c.style]))}var h=Yt([r[0]||"leftmost"],[],e),u=Yt([r[1]||"rightmost"],[],e),d="root"===n;return xe(i,(t,e)=>{var n=e.classes[0],r=t.classes[0];"mbin"===n&&ge.has(r)?e.classes[0]="mord":"mbin"===r&&fe.has(n)&&(t.classes[0]="mord")},{node:h},u,d),xe(i,(t,e)=>{var n,r,i=Te(e),a=Te(t),s=i&&a?t.hasClass("mtight")?null==(n=se[i])?void 0:n[a]:null==(r=ae[i])?void 0:r[a]:null;if(s)return Zt(s,l)},{node:h},u,d),i},xe=function(t,e,n,r,i){r&&t.push(r);for(var a=0;a<t.length;a++){var s=t[a],o=be(s);if(o)xe(o.children,e,n,null,i);else{var l=!s.hasClass("mspace");if(l){var c=e(s,n.node);c&&(n.insertAfter?n.insertAfter(c):(t.unshift(c),a++))}l?n.node=s:i&&s.hasClass("newline")&&(n.node=Yt(["leftmost"])),n.insertAfter=(e=>n=>{t.splice(e+1,0,n),a++})(a)}}r&&t.pop()},be=function(t){return t instanceof R||t instanceof K||t instanceof z&&t.hasClass("enclosing")?t:null},we=function(t,e){var n=be(t);if(n){var r=n.children;if(r.length){if("right"===e)return we(r[r.length-1],"right");if("left"===e)return we(r[0],"left")}}return t},Te=function(t,e){if(!t)return null;e&&(t=we(t,e));var n=t.classes[0];return ye[n]||null},ke=function(t,e){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Yt(e.concat(n))},Ee=function(t,e,n){if(!t)return Yt();if(le[t.type]){var i=le[t.type](t,e);if(n&&e.size!==n.size){i=Yt(e.sizingClasses(n),[i],e);var a=e.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}throw new r("Got group of unknown type: '"+t.type+"'")};function Ae(t,e){var n=Yt(["base"],t,e),r=Yt(["strut"]);return r.style.height=M(n.height+n.depth),n.depth&&(r.style.verticalAlign=M(-n.depth)),n.children.unshift(r),n}function _e(t,e){var n=null;1===t.length&&"tag"===t[0].type&&(n=t[0].tag,t=t[0].body);var r,i=ve(t,e,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l<i.length;l++)if(o.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,o.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(s.push(Ae(o,e)),o=[])}else i[l].hasClass("newline")&&(o.pop(),o.length>0&&(s.push(Ae(o,e)),o=[]),s.push(i[l]));o.length>0&&s.push(Ae(o,e)),n?((a=Ae(ve(n,e,!0),e)).classes=["tag"],s.push(a)):r&&s.push(r);var h=Yt(["katex-html"],s);if(h.setAttribute("aria-hidden","true"),a){var u=a.children[0];u.style.height=M(h.height+h.depth),h.depth&&(u.style.verticalAlign=M(-h.depth))}return h}function Ce(t){return new R(t)}class Se{constructor(t,e,n){this.type=t,this.attributes={},this.children=e||[],this.classes=n||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=O(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Re&&this.children[n+1]instanceof Re){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Re;)r+=this.children[++n].toText();t.appendChild(new Re(r).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=l(this.attributes[e]),t+='"');this.classes.length>0&&(t+=' class ="'+l(O(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(t=>t.toText()).join("")}}class Re{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class Le{constructor(t){this.width=t,this.character=t>=.05555&&t<=.05556?"":t>=.1666&&t<=.1667?"":t>=.2222&&t<=.2223?"":t>=.2777&&t<=.2778?"":t>=-.05556&&t<=-.05555?"":t>=-.1667&&t<=-.1666?"":t>=-.2223&&t<=-.2222?"":t>=-.2778&&t<=-.2777?"":null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",M(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+M(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var De=new Set(["\\imath","\\jmath"]),Ie=new Set(["mrow","mtable"]),Ne=function(t,e,n){return!et[e][t]||!et[e][t].replace||55349===t.charCodeAt(0)||vt.hasOwnProperty(t)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(t=et[e][t].replace),new Re(t)},Me=function(t){return 1===t.length?t[0]:new Se("mrow",t)},Oe=function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var n=e.font;if(!n||"mathnormal"===n)return null;var r=t.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===t.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=t.text;if(De.has(i))return null;if(et[r][i]){var a=et[r][i].replace;a&&(i=a)}return Z(i,Jt[n].fontName,r)?Jt[n].variant:null};function Pe(t){if(!t)return!1;if("mi"===t.type&&1===t.children.length){var e=t.children[0];return e instanceof Re&&"."===e.text}if("mo"===t.type&&1===t.children.length&&"true"===t.getAttribute("separator")&&"0em"===t.getAttribute("lspace")&&"0em"===t.getAttribute("rspace")){var n=t.children[0];return n instanceof Re&&","===n.text}return!1}var $e=function(t,e,n){if(1===t.length){var r=Fe(t[0],e);return n&&r instanceof Se&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,a=[],s=0;s<t.length;s++){var o=Fe(t[s],e);if(o instanceof Se&&i instanceof Se){if("mtext"===o.type&&"mtext"===i.type&&o.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...o.children);continue}if("mn"===o.type&&"mn"===i.type){i.children.push(...o.children);continue}if(Pe(o)&&"mn"===i.type){i.children.push(...o.children);continue}if("mn"===o.type&&Pe(i))o.children=[...i.children,...o.children],a.pop();else if(("msup"===o.type||"msub"===o.type)&&o.children.length>=1&&("mn"===i.type||Pe(i))){var l=o.children[0];l instanceof Se&&"mn"===l.type&&(l.children=[...i.children,...l.children],a.pop())}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof Re&&"̸"===c.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){var h=o.children[0];h instanceof Re&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(o),i=o}return a},Be=function(t,e,n){return Me($e(t,e,n))},Fe=function(t,e){if(!t)return new Se("mrow");if(ce[t.type])return ce[t.type](t,e);throw new r("Got group of unknown type: '"+t.type+"'")};function ze(t,e,n,r,i){var a,s=$e(t,n);a=1===s.length&&s[0]instanceof Se&&Ie.has(s[0].type)?s[0]:new Se("mrow",s);var o=new Se("annotation",[new Re(e)]);o.setAttribute("encoding","application/x-tex");var l=new Se("semantics",[a,o]),c=new Se("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block"),Yt([i?"katex":"katex-mathml"],[c])}var Ke=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],qe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ue=function(t,e){return e.size<2?t:Ke[t-1][e.size-1]};class je{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||je.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=qe[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(e,t),new je(e)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Ue(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:qe[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Ue(je.BASESIZE,t);return this.size===e&&this.textSize===je.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==je.BASESIZE?["sizing","reset-size"+this.size,"size"+je.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(t){var e;if(!Q[e=t>=5?0:t>=3?1:2]){var n=Q[e]={cssEmPerMu:H.quad[e]/18};for(var r in H)H.hasOwnProperty(r)&&(n[r]=H[r][e])}return Q[e]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}je.BASESIZE=6;var Ye=function(t){return new je({style:t.displayMode?k.DISPLAY:k.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Ge=function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=Yt(n,[t])}return t},We={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Ve=function(t){var e=new Se("mo",[new Re(We[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},He={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Xe=new Set(["widehat","widecheck","widetilde","utilde"]),Ze=function(t,e){var{span:n,minWidth:r,height:i}=function(){var n=4e5,r=t.label.slice(1);if(Xe.has(r)){var i,a,s,o=t,l="ordgroup"===o.base.type?o.base.body.length:1;if(l>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,s=.42,a=r+"4"):(i=312,n=2340,s=.34,a="tilde4");else{var c=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],a=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],a="tilde"+c)}var h=new G(a),u=new Y([h],{width:"100%",height:M(s),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Gt([],[u],e),minWidth:0,height:s}}var d,p,f=[],g=He[r],[m,y,v]=g,x=v/1e3,b=m.length;if(1===b)d=["hide-tail"],p=[g[3]];else if(2===b)d=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==b)throw new Error("Correct katexImagesData or update code here to support\n "+b+" children.");d=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<b;w++){var T=new G(m[w]),k=new Y([T],{width:"400em",height:M(x),viewBox:"0 0 "+n+" "+v,preserveAspectRatio:p[w]+" slice"}),E=Gt([d[w]],[k],e);if(1===b)return{span:E,minWidth:y,height:x};E.style.height=M(x),f.push(E)}return{span:Yt(["stretchy"],f,e),minWidth:y,height:x}}();return n.height=i,n.style.height=M(i),r>0&&(n.style.minWidth=M(r)),n};function Qe(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function Je(t){var e=tn(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function tn(t){return t&&("atom"===t.type||tt.hasOwnProperty(t.type))?t:null}var en=t=>{return t instanceof j?t:((e=t)instanceof z||e instanceof K||e instanceof R)&&1===t.children.length?en(t.children[0]):void 0;var e},nn=(t,e)=>{var n,r,i;t&&"supsub"===t.type?(n=(r=Qe(t.base,"accent")).base,t.base=n,i=function(t){if(t instanceof z)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}(Ee(t,e)),t.base=r):n=(r=Qe(t,"accent")).base;var a,s,o=Ee(n,e.havingCrampedStyle()),l=0;r.isShifty&&u(n)&&(l=null!=(a=null==(s=en(o))?void 0:s.skew)?a:0);var c,h="\\c"===r.label,d=h?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight);if(r.isStretchy)c=Ze(r,e),c=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+M(2*l)+")",marginLeft:M(2*l)}:void 0}]});else{var p,f;"\\vec"===r.label?(p=ee("vec",e),f=te.vec[1]):(p=function(t){if(t instanceof j)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}(p=Kt({type:"textord",mode:r.mode,text:r.label},e,"textord")),p.italic=0,f=p.width,h&&(d+=p.depth)),c=Yt(["accent-body"],[p]);var g="\\textcircled"===r.label;g&&(c.classes.push("accent-full"),d=o.height);var m=l;g||(m-=f/2),c.style.left=M(m),"\\textcircled"===r.label&&(c.style.top=".2em"),c=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:c}]})}var y=Yt(["mord","accent"],[c],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},rn=(t,e)=>{var n=t.isStretchy?Ve(t.label):new Se("mo",[Ne(t.label,t.mode)]),r=new Se("mover",[Fe(t.base,e),n]);return r.setAttribute("accent","true"),r},an=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));he({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var n=de(e[0]),r=!an.test(t.funcName),i=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:nn,mathmlBuilder:rn}),he({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:nn,mathmlBuilder:rn}),he({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(t,e)=>{var n=Ee(t.base,e),r=Ze(t,e),i="\\utilde"===t.label?.12:0,a=Xt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]});return Yt(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var n=Ve(t.label),r=new Se("munder",[Fe(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var sn=t=>{var e=new Se("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};function on(t,e){var n=ve(t.body,e,!0);return Yt([t.mclass],n,e)}function ln(t,e){var n,r=$e(t.body,e);return"minner"===t.mclass?n=new Se("mpadded",r):"mord"===t.mclass?t.isCharacterBox?(n=r[0]).type="mi":n=new Se("mi",r):(t.isCharacterBox?(n=r[0]).type="mo":n=new Se("mo",r),"mbin"===t.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===t.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===t.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}he({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:i}=t;return{type:"xArrow",mode:r.mode,label:i,body:e[0],below:n[0]}},htmlBuilder(t,e){var n,r=e.style,i=e.havingStyle(r.sup()),a=Ht(Ee(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd";a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(r.sub()),(n=Ht(Ee(t.below,i,e),e)).classes.push(s+"-arrow-pad"));var o,l=Ze(t,e),c=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===t.label)&&(h-=a.depth),n){var u=-e.fontMetrics().axisHeight+n.height+.5*l.height+.111;o=Xt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:u}]})}else o=Xt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c}]});return o.children[0].children[0].children[1].classes.push("svg-align"),Yt(["mrel","x-arrow"],[o],e)},mathmlBuilder(t,e){var n,r=Ve(t.label);if(r.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=sn(Fe(t.body,e));if(t.below){var a=sn(Fe(t.below,e));n=new Se("munderover",[r,a,i])}else n=new Se("mover",[r,i])}else if(t.below){var s=sn(Fe(t.below,e));n=new Se("munder",[r,s])}else n=sn(),n=new Se("mover",[r,n]);return n}}),he({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:pe(i),isCharacterBox:u(i)}},htmlBuilder:on,mathmlBuilder:ln});var cn=t=>{var e="ordgroup"===t.type&&t.body.length?t.body[0]:t;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family};he({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:cn(e[0]),body:pe(e[1]),isCharacterBox:u(e[1])}}}),he({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var n,{parser:r,funcName:i}=t,a=e[1],s=e[0];n="\\stackrel"!==i?cn(a):"mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:pe(a)},l={type:"supsub",mode:s.mode,base:o,sup:"\\underset"===i?null:s,sub:"\\underset"===i?s:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:u(l)}},htmlBuilder:on,mathmlBuilder:ln}),he({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:cn(e[0]),body:pe(e[0])}},htmlBuilder(t,e){var n=ve(t.body,e,!0),r=Yt([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=$e(t.body,e),r=new Se("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var hn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},un=()=>({type:"styling",body:[],mode:"math",style:"display"}),dn=t=>"textord"===t.type&&"@"===t.text,pn=(t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e;function fn(t,e,n){var r=hn[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[e[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[e[1]],[])]};return n.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}he({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),r=Ht(Ee(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=M(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Se("mrow",[Fe(t.label,e)]);return(n=new Se("mpadded",[n])).setAttribute("width","0"),"left"===t.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Se("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),he({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=Ht(Ee(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(t,e)=>new Se("mrow",[Fe(t.fragment,e)])}),he({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,i=Qe(e[0],"ordgroup").body,a="",s=0;s<i.length;s++){a+=Qe(i[s],"textord").text}var o,l=parseInt(a);if(isNaN(l))throw new r("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new r("\\@char with invalid code point "+a);return l<=65535?o=String.fromCharCode(l):(l-=65536,o=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:n.mode,text:o}}});var gn=(t,e)=>{var n=ve(t.body,e.withColor(t.color),!1);return Vt(n)},mn=(t,e)=>{var n=$e(t.body,e.withColor(t.color)),r=new Se("mstyle",n);return r.setAttribute("mathcolor",t.color),r};he({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=Qe(e[0],"color-token").color,i=e[1];return{type:"color",mode:n.mode,color:r,body:pe(i)}},htmlBuilder:gn,mathmlBuilder:mn}),he({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,i=Qe(e[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var a=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:a}},htmlBuilder:gn,mathmlBuilder:mn}),he({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,i="["===r.gullet.future().text?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:i&&Qe(i,"size").value}},htmlBuilder(t,e){var n=Yt(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=M(N(t.size,e)))),n},mathmlBuilder(t,e){var n=new Se("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",M(N(t.size,e)))),n}});var yn={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},vn=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new r("Expected a control sequence",t);return e},xn=(t,e,n,r)=>{var i=t.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,i,r)};he({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var i=e.fetch();if(yn[i.text])return"\\global"!==n&&"\\\\globallong"!==n||(i.text=yn[i.text]),Qe(e.parseFunction(),"internal");throw new r("Invalid token after macro prefix",i)}}),he({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,i=e.gullet.popToken(),a=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new r("Expected a control sequence",i);for(var s,o=0,l=[[]];"{"!==e.gullet.future().text;)if("#"===(i=e.gullet.popToken()).text){if("{"===e.gullet.future().text){s=e.gullet.future(),l[o].push("{");break}if(i=e.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new r('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==o+1)throw new r('Argument number "'+i.text+'" out of order');o++,l.push([])}else{if("EOF"===i.text)throw new r("Expected a macro definition");l[o].push(i.text)}var{tokens:c}=e.gullet.consumeArg();return s&&c.unshift(s),"\\edef"!==n&&"\\xdef"!==n||(c=e.gullet.expandTokens(c)).reverse(),e.gullet.macros.set(a,{tokens:c,numArgs:o,delimiters:l},n===yn[n]),{type:"internal",mode:e.mode}}}),he({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=vn(e.gullet.popToken());e.gullet.consumeSpaces();var i=(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e})(e);return xn(e,r,i,"\\\\globallet"===n),{type:"internal",mode:e.mode}}}),he({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=vn(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return xn(e,r,a,"\\\\globalfuture"===n),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var bn=function(t,e,n){var r=Z(et.math[t]&&et.math[t].replace||t,e,n);if(!r)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return r},wn=function(t,e,n,r){var i=n.havingBaseStyle(e),a=Yt(r.concat(i.sizingClasses(n)),[t],n),s=i.sizeMultiplier/n.sizeMultiplier;return a.height*=s,a.depth*=s,a.maxFontSize=i.sizeMultiplier,a},Tn=function(t,e,n){var r=e.havingBaseStyle(n),i=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=M(i),t.height-=i,t.depth+=i},kn=function(t,e,n,r,i,a){var s=function(t,e,n,r){return Ft(t,"Size"+e+"-Regular",n,r)}(t,e,i,r),o=wn(Yt(["delimsizing","size"+e],[s],r),k.TEXT,r,a);return n&&Tn(o,r,k.TEXT),o},En=function(t,e,n){return{type:"elem",elem:Yt(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Yt([],[Ft(t,e,n)])])}},An=function(t,e,n){var r=V["Size4-Regular"][t.charCodeAt(0)]?V["Size4-Regular"][t.charCodeAt(0)][4]:V["Size1-Regular"][t.charCodeAt(0)][4],i=new G("inner",function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}}(t,Math.round(1e3*e))),a=new Y([i],{width:M(r),height:M(e),style:"width:"+M(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=Gt([],[a],n);return s.height=e,s.style.height=M(e),s.style.width=M(r),{type:"elem",elem:s}},_n={type:"kern",size:-.008},Cn=new Set(["|","\\lvert","\\rvert","\\vert"]),Sn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Rn=function(t,e,n,r,i,a){var s,o,l,c,h="",u=0;s=l=c=t,o=null;var d="Size1-Regular";"\\uparrow"===t?l=c="⏐":"\\Uparrow"===t?l=c="‖":"\\downarrow"===t?s=l="⏐":"\\Downarrow"===t?s=l="‖":"\\updownarrow"===t?(s="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===t?(s="\\Uparrow",l="‖",c="\\Downarrow"):Cn.has(t)?(l="",h="vert",u=333):Sn.has(t)?(l="∥",h="doublevert",u=556):"["===t||"\\lbrack"===t?(s="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===t||"\\rbrack"===t?(s="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===t||"⌊"===t?(l=s="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===t||"⌈"===t?(s="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===t||"⌋"===t?(l=s="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===t||"⌉"===t?(s="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===t||"\\lparen"===t?(s="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===t||"\\rparen"===t?(s="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===t||"\\lbrace"===t?(s="⎧",o="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",o="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(s="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(s="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(s="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(s="⎫",c="⎩",l="⎪",d="Size4-Regular");var p=bn(s,d,i),f=p.height+p.depth,g=bn(l,d,i),m=g.height+g.depth,y=bn(c,d,i),v=y.height+y.depth,x=0,b=1;if(null!==o){var w=bn(o,d,i);x=w.height+w.depth,b=2}var T=f+v+x,E=T+Math.max(0,Math.ceil((e-T)/(b*m)))*b*m,A=r.fontMetrics().axisHeight;n&&(A*=r.sizeMultiplier);var _=E/2-A,C=[];if(h.length>0){var S=E-f-v,R=Math.round(1e3*E),L=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z\nM367 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v602 h84z\nM403 1759 V0 H319 V1759 v"+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+e+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(e+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(e+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(e+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(e+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(h,Math.round(1e3*S)),D=new G(h,L),I=(u/1e3).toFixed(3)+"em",N=(R/1e3).toFixed(3)+"em",M=new Y([D],{width:I,height:N,viewBox:"0 0 "+u+" "+R}),O=Gt([],[M],r);O.height=R/1e3,O.style.width=I,O.style.height=N,C.push({type:"elem",elem:O})}else{if(C.push(En(c,d,i)),C.push(_n),null===o){var P=E-f-v+.016;C.push(An(l,P,r))}else{var $=(E-f-v-x)/2+.016;C.push(An(l,$,r)),C.push(_n),C.push(En(o,d,i)),C.push(_n),C.push(An(l,$,r))}C.push(_n),C.push(En(s,d,i))}var B=r.havingBaseStyle(k.TEXT),F=Xt({positionType:"bottom",positionData:_,children:C});return wn(Yt(["delimsizing","mult"],[F],B),k.TEXT,r,a)},Ln=.08,Dn=function(t,e,n,r,i){var a=function(t,e,n){e*=1e3;var r="";switch(t){case"sqrtMain":r=function(t,e){return"M95,"+(622+t+e)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,C);break;case"sqrtSize1":r=function(t,e){return"M263,"+(601+t+e)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,C);break;case"sqrtSize2":r=function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,C);break;case"sqrtSize3":r=function(t,e){return"M424,"+(2398+t+e)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}(e,C);break;case"sqrtSize4":r=function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}(e,C);break;case"sqrtTall":r=function(t,e,n){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(n-54-e-t)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+e+"H400000v"+(40+t)+"H742z"}(e,C,n)}return r}(t,r,n),s=new G(t,a),o=new Y([s],{width:"400em",height:M(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Gt(["hide-tail"],[o],i)},In=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Nn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Mn=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),On=[0,1.2,1.8,2.4,3],Pn=function(t,e,n,i,a){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),In.has(t)||Mn.has(t))return kn(t,e,!1,n,i,a);if(Nn.has(t))return Rn(t,On[e],!1,n,i,a);throw new r("Illegal delimiter: '"+t+"'")},$n=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Bn=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"stack"}],Fn=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],zn=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";var e=t.type;throw new Error("Add support for delim type '"+e+"' here.")},Kn=function(t,e,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if("stack"===a.type)break;var s=bn(t,zn(a),"math"),o=s.height+s.depth;if("small"===a.type)o*=r.havingBaseStyle(a.style).sizeMultiplier;if(o>e)return a}return n[n.length-1]},qn=function(t,e,n,r,i,a){var s;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),s=Mn.has(t)?$n:In.has(t)?Fn:Bn;var o=Kn(t,e,s,r);return"small"===o.type?function(t,e,n,r,i,a){var s=Ft(t,"Main-Regular",i,r),o=wn(s,e,r,a);return n&&Tn(o,r,e),o}(t,o.style,n,r,i,a):"large"===o.type?kn(t,o.size,n,r,i,a):Rn(t,e,n,r,i,a)},Un=function(t,e,n,r,i,a){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,o=5/r.fontMetrics().ptPerEm,l=Math.max(e-s,n+s),c=Math.max(l/500*901,2*l-o);return qn(t,c,!0,r,i,a)},jn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Yn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Gn(t,e){var n=tn(t);if(n&&Yn.has(n.text))return n;throw new r(n?"Invalid delimiter '"+n.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function Wn(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}he({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var n=Gn(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:jn[t.funcName].size,mclass:jn[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>"."===t.delim?Yt([t.mclass]):Pn(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];"."!==t.delim&&e.push(Ne(t.delim,t.mode));var n=new Se("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=M(On[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),he({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Gn(e[0],t).text,color:n}}}),he({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Gn(e[0],t),r=t.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Qe(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{Wn(t);for(var n,r,i=ve(t.body,e,!0,["mopen","mclose"]),a=0,s=0,o=!1,l=0;l<i.length;l++)i[l].isMiddle?o=!0:(a=Math.max(i[l].height,a),s=Math.max(i[l].depth,s));if(a*=e.sizeMultiplier,s*=e.sizeMultiplier,n="."===t.left?ke(e,["mopen"]):Un(t.left,a,s,e,t.mode,["mopen"]),i.unshift(n),o)for(var c=1;c<i.length;c++){var h=i[c].isMiddle;h&&(i[c]=Un(h.delim,a,s,h.options,t.mode,[]))}if("."===t.right)r=ke(e,["mclose"]);else{var u=t.rightColor?e.withColor(t.rightColor):e;r=Un(t.right,a,s,u,t.mode,["mclose"])}return i.push(r),Yt(["minner"],i,e)},mathmlBuilder:(t,e)=>{Wn(t);var n=$e(t.body,e);if("."!==t.left){var r=new Se("mo",[Ne(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==t.right){var i=new Se("mo",[Ne(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),n.push(i)}return Me(n)}}),he({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Gn(e[0],t);if(!t.parser.leftrightDepth)throw new r("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if("."===t.delim)n=ke(e,[]);else{n=Pn(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n},mathmlBuilder:(t,e)=>{var n="\\vert"===t.delim||"|"===t.delim?Ne("|","text"):Ne(t.delim,t.mode),r=new Se("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Vn=(t,e)=>{var n,r,i,a=Ht(Ee(t.body,e),e),s=t.label.slice(1),o=e.sizeMultiplier,l=0,c=u(t.body);if("sout"===s)(n=Yt(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/o,l=-.5*e.fontMetrics().xHeight;else if("phase"===s){var h=N({number:.6,unit:"pt"},e),d=N({number:.35,unit:"ex"},e);o/=e.havingBaseSizing().sizeMultiplier;var p=a.height+a.depth+h+d;a.style.paddingLeft=M(p/2+h);var f=Math.floor(1e3*p*o),g="M400000 "+(r=f)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new Y([new G("phase",g)],{width:"400em",height:M(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});(n=Gt(["hide-tail"],[m],e)).style.height=M(p),l=a.depth+h+d}else{/cancel/.test(s)?c||a.classes.push("cancel-pad"):"angl"===s?a.classes.push("anglpad"):a.classes.push("boxpad");var y=0,v=0,x=0;/box/.test(s)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),v=y=e.fontMetrics().fboxsep+("colorbox"===s?0:x)):"angl"===s?(y=4*(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),v=Math.max(0,.25-a.depth)):v=y=c?.2:0,n=function(t,e,n,r,i){var a,s=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(a=Yt(["stretchy",e],[],i),"fbox"===e){var o=i.color&&i.getColor();o&&(a.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(e)&&l.push(new W({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&l.push(new W({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Y(l,{width:"100%",height:M(s)});a=Gt([],[c],i)}return a.height=s,a.style.height=M(s),a}(a,s,y,v,e),/fbox|boxed|fcolorbox/.test(s)?(n.style.borderStyle="solid",n.style.borderWidth=M(x)):"angl"===s&&.049!==x&&(n.style.borderTopWidth=M(x),n.style.borderRightWidth=M(x)),l=a.depth+v,t.backgroundColor&&(n.style.backgroundColor=t.backgroundColor,t.borderColor&&(n.style.borderColor=t.borderColor))}if(t.backgroundColor)i=Xt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:a,shift:0}]});else{var b=/cancel|phase/.test(s)?["svg-align"]:[];i=Xt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:b}]})}return/cancel/.test(s)&&(i.height=a.height,i.depth=a.depth),/cancel/.test(s)&&!c?Yt(["mord","cancel-lap"],[i],e):Yt(["mord"],[i],e)},Hn=(t,e)=>{var n=0,r=new Se(t.label.includes("colorbox")?"mpadded":"menclose",[Fe(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};he({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:i}=t,a=Qe(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:Vn,mathmlBuilder:Hn}),he({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:i}=t,a=Qe(e[0],"color-token").color,s=Qe(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:Vn,mathmlBuilder:Hn}),he({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}}),he({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:Vn,mathmlBuilder:Hn}),he({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var Xn={};function Zn(t){for(var{type:e,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)Xn[n[l]]=o;a&&(le[e]=a),s&&(ce[e]=s)}var Qn={};function Jn(t,e){Qn[t]=e}class tr{constructor(t,e,n){this.lexer=t,this.start=e,this.end=n}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new tr(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}}class er{constructor(t,e){this.text=t,this.loc=e}range(t,e){return new er(e,tr.range(this,t))}}function nr(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for("\\relax"===n&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);"\\hline"===n||"\\hdashline"===n;)t.consume(),e.push("\\hdashline"===n),t.consumeSpaces(),n=t.fetch().text;return e}var rr=t=>{if(!t.parser.settings.displayMode)throw new r("{"+t.envName+"} can be used only in display mode.")},ir=new Set(["gather","gather*"]);function ar(t){if(!t.includes("ed"))return!t.includes("*")}function sr(t,e,n){var{hskipBeforeAndAfter:i,addJot:a,cols:s,arraystretch:o,colSeparationType:l,autoTag:c,singleRow:h,emptySingleRow:u,maxNumCols:d,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var f=t.gullet.expandMacroAsText("\\arraystretch");if(null==f)o=1;else if(!(o=parseFloat(f))||o<0)throw new r("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var g=[],m=[g],y=[],v=[],x=null!=c?[]:void 0;function b(){c&&t.gullet.macros.set("\\@eqnsw","1",!0)}function w(){x&&(t.gullet.macros.get("\\df@tag")?(x.push(t.subparse([new er("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(c)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(b(),v.push(nr(t));;){var T=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup();var k={type:"ordgroup",mode:t.mode,body:T};n&&(k={type:"styling",mode:t.mode,style:n,body:[k]}),g.push(k);var E=t.fetch().text;if("&"===E){if(d&&g.length===d){if(h||l)throw new r("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===E){w(),1===g.length&&"styling"===k.type&&1===k.body.length&&"ordgroup"===k.body[0].type&&0===k.body[0].body.length&&(m.length>1||!u)&&m.pop(),v.length<m.length+1&&v.push([]);break}if("\\\\"!==E)throw new r("Expected & or \\\\ or \\cr or \\end",t.nextToken);t.consume();var A=void 0;" "!==t.gullet.future().text&&(A=t.parseSizeGroup(!0)),y.push(A?A.value:null),w(),v.push(nr(t)),g=[],m.push(g),b()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:o,body:m,cols:s,rowGaps:y,hskipBeforeAndAfter:i,hLinesBeforeRow:v,colSeparationType:l,tags:x,leqno:p}}function or(t){return"d"===t.slice(0,1)?"display":"text"}var lr=function(t,e){var n,i,a=t.body.length,s=t.hLinesBeforeRow,o=0,l=new Array(a),c=[],h=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),u=1/e.fontMetrics().ptPerEm,d=5*u;t.colSeparationType&&"small"===t.colSeparationType&&(d=e.havingStyle(k.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778);var p="CD"===t.colSeparationType?N({number:3,unit:"ex"},e):12*u,f=3*u,g=t.arraystretch*p,m=.7*g,y=.3*g,v=0;function x(t){for(var e=0;e<t.length;++e)e>0&&(v+=.25),c.push({pos:v,isDashed:t[e]})}for(x(s[0]),n=0;n<t.body.length;++n){var b=t.body[n],w=m,T=y;o<b.length&&(o=b.length);var E=new Array(b.length);for(i=0;i<b.length;++i){var A=Ee(b[i],e);T<A.depth&&(T=A.depth),w<A.height&&(w=A.height),E[i]=A}var _=t.rowGaps[n],C=0;_&&(C=N(_,e))>0&&(T<(C+=y)&&(T=C),C=0),t.addJot&&(T+=f),E.height=w,E.depth=T,v+=w,E.pos=v,v+=T+C,l[n]=E,x(s[n+1])}var S,R,L=v/2+e.fontMetrics().axisHeight,D=t.cols||[],I=[],O=[];if(t.tags&&t.tags.some(t=>t))for(n=0;n<a;++n){var P=l[n],$=P.pos-L,B=t.tags[n],F=void 0;(F=!0===B?Yt(["eqn-num"],[],e):Yt([],!1===B?[]:ve(B,e,!0),e)).depth=P.depth,F.height=P.height,O.push({type:"elem",elem:F,shift:$})}for(i=0,R=0;i<o||R<D.length;++i,++R){for(var z,K=D[R],q=!0;"separator"===(null==(U=K)?void 0:U.type);){var U;if(q||((S=Yt(["arraycolsep"],[])).style.width=M(e.fontMetrics().doubleRuleSep),I.push(S)),"|"!==K.separator&&":"!==K.separator)throw new r("Invalid separator type: "+K.separator);var j="|"===K.separator?"solid":"dashed",Y=Yt(["vertical-separator"],[],e);Y.style.height=M(v),Y.style.borderRightWidth=M(h),Y.style.borderRightStyle=j,Y.style.margin="0 "+M(-h/2);var G=v-L;G&&(Y.style.verticalAlign=M(-G)),I.push(Y),K=D[++R],q=!1}if(!(i>=o)){var W,V,H=void 0;if(i>0||t.hskipBeforeAndAfter)0!==(H=null!=(W=null==(V=K)?void 0:V.pregap)?W:d)&&((S=Yt(["arraycolsep"],[])).style.width=M(H),I.push(S));var X=[];for(n=0;n<a;++n){var Z=l[n],Q=Z[i];if(Q){var J=Z.pos-L;Q.depth=Z.depth,Q.height=Z.height,X.push({type:"elem",elem:Q,shift:J})}}var tt,et,nt=Xt({positionType:"individualShift",children:X}),rt=Yt(["col-align-"+((null==(z=K)?void 0:z.align)||"c")],[nt]);if(I.push(rt),i<o-1||t.hskipBeforeAndAfter)0!==(H=null!=(tt=null==(et=K)?void 0:et.postgap)?tt:d)&&((S=Yt(["arraycolsep"],[])).style.width=M(H),I.push(S))}}var it=Yt(["mtable"],I);if(c.length>0){for(var at=Wt("hline",e,h),st=Wt("hdashline",e,h),ot=[{type:"elem",elem:it,shift:0}];c.length>0;){var lt=c.pop(),ct=lt.pos-L;lt.isDashed?ot.push({type:"elem",elem:st,shift:ct}):ot.push({type:"elem",elem:at,shift:ct})}it=Xt({positionType:"individualShift",children:ot})}if(0===O.length)return Yt(["mord"],[it],e);var ht=Xt({positionType:"individualShift",children:O}),ut=Yt(["tag"],[ht],e);return Vt([it,ut])},cr={c:"center ",l:"left ",r:"right "},hr=function(t,e){for(var n=[],r=new Se("mtd",[],["mtr-glue"]),i=new Se("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var s=t.body[a],o=[],l=0;l<s.length;l++)o.push(new Se("mtd",[Fe(s[l],e)]));t.tags&&t.tags[a]&&(o.unshift(r),o.push(r),t.leqno?o.unshift(i):o.push(i)),n.push(new Se("mtr",o))}var c=new Se("mtable",n),h=.5===t.arraystretch?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",M(h));var u="",d="";if(t.cols&&t.cols.length>0){var p=t.cols,f="",g=!1,m=0,y=p.length;"separator"===p[0].type&&(u+="top ",m=1),"separator"===p[p.length-1].type&&(u+="bottom ",y-=1);for(var v=m;v<y;v++){var x=p[v];"align"===x.type?(d+=cr[x.align],g&&(f+="none "),g=!0):"separator"===x.type&&g&&(f+="|"===x.separator?"solid ":"dashed ",g=!1)}c.setAttribute("columnalign",d.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===t.colSeparationType){for(var b=t.cols||[],w="",T=1;T<b.length;T++)w+=T%2?"0em ":"1em ";c.setAttribute("columnspacing",w.trim())}else"alignat"===t.colSeparationType||"gather"===t.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===t.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===t.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",E=t.hLinesBeforeRow;u+=E[0].length>0?"left ":"",u+=E[E.length-1].length>0?"right ":"";for(var A=1;A<E.length-1;A++)k+=0===E[A].length?"none ":E[A][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==u&&(c=new Se("menclose",[c])).setAttribute("notation",u.trim()),t.arraystretch&&t.arraystretch<1&&(c=new Se("mstyle",[c])).setAttribute("scriptlevel","1"),c},ur=function(t,e){t.envName.includes("ed")||rr(t);var n=[],i=t.envName.includes("at")?"alignat":"align",a="split"===t.envName,s=sr(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:ar(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),o=0,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var h="",u=0;u<e[0].body.length;u++){h+=Qe(e[0].body[u],"textord").text}o=Number(h),l=2*o}var d=!l;s.body.forEach(function(t){for(var e=1;e<t.length;e+=2){var n=Qe(t[e],"styling");Qe(n.body[0],"ordgroup").body.unshift(c)}if(d)l<t.length&&(l=t.length);else{var i=t.length/2;if(o<i)throw new r("Too many math in a row: expected "+o+", but got "+i,t[0])}});for(var p=0;p<l;++p){var f="r",g=0;p%2==1?f="l":p>0&&d&&(g=1),n[p]={type:"align",align:f,pregap:g,postgap:0}}return s.colSeparationType=d?"align":"alignat",s};Zn({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=(tn(e[0])?[e[0]]:Qe(e[0],"ordgroup").body).map(function(t){var e=Je(t).text;if("lcr".includes(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+e,t)}),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return sr(t.parser,i,or(t.envName))},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===t.envName.charAt(t.envName.length-1)){var a=t.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,!"lcr".includes(n))throw new r("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),i.cols=[{type:"align",align:n}]}}var s=sr(t.parser,i,or(t.envName)),o=Math.max(0,...s.body.map(t=>t.length));return s.cols=new Array(o).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e=sr(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=(tn(e[0])?[e[0]]:Qe(e[0],"ordgroup").body).map(function(t){var e=Je(t).text;if("lc".includes(e))return{type:"align",align:e};throw new r("Unknown column alignment: "+e,t)});if(n.length>1)throw new r("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},a=sr(t.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new r("{subarray} can contain only one column");return a},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=sr(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},or(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ur,htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){ir.has(t.envName)&&rr(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ar(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return sr(t.parser,e,"display")},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ur,htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){rr(t);var e={autoTag:ar(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return sr(t.parser,e,"display")},htmlBuilder:lr,mathmlBuilder:hr}),Zn({type:"array",names:["CD"],props:{numArgs:0},handler:t=>(rr(t),function(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===e[e.length-1].length&&e.pop();break}throw new r("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var i=[],a=[i],s=0;s<e.length;s++){for(var o=e[s],l=un(),c=0;c<o.length;c++)if(dn(o[c])){i.push(l);var h=Je(o[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(h));else{if(!"<>AV".includes(h))throw new r('Expected one of "<>AV=|." after @',o[c]);for(var d=0;d<2;d++){for(var p=!0,f=c+1;f<o.length;f++){if(pn(o[f],h)){p=!1,c=f;break}if(dn(o[f]))throw new r("Missing a "+h+" character to complete a CD arrow.",o[f]);u[d].body.push(o[f])}if(p)throw new r("Missing a "+h+" character to complete a CD arrow.",o[c])}}var g={type:"styling",body:[fn(h,u,t)],mode:"math",style:"display"};i.push(g),l=un()}else l.body.push(o[c]);s%2==0?i.push(l):i.shift(),i=[],a.push(i)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(t.parser)),htmlBuilder:lr,mathmlBuilder:hr}),Jn("\\nonumber","\\gdef\\@eqnsw{0}"),Jn("\\notag","\\nonumber"),he({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new r(t.funcName+" valid only within array environment")}});var dr=Xn;he({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:i}=t,a=e[0];if("ordgroup"!==a.type)throw new r("Invalid environment name",a);for(var s="",o=0;o<a.body.length;++o)s+=Qe(a.body[o],"textord").text;if("\\begin"===i){if(!dr.hasOwnProperty(s))throw new r("No such environment: "+s,a);var l=dr[s],{args:c,optArgs:h}=n.parseArguments("\\begin{"+s+"}",l),u={mode:n.mode,envName:s,parser:n},d=l.handler(u,c,h);n.expect("\\end",!1);var p=n.nextToken,f=Qe(n.parseFunction(),"environment");if(f.name!==s)throw new r("Mismatch: \\begin{"+s+"} matched by \\end{"+f.name+"}",p);return d}return{type:"environment",mode:n.mode,name:s,nameGroup:a}}});var pr=(t,e)=>{var n=t.font,r=e.withFont(n);return Ee(t.body,r)},fr=(t,e)=>{var n=t.font,r=e.withFont(n);return Fe(t.body,r)},gr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};he({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=de(e[0]),a=r;return a in gr&&(a=gr[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:pr,mathmlBuilder:fr}),he({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"mclass",mode:n.mode,mclass:cn(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:u(r)}}}),he({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:i}=t,{mode:a}=n,s=n.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:pr,mathmlBuilder:fr});var mr=(t,e)=>e?{type:"styling",mode:t.mode,style:e,body:[t]}:t;he({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var n,{parser:r,funcName:i}=t,a=e[0],s=e[1],o=null,l=null;switch(i){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,o="(",l=")";break;case"\\\\bracefrac":n=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c="\\cfrac"===i,h=null;return c||i.startsWith("\\d")?h="display":i.startsWith("\\t")&&(h="text"),mr({type:"genfrac",mode:r.mode,numer:a,denom:s,continued:c,hasBarLine:n,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:(t,e)=>{var n,r=e.style,i=r.fracNum(),a=r.fracDen();n=e.havingStyle(i);var s=Ee(t.numer,n,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<l?l:s.depth}n=e.havingStyle(a);var c,h,u,d,p,f,g,m,y,v,x=Ee(t.denom,n,e);if(t.hasBarLine?(t.barSize?(h=N(t.barSize,e),c=Wt("frac-line",e,h)):c=Wt("frac-line",e),h=c.height,u=c.height):(c=null,h=0,u=e.fontMetrics().defaultRuleThickness),r.size===k.DISPLAY.size?(d=e.fontMetrics().num1,p=h>0?3*u:7*u,f=e.fontMetrics().denom1):(h>0?(d=e.fontMetrics().num2,p=u):(d=e.fontMetrics().num3,p=3*u),f=e.fontMetrics().denom2),c){var b=e.fontMetrics().axisHeight;d-s.depth-(b+.5*h)<p&&(d+=p-(d-s.depth-(b+.5*h))),b-.5*h-(x.height-f)<p&&(f+=p-(b-.5*h-(x.height-f))),g=Xt({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:c,shift:-(b-.5*h)},{type:"elem",elem:s,shift:-d}]})}else{var w=d-s.depth-(x.height-f);w<p&&(d+=.5*(p-w),f+=.5*(p-w)),g=Xt({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:s,shift:-d}]})}return n=e.havingStyle(r),g.height*=n.sizeMultiplier/e.sizeMultiplier,g.depth*=n.sizeMultiplier/e.sizeMultiplier,m=r.size===k.DISPLAY.size?e.fontMetrics().delim1:r.size===k.SCRIPTSCRIPT.size?e.havingStyle(k.SCRIPT).fontMetrics().delim2:e.fontMetrics().delim2,y=null==t.leftDelim?ke(e,["mopen"]):qn(t.leftDelim,m,!0,e.havingStyle(r),t.mode,["mopen"]),v=t.continued?Yt([]):null==t.rightDelim?ke(e,["mclose"]):qn(t.rightDelim,m,!0,e.havingStyle(r),t.mode,["mclose"]),Yt(["mord"].concat(n.sizingClasses(e)),[y,Yt(["mfrac"],[g]),v],e)},mathmlBuilder:(t,e)=>{var n=new Se("mfrac",[Fe(t.numer,e),Fe(t.denom,e)]);if(t.hasBarLine){if(t.barSize){var r=N(t.barSize,e);n.setAttribute("linethickness",M(r))}}else n.setAttribute("linethickness","0px");if(null!=t.leftDelim||null!=t.rightDelim){var i=[];if(null!=t.leftDelim){var a=new Se("mo",[new Re(t.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(n),null!=t.rightDelim){var s=new Se("mo",[new Re(t.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return Me(i)}return n}}),he({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:n,funcName:r,token:i}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:e,token:i}}});var yr=["display","text","script","scriptscript"],vr=function(t){var e=null;return t.length>0&&(e="."===(e=t)?null:e),e};he({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var n,{parser:r}=t,i=e[4],a=e[5],s=de(e[0]),o="atom"===s.type&&"open"===s.family?vr(s.text):null,l=de(e[1]),c="atom"===l.type&&"close"===l.family?vr(l.text):null,h=Qe(e[2],"size"),u=null;n=!!h.isBlank||(u=h.value).number>0;var d=null,p=e[3];if("ordgroup"===p.type){if(p.body.length>0){var f=Qe(p.body[0],"textord");d=yr[Number(f.text)]}}else p=Qe(p,"textord"),d=yr[Number(p.text)];return mr({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:u,leftDelim:o,rightDelim:c},d)}}),he({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:i}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Qe(e[0],"size").value,token:i}}}),he({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=e[0],a=Qe(e[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=e[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});var xr=(t,e)=>{var n,r,i=e.style;"supsub"===t.type?(n=t.sup?Ee(t.sup,e.havingStyle(i.sup()),e):Ee(t.sub,e.havingStyle(i.sub()),e),r=Qe(t.base,"horizBrace")):r=Qe(t,"horizBrace");var a,s=Ee(r.base,e.havingBaseStyle(k.DISPLAY)),o=Ze(r,e);if(r.isOver?(a=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[1].classes.push("svg-align"):(a=Xt({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[0].classes.push("svg-align"),n){var l=Yt(["mord",r.isOver?"mover":"munder"],[a],e);a=r.isOver?Xt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):Xt({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Yt(["mord",r.isOver?"mover":"munder"],[a],e)};he({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:xr,mathmlBuilder:(t,e)=>{var n=Ve(t.label);return new Se(t.isOver?"mover":"munder",[Fe(t.base,e),n])}}),he({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],i=Qe(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:pe(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=ve(t.body,e,!1);return function(t,e,n,r){var i=new K(t,e,n,r);return jt(i),i}(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=Be(t.body,e);return n instanceof Se||(n=new Se("mrow",[n])),n.setAttribute("href",t.href),n}}),he({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=Qe(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<r.length;a++){var s=r[a];"~"===s&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:pe(o)}}}),he({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:pe(e[0])}},htmlBuilder(t,e){var n=ve(t.body,e,!1);return Vt(n)},mathmlBuilder:(t,e)=>new Se("mrow",$e(t.body,e))}),he({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var n,{parser:i,funcName:a,token:s}=t,o=Qe(e[0],"raw").string,l=e[1];i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(a){case"\\htmlClass":c.class=o,n={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,n={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,n={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var h=o.split(","),u=0;u<h.length;u++){var d=h[u],p=d.indexOf("=");if(p<0)throw new r("\\htmlData key/value '"+d+"' missing equals sign");var f=d.slice(0,p),g=d.slice(p+1);c["data-"+f.trim()]=g}n={command:"\\htmlData",attributes:c};break;default:throw new Error("Unrecognized html command")}return i.settings.isTrusted(n)?{type:"html",mode:i.mode,attributes:c,body:pe(l)}:i.formatUnsupportedCmd(a)},htmlBuilder:(t,e)=>{var n=ve(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var i=Yt(r,n,e);for(var a in t.attributes)"class"!==a&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Be(t.body,e)}),he({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:pe(e[0]),mathml:pe(e[1])}},htmlBuilder:(t,e)=>{var n=ve(t.html,e,!1);return Vt(n)},mathmlBuilder:(t,e)=>Be(t.mathml,e)});var br=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new r("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!I(n))throw new r("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};he({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:i}=t,a={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(n[0])for(var c=Qe(n[0],"raw").string.split(","),h=0;h<c.length;h++){var u=c[h].split("=");if(2===u.length){var d=u[1].trim();switch(u[0].trim()){case"alt":l=d;break;case"width":a=br(d);break;case"height":s=br(d);break;case"totalheight":o=br(d);break;default:throw new r("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var p=Qe(e[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:i.mode,alt:l,width:a,height:s,totalheight:o,src:p}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=N(t.height,e),r=0;t.totalheight.number>0&&(r=N(t.totalheight,e)-n);var i=0;t.width.number>0&&(i=N(t.width,e));var a={height:M(n+r)};i>0&&(a.width=M(i)),r>0&&(a.verticalAlign=M(-r));var s=new q(t.src,t.alt,a);return s.height=n,s.depth=r,s},mathmlBuilder:(t,e)=>{var n=new Se("mglyph",[]);n.setAttribute("alt",t.alt);var r=N(t.height,e),i=0;if(t.totalheight.number>0&&(i=N(t.totalheight,e)-r,n.setAttribute("valign",M(-i))),n.setAttribute("height",M(r+i)),t.width.number>0){var a=N(t.width,e);n.setAttribute("width",M(a))}return n.setAttribute("src",t.src),n}}),he({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,i=Qe(e[0],"size");if(n.settings.strict){var a="m"===r[1],s="mu"===i.value.unit;a?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(t,e)=>Zt(t.dimension,e),mathmlBuilder(t,e){var n=N(t.dimension,e);return new Le(n)}}),he({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(t,e)=>{var n;"clap"===t.alignment?(n=Yt([],[Ee(t.body,e)]),n=Yt(["inner"],[n],e)):n=Yt(["inner"],[Ee(t.body,e)]);var r=Yt(["fix"],[]),i=Yt([t.alignment],[n,r],e),a=Yt(["strut"]);return a.style.height=M(i.height+i.depth),i.depth&&(a.style.verticalAlign=M(-i.depth)),i.children.unshift(a),i=Yt(["thinbox"],[i],e),Yt(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var n=new Se("mpadded",[Fe(t.body,e)]);if("rlap"!==t.alignment){var r="llap"===t.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),he({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,i=r.mode;r.switchMode("math");var a="\\("===n?"\\)":"$",s=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:s}}}),he({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new r("Mismatched "+t.funcName)}});var wr=(t,e)=>{switch(e.style.size){case k.DISPLAY.size:return t.display;case k.TEXT.size:return t.text;case k.SCRIPT.size:return t.script;case k.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};he({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:pe(e[0]),text:pe(e[1]),script:pe(e[2]),scriptscript:pe(e[3])}},htmlBuilder:(t,e)=>{var n=wr(t,e),r=ve(n,e,!1);return Vt(r)},mathmlBuilder:(t,e)=>{var n=wr(t,e);return Be(n,e)}});var Tr=(t,e,n,r,i,a,s)=>{t=Yt([],[t]);var o,l,c,h=n&&u(n);if(e){var d=Ee(e,r.havingStyle(i.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var p=Ee(n,r.havingStyle(i.sub()),r);o={elem:p,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-p.height)}}if(l&&o){var f=r.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+t.depth+s;c=Xt({positionType:"bottom",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:M(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:M(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(o){var g=t.height-s;c=Xt({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:M(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t}]})}else{if(!l)return t;var m=t.depth+s;c=Xt({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:M(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}var y=[c];if(o&&0!==a&&!h){var v=Yt(["mspace"],[],r);v.style.marginRight=M(a),y.unshift(v)}return Yt(["mop","op-limits"],y,r)},kr=new Set(["\\smallint"]),Er=(t,e)=>{var n,r,i,a=!1;"supsub"===t.type?(n=t.sup,r=t.sub,i=Qe(t.base,"op"),a=!0):i=Qe(t,"op");var s,o=e.style,l=!1;if(o.size===k.DISPLAY.size&&i.symbol&&!kr.has(i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(h=i.name.slice(1),i.name="oiint"===h?"\\iint":"\\iiint"),s=Ft(i.name,c,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),h.length>0){var u=s.italic,d=ee(h+"Size"+(l?"2":"1"),e);s=Xt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]}),i.name="\\"+h,s.classes.unshift("mop"),s.italic=u}}else if(i.body){var p=ve(i.body,e,!0);1===p.length&&p[0]instanceof j?(s=p[0]).classes[0]="mop":s=Yt(["mop"],p,e)}else{for(var f=[],g=1;g<i.name.length;g++)f.push(zt(i.name[g],i.mode,e));s=Yt(["mop"],f,e)}var m=0,y=0;return(s instanceof j||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(m=(s.height-s.depth)/2-e.fontMetrics().axisHeight,y=s.italic||0),a?Tr(s,n,r,e,o,y,m):(m&&(s.style.position="relative",s.style.top=M(m)),s)},Ar=(t,e)=>{var n;if(t.symbol)n=new Se("mo",[Ne(t.name,t.mode)]),kr.has(t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Se("mo",$e(t.body,e));else{n=new Se("mi",[new Re(t.name.slice(1))]);var r=new Se("mo",[Ne("","text")]);n=t.parentIsSupSub?new Se("mrow",[n,r]):Ce([n,r])}return n},_r={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};he({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=r;return 1===i.length&&(i=_r[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Er,mathmlBuilder:Ar}),he({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:pe(r)}},htmlBuilder:Er,mathmlBuilder:Ar});var Cr={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};he({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Er,mathmlBuilder:Ar}),he({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Er,mathmlBuilder:Ar}),he({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:n}=t,r=n;return 1===r.length&&(r=Cr[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Er,mathmlBuilder:Ar});var Sr=(t,e)=>{var n,r,i,a,s=!1;if("supsub"===t.type?(n=t.sup,r=t.sub,i=Qe(t.base,"operatorname"),s=!0):i=Qe(t,"operatorname"),i.body.length>0){for(var o=(i.body.map(t=>{var e="text"in t?t.text:void 0;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t})),l=ve(o,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var h=l[c];h instanceof j&&(h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=Yt(["mop"],l,e)}else a=Yt(["mop"],[],e);return s?Tr(a,n,r,e,e.style,0,0):a};function Rr(t,e,n){for(var r=ve(t,e,!1),i=e.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var s=r[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(r[a].classes,e.sizingClasses(n)):r[a].classes[s+1]==="reset-size"+e.size&&(r[a].classes[s+1]="reset-size"+n.size),r[a].height*=i,r[a].depth*=i}return Vt(r)}he({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,i=e[0];return{type:"operatorname",mode:n.mode,body:pe(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Sr,mathmlBuilder:(t,e)=>{for(var n=$e(t.body,e.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var a=n[i];if(a instanceof Le);else if(a instanceof Se)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var s=a.children[0];1===a.children.length&&s instanceof Re?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var o=n.map(t=>t.toText()).join("");n=[new Re(o)]}var l=new Se("mi",n);l.setAttribute("mathvariant","normal");var c=new Se("mo",[Ne("","text")]);return t.parentIsSupSub?new Se("mrow",[l,c]):Ce([l,c])}}),Jn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ue({type:"ordgroup",htmlBuilder:(t,e)=>t.semisimple?Vt(ve(t.body,e,!1)):Yt(["mord"],ve(t.body,e,!0),e),mathmlBuilder:(t,e)=>Be(t.body,e,!0)}),he({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=Ee(t.body,e.havingCrampedStyle()),r=Wt("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]});return Yt(["mord","overline"],[a],e)},mathmlBuilder(t,e){var n=new Se("mo",[new Re("‾")]);n.setAttribute("stretchy","true");var r=new Se("mover",[Fe(t.body,e),n]);return r.setAttribute("accent","true"),r}}),he({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:pe(r)}},htmlBuilder:(t,e)=>{var n=ve(t.body,e.withPhantom(),!1);return Vt(n)},mathmlBuilder:(t,e)=>{var n=$e(t.body,e);return new Se("mphantom",n)}}),Jn("\\hphantom","\\smash{\\phantom{#1}}"),he({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Yt(["inner"],[Ee(t.body,e.withPhantom())]),r=Yt(["fix"],[]);return Yt(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=$e(pe(t.body),e),r=new Se("mphantom",n),i=new Se("mpadded",[r]);return i.setAttribute("width","0px"),i}}),he({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=Qe(e[0],"size").value,i=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(t,e){var n=Ee(t.body,e),r=N(t.dy,e);return Xt({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(t,e){var n=new Se("mpadded",[Fe(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}}),he({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),he({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,i=n[0],a=Qe(e[0],"size"),s=Qe(e[1],"size");return{type:"rule",mode:r.mode,shift:i&&Qe(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var n=Yt(["mord","rule"],[],e),r=N(t.width,e),i=N(t.height,e),a=t.shift?N(t.shift,e):0;return n.style.borderRightWidth=M(r),n.style.borderTopWidth=M(i),n.style.bottom=M(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=1.125*i*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=N(t.width,e),r=N(t.height,e),i=t.shift?N(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new Se("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",M(n)),s.setAttribute("height",M(r));var o=new Se("mpadded",[s]);return i>=0?o.setAttribute("height",M(i)):(o.setAttribute("height",M(i)),o.setAttribute("depth",M(-i))),o.setAttribute("voffset",M(i)),o}});var Lr=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];he({type:"sizing",names:Lr,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:i}=t,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:Lr.indexOf(r)+1,body:a}},htmlBuilder:(t,e)=>{var n=e.havingSize(t.size);return Rr(t.body,n,e)},mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=$e(t.body,n),i=new Se("mstyle",r);return i.setAttribute("mathsize",M(n.sizeMultiplier)),i}}),he({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,i=!1,a=!1,s=n[0]&&Qe(n[0],"ordgroup");if(s)for(var o="",l=0;l<s.body.length;++l){if("t"===(o=Je(s.body[l]).text))i=!0;else{if("b"!==o){i=!1,a=!1;break}a=!0}}else i=!0,a=!0;var c=e[0];return{type:"smash",mode:r.mode,body:c,smashHeight:i,smashDepth:a}},htmlBuilder:(t,e)=>{var n=Yt([],[Ee(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0),t.smashDepth&&(n.depth=0),t.smashHeight&&t.smashDepth)return Yt(["mord","smash"],[n],e);if(n.children)for(var r=0;r<n.children.length;r++)t.smashHeight&&(n.children[r].height=0),t.smashDepth&&(n.children[r].depth=0);var i=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Yt(["mord"],[i],e)},mathmlBuilder:(t,e)=>{var n=new Se("mpadded",[Fe(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}}),he({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,i=n[0],a=e[0];return{type:"sqrt",mode:r.mode,body:a,index:i}},htmlBuilder(t,e){var n=Ee(t.body,e.havingCrampedStyle());0===n.height&&(n.height=e.fontMetrics().xHeight),n=Ht(n,e);var r=e.fontMetrics().defaultRuleThickness,i=r;e.style.id<k.TEXT.id&&(i=e.fontMetrics().xHeight);var a=r+i/4,s=n.height+n.depth+a+r,{span:o,ruleWidth:l,advanceWidth:c}=function(t,e){var n,r,i=e.havingBaseSizing(),a=Kn("\\surd",t*i.sizeMultiplier,Fn,i),s=i.sizeMultiplier,o=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),l=0,c=0,h=0;return"small"===a.type?(t<1?s=1:t<1.4&&(s=.7),c=(1+o)/s,(n=Dn("sqrtMain",l=(1+o+Ln)/s,h=1e3+1e3*o+80,o,e)).style.minWidth="0.853em",r=.833/s):"large"===a.type?(h=1080*On[a.size],c=(On[a.size]+o)/s,l=(On[a.size]+o+Ln)/s,(n=Dn("sqrtSize"+a.size,l,h,o,e)).style.minWidth="1.02em",r=1/s):(l=t+o+Ln,c=t+o,h=Math.floor(1e3*t+o)+80,(n=Dn("sqrtTall",l,h,o,e)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=M(l),{span:n,advanceWidth:r,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*s}}(s,e),h=o.height-l;h>n.height+n.depth+a&&(a=(a+h-n.height-n.depth)/2);var u=o.height-n.height-a-l;n.style.paddingLeft=M(c);var d=Xt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:o},{type:"kern",size:l}]});if(t.index){var p=e.havingStyle(k.SCRIPTSCRIPT),f=Ee(t.index,p,e),g=.6*(d.height-d.depth),m=Xt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]}),y=Yt(["root"],[m]);return Yt(["mord","sqrt"],[y,d],e)}return Yt(["mord","sqrt"],[d],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Se("mroot",[Fe(n,e),Fe(r,e)]):new Se("msqrt",[Fe(n,e)])}});var Dr={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT};he({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:i}=t,a=i.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var n=Dr[t.style],r=e.havingStyle(n).withFont("");return Rr(t.body,r,e)},mathmlBuilder(t,e){var n=Dr[t.style],r=e.havingStyle(n),i=$e(t.body,r),a=new Se("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});ue({type:"supsub",htmlBuilder(t,e){var n=function(t,e){var n=t.base;return n?"op"===n.type?n.limits&&(e.style.size===k.DISPLAY.size||n.alwaysHandleSupSub)?Er:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(e.style.size===k.DISPLAY.size||n.limits)?Sr:null:"accent"===n.type?u(n.base)?nn:null:"horizBrace"===n.type&&!t.sub===n.isOver?xr:null:null}(t,e);if(n)return n(t,e);var r,i,a,{base:s,sup:o,sub:l}=t,c=Ee(s,e),h=e.fontMetrics(),d=0,p=0,f=s&&u(s);if(o){var g=e.havingStyle(e.style.sup());r=Ee(o,g,e),f||(d=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(l){var m=e.havingStyle(e.style.sub());i=Ee(l,m,e),f||(p=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}a=e.style===k.DISPLAY?h.sup1:e.style.cramped?h.sup3:h.sup2;var y,v=e.sizeMultiplier,x=M(.5/h.ptPerEm/v),b=null;if(i){var w=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(c instanceof j||w)&&(b=M(-c.italic))}if(r&&i){d=Math.max(d,a,r.depth+.25*h.xHeight),p=Math.max(p,h.sub2);var T=4*h.defaultRuleThickness;if(d-r.depth-(i.height-p)<T){p=T-(d-r.depth)+i.height;var E=.8*h.xHeight-(d-r.depth);E>0&&(d+=E,p-=E)}y=Xt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p,marginRight:x,marginLeft:b},{type:"elem",elem:r,shift:-d,marginRight:x}]})}else if(i){p=Math.max(p,h.sub1,i.height-.8*h.xHeight),y=Xt({positionType:"shift",positionData:p,children:[{type:"elem",elem:i,marginLeft:b,marginRight:x}]})}else{if(!r)throw new Error("supsub must have either sup or sub.");d=Math.max(d,a,r.depth+.25*h.xHeight),y=Xt({positionType:"shift",positionData:-d,children:[{type:"elem",elem:r,marginRight:x}]})}var A=Te(c,"right")||"mord";return Yt([A],[c,Yt(["msupsub"],[y])],e)},mathmlBuilder(t,e){var n,r=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(r=!0,n=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,a=[Fe(t.base,e)];if(t.sub&&a.push(Fe(t.sub,e)),t.sup&&a.push(Fe(t.sup,e)),r)i=n?"mover":"munder";else if(t.sub)if(t.sup){var s=t.base;i=s&&"op"===s.type&&s.limits&&e.style===k.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(e.style===k.DISPLAY||s.limits)?"munderover":"msubsup"}else{var o=t.base;i=o&&"op"===o.type&&o.limits&&(e.style===k.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||e.style===k.DISPLAY)?"munder":"msub"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&(e.style===k.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||e.style===k.DISPLAY)?"mover":"msup"}return new Se(i,a)}}),ue({type:"atom",htmlBuilder:(t,e)=>zt(t.text,t.mode,e,["m"+t.family]),mathmlBuilder(t,e){var n=new Se("mo",[Ne(t.text,t.mode)]);if("bin"===t.family){var r=Oe(t,e);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===t.family?n.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||n.setAttribute("stretchy","false");return n}});var Ir={mi:"italic",mn:"normal",mtext:"normal"};ue({type:"mathord",htmlBuilder:(t,e)=>Kt(t,e,"mathord"),mathmlBuilder(t,e){var n=new Se("mi",[Ne(t.text,t.mode,e)]),r=Oe(t,e)||"italic";return r!==Ir[n.type]&&n.setAttribute("mathvariant",r),n}}),ue({type:"textord",htmlBuilder:(t,e)=>Kt(t,e,"textord"),mathmlBuilder(t,e){var n,r=Ne(t.text,t.mode,e),i=Oe(t,e)||"normal";return n="text"===t.mode?new Se("mtext",[r]):/[0-9]/.test(t.text)?new Se("mn",[r]):"\\prime"===t.text?new Se("mo",[r]):new Se("mi",[r]),i!==Ir[n.type]&&n.setAttribute("mathvariant",i),n}});var Nr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ue({type:"spacing",htmlBuilder(t,e){if(Mr.hasOwnProperty(t.text)){var n=Mr[t.text].className||"";if("text"===t.mode){var i=Kt(t,e,"textord");return i.classes.push(n),i}return Yt(["mspace",n],[zt(t.text,t.mode,e)],e)}if(Nr.hasOwnProperty(t.text))return Yt(["mspace",Nr[t.text]],[],e);throw new r('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(!Mr.hasOwnProperty(t.text)){if(Nr.hasOwnProperty(t.text))return new Se("mspace");throw new r('Unknown type of space "'+t.text+'"')}return new Se("mtext",[new Re(" ")])}});var Or=()=>{var t=new Se("mtd",[]);return t.setAttribute("width","50%"),t};ue({type:"tag",mathmlBuilder(t,e){var n=new Se("mtable",[new Se("mtr",[Or(),new Se("mtd",[Be(t.body,e)]),Or(),new Se("mtd",[Be(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Pr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$r={"\\textbf":"textbf","\\textmd":"textmd"},Br={"\\textit":"textit","\\textup":"textup"},Fr=(t,e)=>{var n=t.font;return n?Pr[n]?e.withTextFontFamily(Pr[n]):$r[n]?e.withTextFontWeight($r[n]):"\\emph"===n?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Br[n]):e};he({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,i=e[0];return{type:"text",mode:n.mode,body:pe(i),font:r}},htmlBuilder(t,e){var n=Fr(t,e),r=ve(t.body,n,!0);return Yt(["mord","text"],r,n)},mathmlBuilder(t,e){var n=Fr(t,e);return Be(t.body,n)}}),he({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ee(t.body,e),r=Wt("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Xt({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]});return Yt(["mord","underline"],[a],e)},mathmlBuilder(t,e){var n=new Se("mo",[new Re("‾")]);n.setAttribute("stretchy","true");var r=new Se("munder",[Fe(t.body,e),n]);return r.setAttribute("accentunder","true"),r}}),he({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Ee(t.body,e),r=e.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Xt({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]})},mathmlBuilder:(t,e)=>new Se("mpadded",[Fe(t.body,e)],["vcenter"])}),he({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=zr(t),r=[],i=e.havingStyle(e.style.text()),a=0;a<n.length;a++){var s=n[a];"~"===s&&(s="\\textasciitilde"),r.push(Ft(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Yt(["mord","text"].concat(i.sizingClasses(e)),Ut(r),i)},mathmlBuilder(t,e){var n=new Re(zr(t)),r=new Se("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var zr=t=>t.body.replace(/ /g,t.star?"␣":" "),Kr=oe,qr="[ \r\n\t]",Ur="(\\\\[a-zA-Z@]+)"+qr+"*",jr="[̀-ͯ]",Yr=new RegExp(jr+"+$"),Gr="("+qr+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+jr+"*|[\ud800-\udbff][\udc00-\udfff]"+jr+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Ur+"|\\\\[^\ud800-\udfff])";class Wr{constructor(t,e){this.input=t,this.settings=e,this.tokenRegex=new RegExp(Gr,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new er("EOF",new tr(this,e,e));var n=this.tokenRegex.exec(t);if(null===n||n.index!==e)throw new r("Unexpected character: '"+t[e]+"'",new er(t[e],new tr(this,e,e+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[i]){var a=t.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new er(i,new tr(this,e,this.tokenRegex.lastIndex))}}class Vr{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new r("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,e,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var Hr=Qn;Jn("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),Jn("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),Jn("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),Jn("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),Jn("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return 1===e[0].length&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),Jn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Jn("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Xr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Jn("\\char",function(t){var e,n=t.popToken(),i=0;if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new r("\\char` missing argument");i=n.text.charCodeAt(0)}else e=10;if(e){if(null==(i=Xr[n.text])||i>=e)throw new r("Invalid base-"+e+" digit "+n.text);for(var a;null!=(a=Xr[t.future().text])&&a<e;)i*=e,i+=a,t.popToken()}return"\\@char{"+i+"}"});var Zr=(t,e,n,i)=>{var a=t.consumeArg().tokens;if(1!==a.length)throw new r("\\newcommand's first argument must be a macro name");var s=a[0].text,o=t.isDefined(s);if(o&&!e)throw new r("\\newcommand{"+s+"} attempting to redefine "+s+"; use \\renewcommand");if(!o&&!n)throw new r("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var l=0;if(1===(a=t.consumeArg().tokens).length&&"["===a[0].text){for(var c="",h=t.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)c+=h.text,h=t.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new r("Invalid number of arguments: "+c);l=parseInt(c),a=t.consumeArg().tokens}return o&&i||t.macros.set(s,{tokens:a,numArgs:l}),""};Jn("\\newcommand",t=>Zr(t,!1,!0,!1)),Jn("\\renewcommand",t=>Zr(t,!0,!1,!1)),Jn("\\providecommand",t=>Zr(t,!0,!0,!0)),Jn("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""}),Jn("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""}),Jn("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Kr[n],et.math[n],et.text[n]),""}),Jn("\\bgroup","{"),Jn("\\egroup","}"),Jn("~","\\nobreakspace"),Jn("\\lq","`"),Jn("\\rq","'"),Jn("\\aa","\\r a"),Jn("\\AA","\\r A"),Jn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Jn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Jn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Jn("","\\mathscr{B}"),Jn("","\\mathscr{E}"),Jn("","\\mathscr{F}"),Jn("","\\mathscr{H}"),Jn("","\\mathscr{I}"),Jn("","\\mathscr{L}"),Jn("","\\mathscr{M}"),Jn("","\\mathscr{R}"),Jn("","\\mathfrak{C}"),Jn("","\\mathfrak{H}"),Jn("","\\mathfrak{Z}"),Jn("\\Bbbk","\\Bbb{k}"),Jn("·","\\cdotp"),Jn("\\llap","\\mathllap{\\textrm{#1}}"),Jn("\\rlap","\\mathrlap{\\textrm{#1}}"),Jn("\\clap","\\mathclap{\\textrm{#1}}"),Jn("\\mathstrut","\\vphantom{(}"),Jn("\\underbar","\\underline{\\text{#1}}"),Jn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Jn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Jn("\\ne","\\neq"),Jn("≠","\\neq"),Jn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Jn("∉","\\notin"),Jn("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Jn("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Jn("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Jn("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Jn("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Jn("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Jn("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Jn("⟂","\\perp"),Jn("‼","\\mathclose{!\\mkern-0.8mu!}"),Jn("∌","\\notni"),Jn("⌜","\\ulcorner"),Jn("⌝","\\urcorner"),Jn("⌞","\\llcorner"),Jn("⌟","\\lrcorner"),Jn("©","\\copyright"),Jn("®","\\textregistered"),Jn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Jn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Jn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Jn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Jn("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Jn("⋮","\\vdots"),Jn("\\varGamma","\\mathit{\\Gamma}"),Jn("\\varDelta","\\mathit{\\Delta}"),Jn("\\varTheta","\\mathit{\\Theta}"),Jn("\\varLambda","\\mathit{\\Lambda}"),Jn("\\varXi","\\mathit{\\Xi}"),Jn("\\varPi","\\mathit{\\Pi}"),Jn("\\varSigma","\\mathit{\\Sigma}"),Jn("\\varUpsilon","\\mathit{\\Upsilon}"),Jn("\\varPhi","\\mathit{\\Phi}"),Jn("\\varPsi","\\mathit{\\Psi}"),Jn("\\varOmega","\\mathit{\\Omega}"),Jn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Jn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Jn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Jn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Jn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Jn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Jn("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Jn("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Qr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Jr=new Set(["bin","rel"]);Jn("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in Qr?e=Qr[n]:("\\not"===n.slice(0,4)||n in et.math&&Jr.has(et.math[n].group))&&(e="\\dotsb"),e});var ti={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Jn("\\dotso",function(t){return t.future().text in ti?"\\ldots\\,":"\\ldots"}),Jn("\\dotsc",function(t){var e=t.future().text;return e in ti&&","!==e?"\\ldots\\,":"\\ldots"}),Jn("\\cdots",function(t){return t.future().text in ti?"\\@cdots\\,":"\\@cdots"}),Jn("\\dotsb","\\cdots"),Jn("\\dotsm","\\cdots"),Jn("\\dotsi","\\!\\cdots"),Jn("\\dotsx","\\ldots\\,"),Jn("\\DOTSI","\\relax"),Jn("\\DOTSB","\\relax"),Jn("\\DOTSX","\\relax"),Jn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Jn("\\,","\\tmspace+{3mu}{.1667em}"),Jn("\\thinspace","\\,"),Jn("\\>","\\mskip{4mu}"),Jn("\\:","\\tmspace+{4mu}{.2222em}"),Jn("\\medspace","\\:"),Jn("\\;","\\tmspace+{5mu}{.2777em}"),Jn("\\thickspace","\\;"),Jn("\\!","\\tmspace-{3mu}{.1667em}"),Jn("\\negthinspace","\\!"),Jn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Jn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Jn("\\enspace","\\kern.5em "),Jn("\\enskip","\\hskip.5em\\relax"),Jn("\\quad","\\hskip1em\\relax"),Jn("\\qquad","\\hskip2em\\relax"),Jn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Jn("\\tag@paren","\\tag@literal{({#1})}"),Jn("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Jn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Jn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Jn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Jn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Jn("\\newline","\\\\\\relax"),Jn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ei=M(V["Main-Regular"]["T".charCodeAt(0)][1]-.7*V["Main-Regular"]["A".charCodeAt(0)][1]);Jn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ei+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Jn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ei+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Jn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Jn("\\@hspace","\\hskip #1\\relax"),Jn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Jn("\\ordinarycolon",":"),Jn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Jn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Jn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Jn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Jn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Jn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Jn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Jn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Jn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Jn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Jn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Jn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Jn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Jn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Jn("∷","\\dblcolon"),Jn("∹","\\eqcolon"),Jn("≔","\\coloneqq"),Jn("≕","\\eqqcolon"),Jn("⩴","\\Coloneqq"),Jn("\\ratio","\\vcentcolon"),Jn("\\coloncolon","\\dblcolon"),Jn("\\colonequals","\\coloneqq"),Jn("\\coloncolonequals","\\Coloneqq"),Jn("\\equalscolon","\\eqqcolon"),Jn("\\equalscoloncolon","\\Eqqcolon"),Jn("\\colonminus","\\coloneq"),Jn("\\coloncolonminus","\\Coloneq"),Jn("\\minuscolon","\\eqcolon"),Jn("\\minuscoloncolon","\\Eqcolon"),Jn("\\coloncolonapprox","\\Colonapprox"),Jn("\\coloncolonsim","\\Colonsim"),Jn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Jn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Jn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Jn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Jn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Jn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Jn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Jn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Jn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Jn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Jn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Jn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Jn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Jn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Jn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Jn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Jn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Jn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Jn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Jn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Jn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Jn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Jn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Jn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Jn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Jn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Jn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Jn("\\imath","\\html@mathml{\\@imath}{ı}"),Jn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Jn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Jn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Jn("⟦","\\llbracket"),Jn("⟧","\\rrbracket"),Jn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Jn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Jn("⦃","\\lBrace"),Jn("⦄","\\rBrace"),Jn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Jn("⦵","\\minuso"),Jn("\\darr","\\downarrow"),Jn("\\dArr","\\Downarrow"),Jn("\\Darr","\\Downarrow"),Jn("\\lang","\\langle"),Jn("\\rang","\\rangle"),Jn("\\uarr","\\uparrow"),Jn("\\uArr","\\Uparrow"),Jn("\\Uarr","\\Uparrow"),Jn("\\N","\\mathbb{N}"),Jn("\\R","\\mathbb{R}"),Jn("\\Z","\\mathbb{Z}"),Jn("\\alef","\\aleph"),Jn("\\alefsym","\\aleph"),Jn("\\Alpha","\\mathrm{A}"),Jn("\\Beta","\\mathrm{B}"),Jn("\\bull","\\bullet"),Jn("\\Chi","\\mathrm{X}"),Jn("\\clubs","\\clubsuit"),Jn("\\cnums","\\mathbb{C}"),Jn("\\Complex","\\mathbb{C}"),Jn("\\Dagger","\\ddagger"),Jn("\\diamonds","\\diamondsuit"),Jn("\\empty","\\emptyset"),Jn("\\Epsilon","\\mathrm{E}"),Jn("\\Eta","\\mathrm{H}"),Jn("\\exist","\\exists"),Jn("\\harr","\\leftrightarrow"),Jn("\\hArr","\\Leftrightarrow"),Jn("\\Harr","\\Leftrightarrow"),Jn("\\hearts","\\heartsuit"),Jn("\\image","\\Im"),Jn("\\infin","\\infty"),Jn("\\Iota","\\mathrm{I}"),Jn("\\isin","\\in"),Jn("\\Kappa","\\mathrm{K}"),Jn("\\larr","\\leftarrow"),Jn("\\lArr","\\Leftarrow"),Jn("\\Larr","\\Leftarrow"),Jn("\\lrarr","\\leftrightarrow"),Jn("\\lrArr","\\Leftrightarrow"),Jn("\\Lrarr","\\Leftrightarrow"),Jn("\\Mu","\\mathrm{M}"),Jn("\\natnums","\\mathbb{N}"),Jn("\\Nu","\\mathrm{N}"),Jn("\\Omicron","\\mathrm{O}"),Jn("\\plusmn","\\pm"),Jn("\\rarr","\\rightarrow"),Jn("\\rArr","\\Rightarrow"),Jn("\\Rarr","\\Rightarrow"),Jn("\\real","\\Re"),Jn("\\reals","\\mathbb{R}"),Jn("\\Reals","\\mathbb{R}"),Jn("\\Rho","\\mathrm{P}"),Jn("\\sdot","\\cdot"),Jn("\\sect","\\S"),Jn("\\spades","\\spadesuit"),Jn("\\sub","\\subset"),Jn("\\sube","\\subseteq"),Jn("\\supe","\\supseteq"),Jn("\\Tau","\\mathrm{T}"),Jn("\\thetasym","\\vartheta"),Jn("\\weierp","\\wp"),Jn("\\Zeta","\\mathrm{Z}"),Jn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Jn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Jn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Jn("\\bra","\\mathinner{\\langle{#1}|}"),Jn("\\ket","\\mathinner{|{#1}\\rangle}"),Jn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Jn("\\Bra","\\left\\langle#1\\right|"),Jn("\\Ket","\\left|#1\\right\\rangle");var ni=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=e=>n=>{t&&(n.macros.set("|",s),i.length&&n.macros.set("\\|",o));var a=e;!e&&i.length&&("|"===n.future().text&&(n.popToken(),a=!0));return{tokens:a?i:r,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,h=e.expandTokens([...a,...c,...n]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};Jn("\\bra@ket",ni(!1)),Jn("\\bra@set",ni(!0)),Jn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Jn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Jn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Jn("\\angln","{\\angl n}"),Jn("\\blue","\\textcolor{##6495ed}{#1}"),Jn("\\orange","\\textcolor{##ffa500}{#1}"),Jn("\\pink","\\textcolor{##ff00af}{#1}"),Jn("\\red","\\textcolor{##df0030}{#1}"),Jn("\\green","\\textcolor{##28ae7b}{#1}"),Jn("\\gray","\\textcolor{gray}{#1}"),Jn("\\purple","\\textcolor{##9d38bd}{#1}"),Jn("\\blueA","\\textcolor{##ccfaff}{#1}"),Jn("\\blueB","\\textcolor{##80f6ff}{#1}"),Jn("\\blueC","\\textcolor{##63d9ea}{#1}"),Jn("\\blueD","\\textcolor{##11accd}{#1}"),Jn("\\blueE","\\textcolor{##0c7f99}{#1}"),Jn("\\tealA","\\textcolor{##94fff5}{#1}"),Jn("\\tealB","\\textcolor{##26edd5}{#1}"),Jn("\\tealC","\\textcolor{##01d1c1}{#1}"),Jn("\\tealD","\\textcolor{##01a995}{#1}"),Jn("\\tealE","\\textcolor{##208170}{#1}"),Jn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Jn("\\greenB","\\textcolor{##8af281}{#1}"),Jn("\\greenC","\\textcolor{##74cf70}{#1}"),Jn("\\greenD","\\textcolor{##1fab54}{#1}"),Jn("\\greenE","\\textcolor{##0d923f}{#1}"),Jn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Jn("\\goldB","\\textcolor{##ffbb71}{#1}"),Jn("\\goldC","\\textcolor{##ff9c39}{#1}"),Jn("\\goldD","\\textcolor{##e07d10}{#1}"),Jn("\\goldE","\\textcolor{##a75a05}{#1}"),Jn("\\redA","\\textcolor{##fca9a9}{#1}"),Jn("\\redB","\\textcolor{##ff8482}{#1}"),Jn("\\redC","\\textcolor{##f9685d}{#1}"),Jn("\\redD","\\textcolor{##e84d39}{#1}"),Jn("\\redE","\\textcolor{##bc2612}{#1}"),Jn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Jn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Jn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Jn("\\maroonD","\\textcolor{##ca337c}{#1}"),Jn("\\maroonE","\\textcolor{##9e034e}{#1}"),Jn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Jn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Jn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Jn("\\purpleD","\\textcolor{##7854ab}{#1}"),Jn("\\purpleE","\\textcolor{##543b78}{#1}"),Jn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Jn("\\mintB","\\textcolor{##edf2df}{#1}"),Jn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Jn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Jn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Jn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Jn("\\grayD","\\textcolor{##d6d8da}{#1}"),Jn("\\grayE","\\textcolor{##babec2}{#1}"),Jn("\\grayF","\\textcolor{##888d93}{#1}"),Jn("\\grayG","\\textcolor{##626569}{#1}"),Jn("\\grayH","\\textcolor{##3b3e40}{#1}"),Jn("\\grayI","\\textcolor{##21242c}{#1}"),Jn("\\kaBlue","\\textcolor{##314453}{#1}"),Jn("\\kaGreen","\\textcolor{##71B307}{#1}");var ri={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ii{constructor(t,e,n){this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new Vr(Hr,e.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Wr(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,n,r;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:e,end:n}=this.consumeArg());return this.pushToken(new er("EOF",n.loc)),this.pushTokens(r),new er("",tr.range(e,n))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(t){var e=[],n=t&&t.length>0;n||this.consumeSpaces();var i,a=this.future(),s=0,o=0;do{if(i=this.popToken(),e.push(i),"{"===i.text)++s;else if("}"===i.text){if(-1===--s)throw new r("Extra }",i)}else if("EOF"===i.text)throw new r("Unexpected end of input in a macro argument, expected '"+(t&&n?t[o]:"}")+"'",i);if(t&&n)if((0===s||1===s&&"{"===t[o])&&i.text===t[o]){if(++o===t.length){e.splice(-o,o);break}}else o=0}while(0!==s||n);return"{"===a.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:a,end:i}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new r("The length of delimiters doesn't match the number of args!");for(var n=e[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new r("Use of the macro doesn't match its definition",a)}}for(var s=[],o=0;o<t;o++)s.push(this.consumeArg(e&&e[o+1]).tokens);return s}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),n=e.text,i=e.noexpand?null:this._getExpansion(n);if(null==i||t&&i.unexpandable){if(t&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new r("Undefined control sequence: "+n);return this.pushToken(e),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var o=(a=a.slice()).length-1;o>=0;--o){var l=a[o];if("#"===l.text){if(0===o)throw new r("Incomplete placeholder at end of macro body",l);if("#"===(l=a[--o]).text)a.splice(o+1,1);else{if(!/^[1-9]$/.test(l.text))throw new r("Not a valid argument number",l);a.splice(o,2,...s[+l.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new er(t)]):void 0}expandTokens(t){var e=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),e.push(r)}return this.countExpansion(e.length),e}expandMacroAsText(t){var e=this.expandMacro(t);return e?e.map(t=>t.text).join(""):e}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var n=this.lexer.catcodes[t];if(null!=n&&13!==n)return}var r="function"==typeof e?e(this):e;if("string"==typeof r){var i=0;if(r.includes("#"))for(var a=r.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var s=new Wr(r,this.settings),o=[],l=s.lex();"EOF"!==l.text;)o.push(l),l=s.lex();return o.reverse(),{tokens:o,numArgs:i}}return r}isDefined(t){return this.macros.has(t)||Kr.hasOwnProperty(t)||et.math.hasOwnProperty(t)||et.text.hasOwnProperty(t)||ri.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Kr.hasOwnProperty(t)&&!Kr[t].primitive}}var ai=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,si=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),oi={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},li={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ci{constructor(t,e){this.mode="math",this.gullet=new ii(t,e,this.mode),this.settings=e,this.leftrightDepth=0,this.nextToken=null}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new r("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new er("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,n}parseExpression(t,e){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(ci.endOfExpression.has(r.text))break;if(e&&r.text===e)break;if(t&&Kr[r.text]&&Kr[r.text].infix)break;var i=this.parseAtom(e);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var e,n=-1,i=0;i<t.length;i++){var a=t[i];if("infix"===a.type){if(-1!==n)throw new r("only one infix operator per group",a.token);n=i,e=a.replaceWith}}if(-1!==n&&e){var s,o,l=t.slice(0,n),c=t.slice(n+1);return s=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},o=1===c.length&&"ordgroup"===c[0].type?c[0]:{type:"ordgroup",mode:this.mode,body:c},["\\\\abovefrac"===e?this.callFunction(e,[s,t[n],o],[]):this.callFunction(e,[s,o],[])]}return t}handleSupSubscript(t){var e,n=this.fetch(),i=n.text;this.consume(),this.consumeSpaces();do{var a;e=this.parseGroup(t)}while("internal"===(null==(a=e)?void 0:a.type));if(!e)throw new r("Expected group after '"+i+"'",n);return e}formatUnsupportedCmd(t){for(var e=[],n=0;n<t.length;n++)e.push({type:"textord",mode:"text",text:t[n]});var r={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(t){var e,n,i=this.parseGroup("atom",t);if("internal"===(null==i?void 0:i.type))return i;if("text"===this.mode)return i;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(i&&"op"===i.type){var s="\\limits"===a.text;i.limits=s,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new r("Limit controls must follow a math operator",a);i.alwaysHandleSupSub&&(i.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(e)throw new r("Double superscript",a);e=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new r("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(e)throw new r("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();"'"===this.fetch().text;)l.push(o),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),e={type:"ordgroup",mode:this.mode,body:l}}else{if(!si[a.text])break;var c=ai.test(a.text),h=[];for(h.push(new er(si[a.text])),this.consume();;){var u=this.fetch().text;if(!si[u])break;if(ai.test(u)!==c)break;h.unshift(new er(si[u])),this.consume()}var d=this.subparse(h);c?n={type:"ordgroup",mode:"math",body:d}:e={type:"ordgroup",mode:"math",body:d}}}return e||n?{type:"supsub",mode:this.mode,base:i,sup:e,sub:n}:i}parseFunction(t,e){var n=this.fetch(),i=n.text,a=Kr[i];if(!a)return null;if(this.consume(),e&&"atom"!==e&&!a.allowedInArgument)throw new r("Got function '"+i+"' with no arguments"+(e?" as "+e:""),n);if("text"===this.mode&&!a.allowedInText)throw new r("Can't use function '"+i+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new r("Can't use function '"+i+"' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(i,a);return this.callFunction(i,s,o,n,t)}callFunction(t,e,n,i,a){var s={funcName:t,parser:this,token:i,breakOnTokenText:a},o=Kr[t];if(o&&o.handler)return o.handler(s,e,n);throw new r("No function handler for "+t)}parseArguments(t,e){var n=e.numArgs+e.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var o=e.argTypes&&e.argTypes[s],l=s<e.numOptionalArgs;("primitive"in e&&e.primitive&&null==o||"sqrt"===e.type&&1===s&&null==a[0])&&(o="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",o,l);if(l)a.push(c);else{if(null==c)throw new r("Null argument, please report this as a bug");i.push(c)}}return{args:i,optArgs:a}}parseGroupOfType(t,e,n){switch(e){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,e);case"hbox":var i=this.parseArgumentGroup(n,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new r("A primitive argument cannot be optional");var s=this.parseGroup(t);if(null==s)throw new r("Expected group as "+t,this.fetch());return s;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new r("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(t,e){var n=this.gullet.scanArgument(e);if(null==n)return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(t,e){for(var n,i=this.fetch(),a=i,s="";"EOF"!==(n=this.fetch()).text&&t.test(s+n.text);)s+=(a=n).text,this.consume();if(""===s)throw new r("Invalid "+e+": '"+i.text+"'",i);return i.range(a,s)}parseColorGroup(t){var e=this.parseStringGroup("color",t);if(null==e)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!n)throw new r("Invalid color: '"+e.text+"'",e);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var e,n=!1;if(this.gullet.consumeSpaces(),!(e=t||"{"===this.gullet.future().text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;t||0!==e.text.length||(e.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text);if(!i)throw new r("Invalid size: '"+e.text+"'",e);var a={number:+(i[1]+i[2]),unit:i[3]};if(!I(a))throw new r("Invalid unit: '"+a.unit+"'",e);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var e=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e)return null;var n=e.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,e){var n=this.gullet.scanArgument(t);if(null==n)return null;var r=this.mode;e&&this.switchMode(e),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return e&&this.switchMode(r),a}parseGroup(t,e){var n,i=this.fetch(),a=i.text;if("{"===a||"\\begingroup"===a){this.consume();var s="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:tr.range(i,l),body:o,semisimple:"\\begingroup"===a||void 0}}else if(null==(n=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===a[0]&&!ri.hasOwnProperty(a)){if(this.settings.throwOnError)throw new r("Undefined control sequence: "+a,i);n=this.formatUnsupportedCmd(a),this.consume()}return n}formLigatures(t){for(var e=t.length-1,n=0;n<e;++n){var r=t[n];if("textord"===r.type){var i=r.text,a=t[n+1];if(a&&"textord"===a.type){if("-"===i&&"-"===a.text){var s=t[n+2];n+1<e&&s&&"textord"===s.type&&"-"===s.text?(t.splice(n,3,{type:"textord",mode:"text",loc:tr.range(r,s),text:"---"}),e-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:tr.range(r,a),text:"--"}),e-=1)}"'"!==i&&"`"!==i||a.text!==i||(t.splice(n,2,{type:"textord",mode:"text",loc:tr.range(r,a),text:i+i}),e-=1)}}}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){this.consume();var n=e.slice(5),i="*"===n.charAt(0);if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new r("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}li.hasOwnProperty(e[0])&&!et[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=li[e[0]]+e.slice(1));var a,s=Yr.exec(e);if(s&&("i"===(e=e.substring(0,s.index))?e="ı":"j"===e&&(e="ȷ")),et[this.mode][e]){this.settings.strict&&"math"===this.mode&&Nt.includes(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var o,l=et[this.mode][e].group,c=tr.range(t);if(J.hasOwnProperty(l)){var h=l;o={type:"atom",mode:this.mode,family:h,loc:c,text:e}}else o={type:l,mode:this.mode,loc:c,text:e};a=o}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(_(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:tr.range(t),text:e}}if(this.consume(),s)for(var u=0;u<s[0].length;u++){var d=s[0][u];if(!oi[d])throw new r("Unknown accent ' "+d+"'",t);var p=oi[d][this.mode]||oi[d].text;if(!p)throw new r("Accent "+d+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:tr.range(t),label:p,isStretchy:!1,isShifty:!0,base:a}}return a}}ci.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var hi=function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new ci(t,e);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new r("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new er("\\df@tag")])}]}return i},ui=function(t,e,n){e.textContent="";var r=pi(t,n).toNode();e.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),ui=function(){throw new r("KaTeX doesn't work in quirks mode.")});var di=function(t,e,n){if(n.throwOnError||!(t instanceof r))throw t;var i=Yt(["katex-error"],[new j(e)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+n.errorColor),i},pi=function(t,e){var n=new f(e);try{return function(t,e,n){var r,i=Ye(n);if("mathml"===n.output)return ze(t,e,i,n.displayMode,!0);if("html"===n.output){var a=_e(t,i);r=Yt(["katex"],[a])}else{var s=ze(t,e,i,n.displayMode,!1),o=_e(t,i);r=Yt(["katex"],[s,o])}return Ge(r,n)}(hi(t,n),t,n)}catch(r){return di(r,t,n)}},fi={version:"0.16.38",render:ui,renderToString:function(t,e){return pi(t,e).toMarkup()},ParseError:r,SETTINGS_SCHEMA:d,__parse:function(t,e){var n=new f(e);return hi(t,n)},__renderToDomTree:pi,__renderToHTMLTree:function(t,e){var n=new f(e);try{return function(t,e,n){var r=_e(t,Ye(n)),i=Yt(["katex"],[r]);return Ge(i,n)}(hi(t,n),0,n)}catch(r){return di(r,t,n)}},__setFontMetrics:function(t,e){V[t]=e},__defineSymbol:nt,__defineFunction:he,__defineMacro:Jn,__domTree:{Span:z,Anchor:K,SymbolNode:j,SvgNode:Y,PathNode:G,LineNode:W}}},7266(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(6309),i=n(3122);const a=class{constructor(){this.type=i.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=i.Z.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:i}=t;void 0===e&&(t.h=r.A.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=r.A.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=r.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:i}=t;void 0===e&&(t.r=r.A.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=r.A.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=r.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931(t,e,n){"use strict";n.d(e,{A:()=>g});var r=n(7266),i=n(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const n=e[1],i=parseInt(n,16),s=n.length,o=s%4==0,l=s>4,c=l?1:17,h=l?8:4,u=o?0:-1,d=l?255:15;return r.A.set({r:(i>>h*(u+3)&d)*c,g:(i>>h*(u+2)&d)*c,b:(i>>h*(u+1)&d)*c,a:o?(i&d)*c/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a}=t;return a<1?`#${i.Y[Math.round(e)]}${i.Y[Math.round(n)]}${i.Y[Math.round(r)]}${i.Y[Math.round(255*a)]}`:`#${i.Y[Math.round(e)]}${i.Y[Math.round(n)]}${i.Y[Math.round(r)]}`}},s=a;var o=n(6309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return o.A.channel.clamp.h(.9*parseFloat(t));case"rad":return o.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return o.A.channel.clamp.h(360*parseFloat(t))}}return o.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(l.re);if(!n)return;const[,i,a,s,c,h]=n;return r.A.set({h:l._hue2deg(i),s:o.A.channel.clamp.s(parseFloat(a)),l:o.A.channel.clamp.l(parseFloat(s)),a:c?o.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${o.A.lang.round(e)}, ${o.A.lang.round(n)}%, ${o.A.lang.round(r)}%, ${i})`:`hsl(${o.A.lang.round(e)}, ${o.A.lang.round(n)}%, ${o.A.lang.round(r)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const n in h.colors)if(h.colors[n]===e)return n}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(d.re);if(!n)return;const[,i,a,s,l,c,h,u,p]=n;return r.A.set({r:o.A.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:o.A.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:o.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?o.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${o.A.lang.round(e)}, ${o.A.lang.round(n)}, ${o.A.lang.round(r)}, ${o.A.lang.round(i)})`:`rgb(${o.A.lang.round(e)}, ${o.A.lang.round(n)}, ${o.A.lang.round(r)})`}},p=d,f={format:{keyword:h,hex:s,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||p.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(i.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):s.stringify(t)},g=f},3122(t,e,n){"use strict";n.d(e,{Y:()=>i,Z:()=>a});var r=n(6309);const i={};for(let s=0;s<=255;s++)i[s]=r.A.unit.dec2hex(s);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(6309),i=n(1931);const a=(t,e,n)=>{const a=i.A.parse(t),s=a[e],o=r.A.channel.clamp[e](s+n);return s!==o&&(a[e]=o),i.A.stringify(a)}},8232(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(6309),i=n(1931);const a=(t,e)=>{const n=i.A.parse(t);for(const i in e)n[i]=r.A.channel.clamp[i](e[i]);return i.A.stringify(n)}},5937(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(6309),i=n(1931);const a=(t,e)=>r.A.lang.round(i.A.parse(t)[e])},5263(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(5635);const i=(t,e)=>(0,r.A)(t,"l",-e)},5097(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(6309),i=n(1931);const a=t=>{const{r:e,g:n,b:a}=i.A.parse(t),s=.2126*r.A.channel.toLinear(e)+.7152*r.A.channel.toLinear(n)+.0722*r.A.channel.toLinear(a);return r.A.lang.round(s)},s=t=>a(t)>=.5,o=t=>!s(t)},8041(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(5635);const i=(t,e)=>(0,r.A)(t,"l",e)},5582(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(6309),i=n(7266),a=n(1931),s=n(8232);const o=(t,e,n=0,o=1)=>{if("number"!=typeof t)return(0,s.A)(t,{a:e});const l=i.A.set({r:r.A.channel.clamp.r(t),g:r.A.channel.clamp.g(e),b:r.A.channel.clamp.b(n),a:r.A.channel.clamp.a(o)});return a.A.stringify(l)}},6309(t,e,n){"use strict";n.d(e,{A:()=>i});const r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},i)=>{if(!e)return 2.55*n;t/=360,e/=100;const a=(n/=100)<.5?n*(1+e):n+e-n*e,s=2*n-a;switch(i){case"r":return 255*r.hue2rgb(s,a,t+1/3);case"g":return 255*r.hue2rgb(s,a,t);case"b":return 255*r.hue2rgb(s,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),s=(i+a)/2;if("l"===r)return 100*s;if(i===a)return 0;const o=i-a;if("s"===r)return 100*(s>.5?o/(2-i-a):o/(i+a));switch(i){case t:return 60*((e-n)/o+(e<n?6:0));case e:return 60*((n-t)/o+2);case n:return 60*((t-e)/o+4);default:return-1}}},i={channel:r,lang:{clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},4628(t,e,n){"use strict";n.d(e,{t:()=>vn,u:()=>xn});var r=n(6373),i=n(418),a=n(2806),s=n(2151);var o=n(724),l=n(4722),c=n(4092);function h(t,e,n){return`${t.name}_${e}_${n}`}class u{constructor(t){this.target=t}isEpsilon(){return!1}}class d extends u{constructor(t,e){super(t),this.tokenType=e}}class p extends u{constructor(t){super(t)}isEpsilon(){return!0}}class f extends u{constructor(t,e,n){super(t),this.rule=e,this.followState=n}isEpsilon(){return!0}}function g(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(t,e){const n=e.length;for(let r=0;r<n;r++){const n=e[r],i=A(t,n,void 0,{type:2}),a=A(t,n,void 0,{type:7});i.stop=a,t.ruleToStartState.set(n,i),t.ruleToStopState.set(n,a)}}(e,t);const n=t.length;for(let r=0;r<n;r++){const n=t[r],i=y(e,n,n);void 0!==i&&k(e,n,i)}return e}function m(t,e,n){return n instanceof o.BK?T(t,e,n.terminalType,n):n instanceof o.wL?function(t,e,n){const r=n.referencedRule,i=t.ruleToStartState.get(r),a=A(t,e,n,{type:1}),s=A(t,e,n,{type:1}),o=new f(i,r,s);return _(a,o),{left:a,right:s}}(t,e,n):n instanceof o.ak?function(t,e,n){const r=A(t,e,n,{type:1});b(t,r);const i=(0,l.A)(n.definition,n=>m(t,e,n)),a=w(t,e,r,n,...i);return a}(t,e,n):n instanceof o.c$?function(t,e,n){const r=A(t,e,n,{type:1});b(t,r);const i=w(t,e,r,n,y(t,e,n));return function(t,e,n,r){const i=r.left,a=r.right;return E(i,a),t.decisionMap[h(e,"Option",n.idx)]=i,r}(t,e,n,i)}(t,e,n):n instanceof o.Y2?function(t,e,n){const r=A(t,e,n,{type:5});b(t,r);const i=w(t,e,r,n,y(t,e,n));return x(t,e,n,i)}(t,e,n):n instanceof o.Pp?function(t,e,n){const r=A(t,e,n,{type:5});b(t,r);const i=w(t,e,r,n,y(t,e,n)),a=T(t,e,n.separator,n);return x(t,e,n,i,a)}(t,e,n):n instanceof o.$P?function(t,e,n){const r=A(t,e,n,{type:4});b(t,r);const i=w(t,e,r,n,y(t,e,n));return v(t,e,n,i)}(t,e,n):n instanceof o.Cy?function(t,e,n){const r=A(t,e,n,{type:4});b(t,r);const i=w(t,e,r,n,y(t,e,n)),a=T(t,e,n.separator,n);return v(t,e,n,i,a)}(t,e,n):y(t,e,n)}function y(t,e,n){const r=(0,c.A)((0,l.A)(n.definition,n=>m(t,e,n)),t=>void 0!==t);return 1===r.length?r[0]:0===r.length?void 0:function(t,e){const n=e.length;for(let a=0;a<n-1;a++){const n=e[a];let r;1===n.left.transitions.length&&(r=n.left.transitions[0]);const i=r instanceof f,s=r,o=e[a+1].left;1===n.left.type&&1===n.right.type&&void 0!==r&&(i&&s.followState===n.right||r.target===n.right)?(i?s.followState=o:r.target=o,C(t,n.right)):E(n.right,o)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}(t,r)}function v(t,e,n,r,i){const a=r.left,s=r.right,o=A(t,e,n,{type:11});b(t,o);const l=A(t,e,n,{type:12});return a.loopback=o,l.loopback=o,t.decisionMap[h(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,E(s,o),void 0===i?(E(o,a),E(o,l)):(E(o,l),E(o,i.left),E(i.right,a)),{left:a,right:l}}function x(t,e,n,r,i){const a=r.left,s=r.right,o=A(t,e,n,{type:10});b(t,o);const l=A(t,e,n,{type:12}),c=A(t,e,n,{type:9});return o.loopback=c,l.loopback=c,E(o,a),E(o,l),E(s,c),void 0!==i?(E(c,l),E(c,i.left),E(i.right,a)):E(c,o),t.decisionMap[h(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:l}}function b(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function w(t,e,n,r,...i){const a=A(t,e,r,{type:8,start:n});n.end=a;for(const o of i)void 0!==o?(E(n,o.left),E(o.right,a)):E(n,a);const s={left:n,right:a};return t.decisionMap[h(e,function(t){if(t instanceof o.ak)return"Alternation";if(t instanceof o.c$)return"Option";if(t instanceof o.Y2)return"Repetition";if(t instanceof o.Pp)return"RepetitionWithSeparator";if(t instanceof o.$P)return"RepetitionMandatory";if(t instanceof o.Cy)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}(r),r.idx)]=n,s}function T(t,e,n,r){const i=A(t,e,r,{type:1}),a=A(t,e,r,{type:1});return _(i,new d(a,n)),{left:i,right:a}}function k(t,e,n){const r=t.ruleToStartState.get(e);E(r,n.left);const i=t.ruleToStopState.get(e);E(n.right,i);return{left:r,right:i}}function E(t,e){_(t,new p(e))}function A(t,e,n,r){const i=Object.assign({atn:t,production:n,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},r);return t.states.push(i),i}function _(t,e){0===t.transitions.length&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function C(t,e){t.states.splice(t.states.indexOf(e),1)}const S={};class R{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){const e=L(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return(0,l.A)(this.configs,t=>t.alt)}get key(){let t="";for(const e in this.map)t+=e+":";return t}}function L(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(t=>t.stateNumber.toString()).join("_")}`}var D=n(6452),I=n(8139),N=n(6307),M=n(7371);const O=function(t,e){return t&&t.length?(0,M.A)(t,(0,N.A)(e,2)):[]};var P=n(1717),$=n(8058),B=n(6401),F=n(3130);function z(t,e){const n={};return r=>{const i=r.toString();let a=n[i];return void 0!==a||(a={atnStartState:t,decision:e,states:{}},n[i]=a),a}}class K{constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let t="";const e=this.predicates.length;for(let n=0;n<e;n++)t+=!0===this.predicates[n]?"1":"0";return t}}const q=new K;class U extends o.T6{constructor(t){var e;super(),this.logging=null!==(e=null==t?void 0:t.logging)&&void 0!==e?e:t=>console.log(t)}initialize(t){this.atn=g(t.rules),this.dfas=function(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=z(t.decisionStates[r],r);return n}(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){const{prodOccurrence:e,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=h(n,"Alternation",e),u=this.atn.decisionMap[c].decision,d=(0,l.A)((0,o.jk)({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:n}),t=>(0,l.A)(t,t=>t[0]));if(j(d,!1)&&!i){const t=(0,F.A)(d,(t,e,n)=>((0,$.A)(e,e=>{e&&(t[e.tokenTypeIdx]=n,(0,$.A)(e.categoryMatches,e=>{t[e]=n}))}),t),{});return r?function(e){var n;const r=this.LA(1),i=t[r.tokenTypeIdx];if(void 0!==e&&void 0!==i){const t=null===(n=e[i])||void 0===n?void 0:n.GATE;if(void 0!==t&&!1===t.call(this))return}return i}:function(){const e=this.LA(1);return t[e.tokenTypeIdx]}}return r?function(t){const e=new K,n=void 0===t?0:t.length;for(let i=0;i<n;i++){const n=null==t?void 0:t[i].GATE;e.set(i,void 0===n||n.call(this))}const r=Y.call(this,a,u,e,s);return"number"==typeof r?r:void 0}:function(){const t=Y.call(this,a,u,q,s);return"number"==typeof t?t:void 0}}buildLookaheadForOptional(t){const{prodOccurrence:e,rule:n,prodType:r,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=h(n,r,e),u=this.atn.decisionMap[c].decision,d=(0,l.A)((0,o.jk)({maxLookahead:1,occurrence:e,prodType:r,rule:n}),t=>(0,l.A)(t,t=>t[0]));if(j(d)&&d[0][0]&&!i){const t=d[0],e=(0,P.A)(t);if(1===e.length&&(0,B.A)(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=(0,F.A)(e,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,(0,$.A)(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){const t=Y.call(this,a,u,q,s);return"object"!=typeof t&&0===t}}}function j(t,e=!0){const n=new Set;for(const r of t){const t=new Set;for(const i of r){if(void 0===i){if(e)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const e of r)if(n.has(e)){if(!t.has(e))return!1}else n.add(e),t.add(e)}}return!0}function Y(t,e,n,r){const i=t[e](n);let a=i.start;if(void 0===a){a=tt(i,Q(et(i.atnStartState))),i.start=a}return G.apply(this,[i,a,n,r])}function G(t,e,n,r){let i=e,a=1;const s=[];let o=this.LA(a++);for(;;){let e=X(i,o);if(void 0===e&&(e=W.apply(this,[t,i,o,a,n,r])),e===S)return H(s,i,o);if(!0===e.isAcceptState)return e.prediction;i=e,s.push(o),o=this.LA(a++)}}function W(t,e,n,r,i,a){const s=function(t,e,n){const r=new R,i=[];for(const s of t.elements){if(!1===n.is(s.alt))continue;if(7===s.state.type){i.push(s);continue}const t=s.state.transitions.length;for(let n=0;n<t;n++){const t=Z(s.state.transitions[n],e);void 0!==t&&r.add({state:t,alt:s.alt,stack:s.stack})}}let a;0===i.length&&1===r.size&&(a=r);if(void 0===a){a=new R;for(const t of r.elements)nt(t,a)}if(i.length>0&&!function(t){for(const e of t.elements)if(7===e.state.type)return!0;return!1}(a))for(const s of i)a.add(s);return a}(e.configs,n,i);if(0===s.size)return J(t,e,n,S),S;let o=Q(s);const l=function(t,e){let n;for(const r of t.elements)if(!0===e.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(s,i);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(function(t){if(function(t){for(const e of t.elements)if(7!==e.state.type)return!1;return!0}(t))return!0;const e=function(t){const e=new Map;for(const n of t){const t=L(n,!1);let r=e.get(t);void 0===r&&(r={},e.set(t,r)),r[n.alt]=!0}return e}(t.elements);return function(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}(e)&&!function(t){for(const e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}(e)}(s)){const e=(0,D.A)(s.alts);o.isAcceptState=!0,o.prediction=e,o.configs.uniqueAlt=e,V.apply(this,[t,r,s.alts,a])}return o=J(t,e,n,o),o}function V(t,e,n,r){const i=[];for(let s=1;s<=e;s++)i.push(this.LA(s).tokenType);const a=t.atnStartState;r(function(t){const e=(0,l.A)(t.prefixPath,t=>(0,o.Sk)(t)).join(", "),n=0===t.production.idx?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${function(t){if(t instanceof o.wL)return"SUBRULE";if(t instanceof o.c$)return"OPTION";if(t instanceof o.ak)return"OR";if(t instanceof o.$P)return"AT_LEAST_ONE";if(t instanceof o.Cy)return"AT_LEAST_ONE_SEP";if(t instanceof o.Pp)return"MANY_SEP";if(t instanceof o.Y2)return"MANY";if(t instanceof o.BK)return"CONSUME";throw Error("non exhaustive match")}(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:a.rule,ambiguityIndices:n,production:a.production,prefixPath:i}))}function H(t,e,n){const r=(0,I.A)(e.configs.elements,t=>t.state.transitions);return{actualToken:n,possibleTokenTypes:O(r.filter(t=>t instanceof d).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function X(t,e){return t.edges[e.tokenTypeIdx]}function Z(t,e){if(t instanceof d&&(0,o.G)(e,t.tokenType))return t.target}function Q(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function J(t,e,n,r){return r=tt(t,r),e.edges[n.tokenTypeIdx]=r,r}function tt(t,e){if(e===S)return e;const n=e.configs.key,r=t.states[n];return void 0!==r?r:(e.configs.finalize(),t.states[n]=e,e)}function et(t){const e=new R,n=t.transitions.length;for(let r=0;r<n;r++){nt({state:t.transitions[r].target,alt:r,stack:[]},e)}return e}function nt(t,e){const n=t.state;if(7===n.type){if(t.stack.length>0){const n=[...t.stack];nt({state:n.pop(),alt:t.alt,stack:n},e)}else e.add(t);return}n.epsilonOnlyTransitions||e.add(t);const r=n.transitions.length;for(let i=0;i<r;i++){const r=rt(t,n.transitions[i]);void 0!==r&&nt(r,e)}}function rt(t,e){if(e instanceof p)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof f){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}var it=n(9683),at=n(6203);class st{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(t){return this.rootNode=new ut(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){const e=new ct;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){const n=new lt(t.startOffset,t.image.length,(0,r.wf)(t),t.tokenType,!e);return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),n}removeNode(t){const e=t.container;if(e){const n=e.content.indexOf(t);n>=0&&e.content.splice(n,1)}}addHiddenNodes(t){const e=[];for(const a of t){const t=new lt(a.startOffset,a.image.length,(0,r.wf)(a),a.tokenType,!0);t.root=this.rootNode,e.push(t)}let n=this.current,i=!1;if(n.content.length>0)n.content.push(...e);else{for(;n.container;){const t=n.container.content.indexOf(n);if(t>0){n.container.content.splice(t,0,...e),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...e)}}construct(t){const e=this.current;"string"!=typeof t.$type||t.$infixName||(this.current.astNode=t),t.$cstNode=e;const n=this.nodeStack.pop();0===n?.content.length&&this.removeNode(n)}}class ot{get hidden(){return!1}get astNode(){const t="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!t)throw new Error("This node has no associated AST element");return t}set astNode(t){this._astNode=t}get text(){return this.root.fullText.substring(this.offset,this.end)}}class lt extends ot{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,n,r,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=r,this._length=e,this._range=n}}class ct extends ot{constructor(){super(...arguments),this.content=new ht(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;if(t&&e){if(void 0===this._rangeCache){const{range:n}=t,{range:r}=e;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}return{start:at.Position.create(0,0),end:at.Position.create(0,0)}}get firstNonHiddenNode(){for(const t of this.content)if(!t.hidden)return t;return this.content[0]}get lastNonHiddenNode(){for(let t=this.content.length-1;t>=0;t--){const e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}}class ht extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,ht.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...n){return this.addParents(n),super.splice(t,e,...n)}addParents(t){for(const e of t)e.container=this.parent}}class ut extends ct{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}const dt=Symbol("Datatype");function pt(t){return t.$type===dt}const ft=t=>t.endsWith("")?t:t+"";class gt{constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;const e=this.lexer.definition,n="production"===t.LanguageMetaData.mode;t.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Tt(e,{...t.parser.ParserConfig,skipValidations:n,errorMessageProvider:t.parser.ParserErrorMessageProvider},t.shared.profilers.LangiumProfiler.createTask("parsing",t.LanguageMetaData.languageId)):this.wrapper=new wt(e,{...t.parser.ParserConfig,skipValidations:n,errorMessageProvider:t.parser.ParserErrorMessageProvider})}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class mt extends gt{get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new st,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){const n=this.computeRuleType(t);let r;(0,s.NT)(t)&&(r=t.name,this.registerPrecedenceMap(t));const i=this.wrapper.DEFINE_RULE(ft(t.name),this.startImplementation(n,r,e).bind(this));return this.allRules.set(t.name,i),(0,s.s7)(t)&&t.entry&&(this.mainRule=i),i}registerPrecedenceMap(t){const e=t.name,n=new Map;for(let r=0;r<t.operators.precedences.length;r++){const e=t.operators.precedences[r];for(const t of e.operators)n.set(t.value,{precedence:r,rightAssoc:"right"===e.associativity})}this.operatorPrecedence.set(e,n)}computeRuleType(t){return(0,s.NT)(t)?(0,i.Uz)(t):t.fragment?void 0:(0,i.Xq)(t)?dt:(0,i.Uz)(t)}parse(t,e={}){this.nodeBuilder.buildRootNode(t);const n=this.lexerResult=this.lexer.tokenize(t);this.wrapper.input=n.tokens;const r=e.rule?this.allRules.get(e.rule):this.mainRule;if(!r)throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.");const i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,(0,it.SD)(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(t){let e=this.wrapper.rule(t);if(this.stack.length>0&&(e=this.construct()),void 0===e)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return e}startImplementation(t,e,n){return r=>{const i=!this.isRecording()&&void 0!==t;if(i){const n={$type:t};this.stack.push(n),t===dt?n.value="":void 0!==e&&(n.$infixName=e)}return n(r),i?this.construct():void 0}}extractHiddenTokens(t){const e=this.lexerResult.hidden;if(!e.length)return[];const n=t.startOffset;for(let r=0;r<e.length;r++){if(e[r].startOffset>n)return e.splice(0,r)}return e.splice(0,e.length)}consume(t,e,n){const r=this.wrapper.wrapConsume(t,e);if(!this.isRecording()&&this.isValidToken(r)){const t=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(t);const e=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){const t=(0,s.wb)(n)?r.image:this.converter.convert(r.image,e);this.assign(i.operator,i.feature,t,e,a)}else if(pt(o)){let t=r.image;(0,s.wb)(n)||(t=this.converter.convert(t,e).toString()),o.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,n,r,i){let a,s;this.isRecording()||n||(a=this.nodeBuilder.buildCompositeNode(r));try{s=this.wrapper.wrapSubrule(t,e,i)}finally{this.isRecording()||(void 0!==s||n||(s=this.construct()),void 0!==s&&a&&a.length>0&&this.performSubruleAssignment(s,r,a))}}performSubruleAssignment(t,e,n){const{assignment:r,crossRef:i}=this.getAssignment(e);if(r)this.assign(r.operator,r.feature,t,n,i);else if(!r){const e=this.current;if(pt(e))e.value+=t.toString();else if("object"==typeof t&&t){const n=this.assignWithoutOverride(t,e);this.stack.pop(),this.stack.push(n)}}}action(t,e){if(!this.isRecording()){let n=this.current;if(e.feature&&e.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode);this.nodeBuilder.buildCompositeNode(e).content.push(n.$cstNode);const r={$type:t};this.stack.push(r),this.assign(e.operator,e.feature,n,n.$cstNode)}else n.$type=t}}construct(){if(this.isRecording())return;const t=this.stack.pop();return this.nodeBuilder.construct(t),"$infixName"in t?this.constructInfix(t,this.operatorPrecedence.get(t.$infixName)):pt(t)?this.converter.convert(t.value,t.$cstNode):((0,it.OP)(this.astReflection,t),t)}constructInfix(t,e){const n=t.parts;if(!Array.isArray(n)||0===n.length)return;const r=t.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let f=0;f<r.length;f++){const t=r[f],n=e.get(t)??{precedence:1/0,rightAssoc:!1};n.precedence>a?(a=n.precedence,i=f):n.precedence===a&&(n.rightAssoc||(i=f))}const s=r.slice(0,i),o=r.slice(i+1),l=n.slice(0,i+1),c=n.slice(i+1),h={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:l,operators:s},u={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:c,operators:o},d=this.constructInfix(h,e),p=this.constructInfix(u,e);return{$type:t.$type,$cstNode:t.$cstNode,left:d,operator:r[i],right:p}}getAssignment(t){if(!this.assignmentMap.has(t)){const e=(0,it.XG)(t,s.wh);this.assignmentMap.set(t,{assignment:e,crossRef:e&&(0,s._c)(e.terminal)?e.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(t)}assign(t,e,n,r,i){const a=this.current;let s;switch(s="single"===i&&"string"==typeof n?this.linker.buildReference(a,e,r,n):"multi"===i&&"string"==typeof n?this.linker.buildMultiReference(a,e,r,n):n,t){case"=":a[e]=s;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(s)}}assignWithoutOverride(t,e){for(const[r,i]of Object.entries(e)){const e=t[r];void 0===e?t[r]=i:Array.isArray(e)&&Array.isArray(i)&&(i.push(...e),t[r]=i)}const n=t.$cstNode;return n&&(n.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}}class yt{buildMismatchTokenMessage(t){return o.my.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return o.my.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return o.my.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return o.my.buildEarlyExitMessage(t)}}class vt extends yt{buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}}class xt extends gt{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();const e=this.lexer.tokenize(t,{mode:"partial"});return this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){const n=this.wrapper.DEFINE_RULE(ft(t.name),this.startImplementation(e).bind(this));return this.allRules.set(t.name,n),t.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return e=>{const n=this.keepStackSize();try{t(e)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,n){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,n,r,i){this.before(r),this.wrapper.wrapSubrule(t,e,i),this.after(r)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){const e=this.elementStack.lastIndexOf(t);e>=0&&this.elementStack.splice(e)}}get currIdx(){return this.wrapper.currIdx}}const bt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new vt};class wt extends o.jr{constructor(t,e){super(t,{...bt,lookaheadStrategy:e&&"maxLookahead"in e?new o.T6({maxLookahead:e.maxLookahead}):new U({logging:e.skipValidations?()=>{}:void 0}),...e})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e,n){return this.RULE(t,e,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e,void 0)}wrapSubrule(t,e,n){return this.subrule(t,e,{ARGS:[n]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}rule(t){return t.call(this,{})}}class Tt extends wt{constructor(t,e,n){super(t,e),this.task=n}rule(t){this.task.start(),this.task.startSubTask(this.ruleName(t));try{return super.rule(t)}finally{this.task.stopSubTask(this.ruleName(t)),this.task.stop()}}ruleName(t){return t.ruleName}subrule(t,e,n){this.task.startSubTask(this.ruleName(e));try{return super.subrule(t,e,n)}finally{this.task.stopSubTask(this.ruleName(e))}}}var kt=n(1564),Et=n(1719);function At(t,e,n){return function(t,e){const n=(0,i.YV)(e,!1),r=(0,Et.Td)(e.rules).filter(s.s7).filter(t=>n.has(t));for(const i of r){const e={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(i,Ct(e,i.definition))}const a=(0,Et.Td)(e.rules).filter(s.NT).filter(t=>n.has(t));for(const i of a)t.parser.rule(i,_t(t,i))}({parser:e,tokens:n,ruleNames:new Map},t),e}function _t(t,e){const n=e.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if((0,s.rE)(n))throw new Error("Cannot use terminal rule in infix expression");const r=e.operators.precedences.flatMap(t=>t.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},c={...a,$container:o};o.elements.push(l,c);const h=r.map(e=>t.tokens[e.value]).map((e,n)=>({ALT:()=>t.parser.consume(n,e,l)}));let u;return e=>{u??(u=It(t,n)),t.parser.subrule(0,u,!1,a,e),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,h),t.parser.subrule(1,u,!1,c,e)}})}}function Ct(t,e,n=!1){let r;if((0,s.wb)(e))r=function(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}(t,e);else if((0,s.ve)(e))r=function(t,e){const n=(0,i.Uz)(e);return()=>t.parser.action(n,e)}(t,e);else if((0,s.wh)(e))r=Ct(t,e.terminal);else if((0,s._c)(e))r=Lt(t,e);else if((0,s.$g)(e))r=function(t,e){const n=e.rule.ref;if((0,s.cM)(n)){const r=t.subrule++,i=(0,s.s7)(n)&&n.fragment,a=e.arguments.length>0?function(t,e){if(e.some(t=>t.calledByName)){const t=e.map(t=>({parameterName:t.parameter?.ref?.name,predicate:St(t.value)}));return e=>{const n={};for(const{parameterName:r,predicate:i}of t)r&&(n[r]=i(e));return n}}{const n=e.map(t=>St(t.value));return e=>{const r={};for(let i=0;i<n.length;i++)if(i<t.parameters.length){const a=t.parameters[i].name,s=n[i];r[a]=s(e)}return r}}}(n,e.arguments):()=>({});let o;return s=>{o??(o=It(t,n)),t.parser.subrule(r,o,i,e,a(s))}}if((0,s.rE)(n)){const r=t.consume++,i=Nt(t,n.name);return()=>t.parser.consume(r,i,e)}if(!n)throw new kt.WB(e.$cstNode,`Undefined rule: ${e.rule.$refText}`);(0,kt.dr)(n)}(t,e);else if((0,s.jp)(e))r=function(t,e){if(1===e.elements.length)return Ct(t,e.elements[0]);{const n=[];for(const i of e.elements){const e={ALT:Ct(t,i,!0)},r=Rt(i);r&&(e.GATE=St(r)),n.push(e)}const r=t.or++;return e=>t.parser.alternatives(r,n.map(t=>{const n={ALT:()=>t.ALT(e)},r=t.GATE;return r&&(n.GATE=()=>r(e)),n}))}}(t,e);else if((0,s.cY)(e))r=function(t,e){if(1===e.elements.length)return Ct(t,e.elements[0]);const n=[];for(const o of e.elements){const e={ALT:Ct(t,o,!0)},r=Rt(o);r&&(e.GATE=St(r)),n.push(e)}const r=t.or++,i=(t,e)=>`uGroup_${t}_${e.getRuleStack().join("-")}`,a=e=>t.parser.alternatives(r,n.map((n,a)=>{const s={ALT:()=>!0},o=t.parser;s.ALT=()=>{if(n.ALT(e),!o.isRecording()){const t=i(r,o);o.unorderedGroups.get(t)||o.unorderedGroups.set(t,[]);const e=o.unorderedGroups.get(t);void 0===e?.[a]&&(e[a]=!0)}};const l=n.GATE;return s.GATE=l?()=>l(e):()=>{const t=o.unorderedGroups.get(i(r,o));return!t?.[a]},s})),s=Dt(t,Rt(e),a,"*");return e=>{s(e),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}(t,e);else if((0,s.IZ)(e))r=function(t,e){const n=e.elements.map(e=>Ct(t,e));return t=>n.forEach(e=>e(t))}(t,e);else{if(!(0,s.FO)(e))throw new kt.WB(e.$cstNode,`Unexpected element type: ${e.$type}`);{const n=t.consume++;r=()=>t.parser.consume(n,o.LT,e)}}return Dt(t,n?void 0:Rt(e),r,e.cardinality)}function St(t){if((0,s.RP)(t)){const e=St(t.left),n=St(t.right);return t=>e(t)||n(t)}if((0,s.Tu)(t)){const e=St(t.left),n=St(t.right);return t=>e(t)&&n(t)}if((0,s.Ct)(t)){const e=St(t.value);return t=>!e(t)}if((0,s.TF)(t)){const e=t.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if((0,s.Cz)(t)){const e=Boolean(t.true);return()=>e}(0,kt.dr)(t)}function Rt(t){if((0,s.IZ)(t))return t.guardCondition}function Lt(t,e,n=e.terminal){if(n){if((0,s.$g)(n)&&(0,s.s7)(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;let a;return n=>{a??(a=It(t,r)),t.parser.subrule(i,a,!1,e,n)}}if((0,s.$g)(n)&&(0,s.rE)(n.rule.ref)){const r=t.consume++,i=Nt(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}if((0,s.wb)(n)){const r=t.consume++,i=Nt(t,n.value);return()=>t.parser.consume(r,i,e)}throw new Error("Could not build cross reference parser")}{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=(0,i.U5)(e.type.ref),r=n?.terminal;if(!r)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(e.type.ref));return Lt(t,e,r)}}function Dt(t,e,n,r){const i=e&&St(e);if(!r){if(i){const e=t.or++;return r=>t.parser.alternatives(e,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,o.mT)(),GATE:()=>!i(r)}])}return n}if("*"===r){const e=t.many++;return r=>t.parser.many(e,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const e=t.many++;if(i){const r=t.or++;return a=>t.parser.alternatives(r,[{ALT:()=>t.parser.atLeastOne(e,{DEF:()=>n(a)}),GATE:()=>i(a)},{ALT:(0,o.mT)(),GATE:()=>!i(a)}])}return r=>t.parser.atLeastOne(e,{DEF:()=>n(r)})}if("?"===r){const e=t.optional++;return r=>t.parser.optional(e,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}(0,kt.dr)(r)}function It(t,e){const n=function(t,e){if((0,s.cM)(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!(0,s.s7)(r);){if((0,s.IZ)(r)||(0,s.jp)(r)||(0,s.cY)(r)){i=r.elements.indexOf(n).toString()+":"+i}n=r,r=r.$container}return i=r.name+":"+i,t.ruleNames.set(e,i),i}}(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function Nt(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function Mt(t){const e=function(t){const e=t.Grammar,n=t.parser.Lexer,r=new mt(t);return At(e,r,n.definition)}(t);return e.finalize(),e}var Ot=n(1945),Pt=n(5033),$t=n(9850),Bt=n(2479);let Ft=0,zt=10;const Kt=Symbol("OperationCancelled");function qt(t){return t===Kt}async function Ut(t){if(t===$t.CancellationToken.None)return;const e=performance.now();if(e-Ft>=zt&&(Ft=e,await new Promise(t=>{"undefined"==typeof setImmediate?setTimeout(t,0):setImmediate(t)}),Ft=performance.now()),t.isCancellationRequested)throw Kt}class jt{constructor(){this.promise=new Promise((t,e)=>{this.resolve=e=>(t(e),this),this.reject=t=>(e(t),this)})}}class Yt{constructor(t,e,n,r){this._uri=t,this._languageId=e,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(e,n)}return this._content}update(t,e){for(const n of t)if(Yt.isIncremental(n)){const t=Xt(n.range),e=this.offsetAt(t.start),r=this.offsetAt(t.end);this._content=this._content.substring(0,e)+n.text+this._content.substring(r,this._content.length);const i=Math.max(t.start.line,0),a=Math.max(t.end.line,0);let s=this._lineOffsets;const o=Vt(n.text,!1,e);if(a-i===o.length)for(let n=0,c=o.length;n<c;n++)s[n+i+1]=o[n];else o.length<1e4?s.splice(i+1,a-i,...o):this._lineOffsets=s=s.slice(0,i+1).concat(o,s.slice(a+1));const l=n.text.length-(r-e);if(0!==l)for(let n=i+1+o.length,c=s.length;n<c;n++)s[n]=s[n]+l}else{if(!Yt.isFull(n))throw new Error("Unknown change event received");this._content=n.text,this._lineOffsets=void 0}this._version=e}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=Vt(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);const e=this.getLineOffsets();let n=0,r=e.length;if(0===r)return{line:0,character:t};for(;n<r;){const i=Math.floor((n+r)/2);e[i]>t?r=i:n=i+1}const i=n-1;return{line:i,character:(t=this.ensureBeforeEOL(t,e[i]))-e[i]}}offsetAt(t){const e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;const n=e[t.line];if(t.character<=0)return n;const r=t.line+1<e.length?e[t.line+1]:this._content.length,i=Math.min(n+t.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(t,e){for(;t>e&&Ht(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}var Gt;function Wt(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Wt(r,e),Wt(i,e);let a=0,s=0,o=0;for(;a<r.length&&s<i.length;){const n=e(r[a],i[s]);t[o++]=n<=0?r[a++]:i[s++]}for(;a<r.length;)t[o++]=r[a++];for(;s<i.length;)t[o++]=i[s++];return t}function Vt(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const e=t.charCodeAt(i);Ht(e)&&(13===e&&i+1<t.length&&10===t.charCodeAt(i+1)&&i++,r.push(n+i+1))}return r}function Ht(t){return 13===t||10===t}function Xt(t){const e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function Zt(t){const e=Xt(t.range);return e!==t.range?{newText:t.newText,range:e}:t}!function(t){t.create=function(t,e,n,r){return new Yt(t,e,n,r)},t.update=function(t,e,n){if(t instanceof Yt)return t.update(e,n),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")},t.applyEdits=function(t,e){const n=t.getText(),r=Wt(e.map(Zt),(t,e)=>{const n=t.range.start.line-e.range.start.line;return 0===n?t.range.start.character-e.range.start.character:n});let i=0;const a=[];for(const s of r){const e=t.offsetAt(s.range.start);if(e<i)throw new Error("Overlapping edit");e>i&&a.push(n.substring(i,e)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(n.substr(i)),a.join("")}}(Gt||(Gt={}));var Qt,Jt,te=n(7608);!function(t){t.basename=te.A.basename,t.dirname=te.A.dirname,t.extname=te.A.extname,t.joinPath=te.A.joinPath,t.resolvePath=te.A.resolvePath;const e="object"==typeof process&&"win32"===process?.platform;t.equals=function(t,e){return t?.toString()===e?.toString()},t.relative=function(t,n){const r="string"==typeof t?te.r.parse(t).path:t.path,i="string"==typeof n?te.r.parse(n).path:n.path,a=r.split("/").filter(t=>t.length>0),s=i.split("/").filter(t=>t.length>0);if(e){const t=/^[A-Z]:$/;if(a[0]&&t.test(a[0])&&(a[0]=a[0].toLowerCase()),s[0]&&t.test(s[0])&&(s[0]=s[0].toLowerCase()),a[0]!==s[0])return i.substring(1)}let o=0;for(;o<a.length&&a[o]===s[o];o++);return"../".repeat(a.length-o)+s.slice(o).join("/")},t.normalize=function(t){return te.r.parse(t.toString()).toString()},t.contains=function(t,e){let n="string"==typeof t?t:t.path,r="string"==typeof e?e:e.path;return"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),r===n||!(r.length<n.length)&&("/"===r.charAt(n.length)&&r.startsWith(n))}}(Qt||(Qt={}));class ee{constructor(){this.root={name:"",children:new Map}}normalizeUri(t){return Qt.normalize(t)}clear(){this.root.children.clear()}insert(t,e){this.getNode(this.normalizeUri(t),!0).element=e}delete(t){const e=this.getNode(this.normalizeUri(t),!1);e?.parent&&e.parent.children.delete(e.name)}has(t){return void 0!==this.getNode(this.normalizeUri(t),!1)?.element}hasNode(t){return void 0!==this.getNode(this.normalizeUri(t),!1)}find(t){return this.getNode(this.normalizeUri(t),!1)?.element}findNode(t){const e=this.normalizeUri(t),n=this.getNode(e,!1);if(n)return{name:n.name,uri:Qt.joinPath(te.r.parse(e),n.name).toString(),element:n.element}}findChildren(t){const e=this.normalizeUri(t),n=this.getNode(e,!1);return n?Array.from(n.children.values()).map(t=>({name:t.name,uri:Qt.joinPath(te.r.parse(e),t.name).toString(),element:t.element})):[]}all(){return this.collectValues(this.root)}findAll(t){const e=this.getNode(Qt.normalize(t),!1);return e?this.collectValues(e):[]}getNode(t,e){const n=t.split("/");"/"===t.charAt(t.length-1)&&n.pop();let r=this.root;for(const i of n){let t=r.children.get(i);if(!t){if(!e)return;t={name:i,children:new Map,parent:r},r.children.set(i,t)}r=t}return r}collectValues(t){const e=[];t.element&&e.push(t.element);for(const n of t.children.values())e.push(...this.collectValues(n));return e}}!function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"}(Jt||(Jt={}));class ne{constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=$t.CancellationToken.None){const n=await this.fileSystemProvider.readFile(t);return this.createAsync(t,n,e)}fromTextDocument(t,e,n){return e=e??te.r.parse(t.uri),$t.CancellationToken.is(n)?this.createAsync(e,t,n):this.create(e,t,n)}fromString(t,e,n){return $t.CancellationToken.is(n)?this.createAsync(e,t,n):this.create(e,t,n)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,n){if("string"==typeof e){const r=this.parse(t,e,n);return this.createLangiumDocument(r,t,void 0,e)}if("$model"in e){const n={value:e.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,t)}{const r=this.parse(t,e.getText(),n);return this.createLangiumDocument(r,t,e)}}async createAsync(t,e,n){if("string"==typeof e){const r=await this.parseAsync(t,e,n);return this.createLangiumDocument(r,t,void 0,e)}{const r=await this.parseAsync(t,e.getText(),n);return this.createLangiumDocument(r,t,e)}}createLangiumDocument(t,e,n,r){let i;if(n)i={parseResult:t,uri:e,state:Jt.Parsed,references:[],textDocument:n};else{const n=this.createTextDocumentGetter(e,r);i={parseResult:t,uri:e,state:Jt.Parsed,references:[],get textDocument(){return n()}}}return t.value.$document=i,i}async update(t,e){const n=t.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(t.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(t.uri);if(r)Object.defineProperty(t,"textDocument",{value:r});else{const e=this.createTextDocumentGetter(t.uri,i);Object.defineProperty(t,"textDocument",{get:e})}return n!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=Jt.Parsed,t}parse(t,e,n){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,n)}parseAsync(t,e,n){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,n)}createTextDocumentGetter(t,e){const n=this.serviceRegistry;let r;return()=>r??(r=Gt.create(t.toString(),n.getServices(t).LanguageMetaData.languageId,0,e??""))}}class re{constructor(t){this.documentTrie=new ee,this.services=t,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.documentBuilder=()=>t.workspace.DocumentBuilder}get all(){return(0,Et.Td)(this.documentTrie.all())}addDocument(t){const e=t.uri.toString();if(this.documentTrie.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentTrie.insert(e,t)}getDocument(t){const e=t.toString();return this.documentTrie.find(e)}getDocuments(t){const e=t.toString();return this.documentTrie.findAll(e)}async getOrCreateDocument(t,e){let n=this.getDocument(t);return n||(n=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(n),n)}createDocument(t,e,n){if(n)return this.langiumDocumentFactory.fromString(e,t,n).then(t=>(this.addDocument(t),t));{const n=this.langiumDocumentFactory.fromString(e,t);return this.addDocument(n),n}}hasDocument(t){return this.documentTrie.has(t.toString())}invalidateDocument(t){const e=t.toString(),n=this.documentTrie.find(e);return n&&this.documentBuilder().resetToState(n,Jt.Changed),n}deleteDocument(t){const e=t.toString(),n=this.documentTrie.find(e);return n&&(n.state=Jt.Changed,this.documentTrie.delete(e)),n}deleteDocuments(t){const e=t.toString(),n=this.documentTrie.findAll(e);for(const r of n)r.state=Jt.Changed;return this.documentTrie.delete(e),n}}const ie=Symbol("RefResolving");class ae{constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async link(t,e=$t.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,it.jm)(t.parseResult.value))await Ut(e),(0,it.DM)(r).forEach(e=>{const i=`${r.$type}:${e.property}`;n.startSubTask(i);try{this.doLink(e,t)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(const n of(0,it.jm)(t.parseResult.value))await Ut(e),(0,it.DM)(n).forEach(e=>this.doLink(e,t))}doLink(t,e){const n=t.reference;if("_ref"in n&&void 0===n._ref){n._ref=ie;try{const e=this.getCandidate(t);if((0,Bt.Zl)(e))n._ref=e;else{n._nodeDescription=e;const r=this.loadAstNode(e);n._ref=r??this.createLinkingError(t,e)}}catch(r){console.error(`An error occurred while resolving reference to '${n.$refText}':`,r);const e=r.message??String(r);n._ref={info:t,message:`An error occurred while resolving reference to '${n.$refText}': ${e}`}}e.references.push(n)}else if("_items"in n&&void 0===n._items){n._items=ie;try{const e=this.getCandidates(t),r=[];if((0,Bt.Zl)(e))n._linkingError=e;else for(const t of e){const e=this.loadAstNode(t);e&&r.push({ref:e,$nodeDescription:t})}n._items=r}catch(r){n._linkingError={info:t,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`},n._items=[]}e.references.push(n)}}unlink(t){for(const e of t.references)"_ref"in e?(e._ref=void 0,delete e._nodeDescription):"_items"in e&&(e._items=void 0,delete e._linkingError);t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}getCandidates(t){const e=this.scopeProvider.getScope(t).getElements(t.reference.$refText).distinct(t=>`${t.documentUri}#${t.path}`).toArray();return e.length>0?e:this.createLinkingError(t)}buildReference(t,e,n,r){const i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if((0,Bt.ng)(this._ref))return this._ref;if((0,Bt.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:t,property:e},this._nodeDescription)}else if(void 0===this._ref){this._ref=ie;const n=(0,it.cQ)(t).$document,r=i.getLinkedNode({reference:a,container:t,property:e});if(r.error&&n&&n.state<Jt.ComputedScopes)return this._ref=void 0;this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===ie&&i.throwCyclicReferenceError(t,e,r);return(0,Bt.ng)(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return(0,Bt.Zl)(this._ref)?this._ref:void 0}};return a}buildMultiReference(t,e,n,r){const i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=ie;const n=(0,it.cQ)(t).$document,r=i.getCandidates({reference:a,container:t,property:e}),s=[];if((0,Bt.Zl)(r))this._linkingError=r;else for(const t of r){const e=i.loadAstNode(t);e&&s.push({ref:e,$nodeDescription:t})}this._items=s,n?.references.push(this)}else this._items===ie&&i.throwCyclicReferenceError(t,e,r);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;return this.items.length>0?void 0:this._linkingError=i.createLinkingError({reference:a,container:t,property:e})}};return a}throwCyclicReferenceError(t,e,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(t)}/${e} (symbol '${n}')`)}getLinkedNode(t){try{const e=this.getCandidate(t);if((0,Bt.Zl)(e))return{error:e};const n=this.loadAstNode(e);return n?{node:n,descr:e}:{descr:e,error:this.createLinkingError(t,e)}}catch(e){console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,e);const n=e.message??String(e);return{error:{info:t,message:`An error occurred while resolving reference to '${t.reference.$refText}': ${n}`}}}}loadAstNode(t){if(t.node)return t.node;const e=this.langiumDocuments().getDocument(t.documentUri);return e?this.astNodeLocator.getAstNode(e.parseResult.value,t.path):void 0}createLinkingError(t,e){const n=(0,it.cQ)(t.container).$document;n&&n.state<Jt.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);return{info:t,message:`Could not resolve reference to ${this.reflection.getReferenceType(t)} named '${t.reference.$refText}'.`,targetDescription:e}}}class se{getName(t){if(function(t){return"string"==typeof t.name}(t))return t.name}getNameNode(t){return(0,i.qO)(t.$cstNode,"name")}}class oe{constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator,this.documents=t.shared.workspace.LangiumDocuments,this.hasMultiReference=(0,it.jm)(t.Grammar).some(t=>(0,s._c)(t)&&t.isMulti)}findDeclarations(t){if(t){const e=(0,i.Rp)(t),n=t.astNode;if(e&&n){const r=n[e.feature];if((0,Bt.A_)(r)||(0,Bt.Dm)(r))return(0,it.tC)(r);if(Array.isArray(r))for(const e of r)if(((0,Bt.A_)(e)||(0,Bt.Dm)(e))&&e.$refNode&&e.$refNode.offset<=t.offset&&e.$refNode.end>=t.end)return(0,it.tC)(e)}if(n){const e=this.nameProvider.getNameNode(n);if(e&&(e===t||(0,r.pO)(t,e)))return this.getSelfNodes(n)}}return[]}getSelfNodes(t){if(this.hasMultiReference){const e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t)),n=this.getNodeFromReferenceDescription(e.head());if(n)for(const r of(0,it.DM)(n))if((0,Bt.Dm)(r.reference)&&r.reference.items.some(e=>e.ref===t))return r.reference.items.map(t=>t.ref);return[t]}return[t]}getNodeFromReferenceDescription(t){if(!t)return;const e=this.documents.getDocument(t.sourceUri);return e?this.nodeLocator.getAstNode(e.parseResult.value,t.sourcePath):void 0}findDeclarationNodes(t){const e=this.findDeclarations(t),n=[];for(const r of e){const t=this.nameProvider.getNameNode(r)??r.$cstNode;t&&n.push(t)}return n}findReferences(t,e){const n=[];e.includeDeclaration&&n.push(...this.getSelfReferences(t));let r=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(r=r.filter(t=>Qt.equals(t.sourceUri,e.documentUri))),n.push(...r),(0,Et.Td)(n)}getSelfReferences(t){const e=this.getSelfNodes(t),n=[];for(const i of e){const t=this.nameProvider.getNameNode(i);if(t){const e=(0,it.YE)(i),a=this.nodeLocator.getAstNodePath(i);n.push({sourceUri:e.uri,sourcePath:a,targetUri:e.uri,targetPath:a,segment:(0,r.SX)(t),local:!0})}}return n}}class le{constructor(t){if(this.map=new Map,t)for(const[e,n]of t)this.add(e,n)}get size(){return Et.iD.sum((0,Et.Td)(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){if(void 0===e)return this.map.delete(t);{const n=this.map.get(t);if(n){const r=n.indexOf(e);if(r>=0)return 1===n.length?this.map.delete(t):n.splice(r,1),!0}return!1}}get(t){return this.map.get(t)??[]}getStream(t){const e=this.map.get(t);return e?(0,Et.Td)(e):Et.B5}has(t,e){if(void 0===e)return this.map.has(t);{const n=this.map.get(t);return!!n&&n.indexOf(e)>=0}}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(t){this.map.forEach((e,n)=>e.forEach(e=>t(e,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,Et.Td)(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return(0,Et.Td)(this.map.keys())}values(){return(0,Et.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,Et.Td)(this.map.entries())}}class ce{get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(const[e,n]of t)this.set(e,n)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}class he{constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(t,e=$t.CancellationToken.None){return this.collectExportedSymbolsForNode(t.parseResult.value,t,void 0,e)}async collectExportedSymbolsForNode(t,e,n=it.VN,r=$t.CancellationToken.None){const i=[];this.addExportedSymbol(t,i,e);for(const a of n(t))await Ut(r),this.addExportedSymbol(a,i,e);return i}addExportedSymbol(t,e,n){const r=this.nameProvider.getName(t);r&&e.push(this.descriptions.createDescription(t,r,n))}async collectLocalSymbols(t,e=$t.CancellationToken.None){const n=t.parseResult.value,r=new le;for(const i of(0,it.Uo)(n))await Ut(e),this.addLocalSymbol(i,t,r);return r}addLocalSymbol(t,e,n){const r=t.$container;if(r){const i=this.nameProvider.getName(t);i&&n.add(r,this.descriptions.createDescription(t,i,e))}}}class ue{constructor(t,e,n){this.elements=t,this.outerScope=e,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,n=this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e):this.elements.find(e=>e.name===t);return n||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,n=this.caseInsensitive?this.elements.filter(t=>t.name.toLowerCase()===e):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(t)):n}}class de{constructor(t,e,n){this.elements=new le,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(const r of t){const t=this.caseInsensitive?r.name.toLowerCase():r.name;this.elements.add(t,r)}this.outerScope=e}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,n=this.elements.get(e)[0];return n||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,n=this.elements.get(e);return(this.concatOuterScope||0===n.length)&&this.outerScope?(0,Et.Td)(n).concat(this.outerScope.getElements(t)):(0,Et.Td)(n)}getAllElements(){let t=(0,Et.Td)(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}}class pe{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class fe extends pe{constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(e){const n=e();return this.cache.set(t,n),n}}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}}class ge extends pe{constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,n){this.throwIfDisposed(),this.cacheForContext(t).set(e,n)}get(t,e,n){this.throwIfDisposed();const r=this.cacheForContext(t);if(r.has(e))return r.get(e);if(n){const t=n();return r.set(e,t),t}}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){if(this.throwIfDisposed(),t){const e=this.converter(t);this.cache.delete(e)}else this.cache.clear()}cacheForContext(t){const e=this.converter(t);let n=this.cache.get(e);return n||(n=new Map,this.cache.set(e,n)),n}}class me extends fe{constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{e.length>0&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class ye{constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new me(t.shared)}getScope(t){const e=[],n=this.reflection.getReferenceType(t),r=(0,it.YE)(t.container).localSymbols;if(r){let i=t.container;do{r.has(i)&&e.push(r.getStream(i).filter(t=>this.reflection.isSubtype(t.type,n))),i=i.$container}while(i)}let i=this.getGlobalScope(n,t);for(let a=e.length-1;a>=0;a--)i=this.createScope(e[a],i);return i}createScope(t,e,n){return new ue((0,Et.Td)(t),e,n)}createScopeForNodes(t,e,n){const r=(0,Et.Td)(t).map(t=>{const e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable();return new ue(r,e,n)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new de(this.indexManager.allElements(t)))}}function ve(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}class xe{constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){const n=e??{},r=e?.replacer,i=(t,e)=>this.replacer(t,e,n),a=r?(t,e)=>r(t,e,i):i;try{return this.currentDocument=(0,it.YE)(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){const n=e??{},r=JSON.parse(t);return this.linkNode(r,r,n),r}replacer(t,e,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(t)){if((0,Bt.A_)(e)){const t=e.ref,r=n?e.$refText:void 0;if(t){const e=(0,it.YE)(t);let n="";this.currentDocument&&this.currentDocument!==e&&(n=s?s(e.uri,t):e.uri.toString());return{$ref:`${n}#${this.astNodeLocator.getAstNodePath(t)}`,$refText:r}}return{$error:e.error?.message??"Could not resolve reference",$refText:r}}if((0,Bt.Dm)(e)){const t=n?e.$refText:void 0,r=[];for(const n of e.items){const t=n.ref,e=(0,it.YE)(n.ref);let i="";this.currentDocument&&this.currentDocument!==e&&(i=s?s(e.uri,t):e.uri.toString());const a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:t}}if((0,Bt.ng)(e)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...e}),t&&!e.$document||!n?.$textRegion||(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!t&&(n??(n={...e}),n.$sourceText=e.$cstNode?.text),a){n??(n={...e});const t=this.commentProvider.getComment(e);t&&(n.$comment=t.replace(/\r/g,""))}return n??e}return e}}addAstNodeRegionWithAssignmentsTo(t){const e=t=>({offset:t.offset,end:t.end,length:t.length,range:t.range});if(t.$cstNode){const n=(t.$textRegion=e(t.$cstNode)).assignments={};return Object.keys(t).filter(t=>!t.startsWith("$")).forEach(r=>{const a=(0,i.Bd)(t.$cstNode,r).map(e);0!==a.length&&(n[r]=a)}),t}}linkNode(t,e,n,r,i,a){for(const[o,l]of Object.entries(t))if(Array.isArray(l))for(let r=0;r<l.length;r++){const i=l[r];ve(i)?l[r]=this.reviveReference(t,o,e,i,n):(0,Bt.ng)(i)&&this.linkNode(i,e,n,t,o,r)}else ve(l)?t[o]=this.reviveReference(t,o,e,l,n):(0,Bt.ng)(l)&&this.linkNode(l,e,n,t,o);const s=t;s.$container=r,s.$containerProperty=i,s.$containerIndex=a}reviveReference(t,e,n,r,i){let a,s=r.$refText,o=r.$error;if(r.$ref){const t=this.getRefNode(n,r.$ref,i.uriConverter);if((0,Bt.ng)(t))return s||(s=this.nameProvider.getName(t)),{$refText:s??"",ref:t};o=t}else if(r.$refs){const t=[];for(const e of r.$refs){const r=this.getRefNode(n,e,i.uriConverter);(0,Bt.ng)(r)&&t.push({ref:r})}if(0!==t.length)return{$refText:s??"",items:t};a={$refText:s??"",items:t},o??(o="Could not resolve multi-reference")}return o?(a??(a={$refText:s??"",ref:void 0}),a.error={info:{container:t,property:e,reference:a},message:o},a):void 0}getRefNode(t,e,n){try{const r=e.indexOf("#");if(0===r){const n=this.astNodeLocator.getAstNode(t,e.substring(1));return n||"Could not resolve path: "+e}if(r<0){const t=n?n(e):te.r.parse(e),r=this.langiumDocuments.getDocument(t);return r?r.parseResult.value:"Could not find document for URI: "+e}const i=n?n(e.substring(0,r)):te.r.parse(e.substring(0,r)),a=this.langiumDocuments.getDocument(i);if(!a)return"Could not find document for URI: "+e;if(r===e.length-1)return a.parseResult.value;const s=this.astNodeLocator.getAstNode(a.parseResult.value,e.substring(r+1));return s||"Could not resolve URI: "+e}catch(r){return String(r)}}}class be{get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){const e=t.LanguageMetaData;for(const n of e.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${e.languageId}'.`),this.fileExtensionMap.set(n,t);if(e.fileNames)for(const n of e.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${e.languageId}'.`),this.fileNameMap.set(n,t);this.languageIdMap.set(e.languageId,t)}getServices(t){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const e=this.textDocuments?.get(t)?.languageId;if(void 0!==e){const t=this.languageIdMap.get(e);if(t)return t}const n=Qt.extname(t),r=Qt.basename(t),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw e?new Error(`The service registry contains no services for the extension '${n}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return i}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}function we(t){return{code:t}}var Te;!function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults}(Te||(Te={}));class ke{constructor(t){this.entries=new le,this.knownCategories=new Set(Te.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,n="fast"){if("built-in"===n)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[r,i]of Object.entries(t)){const t=i;if(Array.isArray(t))for(const i of t){const t={check:this.wrapValidationException(i,e),category:n};this.addEntry(r,t)}else if("function"==typeof t){const i={check:this.wrapValidationException(t,e),category:n};this.addEntry(r,i)}else(0,kt.dr)(t)}}wrapValidationException(t,e){return async(n,r,i)=>{await this.handleException(()=>t.call(e,n,r,i),"An error occurred during validation",r,n)}}async handleException(t,e,n,r){try{await t()}catch(i){if(qt(i))throw i;console.error(`${e}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);n("error",`${e}: ${i instanceof Error?i.message:String(i)}`,{node:r})}}addEntry(t,e){if("AstNode"!==t)for(const n of this.reflection.getAllSubTypes(t))this.entries.add(n,e);else this.entries.add("AstNode",e)}getChecks(t,e){let n=(0,Et.Td)(this.entries.get(t)).concat(this.entries.get("AstNode"));return e&&(n=n.filter(t=>e.includes(t.category))),n.map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(t,e,n){return async(r,i,a,s)=>{await this.handleException(()=>t.call(n,r,i,a,s),e,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(t){return this.knownCategories}}const Ee=Object.freeze({validateNode:!0,validateChildren:!0});class Ae{constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async validateDocument(t,e={},n=$t.CancellationToken.None){const r=t.parseResult,i=[];if(await Ut(n),!e.categories||e.categories.includes("built-in")){if(this.processLexingErrors(r,i,e),e.stopAfterLexingErrors&&i.some(t=>t.data?.code===Re.LexingError))return i;if(this.processParsingErrors(r,i,e),e.stopAfterParsingErrors&&i.some(t=>t.data?.code===Re.ParsingError))return i;if(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>t.data?.code===Re.LinkingError))return i}try{i.push(...await this.validateAst(r.value,e,n))}catch(a){if(qt(a))throw a;console.error("An error occurred during validation:",a)}return await Ut(n),i}processLexingErrors(t,e,n){const r=[...t.lexerErrors,...t.lexerReport?.diagnostics??[]];for(const i of r){const t=i.severity??"error",n={severity:Ce(t),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Se(t),source:this.getSource()};e.push(n)}}processParsingErrors(t,e,n){for(const i of t.parserErrors){let t;if(isNaN(i.token.startOffset)){if("previousToken"in i){const e=i.previousToken;if(isNaN(e.startOffset)){const e={line:0,character:0};t={start:e,end:e}}else{const n={line:e.endLine-1,character:e.endColumn};t={start:n,end:n}}}}else t=(0,r.wf)(i.token);if(t){const n={severity:Ce("error"),range:t,message:i.message,data:we(Re.ParsingError),source:this.getSource()};e.push(n)}}}processLinkingErrors(t,e,n){for(const r of t.references){const t=r.error;if(t){const n={node:t.info.container,range:r.$refNode?.range,property:t.info.property,index:t.info.index,data:{code:Re.LinkingError,containerType:t.info.container.$type,property:t.info.property,refText:t.info.reference.$refText}};e.push(this.toDiagnostic("error",t.message,n))}}}async validateAst(t,e,n=$t.CancellationToken.None){const r=[],i=(t,e,n)=>{r.push(this.toDiagnostic(t,e,n))};return await this.validateAstBefore(t,e,i,n),await this.validateAstNodes(t,e,i,n),await this.validateAstAfter(t,e,i,n),r}async validateAstBefore(t,e,n,r=$t.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const a of i)await Ut(r),await a(t,n,e.categories??[],r)}async validateAstNodes(t,e,n,r=$t.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const a=(0,it.jm)(t).iterator();for(const t of a){i.startSubTask(t.$type);const s=this.validateSingleNodeOptions(t,e);if(s.validateNode)try{const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,n,r)}finally{i.stopSubTask(t.$type)}s.validateChildren||a.prune()}}finally{i.stop()}}else{const i=(0,it.jm)(t).iterator();for(const t of i){await Ut(r);const a=this.validateSingleNodeOptions(t,e);if(a.validateNode){const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(t,e){return Ee}async validateAstAfter(t,e,n,r=$t.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const a of i)await Ut(r),await a(t,n,e.categories??[],r)}toDiagnostic(t,e,n){return{message:e,range:_e(n),severity:Ce(t),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function _e(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=(0,i.qO)(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=(0,i.SS)(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Ce(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Se(t){switch(t){case"error":return we(Re.LexingError);case"warning":return we(Re.LexingWarning);case"info":return we(Re.LexingInfo);case"hint":return we(Re.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Re;!function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}(Re||(Re={}));class Le{constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,e,n){const i=n??(0,it.YE)(t);e??(e=this.nameProvider.getName(t));const a=this.astNodeLocator.getAstNodePath(t);if(!e)throw new Error(`Node at path ${a} has no name.`);let s;const o=()=>s??(s=(0,r.SX)(this.nameProvider.getNameNode(t)??t.$cstNode));return{node:t,name:e,get nameSegment(){return o()},selectionSegment:(0,r.SX)(t.$cstNode),type:t.$type,documentUri:i.uri,path:a}}}class De{constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=$t.CancellationToken.None){const n=[],r=t.parseResult.value;for(const i of(0,it.jm)(r))await Ut(e),(0,it.DM)(i).forEach(t=>{t.reference.error||n.push(...this.createInfoDescriptions(t))});return n}createInfoDescriptions(t){const e=t.reference;if(e.error||!e.$refNode)return[];let n=[];(0,Bt.A_)(e)&&e.$nodeDescription?n=[e.$nodeDescription]:(0,Bt.Dm)(e)&&(n=e.items.map(t=>t.$nodeDescription).filter(t=>void 0!==t));const i=(0,it.YE)(t.container).uri,a=this.nodeLocator.getAstNodePath(t.container),s=[],o=(0,r.SX)(e.$refNode);for(const r of n)s.push({sourceUri:i,sourcePath:a,targetUri:r.documentUri,targetPath:r.path,segment:o,local:Qt.equals(r.documentUri,i)});return s}}class Ie{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){const e=this.getAstNodePath(t.$container),n=this.getPathSegment(t);return e+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==e?t+this.indexSeparator+e:t}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{if(!t||0===e.length)return t;const n=e.indexOf(this.indexSeparator);if(n>0){const r=e.substring(0,n),i=parseInt(e.substring(n+1)),a=t[r];return a?.[i]}return t[e]},t)}}var Ne=n(2676);class Me{constructor(t){this._ready=new jt,this.onConfigurationSectionUpdateEmitter=new Ne.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=t.capabilities.workspace?.configuration??!1}async initialized(t){if(this.workspaceConfig){if(t.register){const e=this.serviceRegistry.all;t.register({section:e.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})}if(t.fetchConfiguration){const e=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),n=await t.fetchConfiguration(e);e.forEach((t,e)=>{this.updateSectionConfiguration(t.section,n[e])})}}this._ready.resolve()}updateConfiguration(t){"object"==typeof t.settings&&null!==t.settings&&Object.entries(t.settings).forEach(([t,e])=>{this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){await this.ready;const n=this.toSectionName(t);if(this.settings[n])return this.settings[n][e]}toSectionName(t){return`${t}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var Oe,Pe=n(4512);!function(t){t.create=function(t){return{dispose:async()=>await t()}}}(Oe||(Oe={}));class $e{constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new le,this.documentPhaseListeners=new le,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Jt.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.fileSystemProvider=t.workspace.FileSystemProvider,this.workspaceManager=()=>t.workspace.WorkspaceManager,this.serviceRegistry=t.ServiceRegistry}async build(t,e={},n=$t.CancellationToken.None){for(const r of t){const t=r.uri.toString();if(r.state===Jt.Validated){if("boolean"==typeof e.validation&&e.validation)this.resetToState(r,Jt.IndexedReferences);else if("object"==typeof e.validation){const n=this.findMissingValidationCategories(r,e);n.length>0&&(this.buildState.set(t,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(t)?.result}),r.state=Jt.IndexedReferences)}}else this.buildState.delete(t)}this.currentState=Jt.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,e,n)}async update(t,e,n=$t.CancellationToken.None){this.currentState=Jt.Changed;const r=[];for(const o of e){const t=this.langiumDocuments.deleteDocuments(o);for(const e of t)r.push(e.uri),this.cleanUpDeleted(e)}const i=(await Promise.all(t.map(t=>this.findChangedUris(t)))).flat();for(const o of i){let t=this.langiumDocuments.getDocument(o);void 0===t&&(t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),t.state=Jt.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Jt.Changed)}const a=(0,Et.Td)(i).concat(r).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!a.has(t.uri.toString())&&this.shouldRelink(t,a)).forEach(t=>this.resetToState(t,Jt.ComputedScopes)),await this.emitUpdate(i,r),await Ut(n);const s=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.state<Jt.Validated||!this.buildState.get(t.uri.toString())?.completed||this.resultsAreIncomplete(t,this.updateBuildOptions)).toArray());await this.buildDocuments(s,this.updateBuildOptions,n)}resultsAreIncomplete(t,e){return this.findMissingValidationCategories(t,e).length>=1}findMissingValidationCategories(t,e){const n=this.buildState.get(t.uri.toString()),r=this.serviceRegistry.getServices(t.uri).validation.ValidationRegistry.getAllValidationCategories(t),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set,a=void 0===e||!0===e.validation?r:"object"==typeof e.validation?e.validation.categories??r:[];return(0,Et.Td)(a).filter(t=>!i.has(t)).toArray()}async findChangedUris(t){if(this.langiumDocuments.getDocument(t)??this.textDocuments?.get(t))return[t];try{const e=await this.fileSystemProvider.stat(t);if(e.isDirectory){return await this.workspaceManager().searchFolder(t)}if(this.workspaceManager().shouldIncludeEntry(e))return[t]}catch{}return[]}async emitUpdate(t,e){await Promise.all(this.updateListeners.map(n=>n(t,e)))}sortDocuments(t){let e=0,n=t.length-1;for(;e<n;){for(;e<t.length&&this.hasTextDocument(t[e]);)e++;for(;n>=0&&!this.hasTextDocument(t[n]);)n--;e<n&&([t[e],t[n]]=[t[n],t[e]])}return t}hasTextDocument(t){return Boolean(this.textDocuments?.get(t.uri))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(t){return this.updateListeners.push(t),Oe.create(()=>{const e=this.updateListeners.indexOf(t);e>=0&&this.updateListeners.splice(e,1)})}resetToState(t,e){switch(e){case Jt.Changed:case Jt.Parsed:this.indexManager.removeContent(t.uri);case Jt.IndexedContent:t.localSymbols=void 0;case Jt.ComputedScopes:this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t);case Jt.Linked:this.indexManager.removeReferences(t.uri);case Jt.IndexedReferences:t.diagnostics=void 0,this.buildState.delete(t.uri.toString());case Jt.Validated:}t.state>e&&(t.state=e)}cleanUpDeleted(t){this.buildState.delete(t.uri.toString()),this.indexManager.remove(t.uri),t.state=Jt.Changed}async buildDocuments(t,e,n){this.prepareBuild(t,e),await this.runCancelable(t,Jt.Parsed,n,t=>this.langiumDocumentFactory.update(t,n)),await this.runCancelable(t,Jt.IndexedContent,n,t=>this.indexManager.updateContent(t,n)),await this.runCancelable(t,Jt.ComputedScopes,n,async t=>{const e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.localSymbols=await e.collectLocalSymbols(t,n)});const r=t.filter(t=>this.shouldLink(t));await this.runCancelable(r,Jt.Linked,n,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,n)),await this.runCancelable(r,Jt.IndexedReferences,n,t=>this.indexManager.updateReferences(t,n));const i=t.filter(t=>!!this.shouldValidate(t)||(this.markAsCompleted(t),!1));await this.runCancelable(i,Jt.Validated,n,async t=>{await this.validate(t,n),this.markAsCompleted(t)})}markAsCompleted(t){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}prepareBuild(t,e){for(const n of t){const t=n.uri.toString(),r=this.buildState.get(t);r&&!r.completed||this.buildState.set(t,{completed:!1,options:e,result:r?.result})}}async runCancelable(t,e,n,r){for(const a of t)a.state<e&&(await Ut(n),await r(a),a.state=e,await this.notifyDocumentPhase(a,e,n));const i=t.filter(t=>t.state===e);await this.notifyBuildPhase(i,e,n),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Oe.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Oe.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(t,e,n){let r;return e&&"path"in e?r=e:n=e,n??(n=$t.CancellationToken.None),r?this.awaitDocumentState(t,r,n):this.awaitBuilderState(t,n)}awaitDocumentState(t,e,n){const r=this.langiumDocuments.getDocument(e);return r?r.state>=t?Promise.resolve(e):n.isCancellationRequested?Promise.reject(Kt):this.currentState>=t&&t>r.state?Promise.reject(new Pe.ResponseError(Pe.LSPErrorCodes.RequestFailed,`Document state of ${e.toString()} is ${Jt[r.state]}, requiring ${Jt[t]}, but workspace state is already ${Jt[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{const a=this.onDocumentPhase(t,t=>{Qt.equals(t.uri,e)&&(a.dispose(),s.dispose(),r(t.uri))}),s=n.onCancellationRequested(()=>{a.dispose(),s.dispose(),i(Kt)})}):Promise.reject(new Pe.ResponseError(Pe.LSPErrorCodes.ServerCancelled,`No document found for URI: ${e.toString()}`))}awaitBuilderState(t,e){return this.currentState>=t?Promise.resolve():e.isCancellationRequested?Promise.reject(Kt):new Promise((n,r)=>{const i=this.onBuildPhase(t,()=>{i.dispose(),a.dispose(),n()}),a=e.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Kt)})})}async notifyDocumentPhase(t,e,n){const r=this.documentPhaseListeners.get(e).slice();for(const a of r)try{await Ut(n),await a(t,n)}catch(i){if(!qt(i))throw i}}async notifyBuildPhase(t,e,n){if(0===t.length)return;const r=this.buildPhaseListeners.get(e).slice();for(const i of r)await Ut(n),await i(t,n)}shouldLink(t){return this.getBuildOptions(t).eagerLinking??!0}shouldValidate(t){return Boolean(this.getBuildOptions(t).validation)}async validate(t,e){const n=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,r=this.getBuildOptions(t),i="object"==typeof r.validation?{...r.validation}:{};i.categories=this.findMissingValidationCategories(t,r);const a=await n.validateDocument(t,i,e);t.diagnostics?t.diagnostics.push(...a):t.diagnostics=a;const s=this.buildState.get(t.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=(0,Et.Td)(s.result.validationChecks).concat(i.categories).distinct().toArray():s.result.validationChecks=[...i.categories])}getBuildOptions(t){return this.buildState.get(t.uri.toString())?.options??{}}}class Be{constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new ge,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){const n=(0,it.YE)(t).uri,r=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Qt.equals(t.targetUri,n)&&t.targetPath===e&&r.push(t)})}),(0,Et.Td)(r)}allElements(t,e){let n=(0,Et.Td)(this.symbolIndex.keys());return e&&(n=n.filter(t=>!e||e.has(t))),n.map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,e){if(!e)return this.symbolIndex.get(t)??[];return this.symbolByTypeIndex.get(t,e,()=>(this.symbolIndex.get(t)??[]).filter(t=>this.astReflection.isSubtype(t.type,e)))}remove(t){this.removeContent(t),this.removeReferences(t)}removeContent(t){const e=t.toString();this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(t){const e=t.toString();this.referenceIndex.delete(e)}async updateContent(t,e=$t.CancellationToken.None){const n=this.serviceRegistry.getServices(t.uri),r=await n.references.ScopeComputation.collectExportedSymbols(t,e),i=t.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(t,e=$t.CancellationToken.None){const n=this.serviceRegistry.getServices(t.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(t,e);this.referenceIndex.set(t.uri.toString(),r)}isAffected(t,e){const n=this.referenceIndex.get(t.uri.toString());return!!n&&n.some(t=>!t.local&&e.has(t.targetUri.toString()))}}class Fe{constructor(t){this.initialBuildOptions={},this._ready=new jt,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=t.workspaceFolders??void 0}initialized(t){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(t,e=$t.CancellationToken.None){const n=await this.performStartup(t);await Ut(e),await this.documentBuilder.build(n,this.initialBuildOptions,e)}async performStartup(t){const e=[],n=t=>{e.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)};await this.loadAdditionalDocuments(t,n);const r=[];await Promise.all(t.map(t=>this.getRootFolder(t)).map(async t=>this.traverseFolder(t,r)));const i=(0,Et.Td)(r).distinct(t=>t.toString()).filter(t=>!this.langiumDocuments.hasDocument(t));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),e}async loadWorkspaceDocuments(t,e){await Promise.all(t.map(async t=>{const n=await this.langiumDocuments.getOrCreateDocument(t);e(n)}))}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return te.r.parse(t.uri)}async traverseFolder(t,e){try{const n=await this.fileSystemProvider.readDirectory(t);await Promise.all(n.map(async t=>{this.shouldIncludeEntry(t)&&(t.isDirectory?await this.traverseFolder(t.uri,e):t.isFile&&e.push(t.uri))}))}catch(n){console.error("Failure to read directory content of "+t.toString(!0),n)}}async searchFolder(t){const e=[];return await this.traverseFolder(t,e),e}shouldIncludeEntry(t){const e=Qt.basename(t.uri);return!e.startsWith(".")&&(t.isDirectory?"node_modules"!==e&&"out"!==e:!!t.isFile&&this.serviceRegistry.hasServices(t.uri))}}class ze{buildUnexpectedCharactersMessage(t,e,n,r,i){return o.PW.buildUnexpectedCharactersMessage(t,e,n,r,i)}buildUnableToPopLexerModeMessage(t){return o.PW.buildUnableToPopLexerModeMessage(t)}}const Ke={mode:"full"};class qe{constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;const e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(e);const n=je(e)?Object.values(e):e,r="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new o.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=Ke){const n=this.chevrotainLexer.tokenize(t);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(t)}}toTokenTypeDictionary(t){if(je(t))return t;const e=Ue(t)?Object.values(t.modes).flat():t,n={};return e.forEach(t=>n[t.name]=t),n}}function Ue(t){return t&&"modes"in t&&"defaultMode"in t}function je(t){return!function(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}(t)&&!Ue(t)}function Ye(t,e,n){let r,i;"string"==typeof t?(i=e,r=n):(i=t.range.start,r=e),i||(i=at.Position.create(0,0));const a=function(t){const e=[];let n=t.position.line,r=t.position.character;for(let i=0;i<t.lines.length;i++){const a=0===i,s=i===t.lines.length-1;let o=t.lines[i],l=0;if(a&&t.options.start){const e=t.options.start?.exec(o);e&&(l=e.index+e[0].length)}else{const e=t.options.line?.exec(o);e&&(l=e.index+e[0].length)}if(s){const e=t.options.end?.exec(o);e&&(o=o.substring(0,e.index))}o=o.substring(0,Je(o));if(Qe(o,l)>=o.length){if(e.length>0){const t=at.Position.create(n,r);e.push({type:"break",content:"",range:at.Range.create(t,t)})}}else{We.lastIndex=l;const t=We.exec(o);if(t){const i=t[0],a=t[1],s=at.Position.create(n,r+l),c=at.Position.create(n,r+l+i.length);e.push({type:"tag",content:a,range:at.Range.create(s,c)}),l+=i.length,l=Qe(o,l)}if(l<o.length){const t=o.substring(l),i=Array.from(t.matchAll(Ve));e.push(...He(i,t,n,r+l))}}n++,r=0}if(e.length>0&&"break"===e[e.length-1].type)return e.slice(0,-1);return e}({lines:Ge(t),position:i,options:sn(r)});return function(t){const e=at.Position.create(t.position.line,t.position.character);if(0===t.tokens.length)return new ln([],at.Range.create(e,e));const n=[];for(;t.index<t.tokens.length;){const e=tn(t,n[n.length-1]);e&&n.push(e)}const r=n[0]?.range.start??e,i=n[n.length-1]?.range.end??e;return new ln(n,at.Range.create(r,i))}({index:0,tokens:a,position:i})}function Ge(t){let e="";e="string"==typeof t?t:t.text;return e.split(a.TH)}const We=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Ve=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function He(t,e,n,r){const i=[];if(0===t.length){const t=at.Position.create(n,r),a=at.Position.create(n,r+e.length);i.push({type:"text",content:e,range:at.Range.create(t,a)})}else{let a=0;for(const o of t){const t=o.index,s=e.substring(a,t);s.length>0&&i.push({type:"text",content:e.substring(a,t),range:at.Range.create(at.Position.create(n,a+r),at.Position.create(n,t+r))});let l=s.length+1;const c=o[1];if(i.push({type:"inline-tag",content:c,range:at.Range.create(at.Position.create(n,a+l+r),at.Position.create(n,a+l+c.length+r))}),l+=c.length,4===o.length){l+=o[2].length;const t=o[3];i.push({type:"text",content:t,range:at.Range.create(at.Position.create(n,a+l+r),at.Position.create(n,a+l+t.length+r))})}else i.push({type:"text",content:"",range:at.Range.create(at.Position.create(n,a+l+r),at.Position.create(n,a+l+r))});a=t+o[0].length}const s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:at.Range.create(at.Position.create(n,a+r),at.Position.create(n,a+r+s.length))})}return i}const Xe=/\S/,Ze=/\s*$/;function Qe(t,e){const n=t.substring(e).match(Xe);return n?e+n.index:t.length}function Je(t){const e=t.match(Ze);if(e&&"number"==typeof e.index)return e.index}function tn(t,e){const n=t.tokens[t.index];return"tag"===n.type?rn(t,!1):"text"===n.type||"inline-tag"===n.type?en(t):(function(t,e){if(e){const n=new un("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}(n,e),void t.index++)}function en(t){let e=t.tokens[t.index];const n=e;let r=e;const i=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)i.push(nn(t)),r=e,e=t.tokens[t.index];return new hn(i,at.Range.create(n.range.start,r.range.end))}function nn(t){return"inline-tag"===t.tokens[t.index].type?rn(t,!0):an(t)}function rn(t,e){const n=t.tokens[t.index++],r=n.content.substring(1),i=t.tokens[t.index];if("text"===i?.type){if(e){const i=an(t);return new cn(r,new hn([i],i.range),e,at.Range.create(n.range.start,i.range.end))}{const i=en(t);return new cn(r,i,e,at.Range.create(n.range.start,i.range.end))}}{const t=n.range;return new cn(r,new hn([],t),e,t)}}function an(t){const e=t.tokens[t.index++];return new un(e.content,e.range)}function sn(t){if(!t)return sn({start:"/**",end:"*/",line:"*"});const{start:e,end:n,line:r}=t;return{start:on(e,!0),end:on(n,!1),line:on(r,!0)}}function on(t,e){if("string"==typeof t||"object"==typeof t){const n="string"==typeof t?(0,a.Nt)(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return t}class ln{constructor(t,e){this.elements=t,this.range=e}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(const e of this.elements)if(0===t.length)t=e.toString();else{const n=e.toString();t+=dn(t)+n}return t.trim()}toMarkdown(t){let e="";for(const n of this.elements)if(0===e.length)e=n.toMarkdown(t);else{const r=n.toMarkdown(t);e+=dn(e)+r}return e.trim()}}class cn{constructor(t,e,n,r){this.name=t,this.content=e,this.inline=n,this.range=r}toString(){let t=`@${this.name}`;const e=this.content.toString();return 1===this.content.inlines.length?t=`${t} ${e}`:this.content.inlines.length>1&&(t=`${t}\n${e}`),this.inline?`{${t}}`:t}toMarkdown(t){return t?.renderTag?.(this)??this.toMarkdownDefault(t)}toMarkdownDefault(t){const e=this.content.toMarkdown(t);if(this.inline){const n=function(t,e,n){if("linkplain"===t||"linkcode"===t||"link"===t){const r=e.indexOf(" ");let i=e;if(r>0){const t=Qe(e,r);i=e.substring(t),e=e.substring(0,r)}("linkcode"===t||"link"===t&&"code"===n.link)&&(i=`\`${i}\``);const a=n.renderLink?.(e,i)??function(t,e){try{return te.r.parse(t,!0),`[${e}](${t})`}catch{return t}}(e,i);return a}return}(this.name,e,t??{});if("string"==typeof n)return n}let n="";"italic"===t?.tag||void 0===t?.tag?n="*":"bold"===t?.tag?n="**":"bold-italic"===t?.tag&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${e}`:this.content.inlines.length>1&&(r=`${r}\n${e}`),this.inline?`{${r}}`:r}}class hn{constructor(t,e){this.inlines=t,this.range=e}toString(){let t="";for(let e=0;e<this.inlines.length;e++){const n=this.inlines[e],r=this.inlines[e+1];t+=n.toString(),r&&r.range.start.line>n.range.start.line&&(t+="\n")}return t}toMarkdown(t){let e="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n],i=this.inlines[n+1];e+=r.toMarkdown(t),i&&i.range.start.line>r.range.start.line&&(e+="\n")}return e}}class un{constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}}function dn(t){return t.endsWith("\n")?"\n":"\n\n"}class pn{constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){const e=this.commentProvider.getComment(t);if(e&&function(t,e){const n=sn(e),r=Ge(t);if(0===r.length)return!1;const i=r[0],a=r[r.length-1],s=n.start,o=n.end;return Boolean(s?.exec(i))&&Boolean(o?.exec(a))}(e)){return Ye(e).toMarkdown({renderLink:(e,n)=>this.documentationLinkRenderer(t,e,n),renderTag:e=>this.documentationTagRenderer(t,e)})}}documentationLinkRenderer(t,e,n){const r=this.findNameInLocalSymbols(t,e)??this.findNameInGlobalScope(t,e);if(r&&r.nameSegment){const t=r.nameSegment.range.start.line+1,e=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${t},${e}`}).toString()})`}}documentationTagRenderer(t,e){}findNameInLocalSymbols(t,e){const n=(0,it.YE)(t).localSymbols;if(!n)return;let r=t;do{const t=n.getStream(r).find(t=>t.name===e);if(t)return t;r=r.$container}while(r)}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}class fn{constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return function(t){return"string"==typeof t.$comment}(t)?t.$comment:(0,r.v)(t.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class gn{constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}}class mn{constructor(){this.previousTokenSource=new $t.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();const e=(Ft=performance.now(),new $t.CancellationTokenSource);return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,n=$t.CancellationToken.None){const r=new jt,i={action:e,deferred:r,cancellationToken:n};return t.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map(async({action:t,deferred:e,cancellationToken:n})=>{try{const r=await Promise.resolve().then(()=>t(n));e.resolve(r)}catch(r){qt(r)?e.resolve(void 0):e.reject(r)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class yn{constructor(t){this.grammarElementIdMap=new ce,this.tokenTypeIdMap=new ce,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){const e=new Map,n=new Map;for(const r of(0,it.jm)(t))e.set(r,{});if(t.$cstNode)for(const i of(0,r.NS)(t.$cstNode))n.set(i,{});return{astNodes:e,cstNodes:n}}dehydrateAstNode(t,e){const n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(n.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){const t=[];n[r]=t;for(const n of i)(0,Bt.ng)(n)?t.push(this.dehydrateAstNode(n,e)):(0,Bt.A_)(n)?t.push(this.dehydrateReference(n,e)):t.push(n)}else(0,Bt.ng)(i)?n[r]=this.dehydrateAstNode(i,e):(0,Bt.A_)(i)?n[r]=this.dehydrateReference(i,e):void 0!==i&&(n[r]=i);return n}dehydrateReference(t,e){const n={};return n.$refText=t.$refText,t.$refNode&&(n.$refNode=e.cstNodes.get(t.$refNode)),n}dehydrateCstNode(t,e){const n=e.cstNodes.get(t);return(0,Bt.br)(t)?n.fullText=t.fullText:n.grammarSource=this.getGrammarElementId(t.grammarSource),n.hidden=t.hidden,n.astNode=e.astNodes.get(t.astNode),(0,Bt.mD)(t)?n.content=t.content.map(t=>this.dehydrateCstNode(t,e)):(0,Bt.FC)(t)&&(n.tokenType=t.tokenType.name,n.offset=t.offset,n.length=t.length,n.startLine=t.range.start.line,n.startColumn=t.range.start.character,n.endLine=t.range.end.line,n.endColumn=t.range.end.character),n}hydrate(t){const e=t.value,n=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,n),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,n)}}createHydrationContext(t){const e=new Map,n=new Map;for(const r of(0,it.jm)(t))e.set(r,{});let i;if(t.$cstNode)for(const a of(0,r.NS)(t.$cstNode)){let t;"fullText"in a?(t=new ut(a.fullText),i=t):"content"in a?t=new ct:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:e,cstNodes:n}}hydrateAstNode(t,e){const n=e.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode&&(n.$cstNode=e.cstNodes.get(t.$cstNode));for(const[r,i]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(i)){const t=[];n[r]=t;for(const a of i)(0,Bt.ng)(a)?t.push(this.setParent(this.hydrateAstNode(a,e),n)):(0,Bt.A_)(a)?t.push(this.hydrateReference(a,n,r,e)):t.push(a)}else(0,Bt.ng)(i)?n[r]=this.setParent(this.hydrateAstNode(i,e),n):(0,Bt.A_)(i)?n[r]=this.hydrateReference(i,n,r,e):void 0!==i&&(n[r]=i);return n}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,n,r){return this.linker.buildReference(e,n,r.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,n=0){const r=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(r.grammarSource=this.getGrammarElement(t.grammarSource)),r.astNode=e.astNodes.get(t.astNode),(0,Bt.mD)(r))for(const i of t.content){const t=this.hydrateCstNode(i,e,n++);r.content.push(t)}return r}hydrateCstLeafNode(t){const e=this.getTokenType(t.tokenType),n=t.offset,r=t.length,i=t.startLine,a=t.startColumn,s=t.endLine,o=t.endColumn,l=t.hidden;return new lt(n,r,{start:{line:i,character:a},end:{line:s,character:o}},e,l)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(const e of(0,it.jm)(this.grammar))(0,s.r1)(e)&&this.grammarElementIdMap.set(e,t++)}}function vn(t){return{documentation:{CommentProvider:t=>new fn(t),DocumentationProvider:t=>new pn(t)},parser:{AsyncParser:t=>new gn(t),GrammarConfig:t=>function(t){const e=[],n=t.Grammar;for(const r of n.rules)(0,s.rE)(r)&&(0,i.eb)(r)&&(0,a.lU)((0,i.S)(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:r.El}}(t),LangiumParser:t=>Mt(t),CompletionParser:t=>function(t){const e=t.Grammar,n=t.parser.Lexer,r=new xt(t);return At(e,r,n.definition),r.finalize(),r}(t),ValueConverter:()=>new Pt.d,TokenBuilder:()=>new Ot.Q,Lexer:t=>new qe(t),ParserErrorMessageProvider:()=>new vt,LexerErrorMessageProvider:()=>new ze},workspace:{AstNodeLocator:()=>new Ie,AstNodeDescriptionProvider:t=>new Le(t),ReferenceDescriptionProvider:t=>new De(t)},references:{Linker:t=>new ae(t),NameProvider:()=>new se,ScopeProvider:t=>new ye(t),ScopeComputation:t=>new he(t),References:t=>new oe(t)},serializer:{Hydrator:t=>new yn(t),JsonSerializer:t=>new xe(t)},validation:{DocumentValidator:t=>new Ae(t),ValidationRegistry:t=>new ke(t)},shared:()=>t.shared}}function xn(t){return{ServiceRegistry:t=>new be(t),workspace:{LangiumDocuments:t=>new re(t),LangiumDocumentFactory:t=>new ne(t),DocumentBuilder:t=>new $e(t),IndexManager:t=>new Be(t),WorkspaceManager:t=>new Fe(t),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new mn,ConfigurationProvider:t=>new Me(t)},profilers:{}}}},9364(t,e,n){"use strict";var r;function i(t,e,n,r,i,a,o,l,h){return s([t,e,n,r,i,a,o,l,h].reduce(c,{}))}n.d(e,{WQ:()=>i}),function(t){t.merge=(t,e)=>c(c({},t),e)}(r||(r={}));const a=Symbol("isProxy");function s(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===a||l(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(l(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(e,n)=>n in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const o=Symbol();function l(t,e,n,r){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===o)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in n){const a=n[e];t[e]=o;try{t[e]="function"==typeof a?a(r):s(a,r)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}}function c(t,e){if(e)for(const[n,r]of Object.entries(e))if(null!=r)if("object"==typeof r){const e=t[n];t[n]=c("object"==typeof e&&null!==e?e:{},r)}else t[n]=r;return t}},2151(t,e,n){"use strict";n.d(e,{$g:()=>Ue,Bg:()=>q,Ct:()=>le,Cz:()=>O,D8:()=>Ve,FO:()=>ot,Fy:()=>nn,GL:()=>ae,IZ:()=>Tt,Mz:()=>Vn,NT:()=>Mt,O4:()=>pn,QX:()=>er,RP:()=>it,S2:()=>jt,SP:()=>At,TF:()=>ge,Tu:()=>W,Xj:()=>Ln,_c:()=>tt,cM:()=>l,cY:()=>qn,fG:()=>$e,jp:()=>w,lF:()=>_n,r1:()=>s,rE:()=>bn,s7:()=>Ae,vd:()=>Me,ve:()=>y,wb:()=>Ht,wh:()=>I,z2:()=>tr});var r=n(2479);const i="AbstractElement",a="cardinality";function s(t){return nr.isInstance(t,i)}const o="AbstractParserRule";function l(t){return nr.isInstance(t,o)}const c="AbstractRule";const h="AbstractType";const u="Action",d="cardinality",p="feature",f="inferredType",g="operator",m="type";function y(t){return nr.isInstance(t,u)}const v="Alternatives",x="cardinality",b="elements";function w(t){return nr.isInstance(t,v)}const T="ArrayLiteral",k="elements";const E="ArrayType",A="elementType";const _="Assignment",C="cardinality",S="feature",R="operator",L="predicate",D="terminal";function I(t){return nr.isInstance(t,_)}const N="BooleanLiteral",M="true";function O(t){return nr.isInstance(t,N)}const P="CharacterRange",$="cardinality",B="left",F="lookahead",z="parenthesized",K="right";function q(t){return nr.isInstance(t,P)}const U="Condition";const j="Conjunction",Y="left",G="right";function W(t){return nr.isInstance(t,j)}const V="CrossReference",H="cardinality",X="deprecatedSyntax",Z="isMulti",Q="terminal",J="type";function tt(t){return nr.isInstance(t,V)}const et="Disjunction",nt="left",rt="right";function it(t){return nr.isInstance(t,et)}const at="EndOfFile",st="cardinality";function ot(t){return nr.isInstance(t,at)}const lt="Grammar",ct="imports",ht="interfaces",ut="isDeclared",dt="name",pt="rules",ft="types";const gt="GrammarImport",mt="path";const yt="Group",vt="cardinality",xt="elements",bt="guardCondition",wt="predicate";function Tt(t){return nr.isInstance(t,yt)}const kt="InferredType",Et="name";function At(t){return nr.isInstance(t,kt)}const _t="InfixRule",Ct="call",St="dataType",Rt="inferredType",Lt="name",Dt="operators",It="parameters",Nt="returnType";function Mt(t){return nr.isInstance(t,_t)}const Ot="InfixRuleOperatorList",Pt="associativity",$t="operators";const Bt="InfixRuleOperators",Ft="precedences";const zt="Interface",Kt="attributes",qt="name",Ut="superTypes";function jt(t){return nr.isInstance(t,zt)}const Yt="Keyword",Gt="cardinality",Wt="predicate",Vt="value";function Ht(t){return nr.isInstance(t,Yt)}const Xt="NamedArgument",Zt="calledByName",Qt="parameter",Jt="value";const te="NegatedToken",ee="cardinality",ne="lookahead",re="parenthesized",ie="terminal";function ae(t){return nr.isInstance(t,te)}const se="Negation",oe="value";function le(t){return nr.isInstance(t,se)}const ce="NumberLiteral",he="value";const ue="Parameter",de="name";const pe="ParameterReference",fe="parameter";function ge(t){return nr.isInstance(t,pe)}const me="ParserRule",ye="dataType",ve="definition",xe="entry",be="fragment",we="inferredType",Te="name",ke="parameters",Ee="returnType";function Ae(t){return nr.isInstance(t,me)}const _e="ReferenceType",Ce="isMulti",Se="referenceType";const Re="RegexToken",Le="cardinality",De="lookahead",Ie="parenthesized",Ne="regex";function Me(t){return nr.isInstance(t,Re)}const Oe="ReturnType",Pe="name";function $e(t){return nr.isInstance(t,Oe)}const Be="RuleCall",Fe="arguments",ze="cardinality",Ke="predicate",qe="rule";function Ue(t){return nr.isInstance(t,Be)}const je="SimpleType",Ye="primitiveType",Ge="stringType",We="typeRef";function Ve(t){return nr.isInstance(t,je)}const He="StringLiteral",Xe="value";const Ze="TerminalAlternatives",Qe="cardinality",Je="elements",tn="lookahead",en="parenthesized";function nn(t){return nr.isInstance(t,Ze)}const rn="TerminalElement",an="cardinality",sn="lookahead",on="parenthesized";const ln="TerminalGroup",cn="cardinality",hn="elements",un="lookahead",dn="parenthesized";function pn(t){return nr.isInstance(t,ln)}const fn="TerminalRule",gn="definition",mn="fragment",yn="hidden",vn="name",xn="type";function bn(t){return nr.isInstance(t,fn)}const wn="TerminalRuleCall",Tn="cardinality",kn="lookahead",En="parenthesized",An="rule";function _n(t){return nr.isInstance(t,wn)}const Cn="Type",Sn="name",Rn="type";function Ln(t){return nr.isInstance(t,Cn)}const Dn="TypeAttribute",In="defaultValue",Nn="isOptional",Mn="name",On="type";const Pn="TypeDefinition";const $n="UnionType",Bn="types";const Fn="UnorderedGroup",zn="cardinality",Kn="elements";function qn(t){return nr.isInstance(t,Fn)}const Un="UntilToken",jn="cardinality",Yn="lookahead",Gn="parenthesized",Wn="terminal";function Vn(t){return nr.isInstance(t,Un)}const Hn="ValueLiteral";const Xn="Wildcard",Zn="cardinality",Qn="lookahead",Jn="parenthesized";function tr(t){return nr.isInstance(t,Xn)}class er extends r.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i,properties:{cardinality:{name:a}},superTypes:[]},AbstractParserRule:{name:o,properties:{},superTypes:[c,h]},AbstractRule:{name:c,properties:{},superTypes:[]},AbstractType:{name:h,properties:{},superTypes:[]},Action:{name:u,properties:{cardinality:{name:d},feature:{name:p},inferredType:{name:f},operator:{name:g},type:{name:m,referenceType:h}},superTypes:[i]},Alternatives:{name:v,properties:{cardinality:{name:x},elements:{name:b,defaultValue:[]}},superTypes:[i]},ArrayLiteral:{name:T,properties:{elements:{name:k,defaultValue:[]}},superTypes:[Hn]},ArrayType:{name:E,properties:{elementType:{name:A}},superTypes:[Pn]},Assignment:{name:_,properties:{cardinality:{name:C},feature:{name:S},operator:{name:R},predicate:{name:L},terminal:{name:D}},superTypes:[i]},BooleanLiteral:{name:N,properties:{true:{name:M,defaultValue:!1}},superTypes:[U,Hn]},CharacterRange:{name:P,properties:{cardinality:{name:$},left:{name:B},lookahead:{name:F},parenthesized:{name:z,defaultValue:!1},right:{name:K}},superTypes:[rn]},Condition:{name:U,properties:{},superTypes:[]},Conjunction:{name:j,properties:{left:{name:Y},right:{name:G}},superTypes:[U]},CrossReference:{name:V,properties:{cardinality:{name:H},deprecatedSyntax:{name:X,defaultValue:!1},isMulti:{name:Z,defaultValue:!1},terminal:{name:Q},type:{name:J,referenceType:h}},superTypes:[i]},Disjunction:{name:et,properties:{left:{name:nt},right:{name:rt}},superTypes:[U]},EndOfFile:{name:at,properties:{cardinality:{name:st}},superTypes:[i]},Grammar:{name:lt,properties:{imports:{name:ct,defaultValue:[]},interfaces:{name:ht,defaultValue:[]},isDeclared:{name:ut,defaultValue:!1},name:{name:dt},rules:{name:pt,defaultValue:[]},types:{name:ft,defaultValue:[]}},superTypes:[]},GrammarImport:{name:gt,properties:{path:{name:mt}},superTypes:[]},Group:{name:yt,properties:{cardinality:{name:vt},elements:{name:xt,defaultValue:[]},guardCondition:{name:bt},predicate:{name:wt}},superTypes:[i]},InferredType:{name:kt,properties:{name:{name:Et}},superTypes:[h]},InfixRule:{name:_t,properties:{call:{name:Ct},dataType:{name:St},inferredType:{name:Rt},name:{name:Lt},operators:{name:Dt},parameters:{name:It,defaultValue:[]},returnType:{name:Nt,referenceType:h}},superTypes:[o]},InfixRuleOperatorList:{name:Ot,properties:{associativity:{name:Pt},operators:{name:$t,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Bt,properties:{precedences:{name:Ft,defaultValue:[]}},superTypes:[]},Interface:{name:zt,properties:{attributes:{name:Kt,defaultValue:[]},name:{name:qt},superTypes:{name:Ut,defaultValue:[],referenceType:h}},superTypes:[h]},Keyword:{name:Yt,properties:{cardinality:{name:Gt},predicate:{name:Wt},value:{name:Vt}},superTypes:[i]},NamedArgument:{name:Xt,properties:{calledByName:{name:Zt,defaultValue:!1},parameter:{name:Qt,referenceType:ue},value:{name:Jt}},superTypes:[]},NegatedToken:{name:te,properties:{cardinality:{name:ee},lookahead:{name:ne},parenthesized:{name:re,defaultValue:!1},terminal:{name:ie}},superTypes:[rn]},Negation:{name:se,properties:{value:{name:oe}},superTypes:[U]},NumberLiteral:{name:ce,properties:{value:{name:he}},superTypes:[Hn]},Parameter:{name:ue,properties:{name:{name:de}},superTypes:[]},ParameterReference:{name:pe,properties:{parameter:{name:fe,referenceType:ue}},superTypes:[U]},ParserRule:{name:me,properties:{dataType:{name:ye},definition:{name:ve},entry:{name:xe,defaultValue:!1},fragment:{name:be,defaultValue:!1},inferredType:{name:we},name:{name:Te},parameters:{name:ke,defaultValue:[]},returnType:{name:Ee,referenceType:h}},superTypes:[o]},ReferenceType:{name:_e,properties:{isMulti:{name:Ce,defaultValue:!1},referenceType:{name:Se}},superTypes:[Pn]},RegexToken:{name:Re,properties:{cardinality:{name:Le},lookahead:{name:De},parenthesized:{name:Ie,defaultValue:!1},regex:{name:Ne}},superTypes:[rn]},ReturnType:{name:Oe,properties:{name:{name:Pe}},superTypes:[]},RuleCall:{name:Be,properties:{arguments:{name:Fe,defaultValue:[]},cardinality:{name:ze},predicate:{name:Ke},rule:{name:qe,referenceType:c}},superTypes:[i]},SimpleType:{name:je,properties:{primitiveType:{name:Ye},stringType:{name:Ge},typeRef:{name:We,referenceType:h}},superTypes:[Pn]},StringLiteral:{name:He,properties:{value:{name:Xe}},superTypes:[Hn]},TerminalAlternatives:{name:Ze,properties:{cardinality:{name:Qe},elements:{name:Je,defaultValue:[]},lookahead:{name:tn},parenthesized:{name:en,defaultValue:!1}},superTypes:[rn]},TerminalElement:{name:rn,properties:{cardinality:{name:an},lookahead:{name:sn},parenthesized:{name:on,defaultValue:!1}},superTypes:[i]},TerminalGroup:{name:ln,properties:{cardinality:{name:cn},elements:{name:hn,defaultValue:[]},lookahead:{name:un},parenthesized:{name:dn,defaultValue:!1}},superTypes:[rn]},TerminalRule:{name:fn,properties:{definition:{name:gn},fragment:{name:mn,defaultValue:!1},hidden:{name:yn,defaultValue:!1},name:{name:vn},type:{name:xn}},superTypes:[c]},TerminalRuleCall:{name:wn,properties:{cardinality:{name:Tn},lookahead:{name:kn},parenthesized:{name:En,defaultValue:!1},rule:{name:An,referenceType:fn}},superTypes:[rn]},Type:{name:Cn,properties:{name:{name:Sn},type:{name:Rn}},superTypes:[h]},TypeAttribute:{name:Dn,properties:{defaultValue:{name:In},isOptional:{name:Nn,defaultValue:!1},name:{name:Mn},type:{name:On}},superTypes:[]},TypeDefinition:{name:Pn,properties:{},superTypes:[]},UnionType:{name:$n,properties:{types:{name:Bn,defaultValue:[]}},superTypes:[Pn]},UnorderedGroup:{name:Fn,properties:{cardinality:{name:zn},elements:{name:Kn,defaultValue:[]}},superTypes:[i]},UntilToken:{name:Un,properties:{cardinality:{name:jn},lookahead:{name:Yn},parenthesized:{name:Gn,defaultValue:!1},terminal:{name:Wn}},superTypes:[rn]},ValueLiteral:{name:Hn,properties:{},superTypes:[]},Wildcard:{name:Xn,properties:{cardinality:{name:Zn},lookahead:{name:Qn},parenthesized:{name:Jn,defaultValue:!1}},superTypes:[rn]}}}}const nr=new er},1945(t,e,n){"use strict";n.d(e,{Q:()=>c});var r=n(724),i=n(2151),a=n(9683),s=n(418),o=n(2806),l=n(1719);class c{constructor(){this.diagnostics=[]}buildTokens(t,e){const n=(0,l.Td)((0,s.YV)(t,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,e);return i.push(...r),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(i.rE).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){const e=(0,s.S)(t),n=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,i={name:t.name,PATTERN:n};return"function"==typeof n&&(i.LINE_BREAKS=!0),t.hidden&&(i.GROUP=(0,o.Yv)(e)?r.JG.SKIPPED:"hidden"),i}requiresCustomPattern(t){return!(!t.flags.includes("u")&&!t.flags.includes("s"))}regexPatternFunction(t){const e=new RegExp(t,t.flags+"y");return(t,n)=>{e.lastIndex=n;return e.exec(t)}}buildKeywordTokens(t,e,n){return t.filter(i.cM).flatMap(t=>(0,a.Uo)(t).filter(i.wb)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,Boolean(n?.caseInsensitive)))}buildKeywordToken(t,e,n){const r=this.buildKeywordPattern(t,n),i={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)};return"function"==typeof r&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(t,e){return e?new RegExp((0,o.Nt)(t.value),"i"):t.value}findLongerAlt(t,e){return e.reduce((e,n)=>{const r=n?.PATTERN;return r?.source&&(0,o.PC)("^"+r.source+"$",t.value)&&e.push(n),e},[])}}},5033(t,e,n){"use strict";n.d(e,{d:()=>s});var r,i=n(2151),a=n(418);class s{convert(t,e){let n=e.grammarSource;if((0,i._c)(n)&&(n=(0,a.g4)(n)),(0,i.$g)(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,t,e)}return t}runConverter(t,e,n){switch(t.name.toUpperCase()){case"INT":return r.convertInt(e);case"STRING":return r.convertString(e);case"ID":return r.convertID(e)}switch((0,a.P3)(t)?.toLowerCase()){case"number":return r.convertNumber(e);case"boolean":return r.convertBoolean(e);case"bigint":return r.convertBigint(e);case"date":return r.convertDate(e);default:return e}}}!function(t){function e(t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return t}}t.convertString=function(t){let n="";for(let r=1;r<t.length-1;r++){const i=t.charAt(r);if("\\"===i){n+=e(t.charAt(++r))}else n+=i}return n},t.convertID=function(t){return"^"===t.charAt(0)?t.substring(1):t},t.convertInt=function(t){return parseInt(t)},t.convertBigint=function(t){return BigInt(t)},t.convertDate=function(t){return new Date(t)},t.convertNumber=function(t){return Number(t)},t.convertBoolean=function(t){return"true"===t.toLowerCase()}}(r||(r={}))},2479(t,e,n){"use strict";function r(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function i(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText&&"ref"in t}function a(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText&&"items"in t}function s(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function o(t){return"object"==typeof t&&null!==t&&"object"==typeof t.info&&"string"==typeof t.message}n.d(e,{A_:()=>i,Dm:()=>a,FC:()=>h,Nr:()=>s,Zl:()=>o,br:()=>u,kD:()=>l,mD:()=>c,ng:()=>r});class l{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(t){const e=this.types[t.container.$type];if(!e)throw new Error(`Type ${t.container.$type||"undefined"} not found.`);const n=e.properties[t.property]?.referenceType;if(!n)throw new Error(`Property ${t.property||"undefined"} of type ${t.container.$type} is not a reference.`);return n}getTypeMetaData(t){const e=this.types[t];return e||{name:t,properties:{},superTypes:[]}}isInstance(t,e){return r(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){if(t===e)return!0;let n=this.subtypes[t];n||(n=this.subtypes[t]={});const r=n[e];if(void 0!==r)return r;{const r=this.types[t],i=!!r&&r.superTypes.some(t=>this.isSubtype(t,e));return n[e]=i,i}}getAllSubTypes(t){const e=this.allSubtypes[t];if(e)return e;{const e=this.getAllTypes(),n=[];for(const r of e)this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n,n}}}function c(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function h(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function u(t){return c(t)&&"string"==typeof t.fullText}},9683(t,e,n){"use strict";n.d(e,{DM:()=>g,OP:()=>m,SD:()=>s,Uo:()=>d,VN:()=>u,XG:()=>o,YE:()=>l,cQ:()=>c,jm:()=>p,tC:()=>h});var r=n(2479),i=n(1719),a=n(6373);function s(t,e={}){for(const[n,i]of Object.entries(t))n.startsWith("$")||(Array.isArray(i)?i.forEach((i,a)=>{(0,r.ng)(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=a,e.deep&&s(i,e))}):(0,r.ng)(i)&&(i.$container=t,i.$containerProperty=n,e.deep&&s(i,e)))}function o(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function l(t){const e=c(t).$document;if(!e)throw new Error("AST node has no document.");return e}function c(t){for(;t.$container;)t=t.$container;return t}function h(t){return(0,r.A_)(t)?t.ref?[t.ref]:[]:(0,r.Dm)(t)?t.items.map(t=>t.ref):[]}function u(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new i.fq(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const i=e.keys[e.keyIndex];if(!i.startsWith("$")){const a=t[i];if((0,r.ng)(a)){if(e.keyIndex++,f(a,n))return{done:!1,value:a}}else if(Array.isArray(a)){for(;e.arrayIndex<a.length;){const t=a[e.arrayIndex++];if((0,r.ng)(t)&&f(t,n))return{done:!1,value:t}}e.arrayIndex=0}}e.keyIndex++}return i.Rf})}function d(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new i.Vj(t,t=>u(t,e))}function p(t,e){if(!t)throw new Error("Root node must be an AstNode.");return e?.range&&!f(t,e.range)?new i.Vj(t,()=>[]):new i.Vj(t,t=>u(t,e),{includeRoot:!0})}function f(t,e){if(!e)return!0;const n=t.$cstNode?.range;return!!n&&(0,a.r4)(n,e)}function g(t){return new i.fq(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const i=t[n];if((0,r.A_)(i)||(0,r.Dm)(i))return e.keyIndex++,{done:!1,value:{reference:i,container:t,property:n}};if(Array.isArray(i)){for(;e.arrayIndex<i.length;){const a=e.arrayIndex++,s=i[a];if((0,r.A_)(s)||(0,r.Dm)(i))return{done:!1,value:{reference:s,container:t,property:n,index:a}}}e.arrayIndex=0}}e.keyIndex++}return i.Rf})}function m(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))void 0!==i.defaultValue&&void 0===r[i.name]&&(r[i.name]=y(i.defaultValue))}function y(t){return Array.isArray(t)?[...t.map(y)]:t}},6373(t,e,n){"use strict";n.d(e,{El:()=>u,NS:()=>s,SX:()=>c,pO:()=>o,r4:()=>h,v:()=>d,wf:()=>l});var r,i=n(2479),a=n(1719);function s(t){return new a.Vj(t,t=>(0,i.mD)(t)?t.content:[],{includeRoot:!0})}function o(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function l(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function c(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}function h(t,e){const n=function(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return r.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return r.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,i=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&i?r.Inside:n?r.OverlapBack:i?r.OverlapFront:r.Outside}(t,e);return n>r.After}!function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"}(r||(r={}));const u=/^[\w\p{L}]$/u;function d(t,e){if(t){const n=function(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const t=n.content[r];if(e||!t.hidden)return t}t=n}return}(t,!0);if(n&&p(n,e))return n;if((0,i.br)(t)){for(let n=t.content.findIndex(t=>!t.hidden)-1;n>=0;n--){const r=t.content[n];if(p(r,e))return r}}}}function p(t,e){return(0,i.FC)(t)&&e.includes(t.tokenType.name)}},1564(t,e,n){"use strict";n.d(e,{WB:()=>r,dr:()=>i});class r extends Error{constructor(t,e){super(t?`${e} at ${t.range.start.line}:${t.range.start.character}`:e)}}function i(t,e="Error: Got unexpected value."){throw new Error(e)}},418(t,e,n){"use strict";n.d(e,{Bd:()=>p,P3:()=>A,Rp:()=>v,S:()=>_,SS:()=>m,U5:()=>x,Uz:()=>E,Xq:()=>w,YV:()=>c,eb:()=>d,g4:()=>u,qO:()=>f});var r=n(1564),i=n(2151),a=n(2479),s=n(9683),o=n(6373),l=n(2806);function c(t,e){const n=new Set,r=function(t){return t.rules.find(t=>i.s7(t)&&t.entry)}(t);if(!r)return new Set(t.rules);const a=[r].concat(function(t){return t.rules.filter(t=>i.rE(t)&&t.hidden)}(t));for(const i of a)h(i,n,e);const s=new Set;for(const o of t.rules)(n.has(o.name)||i.rE(o)&&o.hidden)&&s.add(o);return s}function h(t,e,n){e.add(t.name),(0,s.Uo)(t).forEach(t=>{if(i.$g(t)||n&&i.lF(t)){const r=t.rule.ref;r&&!e.has(r.name)&&h(r,e,n)}})}function u(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=x(t.type.ref);return e?.terminal}}function d(t){return t.hidden&&!(0,l.Yv)(_(t))}function p(t,e){return t&&e?g(t,e,t.astNode,!0):[]}function f(t,e,n){if(!t||!e)return;const r=g(t,e,t.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function g(t,e,n,r){if(!r){const n=(0,s.XG)(t.grammarSource,i.wh);if(n&&n.feature===e)return[t]}return(0,a.mD)(t)&&t.astNode===n?t.content.flatMap(t=>g(t,e,n,!1)):[]}function m(t,e,n){if(!t)return;const r=y(t,e,t?.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function y(t,e,n){if(t.astNode!==n)return[];if(i.wb(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=(0,o.NS)(t).iterator();let a;const s=[];do{if(a=r.next(),!a.done){const t=a.value;t.astNode===n?i.wb(t.grammarSource)&&t.grammarSource.value===e&&s.push(t):r.prune()}}while(!a.done);return s}function v(t){const e=t.astNode;for(;e===t.container?.astNode;){const e=(0,s.XG)(t.grammarSource,i.wh);if(e)return e;t=t.container}}function x(t){let e=t;return i.SP(e)&&(i.ve(e.$container)?e=e.$container.$container:i.cM(e.$container)?e=e.$container:(0,r.dr)(e.$container)),b(t,e,new Map)}function b(t,e,n){function r(e,r){let a;return(0,s.XG)(e,i.wh)||(a=b(r,r,n)),n.set(t,a),a}if(n.has(t))return n.get(t);n.set(t,void 0);for(const a of(0,s.Uo)(e)){if(i.wh(a)&&"name"===a.feature.toLowerCase())return n.set(t,a),a;if(i.$g(a)&&i.s7(a.rule.ref))return r(a,a.rule.ref);if(i.D8(a)&&a.typeRef?.ref)return r(a,a.typeRef.ref)}}function w(t){return T(t,new Set)}function T(t,e){if(e.has(t))return!0;e.add(t);for(const n of(0,s.Uo)(t))if(i.$g(n)){if(!n.rule.ref)return!1;if(i.s7(n.rule.ref)&&!T(n.rule.ref,e))return!1;if(i.NT(n.rule.ref))return!1}else{if(i.wh(n))return!1;if(i.ve(n))return!1}return Boolean(t.definition)}function k(t){if(!i.rE(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}function E(t){if(i.cM(t))return i.s7(t)&&w(t)?t.name:k(t)??t.name;if(i.S2(t)||i.Xj(t)||i.fG(t))return t.name;if(i.ve(t)){const e=function(t){if(t.inferredType)return t.inferredType.name;if(t.type?.ref)return E(t.type.ref);return}(t);if(e)return e}else if(i.SP(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function A(t){return i.rE(t)?t.type?.name??"string":k(t)??t.name}function _(t){const e={s:!1,i:!1,u:!1},n=S(t.definition,e),r=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(n,r)}const C=/[\s\S]/.source;function S(t,e){if(i.Fy(t))return L((s=t).elements.map(t=>S(t)).join("|"),{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized,wrap:!1});if(i.O4(t))return L((a=t).elements.map(t=>S(t)).join(""),{cardinality:a.cardinality,lookahead:a.lookahead,parenthesized:a.parenthesized,wrap:!1});if(i.Bg(t))return function(t){if(t.right)return L(`[${R(t.left)}-${R(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1});return L(R(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}(t);if(i.lF(t)){const e=t.rule.ref;if(!e)throw new Error("Missing rule reference.");return L(S(e.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}if(i.GL(t))return L(`(?!${S((r=t).terminal)})${C}*?`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.Mz(t))return L(`${C}*?${S((n=t).terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized});if(i.vd(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),L(r,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}if(i.z2(t))return L(C,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t?.$type}, ${t?.$cstNode?.text}`);var n,r,a,s}function R(t){return(0,l.Nt)(t.value)}function L(t,e){if(e.parenthesized||e.lookahead||!1!==e.wrap){t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`}return e.cardinality?`${t}${e.cardinality}`:t}},2806(t,e,n){"use strict";n.d(e,{Nt:()=>u,PC:()=>d,TH:()=>i,Yv:()=>h,lU:()=>l});var r=n(2607);const i=/\r?\n/gm,a=new r.H;class s extends r.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){const e=String.fromCharCode(t.value);if(this.multiline||"\n"!==e||(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=u(e);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitSet(t){if(!this.multiline){const e=this.regex.substring(t.loc.begin,t.loc.end),n=new RegExp(e);this.multiline=Boolean("\n".match(n))}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitChildren(t){if("Group"===t.type){if(t.quantifier)return}super.visitChildren(t)}}const o=new s;function l(t){try{return"string"==typeof t&&(t=new RegExp(t)),t=t.toString(),o.reset(t),o.visit(a.pattern(t)),o.multiline}catch{return!1}}const c="\f\n\r\t\v   \u2028\u2029 \ufeff".split("");function h(t){const e="string"==typeof t?new RegExp(t):t;return c.some(t=>e.test(t))}function u(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(t,e){const n=function(t){"string"==typeof t&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let t,a="";function s(t){a+=n.substr(r,t),r+=t}function o(t){a+="(?:"+n.substr(r,t)+"|$)",r+=t}for(;r<n.length;)switch(n[r]){case"\\":switch(n[r+1]){case"c":o(3);break;case"x":o(4);break;case"u":e.unicode?"{"===n[r+2]?o(n.indexOf("}",r)-r+1):o(6):o(2);break;case"p":case"P":e.unicode?o(n.indexOf("}",r)-r+1):o(2);break;case"k":o(n.indexOf(">",r)-r+1);break;default:o(2)}break;case"[":t=/\[(?:\\.|.)*?\]/g,t.lastIndex=r,t=t.exec(n)||[],o(t[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":t=/\{\d+,?\d*\}/g,t.lastIndex=r,t=t.exec(n),t?s(t[0].length):o(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":a+="(?:",r+=3,a+=i()+"|$)";break;case"=":a+="(?=",r+=3,a+=i()+")";break;case"!":t=r,r+=3,i(),a+=n.substr(t,r-t);break;case"<":switch(n[r+3]){case"=":case"!":t=r,r+=4,i(),a+=n.substr(t,r-t);break;default:s(n.indexOf(">",r)-r+1),a+=i()+"|$)"}}else s(1),a+=i()+"|$)";break;case")":return++r,a;default:o(1)}return a}return new RegExp(i(),t.flags)}(t),r=e.match(n);return!!r&&r[0].length>0}},1719(t,e,n){"use strict";n.d(e,{B5:()=>s,Rf:()=>o,Td:()=>l,Vj:()=>c,fq:()=>r,iD:()=>h});class r{constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){const t={state:this.startFn(),next:()=>this.nextFn(t.state),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){const t=this.iterator();return Boolean(t.next().done)}count(){const t=this.iterator();let e=0,n=t.next();for(;!n.done;)e++,n=t.next();return e}toArray(){const t=[],e=this.iterator();let n;do{n=e.next(),void 0!==n.value&&t.push(n.value)}while(!n.done);return t}toSet(){return new Set(this)}toMap(t,e){const n=this.map(n=>[t?t(n):n,e?e(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new r(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(e=this.nextFn(t.first),!e.done)return e}while(!e.done);t.firstDone=!0}do{if(e=t.iterator.next(),!e.done)return e}while(!e.done);return o})}join(t=","){const e=this.iterator();let n,r="",a=!1;do{n=e.next(),n.done||(a&&(r+=t),r+=i(n.value)),a=!0}while(!n.done);return r}indexOf(t,e=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=e&&i.value===t)return r;i=n.next(),r++}return-1}every(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(!t(n.value))return!1;n=e.next()}return!0}some(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(t(n.value))return!0;n=e.next()}return!1}forEach(t){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)t(r.value,n),r=e.next(),n++}map(t){return new r(this.startFn,e=>{const{done:n,value:r}=this.nextFn(e);return n?o:{done:!1,value:t(r)}})}filter(t){return new r(this.startFn,e=>{let n;do{if(n=this.nextFn(e),!n.done&&t(n.value))return n}while(!n.done);return o})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){const n=this.iterator();let r=e,i=n.next();for(;!i.done;)r=void 0===r?i.value:t(r,i.value),i=n.next();return r}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,n){const r=t.next();if(r.done)return n;const i=this.recursiveReduce(t,e,n);return void 0===i?r.value:e(i,r.value)}find(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(t(n.value))return n.value;n=e.next()}}findIndex(t){const e=this.iterator();let n=0,r=e.next();for(;!r.done;){if(t(r.value))return n;r=e.next(),n++}return-1}includes(t){const e=this.iterator();let n=e.next();for(;!n.done;){if(n.value===t)return!0;n=e.next()}return!1}flatMap(t){return new r(()=>({this:this.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=this.nextFn(e.this);if(!n){const n=t(r);if(!a(n))return{done:!1,value:n};e.iterator=n[Symbol.iterator]()}}while(e.iterator);return o})}flat(t){if(void 0===t&&(t=1),t<=0)return this;const e=t>1?this.flat(t-1):this;return new r(()=>({this:e.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=e.nextFn(t.this);if(!n){if(!a(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return o})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(t=1){return new r(()=>{const e=this.startFn();for(let n=0;n<t;n++){if(this.nextFn(e).done)return e}return e},this.nextFn)}limit(t){return new r(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?o:this.nextFn(e.state)))}distinct(t){return new r(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do{if(n=this.nextFn(e.internalState),!n.done){const r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}}while(!n.done);return o})}exclude(t,e){const n=new Set;for(const r of t){const t=e?e(r):r;n.add(t)}return this.filter(t=>{const r=e?e(t):t;return!n.has(r)})}}function i(t){return"string"==typeof t?t:void 0===t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function a(t){return!!t&&"function"==typeof t[Symbol.iterator]}const s=new r(()=>{},()=>o),o=Object.freeze({done:!0,value:void 0});function l(...t){if(1===t.length){const e=t[0];if(e instanceof r)return e;if(a(e))return new r(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new r(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:o)}return t.length>1?new r(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];a(n)?e.iterator=n[Symbol.iterator]():n&&"number"==typeof n.length&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return o}):s}class c extends r{constructor(t,e,n){super(()=>({iterators:n?.includeRoot?[[t][Symbol.iterator]()]:[e(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);t.iterators.length>0;){const n=t.iterators[t.iterators.length-1].next();if(!n.done)return t.iterators.push(e(n.value)[Symbol.iterator]()),n;t.iterators.pop()}return o})}iterator(){const t={state:this.startFn(),next:()=>this.nextFn(t.state),prune:()=>{t.state.pruned=!0},[Symbol.iterator]:()=>t};return t}}var h;!function(t){t.sum=function(t){return t.reduce((t,e)=>t+e,0)},t.product=function(t){return t.reduce((t,e)=>t*e,0)},t.min=function(t){return t.reduce((t,e)=>Math.min(t,e))},t.max=function(t){return t.reduce((t,e)=>Math.max(t,e))}}(h||(h={}))},4298(t,e,n){"use strict";n.d(e,{D:()=>i});class r{stat(t){throw new Error("No file system is available.")}statSync(t){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},9469(t,e,n){"use strict";n.d(e,{A:()=>d});const r=function(){this.__data__=[],this.size=0};var i=n(6984);const a=function(t,e){for(var n=t.length;n--;)if((0,i.A)(t[n][0],e))return n;return-1};var s=Array.prototype.splice;const o=function(t){var e=this.__data__,n=a(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)};const l=function(t){var e=this.__data__,n=a(e,t);return n<0?void 0:e[n][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var n=this.__data__,r=a(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=l,u.prototype.has=c,u.prototype.set=h;const d=u},8335(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(8562),i=n(1917);const a=(0,r.A)(i.A,"Map")},2050(t,e,n){"use strict";n.d(e,{A:()=>k});const r=(0,n(8562).A)(Object,"create");const i=function(){this.__data__=r?r(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const o=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return r?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=c,u.prototype.set=h;const d=u;var p=n(9469),f=n(8335);const g=function(){this.size=0,this.__data__={hash:new d,map:new(f.A||p.A),string:new d}};const m=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const y=function(t,e){var n=t.__data__;return m(e)?n["string"==typeof e?"string":"hash"]:n.map};const v=function(t){var e=y(this,t).delete(t);return this.size-=e?1:0,e};const x=function(t){return y(this,t).get(t)};const b=function(t){return y(this,t).has(t)};const w=function(t,e){var n=y(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function T(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}T.prototype.clear=g,T.prototype.delete=v,T.prototype.get=x,T.prototype.has=b,T.prototype.set=w;const k=T},9857(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(8562),i=n(1917);const a=(0,r.A)(i.A,"Set")},8300(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2050);const i=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const a=function(t){return this.__data__.has(t)};function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r.A;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=i,s.prototype.has=a;const o=s},2080(t,e,n){"use strict";n.d(e,{A:()=>d});var r=n(9469);const i=function(){this.__data__=new r.A,this.size=0};const a=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const s=function(t){return this.__data__.get(t)};const o=function(t){return this.__data__.has(t)};var l=n(8335),c=n(2050);const h=function(t,e){var n=this.__data__;if(n instanceof r.A){var i=n.__data__;if(!l.A||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new c.A(i)}return n.set(t,e),this.size=n.size,this};function u(t){var e=this.__data__=new r.A(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=s,u.prototype.has=o,u.prototype.set=h;const d=u},241(t,e,n){"use strict";n.d(e,{A:()=>r});const r=n(1917).A.Symbol},3988(t,e,n){"use strict";n.d(e,{A:()=>r});const r=n(1917).A.Uint8Array},2641(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},2634(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var s=t[n];e(s,n,t)&&(a[i++]=s)}return a}},5530(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(5205);const i=function(t,e){return!!(null==t?0:t.length)&&(0,r.A)(t,e,0)>-1}},7809(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},2505(t,e,n){"use strict";n.d(e,{A:()=>h});const r=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var i=n(5175),a=n(2049),s=n(1200),o=n(5353),l=n(4749),c=Object.prototype.hasOwnProperty;const h=function(t,e){var n=(0,a.A)(t),h=!n&&(0,i.A)(t),u=!n&&!h&&(0,s.A)(t),d=!n&&!h&&!u&&(0,l.A)(t),p=n||h||u||d,f=p?r(t.length,String):[],g=f.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,o.A)(m,g))||f.push(m);return f}},5572(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},6912(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},3736(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},2851(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(2528),i=n(6984),a=Object.prototype.hasOwnProperty;const s=function(t,e,n){var s=t[e];a.call(t,e)&&(0,i.A)(s,n)&&(void 0!==n||e in t)||(0,r.A)(t,e,n)}},2528(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(4171);const i=function(t,e,n){"__proto__"==e&&r.A?(0,r.A)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},4507(t,e,n){"use strict";n.d(e,{A:()=>H});var r=n(2080),i=n(2641),a=n(2851),s=n(2031),o=n(7422);const l=function(t,e){return t&&(0,s.A)(e,(0,o.A)(e),t)};var c=n(9999);const h=function(t,e){return t&&(0,s.A)(e,(0,c.A)(e),t)};var u=n(154),d=n(9759),p=n(4792);const f=function(t,e){return(0,s.A)(t,(0,p.A)(t),e)};var g=n(3511);const m=function(t,e){return(0,s.A)(t,(0,g.A)(t),e)};var y=n(9042),v=n(3973),x=n(9137),b=Object.prototype.hasOwnProperty;const w=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&b.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var T=n(565);const k=function(t,e){var n=e?(0,T.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var E=/\w*$/;const A=function(t){var e=new t.constructor(t.source,E.exec(t));return e.lastIndex=t.lastIndex,e};var _=n(241),C=_.A?_.A.prototype:void 0,S=C?C.valueOf:void 0;const R=function(t){return S?Object(S.call(t)):{}};var L=n(1801);const D=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,T.A)(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return k(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,L.A)(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return A(t);case"[object Symbol]":return R(t)}};var I=n(407),N=n(2049),M=n(1200),O=n(3098);const P=function(t){return(0,O.A)(t)&&"[object Map]"==(0,x.A)(t)};var $=n(2789),B=n(4841),F=B.A&&B.A.isMap;const z=F?(0,$.A)(F):P;var K=n(3149);const q=function(t){return(0,O.A)(t)&&"[object Set]"==(0,x.A)(t)};var U=B.A&&B.A.isSet;const j=U?(0,$.A)(U):q;var Y="[object Arguments]",G="[object Function]",W="[object Object]",V={};V[Y]=V["[object Array]"]=V["[object ArrayBuffer]"]=V["[object DataView]"]=V["[object Boolean]"]=V["[object Date]"]=V["[object Float32Array]"]=V["[object Float64Array]"]=V["[object Int8Array]"]=V["[object Int16Array]"]=V["[object Int32Array]"]=V["[object Map]"]=V["[object Number]"]=V[W]=V["[object RegExp]"]=V["[object Set]"]=V["[object String]"]=V["[object Symbol]"]=V["[object Uint8Array]"]=V["[object Uint8ClampedArray]"]=V["[object Uint16Array]"]=V["[object Uint32Array]"]=!0,V["[object Error]"]=V[G]=V["[object WeakMap]"]=!1;const H=function t(e,n,s,p,g,b){var T,k=1&n,E=2&n,A=4&n;if(s&&(T=g?s(e,p,g,b):s(e)),void 0!==T)return T;if(!(0,K.A)(e))return e;var _=(0,N.A)(e);if(_){if(T=w(e),!k)return(0,d.A)(e,T)}else{var C=(0,x.A)(e),S=C==G||"[object GeneratorFunction]"==C;if((0,M.A)(e))return(0,u.A)(e,k);if(C==W||C==Y||S&&!g){if(T=E||S?{}:(0,I.A)(e),!k)return E?m(e,h(T,e)):f(e,l(T,e))}else{if(!V[C])return g?e:{};T=D(e,C,k)}}b||(b=new r.A);var R=b.get(e);if(R)return R;b.set(e,T),j(e)?e.forEach(function(r){T.add(t(r,n,s,r,e,b))}):z(e)&&e.forEach(function(r,i){T.set(i,t(r,n,s,i,e,b))});var L=A?E?v.A:y.A:E?c.A:o.A,O=_?void 0:L(e);return(0,i.A)(O||e,function(r,i){O&&(r=e[i=r]),(0,a.A)(T,i,t(r,n,s,i,e,b))}),T}},4288(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(9841),i=n(8446);const a=function(t,e){return function(n,r){if(null==n)return n;if(!(0,i.A)(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s<a)&&!1!==r(o[s],s,o););return n}}(r.A)},2559(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(1882);const i=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var s=t[i],o=e(s);if(null!=o&&(void 0===l?o==o&&!(0,r.A)(o):n(o,l)))var l=o,c=s}return c}},1790(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(4288);const i=function(t,e){var n=[];return(0,r.A)(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}},5707(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},7671(t,e,n){"use strict";n.d(e,{A:()=>c});var r=n(6912),i=n(241),a=n(5175),s=n(2049),o=i.A?i.A.isConcatSpreadable:void 0;const l=function(t){return(0,s.A)(t)||(0,a.A)(t)||!!(o&&t&&t[o])};const c=function t(e,n,i,a,s){var o=-1,c=e.length;for(i||(i=l),s||(s=[]);++o<c;){var h=e[o];n>0&&i(h)?n>1?t(h,n-1,i,a,s):(0,r.A)(s,h):a||(s[s.length]=h)}return s}},7132(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),o=s.length;o--;){var l=s[t?o:++i];if(!1===n(a[l],l,a))break}return e}}()},9841(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(7132),i=n(7422);const a=function(t,e){return t&&(0,r.A)(t,e,i.A)}},6318(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(1521),i=n(901);const a=function(t,e){for(var n=0,a=(e=(0,r.A)(e,t)).length;null!=t&&n<a;)t=t[(0,i.A)(e[n++])];return n&&n==a?t:void 0}},3831(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(6912),i=n(2049);const a=function(t,e,n){var a=e(t);return(0,i.A)(t)?a:(0,r.A)(a,n(t))}},9672(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(241),i=n(451),a=n(5606),s=r.A?r.A.toStringTag:void 0;const o=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?(0,i.A)(t):(0,a.A)(t)}},5205(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(5707);const i=function(t){return t!=t};const a=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1};const s=function(t,e,n){return e==e?a(t,e,n):(0,r.A)(t,i,n)}},6307(t,e,n){"use strict";n.d(e,{A:()=>W});var r=n(2080),i=n(8300),a=n(3736),s=n(4099);const o=function(t,e,n,r,o,l){var c=1&n,h=t.length,u=e.length;if(h!=u&&!(c&&u>h))return!1;var d=l.get(t),p=l.get(e);if(d&&p)return d==e&&p==t;var f=-1,g=!0,m=2&n?new i.A:void 0;for(l.set(t,e),l.set(e,t);++f<h;){var y=t[f],v=e[f];if(r)var x=c?r(v,y,f,e,t,l):r(y,v,f,t,e,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!(0,a.A)(e,function(t,e){if(!(0,s.A)(m,e)&&(y===t||o(y,t,n,r,l)))return m.push(e)})){g=!1;break}}else if(y!==v&&!o(y,v,n,r,l)){g=!1;break}}return l.delete(t),l.delete(e),g};var l=n(241),c=n(3988),h=n(6984);const u=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n};var d=n(9959),p=l.A?l.A.prototype:void 0,f=p?p.valueOf:void 0;const g=function(t,e,n,r,i,a,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new c.A(t),new c.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,h.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=u;case"[object Set]":var p=1&r;if(l||(l=d.A),t.size!=e.size&&!p)return!1;var g=s.get(t);if(g)return g==e;r|=2,s.set(t,e);var m=o(l(t),l(e),r,i,a,s);return s.delete(t),m;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1};var m=n(9042),y=Object.prototype.hasOwnProperty;const v=function(t,e,n,r,i,a){var s=1&n,o=(0,m.A)(t),l=o.length;if(l!=(0,m.A)(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:y.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var f=s;++c<l;){var g=t[h=o[c]],v=e[h];if(r)var x=s?r(v,g,h,e,t,a):r(g,v,h,t,e,a);if(!(void 0===x?g===v||i(g,v,n,r,a):x)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(t),a.delete(e),p};var x=n(9137),b=n(2049),w=n(1200),T=n(4749),k="[object Arguments]",E="[object Array]",A="[object Object]",_=Object.prototype.hasOwnProperty;const C=function(t,e,n,i,a,s){var l=(0,b.A)(t),c=(0,b.A)(e),h=l?E:(0,x.A)(t),u=c?E:(0,x.A)(e),d=(h=h==k?A:h)==A,p=(u=u==k?A:u)==A,f=h==u;if(f&&(0,w.A)(t)){if(!(0,w.A)(e))return!1;l=!0,d=!1}if(f&&!d)return s||(s=new r.A),l||(0,T.A)(t)?o(t,e,n,i,a,s):g(t,e,h,n,i,a,s);if(!(1&n)){var m=d&&_.call(t,"__wrapped__"),y=p&&_.call(e,"__wrapped__");if(m||y){var C=m?t.value():t,S=y?e.value():e;return s||(s=new r.A),a(C,S,n,i,s)}}return!!f&&(s||(s=new r.A),v(t,e,n,i,a,s))};var S=n(3098);const R=function t(e,n,r,i,a){return e===n||(null==e||null==n||!(0,S.A)(e)&&!(0,S.A)(n)?e!=e&&n!=n:C(e,n,r,i,t,a))};const L=function(t,e,n,i){var a=n.length,s=a,o=!i;if(null==t)return!s;for(t=Object(t);a--;){var l=n[a];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++a<s;){var c=(l=n[a])[0],h=t[c],u=l[1];if(o&&l[2]){if(void 0===h&&!(c in t))return!1}else{var d=new r.A;if(i)var p=i(h,u,c,t,e,d);if(!(void 0===p?R(u,h,3,i,d):p))return!1}}return!0};var D=n(3149);const I=function(t){return t==t&&!(0,D.A)(t)};var N=n(7422);const M=function(t){for(var e=(0,N.A)(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,I(i)]}return e};const O=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};const P=function(t){var e=M(t);return 1==e.length&&e[0][2]?O(e[0][0],e[0][1]):function(n){return n===t||L(n,t,e)}};var $=n(6318);const B=function(t,e,n){var r=null==t?void 0:(0,$.A)(t,e);return void 0===r?n:r};var F=n(6964),z=n(6586),K=n(901);const q=function(t,e){return(0,z.A)(t)&&I(e)?O((0,K.A)(t),e):function(n){var r=B(n,t);return void 0===r&&r===e?(0,F.A)(n,t):R(e,r,3)}};var U=n(9008),j=n(805);const Y=function(t){return function(e){return(0,$.A)(e,t)}};const G=function(t){return(0,z.A)(t)?(0,j.A)((0,K.A)(t)):Y(t)};const W=function(t){return"function"==typeof t?t:null==t?U.A:"object"==typeof t?(0,b.A)(t)?q(t[0],t[1]):P(t):G(t)}},4453(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(7271);const i=(0,n(367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,r.A)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},6224(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){return t<e}},2568(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(4288),i=n(8446);const a=function(t,e){var n=-1,a=(0,i.A)(t)?Array(t.length):[];return(0,r.A)(t,function(t,r,i){a[++n]=e(t,r,i)}),a}},5507(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(6318),i=n(2851),a=n(1521),s=n(5353),o=n(3149),l=n(901);const c=function(t,e,n,r){if(!(0,o.A)(t))return t;for(var c=-1,h=(e=(0,a.A)(e,t)).length,u=h-1,d=t;null!=d&&++c<h;){var p=(0,l.A)(e[c]),f=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(c!=u){var g=d[p];void 0===(f=r?r(g,p,d):void 0)&&(f=(0,o.A)(g)?g:(0,s.A)(e[c+1])?[]:{})}(0,i.A)(d,p,f),d=d[p]}return t};const h=function(t,e,n){for(var i=-1,s=e.length,o={};++i<s;){var l=e[i],h=(0,r.A)(t,l);n(h,l)&&c(o,(0,a.A)(l,t),h)}return o}},805(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return function(e){return null==e?void 0:e[t]}}},4326(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(9008),i=n(5255),a=n(7424);const s=function(t,e){return(0,a.A)((0,i.A)(t,e,r.A),t+"")}},2789(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return function(e){return t(e)}}},7371(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(8300),i=n(5530),a=n(7809),s=n(4099),o=n(9857),l=n(9921),c=n(9959);const h=o.A&&1/(0,c.A)(new o.A([,-0]))[1]==1/0?function(t){return new o.A(t)}:l.A;const u=function(t,e,n){var o=-1,l=i.A,u=t.length,d=!0,p=[],f=p;if(n)d=!1,l=a.A;else if(u>=200){var g=e?null:h(t);if(g)return(0,c.A)(g);d=!1,l=s.A,f=new r.A}else f=e?[]:p;t:for(;++o<u;){var m=t[o],y=e?e(m):m;if(m=n||0!==m?m:0,d&&y==y){for(var v=f.length;v--;)if(f[v]===y)continue t;e&&f.push(y),p.push(m)}else l(f,y,n)||(f!==p&&f.push(y),p.push(m))}return p}},4099(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){return t.has(e)}},9922(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(9008);const i=function(t){return"function"==typeof t?t:r.A}},1521(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(2049),i=n(6586),a=n(6632);var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;const l=function(t){var e=(0,a.A)(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)}),e});var c=n(3456);const h=function(t,e){return(0,r.A)(t)?t:(0,i.A)(t,e)?[t]:l((0,c.A)(t))}},565(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(3988);const i=function(t){var e=new t.constructor(t.byteLength);return new r.A(e).set(new r.A(t)),e}},154(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1917),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===i?r.A.Buffer:void 0,o=s?s.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var n=t.length,r=o?o(n):new t.constructor(n);return t.copy(r),r}},1801(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(565);const i=function(t,e){var n=e?(0,r.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},9759(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},2031(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(2851),i=n(2528);const a=function(t,e,n,a){var s=!n;n||(n={});for(var o=-1,l=e.length;++o<l;){var c=e[o],h=a?a(n[c],t[c],c,n,t):void 0;void 0===h&&(h=t[c]),s?(0,i.A)(n,c,h):(0,r.A)(n,c,h)}return n}},3767(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(4326),i=n(6832);const a=function(t){return(0,r.A)(function(e,n){var r=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(a--,s):void 0,o&&(0,i.A)(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++r<a;){var l=n[r];l&&t(e,l,r,s)}return e})}},4171(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(8562);const i=function(){try{var t=(0,r.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},2136(t,e,n){"use strict";n.d(e,{A:()=>r});const r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},9042(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(3831),i=n(4792),a=n(7422);const s=function(t){return(0,r.A)(t,a.A,i.A)}},3973(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(3831),i=n(3511),a=n(9999);const s=function(t){return(0,r.A)(t,a.A,i.A)}},8562(t,e,n){"use strict";n.d(e,{A:()=>v});var r=n(9610);const i=n(1917).A["__core-js_shared__"];var a,s=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const o=function(t){return!!s&&s in t};var l=n(3149),c=n(1121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.A)(t)||o(t))&&((0,r.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const v=function(t,e){var n=y(t,e);return m(n)?n:void 0}},5647(t,e,n){"use strict";n.d(e,{A:()=>r});const r=(0,n(367).A)(Object.getPrototypeOf,Object)},451(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(241),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,o=r.A?r.A.toStringTag:void 0;const l=function(t){var e=a.call(t,o),n=t[o];try{t[o]=void 0;var r=!0}catch(l){}var i=s.call(t);return r&&(e?t[o]=n:delete t[o]),i}},4792(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2634),i=n(3153),a=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const o=s?function(t){return null==t?[]:(t=Object(t),(0,r.A)(s(t),function(e){return a.call(t,e)}))}:i.A},3511(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(6912),i=n(5647),a=n(4792),s=n(3153);const o=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,r.A)(e,(0,a.A)(t)),t=(0,i.A)(t);return e}:s.A},9137(t,e,n){"use strict";n.d(e,{A:()=>k});var r=n(8562),i=n(1917);const a=(0,r.A)(i.A,"DataView");var s=n(8335);const o=(0,r.A)(i.A,"Promise");var l=n(9857);const c=(0,r.A)(i.A,"WeakMap");var h=n(9672),u=n(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(a),v=(0,u.A)(s.A),x=(0,u.A)(o),b=(0,u.A)(l.A),w=(0,u.A)(c),T=h.A;(a&&T(new a(new ArrayBuffer(1)))!=m||s.A&&T(new s.A)!=d||o&&T(o.resolve())!=p||l.A&&T(new l.A)!=f||c&&T(new c)!=g)&&(T=function(t){var e=(0,h.A)(t),n="[object Object]"==e?t.constructor:void 0,r=n?(0,u.A)(n):"";if(r)switch(r){case y:return m;case v:return d;case x:return p;case b:return f;case w:return g}return e});const k=T},5054(t,e,n){"use strict";n.d(e,{A:()=>c});var r=n(1521),i=n(5175),a=n(2049),s=n(5353),o=n(5254),l=n(901);const c=function(t,e,n){for(var c=-1,h=(e=(0,r.A)(e,t)).length,u=!1;++c<h;){var d=(0,l.A)(e[c]);if(!(u=null!=t&&n(t,d)))break;t=t[d]}return u||++c!=h?u:!!(h=null==t?0:t.length)&&(0,o.A)(h)&&(0,s.A)(d,h)&&((0,a.A)(t)||(0,i.A)(t))}},407(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(3149),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,r.A)(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var s=n(5647),o=n(7271);const l=function(t){return"function"!=typeof t.constructor||(0,o.A)(t)?{}:a((0,s.A)(t))}},5353(t,e,n){"use strict";n.d(e,{A:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},6832(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(6984),i=n(8446),a=n(5353),s=n(3149);const o=function(t,e,n){if(!(0,s.A)(n))return!1;var o=typeof e;return!!("number"==o?(0,i.A)(n)&&(0,a.A)(e,n.length):"string"==o&&e in n)&&(0,r.A)(n[e],t)}},6586(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2049),i=n(1882),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const o=function(t,e){if((0,r.A)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,i.A)(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}},7271(t,e,n){"use strict";n.d(e,{A:()=>i});var r=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},4841(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===i&&r.A.process;const o=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}()},5606(t,e,n){"use strict";n.d(e,{A:()=>i});var r=Object.prototype.toString;const i=function(t){return r.call(t)}},367(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},5255(t,e,n){"use strict";n.d(e,{A:()=>a});const r=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var i=Math.max;const a=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,o=i(a.length-e,0),l=Array(o);++s<o;)l[s]=a[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=a[s];return c[e]=n(l),r(t,this,c)}}},1917(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(2136),i="object"==typeof self&&self&&self.Object===Object&&self;const a=r.A||i||Function("return this")()},9959(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},7424(t,e,n){"use strict";n.d(e,{A:()=>c});var r=n(9142),i=n(4171),a=n(9008);const s=i.A?function(t,e){return(0,i.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.A)(e),writable:!0})}:a.A;var o=Date.now;const l=function(t){var e=0,n=0;return function(){var r=o(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const c=l(s)},901(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(1882);const i=function(t){if("string"==typeof t||(0,r.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1121(t,e,n){"use strict";n.d(e,{A:()=>i});var r=Function.prototype.toString;const i=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},53(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(4507);const i=function(t){return(0,r.A)(t,4)}},9142(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return function(){return t}}},3068(t,e,n){"use strict";n.d(e,{A:()=>c});var r=n(4326),i=n(6984),a=n(6832),s=n(9999),o=Object.prototype,l=o.hasOwnProperty;const c=(0,r.A)(function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&(0,a.A)(e[0],e[1],c)&&(r=1);++n<r;)for(var h=e[n],u=(0,s.A)(h),d=-1,p=u.length;++d<p;){var f=u[d],g=t[f];(void 0===g||(0,i.A)(g,o[f])&&!l.call(t,f))&&(t[f]=h[f])}return t})},6984(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},4092(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2634),i=n(1790),a=n(6307),s=n(2049);const o=function(t,e){return((0,s.A)(t)?r.A:i.A)(t,(0,a.A)(e,3))}},473(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(6307),i=n(8446),a=n(7422);const s=function(t){return function(e,n,s){var o=Object(e);if(!(0,i.A)(e)){var l=(0,r.A)(n,3);e=(0,a.A)(e),n=function(t){return l(o[t],t,o)}}var c=t(e,n,s);return c>-1?o[l?e[c]:c]:void 0}};var o=n(5707),l=n(8593),c=Math.max;const h=s(function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var a=null==n?0:(0,l.A)(n);return a<0&&(a=c(i+a,0)),(0,o.A)(t,(0,r.A)(e,3),a)})},8139(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(7671),i=n(4722);const a=function(t,e){return(0,r.A)((0,i.A)(t,e),1)}},1717(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(7671);const i=function(t){return(null==t?0:t.length)?(0,r.A)(t,1):[]}},8058(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(2641),i=n(4288),a=n(9922),s=n(2049);const o=function(t,e){return((0,s.A)(t)?r.A:i.A)(t,(0,a.A)(e))}},9622(t,e,n){"use strict";n.d(e,{A:()=>s});var r=Object.prototype.hasOwnProperty;const i=function(t,e){return null!=t&&r.call(t,e)};var a=n(5054);const s=function(t,e){return null!=t&&(0,a.A)(t,e,i)}},6964(t,e,n){"use strict";n.d(e,{A:()=>a});const r=function(t,e){return null!=t&&e in Object(t)};var i=n(5054);const a=function(t,e){return null!=t&&(0,i.A)(t,e,r)}},9008(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return t}},5175(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(9672),i=n(3098);const a=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,r.A)(t)};var s=Object.prototype,o=s.hasOwnProperty,l=s.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,i.A)(t)&&o.call(t,"callee")&&!l.call(t,"callee")};const h=c},2049(t,e,n){"use strict";n.d(e,{A:()=>r});const r=Array.isArray},8446(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(9610),i=n(5254);const a=function(t){return null!=t&&(0,i.A)(t.length)&&!(0,r.A)(t)}},3533(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(8446),i=n(3098);const a=function(t){return(0,i.A)(t)&&(0,r.A)(t)}},1200(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1917);const i=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof module&&module&&!module.nodeType&&module,o=s&&s.exports===a?r.A.Buffer:void 0;const l=(o?o.isBuffer:void 0)||i},6401(t,e,n){"use strict";n.d(e,{A:()=>d});var r=n(4453),i=n(9137),a=n(5175),s=n(2049),o=n(8446),l=n(1200),c=n(7271),h=n(4749),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,o.A)(t)&&((0,s.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,i.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,r.A)(t).length;for(var n in t)if(u.call(t,n))return!1;return!0}},9610(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(9672),i=n(3149);const a=function(t){if(!(0,i.A)(t))return!1;var e=(0,r.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},9703(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(9672),i=n(2049),a=n(3098);const s=function(t){return"string"==typeof t||!(0,i.A)(t)&&(0,a.A)(t)&&"[object String]"==(0,r.A)(t)}},1882(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(9672),i=n(3098);const a=function(t){return"symbol"==typeof t||(0,i.A)(t)&&"[object Symbol]"==(0,r.A)(t)}},4749(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(9672),i=n(5254),a=n(3098),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const o=function(t){return(0,a.A)(t)&&(0,i.A)(t.length)&&!!s[(0,r.A)(t)]};var l=n(2789),c=n(4841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):o},9592(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){return void 0===t}},7422(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(2505),i=n(4453),a=n(8446);const s=function(t){return(0,a.A)(t)?(0,r.A)(t):(0,i.A)(t)}},9999(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(2505),i=n(3149),a=n(7271);const s=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var o=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,i.A)(t))return s(t);var e=(0,a.A)(t),n=[];for(var r in t)("constructor"!=r||!e&&o.call(t,r))&&n.push(r);return n};var c=n(8446);const h=function(t){return(0,c.A)(t)?(0,r.A)(t,!0):l(t)}},6666(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},4722(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(5572),i=n(6307),a=n(2568),s=n(2049);const o=function(t,e){return((0,s.A)(t)?r.A:a.A)(t,(0,i.A)(e,3))}},6632(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(2050);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=t.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(i.Cache||r.A),n}i.Cache=r.A;const a=i},7222(t,e,n){"use strict";n.d(e,{A:()=>M});var r=n(2080),i=n(2528),a=n(6984);const s=function(t,e,n){(void 0!==n&&!(0,a.A)(t[e],n)||void 0===n&&!(e in t))&&(0,i.A)(t,e,n)};var o=n(7132),l=n(154),c=n(1801),h=n(9759),u=n(407),d=n(5175),p=n(2049),f=n(3533),g=n(1200),m=n(9610),y=n(3149),v=n(9672),x=n(5647),b=n(3098),w=Function.prototype,T=Object.prototype,k=w.toString,E=T.hasOwnProperty,A=k.call(Object);const _=function(t){if(!(0,b.A)(t)||"[object Object]"!=(0,v.A)(t))return!1;var e=(0,x.A)(t);if(null===e)return!0;var n=E.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&k.call(n)==A};var C=n(4749);const S=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var R=n(2031),L=n(9999);const D=function(t){return(0,R.A)(t,(0,L.A)(t))};const I=function(t,e,n,r,i,a,o){var v=S(t,n),x=S(e,n),b=o.get(x);if(b)s(t,n,b);else{var w=a?a(v,x,n+"",t,e,o):void 0,T=void 0===w;if(T){var k=(0,p.A)(x),E=!k&&(0,g.A)(x),A=!k&&!E&&(0,C.A)(x);w=x,k||E||A?(0,p.A)(v)?w=v:(0,f.A)(v)?w=(0,h.A)(v):E?(T=!1,w=(0,l.A)(x,!0)):A?(T=!1,w=(0,c.A)(x,!0)):w=[]:_(x)||(0,d.A)(x)?(w=v,(0,d.A)(v)?w=D(v):(0,y.A)(v)&&!(0,m.A)(v)||(w=(0,u.A)(x))):T=!1}T&&(o.set(x,w),i(w,x,r,a,o),o.delete(x)),s(t,n,w)}};const N=function t(e,n,i,a,l){e!==n&&(0,o.A)(n,function(o,c){if(l||(l=new r.A),(0,y.A)(o))I(e,n,c,i,t,a,l);else{var h=a?a(S(e,c),o,c+"",e,n,l):void 0;void 0===h&&(h=o),s(e,c,h)}},L.A)};const M=(0,n(3767).A)(function(t,e,n){N(t,e,n)})},6452(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(2559),i=n(6224),a=n(9008);const s=function(t){return t&&t.length?(0,r.A)(t,a.A,i.A):void 0}},9921(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(){}},3130(t,e,n){"use strict";n.d(e,{A:()=>l});const r=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n};var i=n(4288),a=n(6307);const s=function(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n};var o=n(2049);const l=function(t,e,n){var l=(0,o.A)(t)?r:s,c=arguments.length<3;return l(t,(0,a.A)(e,4),n,c,i.A)}},3153(t,e,n){"use strict";n.d(e,{A:()=>r});const r=function(){return[]}},3631(t,e,n){"use strict";n.d(e,{A:()=>g});var r=/\s/;const i=function(t){for(var e=t.length;e--&&r.test(t.charAt(e)););return e};var a=/^\s+/;const s=function(t){return t?t.slice(0,i(t)+1).replace(a,""):t};var o=n(3149),l=n(1882),c=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;const p=function(t){if("number"==typeof t)return t;if((0,l.A)(t))return NaN;if((0,o.A)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,o.A)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var n=h.test(t);return n||u.test(t)?d(t.slice(2),n?2:8):c.test(t)?NaN:+t};var f=1/0;const g=function(t){return t?(t=p(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8593(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(3631);const i=function(t){var e=(0,r.A)(t),n=e%1;return e==e?n?e-n:e:0}},3456(t,e,n){"use strict";n.d(e,{A:()=>h});var r=n(241),i=n(5572),a=n(2049),s=n(1882),o=r.A?r.A.prototype:void 0,l=o?o.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,a.A)(e))return(0,i.A)(e,t)+"";if((0,s.A)(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};const h=function(t){return null==t?"":c(t)}},2866(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(5572);const i=function(t,e){return(0,r.A)(e,function(e){return t[e]})};var a=n(7422);const s=function(t){return null==t?[]:i(t,(0,a.A)(t))}},9311(t,e,n){"use strict";n.d(e,{diagram:()=>Z});var r=n(1475),i=n(6779),a=n(5871),s=n(796),o=n(4098),l=n(797),c=n(8731),h=n(165),u=n(8908),d=n(1444),p={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,l.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,l.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,l.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,l.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},g={L:(0,l.K2)((t,e)=>t-e+2,"L"),R:(0,l.K2)((t,e)=>t-2,"R"),T:(0,l.K2)((t,e)=>t-e+2,"T"),B:(0,l.K2)((t,e)=>t-2,"B")},m=(0,l.K2)(function(t){return v(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),y=(0,l.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),v=(0,l.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),x=(0,l.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),b=(0,l.K2)(function(t,e){const n=v(t)&&x(e),r=x(t)&&v(e);return n||r},"isArchitectureDirectionXY"),w=(0,l.K2)(function(t){const e=t[0],n=t[1],r=v(e)&&x(n),i=x(e)&&v(n);return r||i},"isArchitecturePairXY"),T=(0,l.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),k=(0,l.K2)(function(t,e){const n=`${t}${e}`;return T(n)?n:void 0},"getArchitectureDirectionPair"),E=(0,l.K2)(function([t,e],n){const r=n[0],i=n[1];return v(r)?x(i)?[t+("L"===r?-1:1),e+("T"===i?1:-1)]:[t+("L"===r?-1:1),e]:v(i)?[t+("L"===i?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]},"shiftPositionByArchitectureDirectionPair"),A=(0,l.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),_=(0,l.K2)(function(t,e){return b(t,e)?"bend":v(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),C=(0,l.K2)(function(t){return"service"===t.type},"isArchitectureService"),S=(0,l.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),R=(0,l.K2)(t=>t.data(),"edgeData"),L=(0,l.K2)(t=>t.data(),"nodeData"),D=o.UI.architecture,I=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI,this.clear()}static{(0,l.K2)(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,o.IU)()}addService({id:t,icon:e,in:n,title:r,iconText:i}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==n){if(t===n)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[n])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[n])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:r,edges:[],in:n}}getServices(){return Object.values(this.nodes).filter(C)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==e){if(t===e)throw new Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(S)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:n,title:r}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==n){if(t===n)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[n])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[n])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:r,in:n}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!y(n))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(!y(r))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const c=this.nodes[t].in,h=this.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const u={lhsId:t,lhsDir:n,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:r,rhsInto:a,rhsGroup:o,title:l};this.edges.push(u),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const t={},e=Object.entries(this.nodes).reduce((e,[n,r])=>(e[n]=r.edges.reduce((e,r)=>{const i=this.getNode(r.lhsId)?.in,a=this.getNode(r.rhsId)?.in;if(i&&a&&i!==a){const e=_(r.lhsDir,r.rhsDir);"bend"!==e&&(t[i]??={},t[i][a]=e,t[a]??={},t[a][i]=e)}if(r.lhsId===n){const t=k(r.lhsDir,r.rhsDir);t&&(e[t]=r.rhsId)}else{const t=k(r.rhsDir,r.lhsDir);t&&(e[t]=r.lhsId)}return e},{}),e),{}),n=Object.keys(e)[0],r={[n]:1},i=Object.keys(e).reduce((t,e)=>e===n?t:{...t,[e]:1},{}),a=(0,l.K2)(t=>{const n={[t]:[0,0]},a=[t];for(;a.length>0;){const t=a.shift();if(t){r[t]=1,delete i[t];const s=e[t],[o,l]=n[t];Object.entries(s).forEach(([t,e])=>{r[e]||(n[e]=E([o,l],t),a.push(e))})}}return n},"BFS"),s=[a(n)];for(;Object.keys(i).length>0;)s.push(a(Object.keys(i)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,s.$t)({...D,...(0,o.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},N=(0,l.K2)((t,e)=>{(0,a.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),M={parser:{yy:void 0},parse:(0,l.K2)(async t=>{const e=await(0,c.qg)("architecture",t);l.Rm.debug(e);const n=M.parser?.yy;if(!(n instanceof I))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");N(e,n)},"parse")},O=(0,l.K2)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),P=(0,l.K2)(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),$={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:P('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:P('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:P('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:P('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:P('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:i.Gc,blank:{body:P("")}}},B=(0,l.K2)(async function(t,e,n){const r=n.getConfigField("padding"),a=n.getConfigField("iconSize"),l=a/2,c=a/6,h=c/2;await Promise.all(e.edges().map(async e=>{const{source:a,sourceDir:u,sourceArrow:d,sourceGroup:p,target:m,targetDir:y,targetArrow:T,targetGroup:E,label:_}=R(e);let{x:C,y:S}=e[0].sourceEndpoint();const{x:L,y:D}=e[0].midpoint();let{x:I,y:N}=e[0].targetEndpoint();const M=r+4;if(p&&(v(u)?C+="L"===u?-M:M:S+="T"===u?-M:M+18),E&&(v(y)?I+="L"===y?-M:M:N+="T"===y?-M:M+18),p||"junction"!==n.getNode(a)?.type||(v(u)?C+="L"===u?l:-l:S+="T"===u?l:-l),E||"junction"!==n.getNode(m)?.type||(v(y)?I+="L"===y?l:-l:N+="T"===y?l:-l),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${C},${S} L ${L},${D} L${I},${N} `).attr("class","edge").attr("id",(0,s.rY)(a,m,{prefix:"L"})),d){const t=v(u)?g[u](C,c):C-h,n=x(u)?g[u](S,c):S-h;e.insert("polygon").attr("points",f[u](c)).attr("transform",`translate(${t},${n})`).attr("class","arrow")}if(T){const t=v(y)?g[y](I,c):I-h,n=x(y)?g[y](N,c):N-h;e.insert("polygon").attr("points",f[y](c)).attr("transform",`translate(${t},${n})`).attr("class","arrow")}if(_){const t=b(u,y)?"XY":v(u)?"X":"Y";let n=0;n="X"===t?Math.abs(C-I):"Y"===t?Math.abs(S-N)/1.5:Math.abs(C-I)/2;const r=e.append("g");if(await(0,i.GZ)(r,_,{useHtmlLabels:!1,width:n,classes:"architecture-service-label"},(0,o.D7)()),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)r.attr("transform","translate("+L+", "+D+")");else if("Y"===t)r.attr("transform","translate("+L+", "+D+") rotate(-90)");else if("XY"===t){const t=k(u,y);if(t&&w(t)){const e=r.node().getBoundingClientRect(),[n,i]=A(t);r.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*n*i*45})`);const a=r.node().getBoundingClientRect();r.attr("transform",`\n translate(${L}, ${D-e.height/2})\n translate(${n*a.width/2}, ${i*a.height/2})\n rotate(${-1*n*i*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),F=(0,l.K2)(async function(t,e,n){const r=.75*n.getConfigField("padding"),a=n.getConfigField("fontSize"),s=n.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const l=L(e);if("group"===l.type){const{h:c,w:h,x1:u,y1:d}=e.boundingBox(),p=t.append("rect");p.attr("id",`group-${l.id}`).attr("x",u+s).attr("y",d+s).attr("width",h).attr("height",c).attr("class","node-bkg");const f=t.append("g");let g=u,m=d;if(l.icon){const t=f.append("g");t.html(`<g>${await(0,i.WY)(l.icon,{height:r,width:r,fallbackPrefix:$.prefix})}</g>`),t.attr("transform","translate("+(g+s+1)+", "+(m+s+1)+")"),g+=r,m+=a/2-1-2}if(l.label){const t=f.append("g");await(0,i.GZ)(t,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},(0,o.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(g+s+4)+", "+(m+s+2)+")")}n.setElementForId(l.id,p)}}))},"drawGroups"),z=(0,l.K2)(async function(t,e,n){const r=(0,o.D7)();for(const a of n){const n=e.append("g"),s=t.getConfigField("iconSize");if(a.title){const t=n.append("g");await(0,i.GZ)(t,a.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},r),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const l=n.append("g");if(a.icon)l.html(`<g>${await(0,i.WY)(a.icon,{height:s,width:s,fallbackPrefix:$.prefix})}</g>`);else if(a.iconText){l.html(`<g>${await(0,i.WY)("blank",{height:s,width:s,fallbackPrefix:$.prefix})}</g>`);const t=l.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html((0,o.jZ)(a.iconText,r)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/e)};`)}else l.append("path").attr("class","node-bkg").attr("id","node-"+a.id).attr("d",`M0,${s} V5 Q0,0 5,0 H${s-5} Q${s},0 ${s},5 V${s} Z`);n.attr("id",`service-${a.id}`).attr("class","architecture-service");const{width:c,height:h}=n.node().getBBox();a.width=c,a.height=h,t.setElementForId(a.id,n)}return 0},"drawServices"),K=(0,l.K2)(function(t,e,n){n.forEach(n=>{const r=e.append("g"),i=t.getConfigField("iconSize");r.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",i).attr("height",i),r.attr("class","architecture-junction");const{width:a,height:s}=r._groups[0][0].getBBox();r.width=a,r.height=s,t.setElementForId(n.id,r)})},"drawJunctions");function q(t,e,n){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:n.getConfigField("iconSize"),height:n.getConfigField("iconSize")},classes:"node-service"})})}function U(t,e,n){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:n.getConfigField("iconSize"),height:n.getConfigField("iconSize")},classes:"node-junction"})})}function j(t,e){e.nodes().map(e=>{const n=L(e);if("group"===n.type)return;n.x=e.position().x,n.y=e.position().y;t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function Y(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function G(t,e){t.forEach(t=>{const{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:s,lhsDir:o,rhsDir:l,rhsGroup:c,title:h}=t,u=b(t.lhsDir,t.rhsDir)?"segments":"straight",d={id:`${n}-${r}`,label:h,source:n,sourceDir:o,sourceArrow:i,sourceGroup:a,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:r,targetDir:l,targetArrow:s,targetGroup:c,targetEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%"};e.add({group:"edges",data:d,classes:u})})}function W(t,e,n){const r=(0,l.K2)((t,e)=>Object.entries(t).reduce((t,[r,i])=>{let a=0;const s=Object.entries(i);if(1===s.length)return t[r]=s[0][1],t;for(let o=0;o<s.length-1;o++)for(let i=o+1;i<s.length;i++){const[l,c]=s[o],[h,u]=s[i],d=n[l]?.[h];if(d===e)t[r]??=[],t[r]=[...t[r],...c,...u];else if("default"===l||"default"===h)t[r]??=[],t[r]=[...t[r],...c,...u];else{t[`${r}-${a++}`]=c;t[`${r}-${a++}`]=u}}return t},{}),"flattenAlignments"),i=e.map(e=>{const n={},i={};return Object.entries(e).forEach(([e,[r,a]])=>{const s=t.getNode(e)?.in??"default";n[a]??={},n[a][s]??=[],n[a][s].push(e),i[r]??={},i[r][s]??=[],i[r][s].push(e)}),{horiz:Object.values(r(n,"horizontal")).filter(t=>t.length>1),vert:Object.values(r(i,"vertical")).filter(t=>t.length>1)}}),[a,s]=i.reduce(([t,e],{horiz:n,vert:r})=>[[...t,...n],[...e,...r]],[[],[]]);return{horizontal:a,vertical:s}}function V(t,e){const n=[],r=(0,l.K2)(t=>`${t[0]},${t[1]}`,"posToStr"),i=(0,l.K2)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const a=Object.fromEntries(Object.entries(t).map(([t,e])=>[r(e),t])),s=[r([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const t=s.shift();if(t){o[t]=1;const c=a[t];if(c){const h=i(t);Object.entries(l).forEach(([t,i])=>{const l=r([h[0]+i[0],h[1]+i[1]]),u=a[l];u&&!o[l]&&(s.push(l),n.push({[p[t]]:u,[p[m(t)]]:c,gap:1.5*e.getConfigField("iconSize")}))})}}}}),n}function H(t,e,n,r,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{const c=(0,d.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),u=(0,h.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});c.remove(),Y(n,u),q(t,u,i),U(e,u,i),G(r,u);const p=W(i,a,s),f=V(a,i),g=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,n]=t.connectedNodes(),{parent:r}=L(e),{parent:a}=L(n);return r===a?1.5*i.getConfigField("iconSize"):.5*i.getConfigField("iconSize")},edgeElasticity(t){const[e,n]=t.connectedNodes(),{parent:r}=L(e),{parent:i}=L(n);return r===i?.45:.001},alignmentConstraint:p,relativePlacementConstraint:f});g.one("layoutstop",()=>{function t(t,e,n,r){let i,a;const{x:s,y:o}=t,{x:l,y:c}=e;a=(r-o+(s-n)*(o-c)/(s-l))/Math.sqrt(1+Math.pow((o-c)/(s-l),2)),i=Math.sqrt(Math.pow(r-o,2)+Math.pow(n-s,2)-Math.pow(a,2));i/=Math.sqrt(Math.pow(l-s,2)+Math.pow(c-o,2));let h=(l-s)*(r-o)-(c-o)*(n-s);switch(!0){case h>=0:h=1;break;case h<0:h=-1}let u=(l-s)*(n-s)+(c-o)*(r-o);switch(!0){case u>=0:u=1;break;case u<0:u=-1}return a=Math.abs(a)*h,i*=u,{distances:a,weights:i}}(0,l.K2)(t,"getSegmentWeights"),u.startBatch();for(const e of Object.values(u.edges()))if(e.data?.()){const{x:n,y:r}=e.source().position(),{x:i,y:a}=e.target().position();if(n!==i&&r!==a){const n=e.sourceEndpoint(),r=e.targetEndpoint(),{sourceDir:i}=R(e),[a,s]=x(i)?[n.x,r.y]:[r.x,n.y],{weights:o,distances:l}=t(n,r,a,s);e.style("segment-distances",l),e.style("segment-weights",o)}}u.endBatch(),g.run()}),g.run(),u.ready(t=>{l.Rm.info("Ready",t),o(u)})})}(0,i.pC)([{name:$.prefix,icons:$}]),h.A.use(u),(0,l.K2)(q,"addServices"),(0,l.K2)(U,"addJunctions"),(0,l.K2)(j,"positionNodes"),(0,l.K2)(Y,"addGroups"),(0,l.K2)(G,"addEdges"),(0,l.K2)(W,"getAlignments"),(0,l.K2)(V,"getRelativeConstraints"),(0,l.K2)(H,"layoutArchitecture");var X={draw:(0,l.K2)(async(t,e,n,i)=>{const a=i.db,s=a.getServices(),l=a.getJunctions(),c=a.getGroups(),h=a.getEdges(),u=a.getDataStructures(),d=(0,r.D)(e),p=d.append("g");p.attr("class","architecture-edges");const f=d.append("g");f.attr("class","architecture-services");const g=d.append("g");g.attr("class","architecture-groups"),await z(a,f,s),K(a,f,l);const m=await H(s,l,c,h,a,u);await B(p,m,a),await F(g,m,a),j(a,m),(0,o.ot)(void 0,d,a.getConfigField("padding"),a.getConfigField("useMaxWidth"))},"draw")},Z={parser:M,get db(){return new I},renderer:X,styles:O}},7367(t,e,n){"use strict";n.d(e,{diagram:()=>ve});var r=n(2501),i=n(4769),a=n(7879),s=n(6779),o=n(796),l=n(4098),c=n(797),h=n(53),u=n(5582),d=n(5937),p=n(1444),f=n(697),g=function(){var t=(0,c.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,15],n=[1,7],r=[1,13],i=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],f=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 4:r.getLogger().debug("Rule: separator (NL) ");break;case 5:r.getLogger().debug("Rule: separator (Space) ");break;case 6:r.getLogger().debug("Rule: separator (EOF) ");break;case 7:r.getLogger().debug("Rule: hierarchy: ",a[o-1]),r.setHierarchy(a[o-1]);break;case 8:r.getLogger().debug("Stop NL ");break;case 9:r.getLogger().debug("Stop EOF ");break;case 10:r.getLogger().debug("Stop NL2 ");break;case 11:r.getLogger().debug("Stop EOF2 ");break;case 12:r.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:r.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:r.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:r.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:const e=parseInt(a[o]),n=r.generateId();this.$={id:n,type:"space",label:"",width:e,children:[]};break;case 23:r.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr);const i=r.edgeStrToEdgeData(a[o-1].edgeTypeStr);this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:i,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:r.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:r.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:r.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:r.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:r.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:r.getLogger().debug("APA123",this?this:"na"),r.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:r.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]);r.generateId();this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:r.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]);const s=r.generateId();this.$={id:s,type:"composite",label:"",children:a[o-1]};break;case 29:r.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:r.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:r.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:r.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:s,43:o,46:l},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:n,28:r,29:i,31:a,39:s,43:o,46:l}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(f,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(f,[2,24]),{10:e,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:n,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(f,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",l=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,c.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,l,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,n,r){switch(n){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function x(){this.yy={}}return y.lexer=v,(0,c.K2)(x,"Parser"),x.prototype=y,y.Parser=x,new x}();g.parser=g;var m=g,y=new Map,v=[],x=new Map,b="color",w="fill",T=(0,l.D7)(),k=new Map,E=(0,c.K2)(t=>l.Y2.sanitizeText(t,T),"sanitizeText"),A=(0,c.K2)(function(t,e=""){let n=k.get(t);n||(n={id:t,styles:[],textStyles:[]},k.set(t,n)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(b).exec(t)){const t=e.replace(w,"bgFill").replace(b,w);n.textStyles.push(t)}n.styles.push(e)})},"addStyleClass"),_=(0,c.K2)(function(t,e=""){const n=y.get(t);null!=e&&(n.styles=e.split(","))},"addStyle2Node"),C=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let n=y.get(t);if(void 0===n){const e=t.trim();n={id:e,type:"na",children:[]},y.set(e,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),S=(0,c.K2)((t,e)=>{const n=t.flat(),r=[],i=n.find(t=>"column-setting"===t?.type),a=i?.columns??-1;for(const s of n)if("number"==typeof a&&a>0&&"column-setting"!==s.type&&"number"==typeof s.widthInColumns&&s.widthInColumns>a&&c.Rm.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=E(s.label)),"classDef"!==s.type)if("applyClass"!==s.type)if("applyStyles"!==s.type)if("column-setting"===s.type)e.columns=s.columns??-1;else if("edge"===s.type){const t=(x.get(s.id)??0)+1;x.set(s.id,t),s.id=t+"-"+s.id,v.push(s)}else{s.label||("composite"===s.type?s.label="":s.label=s.id);const t=y.get(s.id);if(void 0===t?y.set(s.id,s):("na"!==s.type&&(t.type=s.type),s.label!==s.id&&(t.label=s.label)),s.children&&S(s.children,s),"space"===s.type){const t=s.width??1;for(let e=0;e<t;e++){const t=(0,h.A)(s);t.id=t.id+"-"+e,y.set(t.id,t),r.push(t)}}else void 0===t&&r.push(s)}else s?.stylesStr&&_(s.id,s?.stylesStr);else C(s.id,s?.styleClass??"");else A(s.id,s.css);e.children=r},"populateBlockDatabase"),R=[],L={id:"root",type:"composite",children:[],columns:-1},D=(0,c.K2)(()=>{c.Rm.debug("Clear called"),(0,l.IU)(),L={id:"root",type:"composite",children:[],columns:-1},y=new Map([["root",L]]),R=[],k=new Map,v=[],x=new Map},"clear");function I(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function N(t){return c.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function M(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,c.K2)(I,"typeStr2Type"),(0,c.K2)(N,"edgeTypeStr2Type"),(0,c.K2)(M,"edgeStrToEdgeData");var O=0,P=(0,c.K2)(()=>(O++,"id-"+Math.random().toString(36).substr(2,12)+"-"+O),"generateId"),$=(0,c.K2)(t=>{L.children=t,S(t,L),R=L.children},"setHierarchy"),B=(0,c.K2)(t=>{const e=y.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),F=(0,c.K2)(()=>[...y.values()],"getBlocksFlat"),z=(0,c.K2)(()=>R||[],"getBlocks"),K=(0,c.K2)(()=>v,"getEdges"),q=(0,c.K2)(t=>y.get(t),"getBlock"),U=(0,c.K2)(t=>{y.set(t.id,t)},"setBlock"),j=(0,c.K2)(()=>c.Rm,"getLogger"),Y=(0,c.K2)(function(){return k},"getClasses"),G={getConfig:(0,c.K2)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:I,edgeTypeStr2Type:N,edgeStrToEdgeData:M,getLogger:j,getBlocksFlat:F,getBlocks:z,getEdges:K,setHierarchy:$,getBlock:q,setBlock:U,getColumns:B,getClasses:Y,clear:D,generateId:P},W=(0,c.K2)((t,e)=>{const n=d.A,r=n(t,"r"),i=n(t,"g"),a=n(t,"b");return u.A(r,i,a,e)},"fade"),V=(0,c.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${W(t.mainBkg,.5)};\n fill: ${W(t.clusterBkg,.5)};\n stroke: ${W(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,r.o)()}\n`,"getStyles"),H=(0,c.K2)((t,e,n,r)=>{e.forEach(e=>{X[e](t,n,r)})},"insertMarkers"),X={extension:(0,c.K2)((t,e,n)=>{c.Rm.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Z=H,Q=(0,l.D7)()?.block?.padding??8;function J(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(J,"calculateBlockPosition");var tt=(0,c.K2)(t=>{let e=0,n=0;for(const r of t.children){const{width:t,height:i,x:a,y:s}=r.size??{width:0,height:0,x:0,y:0};c.Rm.debug("getMaxChildSize abc95 child:",r.id,"width:",t,"height:",i,"x:",a,"y:",s,r.type),"space"!==r.type&&(t>e&&(e=t/(r.widthInColumns??1)),i>n&&(n=i))}return{width:e,height:n}},"getMaxChildSize");function et(t,e,n=0,r=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",n),t?.size?.width||(t.size={width:n,height:r,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(const n of t.children)et(n,e);const s=tt(t);i=s.width,a=s.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(const e of t.children)e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${a} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+Q*((e.widthInColumns??1)-1),e.size.height=a,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${a}`));for(const n of t.children)et(n,e,i,a);const o=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let h=t.children.length;o>0&&o<l&&(h=o);const u=Math.ceil(l/h);let d=h*(i+Q)+Q,p=u*(a+Q)+Q;if(d<n){c.Rm.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${n} siblingHeight ${r} width ${d}`),d=n,p=r;const e=(n-h*Q-Q)/h,s=(r-u*Q-Q)/u;c.Rm.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",i),c.Rm.debug("Size indata abc88",t.id,"childHeight",s,"maxHeight",a),c.Rm.debug("Size indata abc88 xSize",h,"padding",Q);for(const n of t.children)n.size&&(n.size.width=e,n.size.height=s,n.size.x=0,n.size.y=0)}if(c.Rm.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${u} columns ${o}${t.children.length} width=${Math.max(d,t.size?.width||0)}`),d<(t?.size?.width||0)){d=t?.size?.width||0;const e=o>0?Math.min(t.children.length,o):t.children.length;if(e>0){const n=(d-e*Q-Q)/e;c.Rm.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,n);for(const e of t.children)e.size&&(e.size.width=n)}}t.size={width:d,height:p,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function nt(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const n=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",n,t),t.children&&t.children.length>0){const r=t?.children[0]?.size?.width??0,i=t.children.length*r+(t.children.length-1)*Q;c.Rm.debug("widthOfChildren 88",i,"posX");const a=new Map;{let e=0;for(const r of t.children){if(!r.size)continue;const{py:t}=J(n,e),i=a.get(t)??0;r.size.height>i&&a.set(t,r.size.height);let s=r?.widthInColumns??1;n>0&&(s=Math.min(s,n-e%n)),e+=s}}const s=new Map;{let t=0;const e=[...a.keys()].sort((t,e)=>t-e);for(const n of e)s.set(n,t),t+=(a.get(n)??0)+Q}let o=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Q,h=0;for(const u of t.children){const r=t;if(!u.size)continue;const{width:i,height:d}=u.size,{px:p,py:f}=J(n,o);if(f!=h&&(h=f,l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Q,c.Rm.debug("New row in layout for block",t.id," and child ",u.id,h)),c.Rm.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${o} (px, py) ${p},${f} (${r?.size?.x},${r?.size?.y}) parent: ${r.id} width: ${i}${Q}`),r.size){const t=i/2;u.size.x=l+Q+t,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${l} new startingPosX${u.size.x} ${t} padding=${Q} width=${i} halfWidth=${t} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(u?.widthInColumns??1)/2}`),l=u.size.x+t;const e=s.get(f)??0,n=a.get(f)??d;u.size.y=r.size.y-r.size.height/2+e+n/2+Q,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${l}${Q}${t}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${i*(u?.widthInColumns??1)/2}`)}u.children&&nt(u,e);let g=u?.widthInColumns??1;n>0&&(g=Math.min(g,n-o%n)),o+=g,c.Rm.debug("abc88 columnsPos",u,o)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function rt(t,{minX:e,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:a,y:s,width:o,height:l}=t.size;a-o/2<e&&(e=a-o/2),s-l/2<n&&(n=s-l/2),a+o/2>r&&(r=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(const a of t.children)({minX:e,minY:n,maxX:r,maxY:i}=rt(a,{minX:e,minY:n,maxX:r,maxY:i}));return{minX:e,minY:n,maxX:r,maxY:i}}function it(t){const e=t.getBlock("root");if(!e)return;et(e,t,0,0),nt(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:n,minY:r,maxX:i,maxY:a}=rt(e);return{x:n,y:r,width:i-n,height:a-r}}(0,c.K2)(et,"setBlockSizes"),(0,c.K2)(nt,"layoutBlocks"),(0,c.K2)(rt,"findBounds"),(0,c.K2)(it,"layout");var at=(0,c.K2)(async(t,e,n,r=!1,i=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const o=(0,l.D7)(),c=(0,l.E)(o);return await(0,s.GZ)(t,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),st=(0,c.K2)((t,e,n,r,i)=>{e.arrowTypeStart&&lt(t,"start",e.arrowTypeStart,n,r,i),e.arrowTypeEnd&&lt(t,"end",e.arrowTypeEnd,n,r,i)},"addEdgeMarkers"),ot={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lt=(0,c.K2)((t,e,n,r,i,a)=>{const s=ot[n];if(!s)return void c.Rm.warn(`Unknown arrow type: ${n}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${r}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),ct={},ht={},ut=(0,c.K2)(async(t,e)=>{const n=(0,l.D7)(),r=(0,l.E)(n),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label"),c="markdown"===e.labelType,h=await(0,s.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},n);o.node().appendChild(h);let u,d=h.getBBox(),f=d;if(r){const t=h.children[0],e=(0,p.Ltv)(h);d=t.getBoundingClientRect(),f=d,e.attr("width",d.width),e.attr("height",d.height)}else{const t=(0,p.Ltv)(h).select("text").node();t&&"function"==typeof t.getBBox&&(f=t.getBBox())}if(o.attr("transform",(0,i.Wg)(f,r)),ct[e.id]=a,e.width=d.width,e.height=d.height,e.startLabelLeft){const n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner"),s=await at(a,e.startLabelLeft,e.labelStyle);u=s;let o=s.getBBox();if(r){const t=s.children[0],e=(0,p.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}a.attr("transform",(0,i.Wg)(o,r)),ht[e.id]||(ht[e.id]={}),ht[e.id].startLeft=n,dt(u,e.startLabelLeft)}if(e.startLabelRight){const n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner"),s=await at(n,e.startLabelRight,e.labelStyle);u=s,a.node().appendChild(s);let o=s.getBBox();if(r){const t=s.children[0],e=(0,p.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}a.attr("transform",(0,i.Wg)(o,r)),ht[e.id]||(ht[e.id]={}),ht[e.id].startRight=n,dt(u,e.startLabelRight)}if(e.endLabelLeft){const n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner"),s=await at(a,e.endLabelLeft,e.labelStyle);u=s;let o=s.getBBox();if(r){const t=s.children[0],e=(0,p.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}a.attr("transform",(0,i.Wg)(o,r)),n.node().appendChild(s),ht[e.id]||(ht[e.id]={}),ht[e.id].endLeft=n,dt(u,e.endLabelLeft)}if(e.endLabelRight){const n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner"),s=await at(a,e.endLabelRight,e.labelStyle);u=s;let o=s.getBBox();if(r){const t=s.children[0],e=(0,p.Ltv)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}a.attr("transform",(0,i.Wg)(o,r)),n.node().appendChild(s),ht[e.id]||(ht[e.id]={}),ht[e.id].endRight=n,dt(u,e.endLabelRight)}return h},"insertEdgeLabel");function dt(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(dt,"setTerminalWidth");var pt=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,ct[t.id],e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(r);if(t.label){const r=ct[t.id];let a=t.x,s=t.y;if(n){const r=o._K.calcLabelPosition(n);c.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,s=r.y)}r.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=ht[t.id].startLeft;let r=t.x,i=t.y;if(n){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=ht[t.id].startRight;let r=t.x,i=t.y;if(n){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=ht[t.id].endLeft;let r=t.x,i=t.y;if(n){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=ht[t.id].endRight;let r=t.x,i=t.y;if(n){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),ft=(0,c.K2)((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),gt=(0,c.K2)((t,e,n)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2;let o=n.x<e.x?s-a:s+a;const l=t.height/2,h=Math.abs(e.y-n.y),u=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*l){let t=n.y<e.y?e.y-l-i:i-l-e.y;o=u*t/h;const r={x:n.x<e.x?n.x+o:n.x-u+o,y:n.y<e.y?n.y+h-t:n.y-h+t};return 0===o&&(r.x=e.x,r.y=e.y),0===u&&(r.x=e.x),0===h&&(r.y=e.y),c.Rm.debug(`abc89 topp/bott calc, Q ${h}, q ${t}, R ${u}, r ${o}`,r),r}{o=n.x<e.x?e.x-s-r:r-s-e.x;let t=h*o/u,i=n.x<e.x?n.x+u-o:n.x-u+o,a=n.y<e.y?n.y+t:n.y-t;return c.Rm.debug(`sides calc abc89, Q ${h}, q ${t}, R ${u}, r ${o}`,{_x:i,_y:a}),0===o&&(i=e.x,a=e.y),0===u&&(i=e.x),0===h&&(a=e.y),{x:i,y:a}}},"intersection"),mt=(0,c.K2)((t,e)=>{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach(t=>{if(ft(e,t)||i)r=t,i||n.push(t);else{const a=gt(e,r,t);let s=!1;n.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),n.some(t=>t.x===a.x&&t.y===a.y)||n.push(a),i=!0}}),n},"cutPathAtIntersect"),yt=(0,c.K2)(function(t,e,n,r,a,s,o){let h=n.points;c.Rm.debug("abc88 InsertEdge: edge=",n,"e=",e);let u=!1;const d=s.node(e.v);var f=s.node(e.w);f?.intersect&&d?.intersect&&(h=h.slice(1,n.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1]))),n.toCluster&&(c.Rm.debug("to cluster abc88",r[n.toCluster]),h=mt(n.points,r[n.toCluster].node),u=!0),n.fromCluster&&(c.Rm.debug("from cluster abc88",r[n.fromCluster]),h=mt(h.reverse(),r[n.fromCluster].node).reverse(),u=!0);const g=h.filter(t=>!Number.isNaN(t.y));let m=p.qrM;!n.curve||"graph"!==a&&"flowchart"!==a||(m=n.curve);const{x:y,y:v}=(0,i.RI)(n),x=(0,p.n8j)().x(y).y(v).curve(m);let b;switch(n.thickness){case"normal":b="edge-thickness-normal";break;case"thick":case"invisible":b="edge-thickness-thick";break;default:b=""}switch(n.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed"}const w=t.append("path").attr("d",x(g)).attr("id",n.id).attr("class"," "+b+(n.classes?" "+n.classes:"")).attr("style",n.style);let T="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(T=(0,l.ID)(!0)),st(w,n,T,o,a);let k={};return u&&(k.updatedPath=h),k.originalPath=n.points,k},"insertEdge"),vt=(0,c.K2)(t=>{const e=new Set;for(const n of t)switch(n){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(n)}return e},"expandAndDeduplicateDirections"),xt=(0,c.K2)((t,e,n)=>{const r=vt(t),i=e.height+2*n.padding,a=i/2,s=e.width+2*a+n.padding,o=n.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:a,y:0},{x:s/2,y:2*o},{x:s-a,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*o,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-a,y:-i},{x:s/2,y:-i-2*o},{x:a,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*o,y:-i/2},{x:0,y:-i/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:a,y:-i},{x:s-a,y:-i},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-a},{x:s,y:-i+a},{x:0,y:-i}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-a},{x:0,y:-i+a},{x:s,y:-i}]:r.has("right")&&r.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-a},{x:0,y:-i}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-a},{x:s,y:-i}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:r.has("right")?[{x:a,y:-o},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i+o}]:r.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:r.has("up")?[{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function bt(t,e){return t.intersect(e)}(0,c.K2)(bt,"intersectNode");var wt=bt;function Tt(t,e,n,r){var i=t.x,a=t.y,s=i-r.x,o=a-r.y,l=Math.sqrt(e*e*o*o+n*n*s*s),c=Math.abs(e*n*s/l);r.x<i&&(c=-c);var h=Math.abs(e*n*o/l);return r.y<a&&(h=-h),{x:i+c,y:a+h}}(0,c.K2)(Tt,"intersectEllipse");var kt=Tt;function Et(t,e,n){return kt(t,e,e,n)}(0,c.K2)(Et,"intersectCircle");var At=Et;function _t(t,e,n,r){var i,a,s,o,l,c,h,u,d,p,f,g,m;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,d=i*n.x+s*n.y+l,p=i*r.x+s*r.y+l,!(0!==d&&0!==p&&Ct(d,p)||(a=r.y-n.y,o=n.x-r.x,c=r.x*n.y-n.x*r.y,h=a*t.x+o*t.y+c,u=a*e.x+o*e.y+c,0!==h&&0!==u&&Ct(h,u)||0===(f=i*o-a*s))))return g=Math.abs(f/2),{x:(m=s*c-o*l)<0?(m-g)/f:(m+g)/f,y:(m=a*l-i*c)<0?(m-g)/f:(m+g)/f}}function Ct(t,e){return t*e>0}(0,c.K2)(_t,"intersectLine"),(0,c.K2)(Ct,"sameSign");var St=_t,Rt=Lt;function Lt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0],p=St(t,n,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),s=e.x-n.x,o=e.y-n.y,l=Math.sqrt(s*s+o*o);return a<l?-1:a===l?0:1}),a[0]):t}(0,c.K2)(Lt,"intersectPolygon");var Dt={node:wt,circle:At,ellipse:kt,polygon:Rt,rect:(0,c.K2)((t,e)=>{var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=0===o?0:c*s/o,r=c):(s<0&&(l=-l),n=l,r=0===s?0:l*o/s),{x:i+n,y:a+r}},"intersectRect")},It=(0,c.K2)(async(t,e,n,r)=>{const i=(0,l.D7)();let c;const h=e.useHtmlLabels||(0,l.E)(i);c=n||"node default";const u=t.insert("g").attr("class",c).attr("id",e.domId||e.id),d=u.insert("g").attr("class","label").attr("style",e.labelStyle);let f,g;f=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],g="markdown"===e.labelType?(0,s.GZ)(d,(0,l.jZ)((0,o.Sm)(f),i),{useHtmlLabels:h,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await at(d,(0,l.jZ)((0,o.Sm)(f),i),e.labelStyle,!1,r);let m=g.getBBox();const y=e.padding/2;if((0,l.E)(i)){const t=g.children[0],e=(0,p.Ltv)(g);await(0,a.X)(t,f),m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}return h?d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):d.attr("transform","translate(0, "+-m.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:u,bbox:m,halfPadding:y,label:d}},"labelHelper"),Nt=(0,c.K2)((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds");function Mt(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}(0,c.K2)(Mt,"insertPolygonShape");var Ot=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:n,bbox:r,halfPadding:i}=await It(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);const a=n.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),Nt(e,a),e.intersect=function(t){return Dt.rect(e,t)},n},"note"),Pt=(0,c.K2)(t=>t?" "+t:"","formatClass"),$t=(0,c.K2)((t,e)=>`${e||"node default"}${Pt(t.classes)} ${Pt(t.class)}`,"getClassesFromNode"),Bt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding+(r.height+e.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");const s=Mt(n,i,i,a);return s.attr("style",e.style),Nt(e,s),e.intersect=function(t){return c.Rm.warn("Intersect called"),Dt.polygon(e,a,t)},n},"question"),Ft=(0,c.K2)((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return n.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Dt.circle(e,14,t)},n},"choice"),zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.height+e.padding,a=i/4,s=r.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=Mt(n,s,i,o);return l.attr("style",e.style),Nt(e,l),e.intersect=function(t){return Dt.polygon(e,o,t)},n},"hexagon"),Kt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,void 0,!0),i=r.height+2*e.padding,a=i/2,s=r.width+2*a+e.padding,o=xt(e.directions,r,e),l=Mt(n,s,i,o);return l.attr("style",e.style),Nt(e,l),e.intersect=function(t){return Dt.polygon(e,o,t)},n},"block_arrow"),qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Mt(n,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return Dt.polygon(e,s,t)},n},"rect_left_inv_arrow"),Ut=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"lean_right"),jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"lean_left"),Yt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"trapezoid"),Gt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"inv_trapezoid"),Wt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"rect_right_inv_arrow"),Vt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=n.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return Nt(e,c),e.intersect=function(t){const n=Dt.rect(e,t),r=n.x-e.x;if(0!=a&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){let i=s*s*(1-r*r/(a*a));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},n},"cylinder"),Ht=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await It(t,e,"node "+e.classes+" "+e.class,!0),a=n.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,l=e.positioned?-s/2:-r.width/2-i,h=e.positioned?-o/2:-r.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Qt(a,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Nt(e,a),e.intersect=function(t){return Dt.rect(e,t)},n},"rect"),Xt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await It(t,e,"node "+e.classes,!0),a=n.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,l=e.positioned?-s/2:-r.width/2-i,h=e.positioned?-o/2:-r.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Qt(a,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Nt(e,a),e.intersect=function(t){return Dt.rect(e,t)},n},"composite"),Zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:n}=await It(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);const r=n.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),n.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Qt(r,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Nt(e,r),e.intersect=function(t){return Dt.rect(e,t)},n},"labelRect");function Qt(t,e,n,r){const i=[],a=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),s=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),a(n)):s(n),e.includes("r")?(c.Rm.debug("add right border"),a(r)):s(r),e.includes("b")?(c.Rm.debug("add bottom border"),a(n)):s(n),e.includes("l")?(c.Rm.debug("add left border"),a(r)):s(r),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(Qt,"applyNodePropertyBorders");var Jt=(0,c.K2)(async(t,e)=>{let n;n=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),s=r.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let h="";h="object"==typeof o?o[0]:o,c.Rm.info("Label text abc79",h,o,"object"==typeof o);const u=await at(s,h,e.labelStyle,!0,!0);let d={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=u.children[0],e=(0,p.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}c.Rm.info("Text 2",o);const f=o.slice(1,o.length);let g=u.getBBox();const m=await at(s,f.join?f.join("<br/>"):f,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=m.children[0],e=(0,p.Ltv)(m);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}const y=e.padding/2;return(0,p.Ltv)(m).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),(0,p.Ltv)(u).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=s.node().getBBox(),s.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+e.padding).attr("height",d.height+e.padding),a.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y),Nt(e,i),e.intersect=function(t){return Dt.rect(e,t)},r},"rectWithTitle"),te=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.height+e.padding,a=r.width+i/4+e.padding,s=n.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Nt(e,s),e.intersect=function(t){return Dt.rect(e,t)},n},"stadium"),ee=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await It(t,e,$t(e,void 0),!0),a=n.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),c.Rm.info("Circle main"),Nt(e,a),e.intersect=function(t){return c.Rm.info("Circle intersect",e,r.width/2+i,t),Dt.circle(e,r.width/2+i,t)},n},"circle"),ne=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r,halfPadding:i}=await It(t,e,$t(e,void 0),!0),a=n.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),c.Rm.info("DoubleCircle main"),Nt(e,s),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,r.width/2+i+5,t),Dt.circle(e,r.width/2+i+5,t)},n},"doublecircle"),re=(0,c.K2)(async(t,e)=>{const{shapeSvg:n,bbox:r}=await It(t,e,$t(e,void 0),!0),i=r.width+e.padding,a=r.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=Mt(n,i,a,s);return o.attr("style",e.style),Nt(e,o),e.intersect=function(t){return Dt.polygon(e,s,t)},n},"subroutine"),ie=(0,c.K2)((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Nt(e,r),e.intersect=function(t){return Dt.circle(e,7,t)},n},"start"),ae=(0,c.K2)((t,e,n)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;"LR"===n&&(i=10,a=70);const s=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Nt(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Dt.rect(e,t)},r},"forkJoin"),se={rhombus:Bt,composite:Xt,question:Bt,rect:Ht,labelRect:Zt,rectWithTitle:Jt,choice:Ft,circle:ee,doublecircle:ne,stadium:te,hexagon:zt,block_arrow:Kt,rect_left_inv_arrow:qt,lean_right:Ut,lean_left:jt,trapezoid:Yt,inv_trapezoid:Gt,rect_right_inv_arrow:Wt,cylinder:Vt,start:ie,end:(0,c.K2)((t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Nt(e,i),e.intersect=function(t){return Dt.circle(e,7,t)},n},"end"),note:Ot,subroutine:re,fork:ae,join:ae,class_box:(0,c.K2)(async(t,e)=>{const n=e.padding/2;let r;r=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),o=i.insert("line");let c=0,h=4;const u=i.insert("g").attr("class","label");let d=0;const f=e.classData.annotations?.[0],g=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",m=await at(u,g,e.labelStyle,!0,!0);let y=m.getBBox();if((0,l.E)((0,l.D7)())){const t=m.children[0],e=(0,p.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}e.classData.annotations[0]&&(h+=y.height+4,c+=y.width);let v=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");const x=await at(u,v,e.labelStyle,!0,!0);(0,p.Ltv)(x).attr("class","classTitle");let b=x.getBBox();if((0,l.E)((0,l.D7)())){const t=x.children[0],e=(0,p.Ltv)(x);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}h+=b.height+4,b.width>c&&(c=b.width);const w=[];e.classData.members.forEach(async t=>{const n=t.getDisplayDetails();let r=n.displayText;(0,l.E)((0,l.D7)())&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=await at(u,r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0);let a=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,p.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,w.push(i)}),h+=8;const T=[];if(e.classData.methods.forEach(async t=>{const n=t.getDisplayDetails();let r=n.displayText;(0,l.E)((0,l.D7)())&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=await at(u,r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0);let a=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,p.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,T.push(i)}),h+=8,f){let t=(c-y.width)/2;(0,p.Ltv)(m).attr("transform","translate( "+(-1*c/2+t)+", "+-1*h/2+")"),d=y.height+4}let k=(c-b.width)/2;return(0,p.Ltv)(x).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*h/2+d)+")"),d+=b.height+4,s.attr("class","divider").attr("x1",-c/2-n).attr("x2",c/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,w.forEach(t=>{(0,p.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d+4)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),d+=8,o.attr("class","divider").attr("x1",-c/2-n).attr("x2",c/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,T.forEach(t=>{(0,p.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),a.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-n).attr("y",-h/2-n).attr("width",c+e.padding).attr("height",h+e.padding),Nt(e,a),e.intersect=function(t){return Dt.rect(e,t)},i},"class_box")},oe={},le=(0,c.K2)(async(t,e,n)=>{let r,i;if(e.link){let a;"sandbox"===(0,l.D7)().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await se[e.shape](r,e,n)}else i=await se[e.shape](t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),oe[e.id]=r,e.haveCallback&&oe[e.id].attr("class",oe[e.id].attr("class")+" clickable"),r},"insertNode"),ce=(0,c.K2)(t=>{const e=oe[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");function he(t,e,n=!1){const r=t;let i="default";(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(" ")),i+=" flowchart-label";let a,s=0,c="";switch(r.type){case"round":s=5,c="rect";break;case"composite":s=0,c="composite",a=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const h=(0,o.sM)(r?.styles??[]),u=r.label,d=r.size??{width:0,height:0,x:0,y:0};return{labelStyle:h.labelStyle,shape:c,labelText:u,rx:s,ry:s,class:i,style:h.style,id:r.id,directions:r.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:n,intersect:void 0,type:r.type,padding:a??(0,l.zj)()?.block?.padding??0}}async function ue(t,e,n){const r=he(e,0,!1);if("group"===r.type)return;const i=(0,l.zj)(),a=await le(t,r,{config:i}),s=a.node().getBBox(),o=n.getBlock(r.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},n.setBlock(o),a.remove()}async function de(t,e,n){const r=he(e,0,!0);if("space"!==n.getBlock(r.id).type){const n=(0,l.zj)();await le(t,r,{config:n}),e.intersect=r?.intersect,ce(r)}}async function pe(t,e,n,r){for(const i of e)await r(t,i,n),i.children&&await pe(t,i.children,n,r)}async function fe(t,e,n){await pe(t,e,n,ue)}async function ge(t,e,n){await pe(t,e,n,de)}async function me(t,e,n,r,i){const a=new f.T({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of n)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of e)if(s.start&&s.end){const e=r.getBlock(s.start),n=r.getBlock(s.end);if(e?.size&&n?.size){const r=e.size,o=n.size,l=[{x:r.x,y:r.y},{x:r.x+(o.x-r.x)/2,y:r.y+(o.y-r.y)/2},{x:o.x,y:o.y}];yt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await ut(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),pt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,c.K2)(he,"getNodeFromBlock"),(0,c.K2)(ue,"calculateBlockSize"),(0,c.K2)(de,"insertBlockPositioned"),(0,c.K2)(pe,"performOperations"),(0,c.K2)(fe,"calculateBlockSizes"),(0,c.K2)(ge,"insertBlocks"),(0,c.K2)(me,"insertEdges");var ye=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),ve={parser:m,db:G,renderer:{draw:(0,c.K2)(async function(t,e,n,r){const{securityLevel:i,block:a}=(0,l.zj)(),s=r.db;let o;"sandbox"===i&&(o=(0,p.Ltv)("#i"+e));const h="sandbox"===i?(0,p.Ltv)(o.nodes()[0].contentDocument.body):(0,p.Ltv)("body"),u="sandbox"===i?h.select(`[id="${e}"]`):(0,p.Ltv)(`[id="${e}"]`);Z(u,["point","circle","cross"],r.type,e);const d=s.getBlocks(),f=s.getBlocksFlat(),g=s.getEdges(),m=u.insert("g").attr("class","block");await fe(m,d,s);const y=it(s);if(await ge(m,d,s),await me(m,g,f,s,e),y){const t=y,e=Math.max(1,Math.round(t.width/t.height*.125)),n=t.height+e+10,r=t.width+10,{useMaxWidth:i}=a;(0,l.a$)(u,n,r,!!i),c.Rm.debug("Here Bounds",y,t),u.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:ye},styles:V}},8659(t,e,n){"use strict";n.d(e,{diagram:()=>Nt});var r=n(5523),i=n(796),a=n(4098),s=n(797),o=n(1444),l=n(6750),h=function(){var t=(0,s.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],h=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],g=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],T=[1,36],k=[1,37],E=[1,38],A=[1,39],_=[1,40],C=[1,41],S=[1,42],R=[1,43],L=[1,44],D=[1,45],I=[1,46],N=[1,47],M=[1,48],O=[1,50],P=[1,51],$=[1,52],B=[1,53],F=[1,54],z=[1,55],K=[1,56],q=[1,57],U=[1,58],j=[1,59],Y=[1,60],G=[14,42],W=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[1,82],X=[1,83],Z=[1,84],Q=[1,85],J=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],nt=[12,33],rt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,s.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:r.setDirection("TB");break;case 4:r.setDirection("BT");break;case 5:r.setDirection("RL");break;case 6:r.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[o-3]);break;case 19:r.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:r.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),r.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:r.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:r.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:r.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:r.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:r.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:r.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:r.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:r.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:r.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:r.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:r.addContainer("container",...a[o]),this.$=a[o];break;case 48:r.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:r.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:r.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:r.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:r.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:r.addComponent("component",...a[o]),this.$=a[o];break;case 54:r.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:r.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:r.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:r.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:r.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:r.addRel("rel",...a[o]),this.$=a[o];break;case 61:r.addRel("birel",...a[o]),this.$=a[o];break;case 62:r.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:r.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:r.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:r.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:r.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),r.addRel("rel",...a[o]),this.$=a[o];break;case 68:r.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:r.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:r.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:let t={};t[a[o-1].trim()]=a[o].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{13:70,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{13:71,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{13:72,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{13:73,19:20,20:21,21:22,22:e,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{14:[1,74]},t(G,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y}),t(G,[2,14]),t(W,[2,16],{12:[1,76]}),t(G,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:H,77:X,79:Z,80:Q},{35:86,75:81,76:H,77:X,79:Z,80:Q},{35:87,75:81,76:H,77:X,79:Z,80:Q},{35:88,75:81,76:H,77:X,79:Z,80:Q},{35:89,75:81,76:H,77:X,79:Z,80:Q},{35:90,75:81,76:H,77:X,79:Z,80:Q},{35:91,75:81,76:H,77:X,79:Z,80:Q},{35:92,75:81,76:H,77:X,79:Z,80:Q},{35:93,75:81,76:H,77:X,79:Z,80:Q},{35:94,75:81,76:H,77:X,79:Z,80:Q},{35:95,75:81,76:H,77:X,79:Z,80:Q},{35:96,75:81,76:H,77:X,79:Z,80:Q},{35:97,75:81,76:H,77:X,79:Z,80:Q},{35:98,75:81,76:H,77:X,79:Z,80:Q},{35:99,75:81,76:H,77:X,79:Z,80:Q},{35:100,75:81,76:H,77:X,79:Z,80:Q},{35:101,75:81,76:H,77:X,79:Z,80:Q},{35:102,75:81,76:H,77:X,79:Z,80:Q},{35:103,75:81,76:H,77:X,79:Z,80:Q},{35:104,75:81,76:H,77:X,79:Z,80:Q},t(J,[2,59]),{35:105,75:81,76:H,77:X,79:Z,80:Q},{35:106,75:81,76:H,77:X,79:Z,80:Q},{35:107,75:81,76:H,77:X,79:Z,80:Q},{35:108,75:81,76:H,77:X,79:Z,80:Q},{35:109,75:81,76:H,77:X,79:Z,80:Q},{35:110,75:81,76:H,77:X,79:Z,80:Q},{35:111,75:81,76:H,77:X,79:Z,80:Q},{35:112,75:81,76:H,77:X,79:Z,80:Q},{35:113,75:81,76:H,77:X,79:Z,80:Q},{35:114,75:81,76:H,77:X,79:Z,80:Q},{35:115,75:81,76:H,77:X,79:Z,80:Q},{20:116,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y},{12:[1,118],33:[1,117]},{35:119,75:81,76:H,77:X,79:Z,80:Q},{35:120,75:81,76:H,77:X,79:Z,80:Q},{35:121,75:81,76:H,77:X,79:Z,80:Q},{35:122,75:81,76:H,77:X,79:Z,80:Q},{35:123,75:81,76:H,77:X,79:Z,80:Q},{35:124,75:81,76:H,77:X,79:Z,80:Q},{35:125,75:81,76:H,77:X,79:Z,80:Q},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(G,[2,15]),t(W,[2,17],{21:22,19:130,22:e,23:n,24:r,26:i,28:a}),t(G,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:r,26:i,28:a,34:o,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:x,49:b,50:w,51:T,52:k,53:E,54:A,55:_,56:C,57:S,58:R,59:L,60:D,61:I,62:N,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:Y}),t(V,[2,21]),t(V,[2,22]),t(J,[2,39]),t(tt,[2,71],{75:81,35:132,76:H,77:X,79:Z,80:Q}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(nt,[2,28]),t(nt,[2,29]),t(nt,[2,30]),t(nt,[2,31]),t(nt,[2,32]),t(nt,[2,33]),t(nt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(W,[2,18]),t(G,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(J,[2,24]),t(J,[2,35]),t(rt,[2,25]),t(rt,[2,26],{12:[1,138]}),t(rt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},at=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,s.K2)(function(t,e,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=at,(0,s.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();h.parser=h;var u,d=h,p=[],f=[""],g="global",m="",y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],v=[],x="",b=!1,w=4,T=2,k=(0,s.K2)(function(){return u},"getC4Type"),E=(0,s.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());u=e},"setC4Type"),A=(0,s.K2)(function(t,e,n,r,i,a,s,o,l){if(null==t||null==e||null==n||null==r)return;let c={};const h=v.find(t=>t.from===e&&t.to===n);if(h?c=h:v.push(c),c.type=t,c.from=e,c.to=n,c.label={text:r},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==a)c.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]={text:e}}else c.descr={text:a};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.link=l;c.wrap=V()},"addRel"),_=(0,s.K2)(function(t,e,n,r,i,a,s){if(null===e||null===n)return;let o={};const l=p.find(t=>t.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,p.push(o)),o.label=null==n?{text:""}:{text:n},null==r)o.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]={text:e}}else o.descr={text:r};if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.sprite=i;if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.tags=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=g,o.wrap=V()},"addPersonOrSystem"),C=(0,s.K2)(function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=V(),l.typeC4Shape={text:t},l.parentBoundary=g},"addContainer"),S=(0,s.K2)(function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=V(),l.typeC4Shape={text:t},l.parentBoundary=g},"addComponent"),R=(0,s.K2)(function(t,e,n,r,i){if(null===t||null===e)return;let a={};const s=y.find(e=>e.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=V(),m=g,g=t,f.push(m)},"addPersonOrSystemBoundary"),L=(0,s.K2)(function(t,e,n,r,i){if(null===t||null===e)return;let a={};const s=y.find(e=>e.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==n)a.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]={text:e}}else a.type={text:n};if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]=e}else a.tags=r;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=V(),m=g,g=t,f.push(m)},"addContainerBoundary"),D=(0,s.K2)(function(t,e,n,r,i,a,s,o){if(null===e||null===n)return;let l={};const c=y.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,y.push(l)),l.label=null==n?{text:""}:{text:n},null==r)l.type={text:"node"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.type={text:r};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.nodeType=t,l.parentBoundary=g,l.wrap=V(),m=g,g=e,f.push(m)},"addDeploymentNode"),I=(0,s.K2)(function(){g=m,f.pop(),m=f.pop(),f.push(m)},"popBoundaryParseStack"),N=(0,s.K2)(function(t,e,n,r,i,a,s,o,l,c,h){let u=p.find(t=>t.alias===e);if(void 0!==u||(u=y.find(t=>t.alias===e),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.fontColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shadowing=a;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shape=s;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.sprite=o;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.techn=l;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}},"updateElStyle"),M=(0,s.K2)(function(t,e,n,r,i,a,s){const o=v.find(t=>t.from===e&&t.to===n);if(void 0!==o){if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.textColor=r;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.lineColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(a);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(s)}},"updateRelStyle"),O=(0,s.K2)(function(t,e,n){let r=w,i=T;if("object"==typeof e){const t=Object.values(e)[0];r=parseInt(t)}else r=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);r>=1&&(w=r),i>=1&&(T=i)},"updateLayoutConfig"),P=(0,s.K2)(function(){return w},"getC4ShapeInRow"),$=(0,s.K2)(function(){return T},"getC4BoundaryInRow"),B=(0,s.K2)(function(){return g},"getCurrentBoundaryParse"),F=(0,s.K2)(function(){return m},"getParentBoundaryParse"),z=(0,s.K2)(function(t){return null==t?p:p.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),K=(0,s.K2)(function(t){return p.find(e=>e.alias===t)},"getC4Shape"),q=(0,s.K2)(function(t){return Object.keys(z(t))},"getC4ShapeKeys"),U=(0,s.K2)(function(t){return null==t?y:y.filter(e=>e.parentBoundary===t)},"getBoundaries"),j=U,Y=(0,s.K2)(function(){return v},"getRels"),G=(0,s.K2)(function(){return x},"getTitle"),W=(0,s.K2)(function(t){b=t},"setWrap"),V=(0,s.K2)(function(){return b},"autoWrap"),H=(0,s.K2)(function(){p=[],y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],m="",g="global",f=[""],v=[],f=[""],x="",b=!1,w=4,T=2},"clear"),X=(0,s.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());x=e},"setTitle"),Z={addPersonOrSystem:_,addPersonOrSystemBoundary:R,addContainer:C,addContainerBoundary:L,addComponent:S,addDeploymentNode:D,popBoundaryParseStack:I,addRel:A,updateElStyle:N,updateRelStyle:M,updateLayoutConfig:O,autoWrap:V,setWrap:W,getC4ShapeArray:z,getC4Shape:K,getC4ShapeKeys:q,getBoundaries:U,getBoundarys:j,getCurrentBoundaryParse:B,getParentBoundaryParse:F,getRels:Y,getTitle:G,getC4Type:k,getC4ShapeInRow:P,getC4BoundaryInRow:$,setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,getConfig:(0,s.K2)(()=>(0,a.D7)().c4,"getConfig"),clear:H,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:X,setC4Type:E},Q=(0,s.K2)(function(t,e){return(0,r.tk)(t,e)},"drawRect"),J=(0,s.K2)(function(t,e,n,r,i,a){const s=t.append("image");s.attr("width",e),s.attr("height",n),s.attr("x",r),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,l.J)(a);s.attr("xlink:href",o)},"drawImage"),tt=(0,s.K2)((t,e,n)=>{const r=t.append("g");let i=0;for(let a of e){let t=a.textColor?a.textColor:"#444444",e=a.lineColor?a.lineColor:"#444444",s=a.offsetX?parseInt(a.offsetX):0,o=a.offsetY?parseInt(a.offsetY):0,l="";if(0===i){let t=r.append("line");t.attr("x1",a.startPoint.x),t.attr("y1",a.startPoint.y),t.attr("x2",a.endPoint.x),t.attr("y2",a.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==a.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+l+"#arrowend)"),i=-1}else{let t=r.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+l+"#arrowend)")}let c=n.messageFont();dt(n)(a.label.text,r,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+o,a.label.width,a.label.height,{fill:t},c),a.techn&&""!==a.techn.text&&(c=n.messageFont(),dt(n)("["+a.techn.text+"]",r,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+n.messageFontSize+5+o,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:t,"font-style":"italic"},c))}},"drawRels"),et=(0,s.K2)(function(t,e,n){const r=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};Q(r,l);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(n)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=s,dt(n)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(n)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),nt=(0,s.K2)(function(t,e,n){let i=e.bgColor?e.bgColor:n[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:n[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const l=t.append("g");l.attr("class","person-man");const c=(0,r.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=a,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},Q(l,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ut(n,e.typeC4Shape.text);switch(l.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":J(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=n[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,dt(n)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},u),u=n[e.typeC4Shape.text+"Font"](),u.fontColor=s,e.techn&&""!==e.techn?.text?dt(n)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},u):e.type&&""!==e.type.text&&dt(n)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=n.personFont(),u.fontColor=s,dt(n)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},"drawC4Shape"),rt=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),at=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),st=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),ot=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),lt=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ct=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),ht=(0,s.K2)(function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),ut=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),dt=function(){function t(t,e,n,i,a,s,o){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,s,o,l,c){const{fontSize:h,fontFamily:u,fontWeight:d}=c,p=t.split(a.Y2.lineBreakRegex);for(let a=0;a<p.length;a++){const t=a*h-h*(p.length-1)/2,o=e.append("text").attr("x",n+s/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",h).style("font-weight",d).style("font-family",u);o.append("tspan").attr("dy",t).text(p[a]).attr("alignment-baseline","mathematical"),r(o,l)}}function n(t,n,i,a,s,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,s,0,l,c),r(u,l)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return(0,s.K2)(t,"byText"),(0,s.K2)(e,"byTspan"),(0,s.K2)(n,"byFo"),(0,s.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),pt={drawRect:Q,drawBoundary:et,drawC4Shape:nt,drawRels:tt,drawImage:J,insertArrowHead:st,insertArrowEnd:ot,insertArrowFilledHead:lt,insertDynamicNumber:ct,insertArrowCrossHead:ht,insertDatabaseIcon:rt,insertComputerIcon:it,insertClockIcon:at},ft=0,gt=0,mt=4,yt=2;h.yy=Z;var vt={},xt=class{static{(0,s.K2)(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,bt(t.db.getConfig())}setData(t,e,n,r){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,r=this.nextData.starty+2*t.margin,i=r+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>mt)&&(e=this.nextData.startx+t.margin+vt.nextLinePaddingX,r=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+t.height,this.nextData.cnt=1),t.x=e,t.y=r,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",r,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",r,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},bt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},bt=(0,s.K2)(function(t){(0,a.hH)(vt,t),t.fontFamily&&(vt.personFontFamily=vt.systemFontFamily=vt.messageFontFamily=t.fontFamily),t.fontSize&&(vt.personFontSize=vt.systemFontSize=vt.messageFontSize=t.fontSize),t.fontWeight&&(vt.personFontWeight=vt.systemFontWeight=vt.messageFontWeight=t.fontWeight)},"setConf"),wt=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),Tt=(0,s.K2)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),kt=(0,s.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function Et(t,e,n,r,s){if(!e[t].width)if(n)e[t].text=(0,i.bH)(e[t].text,s,r),e[t].textLines=e[t].text.split(a.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,r);else{let n=e[t].text.split(a.Y2.lineBreakRegex);e[t].textLines=n.length;let s=0;e[t].height=0,e[t].width=0;for(const a of n)e[t].width=Math.max((0,i.Un)(a,r),e[t].width),s=(0,i.ru)(a,r),e[t].height=e[t].height+s}}(0,s.K2)(Et,"calcC4ShapeTextWH");var At=(0,s.K2)(function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=vt.c4ShapeMargin-35;let r=e.wrap&&vt.wrap,a=Tt(vt);a.fontSize=a.fontSize+2,a.fontWeight="bold",Et("label",e,r,a,(0,i.Un)(e.label.text,a)),pt.drawBoundary(t,e,vt)},"drawBoundary"),_t=(0,s.K2)(function(t,e,n,r){let a=0;for(const s of r){a=0;const r=n[s];let o=wt(vt,r.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,r.typeC4Shape.width=(0,i.Un)("«"+r.typeC4Shape.text+"»",o),r.typeC4Shape.height=o.fontSize+2,r.typeC4Shape.Y=vt.c4ShapePadding,a=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=a,a=r.image.Y+r.image.height}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=a,a=r.image.Y+r.image.height);let l=r.wrap&&vt.wrap,c=vt.width-2*vt.c4ShapePadding,h=wt(vt,r.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",Et("label",r,l,h,c),r.label.Y=a+8,a=r.label.Y+r.label.height,r.type&&""!==r.type.text){r.type.text="["+r.type.text+"]",Et("type",r,l,wt(vt,r.typeC4Shape.text),c),r.type.Y=a+5,a=r.type.Y+r.type.height}else if(r.techn&&""!==r.techn.text){r.techn.text="["+r.techn.text+"]",Et("techn",r,l,wt(vt,r.techn.text),c),r.techn.Y=a+5,a=r.techn.Y+r.techn.height}let u=a,d=r.label.width;if(r.descr&&""!==r.descr.text){Et("descr",r,l,wt(vt,r.typeC4Shape.text),c),r.descr.Y=a+20,a=r.descr.Y+r.descr.height,d=Math.max(r.label.width,r.descr.width),u=a-5*r.descr.textLines}d+=vt.c4ShapePadding,r.width=Math.max(r.width||vt.width,d,vt.width),r.height=Math.max(r.height||vt.height,u,vt.height),r.margin=r.margin||vt.c4ShapeMargin,t.insert(r),pt.drawC4Shape(e,r,vt)}t.bumpLastMargin(vt.c4ShapeMargin)},"drawC4ShapeArray"),Ct=class{static{(0,s.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},St=(0,s.K2)(function(t,e){let n=t.x,r=t.y,i=e.x,a=e.y,s=n+t.width/2,o=r+t.height/2,l=Math.abs(n-i),c=Math.abs(r-a),h=c/l,u=t.height/t.width,d=null;return r==a&&n<i?d=new Ct(n+t.width,o):r==a&&n>i?d=new Ct(n,o):n==i&&r<a?d=new Ct(s,r+t.height):n==i&&r>a&&(d=new Ct(s,r)),n>i&&r<a?d=u>=h?new Ct(n,o+h*t.width/2):new Ct(s-l/c*t.height/2,r+t.height):n<i&&r<a?d=u>=h?new Ct(n+t.width,o+h*t.width/2):new Ct(s+l/c*t.height/2,r+t.height):n<i&&r>a?d=u>=h?new Ct(n+t.width,o-h*t.width/2):new Ct(s+t.height/2*l/c,r):n>i&&r>a&&(d=u>=h?new Ct(n,o-t.width/2*h):new Ct(s-t.height/2*l/c,r)),d},"getIntersectPoint"),Rt=(0,s.K2)(function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=St(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:r,endPoint:St(e,n)}},"getIntersectPoints"),Lt=(0,s.K2)(function(t,e,n,r){let a=0;for(let s of e){a+=1;let t=s.wrap&&vt.wrap,e=kt(vt);"C4Dynamic"===r.db.getC4Type()&&(s.label.text=a+": "+s.label.text);let o=(0,i.Un)(s.label.text,e);Et("label",s,t,e,o),s.techn&&""!==s.techn.text&&(o=(0,i.Un)(s.techn.text,e),Et("techn",s,t,e,o)),s.descr&&""!==s.descr.text&&(o=(0,i.Un)(s.descr.text,e),Et("descr",s,t,e,o));let l=n(s.from),c=n(s.to),h=Rt(l,c);s.startPoint=h.startPoint,s.endPoint=h.endPoint}pt.drawRels(t,e,vt)},"drawRels");function Dt(t,e,n,r,i){let a=new xt(i);a.data.widthLimit=n.data.widthLimit/Math.min(yt,r.length);for(let[s,o]of r.entries()){let r=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=r,r=o.image.Y+o.image.height);let l=o.wrap&&vt.wrap,c=Tt(vt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Et("label",o,l,c,a.data.widthLimit),o.label.Y=r+8,r=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",Et("type",o,l,Tt(vt),a.data.widthLimit),o.type.Y=r+5,r=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=Tt(vt);t.fontSize=t.fontSize-2,Et("descr",o,l,t,a.data.widthLimit),o.descr.Y=r+20,r=o.descr.Y+o.descr.height}if(0==s||s%yt===0){let t=n.data.startx+vt.diagramMarginX,e=n.data.stopy+vt.diagramMarginY+r;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+vt.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=o.alias;let h=i.db.getC4ShapeArray(o.alias),u=i.db.getC4ShapeKeys(o.alias);u.length>0&&_t(a,t,h,u),e=o.alias;let d=i.db.getBoundaries(e);d.length>0&&Dt(t,e,a,d,i),"global"!==o.alias&&At(t,o,a),n.data.stopy=Math.max(a.data.stopy+vt.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+vt.c4ShapeMargin,n.data.stopx),ft=Math.max(ft,n.data.stopx),gt=Math.max(gt,n.data.stopy)}}(0,s.K2)(Dt,"drawInsideBoundary");var It={drawPersonOrSystemArray:_t,drawBoundary:At,setConf:bt,draw:(0,s.K2)(function(t,e,n,r){vt=(0,a.D7)().c4;const i=(0,a.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,o.Ltv)("#i"+e));const c="sandbox"===i?(0,o.Ltv)(l.nodes()[0].contentDocument.body):(0,o.Ltv)("body");let h=r.db;r.db.setWrap(vt.wrap),mt=h.getC4ShapeInRow(),yt=h.getC4BoundaryInRow(),s.Rm.debug(`C:${JSON.stringify(vt,null,2)}`);const u="sandbox"===i?c.select(`[id="${e}"]`):(0,o.Ltv)(`[id="${e}"]`);pt.insertComputerIcon(u),pt.insertDatabaseIcon(u),pt.insertClockIcon(u);let d=new xt(r);d.setData(vt.diagramMarginX,vt.diagramMarginX,vt.diagramMarginY,vt.diagramMarginY),d.data.widthLimit=screen.availWidth,ft=vt.diagramMarginX,gt=vt.diagramMarginY;const p=r.db.getTitle();Dt(u,"",d,r.db.getBoundaries(""),r),pt.insertArrowHead(u),pt.insertArrowEnd(u),pt.insertArrowCrossHead(u),pt.insertArrowFilledHead(u),Lt(u,r.db.getRels(),r.db.getC4Shape,r),d.data.stopx=ft,d.data.stopy=gt;const f=d.data;let g=f.stopy-f.starty+2*vt.diagramMarginY;const m=f.stopx-f.startx+2*vt.diagramMarginX;p&&u.append("text").text(p).attr("x",(f.stopx-f.startx)/2-4*vt.diagramMarginX).attr("y",f.starty+vt.diagramMarginY),(0,a.a$)(u,g,m,vt.useMaxWidth);const y=p?60:0;u.attr("viewBox",f.startx-vt.diagramMarginX+" -"+(vt.diagramMarginY+y)+" "+m+" "+(g+y)),s.Rm.debug("models:",f)},"draw")},Nt={parser:d,db:Z,renderer:It,styles:(0,s.K2)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:(0,s.K2)(({c4:t,wrap:e})=>{It.setConf(t),Z.setWrap(e)},"init")}},5871(t,e,n){"use strict";function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}n.d(e,{S:()=>r}),(0,n(797).K2)(r,"populateCommonDb")},9625(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(797),i=n(1444),a=(0,r.K2)((t,e)=>{let n;"sandbox"===e&&(n=(0,i.Ltv)("#i"+t));return("sandbox"===e?(0,i.Ltv)(n.nodes()[0].contentDocument.body):(0,i.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},4098(t,e,n){"use strict";n.d(e,{C0:()=>v,xA:()=>at,hH:()=>A,Dl:()=>Ot,IU:()=>Qt,Wt:()=>Wt,Y2:()=>Bt,a$:()=>Kt,sb:()=>G,ME:()=>ce,UI:()=>U,Ch:()=>b,mW:()=>x,DB:()=>m,_3:()=>W,EJ:()=>g,m7:()=>ne,iN:()=>te,zj:()=>rt,D7:()=>oe,Gs:()=>ge,J$:()=>k,ab:()=>ie,E:()=>dt,Q2:()=>et,P$:()=>M,ID:()=>At,TM:()=>ut,Wi:()=>Mt,H1:()=>pt,QO:()=>St,Js:()=>fe,Xd:()=>w,dj:()=>$t,cL:()=>st,$i:()=>j,jZ:()=>xt,oB:()=>he,wZ:()=>J,EI:()=>ee,SV:()=>Jt,Nk:()=>nt,XV:()=>le,ke:()=>re,UU:()=>Q,ot:()=>qt,mj:()=>ue,tM:()=>Gt,H$:()=>B,B6:()=>tt});var r=n(797),i=n(1931),a=n(8232);const s=(t,e)=>{const n=i.A.parse(t),r={};for(const i in e)e[i]&&(r[i]=n[i]+e[i]);return(0,a.A)(t,r)};var o=n(5582);const l=(t,e,n=50)=>{const{r,g:a,b:s,a:l}=i.A.parse(t),{r:c,g:h,b:u,a:d}=i.A.parse(e),p=n/100,f=2*p-1,g=l-d,m=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,y=1-m,v=r*m+c*y,x=a*m+h*y,b=s*m+u*y,w=l*p+d*(1-p);return(0,o.A)(v,x,b,w)},c=(t,e=100)=>{const n=i.A.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,l(n,t,e)};var h,u=n(5263),d=n(8041),p=n(5097),f=n(3047),g=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,m=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s*%%.*\n/gm,v=class extends Error{static{(0,r.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},x={},b=(0,r.K2)(function(t,e){t=t.replace(g,"").replace(m,"").replace(y,"\n");for(const[n,{detector:r}]of Object.entries(x)){if(r(t,e))return n}throw new v(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),w=(0,r.K2)((...t)=>{for(const{id:e,detector:n,loader:r}of t)T(e,n,r)},"registerLazyLoadedDiagrams"),T=(0,r.K2)((t,e,n)=>{x[t]&&r.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),x[t]={detector:e,loader:n},r.Rm.debug(`Detector with key ${t} added${n?" with loader":""}`)},"addDetector"),k=(0,r.K2)(t=>x[t].loader,"getDiagramLoader"),E=(0,r.K2)((t,e,{depth:n=2,clobber:r=!1}={})=>{const i={depth:n,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>E(t,e,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(i=>{"object"!=typeof e[i]||null===e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(r||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=E(t[i],e[i],{depth:n-1,clobber:r}))}),t)},"assignWithDepth"),A=E,_="#ffffff",C="#f2f2f2",S=(0,r.K2)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),R=class{static{(0,r.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||S(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||S(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||S(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||c(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,r.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,r.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,o.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,o.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,o.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=c(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,d.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,d.A)(this.secondaryColor,20),this.git1=(0,d.A)(this.pie2||this.secondaryColor,20),this.git2=(0,d.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,d.A)(this.pie4||s(this.primaryColor,{h:-30}),20),this.git4=(0,d.A)(this.pie5||s(this.primaryColor,{h:-60}),20),this.git5=(0,d.A)(this.pie6||s(this.primaryColor,{h:-90}),10),this.git6=(0,d.A)(this.pie7||s(this.primaryColor,{h:60}),10),this.git7=(0,d.A)(this.pie8||s(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,d.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,d.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},I=(0,r.K2)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,r.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,o.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||c(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||c(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||s(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||s(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,u.A)(c(this.git0),25),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},M=(0,r.K2)(t=>{const e=new N;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,r.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.A)("#cde498",10),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||s(this.primaryColor,{l:-30}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},P=(0,r.K2)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,r.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,d.A)(this.contrast,30),this.sectionBkgColor2=(0,d.A)(this.contrast,30),this.taskBorderColor=(0,u.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,d.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,u.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||s(this.primaryColor,{h:-30}),this.git4=this.pie5||s(this.primaryColor,{h:-60}),this.git5=this.pie6||s(this.primaryColor,{h:-90}),this.git6=this.pie7||s(this.primaryColor,{h:60}),this.git7=this.pie8||s(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||_,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||C}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B={base:{getThemeVariables:L},dark:{getThemeVariables:I},default:{getThemeVariables:M},forest:{getThemeVariables:P},neutral:{getThemeVariables:(0,r.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables")}},F={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},z={...F,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:B.default.getThemeVariables(),sequence:{...F.sequence,messageFont:(0,r.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,r.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,r.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...F.gantt,tickInterval:void 0,useWidth:void 0},c4:{...F.c4,useWidth:void 0,personFont:(0,r.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...F.flowchart,inheritDir:!1},external_personFont:(0,r.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,r.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,r.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,r.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,r.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,r.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,r.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,r.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,r.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,r.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,r.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,r.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,r.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,r.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,r.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,r.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,r.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,r.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,r.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,r.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,r.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...F.pie,useWidth:984},xyChart:{...F.xyChart,useWidth:void 0},requirement:{...F.requirement,useWidth:void 0},packet:{...F.packet},radar:{...F.radar},ishikawa:{...F.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...F.venn}},K=(0,r.K2)((t,e="")=>Object.keys(t).reduce((n,r)=>Array.isArray(t[r])?n:"object"==typeof t[r]&&null!==t[r]?[...n,e+r,...K(t[r],"")]:[...n,e+r],[]),"keyify"),q=new Set(K(z,"")),U=z,j=(0,r.K2)(t=>{if(r.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>j(t));else{for(const e of Object.keys(t)){if(r.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!q.has(e)||null==t[e]){r.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){r.Rm.debug("sanitizing object",e),j(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const i of n)e.includes(i)&&(r.Rm.debug("sanitizing css option",e),t[e]=Y(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}r.Rm.debug("After sanitization",t)}},"sanitizeDirective"),Y=(0,r.K2)(t=>{let e=0,n=0;for(const r of t){if(e<n)return"{ /* ERROR: Unbalanced CSS */ }";"{"===r?e++:"}"===r&&n++}return e!==n?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),G=Object.freeze(U),W=(0,r.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),V=A({},G),H=[],X=A({},G),Z=(0,r.K2)((t,e)=>{let n=A({},t),r={};for(const i of e)it(i),r=A(r,i);if(n=A(n,r),r.theme&&r.theme in B){const t=A({},h),e=A(t.themeVariables||{},r.themeVariables);n.theme&&n.theme in B&&(n.themeVariables=B[n.theme].getThemeVariables(e))}return ht(X=n),X},"updateCurrentConfig"),Q=(0,r.K2)(t=>(V=A({},G),V=A(V,t),t.theme&&B[t.theme]&&(V.themeVariables=B[t.theme].getThemeVariables(t.themeVariables)),Z(V,H),V),"setSiteConfig"),J=(0,r.K2)(t=>{h=A({},t)},"saveConfigFromInitialize"),tt=(0,r.K2)(t=>(V=A(V,t),Z(V,H),V),"updateSiteConfig"),et=(0,r.K2)(()=>A({},V),"getSiteConfig"),nt=(0,r.K2)(t=>(ht(t),A(X,t),rt()),"setConfig"),rt=(0,r.K2)(()=>A({},X),"getConfig"),it=(0,r.K2)(t=>{t&&(["secure",...V.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(r.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&it(t[e])}))},"sanitize"),at=(0,r.K2)(t=>{j(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),H.push(t),Z(V,H)},"addDirective"),st=(0,r.K2)((t=V)=>{Z(t,H=[])},"reset"),ot={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},lt={},ct=(0,r.K2)(t=>{lt[t]||(r.Rm.warn(ot[t]),lt[t]=!0)},"issueWarning"),ht=(0,r.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ct("LAZY_LOAD_DEPRECATED")},"checkConfig"),ut=(0,r.K2)(()=>{let t={};h&&(t=A(t,h));for(const e of H)t=A(t,e);return t},"getUserDefinedConfig"),dt=(0,r.K2)(t=>(null!=t.flowchart?.htmlLabels&&ct("FLOWCHART_HTML_LABELS_DEPRECATED"),W(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),pt=/<br\s*\/?>/gi,ft=(0,r.K2)(t=>{if(!t)return[""];return Et(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),gt=(()=>{let t=!1;return()=>{t||(mt(),t=!0)}})();function mt(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,r.K2)(mt,"setupDompurifyHooks");var yt=(0,r.K2)(t=>{gt();return f.A.sanitize(t)},"removeScript"),vt=(0,r.K2)((t,e)=>{if(dt(e)){const n=e.securityLevel;"antiscript"===n||"strict"===n||"sandbox"===n?t=yt(t):"loose"!==n&&(t=(t=(t=Et(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=kt(t))}return t},"sanitizeMore"),xt=(0,r.K2)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize(vt(t,e),e.dompurifyConfig).toString():f.A.sanitize(vt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),bt=(0,r.K2)((t,e)=>"string"==typeof t?xt(t,e):t.flat().map(t=>xt(t,e)),"sanitizeTextOrArray"),wt=(0,r.K2)(t=>pt.test(t),"hasBreaks"),Tt=(0,r.K2)(t=>t.split(pt),"splitBreaks"),kt=(0,r.K2)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Et=(0,r.K2)(t=>t.replace(pt,"#br#"),"breakToPlaceholder"),At=(0,r.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),_t=(0,r.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Ct=(0,r.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),St=(0,r.K2)(function(t){const e=t.split(/(,)/),n=[];for(let r=0;r<e.length;r++){let t=e[r];if(","===t&&r>0&&r+1<e.length){const i=e[r-1],a=e[r+1];Lt(i,a)&&(t=i+","+a,r++,n.pop())}n.push(Dt(t))}return n.join("")},"parseGenericTypes"),Rt=(0,r.K2)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Lt=(0,r.K2)((t,e)=>{const n=Rt(t,"~"),r=Rt(e,"~");return 1===n&&1===r},"shouldCombineSets"),Dt=(0,r.K2)(t=>{const e=Rt(t,"~");let n=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const r=[...t];let i=r.indexOf("~"),a=r.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)r[i]="<",r[a]=">",i=r.indexOf("~"),a=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")},"processSet"),It=(0,r.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Nt=/\$\$(.*)\$\$/g,Mt=(0,r.K2)(t=>(t.match(Nt)?.length??0)>0,"hasKatex"),Ot=(0,r.K2)(async(t,e)=>{const n=document.createElement("div");n.innerHTML=await $t(t,e),n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";const r=document.querySelector("body");r?.insertAdjacentElement("beforeend",n);const i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},"calculateMathMLDimensions"),Pt=(0,r.K2)(async(t,e)=>{if(!Mt(t))return t;if(!(It()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Nt,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(n.bind(n,2130)),i=e.forceLegacyMathML||!It()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(pt).map(t=>Mt(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Nt,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),$t=(0,r.K2)(async(t,e)=>xt(await Pt(t,e),e),"renderKatexSanitized"),Bt={getRows:ft,sanitizeText:xt,sanitizeTextOrArray:bt,hasBreaks:wt,splitBreaks:Tt,lineBreakRegex:pt,removeScript:yt,getUrl:At,evaluate:W,getMax:_t,getMin:Ct},Ft=(0,r.K2)(function(t,e){for(let n of e)t.attr(n[0],n[1])},"d3Attrs"),zt=(0,r.K2)(function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},"calculateSvgSizeAttrs"),Kt=(0,r.K2)(function(t,e,n,r){const i=zt(e,n,r);Ft(t,i)},"configureSvgSize"),qt=(0,r.K2)(function(t,e,n,i){const a=e.node().getBBox(),s=a.width,o=a.height;r.Rm.info(`SVG bounds: ${s}x${o}`,a);let l=0,c=0;r.Rm.info(`Graph bounds: ${l}x${c}`,t),l=s+2*n,c=o+2*n,r.Rm.info(`Calculated bounds: ${l}x${c}`),Kt(e,c,l,i);const h=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;e.attr("viewBox",h)},"setupGraphViewbox"),Ut={},jt=(0,r.K2)((t,e,n)=>{let i="";return t in Ut&&Ut[t]?i=Ut[t](n):r.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`},"getStyles"),Yt=(0,r.K2)((t,e)=>{void 0!==e&&(Ut[t]=e)},"addStylesForDiagram"),Gt=jt,Wt={};(0,r.VA)(Wt,{clear:()=>Qt,getAccDescription:()=>ne,getAccTitle:()=>te,getDiagramTitle:()=>ie,setAccDescription:()=>ee,setAccTitle:()=>Jt,setDiagramTitle:()=>re});var Vt="",Ht="",Xt="",Zt=(0,r.K2)(t=>xt(t,rt()),"sanitizeText"),Qt=(0,r.K2)(()=>{Vt="",Xt="",Ht=""},"clear"),Jt=(0,r.K2)(t=>{Vt=Zt(t).replace(/^\s+/g,"")},"setAccTitle"),te=(0,r.K2)(()=>Vt,"getAccTitle"),ee=(0,r.K2)(t=>{Xt=Zt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ne=(0,r.K2)(()=>Xt,"getAccDescription"),re=(0,r.K2)(t=>{Ht=Zt(t)},"setDiagramTitle"),ie=(0,r.K2)(()=>Ht,"getDiagramTitle"),ae=r.Rm,se=r.He,oe=rt,le=nt,ce=G,he=(0,r.K2)(t=>xt(t,oe()),"sanitizeText"),ue=qt,de=(0,r.K2)(()=>Wt,"getCommonDb"),pe={},fe=(0,r.K2)((t,e,n)=>{pe[t]&&ae.warn(`Diagram with id ${t} already registered. Overwriting.`),pe[t]=e,n&&T(t,n),Yt(t,e.styles),e.injectUtils?.(ae,se,oe,he,ue,de(),()=>{})},"registerDiagram"),ge=(0,r.K2)(t=>{if(t in pe)return pe[t];throw new me(t)},"getDiagram"),me=class extends Error{static{(0,r.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},797(t,e,n){"use strict";n.d(e,{He:()=>c,K2:()=>a,Rm:()=>l,VA:()=>s});var r=n(4353),i=Object.defineProperty,a=(t,e)=>i(t,"name",{value:e,configurable:!0}),s=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},o={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=o.fatal;"string"==typeof t?t.toLowerCase()in o&&(e=o[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=o.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"",h("FATAL"))),e<=o.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"",h("ERROR"))),e<=o.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"",h("WARN"))),e<=o.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"",h("INFO"))),e<=o.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"",h("DEBUG"))),e<=o.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${r().format("ss.SSS")} : ${t} : `,"format")},2501(t,e,n){"use strict";n.d(e,{o:()=>r});var r=(0,n(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},796(t,e,n){"use strict";n.d(e,{$C:()=>S,$t:()=>j,C4:()=>G,I5:()=>U,Ib:()=>m,KL:()=>H,Sm:()=>W,Un:()=>P,_K:()=>Y,bH:()=>N,dq:()=>K,pe:()=>c,rY:()=>V,ru:()=>O,sM:()=>_,vU:()=>f,yT:()=>L});var r=n(4098),i=n(797),a=n(6750),s=n(1444),o=n(6632),l=n(7222),c="",h={curveBasis:s.qrM,curveBasisClosed:s.Yu4,curveBasisOpen:s.IA3,curveBumpX:s.Wi0,curveBumpY:s.PGM,curveBundle:s.OEq,curveCardinalClosed:s.olC,curveCardinalOpen:s.IrU,curveCardinal:s.y8u,curveCatmullRomClosed:s.Q7f,curveCatmullRomOpen:s.cVp,curveCatmullRom:s.oDi,curveLinear:s.lUB,curveLinearClosed:s.Lx9,curveMonotoneX:s.nVG,curveMonotoneY:s.uxU,curveNatural:s.Xf2,curveStep:s.GZz,curveStepAfter:s.UPb,curveStepBefore:s.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,i.K2)(function(t,e){const n=p(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map(t=>t.args);(0,r.$i)(t),i=(0,r.hH)(i,[...t])}else i=n.args;if(!i)return;let a=(0,r.Ch)(t,e);const s="config";return void 0!==i[s]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),p=(0,i.K2)(function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(n,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const s=[];for(;null!==(a=r.DB.exec(t));)if(a.index===r.DB.lastIndex&&r.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:t,args:e})}return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(n){return i.Rm.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,i.K2)(function(t){return t.replace(r.DB,"")},"removeDirectives"),g=(0,i.K2)(function(t,e){for(const[n,r]of e.entries())if(r.match(t))return n;return-1},"isSubstringInArray");function m(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[n]??e}function y(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,a.J)(n):n}(0,i.K2)(m,"interpolateToCurve"),(0,i.K2)(y,"formatUrl");var v=(0,i.K2)((t,...e)=>{const n=t.split("."),r=n.length-1,a=n[r];let s=window;for(let o=0;o<r;o++)if(s=s[n[o]],!s)return void i.Rm.error(`Function name: ${t} not found in window`);s[a](...e)},"runFunc");function x(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function b(t){let e,n=0;t.forEach(t=>{n+=x(t,e),e=t});return k(t,n/2)}function w(t){return 1===t.length?t[0]:b(t)}(0,i.K2)(x,"distance"),(0,i.K2)(b,"traverseEdge"),(0,i.K2)(w,"calcLabelPosition");var T=(0,i.K2)((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},"roundNumber"),k=(0,i.K2)((t,e)=>{let n,r=e;for(const i of t){if(n){const t=x(i,n);if(0===t)return n;if(t<r)r-=t;else{const e=r/t;if(e<=0)return n;if(e>=1)return{x:i.x,y:i.y};if(e>0&&e<1)return{x:T((1-e)*n.x+e*i.x,5),y:T((1-e)*n.y+e*i.y,5)}}}n=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),E=(0,i.K2)((t,e,n)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=k(e,25),a=t?10:5,s=Math.atan2(e[0].y-r.y,e[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+r.x)/2,o.y=-Math.cos(s)*a+(e[0].y+r.y)/2,o},"calcCardinalityPosition");function A(t,e,n){const r=structuredClone(n);i.Rm.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const a=k(r,25+t),s=10+.5*t,o=Math.atan2(r[0].y-a.y,r[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(o+Math.PI)*s+(r[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(r[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(o-Math.PI)*s+(r[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(r[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(o)*s+(r[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(r[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(r[0].x+a.x)/2,l.y=-Math.cos(o)*s+(r[0].y+a.y)/2),l}function _(t){let e="",n="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":e=e+r+";");return{style:e,labelStyle:n}}(0,i.K2)(A,"calcTerminalLabelPosition"),(0,i.K2)(_,"getStylesFromArray");var C=0,S=(0,i.K2)(()=>(C++,"id-"+Math.random().toString(36).substr(2,12)+"-"+C),"generateId");function R(t){let e="";const n="0123456789abcdef";for(let r=0;r<t;r++)e+=n.charAt(Math.floor(16*Math.random()));return e}(0,i.K2)(R,"makeRandomHex");var L=(0,i.K2)(t=>R(t.length),"random"),D=(0,i.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),I=(0,i.K2)(function(t,e){const n=e.text.replace(r.Y2.lineBreakRegex," "),[,i]=U(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(n),a},"drawSimpleText"),N=(0,o.A)((t,e,n)=>{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),r.Y2.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let s="";return i.forEach((t,r)=>{const o=P(`${t} `,n),l=P(s,n);if(o>e){const{hyphenatedStrings:r,remainingWord:i}=M(t,e,"-",n);a.push(s,...r),s=i}else l+o>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");r+1===i.length&&a.push(s)}),a.filter(t=>""!==t).join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),M=(0,o.A)((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...t],a=[];let s="";return i.forEach((t,o)=>{const l=`${s}${t}`;if(P(l,r)>=e){const t=o+1,e=i.length===t,r=`${l}${n}`;a.push(e?l:r),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function O(t,e){return B(t,e).height}function P(t,e){return B(t,e).width}(0,i.K2)(O,"calculateTextHeight"),(0,i.K2)(P,"calculateTextWidth");var $,B=(0,o.A)((t,e)=>{const{fontSize:n=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,o]=U(n),l=["sans-serif",i],h=t.split(r.Y2.lineBreakRegex),u=[],d=(0,s.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const r of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const n of h){const i=D();i.text=n||c;const s=I(p,i).style("font-size",o).style("font-weight",a).style("font-family",r),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}u.push(e)}p.remove();return u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),F=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.K2)(this,"InitIDGenerator")}},z=(0,i.K2)(function(t){return $=$||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$.innerHTML=t,unescape($.textContent)},"entityDecode");function K(t){return"str"in t}(0,i.K2)(K,"isDetailedError");var q=(0,i.K2)((t,e,n,r)=>{if(!r)return;const i=t.node()?.getBBox();i&&t.append("text").text(r).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-n).attr("class",e)},"insertTitle"),U=(0,i.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function j(t,e){return(0,l.A)({},t,e)}(0,i.K2)(j,"cleanAndMerge");var Y={assignWithDepth:r.hH,wrapLabel:N,calculateTextHeight:O,calculateTextWidth:P,calculateTextDimensions:B,cleanAndMerge:j,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:m,calcLabelPosition:w,calcCardinalityPosition:E,calcTerminalLabelPosition:A,formatUrl:y,getStylesFromArray:_,generateId:S,random:L,runFunc:v,entityDecode:z,insertTitle:q,isLabelCoordinateInPath:X,parseFontSize:U,InitIDGenerator:F},G=(0,i.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),W=(0,i.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V=(0,i.K2)((t,e,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:""}${t}_${e}_${n}${i?`_${i}`:""}`,"getEdgeId");function H(t){return t??null}function X(t,e){const n=Math.round(t.x),r=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return i.includes(n.toString())||i.includes(r.toString())}(0,i.K2)(H,"handleUndefinedAttr"),(0,i.K2)(X,"isLabelCoordinateInPath")},9856(t,e,n){"use strict";n.d(e,{XX:()=>u,q7:()=>d,sO:()=>h});var r=n(5948),i=n(1174),a=n(796),s=n(4098),o=n(797),l={common:s.Y2,getConfig:s.zj,insertCluster:i.U,insertEdge:r.Jo,insertEdgeLabel:r.jP,insertMarkers:r.g0,insertNode:i.on,interpolateToCurve:a.Ib,labelHelper:i.Zk,log:o.Rm,positionEdgeLabel:r.T_},c={},h=(0,o.K2)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,o.K2)(()=>{h([{name:"dagre",loader:(0,o.K2)(async()=>await Promise.resolve().then(n.bind(n,5215)),"loader")},{name:"cose-bilkent",loader:(0,o.K2)(async()=>await Promise.resolve().then(n.bind(n,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=c[t.layoutAlgorithm];return(await n.loader()).render(t,e,l,{algorithm:n.algorithm})},"render"),d=(0,o.K2)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return o.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},1475(t,e,n){"use strict";n.d(e,{D:()=>s});var r=n(4098),i=n(797),a=n(1444),s=(0,i.K2)(t=>{const{securityLevel:e}=(0,r.D7)();let n=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),r=e.node()?.contentDocument??document;n=(0,a.Ltv)(r.body)}return n.select(`#${t}`)},"selectSvgElement")},5523(t,e,n){"use strict";n.d(e,{CP:()=>u,Ck:()=>f,HT:()=>p,PB:()=>d,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var r=n(4098),i=n(797),a=n(6750),s=n(1444),o=(0,i.K2)((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)n.attr(r,e.attrs[r]);return e.class&&n.attr("class",e.class),n},"drawRect"),l=(0,i.K2)((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,n).lower()},"drawBackgroundRect"),c=(0,i.K2)((t,e)=>{const n=e.text.replace(r.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(n),i},"drawText"),h=(0,i.K2)((t,e,n,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",n);const s=(0,a.J)(r);i.attr("xlink:href",s)},"drawImage"),u=(0,i.K2)((t,e,n,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",n);const s=(0,a.J)(r);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),d=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),f=(0,i.K2)(()=>{let t=(0,s.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,s.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},2627(t,e,n){"use strict";n.d(e,{P:()=>a});var r=n(4098),i=n(797),a=(0,i.K2)((t,e,n,a)=>{t.attr("class",n);const{width:l,height:c,x:h,y:u}=s(t,e);(0,r.a$)(t,c,l,a);const d=o(h,u,l,c,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),s=(0,i.K2)((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),o=(0,i.K2)((t,e,n,r,i)=>`${t-i} ${e-i} ${n} ${r}`,"createViewBox")},1174(t,e,n){"use strict";n.d(e,{DA:()=>x,IU:()=>S,U:()=>C,U7:()=>Ee,U_:()=>_e,Zk:()=>u,aP:()=>we,gh:()=>Ae,lC:()=>p,on:()=>ke});var r=n(7879),i=n(1960),a=n(6779),s=n(796),o=n(4098),l=n(797),c=n(1444),h=n(2274),u=(0,l.K2)(async(t,e,n)=>{let i;const l=e.useHtmlLabels||(0,o._3)((0,o.D7)()?.htmlLabels);i=n||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,f="markdown"===e.labelType,g=await(0,a.GZ)(u,(0,o.jZ)((0,s.Sm)(d),(0,o.D7)()),{useHtmlLabels:l,width:e.width||(0,o.D7)().flowchart?.wrappingWidth,cssClasses:f?"markdown-node-label":void 0,style:e.labelStyle,addSvgBackground:p,markdown:f},(0,o.D7)());let m=g.getBBox();const y=(e?.padding??0)/2;if(l){const t=g.children[0],e=(0,c.Ltv)(g);await(0,r.X)(t,d),m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}return l?u.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):u.attr("transform","translate(0, "+-m.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:m,halfPadding:y,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,n)=>{const r=n.useHtmlLabels??(0,o.E)((0,o.D7)()),i=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),l=await(0,a.GZ)(i,(0,o.jZ)((0,s.Sm)(e),(0,o.D7)()),{useHtmlLabels:r,width:n.width||(0,o.D7)()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let h=l.getBBox();const u=n.padding/2;if((0,o.E)((0,o.D7)())){const t=l.children[0],e=(0,c.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return r?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),n.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}},"insertLabel"),p=(0,l.K2)((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,n,r,i,a){const s=[],o=n-t,l=r-e,c=o/a,h=2*Math.PI/c,u=e+l/2;for(let d=0;d<=50;d++){const e=t+d/50*o,n=u+i*Math.sin(h*(e-t));s.push({x:e,y:n})}return s}function y(t,e,n,r,i,a){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let c=0;c<r;c++){const r=o+c*l,i=t+n*Math.cos(r),a=e+n*Math.sin(r);s.push({x:-i,y:-a})}return s}(0,l.K2)(g,"createPathFromPoints"),(0,l.K2)(m,"generateFullSineWavePoints"),(0,l.K2)(y,"generateCirclePoints");var v=(0,l.K2)((t,e)=>{var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),n=0===o?0:c*s/o,r=c):(s<0&&(l=-l),n=l,r=0===s?0:l*o/s),{x:i+n,y:a+r}},"intersectRect"),x=(0,l.K2)(async(t,e,n,r=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const l=(0,o.D7)(),c=(0,o.E)(l);return await(0,a.GZ)(t,s,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},l)},"createLabel"),b=(0,l.K2)((t,e,n,r,i)=>["M",t+i,e,"H",t+n-i,"A",i,i,0,0,1,t+n,e+i,"V",e+r-i,"A",i,i,0,0,1,t+n-i,e+r,"H",t+i,"A",i,i,0,0,1,t,e+r-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),w=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const n=(0,o.D7)(),{themeVariables:s,handDrawnSeed:u}=n,{clusterBkg:d,clusterBorder:p}=s,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),w=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),T=(0,o.E)(n),k=w.insert("g").attr("class","cluster-label ");let E;E="markdown"===e.labelType?await(0,a.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}):await x(k,e.label,e.labelStyle||"",!1,!0);let A=E.getBBox();if((0,o.E)(n)){const t=E.children[0],e=(0,c.Ltv)(E);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}const _=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height,S=e.x-_/2,R=e.y-C/2;let L;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(w),n=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),r=t.path(b(S,R,_,C,0),n);L=w.insert(()=>(l.Rm.debug("Rough node insert CXC",r),r),":first-child"),L.select("path:nth-child(2)").attr("style",m.join(";")),L.select("path").attr("style",y.join(";").replace("fill","stroke"))}else L=w.insert("rect",":first-child"),L.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",S).attr("y",R).attr("width",_).attr("height",C);const{subGraphTitleTopMargin:D}=(0,r.O)(n);if(k.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+D})`),f){const t=k.select("span");t&&t.attr("style",f)}const I=L.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return v(e,t)},{cluster:w,labelBBox:A}},"rect"),T=(0,l.K2)((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=r.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return v(e,t)},{cluster:n,labelBBox:{width:0,height:0}}},"noteGroup"),k=(0,l.K2)(async(t,e)=>{const n=(0,o.D7)(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=r,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const m=await x(f,e.label,e.labelStyle,void 0,!0);let y=m.getBBox();if((0,o.E)(n)){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const w=0*e.padding,T=w/2,k=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+w;e.width<=y.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const E=e.height+w,A=e.height+w-y.height-6,_=e.x-k/2,C=e.y-E/2;e.width=k;const S=e.y-e.height/2-T+y.height+2;let R;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),n=h.A.svg(d),r=e.rx||e.ry?n.path(b(_,C,k,E,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):n.rectangle(_,C,k,E,{seed:i});R=d.insert(()=>r,":first-child");const o=n.rectangle(_,S,k,A,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:u,seed:i});R=d.insert(()=>r,":first-child"),g=d.insert(()=>o)}else{R=p.insert("rect",":first-child");const t="outer";R.attr("class",t).attr("x",_).attr("y",C).attr("width",k).attr("height",E).attr("data-look",e.look),g.attr("class","inner").attr("x",_).attr("y",S).attr("width",k).attr("height",A)}f.attr("transform",`translate(${e.x-y.width/2}, ${C+1-((0,o.E)(n)?0:3)})`);const L=R.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return v(e,t)},{cluster:d,labelBBox:y}},"roundedWithTitle"),E=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const n=(0,o.D7)(),{themeVariables:s,handDrawnSeed:u}=n,{clusterBkg:d,clusterBorder:p}=s,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),w=(0,o.E)(n),T=x.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(T,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width});let E=k.getBBox();if((0,o.E)(n)){const t=k.children[0],e=(0,c.Ltv)(k);E=t.getBoundingClientRect(),e.attr("width",E.width),e.attr("height",E.height)}const A=e.width<=E.width+e.padding?E.width+e.padding:e.width;e.width<=E.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,C=e.x-A/2,S=e.y-_/2;let R;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(x),n=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),r=t.path(b(C,S,A,_,e.rx),n);R=x.insert(()=>(l.Rm.debug("Rough node insert CXC",r),r),":first-child"),R.select("path:nth-child(2)").attr("style",m.join(";")),R.select("path").attr("style",y.join(";").replace("fill","stroke"))}else R=x.insert("rect",":first-child"),R.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",S).attr("width",A).attr("height",_);const{subGraphTitleTopMargin:L}=(0,r.O)(n);if(T.attr("transform",`translate(${e.x-E.width/2}, ${e.y-e.height/2+L})`),f){const t=T.select("span");t&&t.attr("style",f)}const D=R.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=E.height-e.padding/2,e.intersect=function(t){return v(e,t)},{cluster:x,labelBBox:E}},"kanbanSection"),A={rect:w,squareRect:w,roundedWithTitle:k,noteGroup:T,divider:(0,l.K2)((t,e)=>{const n=(0,o.D7)(),{themeVariables:r,handDrawnSeed:i}=n,{nodeBorder:a}=r,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const d=e.height+c,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.A.svg(s).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=s.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return v(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:E},_=new Map,C=(0,l.K2)(async(t,e)=>{const n=e.shape||"rect",r=await A[n](t,e);return _.set(e.id,r),r},"insertCluster"),S=(0,l.K2)(()=>{_=new Map},"clear");function R(t,e){return t.intersect(e)}(0,l.K2)(R,"intersectNode");var L=R;function D(t,e,n,r){var i=t.x,a=t.y,s=i-r.x,o=a-r.y,l=Math.sqrt(e*e*o*o+n*n*s*s),c=Math.abs(e*n*s/l);r.x<i&&(c=-c);var h=Math.abs(e*n*o/l);return r.y<a&&(h=-h),{x:i+c,y:a+h}}(0,l.K2)(D,"intersectEllipse");var I=D;function N(t,e,n){return I(t,e,e,n)}(0,l.K2)(N,"intersectCircle");var M=N;function O(t,e,n,r){{const i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,o=i*n.x+a*n.y+s,l=i*r.x+a*r.y+s,c=1e-6;if(0!==o&&0!==l&&P(o,l))return;const h=r.y-n.y,u=n.x-r.x,d=r.x*n.y-n.x*r.y,p=h*t.x+u*t.y+d,f=h*e.x+u*e.y+d;if(Math.abs(p)<c&&Math.abs(f)<c&&P(p,f))return;const g=i*u-h*a;if(0===g)return;const m=Math.abs(g/2);let y=a*d-u*s;const v=y<0?(y-m)/g:(y+m)/g;y=h*s-i*d;return{x:v,y:y<0?(y-m)/g:(y+m)/g}}}function P(t,e){return t*e>0}(0,l.K2)(O,"intersectLine"),(0,l.K2)(P,"sameSign");var $=O;function B(t,e,n){let r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=r-t.width/2-s,c=i-t.height/2-o;for(let h=0;h<e.length;h++){let r=e[h],i=e[h<e.length-1?h+1:0],s=$(t,n,{x:l+r.x,y:c+r.y},{x:l+i.x,y:c+i.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(t,e){let r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),s=e.x-n.x,o=e.y-n.y,l=Math.sqrt(s*s+o*o);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.K2)(B,"intersectPolygon");var F={node:L,circle:M,ellipse:I,polygon:B,rect:v};function z(t,e){const{labelStyles:n}=(0,i.GX)(e);e.labelStyle=n;const r=f(e);let a=r;r||(a="anchor");const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:c}=e,u=h.A.svg(o),d=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=u.circle(0,0,2,d),m=o.insert(()=>g,":first-child");return m.attr("class","anchor").attr("style",(0,s.KL)(c)),p(e,m),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),F.circle(e,1,t)},o}function K(t,e,n,r,i,a,s){const o=(t+n)/2,l=(e+r)/2,c=Math.atan2(r-e,n-t),h=(n-t)/2/i,u=(r-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=o+p*a*Math.sin(c)*(s?-1:1),g=l-p*i*Math.cos(c)*(s?-1:1),m=Math.atan2((e-g)/a,(t-f)/i);let y=Math.atan2((r-g)/a,(n-f)/i)-m;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const v=[];for(let x=0;x<20;x++){const t=m+x/19*y,e=f+i*Math.cos(t),n=g+a*Math.sin(t);v.push({x:e,y:n})}return v}async function q(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding+20,l=s.height+e.padding,c=l/2,d=c/(2.5+l/50),{cssStyles:m}=e,y=[{x:o/2,y:-l/2},{x:-o/2,y:-l/2},...K(-o/2,-l/2,-o/2,l/2,d,c,!1),{x:o/2,y:l/2},...K(o/2,l/2,o/2,-l/2,d,c,!0)],v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=g(y),w=v.path(b,x),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),T.attr("transform",`translate(${d/2}, 0)`),p(e,T),e.intersect=function(t){return F.polygon(e,y,t)},a}function U(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}async function j(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+e.padding,l=s.width+e.padding+12,c=-o,d=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=g(d),s=t.path(r,n);m=a.insert(()=>s,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),y&&m.attr("style",y)}else m=U(a,l,o,d);return r&&m.attr("style",r),p(e,m),e.intersect=function(t){return F.polygon(e,d,t)},a}function Y(t,e){const{nodeStyles:n}=(0,i.GX)(e);e.label="";const r=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=h.A.svg(r),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(o),d=l.path(u,c),p=r.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return F.polygon(e,o,t)},r}async function G(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:o,bbox:c,halfPadding:d}=await u(t,e,f(e)),g=n?.padding??d,m=c.width/2+g;let y;const{cssStyles:v}=e;if("handDrawn"===e.look){const t=h.A.svg(o),n=(0,i.Fr)(e,{}),r=t.circle(0,0,2*m,n);y=o.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,s.KL)(v))}else y=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",m).attr("cx",0).attr("cy",0);return p(e,y),e.calcIntersect=function(t,e){const n=t.width/2;return F.circle(t,n,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,m,t),F.circle(e,m,t)},o}function W(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=2*t;return`M ${-r/2*e},${r/2*n} L ${r/2*e},${-r/2*n}\n M ${r/2*e},${r/2*n} L ${-r/2*e},${-r/2*n}`}function V(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:o}=e,c=h.A.svg(a),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=c.circle(0,0,2*s,u),g=W(s),m=c.path(g,u),y=a.insert(()=>d,":first-child");return y.insert(()=>m),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),p(e,y),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:s,point:t});return F.circle(e,s,t)},a}function H(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let c=0;c<r;c++){const r=o+c*l,i=t+n*Math.cos(r),a=e+n*Math.sin(r);s.push({x:-i,y:-a})}return s}async function X(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=s.width+(e.padding??0),c=s.height+(e.padding??0),d=Math.max(5,.1*c),{cssStyles:m}=e,y=[...H(l/2,-c/2,d,30,-90,0),{x:-l/2-d,y:d},...H(l/2+2*d,-d,d,20,-180,-270),...H(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-c/2},...H(l/2,c/2,d,20,0,90)],v=[{x:l/2,y:-c/2-d},{x:-l/2,y:-c/2-d},...H(l/2,-c/2,d,20,-90,0),{x:-l/2-d,y:-d},...H(l/2+.1*l,-d,d,20,-180,-270),...H(l/2+.1*l,d,d,20,-90,-180),{x:-l/2-d,y:c/2},...H(l/2,c/2,d,20,0,90),{x:-l/2,y:c/2+d},{x:l/2,y:c/2+d}],x=h.A.svg(a),b=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=g(y).replace("Z",""),T=x.path(w,b),k=g(v),E=x.path(k,{...b}),A=a.insert("g",":first-child");return A.insert(()=>E,":first-child").attr("stroke-opacity",0),A.insert(()=>T,":first-child"),A.attr("class","text"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",r),A.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-l/2+d-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,A),e.intersect=function(t){return F.polygon(e,v,t)},a}function Z(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let c=0;c<r;c++){const r=o+c*l,i=t+n*Math.cos(r),a=e+n*Math.sin(r);s.push({x:i,y:a})}return s}async function Q(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=s.width+(e.padding??0),c=s.height+(e.padding??0),d=Math.max(5,.1*c),{cssStyles:m}=e,y=[...Z(l/2,-c/2,d,20,-90,0),{x:l/2+d,y:-d},...Z(l/2+2*d,-d,d,20,-180,-270),...Z(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:c/2},...Z(l/2,c/2,d,20,0,90)],v=[{x:-l/2,y:-c/2-d},{x:l/2,y:-c/2-d},...Z(l/2,-c/2,d,20,-90,0),{x:l/2+d,y:-d},...Z(l/2+2*d,-d,d,20,-180,-270),...Z(l/2+2*d,d,d,20,-90,-180),{x:l/2+d,y:c/2},...Z(l/2,c/2,d,20,0,90),{x:l/2,y:c/2+d},{x:-l/2,y:c/2+d}],x=h.A.svg(a),b=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=g(y).replace("Z",""),T=x.path(w,b),k=g(v),E=x.path(k,{...b}),A=a.insert("g",":first-child");return A.insert(()=>E,":first-child").attr("stroke-opacity",0),A.insert(()=>T,":first-child"),A.attr("class","text"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",r),A.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-l/2+(e.padding??0)/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,A),e.intersect=function(t){return F.polygon(e,v,t)},a}function J(t,e,n,r=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(r-1);for(let c=0;c<r;c++){const r=o+c*l,i=t+n*Math.cos(r),a=e+n*Math.sin(r);s.push({x:-i,y:-a})}return s}async function tt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=s.width+(e.padding??0),c=s.height+(e.padding??0),d=Math.max(5,.1*c),{cssStyles:m}=e,y=[...J(l/2,-c/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:-c/2},...J(l/2,c/2,d,20,0,90)],v=[...J(-l/2+d+d/2,-c/2,d,20,-90,-180),{x:l/2-d/2,y:d},...J(-l/2-d/2,-d,d,20,0,90),...J(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...J(-l/2+d+d/2,c/2,d,30,-180,-270)],x=[{x:l/2,y:-c/2-d},{x:-l/2,y:-c/2-d},...J(l/2,-c/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+2*d,-d,d,20,-180,-270),...J(l/2+2*d,d,d,20,-90,-180),{x:-l/2-d,y:c/2},...J(l/2,c/2,d,20,0,90),{x:-l/2,y:c/2+d},{x:l/2-d-d/2,y:c/2+d},...J(-l/2+d+d/2,-c/2,d,20,-90,-180),{x:l/2-d/2,y:d},...J(-l/2-d/2,-d,d,20,0,90),...J(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...J(-l/2+d+d/2,c/2,d,30,-180,-270)],b=h.A.svg(a),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=g(y).replace("Z",""),k=b.path(T,w),E=g(v).replace("Z",""),A=b.path(E,w),_=g(x),C=b.path(_,{...w}),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.insert(()=>A,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",r),S.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-l/2+(e.padding??0)/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,S),e.intersect=function(t){return F.polygon(e,x,t)},a}async function et(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(80,1.25*(s.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,s.height+2*(e.padding??0),e?.height??0),c=l/2,{cssStyles:d}=e,m=h.A.svg(a),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const x=o-c,b=l/4,w=[{x,y:0},{x:b,y:0},{x:0,y:l/2},{x:b,y:l},{x,y:l},...y(-x,-l/2,c,50,270,90)],T=g(w),k=m.path(T,v),E=a.insert(()=>k,":first-child");return E.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",d),r&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",r),E.attr("transform",`translate(${-o/2}, ${-l/2})`),p(e,E),e.intersect=function(t){return F.polygon(e,w,t)},a}(0,l.K2)(z,"anchor"),(0,l.K2)(K,"generateArcPoints"),(0,l.K2)(q,"bowTieRect"),(0,l.K2)(U,"insertPolygonShape"),(0,l.K2)(j,"card"),(0,l.K2)(Y,"choice"),(0,l.K2)(G,"circle"),(0,l.K2)(W,"createLine"),(0,l.K2)(V,"crossedCircle"),(0,l.K2)(H,"generateCirclePoints"),(0,l.K2)(X,"curlyBraceLeft"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceRight"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraces"),(0,l.K2)(et,"curvedTrapezoid");var nt=(0,l.K2)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createCylinderPathD"),rt=(0,l.K2)((t,e,n,r,i,a)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r].join(" "),"createOuterCylinderPathD"),it=(0,l.K2)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function at(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=Math.max(o.width+e.padding,e.width??0),d=c/2,g=d/(2.5+c/50),m=Math.max(o.height+g+e.padding,e.height??0);let y;const{cssStyles:v}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=rt(0,0,c,m,d,g),r=it(0,g,c,m,d,g),s=t.path(n,(0,i.Fr)(e,{})),o=t.path(r,(0,i.Fr)(e,{fill:"none"}));y=a.insert(()=>o,":first-child"),y=a.insert(()=>s,":first-child"),y.attr("class","basic label-container"),v&&y.attr("style",v)}else{const t=nt(0,0,c,m,d,g);y=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(v)).attr("style",r)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),p(e,y),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(e.padding??0)/1.5-(o.y-(o.top??0))})`),e.intersect=function(t){const n=F.rect(e,t),r=n.x-(e.x??0);if(0!=d&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function st(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=s.width+e.padding,c=s.height+e.padding,d=.2*c,g=-l/2,m=-c/2-d/2,{cssStyles:y}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:g,y:m+d},{x:-g,y:m+d},{x:-g,y:-m},{x:g,y:-m},{x:g,y:m},{x:-g,y:m},{x:-g,y:m+d}],w=v.polygon(b.map(t=>[t.x,t.y]),x),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),o.attr("transform",`translate(${g+(e.padding??0)/2-(s.x-(s.left??0))}, ${m+d+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return F.rect(e,t)},a}async function ot(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,halfPadding:c}=await u(t,e,f(e)),d=o.width/2+c+5,g=o.width/2+c;let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*d,n),l=t.circle(0,0,2*g,r);m=a.insert("g",":first-child"),m.attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(y)),m.node()?.appendChild(o),m.node()?.appendChild(l)}else{m=a.insert("g",":first-child");const t=m.insert("circle",":first-child"),e=m.insert("circle");m.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",g).attr("cx",0).attr("cy",0)}return p(e,m),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,d,t),F.circle(e,d,t)},a}function lt(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.label="",e.labelStyle=r;const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=h.A.svg(s),{nodeBorder:u}=n,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=c.circle(0,0,14,d),m=s.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),p(e,m),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return F.circle(e,7,t)},s}async function ct(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),c=s.width+(e.padding??0),d=c+s.height,m=c+s.height,y=[{x:0,y:-d},{x:m,y:-d},{x:m/2,y:0}],{cssStyles:v}=e,x=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=g(y),T=x.path(w,b),k=a.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return v&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",v),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),e.width=c,e.height=d,p(e,k),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(e.padding??0)/2+(s.y-(s.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,y,t),F.polygon(e,y,t)},a}function ht(t,e,{dir:n,config:{state:r,themeVariables:a}}){const{nodeStyles:s}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===n&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*c/2,g=-1*u/2,m=h.A.svg(o),y=(0,i.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const v=m.rectangle(d,g,c,u,y),x=o.insert(()=>v,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),p(e,x);const b=r?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return F.rect(e,t)},o}async function ut(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(80,s.width+2*(e.padding??0),e?.width??0),c=Math.max(50,s.height+2*(e.padding??0),e?.height??0),d=c/2,{cssStyles:m}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-o/2,y:-c/2},{x:o/2-d,y:-c/2},...y(-o/2+d,0,d,50,90,270),{x:o/2-d,y:c/2},{x:-o/2,y:c/2}],w=g(b),T=v.path(w,x),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",m),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),p(e,k),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:d,point:t});return F.polygon(e,b,t)},a}(0,l.K2)(at,"cylinder"),(0,l.K2)(st,"dividedRectangle"),(0,l.K2)(ot,"doublecircle"),(0,l.K2)(lt,"filledCircle"),(0,l.K2)(ct,"flippedTriangle"),(0,l.K2)(ht,"forkJoin"),(0,l.K2)(ut,"halfRoundedRectangle");var dt=(0,l.K2)((t,e,n,r,i)=>[`M${t+i},${e}`,`L${t+n-i},${e}`,`L${t+n},${e-r/2}`,`L${t+n-i},${e-r}`,`L${t+i},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createHexagonPathD");async function pt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+e.padding,l=o/4,c=s.width+2*l+e.padding,d=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-o/2},{x:c-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}];let g;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=dt(0,0,c,o,l),s=t.path(r,n);g=a.insert(()=>s,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=U(a,c,o,d);return r&&g.attr("style",r),e.width=c,e.height=o,p(e,g),e.intersect=function(t){return F.polygon(e,d,t)},a}async function ft(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.label="",e.labelStyle=n;const{shapeSvg:a}=await u(t,e,f(e)),s=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],v=g(y),x=d.path(v,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",r),b.attr("transform",`translate(${-s/2}, ${-o/2})`),p(e,b),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:y});return F.polygon(e,y,t)},a}async function gt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=r?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v="t"===e.pos,x=d,b=d,{nodeBorder:w}=n,{stylesMap:T}=(0,i.WW)(e),k=-b/2,E=-x/2,A=e.label?8:0,_=h.A.svg(g),C=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=_.rectangle(k,E,b,x,C),R=Math.max(b,m.width),L=x+m.height+A,D=_.rectangle(-R/2,-L/2,R,L,{...C,fill:"transparent",stroke:"none"}),I=g.insert(()=>S,":first-child"),N=g.insert(()=>D);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,s=n.x,o=n.y;t.attr("transform",`translate(${-r/2-s},${v?m.height/2+A/2-i/2-o:-m.height/2-A/2-i/2-o})`),t.attr("style",`color: ${T.get("stroke")??w};`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${v?-L/2:L/2-m.height})`),I.attr("transform",`translate(0,${v?m.height/2+A/2:-m.height/2-A/2})`),p(e,N),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=v?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+A},{x:n+b/2,y:r-i/2+m.height+A},{x:n+b/2,y:r+i/2},{x:n-b/2,y:r+i/2},{x:n-b/2,y:r-i/2+m.height+A},{x:n-m.width/2,y:r-i/2+m.height+A}]:[{x:n-b/2,y:r-i/2},{x:n+b/2,y:r-i/2},{x:n+b/2,y:r-i/2+x},{x:n+m.width/2,y:r-i/2+x},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+x},{x:n-b/2,y:r-i/2+x}];return F.polygon(e,a,t)},g}async function mt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=r?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v=e.label?8:0,x="t"===e.pos,{nodeBorder:b,mainBkg:w}=n,{stylesMap:T}=(0,i.WW)(e),k=h.A.svg(g),E=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(E.roughness=0,E.fillStyle="solid");const A=T.get("fill");E.stroke=A??w;const _=g.append("g");e.icon&&_.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const C=_.node().getBBox(),S=C.width,R=C.height,L=C.x,D=C.y,I=Math.max(S,R)*Math.SQRT2+40,N=k.circle(0,0,I,E),M=Math.max(I,m.width),O=I+m.height+v,P=k.rectangle(-M/2,-O/2,M,O,{...E,fill:"transparent",stroke:"none"}),$=g.insert(()=>N,":first-child"),B=g.insert(()=>P);return _.attr("transform",`translate(${-S/2-L},${x?m.height/2+v/2-R/2-D:-m.height/2-v/2-R/2-D})`),_.attr("style",`color: ${T.get("stroke")??b};`),y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-O/2:O/2-m.height})`),$.attr("transform",`translate(0,${x?m.height/2+v/2:-m.height/2-v/2})`),p(e,B),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return F.rect(e,t)},g}async function yt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=r?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),x="t"===e.pos,w=d+2*y,T=d+2*y,{nodeBorder:k,mainBkg:E}=n,{stylesMap:A}=(0,i.WW)(e),_=-T/2,C=-w/2,S=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const D=A.get("fill");L.stroke=D??E;const I=R.path(b(_,C,T,w,5),L),N=Math.max(T,m.width),M=w+m.height+S,O=R.rectangle(-N/2,-M/2,N,M,{...L,fill:"transparent",stroke:"none"}),P=g.insert(()=>I,":first-child").attr("class","icon-shape2"),$=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,s=n.x,o=n.y;t.attr("transform",`translate(${-r/2-s},${x?m.height/2+S/2-i/2-o:-m.height/2-S/2-i/2-o})`),t.attr("style",`color: ${A.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-M/2:M/2-m.height})`),P.attr("transform",`translate(0,${x?m.height/2+S/2:-m.height/2-S/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+S},{x:n+T/2,y:r-i/2+m.height+S},{x:n+T/2,y:r+i/2},{x:n-T/2,y:r+i/2},{x:n-T/2,y:r-i/2+m.height+S},{x:n-m.width/2,y:r-i/2+m.height+S}]:[{x:n-T/2,y:r-i/2},{x:n+T/2,y:r-i/2},{x:n+T/2,y:r-i/2+w},{x:n+m.width/2,y:r-i/2+w},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+w},{x:n-T/2,y:r-i/2+w}];return F.polygon(e,a,t)},g}async function vt(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=r?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),x="t"===e.pos,w=d+2*y,T=d+2*y,{nodeBorder:k,mainBkg:E}=n,{stylesMap:A}=(0,i.WW)(e),_=-T/2,C=-w/2,S=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const D=A.get("fill");L.stroke=D??E;const I=R.path(b(_,C,T,w,.1),L),N=Math.max(T,m.width),M=w+m.height+S,O=R.rectangle(-N/2,-M/2,N,M,{...L,fill:"transparent",stroke:"none"}),P=g.insert(()=>I,":first-child"),$=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const n=t.node().getBBox(),r=n.width,i=n.height,s=n.x,o=n.y;t.attr("transform",`translate(${-r/2-s},${x?m.height/2+S/2-i/2-o:-m.height/2-S/2-i/2-o})`),t.attr("style",`color: ${A.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-M/2:M/2-m.height})`),P.attr("transform",`translate(0,${x?m.height/2+S/2:-m.height/2-S/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=x?[{x:n-m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2},{x:n+m.width/2,y:r-i/2+m.height+S},{x:n+T/2,y:r-i/2+m.height+S},{x:n+T/2,y:r+i/2},{x:n-T/2,y:r+i/2},{x:n-T/2,y:r-i/2+m.height+S},{x:n-m.width/2,y:r-i/2+m.height+S}]:[{x:n-T/2,y:r-i/2},{x:n+T/2,y:r-i/2},{x:n+T/2,y:r-i/2+w},{x:n+m.width/2,y:r-i/2+w},{x:n+m.width/2/2,y:r+i/2},{x:n-m.width/2,y:r+i/2},{x:n-m.width/2,y:r-i/2+w},{x:n-T/2,y:r-i/2+w}];return F.polygon(e,a,t)},g}async function xt(t,e,{config:{flowchart:n}}){const r=new Image;r.src=e?.img??"",await r.decode();const a=Number(r.naturalWidth.toString().replace("px","")),s=Number(r.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const c=n?.wrappingWidth;e.defaultWidth=n?.wrappingWidth;const d=Math.max(e.label?c??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(f,c??0);const{shapeSvg:m,bbox:y,label:v}=await u(t,e,"image-shape default"),x="t"===e.pos,b=-f/2,w=-g/2,T=e.label?8:0,k=h.A.svg(m),E=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(E.roughness=0,E.fillStyle="solid");const A=k.rectangle(b,w,f,g,E),_=Math.max(f,y.width),C=g+y.height+T,S=k.rectangle(-_/2,-C/2,_,C,{...E,fill:"none",stroke:"none"}),R=m.insert(()=>A,":first-child"),L=m.insert(()=>S);if(e.img){const t=m.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?C/2-g:-C/2})`)}return v.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-g/2-y.height/2-T/2:g/2-y.height/2+T/2})`),R.attr("transform",`translate(0,${x?y.height/2+T/2:-y.height/2-T/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);const n=e.x??0,r=e.y??0,i=e.height??0;let a=[];a=x?[{x:n-y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2},{x:n+y.width/2,y:r-i/2+y.height+T},{x:n+f/2,y:r-i/2+y.height+T},{x:n+f/2,y:r+i/2},{x:n-f/2,y:r+i/2},{x:n-f/2,y:r-i/2+y.height+T},{x:n-y.width/2,y:r-i/2+y.height+T}]:[{x:n-f/2,y:r-i/2},{x:n+f/2,y:r-i/2},{x:n+f/2,y:r-i/2+g},{x:n+y.width/2,y:r-i/2+g},{x:n+y.width/2/2,y:r+i/2},{x:n-y.width/2,y:r+i/2},{x:n-y.width/2,y:r-i/2+g},{x:n-f/2,y:r-i/2+g}];return F.polygon(e,a,t)},m}async function bt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=g(c),s=t.path(r,n);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=U(a,o,l,c);return r&&d.attr("style",r),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return F.polygon(e,c,t)},a}async function wt(t,e,n){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:o,bbox:l}=await u(t,e,f(e)),c=Math.max(l.width+2*n.labelPaddingX,e?.width||0),d=Math.max(l.height+2*n.labelPaddingY,e?.height||0),g=-c/2,m=-d/2;let y,{rx:v,ry:x}=e;const{cssStyles:w}=e;if(n?.rx&&n.ry&&(v=n.rx,x=n.ry),"handDrawn"===e.look){const t=h.A.svg(o),n=(0,i.Fr)(e,{}),r=v||x?t.path(b(g,m,c,d,v||0),n):t.rectangle(g,m,c,d,n);y=o.insert(()=>r,":first-child"),y.attr("class","basic label-container").attr("style",(0,s.KL)(w))}else y=o.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",a).attr("rx",(0,s.KL)(v)).attr("ry",(0,s.KL)(x)).attr("x",g).attr("y",m).attr("width",c).attr("height",d);return p(e,y),e.calcIntersect=function(t,e){return F.rect(t,e)},e.intersect=function(t){return F.rect(e,t)},o}async function Tt(t,e){const{shapeSvg:n,bbox:r,label:i}=await u(t,e,"label"),a=n.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),p(e,a),e.intersect=function(t){return F.rect(e,t)},n}async function kt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+(e.padding??0),e?.width??0),l=Math.max(s.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=g(c),s=t.path(r,n);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=U(a,o,l,c);return r&&d.attr("style",r),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return F.polygon(e,c,t)},a}async function Et(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+(e.padding??0),e?.width??0),l=Math.max(s.height+(e.padding??0),e?.height??0),c=[{x:-3*l/6,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=g(c),s=t.path(r,n);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=U(a,o,l,c);return r&&d.attr("style",r),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return F.polygon(e,c,t)},a}function At(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:o,y:0},{x:0,y:c+3.5},{x:o-14,y:c+3.5},{x:0,y:2*c},{x:o,y:c-3.5},{x:14,y:c-3.5}],d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g(u),v=d.path(y,m),x=a.insert(()=>v,":first-child");return s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(-${o/2},${-c})`),p(e,x),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return F.polygon(e,u,t)},a}(0,l.K2)(pt,"hexagon"),(0,l.K2)(ft,"hourglass"),(0,l.K2)(gt,"icon"),(0,l.K2)(mt,"iconCircle"),(0,l.K2)(yt,"iconRounded"),(0,l.K2)(vt,"iconSquare"),(0,l.K2)(xt,"imageSquare"),(0,l.K2)(bt,"inv_trapezoid"),(0,l.K2)(wt,"drawRect"),(0,l.K2)(Tt,"labelRect"),(0,l.K2)(kt,"lean_left"),(0,l.K2)(Et,"lean_right"),(0,l.K2)(At,"lightningBolt");var _t=(0,l.K2)((t,e,n,r,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createCylinderPathD"),Ct=(0,l.K2)((t,e,n,r,i,a,s)=>[`M${t},${e+a}`,`M${t+n},${e+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,"l0,"+-r,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createOuterCylinderPathD"),St=(0,l.K2)((t,e,n,r,i,a)=>[`M${t-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function Rt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=Math.max(o.width+(e.padding??0),e.width??0),d=c/2,g=d/(2.5+c/50),m=Math.max(o.height+g+(e.padding??0),e.height??0),y=.1*m;let v;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=Ct(0,0,c,m,d,g,y),r=St(0,g,c,m,d,g),s=(0,i.Fr)(e,{}),o=t.path(n,s),l=t.path(r,s);a.insert(()=>l,":first-child").attr("class","line"),v=a.insert(()=>o,":first-child"),v.attr("class","basic label-container"),x&&v.attr("style",x)}else{const t=_t(0,0,c,m,d,g,y);v=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(x)).attr("style",r)}return v.attr("label-offset-y",g),v.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),p(e,v),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+g-(o.y-(o.top??0))})`),e.intersect=function(t){const n=F.rect(e,t),r=n.x-(e.x??0);if(0!=d&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(n.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),n.y+=i}return n},a}async function Lt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,g=c+d,{cssStyles:y}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...m(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,d,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],w=v.polygon(b.map(t=>[t.x,t.y]),x),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),T.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return F.polygon(e,b,t)},a}async function Dt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,m=-c/2,{cssStyles:y}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{}),b=[{x:d-5,y:m+5},{x:d-5,y:m+c+5},{x:d+l-5,y:m+c+5},{x:d+l-5,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m+c-5},{x:d+l+5,y:m+c-5},{x:d+l+5,y:m-5},{x:d+5,y:m-5},{x:d+5,y:m},{x:d,y:m},{x:d,y:m+5}],w=[{x:d,y:m+5},{x:d+l-5,y:m+5},{x:d+l-5,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m},{x:d,y:m}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const T=g(b),k=v.path(T,x),E=g(w),A=v.path(E,{...x,fill:"none"}),_=a.insert(()=>A,":first-child");return _.insert(()=>k,":first-child"),_.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),o.attr("transform",`translate(${-s.width/2-5-(s.x-(s.left??0))}, ${-s.height/2+5-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return F.polygon(e,b,t)},a}async function It(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,y=c+d,v=-l/2,x=-y/2,{cssStyles:b}=e,w=m(v-5,x+y+5,v+l-5,x+y+5,d,.8),T=w?.[w.length-1],k=[{x:v-5,y:x+5},{x:v-5,y:x+y+5},...w,{x:v+l-5,y:T.y-5},{x:v+l,y:T.y-5},{x:v+l,y:T.y-10},{x:v+l+5,y:T.y-10},{x:v+l+5,y:x-5},{x:v+5,y:x-5},{x:v+5,y:x},{x:v,y:x},{x:v,y:x+5}],E=[{x:v,y:x+5},{x:v+l-5,y:x+5},{x:v+l-5,y:T.y-5},{x:v+l,y:T.y-5},{x:v+l,y:x},{x:v,y:x}],A=h.A.svg(a),_=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const C=g(k),S=A.path(C,_),R=g(E),L=A.path(R,_),D=a.insert(()=>S,":first-child");return D.insert(()=>L),D.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",r),D.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-s.width/2-5-(s.x-(s.left??0))}, ${-s.height/2+5-d/2-(s.y-(s.top??0))})`),p(e,D),e.intersect=function(t){return F.polygon(e,k,t)},a}async function Nt(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=r;e.useHtmlLabels||(0,o.E)((0,o.zj)())||(e.centerLabel=!0);const{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),m=-d/2,y=-g/2,{cssStyles:v}=e,x=h.A.svg(s),b=(0,i.Fr)(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=x.rectangle(m,y,d,g,b),T=s.insert(()=>w,":first-child");return T.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",v),a&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,T),e.intersect=function(t){return F.rect(e,t)},s}(0,l.K2)(Rt,"linedCylinder"),(0,l.K2)(Lt,"linedWaveEdgedRect"),(0,l.K2)(Dt,"multiRect"),(0,l.K2)(It,"multiWaveEdgedRectangle"),(0,l.K2)(Nt,"note");var Mt=(0,l.K2)((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ot(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding+(s.height+e.padding),l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=Mt(0,0,o),s=t.path(r,n);c=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2+.5}, ${o/2})`),d&&c.attr("style",d)}else c=U(a,o,o,l),c.attr("transform",`translate(${-o/2+.5}, ${o/2})`);return r&&c.attr("style",r),p(e,c),e.calcIntersect=function(t,e){const n=t.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=F.polygon(t,r,e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Pt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=-Math.max(s.width+(e.padding??0),e?.width??0)/2,c=-Math.max(s.height+(e.padding??0),e?.height??0)/2,d=c/2,m=[{x:l+d,y:c},{x:l,y:0},{x:l+d,y:-c},{x:-l,y:-c},{x:-l,y:c}],{cssStyles:y}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=g(m),w=v.path(b,x),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),T.attr("transform",`translate(${-d/2},0)`),o.attr("transform",`translate(${-d/2-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return F.polygon(e,m,t)},a}async function $t(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);let a;e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=s.insert("g"),d=s.insert("g").attr("class","label").attr("style",r),f=e.description,g=e.label,m=await x(d,g,e.labelStyle,!0,!0);let y={width:0,height:0};if((0,o.E)((0,o.D7)())){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.Rm.info("Text 2",f);const v=f||[],w=m.getBBox(),T=await x(d,Array.isArray(v)?v.join("<br/>"):v,e.labelStyle,!0,!0),k=T.children[0],E=(0,c.Ltv)(T);y=k.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height);const A=(e.padding||0)/2;(0,c.Ltv)(T).attr("transform","translate( "+(y.width>w.width?0:(w.width-y.width)/2)+", "+(w.height+A+5)+")"),(0,c.Ltv)(m).attr("transform","translate( "+(y.width<w.width?0:-(w.width-y.width)/2)+", 0)"),y=d.node().getBBox(),d.attr("transform","translate("+-y.width/2+", "+(-y.height/2-A+3)+")");const _=y.width+(e.padding||0),C=y.height+(e.padding||0),S=-y.width/2-A,R=-y.height/2-A;let L,D;if("handDrawn"===e.look){const t=h.A.svg(s),n=(0,i.Fr)(e,{}),r=t.path(b(S,R,_,C,e.rx||0),n),a=t.line(-y.width/2-A,-y.height/2-A+w.height+A,y.width/2+A,-y.height/2-A+w.height+A,n);D=s.insert(()=>(l.Rm.debug("Rough node insert CXC",r),a),":first-child"),L=s.insert(()=>(l.Rm.debug("Rough node insert CXC",r),r),":first-child")}else L=u.insert("rect",":first-child"),D=u.insert("line"),L.attr("class","outer title-state").attr("style",r).attr("x",-y.width/2-A).attr("y",-y.height/2-A).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),D.attr("class","divider").attr("x1",-y.width/2-A).attr("x2",y.width/2+A).attr("y1",-y.height/2-A+w.height+A).attr("y2",-y.height/2-A+w.height+A);return p(e,L),e.intersect=function(t){return F.rect(e,t)},s}async function Bt(t,e){return wt(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Ft(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=e?.padding??0,d=Math.max(o.width+2*(e.padding??0),e?.width??0),g=Math.max(o.height+2*(e.padding??0),e?.height??0),m=-o.width/2-c,y=-o.height/2-c,{cssStyles:v}=e,x=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=[{x:m,y},{x:m+d+8,y},{x:m+d+8,y:y+g},{x:m-8,y:y+g},{x:m-8,y},{x:m,y},{x:m,y:y+g}],T=x.polygon(w.map(t=>[t.x,t.y]),b),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container").attr("style",(0,s.KL)(v)),r&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),v&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),l.attr("transform",`translate(${-d/2+4+(e.padding??0)-(o.x-(o.left??0))},${-g/2+(e.padding??0)-(o.y-(o.top??0))})`),p(e,k),e.intersect=function(t){return F.rect(e,t)},a}async function zt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,m=-c/2,{cssStyles:y}=e,v=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:d,y:m},{x:d,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m-c/2}],w=g(b),T=v.path(w,x),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",y),r&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",r),k.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))}, ${-c/4+(e.padding??0)-(s.y-(s.top??0))})`),p(e,k),e.intersect=function(t){return F.polygon(e,b,t)},a}async function Kt(t,e){return wt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function qt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+e.padding,l=s.width+o/4+e.padding,c=o/2,{cssStyles:d}=e,m=h.A.svg(a),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const x=[{x:-l/2+c,y:-o/2},{x:l/2-c,y:-o/2},...y(-l/2+c,0,c,50,90,270),{x:l/2-c,y:o/2},...y(l/2-c,0,c,50,270,450)],b=g(x),w=m.path(b,v),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",d),r&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",r),p(e,T),e.intersect=function(t){return F.polygon(e,x,t)},a}async function Ut(t,e){return wt(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function jt(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=r;const{cssStyles:s}=e,{lineColor:o,stateBorder:l,nodeBorder:c}=n,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=h.A.svg(u),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,14,{...f,stroke:o,strokeWidth:2}),m=l??c,y=d.circle(0,0,5,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),v=u.insert(()=>g,":first-child");return v.insert(()=>y),s&&v.selectAll("path").attr("style",s),a&&v.selectAll("path").attr("style",a),p(e,v),e.intersect=function(t){return F.circle(e,7,t)},u}function Yt(t,e,{config:{themeVariables:n}}){const{lineColor:r}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=h.A.svg(a).circle(0,0,14,(0,i.ue)(r));s=a.insert(()=>t),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return p(e,s),e.intersect=function(t){return F.circle(e,7,t)},a}async function Gt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),l=(e?.padding||0)/2,c=o.width+e.padding,d=o.height+e.padding,g=-o.width/2-l,m=-o.height/2-l,y=[{x:0,y:0},{x:c,y:0},{x:c,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=t.rectangle(g-8,m,c+16,d,n),o=t.line(g,m,g,m+d,n),l=t.line(g+c,m,g+c,m+d,n);a.insert(()=>o,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>r,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,s.KL)(f)),p(e,u)}else{const t=U(a,c,d,y);r&&t.attr("style",r),p(e,t)}return e.intersect=function(t){return F.polygon(e,y,t)},a}async function Wt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-o/2,d=-l/2,m=.2*l,y=.2*l,{cssStyles:v}=e,x=h.A.svg(a),b=(0,i.Fr)(e,{}),w=[{x:c-m/2,y:d},{x:c+o+m/2,y:d},{x:c+o+m/2,y:d+l},{x:c-m/2,y:d+l}],T=[{x:c+o-m/2,y:d+l},{x:c+o+m/2,y:d+l},{x:c+o+m/2,y:d+l-y}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(w),E=x.path(k,b),A=g(T),_=x.path(A,{...b,fillStyle:"solid"}),C=a.insert(()=>_,":first-child");return C.insert(()=>E,":first-child"),C.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",v),r&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",r),p(e,C),e.intersect=function(t){return F.polygon(e,w,t)},a}async function Vt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,y=.2*l,v=.2*c,x=c+d,{cssStyles:b}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:x/2},...m(-l/2-l/2*.1,x/2,l/2+l/2*.1,x/2,d,.8),{x:l/2+l/2*.1,y:-x/2},{x:-l/2-l/2*.1,y:-x/2}],E=-l/2+l/2*.1,A=-x/2-.4*v,_=[{x:E+l-y,y:1.4*(A+c)},{x:E+l,y:A+c-v},{x:E+l,y:.9*(A+c)},...m(E+l,1.3*(A+c),E+l-y,1.5*(A+c),.03*-c,.5)],C=g(k),S=w.path(C,T),R=g(_),L=w.path(R,{...T,fillStyle:"solid"}),D=a.insert(()=>L,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",r),D.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d/2-(s.y-(s.top??0))})`),p(e,D),e.intersect=function(t){return F.polygon(e,k,t)},a}async function Ht(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+e.padding,e?.width||0),l=Math.max(s.height+e.padding,e?.height||0),c=-o/2,h=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",r).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",o).attr("height",l),p(e,d),e.intersect=function(t){return F.rect(e,t)},a}(0,l.K2)(Ot,"question"),(0,l.K2)(Pt,"rect_left_inv_arrow"),(0,l.K2)($t,"rectWithTitle"),(0,l.K2)(Bt,"roundedRect"),(0,l.K2)(Ft,"shadedProcess"),(0,l.K2)(zt,"slopedRect"),(0,l.K2)(Kt,"squareRect"),(0,l.K2)(qt,"stadium"),(0,l.K2)(Ut,"state"),(0,l.K2)(jt,"stateEnd"),(0,l.K2)(Yt,"stateStart"),(0,l.K2)(Gt,"subroutine"),(0,l.K2)(Wt,"taggedRect"),(0,l.K2)(Vt,"taggedWaveEdgedRectangle"),(0,l.K2)(Ht,"text");var Xt=(0,l.K2)((t,e,n,r,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-r}\n l${n},0\n a${i},${a} 0,0,1 0,${r}\n M${n},${-r}\n a${i},${a} 0,0,0 0,${r}\n l${-n},0`,"createCylinderPathD"),Zt=(0,l.K2)((t,e,n,r,i,a)=>[`M${t},${e}`,`M${t+n},${e}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(" "),"createOuterCylinderPathD"),Qt=(0,l.K2)((t,e,n,r,i,a)=>[`M${t+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(" "),"createInnerCylinderPathD");async function Jt(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,label:l,halfPadding:c}=await u(t,e,f(e)),d="neo"===e.look?2*c:c,g=o.height+d,m=g/2,y=m/(2.5+g/50),v=o.width+y+d,{cssStyles:x}=e;let b;if("handDrawn"===e.look){const t=h.A.svg(a),n=Zt(0,0,v,g,y,m),r=Qt(0,0,v,g,y,m),s=t.path(n,(0,i.Fr)(e,{})),o=t.path(r,(0,i.Fr)(e,{fill:"none"}));b=a.insert(()=>o,":first-child"),b=a.insert(()=>s,":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=Xt(0,0,v,g,y,m);b=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(x)).attr("style",r),b.attr("class","basic label-container"),x&&b.selectAll("path").attr("style",x),r&&b.selectAll("path").attr("style",r)}return b.attr("label-offset-x",y),b.attr("transform",`translate(${-v/2}, ${g/2} )`),l.attr("transform",`translate(${-o.width/2-y-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),p(e,b),e.intersect=function(t){const n=F.rect(e,t),r=n.y-(e.y??0);if(0!=m&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(n.x-(e.x??0))>(e.width??0)/2-y)){let i=y*y*(1-r*r/(m*m));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),n.x+=i}return n},a}async function te(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding,l=s.height+e.padding,c=[{x:-3*l/6,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:0,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=g(c),s=t.path(r,n);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=U(a,o,l,c);return r&&d.attr("style",r),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return F.polygon(e,c,t)},a}async function ee(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(60,s.width+2*(e.padding??0),e?.width??0),l=Math.max(20,s.height+2*(e.padding??0),e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2*.8,y:-l/2},{x:o/2*.8,y:-l/2},{x:o/2,y:-l/2*.6},{x:o/2,y:l/2},{x:-o/2,y:l/2},{x:-o/2,y:-l/2*.6}],v=g(y),x=d.path(v,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",c),r&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",r),p(e,b),e.intersect=function(t){return F.polygon(e,y,t)},a}async function ne(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:c}=await u(t,e,f(e)),d=e.useHtmlLabels||(0,o.E)((0,o.D7)()),m=s.width+(e.padding??0),y=m+s.height,v=m+s.height,x=[{x:0,y:0},{x:v,y:0},{x:v/2,y:-y}],{cssStyles:b}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=g(x),E=w.path(k,T),A=a.insert(()=>E,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`);return b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),r&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",r),e.width=m,e.height=y,p(e,A),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${y/2-(s.height+(e.padding??0)/(d?2:1)-(s.y-(s.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,x,t),F.polygon(e,x,t)},a}async function re(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/8,y=c+d,{cssStyles:v}=e,x=70-l,b=x>0?x/2:0,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-l/2-b,y:y/2},...m(-l/2-b,y/2,l/2+b,y/2,d,.8),{x:l/2+b,y:-y/2},{x:-l/2-b,y:-y/2}],E=g(k),A=w.path(E,T),_=a.insert(()=>A,":first-child");return _.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",v),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),_.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return F.polygon(e,k,t)},a}async function ie(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=o/l;let d=o,y=l;d>y*c?y=d/c:d=y*c,d=Math.max(d,100),y=Math.max(y,50);const v=Math.min(.2*y,y/4),x=y+2*v,{cssStyles:b}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-d/2,y:x/2},...m(-d/2,x/2,d/2,x/2,v,1),{x:d/2,y:-x/2},...m(d/2,-x/2,-d/2,-x/2,v,-1)],E=g(k),A=w.path(E,T),_=a.insert(()=>A,":first-child");return _.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",b),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),p(e,_),e.intersect=function(t){return F.polygon(e,k,t)},a}async function ae(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,g=-c/2,{cssStyles:m}=e,y=h.A.svg(a),v=(0,i.Fr)(e,{}),x=[{x:d-5,y:g-5},{x:d-5,y:g+c},{x:d+l,y:g+c},{x:d+l,y:g-5}],b=`M${d-5},${g-5} L${d+l},${g-5} L${d+l},${g+c} L${d-5},${g+c} L${d-5},${g-5}\n M${d-5},${g} L${d+l},${g}\n M${d},${g-5} L${d},${g+c}`;"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const w=y.path(b,v),T=a.insert(()=>w,":first-child");return T.attr("transform","translate(2.5, 2.5)"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),r&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",r),o.attr("transform",`translate(${-s.width/2+2.5-(s.x-(s.left??0))}, ${-s.height/2+2.5-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return F.polygon(e,x,t)},a}async function se(t,e){const n=e;if(n.alias&&(e.label=n.alias),"handDrawn"===e.look){const{themeVariables:n}=(0,o.zj)(),{background:r}=n,i={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${r}`]};await se(t,i)}const r=(0,o.zj)();e.useHtmlLabels=r.htmlLabels;let a=r.er?.diagramPadding??10,l=r.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:d,nodeStyles:g}=(0,i.GX)(e);if(0===n.attributes.length&&e.label){const n={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,s.Un)(e.label,r)+2*n.labelPaddingX<r.er.minEntityWidth&&(e.width=r.er.minEntityWidth);const i=await wt(t,e,n);if(!(0,o._3)(r.htmlLabels)){const t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}r.htmlLabels||(a*=1.25,l*=1.25);let m=f(e);m||(m="node default");const y=t.insert("g").attr("class",m).attr("id",e.domId||e.id),v=await oe(y,e.label??"",r,0,0,["name"],d);v.height+=l;let x=0;const b=[],w=[];let T=0,k=0,E=0,A=0,_=!0,C=!0;for(const i of n.attributes){const t=await oe(y,i.type,r,0,x,["attribute-type"],d);T=Math.max(T,t.width+a);const e=await oe(y,i.name,r,0,x,["attribute-name"],d);k=Math.max(k,e.width+a);const n=await oe(y,i.keys.join(),r,0,x,["attribute-keys"],d);E=Math.max(E,n.width+a);const s=await oe(y,i.comment,r,0,x,["attribute-comment"],d);A=Math.max(A,s.width+a);const o=Math.max(t.height,e.height,n.height,s.height)+l;w.push({yOffset:x,rowHeight:o}),x+=o}let S=4;E<=a&&(_=!1,E=0,S--),A<=a&&(C=!1,A=0,S--);const R=y.node().getBBox();if(v.width+2*a-(T+k+E+A)>0){const t=v.width+2*a-(T+k+E+A);T+=t/S,k+=t/S,E>0&&(E+=t/S),A>0&&(A+=t/S)}const L=T+k+E+A,D=h.A.svg(y),I=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");let N=0;w.length>0&&(N=w.reduce((t,e)=>t+(e?.rowHeight??0),0));const M=Math.max(R.width+2*a,e?.width||0,L),O=Math.max((N??0)+v.height,e?.height||0),P=-M/2,$=-O/2;y.selectAll("g:not(:first-child)").each((t,e,n)=>{const r=(0,c.Ltv)(n[e]),i=r.attr("transform");let s=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(s=parseFloat(t[1]),o=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=T:r.attr("class").includes("attribute-keys")?s+=T+k:r.attr("class").includes("attribute-comment")&&(s+=T+k+E))}r.attr("transform",`translate(${P+a/2+s}, ${o+$+v.height+l/2})`)}),y.select(".name").attr("transform","translate("+-v.width/2+", "+($+l/2)+")");const B=D.rectangle(P,$,M,O,I),z=y.insert(()=>B,":first-child").attr("style",u.join("")),{themeVariables:K}=(0,o.zj)(),{rowEven:q,rowOdd:U,nodeBorder:j}=K;b.push(0);for(const[i,s]of w.entries()){const t=(i+1)%2==0&&0!==s.yOffset,e=D.rectangle(P,v.height+$+s?.yOffset,M,s?.rowHeight,{...I,fill:t?q:U,stroke:j});y.insert(()=>e,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(t?"even":"odd"))}let Y=D.line(P,v.height+$,M+P,v.height+$,I);y.insert(()=>Y).attr("class","divider"),Y=D.line(T+P,v.height+$,T+P,O+$,I),y.insert(()=>Y).attr("class","divider"),_&&(Y=D.line(T+k+P,v.height+$,T+k+P,O+$,I),y.insert(()=>Y).attr("class","divider")),C&&(Y=D.line(T+k+E+P,v.height+$,T+k+E+P,O+$,I),y.insert(()=>Y).attr("class","divider"));for(const i of b)Y=D.line(P,v.height+$+i,M+P,v.height+$+i,I),y.insert(()=>Y).attr("class","divider");if(p(e,z),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return F.rect(e,t)},y}async function oe(t,e,n,r=0,i=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${r}, ${i})`).attr("style",h);e!==(0,o.QO)(e)&&(e=(e=(0,o.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,s.Un)(e,n)+100,style:h,useHtmlLabels:n.htmlLabels},n));if(e.includes("&lt;")||e.includes("&gt;")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let p=d.getBBox();if((0,o._3)(n.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}async function le(t,e,n,r,i=n.class.padding??12){const a=r?0:3,s=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ce(o,{text:`«${t}»`},0);u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await ce(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const f of e.members){m+=await ce(c,f,m,[f.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const f of e.methods){y+=await ce(h,f,y,[f.parseClassifier()])+a}let v=s.node().getBBox();if(null!==o){const t=o.node().getBBox();o.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),v=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),v=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}async function ce(t,e,n,r=[]){const i=t.insert("g").attr("class","label").attr("style",r.join("; ")),h=(0,o.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,o._3)(h.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,o.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(i,(0,o.oB)((0,s.Sm)(d)),{width:(0,s.Un)(d,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let f,g=1;if(u){const t=p.children[0],e=(0,c.Ltv)(p);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const n=t.getElementsByTagName("img");if(n){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(e=>new Promise(n=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=5,r=parseInt(t,10)*n+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";n(e)}(0,l.K2)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{r.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes("&gt")){t.textContent=d[0]+d.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return i.attr("transform","translate(0,"+(-f.height/(2*g)+n)+")"),f.height}async function he(t,e){const n=(0,o.D7)(),r=n.class.padding??12,a=r,s=e.useHtmlLabels??(0,o._3)(n.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await le(t,e,n,s,a),{labelStyles:f,nodeStyles:g}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=l.styles||"";const m=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));const y=0===l.members.length&&0===l.methods.length&&!n.class?.hideEmptyMembersBox,v=h.A.svg(u),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=d.width;let w=d.height;0===l.members.length&&0===l.methods.length?w+=a:l.members.length>0&&0===l.methods.length&&(w+=2*a);const T=-b/2,k=-w/2,E=v.rectangle(T-r,k-r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0),b+2*r,w+2*r+(y?2*r:0===l.members.length&&0===l.methods.length?-r:0),x),A=u.insert(()=>E,":first-child");A.attr("class","basic label-container");const _=A.node().getBBox();u.selectAll(".text").each((t,e,n)=>{const i=(0,c.Ltv)(n[e]),a=i.attr("transform");let o=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(o=parseFloat(t[2]))}let h=o+k+r-(y?r:0===l.members.length&&0===l.methods.length?-r/2:0);s||(h-=4);let d=T;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-i.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,n){"middle"===window.getComputedStyle(n[e]).textAnchor&&(d=0)})),i.attr("transform",`translate(${d}, ${h})`)});const C=u.select(".annotation-group").node().getBBox().height-(y?r/2:0)||0,S=u.select(".label-group").node().getBBox().height-(y?r/2:0)||0,R=u.select(".members-group").node().getBBox().height-(y?r/2:0)||0;if(l.members.length>0||l.methods.length>0||y){const t=v.line(_.x,C+S+k+r,_.x+_.width,C+S+k+r,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if(y||l.members.length>0||l.methods.length>0){const t=v.line(_.x,C+S+R+k+2*a+r,_.x+_.width,C+S+R+k+r+2*a,x);u.insert(()=>t).attr("class","divider").attr("style",m)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",m),A.select(":nth-child(2)").attr("style",m),u.selectAll(".divider").select("path").attr("style",m),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",m),!s){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(m);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return p(e,A),e.intersect=function(t){return F.rect(e,t)},u}async function ue(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const a=e,s=e,o="verifyMethod"in e,l=f(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let d;d=o?await de(u,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):await de(u,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let g=d;const m=await de(u,a.name,g,e.labelStyle+"; font-weight: bold;");if(g+=m+20,o){g+=await de(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),g,e.labelStyle);g+=await de(u,""+(a.text?`Text: ${a.text}`:""),g,e.labelStyle);g+=await de(u,""+(a.risk?`Risk: ${a.risk}`:""),g,e.labelStyle),await de(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),g,e.labelStyle)}else{g+=await de(u,""+(s.type?`Type: ${s.type}`:""),g,e.labelStyle),await de(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),g,e.labelStyle)}const y=(u.node()?.getBBox().width??200)+20,v=(u.node()?.getBBox().height??200)+20,x=-y/2,b=-v/2,w=h.A.svg(u),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=w.rectangle(x,b,y,v,T),E=u.insert(()=>k,":first-child");if(E.attr("class","basic label-container").attr("style",r),u.selectAll(".label").each((t,e,n)=>{const r=(0,c.Ltv)(n[e]),i=r.attr("transform");let a=0,s=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const o=s-v/2;let l=x+10;0!==e&&1!==e||(l=a),r.attr("transform",`translate(${l}, ${o+20})`)}),g>d+m+20){const t=w.line(x,b+d+m+20,x+y,b+d+m+20,T);u.insert(()=>t).attr("style",r)}return p(e,E),e.intersect=function(t){return F.rect(e,t)},u}async function de(t,e,n,r=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",r),l=(0,o.D7)(),h=l.htmlLabels??!0,u=await(0,a.GZ)(i,(0,o.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:r},l);let d;if(h){const t=u.children[0],e=(0,c.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),r&&e.setAttribute("style",r);d=u.getBBox(),d.height+=6}return i.attr("transform",`translate(${-d.width/2},${-d.height/2+n})`),d.height}(0,l.K2)(Jt,"tiltedCylinder"),(0,l.K2)(te,"trapezoid"),(0,l.K2)(ee,"trapezoidalPentagon"),(0,l.K2)(ne,"triangle"),(0,l.K2)(re,"waveEdgedRectangle"),(0,l.K2)(ie,"waveRectangle"),(0,l.K2)(ae,"windowPane"),(0,l.K2)(se,"erBox"),(0,l.K2)(oe,"addText"),(0,l.K2)(le,"textHelper"),(0,l.K2)(ce,"addText"),(0,l.K2)(he,"classBox"),(0,l.K2)(ue,"requirementBox"),(0,l.K2)(de,"addText");var pe=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function fe(t,e,{config:n}){const{labelStyles:r,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=r||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await u(t,e,f(e)),g=e.padding||10;let m,y="";"ticket"in e&&e.ticket&&n?.kanban?.ticketBaseUrl&&(y=n?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),m=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const v={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,w;({label:x,bbox:w}=m?await d(m,"ticket"in e&&e.ticket||"",v):await d(o,"ticket"in e&&e.ticket||"",v));const{label:T,bbox:k}=await d(o,"assigned"in e&&e.assigned||"",v);e.width=s;const E=e?.width||0,A=Math.max(w.height,k.height)/2,_=Math.max(l.height+20,e?.height||0)+A,C=-E/2,S=-_/2;let R;c.attr("transform","translate("+(g-E/2)+", "+(-A-l.height/2)+")"),x.attr("transform","translate("+(g-E/2)+", "+(-A+l.height/2)+")"),T.attr("transform","translate("+(g+E/2-k.width-20)+", "+(-A+l.height/2)+")");const{rx:L,ry:D}=e,{cssStyles:I}=e;if("handDrawn"===e.look){const t=h.A.svg(o),n=(0,i.Fr)(e,{}),r=L||D?t.path(b(C,S,E,_,L||0),n):t.rectangle(C,S,E,_,n);R=o.insert(()=>r,":first-child"),R.attr("class","basic label-container").attr("style",I||null)}else{R=o.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",D??5).attr("x",C).attr("y",S).attr("width",E).attr("height",_);const t="priority"in e&&e.priority;if(t){const e=o.append("line"),n=C+2,r=S+Math.floor((L??0)/2),i=S+_-Math.floor((L??0)/2);e.attr("x1",n).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width","4").attr("stroke",pe(t))}}return p(e,R),e.height=_,e.intersect=function(t){return F.rect(e,t)},o}async function ge(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,halfPadding:c,label:d}=await u(t,e,f(e)),g=o.width+10*c,m=o.height+8*c,y=.15*g,{cssStyles:v}=e,x=o.width+20,b=o.height+20,w=Math.max(g,x),T=Math.max(m,b);let k;d.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const E=`M0 0 \n a${y},${y} 1 0,0 ${.25*w},${-1*T*.1}\n a${y},${y} 1 0,0 ${.25*w},0\n a${y},${y} 1 0,0 ${.25*w},0\n a${y},${y} 1 0,0 ${.25*w},${.1*T}\n\n a${y},${y} 1 0,0 ${.15*w},${.33*T}\n a${.8*y},${.8*y} 1 0,0 0,${.34*T}\n a${y},${y} 1 0,0 ${-1*w*.15},${.33*T}\n\n a${y},${y} 1 0,0 ${-1*w*.25},${.15*T}\n a${y},${y} 1 0,0 ${-1*w*.25},0\n a${y},${y} 1 0,0 ${-1*w*.25},0\n a${y},${y} 1 0,0 ${-1*w*.25},${-1*T*.15}\n\n a${y},${y} 1 0,0 ${-1*w*.1},${-1*T*.33}\n a${.8*y},${.8*y} 1 0,0 0,${-1*T*.34}\n a${y},${y} 1 0,0 ${.1*w},${-1*T*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=t.path(E,n);k=a.insert(()=>r,":first-child"),k.attr("class","basic label-container").attr("style",(0,s.KL)(v))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",E);return k.attr("transform",`translate(${-w/2}, ${-T/2})`),p(e,k),e.calcIntersect=function(t,e){return F.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),F.rect(e,t)},a}async function me(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:o,halfPadding:c,label:d}=await u(t,e,f(e)),g=o.width+2*c,m=o.height+2*c,y=.15*g,v=.25*g,x=.35*g,b=.2*g,{cssStyles:w}=e;let T;const k=`M0 0 \n a${y},${y} 0 0,1 ${.25*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.4*g},${-1*g*.1}\n a${v},${v} 1 0,1 ${.35*g},${.2*g}\n\n a${y},${y} 1 0,1 ${.15*g},${.35*m}\n a${b},${b} 1 0,1 ${-1*g*.15},${.65*m}\n\n a${v},${y} 1 0,1 ${-1*g*.25},${.15*g}\n a${x},${x} 1 0,1 ${-1*g*.5},0\n a${y},${y} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${y},${y} 1 0,1 ${-1*g*.1},${-1*m*.35}\n a${b},${b} 1 0,1 ${.1*g},${-1*m*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),n=(0,i.Fr)(e,{}),r=t.path(k,n);T=a.insert(()=>r,":first-child"),T.attr("class","basic label-container").attr("style",(0,s.KL)(w))}else T=a.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",k);return d.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),T.attr("transform",`translate(${-g/2}, ${-m/2})`),p(e,T),e.calcIntersect=function(t,e){return F.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),F.rect(e,t)},a}async function ye(t,e){const{labelStyles:n,nodeStyles:r}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await u(t,e,f(e)),c=s.width+8*o,h=s.height+2*o,d=`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${10-c}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",r).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return F.rect(t,e)},e.intersect=function(t){return F.rect(e,t)},a}async function ve(t,e){return G(t,e,{padding:e.padding??0})}(0,l.K2)(fe,"kanbanItem"),(0,l.K2)(ge,"bang"),(0,l.K2)(me,"cloud"),(0,l.K2)(ye,"defaultMindmapNode"),(0,l.K2)(ve,"mindmapCircle");var xe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Kt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Bt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:at},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:G},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ge},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:me},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ot},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Et},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:te},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:bt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ot},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ht},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:j},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ft},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Yt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:jt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ht},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ft},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:X},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Q},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:At},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:re},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ut},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Jt},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Rt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:et},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:st},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ne},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ae},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ee},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ct},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:It},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Dt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:q},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Wt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ie},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Pt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lt}],be=(0,l.K2)(()=>{const t={state:Ut,choice:Y,note:Nt,rectWithTitle:$t,labelRect:Tt,iconSquare:vt,iconCircle:mt,icon:gt,iconRounded:yt,imageSquare:xt,anchor:z,kanbanItem:fe,mindmapCircle:ve,defaultMindmapNode:ye,classBox:he,erBox:se,requirementBox:ue},e=[...Object.entries(t),...xe.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function we(t){return t in be}(0,l.K2)(we,"isValidShape");var Te=new Map;async function ke(t,e,n){let r,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?be[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===n.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(r,e,n)}else i=await a(t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),Te.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,l.K2)(ke,"insertNode");var Ee=(0,l.K2)((t,e)=>{Te.set(e.id,t)},"setNodeElem"),Ae=(0,l.K2)(()=>{Te.clear()},"clear"),_e=(0,l.K2)(t=>{const e=Te.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")},4769(t,e,n){"use strict";n.d(e,{Nq:()=>s,RI:()=>c,Wg:()=>i,hq:()=>a});var r=n(797),i=(0,r.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const n=t.x??0,r=t.y??0;return"translate("+-(n+t.width/2)+", "+-(r+t.height/2)+")"},"computeLabelTransform"),a={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},s={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[n,r]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-n,o=a-r;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}(0,r.K2)(o,"calculateDeltaAndAngle");var l=(0,r.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),c=(0,r.K2)(t=>({x:(0,r.K2)(function(e,n,r){let i=0;const s=l(r[0]).x<l(r[r.length-1]).x?"left":"right";if(0===n&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaX:n}=o(r[0],r[1]);i=a[t.arrowTypeStart]*Math.cos(e)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaX:n}=o(r[r.length-1],r[r.length-2]);i=a[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}const c=Math.abs(l(e).x-l(r[r.length-1]).x),h=Math.abs(l(e).y-l(r[r.length-1]).y),u=Math.abs(l(e).x-l(r[0]).x),d=Math.abs(l(e).y-l(r[0]).y),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(c<f&&c>0&&h<f){let t=f+1-c;t*="right"===s?-1:1,i-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="right"===s?-1:1,i+=t}return l(e).x+i},"x"),y:(0,r.K2)(function(e,n,r){let i=0;const s=l(r[0]).y<l(r[r.length-1]).y?"down":"up";if(0===n&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaY:n}=o(r[0],r[1]);i=a[t.arrowTypeStart]*Math.abs(Math.sin(e))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaY:n}=o(r[r.length-1],r[r.length-2]);i=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}const c=Math.abs(l(e).y-l(r[r.length-1]).y),h=Math.abs(l(e).x-l(r[r.length-1]).x),u=Math.abs(l(e).y-l(r[0]).y),d=Math.abs(l(e).x-l(r[0]).x),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(c<f&&c>0&&h<f){let t=f+1-c;t*="up"===s?-1:1,i-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="up"===s?-1:1,i+=t}return l(e).y+i},"y")}),"getLineFunctionsWithOffset")},8021(t,e,n){"use strict";n.d(e,{Zk:()=>h,q7:()=>$,tM:()=>st,u4:()=>at});var r=n(9625),i=n(2627),a=n(9856),s=n(796),o=n(4098),l=n(797),c=function(){var t=(0,l.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],f=[1,21],g=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],T=[1,30],k=[1,31],E=[1,32],A=[1,35],_=[1,36],C=[1,37],S=[1,38],R=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],D=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,l.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:return r.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:const t=a[o-1];t.description=r.trimColon(a[o]),this.$=t;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:const e=r.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:e};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l=a[o],c=a[o-2].trim();if(a[o].match(":")){var h=a[o].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:T,45:k,48:E,51:A,52:_,53:C,54:S,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:T,45:k,48:E,51:A,52:_,53:C,54:S,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(D,[2,44],{58:[1,56]}),t(D,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(I,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:T,45:k,48:E,51:A,52:_,53:C,54:S,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(D,[2,46]),t(D,[2,47]),t(L,[2,15]),t(L,[2,19]),t(I,i,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:x,37:b,38:w,41:T,45:k,48:E,51:A,52:_,53:C,54:S,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},M=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,n,r){switch(n){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}}();function O(){this.yy={}}return N.lexer=M,(0,l.K2)(O,"Parser"),O.prototype=N,N.Parser=O,new O}();c.parser=c;var h=c,u="state",d="root",p="relation",f="default",g="divider",m="fill:none",y="fill: #333",v="markdown",x="normal",b="rect",w="rectWithTitle",T="divider",k="roundedWithTitle",E="statediagram",A=`${E}-state`,_="transition",C=`${_} note-edge`,S=`${E}-note`,R=`${E}-cluster`,L=`${E}-cluster-alt`,D="parent",I="note",N="----",M=`${N}${I}`,O=`${N}${D}`,P=(0,l.K2)((t,e="TB")=>{if(!t.doc)return e;let n=e;for(const r of t.doc)"dir"===r.stmt&&(n=r.value);return n},"getDir"),$={getClasses:(0,l.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,l.K2)(async function(t,e,n,c){l.Rm.info("REF0:"),l.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:u,layout:d}=(0,o.D7)();c.db.extract(c.db.getRootDocV2());const p=c.db.getData(),f=(0,r.A)(e,h);p.type=c.type,p.layoutAlgorithm=d,p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50,p.markers=["barb"],p.diagramId=e,await(0,a.XX)(p,f);try{("function"==typeof c.db.getLinks?c.db.getLinks():new Map).forEach((t,e)=>{const n="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!n)return void l.Rm.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const r=f.node()?.querySelectorAll("g");let i;if(r?.forEach(t=>{const e=t.textContent?.trim();e===n&&(i=t)}),!i)return void l.Rm.warn("⚠️ Could not find node matching text:",n);const a=i.parentNode;if(!a)return void l.Rm.warn("⚠️ Node has no parent, cannot wrap:",n);const s=document.createElementNS("http://www.w3.org/2000/svg","a"),o=t.url.replace(/^"+|"+$/g,"");if(s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),s.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");s.setAttribute("title",e)}a.replaceChild(s,i),s.appendChild(i),l.Rm.info("🔗 Wrapped node in <a> tag for:",n,t.url)})}catch(g){l.Rm.error("❌ Error injecting clickable links:",g)}s._K.insertTitle(f,"statediagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(f,8,E,u?.useMaxWidth??!0)},"draw"),getDir:P},B=new Map,F=0;function z(t="",e=0,n="",r=N){return`state-${t}${null!==n&&n.length>0?`${r}${n}`:""}-${e}`}(0,l.K2)(z,"stateDomId");var K=(0,l.K2)((t,e,n,r,i,a,s,c)=>{l.Rm.trace("items",e),e.forEach(e=>{switch(e.stmt){case u:case f:G(t,e,n,r,i,a,s,c);break;case p:{G(t,e.state1,n,r,i,a,s,c),G(t,e.state2,n,r,i,a,s,c);const l={id:"edge"+F,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:m,labelStyle:"",label:o.Y2.sanitizeText(e.description??"",(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:v,thickness:x,classes:_,look:s};i.push(l),F++}}})},"setupDoc"),q=(0,l.K2)((t,e="TB")=>{let n=e;if(t.doc)for(const r of t.doc)"dir"===r.stmt&&(n=r.value);return n},"getDir");function U(t,e,n){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const r=n.get(t);r&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...r.styles])}));const r=t.find(t=>t.id===e.id);r?Object.assign(r,e):t.push(e)}function j(t){return t?.classes?.join(" ")??""}function Y(t){return t?.styles??[]}(0,l.K2)(U,"insertOrUpdateNode"),(0,l.K2)(j,"getClassesFromDbInfo"),(0,l.K2)(Y,"getStylesFromDbInfo");var G=(0,l.K2)((t,e,n,r,i,a,s,c)=>{const h=e.id,u=n.get(h),d=j(u),p=Y(u),E=(0,o.D7)();if(l.Rm.info("dataFetcher parsedItem",e,u,p),"root"!==h){let n=b;!0===e.start?n="stateStart":!1===e.start&&(n="stateEnd"),e.type!==f&&(n=e.type),B.get(h)||B.set(h,{id:h,shape:n,description:o.Y2.sanitizeText(h,E),cssClasses:`${d} ${A}`,cssStyles:p});const u=B.get(h);e.description&&(Array.isArray(u.description)?(u.shape=w,u.description.push(e.description)):u.description?.length&&u.description.length>0?(u.shape=w,u.description===h?u.description=[e.description]:u.description=[u.description,e.description]):(u.shape=b,u.description=e.description),u.description=o.Y2.sanitizeTextOrArray(u.description,E)),1===u.description?.length&&u.shape===w&&("group"===u.type?u.shape=k:u.shape=b),!u.type&&e.doc&&(l.Rm.info("Setting cluster for XCX",h,q(e)),u.type="group",u.isGroup=!0,u.dir=q(e),u.shape=e.type===g?T:k,u.cssClasses=`${u.cssClasses} ${R} ${a?L:""}`);const _={labelStyle:"",shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:h,dir:u.dir,domId:z(h,F),type:u.type,isGroup:"group"===u.type,padding:8,rx:10,ry:10,look:s,labelType:"markdown"};if(_.shape===T&&(_.label=""),t&&"root"!==t.id&&(l.Rm.trace("Setting node ",h," to be child of its parent ",t.id),_.parentId=t.id),_.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:S,cssStyles:[],cssCompiledStyles:[],id:h+M+"-"+F,domId:z(h,F,I),type:u.type,isGroup:"group"===u.type,padding:E.flowchart?.padding,look:s,position:e.note.position},n=h+O,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:u.cssClasses,cssStyles:[],id:h+O,domId:z(h,F,D),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};F++,a.id=n,t.parentId=n,U(r,a,c),U(r,t,c),U(r,_,c);let o=h,l=t.id;"left of"===e.note.position&&(o=t.id,l=h),i.push({id:o+"-"+l,start:o,end:l,arrowhead:"none",arrowTypeEnd:"",style:m,labelStyle:"",classes:C,arrowheadStyle:y,labelpos:"c",labelType:v,thickness:x,look:s})}else U(r,_,c)}e.doc&&(l.Rm.trace("Adding nodes children "),K(e,e.doc,n,r,i,!a,s,c))},"dataFetcher"),W=(0,l.K2)(()=>{B.clear(),F=0},"reset"),V="[*]",H="start",X="[*]",Z="end",Q="color",J="fill",tt="bgFill",et=",",nt=(0,l.K2)(()=>new Map,"newClassesList"),rt=(0,l.K2)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),it=(0,l.K2)(t=>JSON.parse(JSON.stringify(t)),"clone"),at=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=nt(),this.documents={root:rt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=o.iN,this.setAccTitle=o.SV,this.getAccDescription=o.m7,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,l.K2)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const r of Array.isArray(t)?t:t.doc)switch(r.stmt){case u:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case p:this.addRelation(r.state1,r.state2,r.description);break;case"classDef":this.addStyleClass(r.id.trim(),r.classes);break;case"style":this.handleStyleDef(r);break;case"applyClass":this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip)}const e=this.getStates(),n=(0,o.D7)();W(),G(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,n.look,this.classes);for(const r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),n=t.styleClass.split(",");for(const r of e){let t=this.getState(r);if(!t){const e=r.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=n.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){l.Rm.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,n){if(e.stmt===p)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===u&&(e.id===V?(e.id=t.id+(n?"_start":"_end"),e.start=n):e.id=e.id.trim()),e.stmt!==d&&e.stmt!==u||!e.doc)return;const r=[];let i=[];for(const a of e.doc)if(a.type===g){const t=it(a);t.doc=it(i),r.push(t),i=[]}else i.push(a);if(r.length>0&&i.length>0){const t={stmt:u,id:(0,s.$C)(),type:"divider",doc:it(i)};r.push(it(t)),e.doc=r}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:d,stmt:d},{id:d,stmt:d,doc:this.rootDoc},!0),{id:d,doc:this.rootDoc}}addState(t,e=f,n=void 0,r=void 0,i=void 0,a=void 0,s=void 0,c=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=n),t.type||(t.type=e)}else l.Rm.info("Adding state ",h,r),this.currentDocument.states.set(h,{stmt:u,id:h,descriptions:[],type:e,doc:n,note:i,classes:[],styles:[],textStyles:[]});if(r){l.Rm.info("Setting state description",h,r);(Array.isArray(r)?r:[r]).forEach(t=>this.addDescription(h,t.trim()))}if(i){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=i,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}if(a){l.Rm.info("Setting state classes",h,a);(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))}if(s){l.Rm.info("Setting state styles",h,s);(Array.isArray(s)?s:[s]).forEach(t=>this.setStyle(h,t.trim()))}if(c){l.Rm.info("Setting state styles",h,s);(Array.isArray(c)?c:[c]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.documents={root:rt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=nt(),t||(this.links=new Map,(0,o.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){l.Rm.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,n){this.links.set(t,{url:e,tooltip:n}),l.Rm.warn("Adding link",t,e,n)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===V?(this.startEndCount++,`${H}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=f){return t===V?H:e}endIdIfNeeded(t=""){return t===X?(this.startEndCount++,`${Z}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=f){return t===X?Z:e}addRelationObjs(t,e,n=""){const r=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(r,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:o.Y2.sanitizeText(n,(0,o.D7)())})}addRelation(t,e,n){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,n);else if("string"==typeof t&&"string"==typeof e){const r=this.startIdIfNeeded(t.trim()),i=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),s=this.endTypeIfNeeded(e);this.addState(r,i),this.addState(a,s),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?o.Y2.sanitizeText(n,(0,o.D7)()):void 0})}}addDescription(t,e){const n=this.currentDocument.states.get(t),r=e.startsWith(":")?e.replace(":","").trim():e;n?.descriptions?.push(o.Y2.sanitizeText(r,(0,o.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const n=this.classes.get(t);e&&n&&e.split(et).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Q).exec(t)){const t=e.replace(J,tt).replace(Q,J);n.textStyles.push(t)}n.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let n=this.getState(t);if(!n){const e=t.trim();this.addState(e),n=this.getState(e)}n?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,o.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:P(this.getRootDocV2())}}getConfig(){return(0,o.D7)().state}},st=(0,l.K2)(t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,"getStyles")},5948(t,e,n){"use strict";n.d(e,{IU:()=>x,Jo:()=>D,T_:()=>k,g0:()=>$,jP:()=>w});var r=n(4769),i=n(1174),a=n(7879),s=n(1960),o=n(6779),l=n(796),c=n(4098),h=n(797),u=n(1444),d=n(2274),p=(0,h.K2)((t,e,n,r,i,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,n,r,i,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,n,r,i,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,h.K2)((t,e,n,r,i,a,s)=>{const o=f[n];if(!o)return void h.Rm.warn(`Unknown arrow type: ${n}`);const l=`${i}_${a}-${o.type}${"start"===e?"Start":"End"}`;if(s&&""!==s.trim()){const n=`${l}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(n)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=n;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${r}#${n})`)}else t.attr(`marker-${e}`,`url(${r}#${l})`)},"addEdgeMarker"),m=(0,h.K2)(t=>"string"==typeof t?t:(0,c.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),y=new Map,v=new Map,x=(0,h.K2)(()=>{y.clear(),v.clear()},"clear"),b=(0,h.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),w=(0,h.K2)(async(t,e)=>{const n=(0,c.D7)();let a=(0,c.E)(n);const{labelStyles:l}=(0,s.GX)(e);e.labelStyle=l;const d=t.insert("g").attr("class","edgeLabel"),p=d.insert("g").attr("class","label").attr("data-id",e.id),f="markdown"===e.labelType,g=await(0,o.GZ)(t,e.label,{style:b(e.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:f,width:void 0},n);p.node().appendChild(g),h.Rm.info("abc82",e,e.labelType);let m,x=g.getBBox(),w=x;if(a){const t=g.children[0],e=(0,u.Ltv)(g);x=t.getBoundingClientRect(),w=x,e.attr("width",x.width),e.attr("height",x.height)}else{const t=(0,u.Ltv)(g).select("text").node();t&&"function"==typeof t.getBBox&&(w=t.getBBox())}if(p.attr("transform",(0,r.Wg)(w,a)),y.set(e.id,d),e.width=x.width,e.height=x.height,e.startLabelLeft){const n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner"),o=await(0,i.DA)(s,e.startLabelLeft,b(e.labelStyle)||"",!1,!1);m=o;let l=o.getBBox();if(a){const t=o.children[0],e=(0,u.Ltv)(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,r.Wg)(l,a)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startLeft=n,T(m,e.startLabelLeft)}if(e.startLabelRight){const n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner"),o=await(0,i.DA)(s,e.startLabelRight,b(e.labelStyle)||"",!1,!1);m=o,s.node().appendChild(o);let l=o.getBBox();if(a){const t=o.children[0],e=(0,u.Ltv)(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,r.Wg)(l,a)),v.get(e.id)||v.set(e.id,{}),v.get(e.id).startRight=n,T(m,e.startLabelRight)}if(e.endLabelLeft){const n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner"),o=await(0,i.DA)(s,e.endLabelLeft,b(e.labelStyle)||"",!1,!1);m=o;let l=o.getBBox();if(a){const t=o.children[0],e=(0,u.Ltv)(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,r.Wg)(l,a)),n.node().appendChild(o),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endLeft=n,T(m,e.endLabelLeft)}if(e.endLabelRight){const n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner"),o=await(0,i.DA)(s,e.endLabelRight,b(e.labelStyle)||"",!1,!1);m=o;let l=o.getBBox();if(a){const t=o.children[0],e=(0,u.Ltv)(o);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,r.Wg)(l,a)),n.node().appendChild(o),v.get(e.id)||v.set(e.id,{}),v.get(e.id).endRight=n,T(m,e.endLabelRight)}return g},"insertEdgeLabel");function T(t,e){(0,c.E)((0,c.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.K2)(T,"setTerminalWidth");var k=(0,h.K2)((t,e)=>{h.Rm.debug("Moving label abc88 ",t.id,t.label,y.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=(0,c.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(r);if(t.label){const r=y.get(t.id);let a=t.x,s=t.y;if(n){const r=l._K.calcLabelPosition(n);h.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(a=r.x,s=r.y)}r.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=v.get(t.id).startLeft;let r=t.x,i=t.y;if(n){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=v.get(t.id).startRight;let r=t.x,i=t.y;if(n){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=v.get(t.id).endLeft;let r=t.x,i=t.y;if(n){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=v.get(t.id).endRight;let r=t.x,i=t.y;if(n){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),E=(0,h.K2)((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),A=(0,h.K2)((t,e,n)=>{h.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2;let o=n.x<e.x?s-a:s+a;const l=t.height/2,c=Math.abs(e.y-n.y),u=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*l){let t=n.y<e.y?e.y-l-i:i-l-e.y;o=u*t/c;const r={x:n.x<e.x?n.x+o:n.x-u+o,y:n.y<e.y?n.y+c-t:n.y-c+t};return 0===o&&(r.x=e.x,r.y=e.y),0===u&&(r.x=e.x),0===c&&(r.y=e.y),h.Rm.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${u}, r ${o}`,r),r}{o=n.x<e.x?e.x-s-r:r-s-e.x;let t=c*o/u,i=n.x<e.x?n.x+u-o:n.x-u+o,a=n.y<e.y?n.y+t:n.y-t;return h.Rm.debug(`sides calc abc89, Q ${c}, q ${t}, R ${u}, r ${o}`,{_x:i,_y:a}),0===o&&(i=e.x,a=e.y),0===u&&(i=e.x),0===c&&(a=e.y),{x:i,y:a}}},"intersection"),_=(0,h.K2)((t,e)=>{h.Rm.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach(t=>{if(h.Rm.info("abc88 checking point",t,e),E(e,t)||i)h.Rm.warn("abc88 outside",t,r),r=t,i||n.push(t);else{const a=A(e,r,t);h.Rm.debug("abc88 inside",t,r,a),h.Rm.debug("abc88 intersection",a,e);let s=!1;n.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),n.some(t=>t.x===a.x&&t.y===a.y)?h.Rm.warn("abc88 no intersect",a,n):n.push(a),i=!0}}),h.Rm.debug("returning points",n),n},"cutPathAtIntersect");function C(t){const e=[],n=[];for(let r=1;r<t.length-1;r++){const i=t[r-1],a=t[r],s=t[r+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),n.push(r))}return{cornerPoints:e,cornerPointPositions:n}}(0,h.K2)(C,"extractCornerPoints");var S=(0,h.K2)(function(t,e,n){const r=e.x-t.x,i=e.y-t.y,a=n/Math.sqrt(r*r+i*i);return{x:e.x-a*r,y:e.y-a*i}},"findAdjacentPoint"),R=(0,h.K2)(function(t){const{cornerPointPositions:e}=C(t),n=[];for(let r=0;r<t.length;r++)if(e.includes(r)){const e=t[r-1],i=t[r+1],a=t[r],s=S(e,a,5),o=S(i,a,5),l=o.x-s.x,c=o.y-s.y;n.push(s);const u=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(i.x-e.x)>10&&Math.abs(i.y-e.y)>=10){h.Rm.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;d=a.x===s.x?{x:l<0?s.x-t+u:s.x+t-u,y:c<0?s.y-u:s.y+u}:{x:l<0?s.x-u:s.x+u,y:c<0?s.y-t+u:s.y+t-u}}else h.Rm.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));n.push(d,o)}else n.push(t[r]);return n},"fixCorners"),L=(0,h.K2)((t,e,n)=>{const r=t-e-n,i=Math.floor(r/4);return`0 ${e} ${Array(i).fill("2 2").join(" ")} ${n}`},"generateDashArray"),D=(0,h.K2)(function(t,e,n,i,a,o,f,g=!1){const{handDrawnSeed:y}=(0,c.D7)();let v=e.points,x=!1;const b=a;var w=o;const T=[];for(const r in e.cssCompiledStyles)(0,s.KX)(r)||T.push(e.cssCompiledStyles[r]);h.Rm.debug("UIO intersect check",e.points,w.x,b.x),w.intersect&&b.intersect&&!g&&(v=v.slice(1,e.points.length-1),v.unshift(b.intersect(v[0])),h.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,v[v.length-1],w,w.intersect(v[v.length-1])),v.push(w.intersect(v[v.length-1])));const k=btoa(JSON.stringify(v));e.toCluster&&(h.Rm.info("to cluster abc88",n.get(e.toCluster)),v=_(e.points,n.get(e.toCluster).node),x=!0),e.fromCluster&&(h.Rm.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(v,null,2)),v=_(v.reverse(),n.get(e.fromCluster).node).reverse(),x=!0);let E=v.filter(t=>!Number.isNaN(t.y));const A=m(e.curve);"rounded"!==A&&(E=R(E));let C=u.lUB;switch(A){case"linear":case"rounded":C=u.lUB;break;case"basis":default:C=u.qrM;break;case"cardinal":C=u.y8u;break;case"bumpX":C=u.Wi0;break;case"bumpY":C=u.PGM;break;case"catmullRom":C=u.oDi;break;case"monotoneX":C=u.nVG;break;case"monotoneY":C=u.uxU;break;case"natural":C=u.Xf2;break;case"step":C=u.GZz;break;case"stepAfter":C=u.UPb;break;case"stepBefore":C=u.dyv}const{x:S,y:D}=(0,r.RI)(e),N=(0,u.n8j)().x(S).y(D).curve(C);let O,P;switch(e.thickness){case"normal":default:O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible"}switch(e.pattern){case"solid":default:O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed"}let $="rounded"===A?I(M(E,e),5):N(E);const B=Array.isArray(e.style)?e.style:[e.style];let F=B.find(t=>t?.startsWith("stroke:")),z="";e.animate&&(z="edge-animation-fast"),e.animation&&(z="edge-animation-"+e.animation);let K=!1;if("handDrawn"===e.look){const n=d.A.svg(t);Object.assign([],E);const r=n.path($,{roughness:.3,seed:y});O+=" transition",P=(0,u.Ltv)(r).select("path").attr("id",e.id).attr("class"," "+O+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",B?B.reduce((t,e)=>t+";"+e,""):"");let i=P.attr("d");P.attr("d",i),t.node().appendChild(P.node())}else{const n=T.join(";"),i=B?B.reduce((t,e)=>t+e+";",""):"",a=(n?n+";"+i+";":i)+";"+(B?B.reduce((t,e)=>t+";"+e,""):"");P=t.append("path").attr("d",$).attr("id",e.id).attr("class"," "+O+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",a),F=a.match(/stroke:([^;]+)/)?.[1],K=!0===e.animate||!!e.animation||n.includes("animation");const s=P.node(),o="function"==typeof s.getTotalLength?s.getTotalLength():0,l=r.Nq[e.arrowTypeStart]||0,c=r.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!K){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?L(o,l,c):`0 ${l} ${o-l-c} ${c}`}; stroke-dashoffset: 0;`;P.attr("style",t+P.attr("style"))}}P.attr("data-edge",!0),P.attr("data-et","edge"),P.attr("data-id",e.id),P.attr("data-points",k),e.showPoints&&E.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let q="";((0,c.D7)().flowchart.arrowMarkerAbsolute||(0,c.D7)().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.Rm.info("arrowTypeStart",e.arrowTypeStart),h.Rm.info("arrowTypeEnd",e.arrowTypeEnd),p(P,e,q,f,i,F);const U=v[Math.floor(v.length/2)];l._K.isLabelCoordinateInPath(U,P.attr("d"))||(x=!0);let j={};return x&&(j.updatedPath=v),j.originalPath=e.points,j},"insertEdge");function I(t,e){if(t.length<2)return"";let n="";const r=t.length,i=1e-5;for(let a=0;a<r;a++){const s=t[a],o=t[a-1],l=t[a+1];if(0===a)n+=`M${s.x},${s.y}`;else if(a===r-1)n+=`L${s.x},${s.y}`;else{const t=s.x-o.x,r=s.y-o.y,a=l.x-s.x,c=l.y-s.y,h=Math.hypot(t,r),u=Math.hypot(a,c);if(h<i||u<i){n+=`L${s.x},${s.y}`;continue}const d=t/h,p=r/h,f=a/u,g=c/u,m=d*f+p*g,y=Math.max(-1,Math.min(1,m)),v=Math.acos(y);if(v<i||Math.abs(Math.PI-v)<i){n+=`L${s.x},${s.y}`;continue}const x=Math.min(e/Math.sin(v/2),h/2,u/2),b=s.x-d*x,w=s.y-p*x,T=s.x+f*x,k=s.y+g*x;n+=`L${b},${w}`,n+=`Q${s.x},${s.y} ${T},${k}`}}return n}function N(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const n=e.x-t.x,r=e.y-t.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}function M(t,e){const n=t.map(t=>({...t}));if(t.length>=2&&r.hq[e.arrowTypeStart]){const i=r.hq[e.arrowTypeStart],a=t[0],s=t[1],{angle:o}=N(a,s),l=i*Math.cos(o),c=i*Math.sin(o);n[0].x=a.x+l,n[0].y=a.y+c}const i=t.length;if(i>=2&&r.hq[e.arrowTypeEnd]){const a=r.hq[e.arrowTypeEnd],s=t[i-1],o=t[i-2],{angle:l}=N(o,s),c=a*Math.cos(l),h=a*Math.sin(l);n[i-1].x=s.x-c,n[i-1].y=s.y-h}return n}(0,h.K2)(I,"generateRoundedPath"),(0,h.K2)(N,"calculateDeltaAndAngle"),(0,h.K2)(M,"applyMarkerOffsetsToPoints");var O=(0,h.K2)((t,e,n,r)=>{e.forEach(e=>{P[e](t,n,r)})},"insertMarkers"),P={extension:(0,h.K2)((t,e,n)=>{h.Rm.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,h.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,h.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,h.K2)((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,h.K2)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,h.K2)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,h.K2)((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,h.K2)((t,e,n)=>{const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");r.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),r.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),r.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},$=O},1960(t,e,n){"use strict";n.d(e,{Fr:()=>h,GX:()=>c,KX:()=>l,WW:()=>s,ue:()=>a});var r=n(4098),i=n(797),a=(0,i.K2)(t=>{const{handDrawnSeed:e}=(0,r.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,i.K2)(t=>{const e=o([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),o=(0,i.K2)(t=>{const e=new Map;return t.forEach(t=>{const[n,r]=t.split(":");e.set(n.trim(),r?.trim())}),e},"styles2Map"),l=(0,i.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,i.K2)(t=>{const{stylesArray:e}=s(t),n=[],r=[],i=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?n.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:n.join(";"),nodeStyles:r.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),h=(0,i.K2)((t,e)=>{const{themeVariables:n,handDrawnSeed:i}=(0,r.D7)(),{nodeBorder:a,mainBkg:o}=n,{stylesMap:l}=s(t);return Object.assign({roughness:.7,fill:l.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:i,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,i.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},6779(t,e,n){"use strict";n.d(e,{W6:()=>ae,GZ:()=>ce,WY:()=>jt,pC:()=>Kt,Gc:()=>Bt});var r=n(796),i=n(4098),a=n(797);const s=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),o=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...o,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}(t,e);for(const r in h)r in l?r in t&&!(r in n)&&(n[r]=l[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function d(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let a={};function s(t){a=u(r[t]||i[t],a)}return s(e),n.forEach(s),u(t,a)}function p(t,e){if(t.icons[e])return d(t,e,[]);const n=function(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(n).concat(Object.keys(r))).forEach(function t(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;const n=r[e]&&r[e].parent,a=n&&t(n);a&&(i[e]=[n].concat(a))}return i[e]}),i}(t,[e])[e];return n?d(t,e,n):null}const f=Object.freeze({width:null,height:null}),g=Object.freeze({...f,...l}),m=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(m);if(null===r||!r.length)return t;const i=[];let a=r.shift(),s=y.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*n)/n)}else i.push(a);if(a=r.shift(),void 0===a)return i.join("");s=!s}}const x=/\sid="(\S+)"/g,b=new Map;function w(t){const e=[];let n;for(;n=x.exec(t);)e.push(n[1]);if(!e.length)return t;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const n=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+n+r+"$3")}),t=t.replace(new RegExp(r,"g"),"")}var T=n(1444);function k(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var E={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function A(t){E=t}var _={exec:()=>null};function C(t,e=""){let n="string"==typeof t?t:t.source,r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(R.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var S=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D=/(?:[*+-]|\d{1,9}[.)])/,I=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,N=C(I).replace(/bull/g,D).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),M=C(I).replace(/bull/g,D).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),O=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,P=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$=C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",P).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B=C(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,K=C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q=C(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),U={blockquote:C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",q).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:$,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:K,lheading:N,list:B,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:q,table:_,text:/^[^\n]+/},j=C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),Y={...U,lheading:M,table:j,paragraph:C(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},G={...U,html:C("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:C(O).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",N).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},W=/^( {2,}|\\)\n(?!\s*$)/,V=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,Z=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=C(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",S?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=C(tt,"u").replace(/punct/g,V).getRegex(),nt=C(tt,"u").replace(/punct/g,Q).getRegex(),rt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",it=C(rt,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,H).replace(/punct/g,V).getRegex(),at=C(rt,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),st=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,H).replace(/punct/g,V).getRegex(),ot=C(/\\(punct)/,"gu").replace(/punct/g,V).getRegex(),lt=C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=C(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),ht=C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dt=C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=C(/^!?\[(label)\]\[(ref)\]/).replace("label",ut).replace("ref",P).getRegex(),ft=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",P).getRegex(),gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mt={_backpedal:_,anyPunctuation:ot,autolink:lt,blockSkip:J,br:W,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:_,emStrongLDelim:et,emStrongRDelimAst:it,emStrongRDelimUnd:st,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:dt,nolink:ft,punctuation:Z,reflink:pt,reflinkSearch:C("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",ft).getRegex(),tag:ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:_},yt={...mt,link:C(/^!?\[(label)\]\((.*?)\)/).replace("label",ut).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut).getRegex()},vt={...mt,emStrongRDelimAst:at,emStrongLDelim:nt,url:C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gt).getRegex()},xt={...vt,br:C(W).replace("{2,}","*").getRegex(),text:C(vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bt={normal:U,gfm:Y,pedantic:G},wt={normal:mt,gfm:vt,breaks:xt,pedantic:yt},Tt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kt=t=>Tt[t];function Et(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,kt)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,kt);return t}function At(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function _t(t,e){let n=t.replace(R.findPipe,(t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(R.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(R.slashPipe,"|");return n}function Ct(t,e,n){let r=t.length;if(0===r)return"";let i=0;for(;i<r;){let a=t.charAt(r-i-1);if(a!==e||n){if(a===e||!n)break;i++}else i++}return t.slice(0,r-i)}function St(t,e,n,r,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}var Rt=class{options;rules;lexer;constructor(t){this.options=t||E}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ct(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=function(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(null===r)return e;let i=r[1];return e.split("\n").map(t=>{let e=t.match(n.other.beginningSpace);if(null===e)return t;let[r]=e;return r.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=Ct(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ct(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=Ct(e[0],"\n").split("\n"),n="",r="",i=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))s.push(t[e]),a=!0;else{if(a)break;s.push(t[e])}t=t.slice(e);let o=s.join("\n"),l=o.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${o}`:o,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;let h=i.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),s=this.blockquote(a);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),s=this.list(a);i[i.length-1]=s,n=n.substring(0,n.length-h.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=a.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),s=!1;for(;t;){let n=!1,r="",o="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,o=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,o=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){let e=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||a.test(c)||s.test(c)||e.test(c)||n.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!c.trim())o+="\n"+d.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;o+="\n"+c}!h&&!c.trim()&&(h=!0),r+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(o),p&&(d="[ ] "!==p[0],o=o.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!p,checked:d,loose:!1,text:o,tokens:[]}),i.raw+=r}let o=i.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){let e=i.items[t].tokens.filter(t=>"space"===t.type),n=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=_t(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let t of r)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<n.length;t++)a.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:a.align[t]});for(let t of i)a.rows.push(_t(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=Ct(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),St(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return St(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,i,a=[...r[0]].length-1,s=a,o=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(r=l.exec(e));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(i=[...n].length,r[3]||r[4]){s+=i;continue}if((r[5]||r[6])&&a%3&&!((a+i)%3)){o+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+o);let e=[...r[0]][0].length,l=t.slice(0,a+r.index+e+i);if(Math.min(a,i)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Lt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||E,this.options.tokenizer=this.options.tokenizer||new Rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:R,block:bt.normal,inline:wt.normal};this.options.pedantic?(e.block=bt.pedantic,e.inline=wt.pedantic):this.options.gfm&&(e.block=bt.gfm,this.options.breaks?e.inline=wt.breaks:e.inline=wt.gfm),this.tokenizer.rules=e}static get rules(){return{block:bt,inline:wt}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(R.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(R.tabCharGlobal," ").replace(R.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},e.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e,n=1/0,r=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=e.at(-1);n&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let n=e.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,r=t,i=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)n=i[2]?i[2].length:0,r=r.slice(0,i.index+n)+"["+"a".repeat(i[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,s="";for(;t;){let n;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);let r=e.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,r,s)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startInline){let e,n=1/0,r=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},r),"number"==typeof e&&e>=0&&(n=Math.min(n,e))}),n<1/0&&n>=0&&(i=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0;let r=e.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Dt=class{options;parser;constructor(t){this.options=t||E}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(R.notSpaceStart)?.[0],i=t.replace(R.endingNewline,"")+"\n";return r?'<pre><code class="language-'+Et(r)+'">'+(n?i:Et(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:Et(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,n=t.start,r="";for(let a=0;a<t.items.length;a++){let e=t.items[a];r+=this.listitem(e)}let i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+Et(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let r="";for(let i=0;i<t.rows.length;i++){let e=t.rows[i];n="";for(let t=0;t<e.length;t++)n+=this.tablecell(e[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Et(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),i=At(t);if(null===i)return r;let a='<a href="'+(t=i)+'"';return e&&(a+=' title="'+Et(e)+'"'),a+=">"+r+"</a>",a}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=At(t);if(null===i)return Et(n);let a=`<img src="${t=i}" alt="${n}"`;return e&&(a+=` title="${Et(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Et(t.text)}},It=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Nt=class t{options;renderer;textRenderer;constructor(t){this.options=t||E,this.options.renderer=this.options.renderer||new Dt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new It}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){n+=e||"";continue}}let a=i;switch(a.type){case"space":n+=this.renderer.space(a);continue;case"hr":n+=this.renderer.hr(a);continue;case"heading":n+=this.renderer.heading(a);continue;case"code":n+=this.renderer.code(a);continue;case"table":n+=this.renderer.table(a);continue;case"blockquote":n+=this.renderer.blockquote(a);continue;case"list":n+=this.renderer.list(a);continue;case"html":n+=this.renderer.html(a);continue;case"def":n+=this.renderer.def(a);continue;case"paragraph":n+=this.renderer.paragraph(a);continue;case"text":{let i=a,s=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],s+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}let a=i;switch(a.type){case"escape":case"text":n+=e.text(a);break;case"html":n+=e.html(a);break;case"link":n+=e.link(a);break;case"image":n+=e.image(a);break;case"strong":n+=e.strong(a);break;case"em":n+=e.em(a);break;case"codespan":n+=e.codespan(a);break;case"br":n+=e.br(a);break;case"del":n+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},Mt=class{options;block;constructor(t){this.options=t||E}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Lt.lex:Lt.lexInline}provideParser(){return this.block?Nt.parse:Nt.parseInline}},Ot=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Nt;Renderer=Dt;TextRenderer=It;Lexer=Lt;Tokenizer=Rt;Hooks=Mt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let t=r;for(let r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(let r of t.rows)for(let t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{let t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(r=>{let i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),n.extensions=e),t.renderer){let e=this.defaults.renderer||new Dt(this.defaults);for(let n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,i=t.renderer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Rt(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,i=t.tokenizer[r],a=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Mt;for(let n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,i=t.hooks[r],a=e[r];Mt.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async&&Mt.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(e,t);return a.call(e,n)})();let r=i.call(e,t);return a.call(e,r)}:e[r]=(...t)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(e,t);return!1===n&&(n=await a.apply(e,t)),n})();let n=i.apply(e,t);return!1===n&&(n=a.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Lt.lex(t,e??this.defaults)}parser(t,e){return Nt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(e):e,r=await(i.hooks?await i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let s=await(i.hooks?await i.hooks.provideParser():t?Nt.parse:Nt.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(s):s})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let n=(i.hooks?i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(e,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():t?Nt.parse:Nt.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(s){return a(s)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+Et(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}};function Pt(t,e){return Ot.parse(t,e)}Pt.options=Pt.setOptions=function(t){return Ot.setOptions(t),Pt.defaults=Ot.defaults,A(Pt.defaults),Pt},Pt.getDefaults=k,Pt.defaults=E,Pt.use=function(...t){return Ot.use(...t),Pt.defaults=Ot.defaults,A(Pt.defaults),Pt},Pt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Pt.parseInline=Ot.parseInline,Pt.Parser=Nt,Pt.parser=Nt.parse,Pt.Renderer=Dt,Pt.TextRenderer=It,Pt.Lexer=Lt,Pt.lexer=Lt.lex,Pt.Tokenizer=Rt,Pt.Hooks=Mt,Pt.parse=Pt;Pt.options,Pt.setOptions,Pt.use,Pt.walkTokens,Pt.parseInline,Nt.parse,Lt.lex;var $t=n(513),Bt={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Ft=new Map,zt=new Map,Kt=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)zt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ft.set(e.name,e.icons)}}},"registerIconPacks"),qt=(0,a.K2)(async(t,e)=>{const n=((t,e,n,r="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:t};return e&&!s(a)?null:a}const a=i[0],o=a.split("-");if(o.length>1){const t={provider:r,prefix:o.shift(),name:o.join("-")};return e&&!s(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:a};return e&&!s(t,n)?null:t}return null})(t,!0,void 0!==e);if(!n)throw new Error(`Invalid icon name: ${t}`);const r=n.prefix||e;if(!r)throw new Error(`Icon name must contain a prefix: ${t}`);let i=Ft.get(r);if(!i){const t=zt.get(r);if(!t)throw new Error(`Icon set not found: ${n.prefix}`);try{i={...await t(),prefix:r},Ft.set(r,i)}catch(l){throw a.Rm.error(l),new Error(`Failed to load icon set: ${n.prefix}`)}}const o=p(i,n.name);if(!o)throw new Error(`Icon not found: ${t}`);return o},"getRegisteredIconData"),Ut=(0,a.K2)(async t=>{try{return await qt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,a.K2)(async(t,e,n)=>{let r;try{r=await qt(t,e?.fallbackPrefix)}catch(l){a.Rm.error(l),r=Bt}const s=function(t,e){const n={...c,...t},r={...g,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach(t=>{const e=[],n=t.hFlip,r=t.vFlip;let s,o=t.rotate;switch(n?r?o+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):r&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),o<0&&(o-=4*Math.floor(o/4)),o%=4,o){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(a=function(t,e,n){const r=function(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),a=t.indexOf("</"+e);if(-1===i||-1===a)break;const s=t.indexOf(">",a);if(-1===s)break;n+=t.slice(i+1,a).trim(),t=t.slice(0,r).trim()+t.slice(s+1)}return{defs:n,content:t}}(t);return i=r.defs,a=e+r.content+n,i?"<defs>"+i+"</defs>"+a:a;var i,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const s=r.width,o=r.height,l=i.width,h=i.height;let u,d;null===s?(d=null===o?"1em":"auto"===o?h:o,u=v(d,l/h)):(u="auto"===s?l:s,d=null===o?v(u,h/l):"auto"===o?h:o);const p={},f=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};f("width",u),f("height",d);const m=[i.left,i.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}(r,e),o=function(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}(w(s.body),{...s.attributes,...n});return(0,i.jZ)(o,(0,i.zj)())},"getIconSVG");function Yt(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,$t.T)(n)}function Gt(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Wt(t,e={}){const n=Yt(t,e),r=Pt.lexer(n),i=[[]];let s=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,n)=>{0!==n&&(s++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&i[s].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{o(e,t.type)}):"html"===t.type&&i[s].push({content:t.text,type:"normal"})}return(0,a.K2)(o,"processNode"),r.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{o(t)}):"html"===t.type?i[s].push({content:t.text,type:"normal"}):i[s].push({content:t.raw,type:"normal"})}),i}function Vt(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Ht(t,{markdownAutoWrap:e}={}){const n=Pt.lexer(t);function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(r,"output"),n.map(r).join("")}function Xt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Zt(t,e){return Qt(t,[],Xt(e.content),e.type)}function Qt(t,e,n,r){if(0===n.length)return[{content:e.join(""),type:r},{content:"",type:r}];const[i,...a]=n,s=[...e,i];return t([{content:s.join(""),type:r}])?Qt(t,s,a,r):(0===e.length&&i&&(e.push(i),n.shift()),[{content:e.join(""),type:r},{content:n.join(""),type:r}])}function Jt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return te(t,e)}function te(t,e,n=[],r=[]){if(0===t.length)return r.length>0&&n.push(r),n.length>0?n:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...r];if(""!==i&&s.push({content:i,type:"normal"}),s.push(a),e(s))return te(t,e,n,s);if(r.length>0)n.push(r),t.unshift(a);else if(a.content){const[r,i]=Zt(e,a);n.push([r]),i.content&&t.unshift(i)}return te(t,e,n)}function ee(t,e){e&&t.attr("style",e)}(0,a.K2)(Yt,"preprocessMarkdown"),(0,a.K2)(Gt,"nonMarkdownToLines"),(0,a.K2)(Wt,"markdownToLines"),(0,a.K2)(Vt,"nonMarkdownToHTML"),(0,a.K2)(Ht,"markdownToHTML"),(0,a.K2)(Xt,"splitTextToChars"),(0,a.K2)(Zt,"splitWordToFitWidth"),(0,a.K2)(Qt,"splitWordToFitWidthRecursion"),(0,a.K2)(Jt,"splitLineToFitWidth"),(0,a.K2)(te,"splitLineToFitWidthRecursion"),(0,a.K2)(ee,"applyStyle");async function ne(t,e,n,r,a=!1,s=(0,i.zj)()){const o=t.append("foreignObject");o.attr("width",`${Math.min(10*n,16384)}px`),o.attr("height",`${Math.min(10*n,16384)}px`);const l=o.append("xhtml:div"),c=(0,i.Wi)(e.label)?await(0,i.dj)(e.label.replace(i.Y2.lineBreakRegex,"\n"),s):(0,i.jZ)(e.label,s),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),ee(u,e.labelStyle),u.attr("class",`${h} ${r}`),ee(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),n!==Number.POSITIVE_INFINITY&&(l.style("max-width",n+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===n&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",n+"px"),d=l.node().getBoundingClientRect()),o.node()}function re(t,e,n,r=!1){const i=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em");return r&&i.attr("text-anchor","middle"),i}function ie(t,e,n){const r=t.append("text"),i=re(r,1,e);oe(i,n);const a=i.node().getComputedTextLength();return r.remove(),a}function ae(t,e,n){const r=t.append("text"),i=re(r,1,e);oe(i,[{content:n,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}function se(t,e,n,r=!1,i=!1){const s=e.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");i&&l.attr("text-anchor","middle");let c=0;for(const h of n){const e=(0,a.K2)(e=>ie(s,1.1,e)<=t,"checkWidth"),n=e(h)?[h]:Jt(h,e);for(const t of n){oe(re(l,c,1.1,i),t),c++}}if(r){const t=l.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),s.node()}return l.node()}function oe(t,e){t.text(""),e.forEach((e,n)=>{const r=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===n?r.text(e.content):r.text(" "+e.content)})}async function le(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,a)=>(n.push((async()=>{const n=`${r}:${a}`;return await Ut(n)?await jt(n,void 0,{class:"label-icon"}):`<i class='${(0,i.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const r=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")}(0,a.K2)(ne,"addHtmlSpan"),(0,a.K2)(re,"createTspan"),(0,a.K2)(ie,"computeWidthOfText"),(0,a.K2)(ae,"computeDimensionOfText"),(0,a.K2)(se,"createFormattedText"),(0,a.K2)(oe,"updateTextContentAndStyles"),(0,a.K2)(le,"replaceIconSubstring");var ce=(0,a.K2)(async(t,e="",{style:n="",isTitle:s=!1,classes:o="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},p)=>{if(a.Rm.debug("XYZ createText",e,n,s,o,l,h,"addSvgBackground: ",d),l){const a=c?Ht(e,p):Vt(e),s=await le((0,r.Sm)(a),p),l=e.replace(/\\\\/g,"\\"),f={isNode:h,label:(0,i.Wi)(e)?l:s,labelStyle:n.replace("fill:","color:")};return await ne(t,f,u,o,d,p)}{const r=e.replace(/<br\s*\/?>/g,"<br/>"),i=se(u,t,c?Wt(r.replace("<br>","<br/>"),p):Gt(r),!!e&&d,!h);if(h){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(i).attr("style",t)}else{const t=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,T.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(i).select("text").attr("style",e)}return s?(0,T.Ltv)(i).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,T.Ltv)(i).selectAll("tspan.text-outer-tspan").classed("row",!0),i}},"createText")},2938(t,e,n){"use strict";n.d(e,{m:()=>i});var r=n(797),i=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},859(t,e,n){"use strict";n.d(e,{Lh:()=>k,NM:()=>b,_$:()=>f,tM:()=>w});var r=n(2501),i=n(5523),a=n(9625),s=n(2627),o=n(9856),l=n(796),c=n(4098),h=n(797),u=n(1444),d=n(3047),p=function(){var t=(0,h.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,18],n=[1,19],r=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],c=[1,32],u=[1,33],d=[1,34],p=[1,45],f=[1,35],g=[1,36],m=[1,37],y=[1,38],v=[1,27],x=[1,28],b=[1,29],w=[1,30],T=[1,31],k=[1,44],E=[1,46],A=[1,43],_=[1,47],C=[1,9],S=[1,8,9],R=[1,58],L=[1,59],D=[1,60],I=[1,61],N=[1,62],M=[1,63],O=[1,64],P=[1,8,9,41],$=[1,76],B=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],F=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],z=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],q=[13,60,68,69,70,71,72,86,100,102,103],U=[1,101],j=[1,118],Y=[1,114],G=[1,110],W=[1,116],V=[1,111],H=[1,112],X=[1,113],Z=[1,115],Q=[1,117],J=[22,48,60,61,82,86,87,88,89,90],tt=[1,8,9,39,41,44],et=[1,8,9,22],nt=[1,147],rt=[1,8,9,61],it=[1,8,9,22,48,60,61,82,86,87,88,89,90],at={trace:(0,h.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,h.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:case 103:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:r.addRelation(a[o]);break;case 20:a[o-1].title=r.cleanupLabel(a[o]),r.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[o-3],a[o-1][0],a[o-1][1]);break;case 35:r.addClassesToNamespace(a[o-4],a[o-1][0],a[o-1][1]);break;case 36:this.$=a[o],r.addNamespace(a[o]);break;case 37:this.$=[[a[o]],[]];break;case 38:this.$=[[a[o-1]],[]];break;case 39:a[o][0].unshift(a[o-2]),this.$=a[o];break;case 40:this.$=[[],[a[o]]];break;case 41:this.$=[[],[a[o-1]]];break;case 42:a[o][1].unshift(a[o-2]),this.$=a[o];break;case 44:r.setCssClass(a[o-2],a[o]);break;case 45:r.addMembers(a[o-3],a[o-1]);break;case 47:r.setCssClass(a[o-5],a[o-3]),r.addMembers(a[o-5],a[o-1]);break;case 48:this.$=a[o],r.addClass(a[o]);break;case 49:this.$=a[o-1],r.addClass(a[o-1]),r.setClassLabel(a[o-1],a[o]);break;case 53:r.addAnnotation(a[o],a[o-2]);break;case 54:case 67:case 100:this.$=[a[o]];break;case 55:a[o].push(a[o-1]),this.$=a[o];break;case 56:case 58:case 59:break;case 57:r.addMember(a[o-1],r.cleanupLabel(a[o]));break;case 60:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 61:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 62:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 63:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 64:this.$=r.addNote(a[o],a[o-1]);break;case 65:this.$=r.addNote(a[o]);break;case 66:this.$=a[o-2],r.defineClass(a[o-1],a[o]);break;case 68:this.$=a[o-2].concat([a[o]]);break;case 69:r.setDirection("TB");break;case 70:r.setDirection("BT");break;case 71:r.setDirection("RL");break;case 72:r.setDirection("LR");break;case 73:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 74:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 75:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 76:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 77:this.$=r.relationType.AGGREGATION;break;case 78:this.$=r.relationType.EXTENSION;break;case 79:this.$=r.relationType.COMPOSITION;break;case 80:this.$=r.relationType.DEPENDENCY;break;case 81:this.$=r.relationType.LOLLIPOP;break;case 82:this.$=r.lineType.LINE;break;case 83:this.$=r.lineType.DOTTED_LINE;break;case 84:case 90:this.$=a[o-2],r.setClickEvent(a[o-1],a[o]);break;case 85:case 91:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-2],r.setLink(a[o-1],a[o]);break;case 87:this.$=a[o-3],r.setLink(a[o-2],a[o-1],a[o]);break;case 88:this.$=a[o-3],r.setLink(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 89:this.$=a[o-4],r.setLink(a[o-3],a[o-2],a[o]),r.setTooltip(a[o-3],a[o-1]);break;case 92:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 93:this.$=a[o-4],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-3],r.setLink(a[o-2],a[o]);break;case 95:this.$=a[o-4],r.setLink(a[o-3],a[o-1],a[o]);break;case 96:this.$=a[o-4],r.setLink(a[o-3],a[o-1]),r.setTooltip(a[o-3],a[o]);break;case 97:this.$=a[o-5],r.setLink(a[o-4],a[o-2],a[o]),r.setTooltip(a[o-4],a[o-1]);break;case 98:this.$=a[o-2],r.setCssStyle(a[o-1],a[o]);break;case 99:r.setCssClass(a[o-1],a[o]);break;case 101:a[o-2].push(a[o]),this.$=a[o-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:n,37:r,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:x,78:b,82:w,83:T,86:k,100:E,102:A,103:_},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(C,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:L,70:D,71:I,72:N,73:M,74:O}),{39:[1,65]},t(P,[2,43],{39:[1,67],44:[1,66]}),t(S,[2,58]),t(S,[2,59]),{16:68,60:p,86:k,100:E,102:A},{16:39,17:40,19:69,60:p,86:k,100:E,102:A,103:_},{16:39,17:40,19:70,60:p,86:k,100:E,102:A,103:_},{16:39,17:40,19:71,60:p,86:k,100:E,102:A,103:_},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:p,86:k,100:E,102:A,103:_},{13:$,55:75},{58:77,60:[1,78]},t(S,[2,69]),t(S,[2,70]),t(S,[2,71]),t(S,[2,72]),t(B,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:p,86:k,100:E,102:A,103:_}),t(B,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:p,86:k,100:E,102:A,103:_},{16:39,17:40,19:86,60:p,86:k,100:E,102:A,103:_},t(F,[2,126]),t(F,[2,127]),t(F,[2,128]),t(F,[2,129]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),t(C,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:e,35:n,37:r,42:i,46:a,49:s,51:o,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:x,78:b,82:w,83:T,86:k,100:E,102:A,103:_}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:n,37:r,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:x,78:b,82:w,83:T,86:k,100:E,102:A,103:_},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,90],16:39,17:40,19:89,60:p,86:k,100:E,102:A,103:_},{53:91,66:56,67:57,68:R,69:L,70:D,71:I,72:N,73:M,74:O},t(S,[2,57]),{67:92,73:M,74:O},t(z,[2,76],{66:93,68:R,69:L,70:D,71:I,72:N}),t(K,[2,77]),t(K,[2,78]),t(K,[2,79]),t(K,[2,80]),t(K,[2,81]),t(q,[2,82]),t(q,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:a,54:c,56:u},{16:98,60:p,86:k,100:E,102:A},{41:[1,100],45:99,51:U},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:j,48:Y,59:107,60:G,82:W,84:108,85:109,86:V,87:H,88:X,89:Z,90:Q},{60:[1,119]},{13:$,55:120},t(P,[2,65]),t(P,[2,131]),{22:j,48:Y,59:121,60:G,61:[1,122],82:W,84:108,85:109,86:V,87:H,88:X,89:Z,90:Q},t(J,[2,67]),{16:39,17:40,19:123,60:p,86:k,100:E,102:A,103:_},t(B,[2,16]),t(B,[2,17]),t(B,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:p,86:k,100:E,102:A,103:_},{39:[2,10]},t(tt,[2,48],{11:126,12:[1,127]}),t(C,[2,7]),{9:[1,128]},t(et,[2,60]),{16:39,17:40,19:129,60:p,86:k,100:E,102:A,103:_},{13:[1,131],16:39,17:40,19:130,60:p,86:k,100:E,102:A,103:_},t(z,[2,75],{66:132,68:R,69:L,70:D,71:I,72:N}),t(z,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:a,54:c,56:u},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},t(P,[2,44],{39:[1,137]}),{41:[1,138]},t(P,[2,46]),{41:[2,54],45:139,51:U},{16:39,17:40,19:140,60:p,86:k,100:E,102:A,103:_},t(S,[2,84],{13:[1,141]}),t(S,[2,86],{13:[1,143],77:[1,142]}),t(S,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},t(S,[2,98],{61:nt}),t(rt,[2,100],{85:148,22:j,48:Y,60:G,82:W,86:V,87:H,88:X,89:Z,90:Q}),t(it,[2,102]),t(it,[2,104]),t(it,[2,105]),t(it,[2,106]),t(it,[2,107]),t(it,[2,108]),t(it,[2,109]),t(it,[2,110]),t(it,[2,111]),t(it,[2,112]),t(S,[2,99]),t(P,[2,64]),t(S,[2,66],{61:nt}),{60:[1,149]},t(B,[2,14]),{15:150,16:84,17:85,60:p,86:k,100:E,102:A,103:_},{39:[2,12]},t(tt,[2,49]),{13:[1,151]},{1:[2,4]},t(et,[2,62]),t(et,[2,61]),{16:39,17:40,19:152,60:p,86:k,100:E,102:A,103:_},t(z,[2,73]),t(S,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:a,54:c,56:u},{24:96,30:97,40:155,41:[2,41],43:23,46:a,54:c,56:u},{45:156,51:U},t(P,[2,45]),{41:[2,55]},t(S,[2,53]),t(S,[2,85]),t(S,[2,87]),t(S,[2,88],{77:[1,157]}),t(S,[2,91]),t(S,[2,92],{13:[1,158]}),t(S,[2,94],{13:[1,160],77:[1,159]}),{22:j,48:Y,60:G,82:W,84:161,85:109,86:V,87:H,88:X,89:Z,90:Q},t(it,[2,103]),t(J,[2,68]),{39:[2,11]},{14:[1,162]},t(et,[2,63]),t(S,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},t(S,[2,89]),t(S,[2,93]),t(S,[2,95]),t(S,[2,96],{77:[1,164]}),t(rt,[2,101],{85:148,22:j,48:Y,60:G,82:W,86:V,87:H,88:X,89:Z,90:Q}),t(tt,[2,8]),t(P,[2,47]),t(S,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:(0,h.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,h.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",l=0,c=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,h.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,c,l,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:(0,h.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K2)(function(){return this._more=!0,this},"more"),reject:(0,h.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,h.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,h.K2)(function(t,e,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function ot(){this.yy={}}return at.lexer=st,(0,h.K2)(ot,"Parser"),ot.prototype=at,at.Parser=ot,new ot}();p.parser=p;var f=p,g=["#","+","~","-",""],m=class{static{(0,h.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const n=(0,c.jZ)(t,(0,c.D7)());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+(0,c.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,c.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,c.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(n){const t=n[1]?n[1].trim():"";if(g.includes(t)&&(this.visibility=t),this.id=n[2],this.parameters=n[3]?n[3].trim():"",e=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const n=t.length,r=t.substring(0,1),i=t.substring(n-1);g.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?n:n-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const n=`${this.visibility?"\\"+this.visibility:""}${(0,c.QO)(this.id)}${"method"===this.memberType?`(${(0,c.QO)(this.parameters)})${this.returnType?" : "+(0,c.QO)(this.returnType):""}`:""}`;this.text=n.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},y="classId-",v=0,x=(0,h.K2)(t=>c.Y2.sanitizeText(t,(0,c.D7)()),"sanitizeText"),b=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,h.K2)(t=>{const e=(0,i.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g").filter(function(){return null!==(0,u.Ltv)(this).attr("title")}).on("mouseover",t=>{const n=(0,u.Ltv)(t.currentTarget),r=n.attr("title");if(!r)return;const i=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(d.A.sanitize(r)).style("left",`${window.scrollX+i.left+i.width/2}px`).style("top",`${window.scrollY+i.bottom+4}px`),n.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=c.SV,this.getAccTitle=c.iN,this.setAccDescription=c.EI,this.getAccDescription=c.m7,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.getConfig=(0,h.K2)(()=>(0,c.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,h.K2)(this,"ClassDB")}splitClassNameAndType(t){const e=c.Y2.sanitizeText(t,(0,c.D7)());let n="",r=e;if(e.indexOf("~")>0){const t=e.split("~");r=x(t[0]),n=x(t[1])}return{className:r,type:n}}setClassLabel(t,e){const n=c.Y2.sanitizeText(t,(0,c.D7)());e&&(e=x(e));const{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=e,this.classes.get(r).text=`${e}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:""}`}addClass(t){const e=c.Y2.sanitizeText(t,(0,c.D7)()),{className:n,type:r}=this.splitClassNameAndType(e);if(this.classes.has(n))return;const i=c.Y2.sanitizeText(n,(0,c.D7)());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`&lt;${r}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:y+i+"-"+v}),v++}addInterface(t,e){const n={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(n)}lookUpDomId(t){const e=c.Y2.sanitizeText(t,(0,c.D7)());if(this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",(0,c.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){h.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=c.Y2.sanitizeText(t.relationTitle1.trim(),(0,c.D7)()),t.relationTitle2=c.Y2.sanitizeText(t.relationTitle2.trim(),(0,c.D7)()),this.relations.push(t)}addAnnotation(t,e){const n=this.splitClassNameAndType(t).className;this.classes.get(n).annotations.push(e)}addMember(t,e){this.addClass(t);const n=this.splitClassNameAndType(t).className,r=this.classes.get(n);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?r.annotations.push(x(t.substring(2,t.length-2))):t.indexOf(")")>0?r.methods.push(new m(t,"method")):t&&r.members.push(new m(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const n=this.notes.size,r={id:`note${n}`,class:e,text:t,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),x(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=y+n);const r=this.classes.get(n);r&&(r.cssClasses+=" "+e)})}defineClass(t,e){for(const n of t){let t=this.styleClasses.get(n);void 0===t&&(t={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const n=e.replace("fill","bgFill");t.textStyles.push(n)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(n)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=x(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,n){const r=(0,c.D7)();t.split(",").forEach(t=>{let i=t;/\d/.exec(t[0])&&(i=y+i);const a=this.classes.get(i);a&&(a.link=l._K.formatUrl(e,r),"sandbox"===r.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof n?x(n):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,n){t.split(",").forEach(t=>{this.setClickFunc(t,e,n),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,n){const r=c.Y2.sanitizeText(t,(0,c.D7)());if("loose"!==(0,c.D7)().securityLevel)return;if(void 0===e)return;const i=r;if(this.classes.has(i)){const t=this.lookUpDomId(i);let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<r.length;t++){let e=r[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),r[t]=e}}0===r.length&&r.push(t),this.functions.push(()=>{const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",()=>{l._K.runFunc(e,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,notes:new Map,children:new Map,domId:y+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,n){if(this.namespaces.has(t)){for(const n of e){const{className:e}=this.splitClassNameAndType(n),r=this.getClass(e);r.parent=t,this.namespaces.get(t).classes.set(e,r)}for(const e of n){const n=this.getNote(e);n.parent=t,this.namespaces.get(t).notes.set(e,n)}}}setCssStyle(t,e){const n=this.classes.get(t);if(e&&n)for(const r of e)r.includes(",")?n.styles.push(...r.split(",")):n.styles.push(r)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){const t=[],e=[],n=(0,c.D7)();for(const i of this.namespaces.values()){const e={id:i.id,label:i.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look};t.push(e)}for(const i of this.classes.values()){const e={...i,type:void 0,isGroup:!1,parentId:i.parent,look:n.look};t.push(e)}for(const i of this.notes.values()){const r={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:i.parent,labelType:"markdown"};t.push(r);const a=this.classes.get(i.class)?.id;if(a){const t={id:`edgeNote${i.index}`,start:i.id,end:a,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};e.push(t)}}for(const i of this.interfaces){const e={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(e)}let r=0;for(const i of this.relations){r++;const t={id:(0,l.rY)(i.id1,i.id2,{prefix:"id",counter:r}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:n.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:n,direction:this.getDirection()}}},w=(0,h.K2)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n ${(0,r.o)()}\n`,"getStyles"),T=(0,h.K2)((t,e="TB")=>{if(!t.doc)return e;let n=e;for(const r of t.doc)"dir"===r.stmt&&(n=r.value);return n},"getDir"),k={getClasses:(0,h.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K2)(async function(t,e,n,r){h.Rm.info("REF0:"),h.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:i,state:u,layout:d}=(0,c.D7)(),p=r.db.getData(),f=(0,a.A)(e,i);p.type=r.type,p.layoutAlgorithm=(0,o.q7)(d),p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,o.XX)(p,f);l._K.insertTitle(f,"classDiagramTitleText",u?.titleTopMargin??25,r.db.getDiagramTitle()),(0,s.P)(f,8,"classDiagram",u?.useMaxWidth??!0)},"draw"),getDir:T}},3283(t,e,n){"use strict";n.d(e,{H:()=>rn,r:()=>nn});var r=n(797);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function s(t){return Array.isArray(t)?t:i(t)?[]:[t]}function o(t,e){var n,r,i,a;if(e)for(n=0,r=(a=Object.keys(e)).length;n<r;n+=1)t[i=a[n]]=e[i];return t}function l(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,r.K2)(i,"isNothing"),(0,r.K2)(a,"isObject"),(0,r.K2)(s,"toArray"),(0,r.K2)(o,"extend"),(0,r.K2)(l,"repeat"),(0,r.K2)(c,"isNegativeZero");var h={isNothing:i,isObject:a,toArray:s,repeat:l,isNegativeZero:c,extend:o};function u(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),r+" "+n):r}function d(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,r.K2)(u,"formatError"),(0,r.K2)(d,"YAMLException$1"),d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.toString=(0,r.K2)(function(t){return this.name+": "+u(this,t)},"toString");var p=d;function f(t,e,n,r,i){var a="",s="",o=Math.floor(i/2)-1;return r-e>o&&(e=r-o+(a=" ... ").length),n-r>o&&(n=r+o-(s=" ...").length),{str:a+t.slice(e,n).replace(/\t/g,"→")+s,pos:r-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(o=1;o<=e.linesBefore&&!(s-o<0);o++)l=f(t.buffer,i[s-o],a[s-o],t.position-(i[s]-i[s-o]),d),c=h.repeat(" ",e.indent)+g((t.line-o+1).toString(),u)+" | "+l.str+"\n"+c;for(l=f(t.buffer,i[s],a[s],t.position,d),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)l=f(t.buffer,i[s+o],a[s+o],t.position-(i[s]-i[s+o]),d),c+=h.repeat(" ",e.indent)+g((t.line+o+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,r.K2)(f,"getLine"),(0,r.K2)(g,"padStart"),(0,r.K2)(m,"makeSnippet");var y=m,v=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"];function b(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function w(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===v.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=b(e.styleAliases||null),-1===x.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,r.K2)(b,"compileStyleAliases"),(0,r.K2)(w,"Type$1");var T=w;function k(t,e){var n=[];return t[e].forEach(function(t){var e=n.length;n.forEach(function(n,r){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=r)}),n[e]=t}),n}function E(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for((0,r.K2)(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return n}function A(t){return this.extend(t)}(0,r.K2)(k,"compileList"),(0,r.K2)(E,"compileMap"),(0,r.K2)(A,"Schema$1"),A.prototype.extend=(0,r.K2)(function(t){var e=[],n=[];if(t instanceof T)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof T))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof T))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(A.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=k(r,"implicit"),r.compiledExplicit=k(r,"explicit"),r.compiledTypeMap=E(r.compiledImplicit,r.compiledExplicit),r},"extend");var _=new A({explicit:[new T("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,r.K2)(function(t){return null!==t?t:""},"construct")}),new T("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,r.K2)(function(t){return null!==t?t:[]},"construct")}),new T("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,r.K2)(function(t){return null!==t?t:{}},"construct")})]});function C(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function S(){return null}function R(t){return null===t}(0,r.K2)(C,"resolveYamlNull"),(0,r.K2)(S,"constructYamlNull"),(0,r.K2)(R,"isNull");var L=new T("tag:yaml.org,2002:null",{kind:"scalar",resolve:C,construct:S,predicate:R,represent:{canonical:(0,r.K2)(function(){return"~"},"canonical"),lowercase:(0,r.K2)(function(){return"null"},"lowercase"),uppercase:(0,r.K2)(function(){return"NULL"},"uppercase"),camelcase:(0,r.K2)(function(){return"Null"},"camelcase"),empty:(0,r.K2)(function(){return""},"empty")},defaultStyle:"lowercase"});function D(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function I(t){return"true"===t||"True"===t||"TRUE"===t}function N(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,r.K2)(D,"resolveYamlBoolean"),(0,r.K2)(I,"constructYamlBoolean"),(0,r.K2)(N,"isBoolean");var M=new T("tag:yaml.org,2002:bool",{kind:"scalar",resolve:D,construct:I,predicate:N,represent:{lowercase:(0,r.K2)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,r.K2)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,r.K2)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function O(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function P(t){return 48<=t&&t<=55}function $(t){return 48<=t&&t<=57}function B(t){if(null===t)return!1;var e,n=t.length,r=0,i=!1;if(!n)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===n)return!0;if("b"===(e=t[++r])){for(r++;r<n;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!O(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!P(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;r<n;r++)if("_"!==(e=t[r])){if(!$(t.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===e)}function F(t){var e,n=t,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(r=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function z(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!h.isNegativeZero(t)}(0,r.K2)(O,"isHexCode"),(0,r.K2)(P,"isOctCode"),(0,r.K2)($,"isDecCode"),(0,r.K2)(B,"resolveYamlInteger"),(0,r.K2)(F,"constructYamlInteger"),(0,r.K2)(z,"isInteger");var K=new T("tag:yaml.org,2002:int",{kind:"scalar",resolve:B,construct:F,predicate:z,represent:{binary:(0,r.K2)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,r.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,r.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,r.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function U(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function j(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)}(0,r.K2)(U,"resolveYamlFloat"),(0,r.K2)(j,"constructYamlFloat");var Y=/^[-+]?[0-9]+e/;function G(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h.isNegativeZero(t))return"-0.0";return n=t.toString(10),Y.test(n)?n.replace("e",".e"):n}function W(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,r.K2)(G,"representYamlFloat"),(0,r.K2)(W,"isFloat");var V=new T("tag:yaml.org,2002:float",{kind:"scalar",resolve:U,construct:j,predicate:W,represent:G,defaultStyle:"lowercase"}),H=_.extend({implicit:[L,M,K,V]}),X=H,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,n,r,i,a,s,o,l,c=0,h=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(n,r,i,a,s,o,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,r.K2)(J,"resolveYamlTimestamp"),(0,r.K2)(tt,"constructYamlTimestamp"),(0,r.K2)(et,"representYamlTimestamp");var nt=new T("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function rt(t){return"<<"===t||null===t}(0,r.K2)(rt,"resolveYamlMerge");var it=new T("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function st(t){if(null===t)return!1;var e,n,r=0,i=t.length,a=at;for(n=0;n<i;n++)if(!((e=a.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8==0}function ot(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,a=at,s=0,o=[];for(e=0;e<i;e++)e%4==0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|a.indexOf(r.charAt(e));return 0===(n=i%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===n?(o.push(s>>10&255),o.push(s>>2&255)):12===n&&o.push(s>>4&255),new Uint8Array(o)}function lt(t){var e,n,r="",i=0,a=t.length,s=at;for(e=0;e<a;e++)e%3==0&&e&&(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+t[e];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,r.K2)(st,"resolveYamlBinary"),(0,r.K2)(ot,"constructYamlBinary"),(0,r.K2)(lt,"representYamlBinary"),(0,r.K2)(ct,"isBinary");var ht=new T("tag:yaml.org,2002:binary",{kind:"scalar",resolve:st,construct:ot,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,n,r,i,a,s=[],o=t;for(e=0,n=o.length;e<n;e+=1){if(r=o[e],a=!1,"[object Object]"!==dt.call(r))return!1;for(i in r)if(ut.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==s.indexOf(i))return!1;s.push(i)}return!0}function ft(t){return null!==t?t:[]}(0,r.K2)(pt,"resolveYamlOmap"),(0,r.K2)(ft,"constructYamlOmap");var gt=new T("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:ft}),mt=Object.prototype.toString;function yt(t){if(null===t)return!0;var e,n,r,i,a,s=t;for(a=new Array(s.length),e=0,n=s.length;e<n;e+=1){if(r=s[e],"[object Object]"!==mt.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[e]=[i[0],r[i[0]]]}return!0}function vt(t){if(null===t)return[];var e,n,r,i,a,s=t;for(a=new Array(s.length),e=0,n=s.length;e<n;e+=1)r=s[e],i=Object.keys(r),a[e]=[i[0],r[i[0]]];return a}(0,r.K2)(yt,"resolveYamlPairs"),(0,r.K2)(vt,"constructYamlPairs");var xt=new T("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yt,construct:vt}),bt=Object.prototype.hasOwnProperty;function wt(t){if(null===t)return!0;var e,n=t;for(e in n)if(bt.call(n,e)&&null!==n[e])return!1;return!0}function Tt(t){return null!==t?t:{}}(0,r.K2)(wt,"resolveYamlSet"),(0,r.K2)(Tt,"constructYamlSet");var kt=new T("tag:yaml.org,2002:set",{kind:"mapping",resolve:wt,construct:Tt}),Et=X.extend({implicit:[nt,it],explicit:[ht,gt,xt,kt]}),At=Object.prototype.hasOwnProperty,_t=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ct=/[\x85\u2028\u2029]/,St=/[,\[\]\{\}]/,Rt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Dt(t){return Object.prototype.toString.call(t)}function It(t){return 10===t||13===t}function Nt(t){return 9===t||32===t}function Mt(t){return 9===t||32===t||10===t||13===t}function Ot(t){return 44===t||91===t||93===t||123===t||125===t}function Pt(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function $t(t){return 120===t?2:117===t?4:85===t?8:0}function Bt(t){return 48<=t&&t<=57?t-48:-1}function Ft(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function zt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Kt(t,e,n){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[e]=n}(0,r.K2)(Dt,"_class"),(0,r.K2)(It,"is_EOL"),(0,r.K2)(Nt,"is_WHITE_SPACE"),(0,r.K2)(Mt,"is_WS_OR_EOL"),(0,r.K2)(Ot,"is_FLOW_INDICATOR"),(0,r.K2)(Pt,"fromHexCode"),(0,r.K2)($t,"escapedHexLen"),(0,r.K2)(Bt,"fromDecimalCode"),(0,r.K2)(Ft,"simpleEscapeSequence"),(0,r.K2)(zt,"charFromCodepoint"),(0,r.K2)(Kt,"setProperty");var qt,Ut=new Array(256),jt=new Array(256);for(qt=0;qt<256;qt++)Ut[qt]=Ft(qt)?1:0,jt[qt]=Ft(qt);function Yt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Et,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Gt(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=y(n),new p(e,n)}function Wt(t,e){throw Gt(t,e)}function Vt(t,e){t.onWarning&&t.onWarning.call(null,Gt(t,e))}(0,r.K2)(Yt,"State$1"),(0,r.K2)(Gt,"generateError"),(0,r.K2)(Wt,"throwError"),(0,r.K2)(Vt,"throwWarning");var Ht={YAML:(0,r.K2)(function(t,e,n){var r,i,a;null!==t.version&&Wt(t,"duplication of %YAML directive"),1!==n.length&&Wt(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Wt(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&Wt(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Vt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,r.K2)(function(t,e,n){var r,i;2!==n.length&&Wt(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],Rt.test(r)||Wt(t,"ill-formed tag handle (first argument) of the TAG directive"),At.call(t.tagMap,r)&&Wt(t,'there is a previously declared suffix for "'+r+'" tag handle'),Lt.test(i)||Wt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(a){Wt(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")};function Xt(t,e,n,r){var i,a,s,o;if(e<n){if(o=t.input.slice(e,n),r)for(i=0,a=o.length;i<a;i+=1)9===(s=o.charCodeAt(i))||32<=s&&s<=1114111||Wt(t,"expected valid JSON character");else _t.test(o)&&Wt(t,"the stream contains non-printable characters");t.result+=o}}function Zt(t,e,n,r){var i,a,s,o;for(h.isObject(n)||Wt(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(i=Object.keys(n)).length;s<o;s+=1)a=i[s],At.call(e,a)||(Kt(e,a,n[a]),r[a]=!0)}function Qt(t,e,n,r,i,a,s,o,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&Wt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===Dt(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===Dt(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Zt(t,e,a[c],n);else Zt(t,e,a,n);else t.json||At.call(n,i)||!At.call(e,i)||(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Wt(t,"duplicated mapping key")),Kt(e,i,a),delete n[i];return e}function Jt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Wt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function te(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;Nt(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!It(i))break;for(Jt(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==n&&0!==r&&t.lineIndent<n&&Vt(t,"deficient indentation"),r}function ee(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!Mt(e)))}function ne(t,e){1===e?t.result+=" ":e>1&&(t.result+=h.repeat("\n",e-1))}function re(t,e,n){var r,i,a,s,o,l,c,h,u=t.kind,d=t.result;if(Mt(h=t.input.charCodeAt(t.position))||Ot(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Mt(r=t.input.charCodeAt(t.position+1))||n&&Ot(r)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,s=!1;0!==h;){if(58===h){if(Mt(r=t.input.charCodeAt(t.position+1))||n&&Ot(r))break}else if(35===h){if(Mt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||n&&Ot(h))break;if(It(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(Xt(t,i,a,!1),ne(t,t.line-o),i=a=t.position,s=!1),Nt(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Xt(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ie(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Xt(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else It(n)?(Xt(t,r,i,!0),ne(t,te(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ee(t)?Wt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Wt(t,"unexpected end of the stream within a single quoted scalar")}function ae(t,e){var n,r,i,a,s,o;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return Xt(t,n,t.position,!0),t.position++,!0;if(92===o){if(Xt(t,n,t.position,!0),It(o=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(o<256&&Ut[o])t.result+=jt[o],t.position++;else if((s=$t(o))>0){for(i=s,a=0;i>0;i--)(s=Pt(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Wt(t,"expected hexadecimal character");t.result+=zt(a),t.position++}else Wt(t,"unknown escape sequence");n=r=t.position}else It(o)?(Xt(t,n,r,!0),ne(t,te(t,!1,e)),n=r=t.position):t.position===t.lineStart&&ee(t)?Wt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Wt(t,"unexpected end of the stream within a double quoted scalar")}function se(t,e){var n,r,i,a,s,o,l,c,h,u,d,p,f=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,c=!1,a=[];else{if(123!==p)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;f?44===p&&Wt(t,"expected the node content, but found ','"):Wt(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===p&&Mt(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,te(t,!0,e)),n=t.line,r=t.lineStart,i=t.position,pe(t,e,1,!1,!0),u=t.tag,h=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==n||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),d=t.result),c?Qt(t,a,y,u,h,d,n,r,i):o?a.push(Qt(t,null,y,u,h,d,n,r,i)):a.push(h),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Wt(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var n,r,i,a,s=1,o=!1,l=!1,c=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))r=!1;else{if(62!==a)return!1;r=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Wt(t,"repeat of a chomping mode identifier");else{if(!((i=Bt(a))>=0))break;0===i?Wt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Wt(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(Nt(a)){do{a=t.input.charCodeAt(++t.position)}while(Nt(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!It(a)&&0!==a)}for(;0!==a;){for(Jt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),It(a))u++;else{if(t.lineIndent<c){3===s?t.result+=h.repeat("\n",o?1+u:u):1===s&&o&&(t.result+="\n");break}for(r?Nt(a)?(d=!0,t.result+=h.repeat("\n",o?1+u:u)):d?(d=!1,t.result+=h.repeat("\n",u+1)):0===u?o&&(t.result+=" "):t.result+=h.repeat("\n",u):t.result+=h.repeat("\n",o?1+u:u),o=!0,l=!0,u=0,n=t.position;!It(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Xt(t,n,t.position,!1)}}return!0}function le(t,e){var n,r,i=t.tag,a=t.anchor,s=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Wt(t,"tab characters must not be used in indentation")),45===r)&&Mt(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,te(t,!0,-1)&&t.lineIndent<=e)s.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,pe(t,e,3,!1,!0),s.push(t.result),te(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)Wt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=s,!0)}function ce(t,e,n){var r,i,a,s,o,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Wt(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!Mt(r)){if(s=t.line,o=t.lineStart,l=t.position,!pe(t,n,2,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);Nt(c);)c=t.input.charCodeAt(++t.position);if(58===c)Mt(c=t.input.charCodeAt(++t.position))||Wt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qt(t,d,p,f,g,null,s,o,l),f=g=m=null),v=!0,y=!1,i=!1,f=t.tag,g=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;Wt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;Wt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Qt(t,d,p,f,g,null,s,o,l),f=g=m=null),v=!0,y=!0,i=!0):y?(y=!1,i=!0):Wt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===a||t.lineIndent>e)&&(y&&(s=t.line,o=t.lineStart,l=t.position),pe(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Qt(t,d,p,f,g,m,s,o,l),f=g=m=null),te(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Wt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Qt(t,d,p,f,g,null,s,o,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function he(t){var e,n,r,i,a=!1,s=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Wt(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(a=!0,i=t.input.charCodeAt(++t.position)):33===i?(s=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):Wt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Mt(i);)33===i&&(s?Wt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Rt.test(n)||Wt(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),St.test(r)&&Wt(t,"tag suffix cannot contain flow indicator characters")}r&&!Lt.test(r)&&Wt(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(o){Wt(t,"tag name is malformed: "+r)}return a?t.tag=r:At.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:Wt(t,'undeclared tag handle "'+n+'"'),!0}function ue(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Wt(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Mt(n)&&!Ot(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Wt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function de(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Mt(r)&&!Ot(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Wt(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),At.call(t.anchorMap,n)||Wt(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],te(t,!0,-1),!0}function pe(t,e,n,r,i){var a,s,o,l,c,h,u,d,p,f=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=4===n||3===n,r&&te(t,!0,-1)&&(g=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;he(t)||ue(t);)te(t,!0,-1)?(g=!0,o=a,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):o=!1;if(o&&(o=g||i),1!==f&&4!==n||(d=1===n||2===n?e:e+1,p=t.position-t.lineStart,1===f?o&&(le(t,p)||ce(t,p,d))||se(t,d)?m=!0:(s&&oe(t,d)||ie(t,d)||ae(t,d)?m=!0:de(t)?(m=!0,null===t.tag&&null===t.anchor||Wt(t,"alias node should not have any properties")):re(t,d,1===n)&&(m=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(m=o&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Wt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(At.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||Wt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Wt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Wt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function fe(t){var e,n,r,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(te(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);for(r=[],(n=t.input.slice(e,t.position)).length<1&&Wt(t,"directive name must not be less than one character in length");0!==i;){for(;Nt(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!It(i));break}if(It(i))break;for(e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&Jt(t),At.call(Ht,n)?Ht[n](t,n,r):Vt(t,'unknown document directive "'+n+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):s&&Wt(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&Ct.test(t.input.slice(a,t.position))&&Vt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position<t.length-1&&Wt(t,"end of the stream or a document separator is expected")}function ge(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new Yt(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,Wt(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)fe(n);return n.documents}function me(t,e,n){null!==e&&"object"==typeof e&&void 0===n&&(n=e,e=null);var r=ge(t,n);if("function"!=typeof e)return r;for(var i=0,a=r.length;i<a;i+=1)e(r[i])}function ye(t,e){var n=ge(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new p("expected a single document in the stream, but found more")}}(0,r.K2)(Xt,"captureSegment"),(0,r.K2)(Zt,"mergeMappings"),(0,r.K2)(Qt,"storeMappingPair"),(0,r.K2)(Jt,"readLineBreak"),(0,r.K2)(te,"skipSeparationSpace"),(0,r.K2)(ee,"testDocumentSeparator"),(0,r.K2)(ne,"writeFoldedLines"),(0,r.K2)(re,"readPlainScalar"),(0,r.K2)(ie,"readSingleQuotedScalar"),(0,r.K2)(ae,"readDoubleQuotedScalar"),(0,r.K2)(se,"readFlowCollection"),(0,r.K2)(oe,"readBlockScalar"),(0,r.K2)(le,"readBlockSequence"),(0,r.K2)(ce,"readBlockMapping"),(0,r.K2)(he,"readTagProperty"),(0,r.K2)(ue,"readAnchorProperty"),(0,r.K2)(de,"readAlias"),(0,r.K2)(pe,"composeNode"),(0,r.K2)(fe,"readDocument"),(0,r.K2)(ge,"loadDocuments"),(0,r.K2)(me,"loadAll$1"),(0,r.K2)(ye,"load$1");var ve={loadAll:me,load:ye},xe=Object.prototype.toString,be=Object.prototype.hasOwnProperty,we=65279,Te={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ee=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ae(t,e){var n,r,i,a,s,o,l;if(null===e)return{};for(n={},i=0,a=(r=Object.keys(e)).length;i<a;i+=1)s=r[i],o=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&be.call(l.styleAliases,o)&&(o=l.styleAliases[o]),n[s]=o;return n}function _e(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else{if(!(t<=4294967295))throw new p("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+h.repeat("0",r-e.length)+e}(0,r.K2)(Ae,"compileStyleMap"),(0,r.K2)(_e,"encodeHex");function Ce(t){this.schema=t.schema||Et,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=h.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ae(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Se(t,e){for(var n,r=h.repeat(" ",e),i=0,a=-1,s="",o=t.length;i<o;)-1===(a=t.indexOf("\n",i))?(n=t.slice(i),i=o):(n=t.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(s+=r),s+=n;return s}function Re(t,e){return"\n"+h.repeat(" ",t.indent*e)}function Le(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}function De(t){return 32===t||9===t}function Ie(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==we||65536<=t&&t<=1114111}function Ne(t){return Ie(t)&&t!==we&&13!==t&&10!==t}function Me(t,e,n){var r=Ne(t),i=r&&!De(t);return(n?r:r&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||Ne(e)&&!De(e)&&35===t||58===e&&i}function Oe(t){return Ie(t)&&t!==we&&!De(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Pe(t){return!De(t)&&58!==t}function $e(t,e){var n,r=t.charCodeAt(e);return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function Be(t){return/^\n* /.test(t)}(0,r.K2)(Ce,"State"),(0,r.K2)(Se,"indentString"),(0,r.K2)(Re,"generateNextLine"),(0,r.K2)(Le,"testImplicitResolving"),(0,r.K2)(De,"isWhitespace"),(0,r.K2)(Ie,"isPrintable"),(0,r.K2)(Ne,"isNsCharOrWhitespace"),(0,r.K2)(Me,"isPlainSafe"),(0,r.K2)(Oe,"isPlainSafeFirst"),(0,r.K2)(Pe,"isPlainSafeLast"),(0,r.K2)($e,"codePointAt"),(0,r.K2)(Be,"needIndentIndicator");function Fe(t,e,n,r,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==r,f=-1,g=Oe($e(t,0))&&Pe($e(t,t.length-1));if(e||s)for(l=0;l<t.length;c>=65536?l+=2:l++){if(!Ie(c=$e(t,l)))return 5;g=g&&Me(c,h,o),h=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(10===(c=$e(t,l)))u=!0,p&&(d=d||l-f-1>r&&" "!==t[f+1],f=l);else if(!Ie(c))return 5;g=g&&Me(c,h,o),h=c}d=d||p&&l-f-1>r&&" "!==t[f+1]}return u||d?n>9&&Be(t)?5:s?2===a?5:2:d?4:3:!g||s||i(t)?2===a?5:2:1}function ze(t,e,n,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==ke.indexOf(e)||Ee.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,n),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=i||t.flowLevel>-1&&n>=t.flowLevel;function c(e){return Le(t,e)}switch((0,r.K2)(c,"testAmbiguity"),Fe(e,l,t.indent,o,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Ke(e,t.indent)+qe(Se(e,s));case 4:return">"+Ke(e,t.indent)+qe(Se(Ue(e,o),s));case 5:return'"'+Ye(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Ke(t,e){var n=Be(t)?String(e):"",r="\n"===t[t.length-1];return n+(r&&("\n"===t[t.length-2]||"\n"===t)?"+":r?"":"-")+"\n"}function qe(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Ue(t,e){for(var n,r,i,a=/(\n+)([^\n]*)/g,s=(n=-1!==(n=t.indexOf("\n"))?n:t.length,a.lastIndex=n,je(t.slice(0,n),e)),o="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];r=" "===c[0],s+=l+(o||r||""===c?"":"\n")+je(c,e),o=r}return s}function je(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,a=0,s=0,o=0,l="";n=i.exec(t);)(o=n.index)-a>e&&(r=s>a?s:o,l+="\n"+t.slice(a,r),a=r+1),s=o;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function Ye(t){for(var e,n="",r=0,i=0;i<t.length;r>=65536?i+=2:i++)r=$e(t,i),!(e=Te[r])&&Ie(r)?(n+=t[i],r>=65536&&(n+=t[i+1])):n+=e||_e(r);return n}function Ge(t,e,n){var r,i,a,s="",o=t.tag;for(r=0,i=n.length;r<i;r+=1)a=n[r],t.replacer&&(a=t.replacer.call(n,String(r),a)),(Ze(t,e,a,!1,!1)||void 0===a&&Ze(t,e,null,!1,!1))&&(""!==s&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=o,t.dump="["+s+"]"}function We(t,e,n,r){var i,a,s,o="",l=t.tag;for(i=0,a=n.length;i<a;i+=1)s=n[i],t.replacer&&(s=t.replacer.call(n,String(i),s)),(Ze(t,e+1,s,!0,!0,!1,!0)||void 0===s&&Ze(t,e+1,null,!0,!0,!1,!0))&&(r&&""===o||(o+=Re(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=l,t.dump=o||"[]"}function Ve(t,e,n){var r,i,a,s,o,l="",c=t.tag,h=Object.keys(n);for(r=0,i=h.length;r<i;r+=1)o="",""!==l&&(o+=", "),t.condenseFlow&&(o+='"'),s=n[a=h[r]],t.replacer&&(s=t.replacer.call(n,a,s)),Ze(t,e,a,!1,!1)&&(t.dump.length>1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,s,!1,!1)&&(l+=o+=t.dump));t.tag=c,t.dump="{"+l+"}"}function He(t,e,n,r){var i,a,s,o,l,c,h="",u=t.tag,d=Object.keys(n);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)c="",r&&""===h||(c+=Re(t,e)),o=n[s=d[i]],t.replacer&&(o=t.replacer.call(n,s,o)),Ze(t,e+1,s,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Re(t,e)),Ze(t,e+1,o,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Xe(t,e,n){var r,i,a,s,o,l;for(a=0,s=(i=n?t.explicitTypes:t.implicitTypes).length;a<s;a+=1)if(((o=i[a]).instanceOf||o.predicate)&&(!o.instanceOf||"object"==typeof e&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(n?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(l=t.styleMap[o.tag]||o.defaultStyle,"[object Function]"===xe.call(o.represent))r=o.represent(e,l);else{if(!be.call(o.represent,l))throw new p("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');r=o.represent[l](e,l)}t.dump=r}return!0}return!1}function Ze(t,e,n,r,i,a,s){t.tag=null,t.dump=n,Xe(t,n,!1)||Xe(t,n,!0);var o,l=xe.call(t.dump),c=r;r&&(r=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)r&&0!==Object.keys(t.dump).length?(He(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ve(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)r&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?We(t,e-1,t.dump,i):We(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ze(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(o=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),o="!"===t.tag[0]?"!"+o:"tag:yaml.org,2002:"===o.slice(0,18)?"!!"+o.slice(18):"!<"+o+">",t.dump=o+" "+t.dump)}return!0}function Qe(t,e){var n,r,i=[],a=[];for(Je(t,i,a),n=0,r=a.length;n<r;n+=1)e.duplicates.push(i[a[n]]);e.usedDuplicates=new Array(r)}function Je(t,e,n){var r,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)Je(t[i],e,n);else for(i=0,a=(r=Object.keys(t)).length;i<a;i+=1)Je(t[r[i]],e,n)}function tn(t,e){var n=new Ce(e=e||{});n.noRefs||Qe(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Ze(n,0,r,!0,!0)?n.dump+"\n":""}(0,r.K2)(Fe,"chooseScalarStyle"),(0,r.K2)(ze,"writeScalar"),(0,r.K2)(Ke,"blockHeader"),(0,r.K2)(qe,"dropEndingNewline"),(0,r.K2)(Ue,"foldString"),(0,r.K2)(je,"foldLine"),(0,r.K2)(Ye,"escapeString"),(0,r.K2)(Ge,"writeFlowSequence"),(0,r.K2)(We,"writeBlockSequence"),(0,r.K2)(Ve,"writeFlowMapping"),(0,r.K2)(He,"writeBlockMapping"),(0,r.K2)(Xe,"detectType"),(0,r.K2)(Ze,"writeNode"),(0,r.K2)(Qe,"getDuplicateReferences"),(0,r.K2)(Je,"inspectNode"),(0,r.K2)(tn,"dump$1");function en(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,r.K2)(en,"renamed");var nn=H,rn=ve.load;en("safeLoad","load"),en("safeLoadAll","loadAll"),en("safeDump","dump")},7879(t,e,n){"use strict";n.d(e,{O:()=>s,X:()=>o});var r=n(796),i=n(4098),a=n(797),s=(0,a.K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,n=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:e+n}},"getSubGraphTitleMargins");async function o(t,e){const n=t.getElementsByTagName("img");if(!n||0===n.length)return;const s=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...n].map(t=>new Promise(e=>{function n(){if(t.style.display="flex",t.style.flexDirection="column",s){const e=(0,i.D7)().fontSize?(0,i.D7)().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[a=i.UI.fontSize]=(0,r.I5)(e),s=a*n+"px";t.style.minWidth=s,t.style.maxWidth=s}else t.style.width="100%";e(t)}(0,a.K2)(n,"setupImage"),setTimeout(()=>{t.complete&&n()}),t.addEventListener("error",n),t.addEventListener("load",n)})))}(0,a.K2)(o,"configureLabelImages")},4377(t,e,n){"use strict";n.d(e,{diagram:()=>a});var r=n(859),i=(n(2501),n(5523),n(9625),n(2627),n(9856),n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796),n(4098),n(797)),a={parser:r._$,get db(){return new r.NM},renderer:r.Lh,styles:r.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},9169(t,e,n){"use strict";n.d(e,{diagram:()=>a});var r=n(859),i=(n(2501),n(5523),n(9625),n(2627),n(9856),n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796),n(4098),n(797)),a={parser:r._$,get db(){return new r.NM},renderer:r.Lh,styles:r.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},7928(t,e,n){"use strict";n.r(e),n.d(e,{render:()=>f});var r=n(797),i=n(165),a=n(3457),s=n(1444);function o(t,e){t.forEach(t=>{const n={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(n[e]=t[e])}),e.add({group:"nodes",data:n,position:{x:t.x??0,y:t.y??0}})})}function l(t,e){t.forEach(t=>{const n={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(n[e]=t[e])}),e.add({group:"edges",data:n})})}function c(t){return new Promise(e=>{const n=(0,s.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,i.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),o(t.nodes,a),l(t.edges,a),a.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});a.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),a.ready(t=>{r.Rm.info("Cytoscape ready",t),e(a)})})}function h(t){return t.nodes().map(t=>{const e=t.data(),n=t.position(),r={id:e.id,x:n.x,y:n.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function u(t){return t.edges().map(t=>{const e=t.data(),n=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function d(t,e){r.Rm.debug("Starting cose-bilkent layout algorithm");try{p(t);const e=await c(t),n=h(e),i=u(e);return r.Rm.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(n){throw r.Rm.error("Error in cose-bilkent layout algorithm:",n),n}}function p(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}i.A.use(a),(0,r.K2)(o,"addNodes"),(0,r.K2)(l,"addEdges"),(0,r.K2)(c,"createCytoscapeInstance"),(0,r.K2)(h,"extractPositionedNodes"),(0,r.K2)(u,"extractPositionedEdges"),(0,r.K2)(d,"executeCoseBilkentLayout"),(0,r.K2)(p,"validateLayoutData");var f=(0,r.K2)(async(t,e,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:s,log:o,positionEdgeLabel:l},{algorithm:c})=>{const h={},u={},p=e.select("g");a(p,t.markers,t.type,t.diagramId);const f=p.insert("g").attr("class","subgraphs"),g=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),y=p.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,h[e.id]=t,await n(f,e)}else{const n={...e};h[e.id]=n;const r=await s(y,e,{config:t.config,dir:t.direction||"TB"}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,o.debug(`Node ${e.id} dimensions: ${i.width}x${i.height}`)}})),o.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=h[t.id];return{...t,width:e.width,height:e.height}})},x=await d(v,t.config);o.debug("Positioning nodes based on layout results"),x.nodes.forEach(t=>{const e=h[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,o.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),x.edges.forEach(e=>{const n=t.edges.find(t=>t.id===e.id);n&&(n.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),o.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await i(m,e);const n=h[e.start??""],a=h[e.end??""];if(n&&a){const i=x.edges.find(t=>t.id===e.id);if(i){o.debug("APA01 positionedEdge",i);const s={...e},c=r(g,s,u,t.type,n,a,t.diagramId);l(s,c)}else{const i={...e,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]},s=r(g,i,u,t.type,n,a,t.diagramId);l(i,s)}}})),o.debug("Cose-bilkent rendering completed")},"render")},5215(t,e,n){"use strict";n.r(e),n.d(e,{render:()=>I});var r=n(5948),i=(n(4769),n(1174)),a=n(7879),s=(n(1960),n(6779),n(796),n(4098)),o=n(797),l=n(567),c=n(9592),h=n(53),u=n(4722);n(1471);function d(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:p(t),edges:f(t)};return c.A(t.graph())||(e.value=h.A(t.graph())),e}function p(t){return u.A(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return c.A(n)||(i.value=n),c.A(r)||(i.parent=r),i})}function f(t){return u.A(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return c.A(e.name)||(r.name=e.name),c.A(n)||(r.value=n),r})}var g=n(697),m=new Map,y=new Map,v=new Map,x=(0,o.K2)(()=>{y.clear(),v.clear(),m.clear()},"clear"),b=(0,o.K2)((t,e)=>{const n=y.get(e)||[];return o.Rm.trace("In isDescendant",e," ",t," = ",n.includes(t)),n.includes(t)},"isDescendant"),w=(0,o.K2)((t,e)=>{const n=y.get(e)||[];return o.Rm.info("Descendants of ",e," is ",n),o.Rm.info("Edge is ",t),t.v!==e&&t.w!==e&&(n?n.includes(t.v)||b(t.v,e)||b(t.w,e)||n.includes(t.w):(o.Rm.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),T=(0,o.K2)((t,e,n,r)=>{o.Rm.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const i=e.children(t)||[];t!==r&&i.push(t),o.Rm.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(i=>{if(e.children(i).length>0)T(i,e,n,r);else{const a=e.node(i);o.Rm.info("cp ",i," to ",r," with parent ",t),n.setNode(i,a),r!==e.parent(i)&&(o.Rm.warn("Setting parent",i,e.parent(i)),n.setParent(i,e.parent(i))),t!==r&&i!==t?(o.Rm.debug("Setting parent",i,t),n.setParent(i,t)):(o.Rm.info("In copy ",t,"root",r,"data",e.node(t),r),o.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==r,"node!==clusterId",i!==t));const s=e.edges(i);o.Rm.debug("Copying Edges",s),s.forEach(i=>{o.Rm.info("Edge",i);const a=e.edge(i.v,i.w,i.name);o.Rm.info("Edge data",a,r);try{w(i,r)?(o.Rm.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),o.Rm.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):o.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",t)}catch(s){o.Rm.error(s)}})}o.Rm.debug("Removing node",i),e.removeNode(i)})},"copy"),k=(0,o.K2)((t,e)=>{const n=e.children(t);let r=[...n];for(const i of n)v.set(i,t),r=[...r,...k(i,e)];return r},"extractDescendants"),E=(0,o.K2)((t,e,n)=>{const r=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===n||t.w===n),a=r.map(t=>({v:t.v===e?n:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),A=(0,o.K2)((t,e,n)=>{const r=e.children(t);if(o.Rm.trace("Searching children of id ",t,r),r.length<1)return t;let i;for(const a of r){const t=A(a,e,n),r=E(e,n,t);if(t){if(!(r.length>0))return t;i=t}}return i},"findNonClusterChild"),_=(0,o.K2)(t=>m.has(t)&&m.get(t).externalConnections&&m.has(t)?m.get(t).id:t,"getAnchorId"),C=(0,o.K2)((t,e)=>{if(!t||e>10)o.Rm.debug("Opting out, no graph ");else{o.Rm.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(o.Rm.warn("Cluster identified",e," Replacement id in edges: ",A(e,t,e)),y.set(e,k(e,t)),m.set(e,{id:A(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const n=t.children(e),r=t.edges();n.length>0?(o.Rm.debug("Cluster identified",e,y),r.forEach(t=>{b(t.v,e)^b(t.w,e)&&(o.Rm.warn("Edge: ",t," leaves cluster ",e),o.Rm.warn("Descendants of XXX ",e,": ",y.get(e)),m.get(e).externalConnections=!0)})):o.Rm.debug("Not a cluster ",e,y)});for(let e of m.keys()){const n=m.get(e).id,r=t.parent(n);r!==e&&m.has(r)&&!m.get(r).externalConnections&&(m.get(e).id=r)}t.edges().forEach(function(e){const n=t.edge(e);o.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let r=e.v,i=e.w;if(o.Rm.warn("Fix XXX",m,"ids:",e.v,e.w,"Translating: ",m.get(e.v)," --- ",m.get(e.w)),m.get(e.v)||m.get(e.w)){if(o.Rm.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),r=_(e.v),i=_(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v){const i=t.parent(r);m.get(i).externalConnections=!0,n.fromCluster=e.v}if(i!==e.w){const r=t.parent(i);m.get(r).externalConnections=!0,n.toCluster=e.w}o.Rm.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name)}}),o.Rm.warn("Adjusted Graph",d(t)),S(t,0),o.Rm.trace(m)}},"adjustClustersAndEdges"),S=(0,o.K2)((t,e)=>{if(o.Rm.warn("extractor - ",e,d(t),t.children("D")),e>10)return void o.Rm.error("Bailing out");let n=t.nodes(),r=!1;for(const i of n){const e=t.children(i);r=r||e.length>0}if(r){o.Rm.debug("Nodes = ",n,e);for(const r of n)if(o.Rm.debug("Extracting node",r,m,m.has(r)&&!m.get(r).externalConnections,!t.parent(r),t.node(r),t.children("D")," Depth ",e),m.has(r))if(!m.get(r).externalConnections&&t.children(r)&&t.children(r).length>0){o.Rm.warn("Cluster without external connections, without a parent and with children",r,e);let n="TB"===t.graph().rankdir?"LR":"TB";m.get(r)?.clusterData?.dir&&(n=m.get(r).clusterData.dir,o.Rm.warn("Fixing dir",m.get(r).clusterData.dir,n));const i=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});o.Rm.warn("Old graph before copy",d(t)),T(r,t,i,r),t.setNode(r,{clusterNode:!0,id:r,clusterData:m.get(r).clusterData,label:m.get(r).label,graph:i}),o.Rm.warn("New graph after copy node: (",r,")",d(i)),o.Rm.debug("Old graph after copy",d(t))}else o.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!m.get(r).externalConnections," no parent: ",!t.parent(r)," children ",t.children(r)&&t.children(r).length>0,t.children("D"),e),o.Rm.debug(m);else o.Rm.debug("Not a cluster",r,e);n=t.nodes(),o.Rm.warn("New list of nodes",n);for(const r of n){const n=t.node(r);o.Rm.warn(" Now next level",r,n),n?.clusterNode&&S(n.graph,e+1)}}else o.Rm.debug("Done, no node has children",t.nodes())},"extractor"),R=(0,o.K2)((t,e)=>{if(0===e.length)return[];let n=Object.assign([],e);return e.forEach(e=>{const r=t.children(e),i=R(t,r);n=[...n,...i]}),n},"sorter"),L=(0,o.K2)(t=>R(t,t.children()),"sortNodesByHierarchy"),D=(0,o.K2)(async(t,e,n,s,c,h)=>{o.Rm.warn("Graph in recursive render:XAX",d(e),c);const u=e.graph().rankdir;o.Rm.trace("Dir in recursive render - dir:",u);const p=t.insert("g").attr("class","root");e.nodes()?o.Rm.info("Recursive render XXX",e.nodes()):o.Rm.info("No nodes found for",e),e.edges().length>0&&o.Rm.info("Recursive edges",e.edge(e.edges()[0]));const f=p.insert("g").attr("class","clusters"),g=p.insert("g").attr("class","edgePaths"),y=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(t){const r=e.node(t);if(void 0!==c){const n=JSON.parse(JSON.stringify(c.clusterData));o.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",t,"\n data=",n.height,"\nParent cluster",c.height),e.setNode(c.id,n),e.parent(t)||(o.Rm.trace("Setting parent",t,c.id),e.setParent(t,c.id,n))}if(o.Rm.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),r?.clusterNode){o.Rm.info("Cluster identified XBX",t,r.width,e.node(t));const{ranksep:a,nodesep:l}=e.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:l});const c=await D(v,r.graph,n,s,e.node(t),h),u=c.elem;(0,i.lC)(r,u),r.diff=c.diff||0,o.Rm.info("New compound node after recursive render XAX",t,"width",r.width,"height",r.height),(0,i.U7)(u,r)}else e.children(t).length>0?(o.Rm.trace("Cluster - the non recursive path XBX",t,r.id,r,r.width,"Graph:",e),o.Rm.trace(A(r.id,e)),m.set(r.id,{id:A(r.id,e),node:r})):(o.Rm.trace("Node - the non recursive path XAX",t,v,e.node(t),u),await(0,i.on)(v,e.node(t),{config:h,dir:u}))}));const x=(0,o.K2)(async()=>{const t=e.edges().map(async function(t){const n=e.edge(t.v,t.w,t.name);o.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.Rm.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),o.Rm.info("Fix",m,"ids:",t.v,t.w,"Translating: ",m.get(t.v),m.get(t.w)),await(0,r.jP)(y,n)});await Promise.all(t)},"processEdges");await x(),o.Rm.info("Graph before layout:",JSON.stringify(d(e))),o.Rm.info("############################################# XXX"),o.Rm.info("### Layout ### XXX"),o.Rm.info("############################################# XXX"),(0,l.Zp)(e),o.Rm.info("Graph after layout:",JSON.stringify(d(e)));let b=0,{subGraphTitleTotalMargin:w}=(0,a.O)(h);return await Promise.all(L(e).map(async function(t){const n=e.node(t);if(o.Rm.info("Position XBX => "+t+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode)n.y+=w,o.Rm.info("A tainted cluster node XBX1",t,n.id,n.width,n.height,n.x,n.y,e.parent(t)),m.get(n.id).node=n,(0,i.U_)(n);else if(e.children(t).length>0){o.Rm.info("A pure cluster node XBX1",t,n.id,n.x,n.y,n.width,n.height,e.parent(t)),n.height+=w,e.node(n.parentId);const r=n?.padding/2||0,a=n?.labelBBox?.height||0,s=a-r||0;o.Rm.debug("OffsetY",s,"labelHeight",a,"halfPadding",r),await(0,i.U)(f,n),m.get(n.id).node=n}else{const t=e.node(n.parentId);n.y+=w/2,o.Rm.info("A regular node XBX1 - using the padding",n.id,"parent",n.parentId,n.width,n.height,n.x,n.y,"offsetY",n.offsetY,"parent",t,t?.offsetY,n),(0,i.U_)(n)}})),e.edges().forEach(function(t){const i=e.edge(t);o.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i),i.points.forEach(t=>t.y+=w/2);const a=e.node(t.v);var l=e.node(t.w);const c=(0,r.Jo)(g,i,m,n,a,l,s);(0,r.T_)(i,c)}),e.nodes().forEach(function(t){const n=e.node(t);o.Rm.info(t,n.type,n.diff),n.isGroup&&(b=n.diff)}),o.Rm.warn("Returning from recursive render XAX",p,b),{elem:p,diff:b}},"recursiveRender"),I=(0,o.K2)(async(t,e)=>{const n=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=e.select("g");(0,r.g0)(a,t.markers,t.type,t.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),x(),t.nodes.forEach(t=>{n.setNode(t.id,{...t}),t.parentId&&n.setParent(t.id,t.parentId)}),o.Rm.debug("Edges:",t.edges),t.edges.forEach(t=>{if(t.start===t.end){const e=t.start,r=e+"---"+e+"---1",i=e+"---"+e+"---2",a=n.node(e);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(i,a.parentId);const s=structuredClone(t),o=structuredClone(t),l=structuredClone(t);s.label="",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-1",o.arrowTypeStart="none",o.arrowTypeEnd="none",o.id=e+"-cyclic-special-mid",l.label="",a.isGroup&&(s.fromCluster=e,l.toCluster=e),l.id=e+"-cyclic-special-2",l.arrowTypeStart="none",n.setEdge(e,r,s,e+"-cyclic-special-0"),n.setEdge(r,i,o,e+"-cyclic-special-1"),n.setEdge(i,e,l,e+"-cyc<lic-special-2")}else n.setEdge(t.start,t.end,{...t},t.id)}),o.Rm.warn("Graph at first:",JSON.stringify(d(n))),C(n),o.Rm.warn("Graph after XAX:",JSON.stringify(d(n)));const l=(0,s.D7)();await D(a,n,t.type,t.diagramId,void 0,l)},"render")},8811(t,e,n){"use strict";n.d(e,{diagram:()=>w});var r=n(1475),i=n(2627),a=n(1960),s=n(5871),o=n(796),l=n(4098),c=n(797),h=n(8731),u=n(1444),d=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getAccDescription=l.m7,this.setAccDescription=l.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const t=l.UI,e=(0,l.zj)();return(0,o.$t)({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),0===e&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){const n=this.classes.get(t)??{id:t,styles:[],textStyles:[]},r=e.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(t=>{(0,a.KX)(t)&&(n?.textStyles?n.textStyles.push(t):n.textStyles=[t]),n?.styles?n.styles.push(t):n.styles=[t]}),this.classes.set(t,n)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){(0,l.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function p(t){if(!t.length)return[];const e=[],n=[];return t.forEach(t=>{const r={name:t.name,children:"Leaf"===t.type?void 0:[]};for(r.classSelector=t?.classSelector,t?.cssCompiledStyles&&(r.cssCompiledStyles=t.cssCompiledStyles),"Leaf"===t.type&&void 0!==t.value&&(r.value=t.value);n.length>0&&n[n.length-1].level>=t.level;)n.pop();if(0===n.length)e.push(r);else{const t=n[n.length-1].node;t.children?t.children.push(r):t.children=[r]}"Leaf"!==t.type&&n.push({node:r,level:t.level})}),e}(0,c.K2)(p,"buildHierarchy");var f=(0,c.K2)((t,e)=>{(0,s.S)(t,e);const n=[];for(const a of t.TreemapRows??[])"ClassDefStatement"===a.$type&&e.addClass(a.className??"",a.styleText??"");for(const a of t.TreemapRows??[]){const t=a.item;if(!t)continue;const r=a.indent?parseInt(a.indent):0,i=g(t),s=t.classSelector?e.getStylesForClass(t.classSelector):[],o=s.length>0?s:void 0,l={level:r,name:i,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:o};n.push(l)}const r=p(n),i=(0,c.K2)((t,n)=>{for(const r of t)e.addNode(r,n),r.children&&r.children.length>0&&i(r.children,n+1)},"addNodesRecursively");i(r,0)},"populate"),g=(0,c.K2)(t=>t.name?String(t.name):"","getItemName"),m={parser:{yy:void 0},parse:(0,c.K2)(async t=>{try{const e=h.qg,n=await e("treemap",t);c.Rm.debug("Treemap AST:",n);const r=m.parser?.yy;if(!(r instanceof d))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(n,r)}catch(e){throw c.Rm.error("Error parsing treemap:",e),e}},"parse")},y=10,v={draw:(0,c.K2)((t,e,n,s)=>{const o=s.db,h=o.getConfig(),d=h.padding??10,p=o.getDiagramTitle(),f=o.getRoot(),{themeVariables:g}=(0,l.zj)();if(!f)return;const m=p?30:0,v=(0,r.D)(e),x=h.nodeWidth?h.nodeWidth*y:960,b=h.nodeHeight?h.nodeHeight*y:500,w=x,T=b+m;let k;v.attr("viewBox",`0 0 ${w} ${T}`),(0,l.a$)(v,T,w,h.useMaxWidth);try{const t=h.valueFormat||",";if("$0,0"===t)k=(0,c.K2)(t=>"$"+(0,u.GPZ)(",")(t),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const e=/\.\d+/.exec(t),n=e?e[0]:"";k=(0,c.K2)(t=>"$"+(0,u.GPZ)(","+n)(t),"valueFormat")}else if(t.startsWith("$")){const e=t.substring(1);k=(0,c.K2)(t=>"$"+(0,u.GPZ)(e||"")(t),"valueFormat")}else k=(0,u.GPZ)(t)}catch(O){c.Rm.error("Error creating format function:",O),k=(0,u.GPZ)(",")}const E=(0,u.UMr)().range(["transparent",g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),A=(0,u.UMr)().range(["transparent",g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),_=(0,u.UMr)().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);p&&v.append("text").attr("x",w/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(p);const C=v.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),S=(0,u.Sk5)(f).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),R=(0,u.hkb)().size([x,b]).paddingTop(t=>t.children&&t.children.length>0?35:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?y:0).paddingRight(t=>t.children&&t.children.length>0?y:0).paddingBottom(t=>t.children&&t.children.length>0?y:0).round(!0)(S),L=R.descendants().filter(t=>t.children&&t.children.length>0),D=C.selectAll(".treemapSection").data(L).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);D.append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>0===t.depth?"display: none;":""),D.append("clipPath").attr("id",(t,n)=>`clip-section-${e}-${n}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),D.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>`treemapSection section${e}`).attr("fill",t=>E(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>A(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(0===t.depth)return"display: none;";const e=(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles});return e.nodeStyles+";"+e.borderStyles.join(";")}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>0===t.depth?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(0===t.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+_(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(t){if(0===t.depth)return;const e=(0,u.Ltv)(this),n=t.data.name;e.text(n);const r=t.x1-t.x0;let i;if(!1!==h.showValues&&t.value){i=r-10-30-10-6}else{i=r-6-6}const a=Math.max(15,i),s=e.node();if(s.getComputedTextLength()>a){const t="...";let r=n;for(;r.length>0;){if(r=n.substring(0,r.length-1),0===r.length){e.text(t),s.getComputedTextLength()>a&&e.text("");break}if(e.text(r+t),s.getComputedTextLength()<=a)break}}}),!1!==h.showValues&&D.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?k(t.value):"").attr("font-style","italic").attr("style",t=>{if(0===t.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+_(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const I=R.leaves(),N=C.selectAll(".treemapLeafGroup").data(I).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);N.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?E(t.parent.data.name):E(t.data.name)).attr("style",t=>(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?E(t.parent.data.name):E(t.data.name)).attr("stroke-width",3),N.append("clipPath").attr("id",(t,n)=>`clip-${e}-${n}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4));if(N.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+_(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,n)=>`url(#clip-${e}-${n})`).text(t=>t.data.name).each(function(t){const e=(0,u.Ltv)(this),n=t.x1-t.x0,r=t.y1-t.y0,i=e.node(),a=n-8,s=r-8;if(a<10||s<10)return void e.style("display","none");let o=parseInt(e.style("font-size"),10);for(;i.getComputedTextLength()>a&&o>8;)o--,e.style("font-size",`${o}px`);let l=Math.max(6,Math.min(28,Math.round(.6*o))),c=o+2+l;for(;c>s&&o>8&&(o--,l=Math.max(6,Math.min(28,Math.round(.6*o))),!(l<6&&8===o));)e.style("font-size",`${o}px`),c=o+2+l;e.style("font-size",`${o}px`),(i.getComputedTextLength()>a||o<8||s<o)&&e.style("display","none")}),!1!==h.showValues){N.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+_(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,n)=>`url(#clip-${e}-${n})`).text(t=>t.value?k(t.value):"").each(function(t){const e=(0,u.Ltv)(this),n=this.parentNode;if(!n)return void e.style("display","none");const r=(0,u.Ltv)(n).select(".treemapLabel");if(r.empty()||"none"===r.style("display"))return void e.style("display","none");const i=parseFloat(r.style("font-size")),a=Math.max(6,Math.min(28,Math.round(.6*i)));e.style("font-size",`${a}px`);const s=(t.y1-t.y0)/2+i/2+2;e.attr("y",s);const o=t.x1-t.x0,l=t.y1-t.y0-4,c=o-8;e.node().getComputedTextLength()>c||s+a>l||a<6?e.style("display","none"):e.style("display",null)})}const M=h.diagramPadding??8;(0,i.P)(v,M,"flowchart",h?.useMaxWidth||!1)},"draw"),getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses")},x={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},b=(0,c.K2)(({treemap:t}={})=>{const e=(0,o.$t)(x,t);return`\n .treemapNode.section {\n stroke: ${e.sectionStrokeColor};\n stroke-width: ${e.sectionStrokeWidth};\n fill: ${e.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${e.leafStrokeColor};\n stroke-width: ${e.leafStrokeWidth};\n fill: ${e.leafFillColor};\n }\n .treemapLabel {\n fill: ${e.labelColor};\n font-size: ${e.labelFontSize};\n }\n .treemapValue {\n fill: ${e.valueColor};\n font-size: ${e.valueFontSize};\n }\n .treemapTitle {\n fill: ${e.titleColor};\n font-size: ${e.titleFontSize};\n }\n `},"getStyles"),w={parser:m,get db(){return new d},renderer:v,styles:b}},5447(t,e,n){"use strict";n.d(e,{diagram:()=>M});var r=n(1475),i=n(5871),a=n(796),s=n(4098),o=n(797),l=n(8731),c={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},h={axes:[],curves:[],options:c},u=structuredClone(h),d=s.UI.radar,p=(0,o.K2)(()=>(0,a.$t)({...d,...(0,s.zj)().radar}),"getConfig"),f=(0,o.K2)(()=>u.axes,"getAxes"),g=(0,o.K2)(()=>u.curves,"getCurves"),m=(0,o.K2)(()=>u.options,"getOptions"),y=(0,o.K2)(t=>{u.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),v=(0,o.K2)(t=>{u.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:x(t.entries)}))},"setCurves"),x=(0,o.K2)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=f();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const n=t.find(t=>t.axis?.$refText===e.name);if(void 0===n)throw new Error("Missing entry for axis "+e.label);return n.value})},"computeCurveEntries"),b={getAxes:f,getCurves:g,getOptions:m,setAxes:y,setCurves:v,setOptions:(0,o.K2)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});u.options={showLegend:e.showLegend?.value??c.showLegend,ticks:e.ticks?.value??c.ticks,max:e.max?.value??c.max,min:e.min?.value??c.min,graticule:e.graticule?.value??c.graticule}},"setOptions"),getConfig:p,clear:(0,o.K2)(()=>{(0,s.IU)(),u=structuredClone(h)},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI},w=(0,o.K2)(t=>{(0,i.S)(t,b);const{axes:e,curves:n,options:r}=t;b.setAxes(e),b.setCurves(n),b.setOptions(r)},"populate"),T={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("radar",t);o.Rm.debug(e),w(e)},"parse")},k=(0,o.K2)((t,e,n,i)=>{const a=i.db,s=a.getAxes(),o=a.getCurves(),l=a.getOptions(),c=a.getConfig(),h=a.getDiagramTitle(),u=(0,r.D)(e),d=E(u,c),p=l.max??Math.max(...o.map(t=>Math.max(...t.entries))),f=l.min,g=Math.min(c.width,c.height)/2;A(d,s,g,l.ticks,l.graticule),_(d,s,g,c),C(d,s,o,f,p,l.graticule,c),L(d,o,l.showLegend,c),d.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),E=(0,o.K2)((t,e)=>{const n=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,a=e.marginTop+e.height/2;return(0,s.a$)(t,r,n,e.useMaxWidth??!0),t.attr("viewBox",`0 0 ${n} ${r}`),t.append("g").attr("transform",`translate(${i}, ${a})`)},"drawFrame"),A=(0,o.K2)((t,e,n,r,i)=>{if("circle"===i)for(let a=0;a<r;a++){const e=n*(a+1)/r;t.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===i){const i=e.length;for(let a=0;a<r;a++){const s=n*(a+1)/r,o=e.map((t,e)=>{const n=2*e*Math.PI/i-Math.PI/2;return`${s*Math.cos(n)},${s*Math.sin(n)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),_=(0,o.K2)((t,e,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a].label,o=2*a*Math.PI/i-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",n*r.axisScaleFactor*Math.cos(o)).attr("y2",n*r.axisScaleFactor*Math.sin(o)).attr("class","radarAxisLine"),t.append("text").text(s).attr("x",n*r.axisLabelFactor*Math.cos(o)).attr("y",n*r.axisLabelFactor*Math.sin(o)).attr("class","radarAxisLabel")}},"drawAxes");function C(t,e,n,r,i,a,s){const o=e.length,l=Math.min(s.width,s.height)/2;n.forEach((e,n)=>{if(e.entries.length!==o)return;const c=e.entries.map((t,e)=>{const n=2*Math.PI*e/o-Math.PI/2,a=S(t,r,i,l);return{x:a*Math.cos(n),y:a*Math.sin(n)}});"circle"===a?t.append("path").attr("d",R(c,s.curveTension)).attr("class",`radarCurve-${n}`):"polygon"===a&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${n}`)})}function S(t,e,n,r){return r*(Math.min(Math.max(t,e),n)-e)/(n-e)}function R(t,e){const n=t.length;let r=`M${t[0].x},${t[0].y}`;for(let i=0;i<n;i++){const a=t[(i-1+n)%n],s=t[i],o=t[(i+1)%n],l=t[(i+2)%n],c={x:s.x+(o.x-a.x)*e,y:s.y+(o.y-a.y)*e},h={x:o.x-(l.x-s.x)*e,y:o.y-(l.y-s.y)*e};r+=` C${c.x},${c.y} ${h.x},${h.y} ${o.x},${o.y}`}return`${r} Z`}function L(t,e,n,r){if(!n)return;const i=3*(r.width/2+r.marginRight)/4,a=3*-(r.height/2+r.marginTop)/4;e.forEach((e,n)=>{const r=t.append("g").attr("transform",`translate(${i}, ${a+20*n})`);r.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${n}`),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,o.K2)(C,"drawCurves"),(0,o.K2)(S,"relativeRadius"),(0,o.K2)(R,"closedRoundCurve"),(0,o.K2)(L,"drawLegend");var D={draw:k},I=(0,o.K2)((t,e)=>{let n="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const i=t[`cScale${r}`];n+=`\n\t\t.radarCurve-${r} {\n\t\t\tcolor: ${i};\n\t\t\tfill: ${i};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${i};\n\t\t\tstroke-width: ${e.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${r} {\n\t\t\tfill: ${i};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${i};\n\t\t}\n\t\t`}return n},"genIndexStyles"),N=(0,o.K2)(t=>{const e=(0,s.P$)(),n=(0,s.zj)(),r=(0,a.$t)(e,n.themeVariables);return{themeVariables:r,radarOptions:(0,a.$t)(r.radar,t)}},"buildRadarStyleOptions"),M={parser:T,db:b,renderer:D,styles:(0,o.K2)(({radar:t}={})=>{const{themeVariables:e,radarOptions:n}=N(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${n.axisColor};\n\t\tstroke-width: ${n.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${n.axisLabelFontSize}px;\n\t\tcolor: ${n.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${n.graticuleColor};\n\t\tfill-opacity: ${n.graticuleOpacity};\n\t\tstroke: ${n.graticuleColor};\n\t\tstroke-width: ${n.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${n.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${I(e,n)}\n\t`},"styles")}},7598(t,e,n){"use strict";n.d(e,{diagram:()=>x});var r=n(1475),i=n(5871),a=n(796),s=n(4098),o=n(797),l=n(8731),c=s.UI.packet,h=class{constructor(){this.packet=[],this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getAccDescription=s.m7,this.setAccDescription=s.EI}static{(0,o.K2)(this,"PacketDB")}getConfig(){const t=(0,a.$t)({...c,...(0,s.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,s.IU)(),this.packet=[]}},u=(0,o.K2)((t,e)=>{(0,i.S)(t,e);let n=-1,r=[],a=1;const{bitsPerRow:s}=e.getConfig();for(let{start:i,end:l,bits:c,label:h}of t.blocks){if(void 0!==i&&void 0!==l&&l<i)throw new Error(`Packet block ${i} - ${l} is invalid. End must be greater than start.`);if(i??=n+1,i!==n+1)throw new Error(`Packet block ${i} - ${l??i} is not contiguous. It should start from ${n+1}.`);if(0===c)throw new Error(`Packet block ${i} is invalid. Cannot have a zero bit field.`);for(l??=i+(c??1)-1,c??=l-i+1,n=l,o.Rm.debug(`Packet block ${i} - ${n} with label ${h}`);r.length<=s+1&&e.getPacket().length<1e4;){const[t,n]=d({start:i,end:l,bits:c,label:h},a,s);if(r.push(t),t.end+1===a*s&&(e.pushWord(r),r=[],a++),!n)break;({start:i,end:l,bits:c,label:h}=n)}}e.pushWord(r)},"populate"),d=(0,o.K2)((t,e,n)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*n)return[t,void 0];const r=e*n-1,i=e*n;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),p={parser:{yy:void 0},parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("packet",t),n=p.parser?.yy;if(!(n instanceof h))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");o.Rm.debug(e),u(e,n)},"parse")},f=(0,o.K2)((t,e,n,i)=>{const a=i.db,o=a.getConfig(),{rowHeight:l,paddingY:c,bitWidth:h,bitsPerRow:u}=o,d=a.getPacket(),p=a.getDiagramTitle(),f=l+c,m=f*(d.length+1)-(p?0:l),y=h*u+2,v=(0,r.D)(e);v.attr("viewBox",`0 0 ${y} ${m}`),(0,s.a$)(v,m,y,o.useMaxWidth);for(const[r,s]of d.entries())g(v,s,r,o);v.append("text").text(p).attr("x",y/2).attr("y",m-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),g=(0,o.K2)((t,e,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{const c=t.append("g"),h=n*(r+a)+a;for(const u of e){const t=u.start%o*s+1,e=(u.end-u.start+1)*s-i;if(c.append("rect").attr("x",t).attr("y",h).attr("width",e).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",h+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(u.label),!l)continue;const n=u.end===u.start,a=h-2;c.append("text").attr("x",t+(n?e/2:0)).attr("y",a).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",n?"middle":"start").text(u.start),n||c.append("text").attr("x",t+e).attr("y",a).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(u.end)}},"drawWord"),m={draw:f},y={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},v=(0,o.K2)(({packet:t}={})=>{const e=(0,a.$t)(y,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),x={parser:p,get db(){return new h},renderer:m,styles:v}},5378(t,e,n){"use strict";n.d(e,{diagram:()=>x});var r=n(9625),i=n(2627),a=n(9856),s=(n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796)),o=n(4098),l=n(797),c=n(1444),h=n(5582),u=n(5937),d=function(){var t=(0,l.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],n=[1,10],r=[1,11],i=[1,12],a=[1,13],s=[1,23],o=[1,24],c=[1,25],h=[1,26],u=[1,27],d=[1,19],p=[1,28],f=[1,29],g=[1,20],m=[1,18],y=[1,21],v=[1,22],x=[1,36],b=[1,37],w=[1,38],T=[1,39],k=[1,40],E=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],A=[1,45],_=[1,46],C=[1,55],S=[40,48,50,51,52,70,71],R=[1,66],L=[1,64],D=[1,61],I=[1,65],N=[1,67],M=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],O=[65,66,67,68,69],P=[1,84],$=[1,83],B=[1,81],F=[1,82],z=[6,10,42,47],K=[6,10,13,41,42,47,48,49],q=[1,92],U=[1,91],j=[1,90],Y=[19,58],G=[1,101],W=[1,100],V=[19,58,60,62],H={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:(0,l.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=a[o];break;case 8:r.addEntity(a[o-4]),r.addEntity(a[o-2]),r.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:r.addEntity(a[o-8]),r.addEntity(a[o-4]),r.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),r.setClass([a[o-8]],a[o-6]),r.setClass([a[o-4]],a[o-2]);break;case 10:r.addEntity(a[o-6]),r.addEntity(a[o-2]),r.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),r.setClass([a[o-6]],a[o-4]);break;case 11:r.addEntity(a[o-6]),r.addEntity(a[o-4]),r.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),r.setClass([a[o-4]],a[o-2]);break;case 12:r.addEntity(a[o-3]),r.addAttributes(a[o-3],a[o-1]);break;case 13:r.addEntity(a[o-5]),r.addAttributes(a[o-5],a[o-1]),r.setClass([a[o-5]],a[o-3]);break;case 14:r.addEntity(a[o-2]);break;case 15:r.addEntity(a[o-4]),r.setClass([a[o-4]],a[o-2]);break;case 16:r.addEntity(a[o]);break;case 17:r.addEntity(a[o-2]),r.setClass([a[o-2]],a[o]);break;case 18:r.addEntity(a[o-6],a[o-4]),r.addAttributes(a[o-6],a[o-1]);break;case 19:r.addEntity(a[o-8],a[o-6]),r.addAttributes(a[o-8],a[o-1]),r.setClass([a[o-8]],a[o-3]);break;case 20:r.addEntity(a[o-5],a[o-3]);break;case 21:r.addEntity(a[o-7],a[o-5]),r.setClass([a[o-7]],a[o-2]);break;case 22:r.addEntity(a[o-3],a[o-1]);break;case 23:r.addEntity(a[o-5],a[o-3]),r.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=a[o-3],r.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],r.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],r.addCssStyles(a[o-2],a[o-1]);break;case 44:case 68:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 79:case 80:case 70:this.$=a[o].replace(/"/g,"");break;case 60:a[o].push(a[o-1]),this.$=a[o];break;case 61:this.$={type:a[o-1],name:a[o]};break;case 62:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 63:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 64:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 71:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:r,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:c,36:h,37:u,40:d,43:p,44:f,48:g,50:m,51:y,52:v},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:n,24:r,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:c,36:h,37:u,40:d,43:p,44:f,48:g,50:m,51:y,52:v},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:x,66:b,67:w,68:T,69:k}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(E,[2,54]),t(E,[2,55]),t(E,[2,56]),t(E,[2,57]),t(E,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:A,41:_},{16:47,40:A,41:_},{16:48,40:A,41:_},t(e,[2,4]),{11:49,40:d,48:g,50:m,51:y,52:v},{16:50,40:A,41:_},{18:51,19:[1,52],53:53,54:54,58:C},{11:56,40:d,48:g,50:m,51:y,52:v},{64:57,70:[1,58],71:[1,59]},t(S,[2,72]),t(S,[2,73]),t(S,[2,74]),t(S,[2,75]),t(S,[2,76]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:60,41:L,42:D,45:62,46:63,48:I,49:N},t(M,[2,37]),t(M,[2,38]),{16:68,40:A,41:_,42:D},{13:R,38:69,41:L,42:D,45:62,46:63,48:I,49:N},{13:[1,70],15:[1,71]},t(e,[2,17],{63:35,12:72,17:[1,73],42:D,65:x,66:b,67:w,68:T,69:k}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:C},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:x,66:b,67:w,68:T,69:k},t(O,[2,77]),t(O,[2,78]),{6:P,10:$,39:80,42:B,47:F},{40:[1,85],41:[1,86]},t(z,[2,43],{46:87,13:R,41:L,48:I,49:N}),t(K,[2,45]),t(K,[2,50]),t(K,[2,51]),t(K,[2,52]),t(K,[2,53]),t(e,[2,41],{42:D}),{6:P,10:$,39:88,42:B,47:F},{14:89,40:q,50:U,72:j},{16:93,40:A,41:_},{11:94,40:d,48:g,50:m,51:y,52:v},{18:95,19:[1,96],53:53,54:54,58:C},t(e,[2,12]),{19:[2,60]},t(Y,[2,61],{56:97,57:98,59:99,61:G,62:W}),t([19,58,61,62],[2,66]),t(e,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(e,[2,36]),{13:R,41:L,45:104,46:63,48:I,49:N},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(M,[2,39]),t(M,[2,40]),t(K,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,79]),t(e,[2,80]),t(e,[2,81]),{13:[1,105],42:D},{13:[1,107],15:[1,106]},{19:[1,108]},t(e,[2,15]),t(Y,[2,62],{57:109,60:[1,110],62:W}),t(Y,[2,63]),t(V,[2,67]),t(Y,[2,70]),t(V,[2,69]),{18:111,19:[1,112],53:53,54:54,58:C},{16:113,40:A,41:_},t(z,[2,44],{46:87,13:R,41:L,48:I,49:N}),{14:114,40:q,50:U,72:j},{16:115,40:A,41:_},{14:116,40:q,50:U,72:j},t(e,[2,13]),t(Y,[2,64]),{59:117,61:G},{19:[1,118]},t(e,[2,20]),t(e,[2,23],{17:[1,119],42:D}),t(e,[2,11]),{13:[1,120],42:D},t(e,[2,10]),t(V,[2,68]),t(e,[2,18]),{18:121,19:[1,122],53:53,54:54,58:C},{14:123,40:q,50:U,72:j},{19:[1,124]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},X=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 76:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 63:return 65;case 42:case 43:case 44:case 52:case 54:case 65:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 64:return 66;case 55:case 56:case 58:case 59:case 62:return 68;case 57:return 51;case 60:return 52;case 61:return 48;case 66:return 69;case 67:case 70:case 71:case 72:return 70;case 68:case 69:return 71;case 73:return 41;case 74:return 47;case 75:return 40;case 77:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,73,74],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77],inclusive:!0}}}}();function Z(){this.yy={}}return H.lexer=X,(0,l.K2)(Z,"Parser"),Z.prototype=H,H.Parser=Z,new Z}();d.parser=d;var p=d,f=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,l.K2)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),l.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const n=this.addEntity(t);let r;for(r=e.length-1;r>=0;r--)e[r].keys||(e[r].keys=[]),e[r].comment||(e[r].comment=""),n.attributes.push(e[r]),l.Rm.debug("Added attribute ",e[r].name)}addRelationship(t,e,n,r){const i=this.entities.get(t),a=this.entities.get(n);if(!i||!a)return;const s={entityA:i.id,roleA:e,entityB:a.id,relSpec:r};this.relationships.push(s),l.Rm.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const n of t){const t=this.classes.get(n);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const n of t){const t=this.entities.get(n);if(!e||!t)return;for(const n of e)t.cssStyles.push(n)}}addClass(t,e){t.forEach(t=>{let n=this.classes.get(t);void 0===n&&(n={id:t,styles:[],textStyles:[]},this.classes.set(t,n)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");n.textStyles.push(e)}n.styles.push(t)})})}setClass(t,e){for(const n of t){const t=this.entities.get(n);if(t)for(const n of e)t.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,o.IU)()}getData(){const t=[],e=[],n=(0,o.D7)();for(const i of this.entities.keys()){const e=this.entities.get(i);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),t.push(e))}let r=0;for(const i of this.relationships){const t={id:(0,s.rY)(i.entityA,i.entityB,{prefix:"id",counter:r++}),type:"normal",curve:"basis",start:i.entityA,end:i.entityB,label:i.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:i.relSpec.cardB.toLowerCase(),arrowTypeEnd:i.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==i.relSpec.relType?"solid":"dashed",look:n.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:n,direction:"TB"}}},g={};(0,l.VA)(g,{draw:()=>m});var m=(0,l.K2)(async function(t,e,n,h){l.Rm.info("REF0:"),l.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:u,er:d,layout:p}=(0,o.D7)(),f=h.db.getData(),g=(0,r.A)(e,u);f.type=h.type,f.layoutAlgorithm=(0,a.q7)(p),f.config.flowchart.nodeSpacing=d?.nodeSpacing||140,f.config.flowchart.rankSpacing=d?.rankSpacing||80,f.direction=h.db.getDirection(),f.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],f.diagramId=e,await(0,a.XX)(f,g),"elk"===f.layoutAlgorithm&&g.select(".edges").lower();const m=g.selectAll('[id*="-background"]');Array.from(m).length>0&&m.each(function(){const t=(0,c.Ltv)(this),e=t.attr("id").replace("-background",""),n=g.select(`#${CSS.escape(e)}`);if(!n.empty()){const e=n.attr("transform");t.attr("transform",e)}});s._K.insertTitle(g,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,i.P)(g,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),y=(0,l.K2)((t,e)=>{const n=u.A,r=n(t,"r"),i=n(t,"g"),a=n(t,"b");return h.A(r,i,a,e)},"fade"),v=(0,l.K2)(t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${y(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n`,"getStyles"),x={parser:p,get db(){return new f},renderer:g,styles:v}},2038(t,e,n){"use strict";n.d(e,{diagram:()=>A});var r=n(2501),i=n(3283),a=n(5523),s=n(9625),o=n(2627),l=n(9856),c=(n(5948),n(4769),n(1174)),h=(n(7879),n(1960),n(6779),n(796)),u=n(4098),d=n(797),p=n(1444),f=n(3047),g=n(5582),m=n(5937),y=class{constructor(){this.vertexCounter=0,this.config=(0,u.D7)(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=u.SV,this.setAccDescription=u.EI,this.setDiagramTitle=u.ke,this.getAccTitle=u.iN,this.getAccDescription=u.m7,this.getDiagramTitle=u.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,d.K2)(this,"FlowDB")}sanitizeText(t){return u.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,n,r,a,s,o={},l){if(!t||0===t.trim().length)return;let h;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",h=(0,i.H)(t,{schema:i.r})}const d=this.edges.find(e=>e.id===t);if(d){const t=h;return void 0!==t?.animate&&(d.animate=t.animate),void 0!==t?.animation&&(d.animation=t.animation),void(void 0!==t?.curve&&(d.interpolate=t.curve))}let p,f=this.vertices.get(t);if(void 0===f&&(f={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,f)),this.vertexCounter++,void 0!==e?(this.config=(0,u.D7)(),p=this.sanitizeText(e.text.trim()),f.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),f.text=p):void 0===f.text&&(f.text=t),void 0!==n&&(f.type=n),null!=r&&r.forEach(t=>{f.styles.push(t)}),null!=a&&a.forEach(t=>{f.classes.push(t)}),void 0!==s&&(f.dir=s),void 0===f.props?f.props=o:void 0!==o&&Object.assign(f.props,o),void 0!==h){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!(0,c.aP)(h.shape))throw new Error(`No such shape: ${h.shape}.`);f.type=h?.shape}h?.label&&(f.text=h?.label,f.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(f.icon=h?.icon,h.label?.trim()||f.text!==t||(f.text="")),h?.form&&(f.form=h?.form),h?.pos&&(f.pos=h?.pos),h?.img&&(f.img=h?.img,h.label?.trim()||f.text!==t||(f.text="")),h?.constraint&&(f.constraint=h.constraint),h.w&&(f.assetWidth=Number(h.w)),h.h&&(f.assetHeight=Number(h.h))}}addSingleLink(t,e,n,r){const i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.Rm.info("abc78 Got edge...",i);const a=n.text;if(void 0!==a&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length>10?10:n.length),r&&!this.edges.some(t=>t.id===r))i.id=r,i.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===i.start&&t.end===i.end);0===t.length?i.id=(0,h.rY)(i.start,i.end,{counter:0,prefix:"L"}):i.id=(0,h.rY)(i.start,i.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);d.Rm.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,n){const r=this.isLinkData(n)?n.id.replace("@",""):void 0;d.Rm.info("addLink",t,e,r);for(const i of t)for(const a of e){const s=i===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(i,a,n,r):this.addSingleLink(i,a,n,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const n=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=n&&n.forEach(t=>{if(/color/.exec(t)){const n=t.replace("fill","bgFill");e.textStyles.push(n)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const n of t.split(",")){const t=this.vertices.get(n);t&&t.classes.push(e);const r=this.edges.find(t=>t.id===n);r&&r.classes.push(e);const i=this.subGraphLookup.get(n);i&&i.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const n of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(n):n,e)}}setClickFun(t,e,n){const r=this.lookUpDomId(t);if("loose"!==(0,u.D7)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);const a=this.vertices.get(t);a&&(a.haveCallback=!0,this.funs.push(()=>{const t=document.querySelector(`[id="${r}"]`);null!==t&&t.addEventListener("click",()=>{h._K.runFunc(e,...i)},!1)}))}setLink(t,e,n){t.split(",").forEach(t=>{const r=this.vertices.get(t);void 0!==r&&(r.link=h._K.formatUrl(e,this.config),r.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,n){t.split(",").forEach(t=>{this.setClickFun(t,e,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=(0,a.Ck)();(0,p.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const n=(0,p.Ltv)(t.currentTarget),r=n.attr("title");if(null===r)return;const i=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.bottom+"px"),e.html(f.A.sanitize(r)),n.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,p.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,u.D7)(),(0,u.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,n){let r=t.text.trim(),i=n.text;t===n&&/\s/.exec(n.text)&&(r=void 0);const a=(0,d.K2)(t=>{const e={boolean:{},number:{},string:{}},n=[];let r;return{nodeList:t.filter(function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(r=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!n.includes(t)&&n.push(t))}),dir:r}},"uniq")(e.flat()),s=a.nodeList;let o=a.dir;const l=(0,u.D7)().flowchart??{};if(o=o??(l.inheritDir?this.getDirection()??(0,u.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let h=0;h<s.length;h++)s[h]=this.lookUpDomId(s[h]);r=r??"subGraph"+this.subCount,i=i||"",i=this.sanitizeText(i),this.subCount=this.subCount+1;const c={id:r,nodes:s,title:i.trim(),classes:[],dir:o,labelType:this.sanitizeNodeLabelType(n?.type)};return d.Rm.info("Adding",c.id,c.nodes,c.dir),c.nodes=this.makeUniq(c,this.subGraphs).nodes,this.subGraphs.push(c),this.subGraphLookup.set(r,c),r}getPosForId(t){for(const[e,n]of this.subGraphs.entries())if(n.id===t)return e;return-1}indexNodes2(t,e){const n=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let r=0,i=1;for(;r<n.length;){const e=this.getPosForId(n[r]);if(e>=0){const n=this.indexNodes2(t,e);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}let r="normal";return e.includes("=")&&(r="thick"),e.includes(".")&&(r="dotted"),{type:n,stroke:r}}countChar(t,e){const n=e.length;let r=0;for(let i=0;i<n;++i)e[i]===t&&++r;return r}destructEndLink(t){const e=t.trim();let n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross",e.startsWith("x")&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point",e.startsWith("<")&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle",e.startsWith("o")&&(r="double_"+r,n=n.slice(1))}let i="normal",a=n.length-1;n.startsWith("=")&&(i="thick"),n.startsWith("~")&&(i="invisible");const s=this.countChar(".",n);return s&&(i="dotted",a=s),{type:r,stroke:i,length:a}}destructLink(t,e){const n=this.destructEndLink(t);let r;if(e){if(r=this.destructStartLink(e),r.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===r.type)r.type=n.type;else{if(r.type!==n.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return"double_arrow"===r.type&&(r.type="double_arrow_point"),r.length=n.length,r}return n}exists(t,e){for(const n of t)if(n.nodes.includes(e))return!0;return!1}makeUniq(t,e){const n=[];return t.nodes.forEach((r,i)=>{this.exists(e,r)||n.push(t.nodes[i])}),{nodes:n}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),n=e}return{arrowTypeStart:e,arrowTypeEnd:n}}addNodeFromVertex(t,e,n,r,i,a){const s=n.get(t.id),o=r.get(t.id)??!1,l=this.findNode(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=this.getCompiledStyles(t.classes),l.cssClasses=t.classes.join(" ");else{const n={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};o?e.push({...n,isGroup:!0,shape:"rect"}):e.push({...n,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const n of t){const t=this.classes.get(n);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,u.D7)(),e=[],n=[],r=this.getSubGraphs(),i=new Map,a=new Map;for(let o=r.length-1;o>=0;o--){const t=r[o];t.nodes.length>0&&a.set(t.id,!0);for(const e of t.nodes)i.set(e,t.id)}for(let o=r.length-1;o>=0;o--){const n=r[o];e.push({id:n.id,label:n.title,labelStyle:"",labelType:n.labelType,parentId:i.get(n.id),padding:8,cssCompiledStyles:this.getCompiledStyles(n.classes),cssClasses:n.classes.join(" "),shape:"rect",dir:n.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(n=>{this.addNodeFromVertex(n,e,i,a,t,t.look||"classic")});const s=this.getEdges();return s.forEach((e,r)=>{const{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(e.type),o=[...s.defaultStyle??[]];e.style&&o.push(...e.style);const l={id:(0,h.rY)(e.start,e.end,{counter:r,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":a,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:o,style:o,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};n.push(l)}),{nodes:e,edges:n,other:{},config:t}}defaultConfig(){return u.ME.flowchart}},v={getClasses:(0,d.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,d.K2)(async function(t,e,n,r){d.Rm.info("REF0:"),d.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:i,flowchart:a,layout:c}=(0,u.D7)();let f;"sandbox"===i&&(f=(0,p.Ltv)("#i"+e));const g="sandbox"===i?f.nodes()[0].contentDocument:document;d.Rm.debug("Before getData: ");const m=r.db.getData();d.Rm.debug("Data: ",m);const y=(0,s.A)(e,i),v=r.db.getDirection();m.type=r.type,m.layoutAlgorithm=(0,l.q7)(c),"dagre"===m.layoutAlgorithm&&"elk"===c&&d.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),m.direction=v,m.nodeSpacing=a?.nodeSpacing||50,m.rankSpacing=a?.rankSpacing||50,m.markers=["point","circle","cross"],m.diagramId=e,d.Rm.debug("REF1:",m),await(0,l.XX)(m,y);const x=m.config.flowchart?.diagramPadding??8;h._K.insertTitle(y,"flowchartTitleText",a?.titleTopMargin||0,r.db.getDiagramTitle()),(0,o.P)(y,x,"flowchart",a?.useMaxWidth||!1);for(const s of m.nodes){const t=(0,p.Ltv)(`#${e} [id="${s.id}"]`);if(!t||!s.link)continue;const n=g.createElementNS("http://www.w3.org/2000/svg","a");n.setAttributeNS("http://www.w3.org/2000/svg","class",s.cssClasses),n.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?n.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):s.linkTarget&&n.setAttributeNS("http://www.w3.org/2000/svg","target",s.linkTarget);const r=t.insert(function(){return n},":first-child"),a=t.select(".label-container");a&&r.append(function(){return a.node()});const o=t.select(".label");o&&r.append(function(){return o.node()})}},"draw")},x=function(){var t=(0,d.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],s=[1,13],o=[1,14],l=[1,15],c=[1,16],h=[1,23],u=[1,25],p=[1,26],f=[1,27],g=[1,50],m=[1,49],y=[1,29],v=[1,30],x=[1,31],b=[1,32],w=[1,33],T=[1,45],k=[1,47],E=[1,43],A=[1,48],_=[1,44],C=[1,51],S=[1,46],R=[1,52],L=[1,53],D=[1,34],I=[1,35],N=[1,36],M=[1,37],O=[1,38],P=[1,58],$=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],B=[1,62],F=[1,61],z=[1,63],K=[8,9,11,75,77,78],q=[1,79],U=[1,92],j=[1,97],Y=[1,96],G=[1,93],W=[1,89],V=[1,95],H=[1,91],X=[1,98],Z=[1,94],Q=[1,99],J=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],nt=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],rt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],it=[44,60,89,102,105,106,109,111,114,115,116],at=[1,122],st=[1,123],ot=[1,125],lt=[1,124],ct=[44,60,62,74,89,102,105,106,109,111,114,115,116],ht=[1,134],ut=[1,148],dt=[1,149],pt=[1,150],ft=[1,151],gt=[1,136],mt=[1,138],yt=[1,142],vt=[1,143],xt=[1,144],bt=[1,145],wt=[1,146],Tt=[1,147],kt=[1,152],Et=[1,153],At=[1,132],_t=[1,133],Ct=[1,140],St=[1,135],Rt=[1,139],Lt=[1,137],Dt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],It=[1,155],Nt=[1,157],Mt=[8,9,11],Ot=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Pt=[1,177],$t=[1,173],Bt=[1,174],Ft=[1,178],zt=[1,175],Kt=[1,176],qt=[77,116,119],Ut=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],jt=[10,106],Yt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Gt=[1,248],Wt=[1,246],Vt=[1,250],Ht=[1,244],Xt=[1,245],Zt=[1,247],Qt=[1,249],Jt=[1,251],te=[1,269],ee=[8,9,11,106],ne=[8,9,10,11,60,84,105,106,109,110,111,112],re={trace:(0,d.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:(0,d.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(a[o])||a[o].length>0)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=a[o];break;case 11:r.setDirection("TB"),this.$="TB";break;case 12:r.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 33:this.$=r.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=r.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=r.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 43:case 133:this.$=a[o-1]+a[o];break;case 45:r.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),r.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:r.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:r.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:r.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:case 128:case 130:this.$=[a[o]];break;case 52:r.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 55:this.$=a[o-2],r.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],r.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],r.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 77:var l=r.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=r.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:case 86:case 101:case 103:this.$={text:a[o],type:"text"};break;case 80:case 87:case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:case 88:this.$={text:a[o],type:"string"};break;case 82:case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 83:l=r.destructLink(a[o]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=r.destructLink(a[o]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 105:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],r.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],r.setClickEvent(a[o-4],a[o-3],a[o-2]),r.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],r.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],r.setLink(a[o-4],a[o-2]),r.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],r.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],r.setLink(a[o-6],a[o-4],a[o]),r.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],r.setLink(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],r.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],r.setLink(a[o-5],a[o-4],a[o]),r.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],r.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],r.updateLinkInterpolate([a[o-6]],a[o-2]),r.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],r.updateLinkInterpolate(a[o-6],a[o-2]),r.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],r.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],r.updateLinkInterpolate(a[o-4],a[o]);break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 182:case 184:this.$=a[o-1]+""+a[o];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:n,12:r},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:n,12:r},{4:8,9:e,10:n,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:b,88:w,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L,121:D,122:I,123:N,124:M,125:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,55],9:[1,56],10:P,15:54,18:57},t($,[2,3]),t($,[2,4]),t($,[2,5]),t($,[2,6]),t($,[2,7]),t($,[2,8]),{8:B,9:F,11:z,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:B,9:F,11:z,21:68},{8:B,9:F,11:z,21:69},{8:B,9:F,11:z,21:70},{8:B,9:F,11:z,21:71},{8:B,9:F,11:z,21:72},{8:B,9:F,10:[1,73],11:z,21:74},t($,[2,36]),{35:[1,75]},{37:[1,76]},t($,[2,39]),t(K,[2,50],{18:77,39:78,10:P,40:q}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:U,44:j,60:Y,80:[1,87],89:G,95:[1,84],97:[1,85],101:86,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},t($,[2,185]),t($,[2,186]),t($,[2,187]),t($,[2,188]),t($,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:m,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:T,102:k,105:E,106:A,109:_,111:C,114:S,115:R,116:L}),t(nt,[2,181]),t(nt,[2,142]),t(nt,[2,143]),t(nt,[2,144]),t(nt,[2,145]),t(nt,[2,146]),t(nt,[2,147]),t(nt,[2,148]),t(nt,[2,149]),t(nt,[2,150]),t(nt,[2,151]),t(nt,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,114]},t(rt,[2,26],{18:115,10:P}),t($,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},t($,[2,40]),t($,[2,41]),t($,[2,42]),t(it,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:at,81:st,116:ot,119:lt},{75:[1,126],77:[1,127]},t(ct,[2,83]),t($,[2,28]),t($,[2,29]),t($,[2,30]),t($,[2,31]),t($,[2,32]),{10:ht,12:ut,14:dt,27:pt,28:128,32:ft,44:gt,60:mt,75:yt,80:[1,130],81:[1,131],83:141,84:vt,85:xt,86:bt,87:wt,88:Tt,89:kt,90:Et,91:129,105:At,109:_t,111:Ct,114:St,115:Rt,116:Lt},t(Dt,a,{5:154}),t($,[2,37]),t($,[2,38]),t(K,[2,48],{44:It}),t(K,[2,49],{18:156,10:P,40:Nt}),t(tt,[2,44]),{44:g,47:158,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},{44:g,47:163,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},t(Mt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(Mt,[2,115],{120:168,10:[1,167],14:U,44:j,60:Y,89:G,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,117],{10:[1,169]}),t(Ot,[2,183]),t(Ot,[2,170]),t(Ot,[2,171]),t(Ot,[2,172]),t(Ot,[2,173]),t(Ot,[2,174]),t(Ot,[2,175]),t(Ot,[2,176]),t(Ot,[2,177]),t(Ot,[2,178]),t(Ot,[2,179]),t(Ot,[2,180]),{44:g,47:170,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},{30:171,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:179,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:181,50:[1,180],67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:182,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:183,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:184,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{109:[1,185]},{30:186,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:187,65:[1,188],67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:189,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:190,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:191,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(nt,[2,182]),t(i,[2,20]),t(rt,[2,25]),t(K,[2,46],{39:192,18:193,10:P,40:q}),t(it,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{77:[1,197],79:198,116:ot,119:lt},t(qt,[2,79]),t(qt,[2,81]),t(qt,[2,82]),t(qt,[2,168]),t(qt,[2,169]),{76:199,79:121,80:at,81:st,116:ot,119:lt},t(ct,[2,84]),{8:B,9:F,10:ht,11:z,12:ut,14:dt,21:201,27:pt,29:[1,200],32:ft,44:gt,60:mt,75:yt,83:141,84:vt,85:xt,86:bt,87:wt,88:Tt,89:kt,90:Et,91:202,105:At,109:_t,111:Ct,114:St,115:Rt,116:Lt},t(Ut,[2,101]),t(Ut,[2,103]),t(Ut,[2,104]),t(Ut,[2,157]),t(Ut,[2,158]),t(Ut,[2,159]),t(Ut,[2,160]),t(Ut,[2,161]),t(Ut,[2,162]),t(Ut,[2,163]),t(Ut,[2,164]),t(Ut,[2,165]),t(Ut,[2,166]),t(Ut,[2,167]),t(Ut,[2,90]),t(Ut,[2,91]),t(Ut,[2,92]),t(Ut,[2,93]),t(Ut,[2,94]),t(Ut,[2,95]),t(Ut,[2,96]),t(Ut,[2,97]),t(Ut,[2,98]),t(Ut,[2,99]),t(Ut,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:b,88:w,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L,121:D,122:I,123:N,124:M,125:O},{10:P,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:g,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:113,114:S,115:R,116:L},{10:[1,207]},{10:[1,208],106:[1,209]},t(jt,[2,128]),{10:[1,210],44:g,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:113,114:S,115:R,116:L},{10:[1,211],44:g,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:113,114:S,115:R,116:L},{80:[1,212]},t(Mt,[2,109],{10:[1,213]}),t(Mt,[2,111],{10:[1,214]}),{80:[1,215]},t(Ot,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:g,60:m,89:T,102:k,105:E,106:A,109:_,111:C,114:S,115:R,116:L}),{31:[1,218],67:Pt,82:219,116:Ft,117:zt,118:Kt},t(Yt,[2,86]),t(Yt,[2,88]),t(Yt,[2,89]),t(Yt,[2,153]),t(Yt,[2,154]),t(Yt,[2,155]),t(Yt,[2,156]),{49:[1,220],67:Pt,82:219,116:Ft,117:zt,118:Kt},{30:221,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{51:[1,222],67:Pt,82:219,116:Ft,117:zt,118:Kt},{53:[1,223],67:Pt,82:219,116:Ft,117:zt,118:Kt},{55:[1,224],67:Pt,82:219,116:Ft,117:zt,118:Kt},{57:[1,225],67:Pt,82:219,116:Ft,117:zt,118:Kt},{60:[1,226]},{64:[1,227],67:Pt,82:219,116:Ft,117:zt,118:Kt},{66:[1,228],67:Pt,82:219,116:Ft,117:zt,118:Kt},{30:229,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},{31:[1,230],67:Pt,82:219,116:Ft,117:zt,118:Kt},{67:Pt,69:[1,231],71:[1,232],82:219,116:Ft,117:zt,118:Kt},{67:Pt,69:[1,234],71:[1,233],82:219,116:Ft,117:zt,118:Kt},t(K,[2,45],{18:156,10:P,40:Nt}),t(K,[2,47],{44:It}),t(it,[2,75]),t(it,[2,74]),{62:[1,235],67:Pt,82:219,116:Ft,117:zt,118:Kt},t(it,[2,77]),t(qt,[2,80]),{77:[1,236],79:198,116:ot,119:lt},{30:237,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(Dt,a,{5:238}),t(Ut,[2,102]),t($,[2,35]),{43:239,44:g,45:40,47:41,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},{10:P,18:240},{10:Gt,60:Wt,84:Vt,92:241,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Wt,84:Vt,92:252,104:[1,253],105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Wt,84:Vt,92:254,104:[1,255],105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{105:[1,256]},{10:Gt,60:Wt,84:Vt,92:257,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{44:g,47:258,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},t(Mt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(Mt,[2,116]),t(Mt,[2,118],{10:[1,262]}),t(Mt,[2,119]),t(et,[2,56]),t(Yt,[2,87]),t(et,[2,57]),{51:[1,263],67:Pt,82:219,116:Ft,117:zt,118:Kt},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:Pt,82:219,116:Ft,117:zt,118:Kt},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(it,[2,78]),{31:[1,266],67:Pt,82:219,116:Ft,117:zt,118:Kt},{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:b,88:w,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L,121:D,122:I,123:N,124:M,125:O},t(tt,[2,53]),{43:268,44:g,45:40,47:41,60:m,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L},t(Mt,[2,121],{106:te}),t(ee,[2,130],{108:270,10:Gt,60:Wt,84:Vt,105:Ht,109:Xt,110:Zt,111:Qt,112:Jt}),t(ne,[2,132]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t(ne,[2,137]),t(ne,[2,138]),t(ne,[2,139]),t(ne,[2,140]),t(ne,[2,141]),t(Mt,[2,122],{106:te}),{10:[1,271]},t(Mt,[2,123],{106:te}),{10:[1,272]},t(jt,[2,129]),t(Mt,[2,105],{106:te}),t(Mt,[2,106],{113:113,44:g,60:m,89:T,102:k,105:E,106:A,109:_,111:C,114:S,115:R,116:L}),t(Mt,[2,110]),t(Mt,[2,112],{10:[1,273]}),t(Mt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:B,9:F,11:z,21:278},t($,[2,34]),t(tt,[2,52]),{10:Gt,60:Wt,84:Vt,105:Ht,107:279,108:243,109:Xt,110:Zt,111:Qt,112:Jt},t(ne,[2,133]),{14:U,44:j,60:Y,89:G,101:280,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},{14:U,44:j,60:Y,89:G,101:281,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},{98:[1,282]},t(Mt,[2,120]),t(et,[2,58]),{30:283,67:Pt,80:$t,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(et,[2,66]),t(Dt,a,{5:284}),t(ee,[2,131],{108:270,10:Gt,60:Wt,84:Vt,105:Ht,109:Xt,110:Zt,111:Qt,112:Jt}),t(Mt,[2,126],{120:168,10:[1,285],14:U,44:j,60:Y,89:G,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,127],{120:168,10:[1,286],14:U,44:j,60:Y,89:G,105:W,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,114]),{31:[1,287],67:Pt,82:219,116:Ft,117:zt,118:Kt},{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:x,87:b,88:w,89:T,102:k,105:E,106:A,109:_,111:C,113:42,114:S,115:R,116:L,121:D,122:I,123:N,124:M,125:O},{10:Gt,60:Wt,84:Vt,92:289,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Wt,84:Vt,92:290,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},t(et,[2,62]),t($,[2,33]),t(Mt,[2,124],{106:te}),t(Mt,[2,125],{106:te})],defaultActions:{},parseError:(0,d.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,d.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,d.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,h>0&&h--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,c,l,f.yy,T[1],i,a].concat(u))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},ie=function(){return{EOF:1,parseError:(0,d.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K2)(function(){return this._more=!0,this},"more"),reject:(0,d.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,d.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K2)(function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:case 103:return 111;case 63:return 46;case 64:return 60;case 65:case 104:return 44;case 66:return 8;case 67:return 106;case 68:case 102:return 115;case 69:case 72:case 75:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:case 74:case 77:return 119;case 73:return this.pushState("thickEdgeText"),75;case 76:return this.pushState("dottedEdgeText"),75;case 78:return 77;case 79:return this.popState(),53;case 80:case 116:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}}}();function ae(){this.yy={}}return re.lexer=ie,(0,d.K2)(ae,"Parser"),ae.prototype=re,re.Parser=ae,new ae}();x.parser=x;var b=x,w=Object.assign({},b);w.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return b.parse(e)};var T=w,k=(0,d.K2)((t,e)=>{const n=m.A,r=n(t,"r"),i=n(t,"g"),a=n(t,"b");return g.A(r,i,a,e)},"fade"),E=(0,d.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${k(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,r.o)()}\n`,"getStyles"),A={parser:T,get db(){return new y},renderer:v,styles:E,init:(0,d.K2)(t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,u.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,u.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}},5944(t,e,n){"use strict";n.d(e,{diagram:()=>$t});var r=n(796),i=n(4098),a=n(797),s=n(6750),o=n(4353),l=n(8313),c=n(445),h=n(7375),u=n(3522),d=n(1444),p=function(){var t=(0,a.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],f=[1,11],g=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],T=[1,21],k=[1,22],E=[1,23],A=[1,25],_=[1,35],C={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,a.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.setWeekday("monday");break;case 9:r.setWeekday("tuesday");break;case 10:r.setWeekday("wednesday");break;case 11:r.setWeekday("thursday");break;case 12:r.setWeekday("friday");break;case 13:r.setWeekday("saturday");break;case 14:r.setWeekday("sunday");break;case 15:r.setWeekend("friday");break;case 16:r.setWeekend("saturday");break;case 17:r.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:r.TopAxis(),this.$=a[o].substr(8);break;case 20:r.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:r.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:r.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:r.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:r.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:r.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],r.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],null),r.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],r.setClickEvent(a[o-2],a[o],null),r.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-1],a[o]),r.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:x,30:b,31:w,33:T,35:k,36:E,37:24,38:A,40:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:x,30:b,31:w,33:T,35:k,36:E,37:24,38:A,40:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],r=[],i=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,a.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),s.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:s[s.length-(A||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(A||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(A||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,s].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),s=s.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),s.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function R(){this.yy={}}return C.lexer=S,(0,a.K2)(R,"Parser"),R.prototype=C,C.Parser=R,new R}();p.parser=p;var f=p;o.extend(l),o.extend(c),o.extend(h);var g,m,y={friday:5,saturday:6},v="",x="",b=void 0,w="",T=[],k=[],E=new Map,A=[],_=[],C="",S="",R=["active","done","crit","milestone","vert"],L=[],D=!1,I=!1,N="sunday",M="saturday",O=0,P=(0,a.K2)(function(){A=[],_=[],C="",L=[],ft=0,g=void 0,m=void 0,vt=[],v="",x="",S="",b=void 0,w="",T=[],k=[],D=!1,I=!1,O=0,E=new Map,(0,i.IU)(),N="sunday",M="saturday"},"clear"),$=(0,a.K2)(function(t){x=t},"setAxisFormat"),B=(0,a.K2)(function(){return x},"getAxisFormat"),F=(0,a.K2)(function(t){b=t},"setTickInterval"),z=(0,a.K2)(function(){return b},"getTickInterval"),K=(0,a.K2)(function(t){w=t},"setTodayMarker"),q=(0,a.K2)(function(){return w},"getTodayMarker"),U=(0,a.K2)(function(t){v=t},"setDateFormat"),j=(0,a.K2)(function(){D=!0},"enableInclusiveEndDates"),Y=(0,a.K2)(function(){return D},"endDatesAreInclusive"),G=(0,a.K2)(function(){I=!0},"enableTopAxis"),W=(0,a.K2)(function(){return I},"topAxisEnabled"),V=(0,a.K2)(function(t){S=t},"setDisplayMode"),H=(0,a.K2)(function(){return S},"getDisplayMode"),X=(0,a.K2)(function(){return v},"getDateFormat"),Z=(0,a.K2)(function(t){T=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Q=(0,a.K2)(function(){return T},"getIncludes"),J=(0,a.K2)(function(t){k=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),tt=(0,a.K2)(function(){return k},"getExcludes"),et=(0,a.K2)(function(){return E},"getLinks"),nt=(0,a.K2)(function(t){C=t,A.push(t)},"addSection"),rt=(0,a.K2)(function(){return A},"getSections"),it=(0,a.K2)(function(){let t=kt();let e=0;for(;!t&&e<10;)t=kt(),e++;return _=vt},"getTasks"),at=(0,a.K2)(function(t,e,n,r){const i=t.format(e.trim()),a=t.format("YYYY-MM-DD");return!r.includes(i)&&!r.includes(a)&&(!(!n.includes("weekends")||t.isoWeekday()!==y[M]&&t.isoWeekday()!==y[M]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(i)||n.includes(a))))},"isInvalidDate"),st=(0,a.K2)(function(t){N=t},"setWeekday"),ot=(0,a.K2)(function(){return N},"getWeekday"),lt=(0,a.K2)(function(t){M=t},"setWeekend"),ct=(0,a.K2)(function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i,a;i=t.startTime instanceof Date?o(t.startTime):o(t.startTime,e,!0),i=i.add(1,"d"),a=t.endTime instanceof Date?o(t.endTime):o(t.endTime,e,!0);const[s,l]=ht(i,a,e,n,r);t.endTime=s.toDate(),t.renderEndTime=l},"checkTaskDates"),ht=(0,a.K2)(function(t,e,n,r,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=at(t,n,r,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),ut=(0,a.K2)(function(t,e,n){n=n.trim();if((0,a.K2)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const r=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==r){let t=null;for(const n of r.groups.ids.split(" ")){let e=wt(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let i=o(n,e.trim(),!0);if(i.isValid())return i.toDate();{a.Rm.debug("Invalid date:"+n),a.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),dt=(0,a.K2)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),pt=(0,a.K2)(function(t,e,n,r=!1){n=n.trim();const i=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=wt(n);void 0!==e&&(!t||e.startTime<t.startTime)&&(t=e)}if(t)return t.startTime;const e=new Date;return e.setHours(0,0,0,0),e}let a=o(n,e.trim(),!0);if(a.isValid())return r&&(a=a.add(1,"d")),a.toDate();let s=o(t);const[l,c]=dt(n);if(!Number.isNaN(l)){const t=s.add(l,c);t.isValid()&&(s=t)}return s.toDate()},"getEndDate"),ft=0,gt=(0,a.K2)(function(t){return void 0===t?"task"+(ft+=1):t},"parseId"),mt=(0,a.K2)(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const r=n.split(","),i={};Dt(r,i,R);for(let s=0;s<r.length;s++)r[s]=r[s].trim();let a="";switch(r.length){case 1:i.id=gt(),i.startTime=t.endTime,a=r[0];break;case 2:i.id=gt(),i.startTime=ut(void 0,v,r[0]),a=r[1];break;case 3:i.id=gt(r[0]),i.startTime=ut(void 0,v,r[1]),a=r[2]}return a&&(i.endTime=pt(i.startTime,v,a,D),i.manualEndTime=o(a,"YYYY-MM-DD",!0).isValid(),ct(i,v,k,T)),i},"compileData"),yt=(0,a.K2)(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const r=n.split(","),i={};Dt(r,i,R);for(let a=0;a<r.length;a++)r[a]=r[a].trim();switch(r.length){case 1:i.id=gt(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=gt(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=gt(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),vt=[],xt={},bt=(0,a.K2)(function(t,e){const n={section:C,type:C,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=yt(m,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=m,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.order=O,O++;const i=vt.push(n);m=n.id,xt[n.id]=i-1},"addTask"),wt=(0,a.K2)(function(t){const e=xt[t];return vt[e]},"findTaskById"),Tt=(0,a.K2)(function(t,e){const n={section:C,type:C,description:t,task:t,classes:[]},r=mt(g,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,g=n,_.push(n)},"addTaskOrg"),kt=(0,a.K2)(function(){const t=(0,a.K2)(function(t){const e=vt[t];let n="";switch(vt[t].raw.startTime.type){case"prevTaskEnd":{const t=wt(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=ut(void 0,v,vt[t].raw.startTime.startData),n&&(vt[t].startTime=n)}return vt[t].startTime&&(vt[t].endTime=pt(vt[t].startTime,v,vt[t].raw.endTime.data,D),vt[t].endTime&&(vt[t].processed=!0,vt[t].manualEndTime=o(vt[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ct(vt[t],v,k,T))),vt[t].processed},"compileTask");let e=!0;for(const[n,r]of vt.entries())t(n),e=e&&r.processed;return e},"compileTasks"),Et=(0,a.K2)(function(t,e){let n=e;"loose"!==(0,i.D7)().securityLevel&&(n=(0,s.J)(e)),t.split(",").forEach(function(t){void 0!==wt(t)&&(Ct(t,()=>{window.open(n,"_self")}),E.set(t,n))}),At(t,"clickable")},"setLink"),At=(0,a.K2)(function(t,e){t.split(",").forEach(function(t){let n=wt(t);void 0!==n&&n.classes.push(e)})},"setClass"),_t=(0,a.K2)(function(t,e,n){if("loose"!==(0,i.D7)().securityLevel)return;if(void 0===e)return;let a=[];if("string"==typeof n){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<a.length;t++){let e=a[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),a[t]=e}}0===a.length&&a.push(t),void 0!==wt(t)&&Ct(t,()=>{r._K.runFunc(e,...a)})},"setClickFun"),Ct=(0,a.K2)(function(t,e){L.push(function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",function(){e()})})},"pushFun"),St=(0,a.K2)(function(t,e,n){t.split(",").forEach(function(t){_t(t,e,n)}),At(t,"clickable")},"setClickEvent"),Rt=(0,a.K2)(function(t){L.forEach(function(e){e(t)})},"bindFunctions"),Lt={getConfig:(0,a.K2)(()=>(0,i.D7)().gantt,"getConfig"),clear:P,setDateFormat:U,getDateFormat:X,enableInclusiveEndDates:j,endDatesAreInclusive:Y,enableTopAxis:G,topAxisEnabled:W,setAxisFormat:$,getAxisFormat:B,setTickInterval:F,getTickInterval:z,setTodayMarker:K,getTodayMarker:q,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,setDisplayMode:V,getDisplayMode:H,setAccDescription:i.EI,getAccDescription:i.m7,addSection:nt,getSections:rt,getTasks:it,addTask:bt,findTaskById:wt,addTaskOrg:Tt,setIncludes:Z,getIncludes:Q,setExcludes:J,getExcludes:tt,setClickEvent:St,setLink:Et,getLinks:et,bindFunctions:Rt,parseDuration:dt,isInvalidDate:at,setWeekday:st,getWeekday:ot,setWeekend:lt};function Dt(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){const i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)})}(0,a.K2)(Dt,"getTaskTags"),o.extend(u);var It,Nt=(0,a.K2)(function(){a.Rm.debug("Something is calling, setConf, remove the call")},"setConf"),Mt={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Ot=(0,a.K2)((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(const a of r)for(let t=0;t<n.length;t++)if(a.startTime>=n[t]){n[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Pt=1e4,$t={parser:f,db:Lt,renderer:{setConf:Nt,draw:(0,a.K2)(function(t,e,n,r){const s=(0,i.D7)().gantt,l=(0,i.D7)().securityLevel;let c;"sandbox"===l&&(c=(0,d.Ltv)("#i"+e));const h="sandbox"===l?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===l?c.nodes()[0].contentDocument:document,p=u.getElementById(e);void 0===(It=p.parentElement.offsetWidth)&&(It=1200),void 0!==s.useWidth&&(It=s.useWidth);const f=r.db.getTasks();let g=[];for(const i of f)g.push(i.type);g=S(g);const m={};let y=2*s.topPadding;if("compact"===r.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const n of f)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const r=Ot(t[n],e)+1;e+=r,y+=r*(s.barHeight+s.barGap),m[n]=r}}else{y+=f.length*(s.barHeight+s.barGap);for(const t of g)m[t]=f.filter(e=>e.type===t).length}p.setAttribute("viewBox","0 0 "+It+" "+y);const v=h.select(`[id="${e}"]`),x=(0,d.w7C)().domain([(0,d.jkA)(f,function(t){return t.startTime}),(0,d.T9B)(f,function(t){return t.endTime})]).rangeRound([0,It-s.leftPadding-s.rightPadding]);function b(t,e){const n=t.startTime,r=e.startTime;let i=0;return n>r?i=1:n<r&&(i=-1),i}function w(t,e,n){const i=s.barHeight,a=i+s.barGap,o=s.topPadding,l=s.leftPadding,c=(0,d.m4Y)().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(d.bEH);k(a,o,l,e,n,t,r.db.getExcludes(),r.db.getIncludes()),A(l,o,e,n),T(t,a,o,l,i,c,e),_(a,o),C(l,o,e,n)}function T(t,n,a,o,l,c,h){t.sort((t,e)=>t.vert===e.vert?0:t.vert?1:-1);const u=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));v.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+a-2}).attr("width",function(){return h-s.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of g.entries())if(t.type===n)return"section section"+e%s.numberSectionStyles;return"section section0"}).enter();const p=v.append("g").selectAll("rect").data(t).enter(),m=r.db.getLinks();p.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?x(t.startTime)+o+.5*(x(t.endTime)-x(t.startTime))-.5*l:x(t.startTime)+o}).attr("y",function(t,e){return e=t.order,t.vert?s.gridLineStartPadding:e*n+a}).attr("width",function(t){return t.milestone?l:t.vert?.08*l:x(t.renderEndTime||t.endTime)-x(t.startTime)}).attr("height",function(t){return t.vert?f.length*(s.barHeight+s.barGap)+2*s.barHeight:l}).attr("transform-origin",function(t,e){return e=t.order,(x(t.startTime)+o+.5*(x(t.endTime)-x(t.startTime))).toString()+"px "+(e*n+a+.5*l).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[i,a]of g.entries())t.type===a&&(n=i%s.numberSectionStyles);let r="";return t.active?t.crit?r+=" activeCrit":r=" active":t.done?r=t.crit?" doneCrit":" done":t.crit&&(r+=" crit"),0===r.length&&(r=" task"),t.milestone&&(r=" milestone "+r),t.vert&&(r=" vert "+r),r+=n,r+=" "+e,"task"+r}),p.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",s.fontSize).attr("x",function(t){let e=x(t.startTime),n=x(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(x(t.endTime)-x(t.startTime))-.5*l,n=e+l),t.vert)return x(t.startTime)+o;const r=this.getBBox().width;return r>n-e?n+r+1.5*s.leftPadding>h?e+o-5:n+o+5:(n-e)/2+e+o}).attr("y",function(t,e){return t.vert?s.gridLineStartPadding+f.length*(s.barHeight+s.barGap)+60:t.order*n+s.barHeight/2+(s.fontSize/2-2)+a}).attr("text-height",l).attr("class",function(t){const e=x(t.startTime);let n=x(t.endTime);t.milestone&&(n=e+l);const r=this.getBBox().width;let i="";t.classes.length>0&&(i=t.classes.join(" "));let a=0;for(const[l,c]of g.entries())t.type===c&&(a=l%s.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),t.vert&&(o+=" vertText"),r>n-e?n+r+1.5*s.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+o:i+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+r:i+" taskText taskText"+a+" "+o+" width-"+r});if("sandbox"===(0,i.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;p.filter(function(t){return m.has(t.id)}).each(function(t){var e=n.querySelector("#"+t.id),r=n.querySelector("#"+t.id+"-text");const i=e.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",m.get(t.id)),a.setAttribute("target","_top"),i.appendChild(a),a.appendChild(e),a.appendChild(r)})}}function k(t,e,n,i,l,c,h,u){if(0===h.length&&0===u.length)return;let d,p;for(const{startTime:r,endTime:a}of c)(void 0===d||r<d)&&(d=r),(void 0===p||a>p)&&(p=a);if(!d||!p)return;if(o(p).diff(o(d),"year")>5)return void a.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const f=r.db.getDateFormat(),g=[];let m=null,y=o(d);for(;y.valueOf()<=p;)r.db.isInvalidDate(y,f,h,u)?m?m.end=y:m={start:y,end:y}:m&&(g.push(m),m=null),y=y.add(1,"d");v.append("g").selectAll("rect").data(g).enter().append("rect").attr("id",t=>"exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>x(t.start.startOf("day"))+n).attr("y",s.gridLineStartPadding).attr("width",t=>x(t.end.endOf("day"))-x(t.start.startOf("day"))).attr("height",l-e-s.gridLineStartPadding).attr("transform-origin",function(e,r){return(x(e.start)+n+.5*(x(e.end)-x(e.start))).toString()+"px "+(r*t+.5*l).toString()+"px"}).attr("class","exclude-range")}function E(t,e,n,r){if(n<=0||t>e)return 1/0;const i=e-t,a=o.duration({[r??"day"]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}function A(t,e,n,i){const o=r.db.getDateFormat(),l=r.db.getAxisFormat();let c;c=l||("D"===o?"%d":s.axisFormat??"%Y-%m-%d");let h=(0,d.l78)(x).tickSize(-i+e+s.gridLineStartPadding).tickFormat((0,d.DCK)(c));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||s.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],n=r.db.getWeekday()||s.weekday,i=x.domain(),o=E(i[0],i[1],t,e);if(o>Pt)a.Rm.warn(`The tick interval "${t}${e}" would generate ${o} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":h.ticks(d.t6C.every(t));break;case"second":h.ticks(d.ucG.every(t));break;case"minute":h.ticks(d.wXd.every(t));break;case"hour":h.ticks(d.Agd.every(t));break;case"day":h.ticks(d.UAC.every(t));break;case"week":h.ticks(Mt[n].every(t));break;case"month":h.ticks(d.Ui6.every(t))}}}if(v.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||s.topAxis){let n=(0,d.tlR)(x).tickSize(-i+e+s.gridLineStartPadding).tickFormat((0,d.DCK)(c));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],i=r.db.getWeekday()||s.weekday,a=x.domain();if(E(a[0],a[1],t,e)<=Pt)switch(e){case"millisecond":n.ticks(d.t6C.every(t));break;case"second":n.ticks(d.ucG.every(t));break;case"minute":n.ticks(d.wXd.every(t));break;case"hour":n.ticks(d.Agd.every(t));break;case"day":n.ticks(d.UAC.every(t));break;case"week":n.ticks(Mt[i].every(t));break;case"month":n.ticks(d.Ui6.every(t))}}}v.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(t,e){let n=0;const r=Object.keys(m).map(t=>[t,m[t]]);v.append("g").selectAll("text").data(r).enter().append(function(t){const e=t[0].split(i.Y2.lineBreakRegex),n=-(e.length-1)/2,r=u.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(const[i,a]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),i>0&&t.setAttribute("dy","1em"),t.textContent=a,r.appendChild(t)}return r}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+e;for(let s=0;s<a;s++)return n+=r[a-1][1],i[1]*t/2+n*t+e}).attr("font-size",s.sectionFontSize).attr("class",function(t){for(const[e,n]of g.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"})}function C(t,e,n,i){const a=r.db.getTodayMarker();if("off"===a)return;const o=v.append("g").attr("class","today"),l=new Date,c=o.append("line");c.attr("x1",x(l)+t).attr("x2",x(l)+t).attr("y1",s.titleTopMargin).attr("y2",i-s.titleTopMargin).attr("class","today"),""!==a&&c.attr("style",a.replace(/,/g,";"))}function S(t){const e={},n=[];for(let r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(0,a.K2)(b,"taskCompare"),f.sort(b),w(f,It,y),(0,i.a$)(v,y,It,s.useMaxWidth),v.append("text").text(r.db.getDiagramTitle()).attr("x",It/2).attr("y",s.titleTopMargin).attr("class","titleText"),(0,a.K2)(w,"makeGantt"),(0,a.K2)(T,"drawRects"),(0,a.K2)(k,"drawExcludeDays"),(0,a.K2)(E,"getEstimatedTickCount"),(0,a.K2)(A,"makeGrid"),(0,a.K2)(_,"vertLabels"),(0,a.K2)(C,"drawToday"),(0,a.K2)(S,"checkUnique")},"draw")},styles:(0,a.K2)(t=>`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar — same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}},1679(t,e,n){"use strict";n.d(e,{diagram:()=>yt});var r=n(5871),i=n(2938),a=n(796),s=n(4098),o=n(797),l=n(8731),c=n(1444),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},u=s.UI.gitGraph,d=(0,o.K2)(()=>(0,a.$t)({...u,...(0,s.zj)().gitGraph}),"getConfig"),p=new i.m(()=>{const t=d(),e=t.mainBranchName,n=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:n}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function f(){return(0,a.yT)({length:7})}function g(t,e){const n=Object.create(null);return t.reduce((t,r)=>{const i=e(r);return n[i]||(n[i]=!0,t.push(r)),t},[])}(0,o.K2)(f,"getID"),(0,o.K2)(g,"uniqBy");var m=(0,o.K2)(function(t){p.records.direction=t},"setDirection"),y=(0,o.K2)(function(t){o.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{p.records.options=JSON.parse(t)}catch(e){o.Rm.error("error while parsing gitGraph options",e.message)}},"setOptions"),v=(0,o.K2)(function(){return p.records.options},"getOptions"),x=(0,o.K2)(function(t){let e=t.msg,n=t.id;const r=t.type;let i=t.tags;o.Rm.info("commit",e,n,r,i),o.Rm.debug("Entering commit:",e,n,r,i);const a=d();n=s.Y2.sanitizeText(n,a),e=s.Y2.sanitizeText(e,a),i=i?.map(t=>s.Y2.sanitizeText(t,a));const l={id:n||p.records.seq+"-"+f(),message:e,seq:p.records.seq++,type:r??h.NORMAL,tags:i??[],parents:null==p.records.head?[]:[p.records.head.id],branch:p.records.currBranch};p.records.head=l,o.Rm.info("main branch",a.mainBranchName),p.records.commits.has(l.id)&&o.Rm.warn(`Commit ID ${l.id} already exists`),p.records.commits.set(l.id,l),p.records.branches.set(p.records.currBranch,l.id),o.Rm.debug("in pushCommit "+l.id)},"commit"),b=(0,o.K2)(function(t){let e=t.name;const n=t.order;if(e=s.Y2.sanitizeText(e,d()),p.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);p.records.branches.set(e,null!=p.records.head?p.records.head.id:null),p.records.branchConfig.set(e,{name:e,order:n}),k(e),o.Rm.debug("in createBranch")},"branch"),w=(0,o.K2)(t=>{let e=t.branch,n=t.id;const r=t.type,i=t.tags,a=d();e=s.Y2.sanitizeText(e,a),n&&(n=s.Y2.sanitizeText(n,a));const l=p.records.branches.get(p.records.currBranch),c=p.records.branches.get(e),u=l?p.records.commits.get(l):void 0,g=c?p.records.commits.get(c):void 0;if(u&&g&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(p.records.currBranch===e){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(void 0===u||!u){const t=new Error(`Incorrect usage of "merge". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},t}if(!p.records.branches.has(e)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},t}if(u===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(n&&p.records.commits.has(n)){const t=new Error('Incorrect usage of "merge". Commit with id:'+n+" already exists, use different custom id");throw t.hash={text:`merge ${e} ${n} ${r} ${i?.join(" ")}`,token:`merge ${e} ${n} ${r} ${i?.join(" ")}`,expected:[`merge ${e} ${n}_UNIQUE ${r} ${i?.join(" ")}`]},t}const m=c||"",y={id:n||`${p.records.seq}-${f()}`,message:`merged branch ${e} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,m],branch:p.records.currBranch,type:h.MERGE,customType:r,customId:!!n,tags:i??[]};p.records.head=y,p.records.commits.set(y.id,y),p.records.branches.set(p.records.currBranch,y.id),o.Rm.debug(p.records.branches),o.Rm.debug("in mergeBranch")},"merge"),T=(0,o.K2)(function(t){let e=t.id,n=t.targetId,r=t.tags,i=t.parent;o.Rm.debug("Entering cherryPick:",e,n,r);const a=d();if(e=s.Y2.sanitizeText(e,a),n=s.Y2.sanitizeText(n,a),r=r?.map(t=>s.Y2.sanitizeText(t,a)),i=s.Y2.sanitizeText(i,a),!e||!p.records.commits.has(e)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const l=p.records.commits.get(e);if(void 0===l||!l)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(l.parents)||!l.parents.includes(i))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const c=l.branch;if(l.type===h.MERGE&&!i){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!n||!p.records.commits.has(n)){if(c===p.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const t=p.records.branches.get(p.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const a=p.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},t}const s={id:p.records.seq+"-"+f(),message:`cherry-picked ${l?.message} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,l.id],branch:p.records.currBranch,type:h.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${l.id}${l.type===h.MERGE?`|parent:${i}`:""}`]};p.records.head=s,p.records.commits.set(s.id,s),p.records.branches.set(p.records.currBranch,s.id),o.Rm.debug(p.records.branches),o.Rm.debug("in cherryPick")}},"cherryPick"),k=(0,o.K2)(function(t){if(t=s.Y2.sanitizeText(t,d()),!p.records.branches.has(t)){const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}{p.records.currBranch=t;const e=p.records.branches.get(p.records.currBranch);p.records.head=void 0!==e&&e?p.records.commits.get(e)??null:null}},"checkout");function E(t,e,n){const r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function A(t){const e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]);let n="";t.forEach(function(t){n+=t===e?"\t*":"\t|"});const r=[n,e.id,e.seq];for(const i in p.records.branches)p.records.branches.get(i)===e.id&&r.push(i);if(o.Rm.debug(r.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){const n=p.records.commits.get(e.parents[0]);E(t,e,n),e.parents[1]&&t.push(p.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;if(e.parents[0]){const n=p.records.commits.get(e.parents[0]);E(t,e,n)}}A(t=g(t,t=>t.id))}(0,o.K2)(E,"upsert"),(0,o.K2)(A,"prettyPrintCommitHistory");var _=(0,o.K2)(function(){o.Rm.debug(p.records.commits);A([D()[0]])},"prettyPrint"),C=(0,o.K2)(function(){p.reset(),(0,s.IU)()},"clear"),S=(0,o.K2)(function(){return[...p.records.branchConfig.values()].map((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${e}`)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),R=(0,o.K2)(function(){return p.records.branches},"getBranches"),L=(0,o.K2)(function(){return p.records.commits},"getCommits"),D=(0,o.K2)(function(){const t=[...p.records.commits.values()];return t.forEach(function(t){o.Rm.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),I={commitType:h,getConfig:d,setDirection:m,setOptions:y,getOptions:v,commit:x,branch:b,merge:w,cherryPick:T,checkout:k,prettyPrint:_,clear:C,getBranchesAsObjArray:S,getBranches:R,getCommits:L,getCommitsArray:D,getCurrentBranch:(0,o.K2)(function(){return p.records.currBranch},"getCurrentBranch"),getDirection:(0,o.K2)(function(){return p.records.direction},"getDirection"),getHead:(0,o.K2)(function(){return p.records.head},"getHead"),setAccTitle:s.SV,getAccTitle:s.iN,getAccDescription:s.m7,setAccDescription:s.EI,setDiagramTitle:s.ke,getDiagramTitle:s.ab},N=(0,o.K2)((t,e)=>{(0,r.S)(t,e),t.dir&&e.setDirection(t.dir);for(const n of t.statements)M(n,e)},"populate"),M=(0,o.K2)((t,e)=>{const n={Commit:(0,o.K2)(t=>e.commit(O(t)),"Commit"),Branch:(0,o.K2)(t=>e.branch(P(t)),"Branch"),Merge:(0,o.K2)(t=>e.merge($(t)),"Merge"),Checkout:(0,o.K2)(t=>e.checkout(B(t)),"Checkout"),CherryPicking:(0,o.K2)(t=>e.cherryPick(F(t)),"CherryPicking")}[t.$type];n?n(t):o.Rm.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),O=(0,o.K2)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0}),"parseCommit"),P=(0,o.K2)(t=>({name:t.name,order:t.order??0}),"parseBranch"),$=(0,o.K2)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),B=(0,o.K2)(t=>t.branch,"parseCheckout"),F=(0,o.K2)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),z={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("gitGraph",t);o.Rm.debug(e),N(e,I)},"parse")};var K=10,q=40,U=new Map,j=new Map,Y=new Map,G=[],W=0,V="LR",H=(0,o.K2)(()=>{U.clear(),j.clear(),Y.clear(),W=0,G=[],V="LR"},"clear"),X=(0,o.K2)(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=t.trim(),e.appendChild(n)}),e},"drawText"),Z=(0,o.K2)(t=>{let e,n,r;return"BT"===V?(n=(0,o.K2)((t,e)=>t<=e,"comparisonFunc"),r=1/0):(n=(0,o.K2)((t,e)=>t>=e,"comparisonFunc"),r=0),t.forEach(t=>{const i="TB"===V||"BT"==V?j.get(t)?.y:j.get(t)?.x;void 0!==i&&n(i,r)&&(e=t,r=i)}),e},"findClosestParent"),Q=(0,o.K2)(t=>{let e="",n=1/0;return t.forEach(t=>{const r=j.get(t).y;r<=n&&(e=t,n=r)}),e||void 0},"findClosestParentBT"),J=(0,o.K2)((t,e,n)=>{let r=n,i=n;const a=[];t.forEach(t=>{const n=e.get(t);if(!n)throw new Error(`Commit not found for key ${t}`);n.parents.length?(r=et(n),i=Math.max(r,i)):a.push(n),nt(n,r)}),r=i,a.forEach(t=>{rt(t,r,n)}),t.forEach(t=>{const n=e.get(t);if(n?.parents.length){const t=Q(n.parents);r=j.get(t).y-q,r<=i&&(i=r);const e=U.get(n.branch).pos,a=r-K;j.set(n.id,{x:e,y:a})}})},"setParallelBTPos"),tt=(0,o.K2)(t=>{const e=Z(t.parents.filter(t=>null!==t));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const n=j.get(e)?.y;if(void 0===n)throw new Error(`Closest parent position not found for commit ${t.id}`);return n},"findClosestParentPos"),et=(0,o.K2)(t=>tt(t)+q,"calculateCommitPosition"),nt=(0,o.K2)((t,e)=>{const n=U.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const r=n.pos,i=e+K;return j.set(t.id,{x:r,y:i}),{x:r,y:i}},"setCommitPosition"),rt=(0,o.K2)((t,e,n)=>{const r=U.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);const i=e+n,a=r.pos;j.set(t.id,{x:a,y:i})},"setRootPosition"),it=(0,o.K2)((t,e,n,r,i,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",n.x-10).attr("y",n.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${r}-outer`),t.append("rect").attr("x",n.x-6).attr("y",n.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${r}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",n.x).attr("cy",n.y).attr("r",10).attr("class",`commit ${e.id} ${r}`),t.append("circle").attr("cx",n.x-3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${r}`),t.append("circle").attr("cx",n.x+3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${r}`),t.append("line").attr("x1",n.x+3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${r}`),t.append("line").attr("x1",n.x-3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${r}`);else{const s=t.append("circle");if(s.attr("cx",n.x),s.attr("cy",n.y),s.attr("r",e.type===h.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",n.x),a.attr("cy",n.y),a.attr("r",6),a.attr("class",`commit ${r} ${e.id} commit${i%8}`)}if(a===h.REVERSE){t.append("path").attr("d",`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr("class",`commit ${r} ${e.id} commit${i%8}`)}}},"drawCommitBullet"),at=(0,o.K2)((t,e,n,r,i)=>{if(e.type!==h.CHERRY_PICK&&(e.customId&&e.type===h.MERGE||e.type!==h.MERGE)&&i.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),o=a.append("text").attr("x",r).attr("y",n.y+25).attr("class","commit-label").text(e.id),l=o.node()?.getBBox();if(l&&(s.attr("x",n.posWithOffset-l.width/2-2).attr("y",n.y+13.5).attr("width",l.width+4).attr("height",l.height+4),"TB"===V||"BT"===V?(s.attr("x",n.x-(l.width+16+5)).attr("y",n.y-12),o.attr("x",n.x-(l.width+16)).attr("y",n.y+l.height-12)):o.attr("x",n.posWithOffset-l.width/2),i.rotateCommitLabel))if("TB"===V||"BT"===V)o.attr("transform","rotate(-45, "+n.x+", "+n.y+")"),s.attr("transform","rotate(-45, "+n.x+", "+n.y+")");else{const t=-7.5-(l.width+10)/25*9.5,e=10+l.width/25*8.5;a.attr("transform","translate("+t+", "+e+") rotate(-45, "+r+", "+n.y+")")}}},"drawCommitLabel"),st=(0,o.K2)((t,e,n,r)=>{if(e.tags.length>0){let i=0,a=0,s=0;const o=[];for(const r of e.tags.reverse()){const e=t.insert("polygon"),l=t.append("circle"),c=t.append("text").attr("y",n.y-16-i).attr("class","tag-label").text(r),h=c.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),c.attr("x",n.posWithOffset-h.width/2),o.push({tag:c,hole:l,rect:e,yOffset:i}),i+=20}for(const{tag:t,hole:e,rect:l,yOffset:c}of o){const i=s/2,o=n.y-19.2-c;if(l.attr("class","tag-label-bkg").attr("points",`\n ${r-a/2-2},${o+2} \n ${r-a/2-2},${o-2}\n ${n.posWithOffset-a/2-4},${o-i-2}\n ${n.posWithOffset+a/2+4},${o-i-2}\n ${n.posWithOffset+a/2+4},${o+i+2}\n ${n.posWithOffset-a/2-4},${o+i+2}`),e.attr("cy",o).attr("cx",r-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===V||"BT"===V){const s=r+c;l.attr("class","tag-label-bkg").attr("points",`\n ${n.x},${s+2}\n ${n.x},${s-2}\n ${n.x+K},${s-i-2}\n ${n.x+K+a+4},${s-i-2}\n ${n.x+K+a+4},${s+i+2}\n ${n.x+K},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+n.x+","+r+")"),e.attr("cx",n.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+n.x+","+r+")"),t.attr("x",n.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+n.x+","+r+")")}}}},"drawCommitTags"),ot=(0,o.K2)(t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),lt=(0,o.K2)((t,e,n,r)=>{const i={x:0,y:0};if(!(t.parents.length>0)){if("TB"===e)return 30;if("BT"===e){return(r.get(t.id)??i).y-q}return 0}{const n=Z(t.parents);if(n){const a=r.get(n)??i;if("TB"===e)return a.y+q;if("BT"===e){return(r.get(t.id)??i).y-q}return a.x+q}}return 0},"calculatePosition"),ct=(0,o.K2)((t,e,n)=>{const r="BT"===V&&n?e:e+K,i="TB"===V||"BT"===V?r:U.get(t.branch)?.pos,a="TB"===V||"BT"===V?U.get(t.branch)?.pos:r;if(void 0===a||void 0===i)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:r}},"getCommitPosition"),ht=(0,o.K2)((t,e,n,r)=>{const i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===V||"BT"===V?30:0;const l=[...e.keys()],c=r.parallelCommits??!1,h=(0,o.K2)((t,n)=>{const r=e.get(t)?.seq,i=e.get(n)?.seq;return void 0!==r&&void 0!==i?r-i:0},"sortKeys");let u=l.sort(h);"BT"===V&&(c&&J(u,e,s),u=u.reverse()),u.forEach(t=>{const o=e.get(t);if(!o)throw new Error(`Commit not found for key ${t}`);c&&(s=lt(o,V,s,j));const l=ct(o,s,c);if(n){const t=ot(o),e=o.customType??o.type,n=U.get(o.branch)?.index??0;it(i,o,l,t,n,e),at(a,o,l,s,r),st(a,o,l,s)}"TB"===V||"BT"===V?j.set(o.id,{x:l.x,y:l.posWithOffset}):j.set(o.id,{x:l.posWithOffset,y:l.y}),s="BT"===V&&c?s+q:s+q+K,s>W&&(W=s)})},"drawCommits"),ut=(0,o.K2)((t,e,n,r,i)=>{const a=("TB"===V||"BT"===V?n.x<r.x:n.y<r.y)?e.branch:t.branch,s=(0,o.K2)(t=>t.branch===a,"isOnBranchToGetCurve"),l=(0,o.K2)(n=>n.seq>t.seq&&n.seq<e.seq,"isBetweenCommits");return[...i.values()].some(t=>l(t)&&s(t))},"shouldRerouteArrow"),dt=(0,o.K2)((t,e,n=0)=>{const r=t+Math.abs(t-e)/2;if(n>5)return r;if(G.every(t=>Math.abs(t-r)>=10))return G.push(r),r;const i=Math.abs(t-e);return dt(t,e-i/5,n+1)},"findLane"),pt=(0,o.K2)((t,e,n,r)=>{const i=j.get(e.id),a=j.get(n.id);if(void 0===i||void 0===a)throw new Error(`Commit positions not found for commits ${e.id} and ${n.id}`);const s=ut(e,n,i,a,r);let o,l="",c="",u=0,d=0,p=U.get(n.branch)?.index;if(n.type===h.MERGE&&e.id!==n.parents[0]&&(p=U.get(e.branch)?.index),s){l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",u=10,d=10;const t=i.y<a.y?dt(i.y,a.y):dt(a.y,i.y),n=i.x<a.x?dt(i.x,a.x):dt(a.x,i.x);"TB"===V?i.x<a.x?o=`M ${i.x} ${i.y} L ${n-u} ${i.y} ${c} ${n} ${i.y+d} L ${n} ${a.y-u} ${l} ${n+d} ${a.y} L ${a.x} ${a.y}`:(p=U.get(e.branch)?.index,o=`M ${i.x} ${i.y} L ${n+u} ${i.y} ${l} ${n} ${i.y+d} L ${n} ${a.y-u} ${c} ${n-d} ${a.y} L ${a.x} ${a.y}`):"BT"===V?i.x<a.x?o=`M ${i.x} ${i.y} L ${n-u} ${i.y} ${l} ${n} ${i.y-d} L ${n} ${a.y+u} ${c} ${n+d} ${a.y} L ${a.x} ${a.y}`:(p=U.get(e.branch)?.index,o=`M ${i.x} ${i.y} L ${n+u} ${i.y} ${c} ${n} ${i.y-d} L ${n} ${a.y+u} ${l} ${n-d} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?o=`M ${i.x} ${i.y} L ${i.x} ${t-u} ${l} ${i.x+d} ${t} L ${a.x-u} ${t} ${c} ${a.x} ${t+d} L ${a.x} ${a.y}`:(p=U.get(e.branch)?.index,o=`M ${i.x} ${i.y} L ${i.x} ${t+u} ${c} ${i.x+d} ${t} L ${a.x-u} ${t} ${l} ${a.x} ${t-d} L ${a.x} ${a.y}`)}else l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,"TB"===V?(i.x<a.x&&(o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x+d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${c} ${a.x} ${i.y+d} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${c} ${i.x-d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${l} ${a.x} ${i.y+d} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):"BT"===V?(i.x<a.x&&(o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${c} ${i.x+d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y-d} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x-d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${c} ${a.x} ${i.y-d} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${c} ${a.x} ${i.y+d} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x+d} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(o=n.type===h.MERGE&&e.id!==n.parents[0]?`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y-d} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${c} ${i.x+d} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(void 0===o)throw new Error("Line definition not found");t.append("path").attr("d",o).attr("class","arrow arrow"+p%8)},"drawArrow"),ft=(0,o.K2)((t,e)=>{const n=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(t=>{const r=e.get(t);r.parents&&r.parents.length>0&&r.parents.forEach(t=>{pt(n,e.get(t),r,e)})})},"drawArrows"),gt=(0,o.K2)((t,e,n)=>{const r=t.append("g");e.forEach((t,e)=>{const i=e%8,a=U.get(t.name)?.pos;if(void 0===a)throw new Error(`Position not found for branch ${t.name}`);const s=r.append("line");s.attr("x1",0),s.attr("y1",a),s.attr("x2",W),s.attr("y2",a),s.attr("class","branch branch"+i),"TB"===V?(s.attr("y1",30),s.attr("x1",a),s.attr("y2",W),s.attr("x2",a)):"BT"===V&&(s.attr("y1",W),s.attr("x1",a),s.attr("y2",30),s.attr("x2",a)),G.push(a);const o=t.name,l=X(o),c=r.insert("rect"),h=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);h.node().appendChild(l);const u=l.getBBox();c.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-u.width-4-(!0===n.rotateCommitLabel?30:0)).attr("y",-u.height/2+8).attr("width",u.width+18).attr("height",u.height+4),h.attr("transform","translate("+(-u.width-14-(!0===n.rotateCommitLabel?30:0))+", "+(a-u.height/2-1)+")"),"TB"===V?(c.attr("x",a-u.width/2-10).attr("y",0),h.attr("transform","translate("+(a-u.width/2-5)+", 0)")):"BT"===V?(c.attr("x",a-u.width/2-10).attr("y",W),h.attr("transform","translate("+(a-u.width/2-5)+", "+W+")")):c.attr("transform","translate(-19, "+(a-u.height/2)+")")})},"drawBranches"),mt=(0,o.K2)(function(t,e,n,r,i){return U.set(t,{pos:e,index:n}),e+=50+(i?40:0)+("TB"===V||"BT"===V?r.width/2:0)},"setBranchPosition");var yt={parser:z,db:I,renderer:{draw:(0,o.K2)(function(t,e,n,r){H(),o.Rm.debug("in gitgraph renderer",t+"\n","id:",e,n);const i=r.db;if(!i.getConfig)return void o.Rm.error("getConfig method is not available on db");const l=i.getConfig(),h=l.rotateCommitLabel??!1;Y=i.getCommits();const u=i.getBranchesAsObjArray();V=i.getDirection();const d=(0,c.Ltv)(`[id="${e}"]`);let p=0;u.forEach((t,e)=>{const n=X(t.name),r=d.append("g"),i=r.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label");a.node()?.appendChild(n);const s=n.getBBox();p=mt(t.name,p,e,s,h),a.remove(),i.remove(),r.remove()}),ht(d,Y,!1,l),l.showBranches&&gt(d,u,l),ft(d,Y),ht(d,Y,!0,l),a._K.insertTitle(d,"gitTitleText",l.titleTopMargin??0,i.getDiagramTitle()),(0,s.mj)(void 0,d,l.diagramPadding,l.useMaxWidth)},"draw")},styles:(0,o.K2)(t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map(e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,"getStyles")}},7999(t,e,n){"use strict";n.d(e,{diagram:()=>l});var r=n(1475),i=n(4098),a=n(797),s=n(8731),o={version:"11.13.0"},l={parser:{parse:(0,a.K2)(async t=>{const e=await(0,s.qg)("info",t);a.Rm.debug(e)},"parse")},db:{getVersion:(0,a.K2)(()=>o.version,"getVersion")},renderer:{draw:(0,a.K2)((t,e,n)=>{a.Rm.debug("rendering info diagram\n"+t);const s=(0,r.D)(e);(0,i.a$)(s,100,400,!0);s.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw")}}},878(t,e,n){"use strict";n.d(e,{diagram:()=>L});var r=n(1475),i=n(796),a=n(4098),s=n(797),o=n(2274),l=function(){var t=(0,s.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,4],n=[1,14],r=[1,12],i=[1,13],a=[6,7,8],o=[1,20],l=[1,18],c=[1,19],h=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],f=[1,6,7,11,13,14],g={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:(0,s.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[o-1].length,a[o].trim());break;case 16:r.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:r,14:i},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:n,12:15,13:r,14:i},{6:n,9:16,12:11,13:r,14:i},{6:o,7:l,10:17,11:c},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:o,7:l,10:22,11:c},{1:[2,7],6:n,12:15,13:r,14:i},t(u,[2,14],{7:d,11:p}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(h,[2,15]),t(u,[2,13],{7:d,11:p}),t(f,[2,11]),t(f,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},m=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,r){switch(n){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function y(){this.yy={}}return g.lexer=m,(0,s.K2)(y,"Parser"),y.prototype=g,g.Parser=y,new y}();l.parser=l;var c=l,h=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,s.K2)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){const n=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root)return this.baseLevel=t,this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void(0,a.ke)(n);let r=t-(this.baseLevel??0);for(r<=0&&(r=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=r;)this.stack.pop();const i={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(i),this.stack.push({level:r,node:i})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},u=250,d=82*Math.PI/180,p=Math.cos(d),f=Math.sin(d),g=(0,s.K2)((t,e,n)=>{const r=t.node().getBBox(),i=r.width+2*e,s=r.height+2*e;(0,a.a$)(t,s,i,n),t.attr("viewBox",`${r.x-e} ${r.y-e} ${i} ${s}`)},"applyPaddedViewBox"),m=(0,s.K2)((t,e,n,s)=>{const l=s.db.getRoot();if(!l)return;const c=(0,a.D7)(),{look:h,handDrawnSeed:d,themeVariables:p}=c,f=(0,i.I5)(c.fontSize)[0]??14,m="handDrawn"===h,x=l.children??[],b=c.ishikawa?.diagramPadding??20,w=c.ishikawa?.useMaxWidth??!1,k=(0,r.D)(e),E=k.append("g").attr("class","ishikawa"),A=m?o.A.svg(k.node()):void 0,_=A?{roughSvg:A,seed:d??0,lineColor:p?.lineColor??"#333",fillColor:p?.mainBkg??"#fff"}:void 0,S=`ishikawa-arrow-${e}`;m||E.append("defs").append("marker").attr("id",S).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let R=0,L=u;const D=m?void 0:C(E,R,L,R,L,"ishikawa-spine");if(v(E,R,L,l.text,f,_),!x.length)return m&&C(E,R,L,R,L,"ishikawa-spine",_),void g(k,b,w);R-=20;const I=x.filter((t,e)=>e%2==0),N=x.filter((t,e)=>e%2==1),M=y(I),O=y(N),P=M.total+O.total;let $=u,B=u;if(P>0){const t=500,e=75;$=Math.max(e,t*(M.total/P)),B=Math.max(e,t*(O.total/P))}const F=2*f;$=Math.max($,M.max*F),B=Math.max(B,O.max*F),L=Math.max($,u),D&&D.attr("y1",L).attr("y2",L),E.select(".ishikawa-head-group").attr("transform",`translate(0,${L})`);const z=Math.ceil(x.length/2);for(let r=0;r<z;r++){const t=E.append("g").attr("class","ishikawa-pair");for(const[e,n,i]of[[x[2*r],-1,$],[x[2*r+1],1,B]])e&&T(t,e,R,L,n,i,f,_);R=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(m)C(E,R,L,0,L,"ishikawa-spine",_);else{D.attr("x1",R);const t=`url(#${S})`;E.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}g(k,b,w)},"draw"),y=(0,s.K2)(t=>{const e=(0,s.K2)(t=>t.children.reduce((t,n)=>t+1+e(n),0),"countDescendants");return t.reduce((t,n)=>{const r=e(n);return t.total+=r,t.max=Math.max(t.max,r),t},{total:0,max:0})},"sideStats"),v=(0,s.K2)((t,e,n,r,i,a)=>{const s=Math.max(6,Math.floor(110/(.6*i))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${n})`),l=A(o,E(r,s),0,0,"ishikawa-head-label","start",i),c=l.node().getBBox(),h=Math.max(60,c.width+6),u=Math.max(40,2*c.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*h} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);l.attr("transform",`translate(${(h-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),x=(0,s.K2)((t,e)=>{const n=[],r=[],i=(0,s.K2)((t,a,s)=>{const o=-1===e?[...t].reverse():t;for(const e of o){const t=n.length,o=e.children??[];n.push({depth:s,text:E(e.text,15),parentIndex:a,childCount:o.length}),s%2==0?(r.push(t),o.length&&i(o,t,s+1)):(o.length&&i(o,t,s+1),r.push(t))}},"walk");return i(t,-1,2),{entries:n,yOrder:r}},"flattenTree"),b=(0,s.K2)((t,e,n,r,i,a,s)=>{const o=t.append("g").attr("class","ishikawa-label-group"),l=A(o,e,n,r+11*i,"ishikawa-label cause","middle",a).node().getBBox();if(s){const t=s.roughSvg.rectangle(l.x-20,l.y-2,l.width+40,l.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",l.x-20).attr("y",l.y-2).attr("width",l.width+40).attr("height",l.height+4)},"drawCauseLabel"),w=(0,s.K2)((t,e,n,r,i,a)=>{const s=Math.sqrt(r*r+i*i);if(0===s)return;const o=r/s,l=i/s,c=6*-l,h=6*o,u=`M ${e} ${n} L ${e-6*o*2+c} ${n-6*l*2+h} L ${e-6*o*2-c} ${n-6*l*2-h} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),T=(0,s.K2)((t,e,n,r,i,a,s,o)=>{const l=e.children??[],c=a*(l.length?1:.2),h=f*c*i,u=n+-p*c,d=r+h;if(C(t,n,r,u,d,"ishikawa-branch",o),o&&w(t,n,r,n-u,r-d,o),b(t,e.text,u,d,i,s,o),!l.length)return;const{entries:g,yOrder:m}=x(l,i),y=g.length,v=new Array(y);for(const[p,f]of m.entries())v[f]=r+h*((p+1)/(y+1));const T=new Map;T.set(-1,{x0:n,y0:r,x1:u,y1:d,childCount:l.length,childrenDrawn:0});const k=-p,E=f*i,S=i<0?"ishikawa-label up":"ishikawa-label down";for(const[p,f]of g.entries()){const e=v[p],n=T.get(f.parentIndex),r=t.append("g").attr("class","ishikawa-sub-group");let i=0,a=0,l=0;if(f.depth%2==0){const t=n.y1-n.y0;i=_(n.x0,n.x1,t?(e-n.y0)/t:.5),a=e,l=i-(f.childCount>0?60+5*f.childCount:30),C(r,i,e,l,e,"ishikawa-sub-branch",o),o&&w(r,i,e,1,0,o),A(r,f.text,l,e,"ishikawa-label align","end",s)}else{const t=n.childrenDrawn++;i=_(n.x0,n.x1,(n.childCount-t)/(n.childCount+1)),a=n.y0,l=i+k*((e-a)/E),C(r,i,a,l,e,"ishikawa-sub-branch",o),o&&w(r,i,a,i-l,a-e,o),A(r,f.text,l,e,S,"end",s)}f.childCount>0&&T.set(p,{x0:i,y0:a,x1:l,y1:e,childCount:f.childCount,childrenDrawn:0})}},"drawBranch"),k=(0,s.K2)(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),E=(0,s.K2)((t,e)=>{if(t.length<=e)return t;const n=[];for(const r of t.split(/\s+/)){const t=n.length-1;t>=0&&n[t].length+1+r.length<=e?n[t]+=" "+r:n.push(r)}return n.join("\n")},"wrapText"),A=(0,s.K2)((t,e,n,r,i,a,s)=>{const o=k(e),l=1.05*s,c=t.append("text").attr("class",i).attr("text-anchor",a).attr("x",n).attr("y",r-(o.length-1)*l/2);for(const[h,u]of o.entries())c.append("tspan").attr("x",n).attr("dy",0===h?0:l).text(u);return c},"drawMultilineText"),_=(0,s.K2)((t,e,n)=>t+(e-t)*n,"lerp"),C=(0,s.K2)((t,e,n,r,i,a,s)=>{if(s){const o=s.roughSvg.line(e,n,r,i,{roughness:1.5,seed:s.seed,stroke:s.lineColor,strokeWidth:2});return void t.append(()=>o).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",n).attr("x2",r).attr("y2",i)},"drawLine"),S={draw:m},R=(0,s.K2)(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),L={parser:c,get db(){return new h},renderer:S,styles:R}},8894(t,e,n){"use strict";n.d(e,{diagram:()=>V});var r=n(2501),i=n(5523),a=n(4098),s=n(797),o=n(1444),l=function(){var t=(0,s.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],r=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,14],c={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:r.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:i,16:a,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:r,14:i,16:a,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,r){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],d=[],p=[],f=(0,s.K2)(function(){u.length=0,d.length=0,h="",p.length=0,(0,a.IU)()},"clear"),g=(0,s.K2)(function(t){h=t,u.push(t)},"addSection"),m=(0,s.K2)(function(){return u},"getSections"),y=(0,s.K2)(function(){let t=w();let e=0;for(;!t&&e<100;)t=w(),e++;return d.push(...p),d},"getTasks"),v=(0,s.K2)(function(){const t=[];d.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),x=(0,s.K2)(function(t,e){const n=e.substr(1).split(":");let r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));const a=i.map(t=>t.trim()),s={section:h,type:h,people:a,task:t,score:r};p.push(s)},"addTask"),b=(0,s.K2)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};d.push(e)},"addTaskOrg"),w=(0,s.K2)(function(){const t=(0,s.K2)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[n,r]of p.entries())t(n),e=e&&r.processed;return e},"compileTasks"),T=(0,s.K2)(function(){return v()},"getActors"),k={getConfig:(0,s.K2)(()=>(0,a.D7)().journey,"getConfig"),clear:f,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAccTitle:a.SV,getAccTitle:a.iN,setAccDescription:a.EI,getAccDescription:a.m7,addSection:g,getSections:m,getTasks:y,addTask:x,addTaskOrg:b,getActors:T},E=(0,s.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n ${(0,r.o)()}\n`,"getStyles"),A=(0,s.K2)(function(t,e){return(0,i.tk)(t,e)},"drawRect"),_=(0,s.K2)(function(t,e){const n=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const r=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const r=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(a,"smile"),(0,s.K2)(l,"sad"),(0,s.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?l(i):c(i),r},"drawFace"),C=(0,s.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),S=(0,s.K2)(function(t,e){return(0,i.m)(t,e)},"drawText"),R=(0,s.K2)(function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}(0,s.K2)(n,"genPoints");const r=t.append("polygon");r.attr("points",n(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S(t,e)},"drawLabel"),L=(0,s.K2)(function(t,e,n){const r=t.append("g"),a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),a.height=n.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,A(r,a),M(n)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),D=-1,I=(0,s.K2)(function(t,e,n){const r=e.x+n.width/2,a=t.append("g");D++;a.append("line").attr("id","task"+D).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),_(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const s=(0,i.PB)();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,A(a,s);let o=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,r={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};C(a,r),o+=10}),M(n)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},"drawTask"),N=(0,s.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),M=function(){function t(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const t=p*h-h*(d.length-1)/2,l=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+a/2).attr("dy",t).text(d[p]),l.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,o)}}function n(t,n,i,a,s,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,s,o,l,c),r(u,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return(0,s.K2)(t,"byText"),(0,s.K2)(e,"byTspan"),(0,s.K2)(n,"byFo"),(0,s.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),O={drawRect:A,drawCircle:C,drawSection:L,drawText:S,drawLabel:R,drawTask:I,drawBackgroundRect:N,initGraphics:(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},P=(0,s.K2)(function(t){Object.keys(t).forEach(function(e){z[e]=t[e]})},"setConf"),$={},B=0;function F(t){const e=(0,a.D7)().journey,n=e.maxLabelWidth;B=0;let r=60;Object.keys($).forEach(i=>{const a=$[i].color,s={cx:20,cy:r,r:7,fill:a,stroke:"#000",pos:$[i].position};O.drawCircle(t,s);let o=t.append("text").attr("visibility","hidden").text(i);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[i];else{const e=i.split(" ");let r="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=r?`${r} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(r&&c.push(r),r=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const r of t)e+=r,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=r);r=e}}else r=e}),r&&c.push(r),o.remove()}c.forEach((n,i)=>{const a={x:40,y:r+7+20*i,fill:"#666",text:n,textMargin:e.boxTextMargin??5},s=O.drawText(t,a).node().getBoundingClientRect().width;s>B&&s>e.leftMargin-s&&(B=s)}),r+=Math.max(20,20*c.length)})}(0,s.K2)(F,"drawActorLegend");var z=(0,a.D7)().journey,K=0,q=(0,s.K2)(function(t,e,n,r){const i=(0,a.D7)(),s=i.journey.titleColor,l=i.journey.titleFontSize,c=i.journey.titleFontFamily,h=i.securityLevel;let u;"sandbox"===h&&(u=(0,o.Ltv)("#i"+e));const d="sandbox"===h?(0,o.Ltv)(u.nodes()[0].contentDocument.body):(0,o.Ltv)("body");U.init();const p=d.select("#"+e);O.initGraphics(p);const f=r.db.getTasks(),g=r.db.getDiagramTitle(),m=r.db.getActors();for(const a in $)delete $[a];let y=0;m.forEach(t=>{$[t]={color:z.actorColours[y%z.actorColours.length],position:y},y++}),F(p),K=z.leftMargin+B,U.insert(0,0,K,50*Object.keys($).length),G(p,f,0);const v=U.getBounds();g&&p.append("text").text(g).attr("x",K).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",s).attr("font-family",c);const x=v.stopy-v.starty+2*z.diagramMarginY,b=K+v.stopx+2*z.diagramMarginX;(0,a.a$)(p,x,b,z.useMaxWidth),p.append("line").attr("x1",K).attr("y1",4*z.height).attr("x2",b-K-4).attr("y2",4*z.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const w=g?70:0;p.attr("viewBox",`${v.startx} -25 ${b} ${x+w}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",x+w+25)},"draw"),U={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K2)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,s.K2)(function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},"updateVal"),updateBounds:(0,s.K2)(function(t,e,n,r){const i=(0,a.D7)().journey,o=this;let l=0;function c(a){return(0,s.K2)(function(s){l++;const c=o.sequenceItems.length-l+1;o.updateVal(s,"starty",e-c*i.boxMargin,Math.min),o.updateVal(s,"stopy",r+c*i.boxMargin,Math.max),o.updateVal(U.data,"startx",t-c*i.boxMargin,Math.min),o.updateVal(U.data,"stopx",n+c*i.boxMargin,Math.max),"activation"!==a&&(o.updateVal(s,"startx",t-c*i.boxMargin,Math.min),o.updateVal(s,"stopx",n+c*i.boxMargin,Math.max),o.updateVal(U.data,"starty",e-c*i.boxMargin,Math.min),o.updateVal(U.data,"stopy",r+c*i.boxMargin,Math.max))},"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,s.K2)(function(t,e,n,r){const i=Math.min(t,n),a=Math.max(t,n),s=Math.min(e,r),o=Math.max(e,r);this.updateVal(U.data,"startx",i,Math.min),this.updateVal(U.data,"starty",s,Math.min),this.updateVal(U.data,"stopx",a,Math.max),this.updateVal(U.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:(0,s.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,s.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,s.K2)(function(){return this.data},"getBounds")},j=z.sectionFills,Y=z.sectionColours,G=(0,s.K2)(function(t,e,n){const r=(0,a.D7)().journey;let i="";const s=n+(2*r.height+r.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[a,u]of e.entries()){if(i!==u.section){l=j[o%j.length],h=o%j.length,c=Y[o%Y.length];let n=0;const s=u.section;for(let t=a;t<e.length&&e[t].section==s;t++)n+=1;const d={x:a*r.taskMargin+a*r.width+K,y:50,text:u.section,fill:l,num:h,colour:c,taskCount:n};O.drawSection(t,d,r),i=u.section,o++}const n=u.people.reduce((t,e)=>($[e]&&(t[e]=$[e]),t),{});u.x=a*r.taskMargin+a*r.width+K,u.y=s,u.width=r.diagramMarginX,u.height=r.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=n,O.drawTask(t,u,r),U.insert(u.x,u.y,u.x+u.width+r.taskMargin,450)}},"drawTasks"),W={setConf:P,draw:q},V={parser:c,db:k,renderer:W,styles:E,init:(0,s.K2)(t=>{W.setConf(t.journey),k.clear()},"init")}},716(t,e,n){"use strict";n.d(e,{diagram:()=>C});var r=n(1475),i=n(2501),a=n(3283),s=n(1174),o=(n(7879),n(1960),n(6779),n(796),n(4098)),l=n(797),c=n(5097),h=n(8041),u=n(5263),d=function(){var t=(0,l.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],b=[1,38],w={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[o-1].id),r.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:r.getLogger().info("Node: ",a[o].id),r.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:r.getLogger().trace("Icon: ",a[o]),r.decorateNode({icon:a[o]});break;case 18:case 23:r.decorateNode({class:a[o]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",a[o-1].id),r.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:r.getLogger().trace("Node: ",a[o].id),r.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:r.decorateNode({icon:a[o]});break;case 27:r.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:r.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:n,9:22,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(p,[2,19]),t(p,[2,21],{15:30,24:f}),t(p,[2,22]),t(p,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:f}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},T=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,n,r){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function k(){this.yy={}}return w.lexer=T,(0,l.K2)(k,"Parser"),k.prototype=w,w.Parser=k,new k}();d.parser=d;var p=d,f=[],g=[],m=0,y={},v=(0,l.K2)(()=>{f=[],g=[],m=0,y={}},"clear"),x=(0,l.K2)(t=>{if(0===f.length)return null;const e=f[0].level;let n=null;for(let r=f.length-1;r>=0;r--)if(f[r].level!==e||n||(n=f[r]),f[r].level<e)throw new Error('Items without section detected, found section ("'+f[r].label+'")');return t===n?.level?null:n},"getSection"),b=(0,l.K2)(function(){return g},"getSections"),w=(0,l.K2)(function(){const t=[],e=b(),n=(0,o.D7)();for(const r of e){const e={id:r.id,label:(0,o.jZ)(r.label??"",n),labelType:"markdown",isGroup:!0,ticket:r.ticket,shape:"kanbanSection",level:r.level,look:n.look};t.push(e);const i=f.filter(t=>t.parentId===r.id);for(const a of i){const e={id:a.id,parentId:r.id,label:(0,o.jZ)(a.label??"",n),labelType:"markdown",isGroup:!1,ticket:a?.ticket,priority:a?.priority,assigned:a?.assigned,icon:a?.icon,shape:"kanbanItem",level:a.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,o.D7)()}},"getData"),T=(0,l.K2)((t,e,n,r,i)=>{const s=(0,o.D7)();let l=s.mindmap?.padding??o.UI.mindmap.padding;switch(r){case k.ROUNDED_RECT:case k.RECT:case k.HEXAGON:l*=2}const c={id:(0,o.jZ)(e,s)||"kbn"+m++,level:t,label:(0,o.jZ)(n,s),width:s.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}";const e=(0,a.H)(t,{schema:a.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}const h=x(t);h?c.parentId=h.id||"kbn"+m++:g.push(c),f.push(c)},"addNode"),k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},E={clear:v,addNode:T,getSections:b,getData:w,nodeType:k,getType:(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return k.RECT;case"(":return")"===e?k.ROUNDED_RECT:k.CLOUD;case"((":return k.CIRCLE;case")":return k.CLOUD;case"))":return k.BANG;case"{{":return k.HEXAGON;default:return k.DEFAULT}},"getType"),setElementForId:(0,l.K2)((t,e)=>{y[t]=e},"setElementForId"),decorateNode:(0,l.K2)(t=>{if(!t)return;const e=(0,o.D7)(),n=f[f.length-1];t.icon&&(n.icon=(0,o.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,o.jZ)(t.class,e))},"decorateNode"),type2Str:(0,l.K2)(t=>{switch(t){case k.DEFAULT:return"no-border";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded-rect";case k.CIRCLE:return"circle";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,l.K2)(()=>l.Rm,"getLogger"),getElementById:(0,l.K2)(t=>y[t],"getElementById")},A={draw:(0,l.K2)(async(t,e,n,i)=>{l.Rm.debug("Rendering kanban diagram\n"+t);const a=i.db.getData(),c=(0,o.D7)();c.htmlLabels=!1;const h=(0,r.D)(e),u=h.append("g");u.attr("class","sections");const d=h.append("g");d.attr("class","items");const p=a.nodes.filter(t=>t.isGroup);let f=0;const g=[];let m=25;for(const r of p){const t=c?.kanban?.sectionWidth||200;f+=1,r.x=t*f+10*(f-1)/2,r.width=t,r.y=0,r.height=3*t,r.rx=5,r.ry=5,r.cssClasses=r.cssClasses+" section-"+f;const e=await(0,s.U)(u,r);m=Math.max(m,e?.labelBBox?.height),g.push(e)}let y=0;for(const r of p){const t=g[y];y+=1;const e=c?.kanban?.sectionWidth||200,n=3*-e/2+m;let i=n;const o=a.nodes.filter(t=>t.parentId===r.id);for(const a of o){if(a.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");a.x=r.x,a.width=e-15;const t=(await(0,s.on)(d,a,{config:c})).node().getBBox();a.y=i+t.height/2,await(0,s.U_)(a),i=a.y+t.height/2+5}const l=t.cluster.select("rect"),h=Math.max(i-n+30,50)+(m-25);l.attr("height",h)}(0,o.ot)(void 0,h,c.mindmap?.padding??o.UI.kanban.padding,c.mindmap?.useMaxWidth??o.UI.kanban.useMaxWidth)},"draw")},_=(0,l.K2)(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],(0,c.A)(t["lineColor"+r])?t["lineColor"+r]=(0,h.A)(t["lineColor"+r],20):t["lineColor"+r]=(0,u.A)(t["lineColor"+r],20);const n=(0,l.K2)((e,n)=>t.darkMode?(0,u.A)(e,n):(0,h.A)(e,n),"adjuster");for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const i=""+(17-3*r);e+=`\n .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {\n fill: ${n(t["cScale"+r],10)};\n stroke: ${n(t["cScale"+r],10)};\n\n }\n .section-${r-1} text {\n fill: ${t["cScaleLabel"+r]};\n }\n .node-icon-${r-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+r]};\n }\n .section-edge-${r-1}{\n stroke: ${t["cScale"+r]};\n }\n .edge-depth-${r-1}{\n stroke-width: ${i};\n }\n .section-${r-1} line {\n stroke: ${t["cScaleInv"+r]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n text-decoration: underline;\n }\n `}return e},"genSections"),C={db:E,renderer:A,parser:p,styles:(0,l.K2)(t=>`\n .edge {\n stroke-width: 3;\n }\n ${_(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles")}},7969(t,e,n){"use strict";n.d(e,{diagram:()=>E});var r=n(9625),i=n(2627),a=n(9856),s=(n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796),n(4098)),o=n(797);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let c;const h=new Uint8Array(16);const u=[];for(let A=0;A<256;++A)u.push((A+256).toString(16).slice(1));function d(t,e=0){return(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase()}const p=function(t,e,n){if(l.randomUUID&&!e&&!t)return l.randomUUID();const r=(t=t||{}).random??t.rng?.()??function(){if(!c){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(h)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=r[t];return e}return d(r)};var f=n(5097),g=n(8041),m=n(5263),y=function(){var t=(0,o.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,o.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[o].id),r.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:r.getLogger().trace("Icon: ",a[o]),r.decorateNode({icon:a[o]});break;case 17:case 21:r.decorateNode({class:a[o]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",a[o].id),r.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:r.decorateNode({icon:a[o]});break;case 25:r.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:r.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:r.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(f,[2,14],{7:g,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(f,[2,13],{7:g,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},x=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,n,r){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function b(){this.yy={}}return v.lexer=x,(0,o.K2)(b,"Parser"),b.prototype=v,v.Parser=b,new b}();y.parser=y;var v=y,x={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},b=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=x,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,o.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,n,r){o.Rm.info("addNode",t,e,n,r);let i=!1;0===this.nodes.length?(this.baseLevel=t,t=0,i=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,i=!1);const a=(0,s.D7)();let l=a.mindmap?.padding??s.UI.mindmap.padding;switch(r){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:l*=2}const c={id:this.count++,nodeId:(0,s.jZ)(e,a),level:t,descr:(0,s.jZ)(n,a),type:r,children:[],width:a.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:l,isRoot:i},h=this.getParent(t);if(h)h.children.push(c),this.nodes.push(c);else{if(!i)throw new Error(`There can be only one root. No parent could be found for ("${c.descr}")`);this.nodes.push(c)}}getType(t,e){switch(o.Rm.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,s.D7)(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=(0,s.jZ)(t.icon,e)),t.class&&(n.class=(0,s.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[n,r]of t.children.entries()){const i=0===t.level?n%11:e;this.assignSections(r,i)}}flattenNodes(t,e){const n=["mindmap-node"];!0===t.isRoot?n.push("section-root","section--1"):void 0!==t.section&&n.push(`section-${t.section}`),t.class&&n.push(t.class);const r=n.join(" "),i=(0,o.K2)(t=>{switch(t){case x.CIRCLE:return"mindmapCircle";case x.RECT:return"rect";case x.ROUNDED_RECT:return"rounded";case x.CLOUD:return"cloud";case x.BANG:return"bang";case x.HEXAGON:return"hexagon";case x.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:i(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:r,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(const s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(const n of t.children){let r="edge";void 0!==n.section&&(r+=` section-edge-${n.section}`);r+=` edge-depth-${t.level+1}`;const i={id:`edge_${t.id}_${n.id}`,start:t.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:r,depth:t.level,section:n.section};e.push(i),this.generateEdges(n,e)}}getData(){const t=this.getMindmap(),e=(0,s.D7)(),n=e;if(void 0!==(0,s.TM)().layout||(n.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:n};o.Rm.debug("getData: mindmapRoot",t,e),this.assignSections(t);const r=[],i=[];this.flattenNodes(t,r),this.generateEdges(t,i),o.Rm.debug(`getData: processed ${r.length} nodes and ${i.length} edges`);const a=new Map;for(const s of r)a.set(s.id,{shape:s.shape,width:s.width,height:s.height,padding:s.padding});return{nodes:r,edges:i,config:n,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+p()}}getLogger(){return o.Rm}},w={draw:(0,o.K2)(async(t,e,n,l)=>{o.Rm.debug("Rendering mindmap diagram\n"+t);const c=l.db,h=c.getData(),u=(0,r.A)(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=(0,a.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;c.getMindmap()&&(h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await(0,a.XX)(h,u),(0,i.P)(u,h.config.mindmap?.padding??s.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??s.UI.mindmap.useMaxWidth))},"draw")},T=(0,o.K2)(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],(0,f.A)(t["lineColor"+n])?t["lineColor"+n]=(0,g.A)(t["lineColor"+n],20):t["lineColor"+n]=(0,m.A)(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const r=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${r};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),k=(0,o.K2)(t=>`\n .edge {\n stroke-width: 3;\n }\n ${T(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${t.gitBranchLabel0};\n }\n .section-2 span {\n color: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),E={get db(){return new b},renderer:w,parser:v,styles:k}},5518(t,e,n){"use strict";n.d(e,{diagram:()=>_});var r=n(1475),i=n(5871),a=n(796),s=n(4098),o=n(797),l=n(8731),c=n(1444),h=s.UI.pie,u={sections:new Map,showData:!1,config:h},d=u.sections,p=u.showData,f=structuredClone(h),g=(0,o.K2)(()=>structuredClone(f),"getConfig"),m=(0,o.K2)(()=>{d=new Map,p=u.showData,(0,s.IU)()},"clear"),y=(0,o.K2)(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);d.has(t)||(d.set(t,e),o.Rm.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),v=(0,o.K2)(()=>d,"getSections"),x=(0,o.K2)(t=>{p=t},"setShowData"),b=(0,o.K2)(()=>p,"getShowData"),w={getConfig:g,clear:m,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:y,getSections:v,setShowData:x,getShowData:b},T=(0,o.K2)((t,e)=>{(0,i.S)(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),k={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("pie",t);o.Rm.debug(e),T(e,w)},"parse")},E=(0,o.K2)(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),A=(0,o.K2)(t=>{const e=[...t.values()].reduce((t,e)=>t+e,0),n=[...t.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>t.value/e*100>=1).sort((t,e)=>e.value-t.value);return(0,c.rLf)().value(t=>t.value)(n)},"createPieArcs"),_={parser:k,db:w,renderer:{draw:(0,o.K2)((t,e,n,i)=>{o.Rm.debug("rendering pie chart\n"+t);const l=i.db,h=(0,s.D7)(),u=(0,a.$t)(l.getConfig(),h.pie),d=18,p=450,f=p,g=(0,r.D)(e),m=g.append("g");m.attr("transform","translate(225,225)");const{themeVariables:y}=h;let[v]=(0,a.I5)(y.pieOuterStrokeWidth);v??=2;const x=u.textPosition,b=Math.min(f,p)/2-40,w=(0,c.JLW)().innerRadius(0).outerRadius(b),T=(0,c.JLW)().innerRadius(b*x).outerRadius(b*x);m.append("circle").attr("cx",0).attr("cy",0).attr("r",b+v/2).attr("class","pieOuterCircle");const k=l.getSections(),E=A(k),_=[y.pie1,y.pie2,y.pie3,y.pie4,y.pie5,y.pie6,y.pie7,y.pie8,y.pie9,y.pie10,y.pie11,y.pie12];let C=0;k.forEach(t=>{C+=t});const S=E.filter(t=>"0"!==(t.data.value/C*100).toFixed(0)),R=(0,c.UMr)(_);m.selectAll("mySlices").data(S).enter().append("path").attr("d",w).attr("fill",t=>R(t.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(S).enter().append("text").text(t=>(t.data.value/C*100).toFixed(0)+"%").attr("transform",t=>"translate("+T.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const L=[...k.entries()].map(([t,e])=>({label:t,value:e})),D=m.selectAll(".legend").data(L).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*L.length/2)+")");D.append("rect").attr("width",d).attr("height",d).style("fill",t=>R(t.label)).style("stroke",t=>R(t.label)),D.append("text").attr("x",22).attr("y",14).text(t=>l.getShowData()?`${t.label} [${t.value}]`:t.label);const I=512+Math.max(...D.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0));g.attr("viewBox",`0 0 ${I} 450`),(0,s.a$)(g,p,I,u.useMaxWidth)},"draw")},styles:E}},7333(t,e,n){"use strict";n.d(e,{diagram:()=>D});var r=n(4098),i=n(797),a=n(1444),s=function(){var t=(0,i.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,3],n=[1,4],r=[1,5],a=[1,6],s=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],h=[2,36],u=[1,37],d=[1,36],p=[1,38],f=[1,35],g=[1,43],m=[1,41],y=[1,14],v=[1,23],x=[1,18],b=[1,19],w=[1,20],T=[1,21],k=[1,22],E=[1,24],A=[1,25],_=[1,26],C=[1,27],S=[1,28],R=[1,29],L=[1,32],D=[1,33],I=[1,34],N=[1,39],M=[1,40],O=[1,42],P=[1,44],$=[1,62],B=[1,61],F=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],z=[1,65],K=[1,66],q=[1,67],U=[1,68],j=[1,69],Y=[1,70],G=[1,71],W=[1,72],V=[1,73],H=[1,74],X=[1,75],Z=[1,76],Q=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],nt=[1,99],rt=[1,93],it=[1,96],at=[1,94],st=[1,95],ot=[1,97],lt=[1,98],ct=[1,102],ht=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],dt={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,i.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 23:case 68:this.$=a[o];break;case 24:case 69:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:r.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:r.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:r.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:r.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:r.setXAxisLeftText(a[o-2]),r.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",r.setXAxisLeftText(a[o-1]);break;case 53:r.setXAxisLeftText(a[o]);break;case 54:r.setYAxisBottomText(a[o-2]),r.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",r.setYAxisBottomText(a[o-1]);break;case 56:r.setYAxisBottomText(a[o]);break;case 57:r.setQuadrant1Text(a[o]);break;case 58:r.setQuadrant2Text(a[o]);break;case 59:r.setQuadrant3Text(a[o]);break;case 60:r.setQuadrant4Text(a[o]);break;case 64:case 66:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 67:this.$={text:a[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:n,55:r,56:a,57:s},{1:[3]},{18:e,26:8,27:2,28:n,55:r,56:a,57:s},{18:e,26:9,27:2,28:n,55:r,56:a,57:s},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(c,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:p,12:f,13:g,14:m,18:y,25:v,35:x,37:b,39:w,41:T,42:k,48:E,50:A,51:_,52:C,53:S,54:R,60:L,61:D,63:I,64:N,65:M,66:O,67:P}),t(o,[2,34]),{27:45,55:r,56:a,57:s},t(c,[2,37]),t(c,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:d,10:p,12:f,13:g,14:m,18:y,25:v,35:x,37:b,39:w,41:T,42:k,48:E,50:A,51:_,52:C,53:S,54:R,60:L,61:D,63:I,64:N,65:M,66:O,67:P}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(c,[2,45]),t(c,[2,46]),{18:[1,50]},{4:u,5:d,10:p,12:f,13:g,14:m,43:51,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:52,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:53,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:54,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:55,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:56,58:31,60:L,61:D,63:I,64:N,65:M,66:O,67:P},{4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,44:[1,57],47:[1,58],58:60,59:59,63:I,64:N,65:M,66:O,67:P},t(F,[2,64]),t(F,[2,66]),t(F,[2,67]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),t(F,[2,79]),t(F,[2,80]),t(o,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:64,4:z,5:K,6:q,7:U,8:j,9:Y,10:G,11:W,12:V,13:H,14:X,15:Z,21:63},t(c,[2,53],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,49:[1,77],63:I,64:N,65:M,66:O,67:P}),t(c,[2,56],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,49:[1,78],63:I,64:N,65:M,66:O,67:P}),t(c,[2,57],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),t(c,[2,58],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),t(c,[2,59],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),t(c,[2,60],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),{45:[1,79]},{44:[1,80]},t(F,[2,65]),t(F,[2,81]),t(F,[2,82]),t(F,[2,83]),{3:82,4:z,5:K,6:q,7:U,8:j,9:Y,10:G,11:W,12:V,13:H,14:X,15:Z,18:[1,81]},t(Q,[2,23]),t(Q,[2,1]),t(Q,[2,2]),t(Q,[2,3]),t(Q,[2,4]),t(Q,[2,5]),t(Q,[2,6]),t(Q,[2,7]),t(Q,[2,8]),t(Q,[2,9]),t(Q,[2,10]),t(Q,[2,11]),t(Q,[2,12]),t(c,[2,52],{58:31,43:83,4:u,5:d,10:p,12:f,13:g,14:m,60:L,61:D,63:I,64:N,65:M,66:O,67:P}),t(c,[2,55],{58:31,43:84,4:u,5:d,10:p,12:f,13:g,14:m,60:L,61:D,63:I,64:N,65:M,66:O,67:P}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:nt,11:rt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:88,23:87},t(Q,[2,24]),t(c,[2,51],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),t(c,[2,54],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:I,64:N,65:M,66:O,67:P}),t(c,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),{46:[1,101]},t(c,[2,29],{10:ct}),t(ht,[2,27],{16:103,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(c,[2,49],{10:ct}),t(c,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt}),{4:J,5:tt,6:et,8:nt,11:rt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:105},t(ut,[2,26]),t(c,[2,50],{10:ct}),t(ht,[2,28],{16:103,4:J,5:tt,6:et,8:nt,11:rt,13:it,17:at,18:st,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,n=[0],r=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),a.push(p.yytext),s.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=a[a.length-A],S._$={first_line:s[s.length-(A||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(A||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(A||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),a=a.slice(0,-1*A),s=s.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},pt=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,n,r){switch(n){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function ft(){this.yy={}}return dt.lexer=pt,(0,i.K2)(ft,"Parser"),ft.prototype=dt,dt.Parser=ft,new ft}();s.parser=s;var o=s,l=(0,r.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,i.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:r.UI.quadrantChart?.chartWidth||500,chartWidth:r.UI.quadrantChart?.chartHeight||500,titlePadding:r.UI.quadrantChart?.titlePadding||10,titleFontSize:r.UI.quadrantChart?.titleFontSize||20,quadrantPadding:r.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:r.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:r.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:r.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:r.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:r.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:r.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:r.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:r.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:r.UI.quadrantChart?.pointRadius||5,xAxisPosition:r.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:r.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:r.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:r.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,i.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){i.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){i.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,n,r){const i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,a={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&n?s:0,right:"right"===this.config.yAxisPosition&&n?s:0},l=this.config.titleFontSize+2*this.config.titlePadding,c={top:r?l:0},h=this.config.quadrantPadding+o.left,u=this.config.quadrantPadding+a.top+c.top,d=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,p=this.config.chartHeight-2*this.config.quadrantPadding-a.top-a.bottom-c.top;return{xAxisSpace:a,yAxisSpace:o,titleSpace:c,quadrantSpace:{quadrantLeft:h,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(t,e,n,r){const{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:c,quadrantTop:h,quadrantWidth:u}=i,d=Boolean(this.data.xAxisRightText),p=Boolean(this.data.yAxisTopText),f=[];return this.data.xAxisLeftText&&e&&f.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&f.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+c+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&f.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&f.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),f}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(const o of s)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:s}=e,o=(0,a.m4Y)().domain([0,1]).range([r,s+r]),l=(0,a.m4Y)().domain([0,1]).range([n+i,i]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=t,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+r,x2:a+l-e,y2:o+r}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(r,t,e,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},h=class extends Error{static{(0,i.K2)(this,"InvalidStyleError")}constructor(t,e,n){super(`value for ${t} ${e} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function p(t){return!/^\d+px$/.test(t)}(0,i.K2)(u,"validateHexCode"),(0,i.K2)(d,"validateNumber"),(0,i.K2)(p,"validateSizeInPixels");var f=(0,r.D7)();function g(t){return(0,r.jZ)(t.trim(),f)}(0,i.K2)(g,"textSanitizer");var m=new c;function y(t){m.setData({quadrant1Text:g(t.text)})}function v(t){m.setData({quadrant2Text:g(t.text)})}function x(t){m.setData({quadrant3Text:g(t.text)})}function b(t){m.setData({quadrant4Text:g(t.text)})}function w(t){m.setData({xAxisLeftText:g(t.text)})}function T(t){m.setData({xAxisRightText:g(t.text)})}function k(t){m.setData({yAxisTopText:g(t.text)})}function E(t){m.setData({yAxisBottomText:g(t.text)})}function A(t){const e={};for(const n of t){const[t,r]=n.trim().split(/\s*:\s*/);if("radius"===t){if(d(r))throw new h(t,r,"number");e.radius=parseInt(r)}else if("color"===t){if(u(r))throw new h(t,r,"hex code");e.color=r}else if("stroke-color"===t){if(u(r))throw new h(t,r,"hex code");e.strokeColor=r}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(p(r))throw new h(t,r,"number of pixels (eg. 10px)");e.strokeWidth=r}}return e}function _(t,e,n,r,i){const a=A(i);m.addPoints([{x:n,y:r,text:g(t.text),className:e,...a}])}function C(t,e){m.addClass(t,A(e))}function S(t){m.setConfig({chartWidth:t})}function R(t){m.setConfig({chartHeight:t})}function L(){const t=(0,r.D7)(),{themeVariables:e,quadrantChart:n}=t;return n&&m.setConfig(n),m.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),m.setData({titleText:(0,r.ab)()}),m.build()}(0,i.K2)(y,"setQuadrant1Text"),(0,i.K2)(v,"setQuadrant2Text"),(0,i.K2)(x,"setQuadrant3Text"),(0,i.K2)(b,"setQuadrant4Text"),(0,i.K2)(w,"setXAxisLeftText"),(0,i.K2)(T,"setXAxisRightText"),(0,i.K2)(k,"setYAxisTopText"),(0,i.K2)(E,"setYAxisBottomText"),(0,i.K2)(A,"parseStyles"),(0,i.K2)(_,"addPoint"),(0,i.K2)(C,"addClass"),(0,i.K2)(S,"setWidth"),(0,i.K2)(R,"setHeight"),(0,i.K2)(L,"getQuadrantData");var D={parser:o,db:{setWidth:S,setHeight:R,setQuadrant1Text:y,setQuadrant2Text:v,setQuadrant3Text:x,setQuadrant4Text:b,setXAxisLeftText:w,setXAxisRightText:T,setYAxisTopText:k,setYAxisBottomText:E,parseStyles:A,addPoint:_,addClass:C,getQuadrantData:L,clear:(0,i.K2)(function(){m.clear(),(0,r.IU)()},"clear"),setAccTitle:r.SV,getAccTitle:r.iN,setDiagramTitle:r.ke,getDiagramTitle:r.ab,getAccDescription:r.m7,setAccDescription:r.EI},renderer:{draw:(0,i.K2)((t,e,n,s)=>{function o(t){return"top"===t?"hanging":"middle"}function l(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,i.K2)(o,"getDominantBaseLine"),(0,i.K2)(l,"getTextAnchor"),(0,i.K2)(c,"getTransformation");const h=(0,r.D7)();i.Rm.debug("Rendering quadrant chart\n"+t);const u=h.securityLevel;let d;"sandbox"===u&&(d=(0,a.Ltv)("#i"+e));const p=("sandbox"===u?(0,a.Ltv)(d.nodes()[0].contentDocument.body):(0,a.Ltv)("body")).select(`[id="${e}"]`),f=p.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,m=h.quadrantChart?.chartHeight??500;(0,r.a$)(p,m,g,h.quadrantChart?.useMaxWidth??!0),p.attr("viewBox","0 0 "+g+" "+m),s.db.setHeight(m),s.db.setWidth(g);const y=s.db.getQuadrantData(),v=f.append("g").attr("class","quadrants"),x=f.append("g").attr("class","border"),b=f.append("g").attr("class","data-points"),w=f.append("g").attr("class","labels"),T=f.append("g").attr("class","title");y.title&&T.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",o(y.title.horizontalPos)).attr("text-anchor",l(y.title.verticalPos)).attr("transform",c(y.title)).text(y.title.text),y.borderLines&&x.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const k=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);w.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.horizontalPos)).attr("text-anchor",t=>l(t.verticalPos)).attr("transform",t=>c(t));const E=b.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");E.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),E.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,i.K2)(()=>"","styles")}},5895(t,e,n){"use strict";n.d(e,{diagram:()=>g});var r=n(9625),i=n(2627),a=n(9856),s=(n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796)),o=n(4098),l=n(797),c=function(){var t=(0,l.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],c=[1,26],h=[1,27],u=[1,28],d=[1,29],p=[1,33],f=[1,34],g=[1,35],m=[1,36],y=[1,37],v=[1,38],x=[1,24],b=[1,31],w=[1,32],T=[1,30],k=[1,39],E=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,61],C=[89,90],S=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],R=[27,29],L=[1,70],D=[1,71],I=[1,72],N=[1,73],M=[1,74],O=[1,75],P=[1,76],$=[1,83],B=[1,80],F=[1,84],z=[1,85],K=[1,86],q=[1,87],U=[1,88],j=[1,89],Y=[1,90],G=[1,91],W=[1,92],V=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],X=[1,101],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Q=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],tt=[1,106],et=[1,107],nt=[1,108],rt=[1,109],it=[1,111],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],ct={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,l.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection("TB");break;case 18:r.setDirection("BT");break;case 19:r.setDirection("RL");break;case 20:r.setDirection("LR");break;case 21:r.addRequirement(a[o-3],a[o-4]);break;case 22:r.addRequirement(a[o-5],a[o-6]),r.setClass([a[o-5]],a[o-3]);break;case 23:r.setNewReqId(a[o-2]);break;case 24:r.setNewReqText(a[o-2]);break;case 25:r.setNewReqRisk(a[o-2]);break;case 26:r.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[o-3]);break;case 43:r.addElement(a[o-5]),r.setClass([a[o-5]],a[o-3]);break;case 44:r.setNewElementType(a[o-2]);break;case 45:r.setNewElementDocRef(a[o-2]);break;case 48:r.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:r.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[o-2],r.defineClass(a[o-1],a[o]);break;case 58:r.setClass(a[o-1],a[o]);break;case 59:r.setClass([a[o-2]],a[o]);break;case 60:case 62:case 65:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],r.setCssStyle(a[o-1],a[o]);break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:e,9:n,11:r,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:n,11:r,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:n,11:r,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:43,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:44,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:45,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:46,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:47,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:48,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:49,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{4:17,5:s,7:50,8:o,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:x,72:b,74:w,77:T,89:k,90:E},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(A,[2,17]),t(A,[2,18]),t(A,[2,19]),t(A,[2,20]),{30:60,33:62,75:_,89:k,90:E},{30:63,33:62,75:_,89:k,90:E},{30:64,33:62,75:_,89:k,90:E},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(S,[2,81]),t(S,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(R,[2,79]),t(R,[2,80]),{27:[1,67],29:[1,68]},t(R,[2,85]),t(R,[2,86]),{62:69,65:L,66:D,67:I,68:N,69:M,70:O,71:P},{62:77,65:L,66:D,67:I,68:N,69:M,70:O,71:P},{30:78,33:62,75:_,89:k,90:E},{73:79,75:$,76:B,78:81,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:Y,87:G,88:W},t(V,[2,60]),t(V,[2,62]),{73:93,75:$,76:B,78:81,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:Y,87:G,88:W},{30:94,33:62,75:_,76:B,89:k,90:E},{5:[1,95]},{30:96,33:62,75:_,89:k,90:E},{5:[1,97]},{30:98,33:62,75:_,89:k,90:E},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(A,[2,59],{76:B}),t(A,[2,64],{76:X}),{33:103,75:[1,102],89:k,90:E},t(Z,[2,65],{79:104,75:$,80:F,81:z,82:K,83:q,84:U,85:j,86:Y,87:G,88:W}),t(Q,[2,67]),t(Q,[2,69]),t(Q,[2,70]),t(Q,[2,71]),t(Q,[2,72]),t(Q,[2,73]),t(Q,[2,74]),t(Q,[2,75]),t(Q,[2,76]),t(Q,[2,77]),t(Q,[2,78]),t(A,[2,57],{76:X}),t(A,[2,58],{76:B}),{5:J,28:105,31:tt,34:et,36:nt,38:rt,40:it},{27:[1,112],76:B},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:B},{33:119,89:k,90:E},{33:120,89:k,90:E},{75:$,78:121,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:Y,87:G,88:W},t(V,[2,61]),t(V,[2,63]),t(Q,[2,68]),t(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:tt,34:et,36:nt,38:rt,40:it},t(A,[2,28]),{5:[1,127]},t(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(A,[2,47]),{5:[1,131]},t(A,[2,48]),t(A,[2,49]),t(Z,[2,66],{79:104,75:$,80:F,81:z,82:K,83:q,84:U,85:j,86:Y,87:G,88:W}),{33:132,89:k,90:E},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(A,[2,27]),{5:J,28:145,31:tt,34:et,36:nt,38:rt,40:it},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(A,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(A,[2,43]),{5:J,28:159,31:tt,34:et,36:nt,38:rt,40:it},{5:J,28:160,31:tt,34:et,36:nt,38:rt,40:it},{5:J,28:161,31:tt,34:et,36:nt,38:rt,40:it},{5:J,28:162,31:tt,34:et,36:nt,38:rt,40:it},{5:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,44]),t(A,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},ht=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,n,r){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ut(){this.yy={}}return ct.lexer=ht,(0,l.K2)(ut,"Parser"),ut.prototype=ct,ct.Parser=ut,new ut}();c.parser=c;var h=c,u=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,l.K2)(()=>(0,o.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),l.Rm.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,n){this.relations.push({type:t,src:e,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,o.IU)()}setCssStyle(t,e){for(const n of t){const t=this.requirements.get(n)??this.elements.get(n);if(!e||!t)return;for(const n of e)n.includes(",")?t.cssStyles.push(...n.split(",")):t.cssStyles.push(n)}}setClass(t,e){for(const n of t){const t=this.requirements.get(n)??this.elements.get(n);if(t)for(const n of e){t.classes.push(n);const e=this.classes.get(n)?.styles;e&&t.cssStyles.push(...e)}}}defineClass(t,e){for(const n of t){let t=this.classes.get(n);void 0===t&&(t={id:n,styles:[],textStyles:[]},this.classes.set(n,t)),e&&e.forEach(function(e){if(/color/.exec(e)){const n=e.replace("fill","bgFill");t.textStyles.push(n)}t.styles.push(e)}),this.requirements.forEach(t=>{t.classes.includes(n)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(n)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){const t=(0,o.D7)(),e=[],n=[];for(const r of this.requirements.values()){const n=r;n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),n.shape="requirementBox",n.look=t.look,e.push(n)}for(const r of this.elements.values()){const n=r;n.shape="requirementBox",n.look=t.look,n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),e.push(n)}for(const r of this.relations){let e=0;const i=r.type===this.Relationships.CONTAINS,a={id:`${r.src}-${r.dst}-${e}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`«${r.type}»`,classes:"relationshipLine",style:["fill:none",i?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:i?"normal":"dashed",arrowTypeStart:i?"requirement_contains":"",arrowTypeEnd:i?"":"requirement_arrow",look:t.look,labelType:"markdown"};n.push(a),e++}return{nodes:e,edges:n,other:{},config:t,direction:this.getDirection()}}},d=(0,l.K2)(t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.relationLabelColor};\n }\n .divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n`,"getStyles"),p={};(0,l.VA)(p,{draw:()=>f});var f=(0,l.K2)(async function(t,e,n,c){l.Rm.info("REF0:"),l.Rm.info("Drawing requirement diagram (unified)",e);const{securityLevel:h,state:u,layout:d}=(0,o.D7)(),p=c.db.getData(),f=(0,r.A)(e,h);p.type=c.type,p.layoutAlgorithm=(0,a.q7)(d),p.nodeSpacing=u?.nodeSpacing??50,p.rankSpacing=u?.rankSpacing??50,p.markers=["requirement_contains","requirement_arrow"],p.diagramId=e,await(0,a.XX)(p,f);s._K.insertTitle(f,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(f,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),g={parser:h,get db(){return new u},renderer:p,styles:d}},8535(t,e,n){"use strict";n.d(e,{diagram:()=>ot});var r=n(4098),i=n(797),a=n(1444);function s(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function o(t){return t.target.depth}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function c(t,e){let n=0;if(void 0===e)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function h(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function u(t){return function(){return t}}function d(t,e){return f(t.source,e.source)||t.index-e.index}function p(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.y0-e.y0}function g(t){return t.value}function m(t){return t.index}function y(t){return t.nodes}function v(t){return t.links}function x(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function b({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const r of e.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const r of e.targetLinks)r.y1=n+r.width/2,n+=r.width}}function w(){let t,e,n,r=0,i=0,a=1,o=1,w=24,T=8,k=m,E=l,A=y,_=v,C=6;function S(){const l={nodes:A.apply(null,arguments),links:_.apply(null,arguments)};return function({nodes:t,links:e}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const r=new Map(t.map((e,n)=>[k(e,n,t),e]));for(const[n,i]of e.entries()){i.index=n;let{source:t,target:e}=i;"object"!=typeof t&&(t=i.source=x(r,t)),"object"!=typeof e&&(e=i.target=x(r,e)),t.sourceLinks.push(i),e.targetLinks.push(i)}if(null!=n)for(const{sourceLinks:i,targetLinks:a}of t)i.sort(n),a.sort(n)}(l),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(c(e.sourceLinks,g),c(e.targetLinks,g)):e.fixedValue}(l),function({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}(l),function({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}(l),function(n){const l=function({nodes:t}){const n=h(t,t=>t.depth)+1,i=(a-r-w)/(n-1),s=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(E.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+w,s[t]?s[t].push(e):s[t]=[e]}if(e)for(const r of s)r.sort(e);return s}(n);t=Math.min(T,(o-i)/(h(l,t=>t.length)-1)),function(e){const n=s(e,e=>(o-i-(e.length-1)*t)/c(e,g));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(o-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}O(r)}}(l);for(let t=0;t<C;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/C);L(l,e,n),R(l,e,n)}}(l),b(l),l}function R(t,n,r){for(let i=1,a=t.length;i<a;++i){const a=t[i];for(const t of a){let e=0,r=0;for(const{source:n,value:a}of t.targetLinks){let i=a*(t.layer-n.layer);e+=P(n,t)*i,r+=i}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),D(a,r)}}function L(t,n,r){for(let i=t.length-2;i>=0;--i){const a=t[i];for(const t of a){let e=0,r=0;for(const{target:n,value:a}of t.sourceLinks){let i=a*(n.layer-t.layer);e+=$(t,n)*i,r+=i}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),D(a,r)}}function D(e,n){const r=e.length>>1,a=e[r];N(e,a.y0-t,r-1,n),I(e,a.y1+t,r+1,n),N(e,o,e.length-1,n),I(e,i,0,n)}function I(e,n,r,i){for(;r<e.length;++r){const a=e[r],s=(n-a.y0)*i;s>1e-6&&(a.y0+=s,a.y1+=s),n=a.y1+t}}function N(e,n,r,i){for(;r>=0;--r){const a=e[r],s=(a.y1-n)*i;s>1e-6&&(a.y0-=s,a.y1-=s),n=a.y0-t}}function M({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(p);for(const{target:{targetLinks:e}}of t)e.sort(d)}}function O(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(p),n.sort(d)}function P(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:a}of e.sourceLinks){if(i===n)break;r+=a+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function $(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:a}of n.targetLinks){if(i===e)break;r+=a+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return S.update=function(t){return b(t),t},S.nodeId=function(t){return arguments.length?(k="function"==typeof t?t:u(t),S):k},S.nodeAlign=function(t){return arguments.length?(E="function"==typeof t?t:u(t),S):E},S.nodeSort=function(t){return arguments.length?(e=t,S):e},S.nodeWidth=function(t){return arguments.length?(w=+t,S):w},S.nodePadding=function(e){return arguments.length?(T=t=+e,S):T},S.nodes=function(t){return arguments.length?(A="function"==typeof t?t:u(t),S):A},S.links=function(t){return arguments.length?(_="function"==typeof t?t:u(t),S):_},S.linkSort=function(t){return arguments.length?(n=t,S):n},S.size=function(t){return arguments.length?(r=i=0,a=+t[0],o=+t[1],S):[a-r,o-i]},S.extent=function(t){return arguments.length?(r=+t[0][0],a=+t[1][0],i=+t[0][1],o=+t[1][1],S):[[r,i],[a,o]]},S.iterations=function(t){return arguments.length?(C=+t,S):C},S}var T=Math.PI,k=2*T,E=1e-6,A=k-E;function _(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function C(){return new _}_.prototype=C.prototype={constructor:_,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,s=this._y1,o=n-t,l=r-e,c=a-t,h=s-e,u=c*c+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>E)if(Math.abs(h*o-l*c)>E&&i){var d=n-a,p=r-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((T-Math.acos((f+u-g)/(2*m*y)))/2),x=v/y,b=v/m;Math.abs(x-1)>E&&(this._+="L"+(t+x*c)+","+(e+x*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>c*p)+","+(this._x1=t+b*o)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var s=(n=+n)*Math.cos(r),o=n*Math.sin(r),l=t+s,c=e+o,h=1^a,u=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>E||Math.abs(this._y1-c)>E)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%k+k),u>A?this._+="A"+n+","+n+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+n+","+n+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>E&&(this._+="A"+n+","+n+",0,"+ +(u>=T)+","+h+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const S=C;var R=Array.prototype.slice;function L(t){return function(){return t}}function D(t){return t[0]}function I(t){return t[1]}function N(t){return t.source}function M(t){return t.target}function O(t){var e=N,n=M,r=D,i=I,a=null;function s(){var s,o=R.call(arguments),l=e.apply(this,o),c=n.apply(this,o);if(a||(a=s=S()),t(a,+r.apply(this,(o[0]=l,o)),+i.apply(this,o),+r.apply(this,(o[0]=c,o)),+i.apply(this,o)),s)return a=null,s+""||null}return s.source=function(t){return arguments.length?(e=t,s):e},s.target=function(t){return arguments.length?(n=t,s):n},s.x=function(t){return arguments.length?(r="function"==typeof t?t:L(+t),s):r},s.y=function(t){return arguments.length?(i="function"==typeof t?t:L(+t),s):i},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}function P(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function $(t){return[t.source.x1,t.y0]}function B(t){return[t.target.x0,t.y1]}function F(){return O(P).source($).target(B)}var z=function(){var t=(0,i.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,9],n=[1,10],r=[1,5,10,12],a={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 7:const t=r.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),e=r.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),n=parseFloat(a[o].trim());r.addLink(t,e,n);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:n},{15:18,16:7,17:8,18:e,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:e,20:n},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,n=[0],r=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),a.push(p.yytext),s.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=a[a.length-A],S._$={first_line:s[s.length-(A||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(A||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(A||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),a=a.slice(0,-1*A),s=s.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},s=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,n,r){switch(n){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function o(){this.yy={}}return a.lexer=s,(0,i.K2)(o,"Parser"),o.prototype=a,a.Parser=o,new o}();z.parser=z;var K=z,q=[],U=[],j=new Map,Y=(0,i.K2)(()=>{q=[],U=[],j=new Map,(0,r.IU)()},"clear"),G=class{constructor(t,e,n=0){this.source=t,this.target=e,this.value=n}static{(0,i.K2)(this,"SankeyLink")}},W=(0,i.K2)((t,e,n)=>{q.push(new G(t,e,n))},"addLink"),V=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},H=(0,i.K2)(t=>{t=r.Y2.sanitizeText(t,(0,r.D7)());let e=j.get(t);return void 0===e&&(e=new V(t),j.set(t,e),U.push(e)),e},"findOrCreateNode"),X=(0,i.K2)(()=>U,"getNodes"),Z=(0,i.K2)(()=>q,"getLinks"),Q=(0,i.K2)(()=>({nodes:U.map(t=>({id:t.ID})),links:q.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:j,getConfig:(0,i.K2)(()=>(0,r.D7)().sankey,"getConfig"),getNodes:X,getLinks:Z,getGraph:Q,addLink:W,findOrCreateNode:H,getAccTitle:r.iN,setAccTitle:r.SV,getAccDescription:r.m7,setAccDescription:r.EI,getDiagramTitle:r.ab,setDiagramTitle:r.ke,clear:Y},tt=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},et={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?s(t.sourceLinks,o)-1:0},justify:l},nt=(0,i.K2)(function(t,e,n,s){const{securityLevel:o,sankey:l}=(0,r.D7)(),c=r.ME.sankey;let h;"sandbox"===o&&(h=(0,a.Ltv)("#i"+e));const u="sandbox"===o?(0,a.Ltv)(h.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),d="sandbox"===o?u.select(`[id="${e}"]`):(0,a.Ltv)(`[id="${e}"]`),p=l?.width??c.width,f=l?.height??c.width,g=l?.useMaxWidth??c.useMaxWidth,m=l?.nodeAlignment??c.nodeAlignment,y=l?.prefix??c.prefix,v=l?.suffix??c.suffix,x=l?.showValues??c.showValues,b=s.db.getGraph(),T=et[m];w().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(T).extent([[0,0],[p,f]])(b);const k=(0,a.UMr)(a.zt);d.append("g").attr("class","nodes").selectAll(".node").data(b.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>k(t.id));const E=(0,i.K2)(({id:t,value:e})=>x?`${t}\n${y}${Math.round(100*e)/100}${v}`:t,"getText");d.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(b.nodes).join("text").attr("x",t=>t.x0<p/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>t.x0<p/2?"start":"end").text(E);const A=d.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(b.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),_=l?.linkColor??"gradient";if("gradient"===_){const t=A.append("linearGradient").attr("id",t=>(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>k(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>k(t.target.id))}let C;switch(_){case"gradient":C=(0,i.K2)(t=>t.uid,"coloring");break;case"source":C=(0,i.K2)(t=>k(t.source.id),"coloring");break;case"target":C=(0,i.K2)(t=>k(t.target.id),"coloring");break;default:C=_}A.append("path").attr("d",F()).attr("stroke",C).attr("stroke-width",t=>Math.max(1,t.width)),(0,r.ot)(void 0,d,0,g)},"draw"),rt={draw:nt},it=(0,i.K2)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),at=(0,i.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n }`,"getStyles"),st=K.parse.bind(K);K.parse=t=>st(it(t));var ot={styles:at,parser:K,db:J,renderer:rt}},1031(t,e,n){"use strict";n.d(e,{diagram:()=>Ft});var r=n(3283),i=n(5523),a=n(2938),s=n(796),o=n(4098),l=n(797),c=n(1444),h=n(6750),u=function(){var t=(0,l.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,12],c=[1,14],h=[1,15],u=[1,17],d=[1,18],p=[1,19],f=[1,25],g=[1,26],m=[1,27],y=[1,28],v=[1,29],x=[1,30],b=[1,31],w=[1,32],T=[1,33],k=[1,34],E=[1,35],A=[1,36],_=[1,37],C=[1,38],S=[1,39],R=[1,40],L=[1,42],D=[1,43],I=[1,44],N=[1,45],M=[1,46],O=[1,47],P=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],$=[1,74],B=[1,80],F=[1,81],z=[1,82],K=[1,83],q=[1,84],U=[1,85],j=[1,86],Y=[1,87],G=[1,88],W=[1,89],V=[1,90],H=[1,91],X=[1,92],Z=[1,93],Q=[1,94],J=[1,95],tt=[1,96],et=[1,97],nt=[1,98],rt=[1,99],it=[1,100],at=[1,101],st=[1,102],ot=[1,103],lt=[1,104],ct=[1,105],ht=[2,78],ut=[4,5,17,51,53,54],dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],ft=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],mt=[5,52],yt=[70,71,72,73],vt=[1,151],xt={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,l.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 3:return r.apply(a[o]),a[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=a[o];break;case 16:a[o].type="createParticipant",this.$=a[o];break;case 17:a[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 30:r.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 31:r.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 32:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 35:a[o-1].unshift({type:"loopStart",loopText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"rectStart",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"optStart",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"altStart",altText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"parStart",parText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 42:a[o-1].unshift({type:"breakStart",breakText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 44:this.$=a[o-3].concat([{type:"option",optionText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 46:this.$=a[o-3].concat([{type:"and",parText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.PAR_AND},a[o]]);break;case 48:this.$=a[o-3].concat([{type:"else",altText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.ALT_ELSE},a[o]]);break;case 49:case 54:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 50:case 55:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 51:case 56:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 52:case 57:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 53:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 58:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 59:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 60:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 63:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 66:this.$=[a[o-2],a[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 71:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 72:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor}];break;case 73:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-4].actor}];break;case 74:this.$=[a[o-5],a[o-1],{type:"addMessage",from:a[o-5].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-5].actor}];break;case 75:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 76:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 77:this.$=a[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:a[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},t(P,[2,5]),{9:48,13:13,14:c,15:h,18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},t(P,[2,7]),t(P,[2,8]),t(P,[2,9]),t(P,[2,15]),{13:49,51:C,53:S,54:R},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(P,[2,30]),t(P,[2,31]),{33:[1,62]},{35:[1,63]},t(P,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:$},{23:75,55:76,73:$},{23:77,73:O},{69:78,72:[1,79],78:B,79:F,80:z,81:K,82:q,83:U,84:j,85:Y,86:G,87:W,88:V,89:H,90:X,91:Z,92:Q,93:J,94:tt,95:et,96:nt,97:rt,98:it,99:at,100:st,101:ot,102:lt,103:ct},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ht),t(P,[2,6]),t(P,[2,16]),t(ut,[2,10],{11:114}),t(P,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(P,[2,22]),{5:[1,118]},{5:[1,119]},t(P,[2,25]),t(P,[2,26]),t(P,[2,27]),t(P,[2,28]),t(P,[2,29]),t(P,[2,32]),t(P,[2,33]),t(dt,i,{7:120}),t(dt,i,{7:121}),t(dt,i,{7:122}),t(pt,i,{41:123,7:124}),t(ft,i,{43:125,7:126}),t(ft,i,{7:126,43:127}),t(gt,i,{46:128,7:129}),t(dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(mt,ht,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:B,79:F,80:z,81:K,82:q,83:U,84:j,85:Y,86:G,87:W,88:V,89:H,90:X,91:Z,92:Q,93:J,94:tt,95:et,96:nt,97:rt,98:it,99:at,100:st,101:ot,102:lt,103:ct},t(yt,[2,79]),t(yt,[2,80]),t(yt,[2,81]),t(yt,[2,82]),t(yt,[2,83]),t(yt,[2,84]),t(yt,[2,85]),t(yt,[2,86]),t(yt,[2,87]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),t(yt,[2,99]),t(yt,[2,100]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,103]),t(yt,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:vt},{58:152,104:vt},{58:153,104:vt},{58:154,104:vt},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:C,53:S,54:R},{5:[1,160]},t(P,[2,20]),t(P,[2,21]),t(P,[2,23]),t(P,[2,24]),{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[1,161],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[1,162],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[1,163],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{17:[1,164]},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[2,47],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,50:[1,165],51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{17:[1,166]},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[2,45],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,49:[1,167],51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{17:[1,168]},{17:[1,169]},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[2,43],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,48:[1,170],51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{4:a,5:s,8:8,9:10,10:o,13:13,14:c,15:h,17:[1,171],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:x,38:b,39:w,40:T,42:k,44:E,45:A,47:_,51:C,53:S,54:R,56:L,61:D,62:I,63:N,64:M,73:O},{16:[1,172]},t(P,[2,50]),{16:[1,173]},t(P,[2,55]),t(mt,[2,76]),{76:[1,174]},{16:[1,175]},t(P,[2,52]),{16:[1,176]},t(P,[2,57]),t(P,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:vt},{23:181,72:[1,182],73:O},{58:183,104:vt},{58:184,104:vt},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(P,[2,17]),t(ut,[2,11]),{13:186,51:C,53:S,54:R},t(ut,[2,13]),t(ut,[2,14]),t(P,[2,19]),t(P,[2,35]),t(P,[2,36]),t(P,[2,37]),t(P,[2,38]),{16:[1,187]},t(P,[2,39]),{16:[1,188]},t(P,[2,40]),t(P,[2,41]),{16:[1,189]},t(P,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:vt},{58:196,104:vt},{58:197,104:vt},{5:[2,75]},{58:198,104:vt},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},t(ut,[2,12]),t(pt,i,{7:124,41:201}),t(ft,i,{7:126,43:202}),t(gt,i,{7:129,46:203}),t(P,[2,49]),t(P,[2,54]),t(mt,[2,77]),t(P,[2,51]),t(P,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:vt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},bt=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,n,r){switch(n){case 0:case 58:case 91:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 59:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return this.begin("LINE"),15;case 16:return this.begin("ID"),51;case 17:return this.begin("ID"),53;case 18:return 14;case 19:return this.begin("ID"),54;case 20:return this.popState(),this.popState(),this.begin("LINE"),52;case 21:return this.popState(),this.popState(),5;case 22:return this.begin("LINE"),37;case 23:return this.begin("LINE"),38;case 24:return this.begin("LINE"),39;case 25:return this.begin("LINE"),40;case 26:return this.begin("LINE"),50;case 27:return this.begin("LINE"),42;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),49;case 30:return this.begin("LINE"),45;case 31:return this.begin("LINE"),48;case 32:return this.begin("LINE"),47;case 33:return this.popState(),16;case 34:return 17;case 35:return 67;case 36:return 68;case 37:return 61;case 38:return 62;case 39:return 63;case 40:return 64;case 41:return 59;case 42:return 56;case 43:return this.begin("ID"),22;case 44:return this.begin("ID"),24;case 45:return 30;case 46:return 31;case 47:return this.begin("acc_title"),32;case 48:return this.popState(),"acc_title_value";case 49:return this.begin("acc_descr"),34;case 50:return this.popState(),"acc_descr_value";case 51:this.begin("acc_descr_multiline");break;case 52:this.popState();break;case 53:return"acc_descr_multiline_value";case 54:return 6;case 55:return 19;case 56:return 21;case 57:return 66;case 60:return 80;case 61:return 97;case 62:return 98;case 63:return 99;case 64:return 78;case 65:return 79;case 66:return 100;case 67:return 101;case 68:return 102;case 69:return 103;case 70:return 85;case 71:return 86;case 72:return 87;case 73:return 88;case 74:return 93;case 75:return 94;case 76:return 95;case 77:return 96;case 78:return 81;case 79:return 82;case 80:return 83;case 81:return 84;case 82:return 89;case 83:return 90;case 84:return 91;case 85:return 92;case 86:case 87:return 104;case 88:return 70;case 89:return 71;case 90:return 72;case 92:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[52,53],inclusive:!1},acc_descr:{rules:[50],inclusive:!1},acc_title:{rules:[48],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14],inclusive:!1},ALIAS:{rules:[2,3,20,21],inclusive:!1},LINE:{rules:[2,3,33],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,15,16,17,18,19,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],inclusive:!0}}}}();function wt(){this.yy={}}return xt.lexer=bt,(0,l.K2)(wt,"Parser"),wt.prototype=xt,xt.Parser=wt,new wt}();u.parser=u;var d=u,p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},f={FILLED:0,OPEN:1},g={LEFTOF:0,RIGHTOF:1,OVER:2},m="actor",y="control",v="database",x="entity",b=class{constructor(){this.state=new a.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=p,this.ARROWTYPE=f,this.PLACEMENT=g}static{(0,l.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,n,i,a){let s,o=this.state.records.currentBox;if(void 0!==a){let t;t=a.includes("\n")?a+"\n":"{\n"+a+"\n}",s=(0,r.H)(t,{schema:r.r})}i=s?.type??i,!s?.alias||n&&n.text!==e||(n={text:s.alias,wrap:n?.wrap,type:i});const l=this.state.records.actors.get(t);if(l){if(this.state.records.currentBox&&l.box&&this.state.records.currentBox!==l.box)throw new Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=l.box?l.box:this.state.records.currentBox,l.box=o,l&&e===l.name&&null==n)return}if(null==n?.text&&(n={text:e,type:i}),null!=i&&null!=n.text||(n={text:e,type:i}),this.state.records.actors.set(t,{box:o,name:e,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,n=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&n++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&n--;return n}addMessage(t,e,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(t,e,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:n,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:n};return l.Rm.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let n=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",r=t.trim());else{const e=(new Option).style;e.color=n,e.color!==n&&(n="transparent",r=t.trim())}const{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?(0,o.jZ)(a,(0,o.D7)()):void 0,color:n,wrap:i}}addNote(t,e,n){const r={actor:t,placement:e,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const n=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/&equals;/g,"="),t=t.replace(/&amp;/g,"&");const r=JSON.parse(t);this.insertLinks(n,r)}catch(r){l.Rm.error("error while parsing actor link text",r)}}addALink(t,e){const n=this.getActor(t);try{const t={};let r=(0,o.jZ)(e.text,(0,o.D7)());const i=r.indexOf("@");r=r.replace(/&equals;/g,"="),r=r.replace(/&amp;/g,"&");const a=r.slice(0,i-1).trim(),s=r.slice(i+1).trim();t[a]=s,this.insertLinks(n,t)}catch(r){l.Rm.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const n in e)t.links[n]=e[n]}addProperties(t,e){const n=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(n,r)}catch(r){l.Rm.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const n in e)t.properties[n]=e[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const n=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(n,e.properties),e.links&&this.insertLinks(n,e.links)}catch(i){l.Rm.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},w=(0,l.K2)(t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n \n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n`,"getStyles"),T="actor-top",k="actor-bottom",E="actor-box",A="actor-man",_=(0,l.K2)(function(t,e){return(0,i.tk)(t,e)},"drawRect"),C=(0,l.K2)(function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");const c=t.append("g");c.attr("id","actor"+s+"_popup"),c.attr("class","actorPopupMenu"),c.attr("display",l);var u="";void 0!==o.class&&(u=" "+o.class);let d=o.width>n?o.width:n;const p=c.append("rect");if(p.attr("class","actorPopupMenuPanel"+u),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",d),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),null!=a){var f=20;for(let t in a){var g=c.append("a"),m=(0,h.J)(a[t]);g.attr("xlink:href",m),g.attr("target","_blank"),it(r)(t,g,o.x+10,o.height+f,d,20,{class:"actor"},r),f+=30}}return p.attr("height",f),{height:o.height+f,width:d}},"drawPopup"),S=(0,l.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),R=(0,l.K2)(async function(t,e,n=null){let r=t.append("foreignObject");const i=await(0,o.dj)(e.text,(0,o.zj)()),a=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(r.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),"noteText"===e.class){const n=t.node().firstChild;n.setAttribute("height",a.height+2*e.textMargin);const i=n.getBBox();r.attr("x",Math.round(i.x+i.width/2-a.width/2)).attr("y",Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:t,stopx:i,starty:s}=n;if(t>i){const e=t;t=i,i=e}r.attr("x",Math.round(t+Math.abs(t-i)/2-a.width/2)),"loopText"===e.class?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-a.height))}return[r]},"drawKatex"),L=(0,l.K2)(function(t,e){let n=0,r=0;const i=e.text.split(o.Y2.lineBreakRegex),[a,c]=(0,s.I5)(e.fontSize);let h=[],u=0,d=(0,l.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=(0,l.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":d=(0,l.K2)(()=>Math.round(e.y+(n+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":d=(0,l.K2)(()=>Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,l]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(u=o*a);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==c&&i.style("font-size",c),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==u&&i.attr("dy",u);const p=l||s.pe;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else i.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),h.push(i)}return h},"drawText"),D=(0,l.K2)(function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}(0,l.K2)(n,"genPoints");const r=t.append("polygon");return r.attr("points",n(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,L(t,e),r},"drawLabel"),I=-1,N=(0,l.K2)((t,e,n,r)=>{t.select&&n.forEach(n=>{const i=e.get(n),a=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):r.mirrorActors&&a.attr("y2",i.stopy)})},"fixLifeLineHeights"),M=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();var h=c;r||(I++,Object.keys(e.links||{}).length&&!n.forceMenus&&h.attr("onclick",S(`actor${I}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=I,null!=e.links&&h.attr("id","root-"+I));const u=(0,i.PB)();var d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=r?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.rx=3,u.ry=3,u.name=e.name;const p=_(h,u);if(e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(h,u.x+u.width-20,u.y+10,t.substr(1)):(0,i.aC)(h,u.x+u.width-20,u.y+10,t)}rt(n,(0,o.Wi)(e.description))(e.description,h,u.x,u.y,u.width,u.height,{class:`actor ${E}`},n);let f=e.height;if(p.node){const t=p.node().getBBox();e.height=t.height,f=t.height}return f},"drawActorTypeParticipant"),O=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();var h=c;r||(I++,Object.keys(e.links||{}).length&&!n.forceMenus&&h.attr("onclick",S(`actor${I}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=I,null!=e.links&&h.attr("id","root-"+I));const u=(0,i.PB)();var d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=r?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name;const p={...u,x:u.x+-6,y:u.y+6,class:"actor"},f=_(h,u);if(_(h,p),e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(h,u.x+u.width-20,u.y+10,t.substr(1)):(0,i.aC)(h,u.x+u.width-20,u.y+10,t)}rt(n,(0,o.Wi)(e.description))(e.description,h,u.x-6,u.y+6,u.width,u.height,{class:`actor ${E}`},n);let g=e.height;if(f.node){const t=f.node().getBBox();e.height=t.height,g=t.height}return g},"drawActorTypeCollections"),P=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();let h=c;r||(I++,Object.keys(e.links||{}).length&&!n.forceMenus&&h.attr("onclick",S(`actor${I}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=I,null!=e.links&&h.attr("id","root-"+I));const u=(0,i.PB)();let d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=r?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name;const p=u.height/2,f=p/(2.5+u.height/50),g=h.append("g"),m=h.append("g");if(g.append("path").attr("d",`M ${u.x},${u.y+p}\n a ${f},${p} 0 0 0 0,${u.height}\n h ${u.width-2*f}\n a ${f},${p} 0 0 0 0,-${u.height}\n Z\n `).attr("class",d),m.append("path").attr("d",`M ${u.x},${u.y+p}\n a ${f},${p} 0 0 0 0,${u.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",d),g.attr("transform",`translate(${f}, ${-u.height/2})`),m.attr("transform",`translate(${u.width-f}, ${-u.height/2})`),e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim(),n=u.x+u.width-20,r=u.y+10;"@"===t.charAt(0)?(0,i.CP)(h,n,r,t.substr(1)):(0,i.aC)(h,n,r,t)}rt(n,(0,o.Wi)(e.description))(e.description,h,u.x,u.y,u.width,u.height,{class:`actor ${E}`},n);let y=e.height;const v=g.select("path:last-child");if(v.node()){const t=v.node().getBBox();e.height=t.height,y=t.height}return y},"drawActorTypeQueue"),$=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+75,c=t.append("g").lower();r||(I++,c.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=I);const h=t.append("g");let u=A;u+=r?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,i.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor";const p=e.x+e.width/2,f=a+32;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",p).attr("cy",f).attr("r",22).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${p}, ${f-22})`);const g=h.node().getBBox();return e.height=g.height+2*(n?.sequence?.labelBoxHeight??0),rt(n,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+22+(r?5:12),d.width,d.height,{class:`actor ${A}`},n),e.height},"drawActorTypeControl"),B=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+75,c=t.append("g").lower(),h=t.append("g");let u="actor";u+=r?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,i.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor";const p=e.x+e.width/2,f=a+(r?10:25),g=22;h.append("circle").attr("cx",p).attr("cy",f).attr("r",g).attr("width",e.width).attr("height",e.height),h.append("line").attr("x1",p-g).attr("x2",p+g).attr("y1",f+g).attr("y2",f+g).attr("stroke-width",2);const m=h.node().getBBox();return e.height=m.height+(n?.sequence?.labelBoxHeight??0),r||(I++,c.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=I),rt(n,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+(r?15:30),d.width,d.height,{class:`actor ${A}`},n),r?h.attr("transform","translate(0, 22)"):h.attr("transform","translate(0, 6)"),e.height},"drawActorTypeEntity"),F=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height+2*n.boxTextMargin,c=t.append("g").lower();let h=c;r||(I++,Object.keys(e.links||{}).length&&!n.forceMenus&&h.attr("onclick",S(`actor${I}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=I,null!=e.links&&h.attr("id","root-"+I));const u=(0,i.PB)();let d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=r?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name,u.x=e.x,u.y=a;const p=u.width/3,f=u.width/3,g=p/2,m=g/(2.5+p/50),y=h.append("g"),v=`\n M ${u.x},${u.y+m}\n a ${g},${m} 0 0 0 ${p},0\n a ${g},${m} 0 0 0 -${p},0\n l 0,${f-2*m}\n a ${g},${m} 0 0 0 ${p},0\n l 0,-${f-2*m}\n`;y.append("path").attr("d",v).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",d),y.attr("transform",`translate(${p}, ${m})`),e.rectData=u,rt(n,(0,o.Wi)(e.description))(e.description,h,u.x,u.y+35,u.width,u.height,{class:`actor ${E}`},n);const x=y.select("path:last-child");if(x.node()){const t=x.node().getBBox();e.height=t.height+(n.sequence.labelBoxHeight??0)}return e.height},"drawActorTypeDatabase"),z=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+80,c=22,h=t.append("g").lower();r||(I++,h.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=I);const u=t.append("g");let d=A;d+=r?` ${k}`:` ${T}`,u.attr("class",d),u.attr("name",e.name);const p=(0,i.PB)();p.x=e.x,p.y=a,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",u.append("line").attr("id","actor-man-torso"+I).attr("x1",e.x+e.width/2-55).attr("y1",a+12).attr("x2",e.x+e.width/2-15).attr("y2",a+12),u.append("line").attr("id","actor-man-arms"+I).attr("x1",e.x+e.width/2-55).attr("y1",a+2).attr("x2",e.x+e.width/2-55).attr("y2",a+22),u.append("circle").attr("cx",e.x+e.width/2).attr("cy",a+12).attr("r",c);const f=u.node().getBBox();return e.height=f.height+(n.sequence.labelBoxHeight??0),rt(n,(0,o.Wi)(e.description))(e.description,u,p.x,p.y+15,p.width,p.height,{class:`actor ${A}`},n),u.attr("transform","translate(0,21)"),e.height},"drawActorTypeBoundary"),K=(0,l.K2)(function(t,e,n,r){const a=r?e.stopy:e.starty,s=e.x+e.width/2,l=a+80,c=t.append("g").lower();r||(I++,c.append("line").attr("id","actor"+I).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=I);const h=t.append("g");let u=A;u+=r?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,i.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor",d.rx=3,d.ry=3,h.append("line").attr("id","actor-man-torso"+I).attr("x1",s).attr("y1",a+25).attr("x2",s).attr("y2",a+45),h.append("line").attr("id","actor-man-arms"+I).attr("x1",s-18).attr("y1",a+33).attr("x2",s+18).attr("y2",a+33),h.append("line").attr("x1",s-18).attr("y1",a+60).attr("x2",s).attr("y2",a+45),h.append("line").attr("x1",s).attr("y1",a+45).attr("x2",s+18-2).attr("y2",a+60);const p=h.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",a+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const f=h.node().getBBox();return e.height=f.height,rt(n,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+35,d.width,d.height,{class:`actor ${A}`},n),e.height},"drawActorTypeActor"),q=(0,l.K2)(async function(t,e,n,r){switch(e.type){case"actor":return await K(t,e,n,r);case"participant":return await M(t,e,n,r);case"boundary":return await z(t,e,n,r);case"control":return await $(t,e,n,r);case"entity":return await B(t,e,n,r);case"database":return await F(t,e,n,r);case"collections":return await O(t,e,n,r);case"queue":return await P(t,e,n,r)}},"drawActor"),U=(0,l.K2)(function(t,e,n){const r=t.append("g");W(r,e),e.name&&rt(n)(e.name,r,e.x,e.y+n.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},n),r.lower()},"drawBox"),j=(0,l.K2)(function(t){return t.append("g")},"anchorElement"),Y=(0,l.K2)(function(t,e,n,r,a){const s=(0,i.PB)(),o=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+a%3,s.width=e.stopx-e.startx,s.height=n-e.starty,_(o,s)},"drawActivation"),G=(0,l.K2)(async function(t,e,n,r){const{boxMargin:a,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:u,messageFontSize:d,messageFontWeight:p}=r,f=t.append("g"),g=(0,l.K2)(function(t,e,n,r){return f.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){g(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let m=(0,i.HT)();m.text=n,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=h||50,m.height=c||20,m.textMargin=s,m.class="labelText",D(f,m),m=et(),m.text=e.title,m.x=e.startx+h/2+(e.stopx-e.startx)/2,m.y=e.starty+a+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=!0;let y=(0,o.Wi)(m.text)?await R(f,m,e):L(f,m);if(void 0!==e.sectionTitles)for(const[i,l]of Object.entries(e.sectionTitles))if(l.message){m.text=l.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[i].y+a+s,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=e.wrap,(0,o.Wi)(m.text)?(e.starty=e.sections[i].y,await R(f,m,e)):L(f,m);let t=Math.round(y.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[i].height+=t-(a+s)}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),W=(0,l.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),V=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),H=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),X=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Z=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Q=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),J=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),tt=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),et=(0,l.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),nt=(0,l.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),rt=function(){function t(t,e,n,r,a,s,o){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,l,c,h){const{actorFontSize:u,actorFontFamily:d,actorFontWeight:p}=h,[f,g]=(0,s.I5)(u),m=t.split(o.Y2.lineBreakRegex);for(let s=0;s<m.length;s++){const t=s*f-f*(m.length-1)/2,o=e.append("text").attr("x",n+a/2).attr("y",r).style("text-anchor","middle").style("font-size",g).style("font-weight",p).style("font-family",d);o.append("tspan").attr("x",n+a/2).attr("dy",t).text(m[s]),o.attr("y",r+l/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(o,c)}}function n(t,n,r,a,s,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,o,l,c),i(u,l)}async function r(t,n,r,a,s,l,c,h){const u=await(0,o.Dl)(t,(0,o.zj)()),d=n.append("switch"),p=d.append("foreignObject").attr("x",r+s/2-u.width/2).attr("y",a+l/2-u.height/2).attr("width",u.width).attr("height",u.height).append("xhtml:div").style("height","100%").style("width","100%");p.append("div").style("text-align","center").style("vertical-align","middle").html(await(0,o.dj)(t,(0,o.zj)())),e(t,d,r,a,s,l,c,h),i(p,c)}function i(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return(0,l.K2)(t,"byText"),(0,l.K2)(e,"byTspan"),(0,l.K2)(n,"byFo"),(0,l.K2)(r,"byKatex"),(0,l.K2)(i,"_setTextAttrs"),function(i,a=!1){return a?r:"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),it=function(){function t(t,e,n,i,a,s,o){r(e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t),o)}function e(t,e,n,i,a,s,l,c){const{actorFontSize:h,actorFontFamily:u,actorFontWeight:d}=c,p=t.split(o.Y2.lineBreakRegex);for(let o=0;o<p.length;o++){const t=o*h-h*(p.length-1)/2,a=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").style("font-size",h).style("font-weight",d).style("font-family",u);a.append("tspan").attr("x",n).attr("dy",t).text(p[o]),a.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(a,l)}}function n(t,n,i,a,s,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,0,o,l,c),r(u,l)}function r(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return(0,l.K2)(t,"byText"),(0,l.K2)(e,"byTspan"),(0,l.K2)(n,"byFo"),(0,l.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),at=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),st=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),ot=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),lt=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),ct={drawRect:_,drawText:L,drawLabel:D,drawActor:q,drawBox:U,drawPopup:C,anchorElement:j,drawActivation:Y,drawLoop:G,drawBackgroundRect:W,insertArrowHead:Z,insertArrowFilledHead:Q,insertSequenceNumber:J,insertArrowCrossHead:tt,insertDatabaseIcon:V,insertComputerIcon:H,insertClockIcon:X,getTextObj:et,getNoteRect:nt,fixLifeLineHeights:N,sanitizeUrl:h.J,insertSolidTopArrowHead:at,insertSolidBottomArrowHead:st,insertStickTopArrowHead:ot,insertStickBottomArrowHead:lt},ht={},ut={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:(0,l.K2)(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,l.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,l.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,l.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,l.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,l.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,l.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,l.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,l.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,l.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,l.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,l.K2)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Tt((0,o.D7)())},"init"),updateVal:(0,l.K2)(function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},"updateVal"),updateBounds:(0,l.K2)(function(t,e,n,r){const i=this;let a=0;function s(s){return(0,l.K2)(function(o){a++;const l=i.sequenceItems.length-a+1;i.updateVal(o,"starty",e-l*ht.boxMargin,Math.min),i.updateVal(o,"stopy",r+l*ht.boxMargin,Math.max),i.updateVal(ut.data,"startx",t-l*ht.boxMargin,Math.min),i.updateVal(ut.data,"stopx",n+l*ht.boxMargin,Math.max),"activation"!==s&&(i.updateVal(o,"startx",t-l*ht.boxMargin,Math.min),i.updateVal(o,"stopx",n+l*ht.boxMargin,Math.max),i.updateVal(ut.data,"starty",e-l*ht.boxMargin,Math.min),i.updateVal(ut.data,"stopy",r+l*ht.boxMargin,Math.max))},"updateItemBounds")}(0,l.K2)(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:(0,l.K2)(function(t,e,n,r){const i=o.Y2.getMin(t,n),a=o.Y2.getMax(t,n),s=o.Y2.getMin(e,r),l=o.Y2.getMax(e,r);this.updateVal(ut.data,"startx",i,Math.min),this.updateVal(ut.data,"starty",s,Math.min),this.updateVal(ut.data,"stopx",a,Math.max),this.updateVal(ut.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l)},"insert"),newActivation:(0,l.K2)(function(t,e,n){const r=n.get(t.from),i=kt(t.from).length||0,a=r.x+r.width/2+(i-1)*ht.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+ht.activationWidth,stopy:void 0,actor:t.from,anchored:ct.anchorElement(e)})},"newActivation"),endActivation:(0,l.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,l.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,l.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,l.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:ut.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,l.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,l.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,l.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},dt=(0,l.K2)(async function(t,e){ut.bumpVerticalPos(ht.boxMargin),e.height=ht.boxMargin,e.starty=ut.getVerticalPos();const n=(0,i.PB)();n.x=e.startx,n.y=e.starty,n.width=e.width||ht.width,n.class="note";const r=t.append("g"),a=ct.drawRect(r,n),s=(0,i.HT)();s.x=e.startx,s.y=e.starty,s.width=n.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=ht.noteFontFamily,s.fontSize=ht.noteFontSize,s.fontWeight=ht.noteFontWeight,s.anchor=ht.noteAlign,s.textMargin=ht.noteMargin,s.valign="center";const l=(0,o.Wi)(s.text)?await R(r,s):L(r,s),c=Math.round(l.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));a.attr("height",c+2*ht.noteMargin),e.height+=c+2*ht.noteMargin,ut.bumpVerticalPos(c+2*ht.noteMargin),e.stopy=e.starty+c+2*ht.noteMargin,e.stopx=e.startx+n.width,ut.insert(e.startx,e.starty,e.stopx,e.stopy),ut.models.addNote(e)},"drawNote"),pt=(0,l.K2)(function(t,e,n,r,i,a,s){const o=r.db.getActors(),c=o.get(e.from),h=o.get(e.to),u=n.sequenceVisible;let d=c.x+c.width/2,p=h.x+h.width/2;const f=d<=p,g=Mt(e,r),m=t.append("g"),y=(0,l.K2)((t,e)=>{const n=t?16.5:-16.5;return e?-n:n},"getCircleOffset"),v=(0,l.K2)(t=>{m.append("circle").attr("cx",t).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:x,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:w}=r.db.LINETYPE;if(u)switch(e.centralConnection){case x:g&&(p+=y(f,!0));break;case b:g||(d+=y(f,!1));break;case w:g?p+=y(f,!0):d+=y(f,!1)}switch(e.centralConnection){case x:v(p);break;case b:v(d);break;case w:v(d),v(p)}},"drawCentralConnection"),ft=(0,l.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),gt=(0,l.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),mt=(0,l.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function yt(t,e){ut.bumpVerticalPos(10);const{startx:n,stopx:r,message:i}=e,a=o.Y2.splitBreaks(i).length,l=(0,o.Wi)(i),c=l?await(0,o.Dl)(i,(0,o.D7)()):s._K.calculateTextDimensions(i,ft(ht));if(!l){const t=c.height/a;e.height+=t,ut.bumpVerticalPos(t)}let h,u=c.height-10;const d=c.width;if(n===r){h=ut.getVerticalPos()+u,ht.rightAngles||(u+=ht.boxMargin,h=ut.getVerticalPos()+u),u+=30;const t=o.Y2.getMax(d/2,ht.width/2);ut.insert(n-t,ut.getVerticalPos()-10+u,r+t,ut.getVerticalPos()+30+u)}else u+=ht.boxMargin,h=ut.getVerticalPos()+u,ut.insert(n,h-10,r,h);return ut.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,ut.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),h}(0,l.K2)(yt,"boundMessage");var vt=(0,l.K2)(async function(t,e,n,r,a){const{startx:l,stopx:c,starty:h,message:u,type:d,sequenceIndex:p,sequenceVisible:f}=e,g=s._K.calculateTextDimensions(u,ft(ht)),m=(0,i.HT)();m.x=l,m.y=h+10,m.width=c-l,m.class="messageText",m.dy="1em",m.text=u,m.fontFamily=ht.messageFontFamily,m.fontSize=ht.messageFontSize,m.fontWeight=ht.messageFontWeight,m.anchor=ht.messageAlign,m.valign="center",m.textMargin=ht.wrapPadding,m.tspan=!1,(0,o.Wi)(m.text)?await R(t,m,{startx:l,stopx:c,starty:n}):L(t,m);const y=g.width;let v;if(l===c){const e=f||ht.showSequenceNumbers,i=Mt(a,r),s=Ot(a,r),c=l+(e&&(i||s)?10:0);v=ht.rightAngles?t.append("path").attr("d",`M ${c},${n} H ${l+o.Y2.getMax(ht.width/2,y/2)} V ${n+25} H ${l}`):t.append("path").attr("d","M "+c+","+n+" C "+(c+60)+","+(n-10)+" "+(l+60)+","+(n+30)+" "+l+","+(n+20))}else v=t.append("line"),v.attr("x1",l),v.attr("y1",n),v.attr("x2",c),v.attr("y2",n),It(a,r)&&pt(t,a,e,r,l,c,n);d===r.db.LINETYPE.DOTTED||d===r.db.LINETYPE.DOTTED_CROSS||d===r.db.LINETYPE.DOTTED_POINT||d===r.db.LINETYPE.DOTTED_OPEN||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===r.db.LINETYPE.SOLID_TOP_DOTTED||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===r.db.LINETYPE.STICK_TOP_DOTTED||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(v.style("stroke-dasharray","3, 3"),v.attr("class","messageLine1")):v.attr("class","messageLine0");let x="";if(ht.arrowMarkerAbsolute&&(x=(0,o.ID)(!0)),v.attr("stroke-width",2),v.attr("stroke","none"),v.style("fill","none"),d!==r.db.LINETYPE.SOLID_TOP&&d!==r.db.LINETYPE.SOLID_TOP_DOTTED||v.attr("marker-end","url("+x+"#solidTopArrowHead)"),d!==r.db.LINETYPE.SOLID_BOTTOM&&d!==r.db.LINETYPE.SOLID_BOTTOM_DOTTED||v.attr("marker-end","url("+x+"#solidBottomArrowHead)"),d!==r.db.LINETYPE.STICK_TOP&&d!==r.db.LINETYPE.STICK_TOP_DOTTED||v.attr("marker-end","url("+x+"#stickTopArrowHead)"),d!==r.db.LINETYPE.STICK_BOTTOM&&d!==r.db.LINETYPE.STICK_BOTTOM_DOTTED||v.attr("marker-end","url("+x+"#stickBottomArrowHead)"),d!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&d!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#solidBottomArrowHead)"),d!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&d!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#solidTopArrowHead)"),d!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&d!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#stickBottomArrowHead)"),d!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&d!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||v.attr("marker-start","url("+x+"#stickTopArrowHead)"),d!==r.db.LINETYPE.SOLID&&d!==r.db.LINETYPE.DOTTED||v.attr("marker-end","url("+x+"#arrowhead)"),d!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&d!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(v.attr("marker-start","url("+x+"#arrowhead)"),v.attr("marker-end","url("+x+"#arrowhead)")),d!==r.db.LINETYPE.SOLID_POINT&&d!==r.db.LINETYPE.DOTTED_POINT||v.attr("marker-end","url("+x+"#filled-head)"),d!==r.db.LINETYPE.SOLID_CROSS&&d!==r.db.LINETYPE.DOTTED_CROSS||v.attr("marker-end","url("+x+"#crosshead)"),f||ht.showSequenceNumbers){const i=d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,s=d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o=6,h=It(a,r);let u=l,f=c;i?(l<c?u=l+2*o:(u=l-o+(h?-5:0),u+=a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),v.attr("x1",u)):s?(c>l?f=c-2*o:(f=c-o,u+=a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),f+=h?15:0,v.attr("x2",f),v.attr("x1",u)):v.attr("x1",l+o);let g=0;const m=l<=c;g=l===c?e.fromBounds+1:s?m?e.toBounds-1:e.fromBounds+1:m?e.fromBounds+1:e.toBounds-1,t.append("line").attr("x1",g).attr("y1",n).attr("x2",g).attr("y2",n).attr("stroke-width",0).attr("marker-start","url("+x+"#sequencenumber)"),t.append("text").attr("x",g).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p)}},"drawMessage"),xt=(0,l.K2)(function(t,e,n,r,i,a,s){let l,c=0,h=0,u=0;for(const d of r){const t=e.get(d),r=t.box;l&&l!=r&&(s||ut.models.addBox(l),h+=ht.boxMargin+l.margin),r&&r!=l&&(s||(r.x=c+h,r.y=i),h+=r.margin),t.width=t.width||ht.width,t.height=o.Y2.getMax(t.height||ht.height,ht.height),t.margin=t.margin||ht.actorMargin,u=o.Y2.getMax(u,t.height),n.get(t.name)&&(h+=t.width/2),t.x=c+h,t.starty=ut.getVerticalPos(),ut.insert(t.x,i,t.x+t.width,t.height),c+=t.width+h,t.box&&(t.box.width=c+r.margin-t.box.x),h=t.margin,l=t.box,ut.models.addActor(t)}l&&!s&&ut.models.addBox(l),ut.bumpVerticalPos(u)},"addActorRenderingData"),bt=(0,l.K2)(async function(t,e,n,r){if(r){let r=0;ut.bumpVerticalPos(2*ht.boxMargin);for(const i of n){const n=e.get(i);n.stopy||(n.stopy=ut.getVerticalPos());const a=await ct.drawActor(t,n,ht,!0);r=o.Y2.getMax(r,a)}ut.bumpVerticalPos(r+ht.boxMargin)}else for(const i of n){const n=e.get(i);await ct.drawActor(t,n,ht,!1)}},"drawActors"),wt=(0,l.K2)(function(t,e,n,r){let i=0,a=0;for(const s of n){const n=e.get(s),o=Rt(n),l=ct.drawPopup(t,n,o,ht,ht.forceMenus,r);l.height>i&&(i=l.height),l.width+n.x>a&&(a=l.width+n.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Tt=(0,l.K2)(function(t){(0,o.hH)(ht,t),t.fontFamily&&(ht.actorFontFamily=ht.noteFontFamily=ht.messageFontFamily=t.fontFamily),t.fontSize&&(ht.actorFontSize=ht.noteFontSize=ht.messageFontSize=t.fontSize),t.fontWeight&&(ht.actorFontWeight=ht.noteFontWeight=ht.messageFontWeight=t.fontWeight)},"setConf"),kt=(0,l.K2)(function(t){return ut.activations.filter(function(e){return e.actor===t})},"actorActivations"),Et=(0,l.K2)(function(t,e){const n=e.get(t),r=kt(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},n.x+n.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},n.x+n.width/2+1)]},"activationBounds");function At(t,e,n,r,i){ut.bumpVerticalPos(n);let a=r;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,i=ft(ht);e.message=s._K.wrapLabel(`[${e.message}]`,n-2*ht.wrapPadding,i),e.width=n,e.wrap=!0;const c=s._K.calculateTextDimensions(e.message,i),h=o.Y2.getMax(c.height,ht.labelBoxHeight);a=r+h,l.Rm.debug(`${h} - ${e.message}`)}i(e),ut.bumpVerticalPos(a)}function _t(t,e,n,r,i,a,s){function o(n,r){n.x<i.get(t.from).x?(ut.insert(e.stopx-r,e.starty,e.startx,e.stopy+n.height/2+ht.noteMargin),e.stopx=e.stopx+r):(ut.insert(e.startx,e.starty,e.stopx+r,e.stopy+n.height/2+ht.noteMargin),e.stopx=e.stopx-r)}function c(n,r){n.x<i.get(t.to).x?(ut.insert(e.startx-r,e.starty,e.stopx,e.stopy+n.height/2+ht.noteMargin),e.startx=e.startx+r):(ut.insert(e.stopx,e.starty,e.startx+r,e.stopy+n.height/2+ht.noteMargin),e.startx=e.startx-r)}(0,l.K2)(o,"receiverAdjustment"),(0,l.K2)(c,"senderAdjustment");const h=[m,y,x,v];if(a.get(t.to)==r){const e=i.get(t.to);o(e,h.includes(e.type)?21:e.width/2+3),e.starty=n-e.height/2,ut.bumpVerticalPos(e.height/2)}else if(s.get(t.from)==r){const e=i.get(t.from);if(ht.mirrorActors){c(e,h.includes(e.type)?18:e.width/2)}e.stopy=n-e.height/2,ut.bumpVerticalPos(e.height/2)}else if(s.get(t.to)==r){const e=i.get(t.to);if(ht.mirrorActors){o(e,h.includes(e.type)?21:e.width/2+3)}e.stopy=n-e.height/2,ut.bumpVerticalPos(e.height/2)}}(0,l.K2)(At,"adjustLoopHeightForWrap"),(0,l.K2)(_t,"adjustCreatedDestroyedData");var Ct=(0,l.K2)(async function(t,e,n,r){const{securityLevel:i,sequence:a}=(0,o.D7)();let s;ht=a,"sandbox"===i&&(s=(0,c.Ltv)("#i"+e));const h="sandbox"===i?(0,c.Ltv)(s.nodes()[0].contentDocument.body):(0,c.Ltv)("body"),u="sandbox"===i?s.nodes()[0].contentDocument:document;ut.init(),l.Rm.debug(r.db);const d="sandbox"===i?h.select(`[id="${e}"]`):(0,c.Ltv)(`[id="${e}"]`),p=r.db.getActors(),f=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),m=r.db.getBoxes();let y=r.db.getActorKeys();const v=r.db.getMessages(),x=r.db.getDiagramTitle(),b=r.db.hasAtLeastOneBox(),w=r.db.hasAtLeastOneBoxWithTitle(),T=await St(p,v,r);if(ht.height=await Lt(p,T,m),ct.insertComputerIcon(d),ct.insertDatabaseIcon(d),ct.insertClockIcon(d),b&&(ut.bumpVerticalPos(ht.boxMargin),w&&ut.bumpVerticalPos(m[0].textMaxHeight)),!0===ht.hideUnusedParticipants){const t=new Set;v.forEach(e=>{t.add(e.from),t.add(e.to)}),y=y.filter(e=>t.has(e))}xt(d,p,f,y,0,v,!1);const k=await $t(v,p,T,r);function E(t,e){const n=ut.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),ct.drawActivation(d,n,e,ht,kt(t.from).length),ut.insert(n.startx,e-10,n.stopx,e)}ct.insertArrowHead(d),ct.insertArrowCrossHead(d),ct.insertArrowFilledHead(d),ct.insertSequenceNumber(d),ct.insertSolidTopArrowHead(d),ct.insertSolidBottomArrowHead(d),ct.insertStickTopArrowHead(d),ct.insertStickBottomArrowHead(d),(0,l.K2)(E,"activeEnd");let A=1,_=1;const C=[],S=[];let R=0;for(const o of v){let t,e,n;switch(o.type){case r.db.LINETYPE.NOTE:ut.resetVerticalPos(),e=o.noteModel,await dt(d,e);break;case r.db.LINETYPE.ACTIVE_START:case r.db.LINETYPE.CENTRAL_CONNECTION:case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:ut.newActivation(o,d,p);break;case r.db.LINETYPE.ACTIVE_END:E(o,ut.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=ut.endLoop(),await ct.drawLoop(d,t,"loop",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:At(k,o,ht.boxMargin,ht.boxMargin,t=>ut.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=ut.endLoop(),S.push(t),ut.models.addLoop(t),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos());break;case r.db.LINETYPE.OPT_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=ut.endLoop(),await ct.drawLoop(d,t,"opt",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:At(k,o,ht.boxMargin+ht.boxTextMargin,ht.boxMargin,t=>ut.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=ut.endLoop(),await ct.drawLoop(d,t,"alt",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t)),ut.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:At(k,o,ht.boxMargin+ht.boxTextMargin,ht.boxMargin,t=>ut.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=ut.endLoop(),await ct.drawLoop(d,t,"par",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:A=o.message.start||A,_=o.message.step||_,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:At(k,o,ht.boxMargin+ht.boxTextMargin,ht.boxMargin,t=>ut.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=ut.endLoop(),await ct.drawLoop(d,t,"critical",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:At(k,o,ht.boxMargin,ht.boxMargin+ht.boxTextMargin,t=>ut.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=ut.endLoop(),await ct.drawLoop(d,t,"break",ht),ut.bumpVerticalPos(t.stopy-ut.getVerticalPos()),ut.models.addLoop(t);break;default:try{n=o.msgModel,n.starty=ut.getVerticalPos(),n.sequenceIndex=A,n.sequenceVisible=r.db.showSequenceNumbers();const t=await yt(0,n);_t(o,n,t,R,p,f,g),C.push({messageModel:n,lineStartY:t,msg:o}),ut.models.addMessage(n)}catch(B){l.Rm.error("error while drawing message",B)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(A+=_),R++}l.Rm.debug("createdActors",f),l.Rm.debug("destroyedActors",g),await bt(d,p,y,!1);for(const o of C)await vt(d,o.messageModel,o.lineStartY,r,o.msg);ht.mirrorActors&&await bt(d,p,y,!0),S.forEach(t=>ct.drawBackgroundRect(d,t)),N(d,p,y,ht);for(const o of ut.models.boxes){o.height=ut.getVerticalPos()-o.y,ut.insert(o.x,o.y,o.x+o.width,o.height);const t=2*ht.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",ct.drawBox(d,o,ht)}b&&ut.bumpVerticalPos(ht.boxMargin);const L=wt(d,p,y,u),{bounds:D}=ut.getBounds();void 0===D.startx&&(D.startx=0),void 0===D.starty&&(D.starty=0),void 0===D.stopx&&(D.stopx=0),void 0===D.stopy&&(D.stopy=0);let I=D.stopy-D.starty;I<L.maxHeight&&(I=L.maxHeight);let M=I+2*ht.diagramMarginY;ht.mirrorActors&&(M=M-ht.boxMargin+ht.bottomMarginAdj);let O=D.stopx-D.startx;O<L.maxWidth&&(O=L.maxWidth);const P=O+2*ht.diagramMarginX;x&&d.append("text").text(x).attr("x",(D.stopx-D.startx)/2-2*ht.diagramMarginX).attr("y",-25),(0,o.a$)(d,M,P,ht.useMaxWidth);const $=x?40:0;d.attr("viewBox",D.startx-ht.diagramMarginX+" -"+(ht.diagramMarginY+$)+" "+P+" "+(M+$)),l.Rm.debug("models:",ut.models)},"draw");async function St(t,e,n){const r={};for(const i of e)if(t.get(i.to)&&t.get(i.from)){const e=t.get(i.to);if(i.placement===n.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===n.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const a=void 0!==i.placement,l=!a,c=a?gt(ht):ft(ht),h=i.wrap?s._K.wrapLabel(i.message,ht.width-2*ht.wrapPadding,c):i.message,u=((0,o.Wi)(h)?await(0,o.Dl)(i.message,(0,o.D7)()):s._K.calculateTextDimensions(h,c)).width+2*ht.wrapPadding;l&&i.from===e.nextActor?r[i.to]=o.Y2.getMax(r[i.to]||0,u):l&&i.from===e.prevActor?r[i.from]=o.Y2.getMax(r[i.from]||0,u):l&&i.from===i.to?(r[i.from]=o.Y2.getMax(r[i.from]||0,u/2),r[i.to]=o.Y2.getMax(r[i.to]||0,u/2)):i.placement===n.db.PLACEMENT.RIGHTOF?r[i.from]=o.Y2.getMax(r[i.from]||0,u):i.placement===n.db.PLACEMENT.LEFTOF?r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,u):i.placement===n.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,u/2)),e.nextActor&&(r[i.from]=o.Y2.getMax(r[i.from]||0,u/2)))}return l.Rm.debug("maxMessageWidthPerActor:",r),r}(0,l.K2)(St,"getMaxMessageWidthPerActor");var Rt=(0,l.K2)(function(t){let e=0;const n=mt(ht);for(const r in t.links){const t=s._K.calculateTextDimensions(r,n).width+2*ht.wrapPadding+2*ht.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function Lt(t,e,n){let r=0;for(const a of t.keys()){const e=t.get(a);e.wrap&&(e.description=s._K.wrapLabel(e.description,ht.width-2*ht.wrapPadding,mt(ht)));const n=(0,o.Wi)(e.description)?await(0,o.Dl)(e.description,(0,o.D7)()):s._K.calculateTextDimensions(e.description,mt(ht));e.width=e.wrap?ht.width:o.Y2.getMax(ht.width,n.width+2*ht.wrapPadding),e.height=e.wrap?o.Y2.getMax(n.height,ht.height):ht.height,r=o.Y2.getMax(r,e.height)}for(const a in e){const n=t.get(a);if(!n)continue;const r=t.get(n.nextActor);if(!r){const t=e[a]+ht.actorMargin-n.width/2;n.margin=o.Y2.getMax(t,ht.actorMargin);continue}const i=e[a]+ht.actorMargin-n.width/2-r.width/2;n.margin=o.Y2.getMax(i,ht.actorMargin)}let i=0;return n.forEach(e=>{const n=ft(ht);let r=e.actorKeys.reduce((e,n)=>e+(t.get(n).width+(t.get(n).margin||0)),0);r+=8*ht.boxMargin,r-=2*ht.boxTextMargin,e.wrap&&(e.name=s._K.wrapLabel(e.name,r-2*ht.wrapPadding,n));const a=s._K.calculateTextDimensions(e.name,n);i=o.Y2.getMax(a.height,i);const l=o.Y2.getMax(r,a.width+2*ht.wrapPadding);if(e.margin=ht.boxTextMargin,r<l){const t=(l-r)/2;e.margin+=t}}),n.forEach(t=>t.textMaxHeight=i),o.Y2.getMax(r,ht.height)}(0,l.K2)(Lt,"calculateActorMargins");var Dt=(0,l.K2)(async function(t,e,n){const r=e.get(t.from),i=e.get(t.to),a=r.x,c=i.x,h=t.wrap&&t.message;let u=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):s._K.calculateTextDimensions(h?s._K.wrapLabel(t.message,ht.width,gt(ht)):t.message,gt(ht));const d={width:h?ht.width:o.Y2.getMax(ht.width,u.width+2*ht.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(d.width=h?o.Y2.getMax(ht.width,u.width):o.Y2.getMax(r.width/2+i.width/2,u.width+2*ht.noteMargin),d.startx=a+(r.width+ht.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(d.width=h?o.Y2.getMax(ht.width,u.width+2*ht.noteMargin):o.Y2.getMax(r.width/2+i.width/2,u.width+2*ht.noteMargin),d.startx=a-d.width+(r.width-ht.actorMargin)/2):t.to===t.from?(u=s._K.calculateTextDimensions(h?s._K.wrapLabel(t.message,o.Y2.getMax(ht.width,r.width),gt(ht)):t.message,gt(ht)),d.width=h?o.Y2.getMax(ht.width,r.width):o.Y2.getMax(r.width,ht.width,u.width+2*ht.noteMargin),d.startx=a+(r.width-d.width)/2):(d.width=Math.abs(a+r.width/2-(c+i.width/2))+ht.actorMargin,d.startx=a<c?a+r.width/2-ht.actorMargin/2:c+i.width/2-ht.actorMargin/2),h&&(d.message=s._K.wrapLabel(t.message,d.width-2*ht.wrapPadding,gt(ht))),l.Rm.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`),d},"buildNoteModel"),It=(0,l.K2)(function(t,e){const{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=e.db.LINETYPE;return[n,r,i].includes(t.centralConnection)},"hasCentralConnection"),Nt=(0,l.K2)(function(t,e,n){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:s}=e.db.LINETYPE;let o=0;return t.centralConnection!==r&&t.centralConnection!==i||(o+=4),t.centralConnection!==r&&t.centralConnection!==i||t.type!==a&&t.type!==s||(o+=n?0:-6),o},"calculateCentralConnectionOffset"),Mt=(0,l.K2)(function(t,e){const{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:l,STICK_ARROW_BOTTOM_REVERSE_DOTTED:c}=e.db.LINETYPE;return[n,r,i,a,s,o,l,c].includes(t.type)},"isReverseArrowType"),Ot=(0,l.K2)(function(t,e){const{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=e.db.LINETYPE;return[n,r].includes(t.type)},"isBidirectionalArrowType"),Pt=(0,l.K2)(function(t,e,n){if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[r,i]=Et(t.from,e),[a,c]=Et(t.to,e),h=r<=a;let u=h?i:r,d=h?a:c;u+=Nt(t,n,h);const p=Math.abs(a-c)>2,f=(0,l.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?d=u:(t.activate&&!p&&(d+=f(ht.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(d+=f(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(u-=f(3)));const g=[r,i,a,c],m=Math.abs(u-d);t.wrap&&t.message&&(t.message=s._K.wrapLabel(t.message,o.Y2.getMax(m+2*ht.wrapPadding,ht.width),ft(ht)));const y=s._K.calculateTextDimensions(t.message,ft(ht));return{width:o.Y2.getMax(t.wrap?0:y.width+2*ht.wrapPadding,m+2*ht.wrapPadding,ht.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),$t=(0,l.K2)(async function(t,e,n,r){const i={},a=[];let s,c,h;for(const l of t){switch(l.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:l.id,msg:l.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:l.message&&(s=a.pop(),i[s.id]=s,i[l.id]=s,a.push(s));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),n=kt(l.from?l.from:l.to.actor).length,r=t.x+t.width/2+(n-1)*ht.activationWidth/2,i={startx:r,stopx:r+ht.activationWidth,actor:l.from,enabled:!0};ut.activations.push(i)}break;case r.db.LINETYPE.ACTIVE_END:{const t=ut.activations.map(t=>t.actor).lastIndexOf(l.from);ut.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(c=await Dt(l,e,r),l.noteModel=c,a.forEach(t=>{s=t,s.from=o.Y2.getMin(s.from,c.startx),s.to=o.Y2.getMax(s.to,c.startx+c.width),s.width=o.Y2.getMax(s.width,Math.abs(s.from-s.to))-ht.labelBoxWidth})):(h=Pt(l,e,r),l.msgModel=h,h.startx&&h.stopx&&a.length>0&&a.forEach(t=>{if(s=t,h.startx===h.stopx){const t=e.get(l.from),n=e.get(l.to);s.from=o.Y2.getMin(t.x-h.width/2,t.x-t.width/2,s.from),s.to=o.Y2.getMax(n.x+h.width/2,n.x+t.width/2,s.to),s.width=o.Y2.getMax(s.width,Math.abs(s.to-s.from))-ht.labelBoxWidth}else s.from=o.Y2.getMin(h.startx,s.from),s.to=o.Y2.getMax(h.stopx,s.to),s.width=o.Y2.getMax(s.width,h.width)-ht.labelBoxWidth}))}return ut.activations=[],l.Rm.debug("Loop type widths:",i),i},"calculateLoopBounds"),Bt={bounds:ut,drawActors:bt,drawActorsPopup:wt,setConf:Tt,draw:Ct},Ft={parser:d,get db(){return new b},renderer:Bt,styles:w,init:(0,l.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}},4070(t,e,n){"use strict";n.d(e,{diagram:()=>L});var r,i=n(8021),a=(n(9625),n(2627),n(9856),n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796)),s=n(4098),o=n(797),l=n(1444),c=n(567),h=n(697),u=(0,o.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,s.D7)().state.sizeUnit).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit),"drawStartState"),d=(0,o.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,s.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,s.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),p=(0,o.K2)((t,e)=>{const n=t.append("text").attr("x",2*(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.textHeight+2*(0,s.D7)().state.padding).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding).attr("width",r.width+2*(0,s.D7)().state.padding).attr("height",r.height+2*(0,s.D7)().state.padding).attr("rx",(0,s.D7)().state.radius),n},"drawSimpleState"),f=(0,o.K2)((t,e)=>{const n=(0,o.K2)(function(t,e,n){const r=t.append("tspan").attr("x",2*(0,s.D7)().state.padding).text(e);n||r.attr("dy",(0,s.D7)().state.textHeight)},"addTspan"),r=t.append("text").attr("x",2*(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.textHeight+1.3*(0,s.D7)().state.padding).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=r.height,a=t.append("text").attr("x",(0,s.D7)().state.padding).attr("y",i+.4*(0,s.D7)().state.padding+(0,s.D7)().state.dividerMargin+(0,s.D7)().state.textHeight).attr("class","state-description");let l=!0,c=!0;e.descriptions.forEach(function(t){l||(n(a,t,c),c=!1),l=!1});const h=t.append("line").attr("x1",(0,s.D7)().state.padding).attr("y1",(0,s.D7)().state.padding+i+(0,s.D7)().state.dividerMargin/2).attr("y2",(0,s.D7)().state.padding+i+(0,s.D7)().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,r.width);return h.attr("x2",d+3*(0,s.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding).attr("width",d+2*(0,s.D7)().state.padding).attr("height",u.height+i+2*(0,s.D7)().state.padding).attr("rx",(0,s.D7)().state.radius),t},"drawDescrState"),g=(0,o.K2)((t,e,n)=>{const r=(0,s.D7)().state.padding,i=2*(0,s.D7)().state.padding,a=t.node().getBBox(),o=a.width,l=a.x,c=t.append("text").attr("x",0).attr("y",(0,s.D7)().state.titleShift).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.id),h=c.node().getBBox().width+i;let u,d=Math.max(h,o);d===o&&(d+=i);const p=t.node().getBBox();e.doc,u=l-r,h>o&&(u=(o-d)/2+r),Math.abs(l-p.x)<r&&h>o&&(u=l-(h-o)/2);const f=1-(0,s.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",u).attr("y",f).attr("class",n?"alt-composit":"composit").attr("width",d).attr("height",p.height+(0,s.D7)().state.textHeight+(0,s.D7)().state.titleShift+1).attr("rx","0"),c.attr("x",u+r),h<=o&&c.attr("x",l+(d-i)/2-h/2+r),t.insert("rect",":first-child").attr("x",u).attr("y",(0,s.D7)().state.titleShift-(0,s.D7)().state.textHeight-(0,s.D7)().state.padding).attr("width",d).attr("height",3*(0,s.D7)().state.textHeight).attr("rx",(0,s.D7)().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",(0,s.D7)().state.titleShift-(0,s.D7)().state.textHeight-(0,s.D7)().state.padding).attr("width",d).attr("height",p.height+3+2*(0,s.D7)().state.textHeight).attr("rx",(0,s.D7)().state.radius),t},"addTitleAndBox"),m=(0,o.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,s.D7)().state.sizeUnit).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+2).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,o.K2)((t,e)=>{let n=(0,s.D7)().state.forkWidth,r=(0,s.D7)().state.forkHeight;if(e.parentId){let t=n;n=r,r=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding)},"drawForkJoinState"),v=(0,o.K2)((t,e,n,r)=>{let i=0;const a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const l=o.split(s.Y2.lineBreakRegex);let c=1.25*(0,s.D7)().state.noteMargin;for(const h of l){const t=h.trim();if(t.length>0){const r=a.append("tspan");if(r.text(t),0===c){c+=r.node().getBBox().height}i+=c,r.attr("x",e+(0,s.D7)().state.noteMargin),r.attr("y",n+i+1.25*(0,s.D7)().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),x=(0,o.K2)((t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",(0,s.D7)().state.padding),r=e.append("g"),{textWidth:i,textHeight:a}=v(t,0,0,r);return n.attr("height",a+2*(0,s.D7)().state.noteMargin),n.attr("width",i+2*(0,s.D7)().state.noteMargin),n},"drawNote"),b=(0,o.K2)(function(t,e){const n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&u(i),"end"===e.type&&m(i),"fork"!==e.type&&"join"!==e.type||y(i,e),"note"===e.type&&x(e.note.text,i),"divider"===e.type&&d(i),"default"===e.type&&0===e.descriptions.length&&p(i,e),"default"===e.type&&e.descriptions.length>0&&f(i,e);const a=i.node().getBBox();return r.width=a.width+2*(0,s.D7)().state.padding,r.height=a.height+2*(0,s.D7)().state.padding,r},"drawState"),w=0,T=(0,o.K2)(function(t,e,n){const r=(0,o.K2)(function(t){switch(t){case i.u4.relationType.AGGREGATION:return"aggregation";case i.u4.relationType.EXTENSION:return"extension";case i.u4.relationType.COMPOSITION:return"composition";case i.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const c=e.points,h=(0,l.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(l.qrM),u=t.append("path").attr("d",h(c)).attr("id","edge"+w).attr("class","transition");let d="";if((0,s.D7)().state.arrowMarkerAbsolute&&(d=(0,s.ID)(!0)),u.attr("marker-end","url("+d+"#"+r(i.u4.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const r=t.append("g").attr("class","stateLabel"),{x:i,y:l}=a._K.calcLabelPosition(e.points),c=s.Y2.getRows(n.title);let h=0;const u=[];let d=0,p=0;for(let t=0;t<=c.length;t++){const e=r.append("text").attr("text-anchor","middle").text(c[t]).attr("x",i).attr("y",l+h),n=e.node().getBBox();if(d=Math.max(d,n.width),p=Math.min(p,n.x),o.Rm.info(n.x,i,l+h),0===h){const t=e.node().getBBox();h=t.height,o.Rm.info("Title height",h,l)}u.push(e)}let f=h*c.length;if(c.length>1){const t=(c.length-1)*h*.5;u.forEach((e,n)=>e.attr("y",l+n*h-t)),f=h*c.length}const g=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",i-d/2-(0,s.D7)().state.padding/2).attr("y",l-f/2-(0,s.D7)().state.padding/2-3.5).attr("width",d+(0,s.D7)().state.padding).attr("height",f+(0,s.D7)().state.padding),o.Rm.info(g)}w++},"drawEdge"),k={},E=(0,o.K2)(function(){},"setConf"),A=(0,o.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),_=(0,o.K2)(function(t,e,n,i){r=(0,s.D7)().state;const a=(0,s.D7)().securityLevel;let c;"sandbox"===a&&(c=(0,l.Ltv)("#i"+e));const h="sandbox"===a?(0,l.Ltv)(c.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),u="sandbox"===a?c.nodes()[0].contentDocument:document;o.Rm.debug("Rendering diagram "+t);const d=h.select(`[id='${e}']`);A(d);const p=i.db.getRootDoc();S(p,d,void 0,!1,h,u,i);const f=r.padding,g=d.node().getBBox(),m=g.width+2*f,y=g.height+2*f,v=1.75*m;(0,s.a$)(d,y,v,r.useMaxWidth),d.attr("viewBox",`${g.x-r.padding} ${g.y-r.padding} `+m+" "+y)},"draw"),C=(0,o.K2)(t=>t?t.length*r.fontSizeFactor:1,"getLabelWidth"),S=(0,o.K2)((t,e,n,i,a,l,u)=>{const d=new h.T({compound:!0,multigraph:!0});let p,f=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){f=!1;break}n?d.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:f?1:r.edgeLengthFactor,nodeSep:f?1:50,isMultiGraph:!0}):d.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:f?1:r.edgeLengthFactor,nodeSep:f?1:50,ranker:"tight-tree",isMultiGraph:!0}),d.setDefaultEdgeLabel(function(){return{}});const m=u.db.getStates(),y=u.db.getRelations(),v=Object.keys(m);for(const s of v){const t=m[s];let o;if(n&&(t.parentId=n),t.doc){let n=e.append("g").attr("id",t.id).attr("class","stateGroup");o=S(t.doc,n,t.id,!i,a,l,u);{n=g(n,t,i);let e=n.node().getBBox();o.width=e.width,o.height=e.height+r.padding/2,k[t.id]={y:r.compositTitleSize}}}else o=b(e,t,d);if(t.note){const n={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},r=b(e,n,d);"left of"===t.note.position?(d.setNode(o.id+"-note",r),d.setNode(o.id,o)):(d.setNode(o.id,o),d.setNode(o.id+"-note",r)),d.setParent(o.id,o.id+"-group"),d.setParent(o.id+"-note",o.id+"-group")}else d.setNode(o.id,o)}o.Rm.debug("Count=",d.nodeCount(),d);let x=0;y.forEach(function(t){x++,o.Rm.debug("Setting edge",t),d.setEdge(t.id1,t.id2,{relation:t,width:C(t.title),height:r.labelHeight*s.Y2.getRows(t.title).length,labelpos:"c"},"id"+x)}),(0,c.Zp)(d),o.Rm.debug("Graph after layout",d.nodes());const w=e.node();d.nodes().forEach(function(t){if(void 0!==t&&void 0!==d.node(t)){o.Rm.warn("Node "+t+": "+JSON.stringify(d.node(t))),a.select("#"+w.id+" #"+t).attr("transform","translate("+(d.node(t).x-d.node(t).width/2)+","+(d.node(t).y+(k[t]?k[t].y:0)-d.node(t).height/2)+" )"),a.select("#"+w.id+" #"+t).attr("data-x-shift",d.node(t).x-d.node(t).width/2);l.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach(t=>{const e=t.parentElement;let n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)})}else o.Rm.debug("No Node "+t+": "+JSON.stringify(d.node(t)))});let E=w.getBBox();d.edges().forEach(function(t){void 0!==t&&void 0!==d.edge(t)&&(o.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(d.edge(t))),T(e,d.edge(t),d.edge(t).relation))}),E=w.getBBox();const A={id:n||"root",label:n||"root",width:0,height:0};return A.width=E.width+2*r.padding,A.height=E.height+2*r.padding,o.Rm.debug("Doc rendered",A,d),A},"renderDoc"),R={setConf:E,draw:_},L={parser:i.Zk,get db(){return new i.u4(1)},renderer:R,styles:i.tM,init:(0,o.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},4293(t,e,n){"use strict";n.d(e,{diagram:()=>a});var r=n(8021),i=(n(9625),n(2627),n(9856),n(5948),n(4769),n(1174),n(7879),n(1960),n(6779),n(796),n(4098),n(797)),a={parser:r.Zk,get db(){return new r.u4(2)},renderer:r.q7,styles:r.tM,init:(0,i.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},6550(t,e,n){"use strict";n.d(e,{diagram:()=>X});var r=n(4098),i=n(797),a=n(1444),s=n(5097),o=n(8041),l=n(5263),c=function(){var t=(0,i.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],r=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],h={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,i.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:r.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),r.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),r.getCommonDb().setAccDescription(this.$);break;case 12:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:r.addTask(a[o],0,""),this.$=a[o];break;case 16:r.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,n=[0],r=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){n.length=n.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),a.push(p.yytext),s.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=a[a.length-A],S._$={first_line:s[s.length-(A||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(A||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(A||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),a=a.slice(0,-1*A),s=s.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},u=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,n,r){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function d(){this.yy={}}return h.lexer=u,(0,i.K2)(d,"Parser"),d.prototype=h,h.Parser=d,new d}();c.parser=c;var h=c,u={};(0,i.VA)(u,{addEvent:()=>k,addSection:()=>x,addTask:()=>T,addTaskOrg:()=>E,clear:()=>v,default:()=>_,getCommonDb:()=>y,getSections:()=>b,getTasks:()=>w});var d="",p=0,f=[],g=[],m=[],y=(0,i.K2)(()=>r.Wt,"getCommonDb"),v=(0,i.K2)(function(){f.length=0,g.length=0,d="",m.length=0,(0,r.IU)()},"clear"),x=(0,i.K2)(function(t){d=t,f.push(t)},"addSection"),b=(0,i.K2)(function(){return f},"getSections"),w=(0,i.K2)(function(){let t=A();let e=0;for(;!t&&e<100;)t=A(),e++;return g.push(...m),g},"getTasks"),T=(0,i.K2)(function(t,e,n){const r={id:p++,section:d,type:d,task:t,score:e||0,events:n?[n]:[]};m.push(r)},"addTask"),k=(0,i.K2)(function(t){m.find(t=>t.id===p-1).events.push(t)},"addEvent"),E=(0,i.K2)(function(t){const e={section:d,type:d,description:t,task:t,classes:[]};g.push(e)},"addTaskOrg"),A=(0,i.K2)(function(){const t=(0,i.K2)(function(t){return m[t].processed},"compileTask");let e=!0;for(const[n,r]of m.entries())t(n),e=e&&r.processed;return e},"compileTasks"),_={clear:v,getCommonDb:y,addSection:x,getSections:b,getTasks:w,addTask:T,addTaskOrg:E,addEvent:k},C=(0,i.K2)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),S=(0,i.K2)(function(t,e){const n=15,r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function o(t){const r=(0,a.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const r=(0,a.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",r).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,i.K2)(o,"smile"),(0,i.K2)(l,"sad"),(0,i.K2)(c,"ambivalent"),e.score>3?o(s):e.score<3?l(s):c(s),r},"drawFace"),R=(0,i.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),L=(0,i.K2)(function(t,e){const n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},"drawText"),D=(0,i.K2)(function(t,e){function n(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-i)+" "+(t+n-1.2*i)+","+(e+r)+" "+t+","+(e+r)}(0,i.K2)(n,"genPoints");const r=t.append("polygon");r.attr("points",n(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),I=(0,i.K2)(function(t,e,n){const r=t.append("g"),i=$();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,C(r,i),B(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),N=-1,M=(0,i.K2)(function(t,e,n){const r=e.x+n.width/2,i=t.append("g");N++;i.append("line").attr("id","task"+N).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),S(i,{cx:r,cy:300+30*(5-e.score),score:e.score});const a=$();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,C(i,a),B(n)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)},"drawTask"),O=(0,i.K2)(function(t,e){C(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),P=(0,i.K2)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),$=(0,i.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),B=function(){function t(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const t=p*h-h*(d.length-1)/2,l=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+a/2).attr("dy",t).text(d[p]),l.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(l,o)}}function n(t,n,i,a,s,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,s,o,l,c),r(u,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return(0,i.K2)(t,"byText"),(0,i.K2)(e,"byTspan"),(0,i.K2)(n,"byFo"),(0,i.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),F=(0,i.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function z(t,e){t.each(function(){var t,n=(0,a.Ltv)(this),r=n.text().split(/(\s+|<br>)/).reverse(),i=[],s=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let a=0;a<r.length;a++)t=r[r.length-1-a],i.push(t),l.text(i.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(i.pop(),l.text(i.join(" ").trim()),i="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))})}(0,i.K2)(z,"wrap");var K=(0,i.K2)(function(t,e,n,r){const i=n%12-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+i);const s=a.append("g"),o=a.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(z,e.width).node().getBBox(),c=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.height=l.height+1.1*c*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),U(s,e,i,r),e},"drawNode"),q=(0,i.K2)(function(t,e,n){const r=t.append("g"),i=r.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(z,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return r.remove(),i.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),U=(0,i.K2)(function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),j={drawRect:C,drawCircle:R,drawSection:I,drawText:L,drawLabel:D,drawTask:M,drawBackgroundRect:O,getTextObj:P,getNoteRect:$,initGraphics:F,drawNode:K,getVirtualNodeHeight:q},Y=(0,i.K2)(function(t,e,n,s){const o=(0,r.D7)(),l=o.timeline?.leftMargin??50;i.Rm.debug("timeline",s.db);const c=o.securityLevel;let h;"sandbox"===c&&(h=(0,a.Ltv)("#i"+e));const u=("sandbox"===c?(0,a.Ltv)(h.nodes()[0].contentDocument.body):(0,a.Ltv)("body")).select("#"+e);u.append("g");const d=s.db.getTasks(),p=s.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),j.initGraphics(u);const f=s.db.getSections();i.Rm.debug("sections",f);let g=0,m=0,y=0,v=0,x=50+l,b=50;v=50;let w=0,T=!0;f.forEach(function(t){const e={number:w,descr:t,section:w,width:150,padding:20,maxHeight:g},n=j.getVirtualNodeHeight(u,e,o);i.Rm.debug("sectionHeight before draw",n),g=Math.max(g,n+20)});let k=0,E=0;i.Rm.debug("tasks.length",d.length);for(const[r,a]of d.entries()){const t={number:r,descr:a,section:a.section,width:150,padding:20,maxHeight:m},e=j.getVirtualNodeHeight(u,t,o);i.Rm.debug("taskHeight before draw",e),m=Math.max(m,e+20),k=Math.max(k,a.events.length);let n=0;for(const r of a.events){const t={descr:r,section:a.section,number:a.section,width:150,padding:20,maxHeight:50};n+=j.getVirtualNodeHeight(u,t,o)}a.events.length>0&&(n+=10*(a.events.length-1)),E=Math.max(E,n)}i.Rm.debug("maxSectionHeight before draw",g),i.Rm.debug("maxTaskHeight before draw",m),f&&f.length>0?f.forEach(t=>{const e=d.filter(e=>e.section===t),n={number:w,descr:t,section:w,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:g};i.Rm.debug("sectionNode",n);const r=u.append("g"),a=j.drawNode(r,n,w,o);i.Rm.debug("sectionNode output",a),r.attr("transform",`translate(${x}, 50)`),b+=g+50,e.length>0&&G(u,e,w,x,b,m,o,k,E,g,!1),x+=200*Math.max(e.length,1),b=50,w++}):(T=!1,G(u,d,w,x,b,m,o,k,E,g,!0));const A=u.node().getBBox();i.Rm.debug("bounds",A),p&&u.append("text").text(p).attr("x",A.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=T?g+m+150:m+100;u.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",y).attr("x2",A.width+3*l).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,r.ot)(void 0,u,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},"draw"),G=(0,i.K2)(function(t,e,n,r,a,s,o,l,c,h,u){for(const d of e){const e={descr:d.task,section:n,number:n,width:150,padding:20,maxHeight:s};i.Rm.debug("taskNode",e);const l=t.append("g").attr("class","taskWrapper"),h=j.drawNode(l,e,n,o).height;if(i.Rm.debug("taskHeight after draw",h),l.attr("transform",`translate(${r}, ${a})`),s=Math.max(s,h),d.events){const e=t.append("g").attr("class","lineWrapper");let i=s;a+=100,i+=W(t,d.events,n,r,a,o),a-=100,e.append("line").attr("x1",r+95).attr("y1",a+s).attr("x2",r+95).attr("y2",a+s+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}r+=200,u&&!o.timeline?.disableMulticolor&&n++}a-=10},"drawTasks"),W=(0,i.K2)(function(t,e,n,r,a,s){let o=0;const l=a;a+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=j.drawNode(l,e,n,s).height;o+=h,l.attr("transform",`translate(${r}, ${a})`),a=a+10+h}return a=l,o},"drawEvents"),V={setConf:(0,i.K2)(()=>{},"setConf"),draw:Y},H=(0,i.K2)(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],(0,s.A)(t["lineColor"+n])?t["lineColor"+n]=(0,o.A)(t["lineColor"+n],20):t["lineColor"+n]=(0,l.A)(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const r=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${r};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),X={db:u,renderer:V,parser:h,styles:(0,i.K2)(t=>`\n .edge {\n stroke-width: 3;\n }\n ${H(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`,"getStyles")}},957(t,e,n){"use strict";n.d(e,{diagram:()=>_t});var r=n(1475),i=n(796),a=n(4098),s=n(797),o=n(1444),l=n(5097),c=n(5635);const h=(t,e)=>(0,c.A)(t,"a",-e);var u=n(8041),d=n(5263);const p=1e-10;function f(t,e){const n=function(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=v(t[n],t[r]);for(const t of i)t.parentIndex=[n,r],e.push(t)}return e}(t),r=n.filter(e=>function(t,e){return e.every(e=>m(t,e)<e.radius+p)}(e,t));let i=0,a=0;const s=[];if(r.length>1){const e=x(r);for(let t=0;t<r.length;++t){const n=r[t];n.angle=Math.atan2(n.x-e.x,n.y-e.y)}r.sort((t,e)=>e.angle-t.angle);let n=r[r.length-1];for(let o=0;o<r.length;++o){const e=r[o];a+=(n.x+e.x)*(e.y-n.y);const l={x:(e.x+n.x)/2,y:(e.y+n.y)/2};let c=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.includes(e.parentIndex[r])){const i=t[e.parentIndex[r]],a=Math.atan2(e.x-i.x,e.y-i.y),s=Math.atan2(n.x-i.x,n.y-i.y);let o=s-a;o<0&&(o+=2*Math.PI);const h=s-o/2;let u=m(l,{x:i.x+i.radius*Math.sin(h),y:i.y+i.radius*Math.cos(h)});u>2*i.radius&&(u=2*i.radius),(null==c||c.width>u)&&(c={circle:i,width:u,p1:e,p2:n,large:u>i.radius,sweep:!0})}null!=c&&(s.push(c),i+=g(c.circle.radius,c.width),n=e)}}else{let e=t[0];for(let r=1;r<t.length;++r)t[r].radius<e.radius&&(e=t[r]);let n=!1;for(let r=0;r<t.length;++r)if(m(t[r],e)>Math.abs(e.radius-t[r].radius)){n=!0;break}n?i=a=0:(i=e.radius*e.radius*Math.PI,s.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-p,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),i+a}function g(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function m(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function y(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=e-(n*n-t*t+e*e)/(2*n);return g(t,t-(n*n-e*e+t*t)/(2*n))+g(e,r)}function v(t,e){const n=m(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const a=(r*r-i*i+n*n)/(2*n),s=Math.sqrt(r*r-a*a),o=t.x+a*(e.x-t.x)/n,l=t.y+a*(e.y-t.y)/n,c=-(e.y-t.y)*(s/n),h=-(e.x-t.x)*(s/n);return[{x:o+c,y:l-h},{x:o-c,y:l+h}]}function x(t){const e={x:0,y:0};for(const n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function b(t){const e=new Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function w(t,e){return b(t).map(()=>b(e))}function T(t,e){let n=0;for(let r=0;r<t.length;++r)n+=t[r]*e[r];return n}function k(t){return Math.sqrt(T(t,t))}function E(t,e,n){for(let r=0;r<e.length;++r)t[r]=e[r]*n}function A(t,e,n,r,i){for(let a=0;a<t.length;++a)t[a]=e*n[a]+r*i[a]}function _(t,e,n){const r=(n=n||{}).maxIterations||200*e.length,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,s=n.minErrorDelta||1e-6,o=n.minErrorDelta||1e-5,l=void 0!==n.rho?n.rho:1,c=void 0!==n.chi?n.chi:2,h=void 0!==n.psi?n.psi:-.5,u=void 0!==n.sigma?n.sigma:.5;let d;const p=e.length,f=new Array(p+1);f[0]=e,f[0].fx=t(e),f[0].id=0;for(let w=0;w<p;++w){const n=e.slice();n[w]=n[w]?n[w]*i:a,f[w+1]=n,f[w+1].fx=t(n),f[w+1].id=w+1}function g(t){for(let e=0;e<t.length;e++)f[p][e]=t[e];f[p].fx=t.fx}const m=(t,e)=>t.fx-e.fx,y=e.slice(),v=e.slice(),x=e.slice(),b=e.slice();for(let w=0;w<r;++w){if(f.sort(m),n.history){const t=f.map(t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:f[0].slice(),fx:f[0].fx,simplex:t})}d=0;for(let t=0;t<p;++t)d=Math.max(d,Math.abs(f[0][t]-f[1][t]));if(Math.abs(f[0].fx-f[p].fx)<s&&d<o)break;for(let t=0;t<p;++t){y[t]=0;for(let e=0;e<p;++e)y[t]+=f[e][t];y[t]/=p}const e=f[p];if(A(v,1+l,y,-l,e),v.fx=t(v),v.fx<f[0].fx)A(b,1+c,y,-c,e),b.fx=t(b),b.fx<v.fx?g(b):g(v);else if(v.fx>=f[p-1].fx){let n=!1;if(v.fx>e.fx?(A(x,1+h,y,-h,e),x.fx=t(x),x.fx<e.fx?g(x):n=!0):(A(x,1-h*l,y,h*l,e),x.fx=t(x),x.fx<v.fx?g(x):n=!0),n){if(u>=1)break;for(let e=1;e<f.length;++e)A(f[e],1-u,f[0],u,f[e]),f[e].fx=t(f[e])}}else g(v)}return f.sort(m),{fx:f[0].fx,x:f[0]}}function C(t,e,n,r,i,a,s){const o=n.fx,l=T(n.fxprime,e);let c=o,h=o,u=l,d=0;function p(h,d,p){for(let f=0;f<16;++f)if(i=(h+d)/2,A(r.x,1,n.x,i,e),c=r.fx=t(r.x,r.fxprime),u=T(r.fxprime,e),c>o+a*i*l||c>=p)d=i;else{if(Math.abs(u)<=-s*l)return i;u*(d-h)>=0&&(d=h),h=i,p=c}return 0}i=i||1,a=a||1e-6,s=s||.1;for(let f=0;f<10;++f){if(A(r.x,1,n.x,i,e),c=r.fx=t(r.x,r.fxprime),u=T(r.fxprime,e),c>o+a*i*l||f&&c>=h)return p(d,i,h);if(Math.abs(u)<=-s*l)return i;if(u>=0)return p(i,d,c);h=c,d=i,i*=2}return i}function S(t,e,n){let r={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const a=e.slice();let s,o,l,c=1;l=(n=n||{}).maxIterations||20*e.length,r.fx=t(r.x,r.fxprime),s=r.fxprime.slice(),E(s,r.fxprime,-1);for(let h=0;h<l;++h){if(c=C(t,s,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),c){A(a,1,i.fxprime,-1,r.fxprime);const t=T(r.fxprime,r.fxprime);A(s,Math.max(0,T(a,i.fxprime)/t),s,-1,i.fxprime),o=r,r=i,i=o}else E(s,r.fxprime,-1);if(k(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),r}function R(t,e={}){e.maxIterations=e.maxIterations||500;const n=e.initialLayout||I,r=e.lossFunction||N,i=function(t,e={}){const n=e.distinct,r=t.map(t=>Object.assign({},t));function i(t){return t.join(";")}if(n){const t=new Map;for(const e of r)for(let n=0;n<e.sets.length;n++){const r=String(e.sets[n]);t.set(r,e.size+(t.get(r)||0));for(let i=n+1;i<e.sets.length;i++){const n=String(e.sets[i]),a=`${r};${n}`,s=`${n};${r}`;t.set(a,e.size+(t.get(a)||0)),t.set(s,e.size+(t.get(s)||0))}}for(const e of r)e.sets.length<3&&(e.size=t.get(i(e.sets)))}const a=[],s=new Set;for(const o of r)if(1===o.sets.length)a.push(o.sets[0]);else if(2===o.sets.length){const t=o.sets[0],e=o.sets[1];s.add(i(o.sets)),s.add(i([e,t]))}a.sort((t,e)=>t===e?0:t<e?-1:1);for(let o=0;o<a.length;++o){const t=a[o];for(let e=o+1;e<a.length;++e){const n=a[e];s.has(i([t,n]))||r.push({sets:[t,n],size:0})}}return r}(t,e),a=n(i,e),s=Object.keys(a),o=[];for(const c of s)o.push(a[c].x),o.push(a[c].y);const l=_(t=>{const e={};for(let n=0;n<s.length;++n){const r=s[n];e[r]={x:t[2*n],y:t[2*n+1],radius:a[r].radius}}return r(e,i)},o,e).x;for(let c=0;c<s.length;++c){const t=s[c];a[t].x=l[2*c],a[t].y=l[2*c+1]}return a}const L=1e-10;function D(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,r){const i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,s=t(e),o=t(n);let l=n-e;if(s*o>0)throw"Initial bisect points must have opposite signs";if(0===s)return e;if(0===o)return n;for(let c=0;c<i;++c){l/=2;const n=e+l,r=t(n);if(r*s>=0&&(e=n),Math.abs(l)<a||0===r)return n}return e+l}(r=>y(t,e,r)-n,0,t+e)}function I(t,e={}){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:N,r={},i={};for(const u of t)if(1===u.sets.length){const t=u.sets[0];r[t]={x:1e10,y:1e10,rowid:r.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},i[t]=[]}t=t.filter(t=>2===t.sets.length);for(const u of t){let t=null!=u.weight?u.weight:1;const e=u.sets[0],n=u.sets[1];u.size+L>=Math.min(r[e].size,r[n].size)&&(t=0),i[e].push({set:n,size:u.size,weight:t}),i[n].push({set:e,size:u.size,weight:t})}const a=[];function s(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n<i[t].length;++n)e+=i[t][n].size*i[t][n].weight;a.push({set:t,size:e})}),a.sort(s);const o={};function l(t){return t.set in o}function c(t,e){r[e].x=t.x,r[e].y=t.y,o[e]=!0}c({x:0,y:0},a[0].set);for(let u=1;u<a.length;++u){const e=a[u].set,o=i[e].filter(l),d=r[e];if(o.sort(s),0===o.length)throw"ERROR: missing pairwise overlap information";const p=[];for(var h=0;h<o.length;++h){const t=r[o[h].set],e=D(d.radius,t.radius,o[h].size);p.push({x:t.x+e,y:t.y}),p.push({x:t.x-e,y:t.y}),p.push({y:t.y+e,x:t.x}),p.push({y:t.y-e,x:t.x});for(let n=h+1;n<o.length;++n){const i=r[o[n].set],a=D(d.radius,i.radius,o[n].size),s=v({x:t.x,y:t.y,radius:e},{x:i.x,y:i.y,radius:a});p.push(...s)}}let f=1e50,g=p[0];for(const i of p){r[e].x=i.x,r[e].y=i.y;const a=n(r,t);a<f&&(f=a,g=i)}c(g,e)}return r}(t,e);const r=e.lossFunction||N;if(t.length>=8){const i=function(t,e={}){const n=e.restarts||10,r=[],i={};for(const d of t)1===d.sets.length&&(i[d.sets[0]]=r.length,r.push(d));let{distances:a,constraints:s}=function(t,e,n){const r=w(e.length,e.length),i=w(e.length,e.length);return t.filter(t=>2===t.sets.length).forEach(t=>{const a=n[t.sets[0]],s=n[t.sets[1]],o=D(Math.sqrt(e[a].size/Math.PI),Math.sqrt(e[s].size/Math.PI),t.size);r[a][s]=r[s][a]=o;let l=0;t.size+1e-10>=Math.min(e[a].size,e[s].size)?l=1:t.size<=1e-10&&(l=-1),i[a][s]=i[s][a]=l}),{distances:r,constraints:i}}(t,r,i);const o=k(a.map(k))/a.length;a=a.map(t=>t.map(t=>t/o));const l=(t,e)=>function(t,e,n,r){for(let a=0;a<e.length;++a)e[a]=0;let i=0;for(let a=0;a<n.length;++a){const s=t[2*a],o=t[2*a+1];for(let l=a+1;l<n.length;++l){const c=t[2*l],h=t[2*l+1],u=n[a][l],d=r[a][l],p=(c-s)*(c-s)+(h-o)*(h-o),f=Math.sqrt(p),g=p-u*u;d>0&&f<=u||d<0&&f>=u||(i+=2*g*g,e[2*a]+=4*g*(s-c),e[2*a+1]+=4*g*(o-h),e[2*l]+=4*g*(c-s),e[2*l+1]+=4*g*(h-o))}}return i}(t,e,a,s);let c=null;for(let d=0;d<n;++d){const t=S(l,b(2*a.length).map(Math.random),e);(!c||t.fx<c.fx)&&(c=t)}const h=c.x,u={};for(let d=0;d<r.length;++d){const t=r[d];u[t.sets[0]]={x:h[2*d]*o,y:h[2*d+1]*o,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(const d of e.history)E(d.x,o);return u}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function N(t,e){let n=0;for(const r of e){if(1===r.sets.length)continue;let e;if(2===r.sets.length){const n=t[r.sets[0]],i=t[r.sets[1]];e=y(n.radius,i.radius,m(n,i))}else e=f(r.sets.map(e=>t[e]));n+=(null!=r.weight?r.weight:1)*(e-r.size)*(e-r.size)}return n}function M(t,e){let n=0;for(const r of e){if(1===r.sets.length)continue;let e;if(2===r.sets.length){const n=t[r.sets[0]],i=t[r.sets[1]];e=y(n.radius,i.radius,m(n,i))}else e=f(r.sets.map(e=>t[e]));const i=null!=r.weight?r.weight:1,a=Math.log((e+1)/(r.size+1));n+=i*a*a}return n}function O(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){const e=t[0].x,n=t[0].y;for(const r of t)r.x-=e,r.y-=n}if(2===t.length){m(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y)}if(t.length>1){const n=Math.atan2(t[1].x,t[1].y)-e,r=Math.cos(n),i=Math.sin(n);for(const e of t){const t=e.x,n=e.y;e.x=r*t-i*n,e.y=i*t+r*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){const e=t[1].y/(1e-10+t[1].x);for(const n of t){var r=(n.x+e*n.y)/(1+e*e);n.x=2*r-n.x,n.y=2*r*e-n.y}}}}function P(t){const e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),Number.NEGATIVE_INFINITY),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),Number.POSITIVE_INFINITY)});return{xRange:e("x"),yRange:e("y")}}function $(t,e,n){null==e&&(e=Math.PI/2);let r=z(t).map(t=>Object.assign({},t));const i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}function n(t,n){const r=e(t),i=e(n);r.parent=i}t.forEach(t=>{t.parent=t});for(let i=0;i<t.length;++i)for(let e=i+1;e<t.length;++e){const r=t[i].radius+t[e].radius;m(t[i],t[e])+1e-10<r&&n(t[e],t[i])}const r=new Map;for(let i=0;i<t.length;++i){const n=e(t[i]).parent.setid;r.has(n)||r.set(n,[]),r.get(n).push(t[i])}return t.forEach(t=>{delete t.parent}),Array.from(r.values())}(r);for(const c of i){O(c,e,n);const t=P(c);c.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),c.bounds=t}i.sort((t,e)=>e.size-t.size),r=i[0];let a=r.bounds;const s=(a.xRange.max-a.xRange.min)/50;function o(t,e,n){if(!t)return;const i=t.bounds;let o,l;if(e)o=a.xRange.max-i.xRange.min+s;else{o=a.xRange.max-i.xRange.max;const t=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;t<0&&(o+=t)}if(n)l=a.yRange.max-i.yRange.min+s;else{l=a.yRange.max-i.yRange.max;const t=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;t<0&&(l+=t)}for(const a of t)a.x+=o,a.y+=l,r.push(a)}let l=1;for(;l<i.length;)o(i[l],!0,!1),o(i[l+1],!1,!0),o(i[l+2],!0,!0),l+=3,a=P(r);return F(r)}function B(t,e,n,r,i){const a=z(t);e-=2*r,n-=2*r;const{xRange:s,yRange:o}=P(a);if(s.max===s.min||o.max===o.min)return console.log("not scaling solution: zero size detected"),t;let l,c;if(i){const t=2*Math.sqrt(i/Math.PI);l=e/t,c=n/t}else l=e/(s.max-s.min),c=n/(o.max-o.min);const h=Math.min(c,l),u=(e-(s.max-s.min)*h)/2,d=(n-(o.max-o.min)*h)/2;return F(a.map(t=>({radius:h*t.radius,x:r+u+(t.x-s.min)*h,y:r+d+(t.y-o.min)*h,setid:t.setid})))}function F(t){const e={};for(const n of t)e[n.setid]=n;return e}function z(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function K(t={}){let e=!1,n=600,r=350,i=15,a=1e3,s=Math.PI/2,o=!0,l=null,c=!0,h=!0,u=null,d=null,p=!1,f=null,g=!(!t||!t.symmetricalTextCentre)&&t.symmetricalTextCentre,m={},y=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],v=0,x=function(t){if(t in m)return m[t];var e=m[t]=y[v];return v+=1,v>=y.length&&(v=0),e},b=R,w=N;function T(m){let y=m.datum();const v=new Set;y.forEach(t=>{0==t.size&&1==t.sets.length&&v.add(t.sets[0])}),y=y.filter(t=>!t.sets.some(t=>v.has(t)));let T={},k={};if(y.length>0){let t=b(y,{lossFunction:w,distinct:p});o&&(t=$(t,s,d)),T=B(t,n,r,i,l),k=G(T,y,g)}const E={};function A(t){return t.sets in E?E[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}y.forEach(t=>{t.label&&(E[t.sets]=t.label)}),m.selectAll("svg").data([T]).enter().append("svg");const _=m.select("svg");e?_.attr("viewBox",`0 0 ${n} ${r}`):_.attr("width",n).attr("height",r);const C={};let S=!1;function R(t){return e=>H(t.sets.map(t=>{let i=C[t],a=T[t];return i||(i={x:n/2,y:r/2,radius:1}),a||(a={x:n/2,y:r/2,radius:1}),{x:i.x*(1-e)+a.x*e,y:i.y*(1-e)+a.y*e,radius:i.radius*(1-e)+a.radius*e}}),f)}_.selectAll(".venn-area path").each(function(t){const e=this.getAttribute("d");1==t.sets.length&&e&&!p&&(S=!0,C[t.sets[0]]=function(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}(e))});const L=_.selectAll(".venn-area").data(y,t=>t.sets),D=L.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),I=D.append("path"),N=D.append("text").attr("class","label").text(t=>A(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",r/2);function M(t){return"function"==typeof t.transition?t.transition("venn").duration(a):t}h&&(I.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:x(t.sets)).style("fill-opacity",".25"),N.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?x(e.sets):"#444"));let O=m;S&&"function"==typeof O.transition?(O=M(m),O.selectAll("path").attrTween("d",R)):O.selectAll("path").attr("d",t=>H(t.sets.map(t=>T[t])),f);const P=O.selectAll("text").filter(t=>t.sets in k).text(t=>A(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));c&&(S?"on"in P?P.on("end",q(T,A)):P.each("end",q(T,A)):P.each(q(T,A)));const F=M(L.exit()).remove();"function"==typeof L.transition&&F.selectAll("path").attrTween("d",R);const z=F.selectAll("text").attr("x",n/2).attr("y",r/2);return null!==u&&(N.style("font-size","0px"),P.style("font-size",u),z.style("font-size","0px")),{circles:T,textCentres:k,nodes:L,enter:D,update:O,exit:F}}return T.wrap=function(t){return arguments.length?(c=t,T):c},T.useViewBox=function(){return e=!0,T},T.width=function(t){return arguments.length?(n=t,T):n},T.height=function(t){return arguments.length?(r=t,T):r},T.padding=function(t){return arguments.length?(i=t,T):i},T.distinct=function(t){return arguments.length?(p=t,T):p},T.colours=function(t){return arguments.length?(x=t,T):x},T.colors=function(t){return arguments.length?(x=t,T):x},T.fontSize=function(t){return arguments.length?(u=t,T):u},T.round=function(t){return arguments.length?(f=t,T):f},T.duration=function(t){return arguments.length?(a=t,T):a},T.layoutFunction=function(t){return arguments.length?(b=t,T):b},T.normalize=function(t){return arguments.length?(o=t,T):o},T.scaleToFit=function(t){return arguments.length?(l=t,T):l},T.styled=function(t){return arguments.length?(h=t,T):h},T.orientation=function(t){return arguments.length?(s=t,T):s},T.orientationOrder=function(t){return arguments.length?(d=t,T):d},T.lossFunction=function(t){return arguments.length?(w="default"===t?N:"logRatio"===t?M:t,T):w},T}function q(t,e){return function(n){const r=this,i=t[n.sets[0]].radius||50,a=e(n)||"",s=a.split(/\s+/).reverse(),o=(a.length+s.length)/3;let l=s.pop(),c=[l],h=0;r.textContent=null;const u=[];function d(t){const e=r.ownerDocument.createElementNS(r.namespaceURI,"tspan");return e.textContent=t,u.push(e),r.append(e),e}let p=d(l);for(;l=s.pop(),l;){c.push(l);const t=c.join(" ");p.textContent=t,t.length>o&&p.getComputedTextLength()>i&&(c.pop(),p.textContent=c.join(" "),c=[l],p=d(l),h++)}const f=.35-1.1*h/2,g=r.getAttribute("x"),m=r.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",m),t.setAttribute("dy",`${f+1.1*e}em`)})}}function U(t,e,n){let r=e[0].radius-m(e[0],t);for(let i=1;i<e.length;++i){const n=e[i].radius-m(e[i],t);n<=r&&(r=n)}for(let i=0;i<n.length;++i){const e=m(n[i],t)-n[i].radius;e<=r&&(r=e)}return r}function j(t,e,n){const r=[];for(const h of t)r.push({x:h.x,y:h.y}),r.push({x:h.x+h.radius/2,y:h.y}),r.push({x:h.x-h.radius/2,y:h.y}),r.push({x:h.x,y:h.y+h.radius/2}),r.push({x:h.x,y:h.y-h.radius/2});let i=r[0],a=U(r[0],t,e);for(let h=1;h<r.length;++h){const n=U(r[h],t,e);n>=a&&(i=r[h],a=n)}const s=_(n=>-1*U({x:n[0],y:n[1]},t,e),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:n?0:s[0],y:s[1]};let l=!0;for(const h of t)if(m(o,h)>h.radius){l=!1;break}for(const h of e)if(m(o,h)<h.radius){l=!1;break}if(l)return o;if(1==t.length)return{x:t[0].x,y:t[0].y};const c={};return f(t,c),0===c.arcs.length?{x:0,y:-1e3,disjoint:!0}:1==c.arcs.length?{x:c.arcs[0].circle.x,y:c.arcs[0].circle.y}:e.length?j(t,[]):x(c.arcs.map(t=>t.p1))}function Y(t){const e={},n=Object.keys(t);for(const r of n)e[r]=[];for(let r=0;r<n.length;r++){const i=n[r],a=t[i];for(let s=r+1;s<n.length;++s){const r=n[s],o=t[r],l=m(a,o);l+o.radius<=a.radius+1e-10?e[r].push(i):l+a.radius<=o.radius+1e-10&&e[i].push(r)}}return e}function G(t,e,n){const r={},i=Y(t);for(let a=0;a<e.length;++a){const s=e[a].sets,o={},l={};for(let t=0;t<s.length;++t){o[s[t]]=!0;const e=i[s[t]];for(let t=0;t<e.length;++t)l[e[t]]=!0}const c=[],h=[];for(let e in t)e in o?c.push(t[e]):e in l||h.push(t[e]);const u=j(c,h,n);r[s]=u,u.disjoint&&e[a].size>0&&console.log("WARNING: area "+s+" not represented on screen")}return r}function W(t){if(0===t.length)return[];const e={};return f(t,e),e.arcs}function V(t,e){if(0===t.length)return"M 0 0";const n=Math.pow(10,e||0),r=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){const e=t[0].circle;return function(t,e,n){const r=[];return r.push("\nM",t,e),r.push("\nm",-n,0),r.push("\na",n,n,0,1,0,2*n,0),r.push("\na",n,n,0,1,0,2*-n,0),r.join(" ")}(r(e.x),r(e.y),r(e.radius))}const i=["\nM",r(t[0].p2.x),r(t[0].p2.y)];for(const a of t){const t=r(a.circle.radius);i.push("\nA",t,t,0,a.large?1:0,a.sweep?1:0,r(a.p1.x),r(a.p1.y))}return i.join(" ")}function H(t,e){return V(W(t),e)}var X=n(2274),Z=function(){var t=(0,s.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],r=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],d=[1,58],p=[1,59],f=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],m={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,s.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=a[o];break;case 8:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:r.addSubsetData([a[o]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[o-1]],a[o],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[o-2]],void 0,parseFloat(a[o])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[o-3]],a[o-2],parseFloat(a[o])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[o].length<2)throw new Error("union requires multiple identifiers");r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[o]),r.addSubsetData(a[o],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[o-1].length<2)throw new Error("union requires multiple identifiers");r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[o-1]),r.addSubsetData(a[o-1],a[o],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[o-2].length<2)throw new Error("union requires multiple identifiers");r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[o-2]),r.addSubsetData(a[o-2],void 0,parseFloat(a[o])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[o-3].length<2)throw new Error("union requires multiple identifiers");r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[o-3]),r.addSubsetData(a[o-3],a[o-2],parseFloat(a[o])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[o-1],a[o],void 0);break;case 20:case 21:r.addTextData(a[o-2],a[o-1],a[o]);break;case 23:r.addStyleData(a[o-1],a[o]);break;case 24:case 25:case 26:if(!(l=r.getCurrentSets()))throw new Error("text requires set");r.addTextData(l,a[o],void 0);break;case 27:case 28:var l;if(!(l=r.getCurrentSets()))throw new Error("text requires set");r.addTextData(l,a[o-1],a[o]);break;case 29:case 41:case 34:this.$=[a[o]];break;case 30:case 42:this.$=[...a[o-2],a[o]];break;case 31:this.$=[a[o-2],a[o]];break;case 33:this.$=a[o].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:r,21:i},{13:20,18:19,20:r,21:i},{13:20,18:21,20:r,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:r,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(a,[2,43]),t(a,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:o}),t(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:l,25:37,26:38,27:o},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:r,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(a,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:d,32:p,33:f},t(n,[2,12]),t(n,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:d,32:p,33:f}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=o[w]&&o[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],o[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=o[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},y=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,r){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}}();function v(){this.yy={}}return m.lexer=y,(0,s.K2)(v,"Parser"),v.prototype=m,m.Parser=v,new v}();Z.parser=Z;var Q,J=Z,tt=[],et=[],nt=[],rt=new Set,it=!1,at=(0,s.K2)((t,e,n)=>{const r=dt(t).sort(),i=n??10/Math.pow(t.length,2);Q=r,1===r.length&&rt.add(r[0]),tt.push({sets:r,size:i,label:e?ot(e):void 0})},"addSubsetData"),st=(0,s.K2)(()=>tt,"getSubsetData"),ot=(0,s.K2)(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),lt=(0,s.K2)(t=>t?ot(t):t,"normalizeStyleValue"),ct=(0,s.K2)((t,e,n)=>{const r=ot(e);et.push({sets:dt(t).sort(),id:r,label:n?ot(n):void 0})},"addTextData"),ht=(0,s.K2)((t,e)=>{const n=dt(t).sort(),r={};for(const[i,a]of e)r[i]=lt(a)??a;nt.push({targets:n,styles:r})},"addStyleData"),ut=(0,s.K2)(()=>nt,"getStyleData"),dt=(0,s.K2)(t=>t.map(t=>ot(t)),"normalizeIdentifierList"),pt=(0,s.K2)(t=>{const e=dt(t).filter(t=>!rt.has(t));if(e.length>0)throw new Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),ft=(0,s.K2)(()=>et,"getTextData"),gt=(0,s.K2)(()=>Q,"getCurrentSets"),mt=(0,s.K2)(()=>it,"getIndentMode"),yt=(0,s.K2)(t=>{it=t},"setIndentMode"),vt=a.UI.venn;function xt(){return(0,i.$t)(vt,(0,a.zj)().venn)}(0,s.K2)(xt,"getConfig");var bt={getConfig:xt,clear:(0,s.K2)(()=>{(0,a.IU)(),tt.length=0,et.length=0,nt.length=0,rt.clear(),Q=void 0,it=!1},"customClear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI,addSubsetData:at,getSubsetData:st,addTextData:ct,addStyleData:ht,validateUnionIdentifiers:pt,getTextData:ft,getStyleData:ut,getCurrentSets:gt,getIndentMode:mt,setIndentMode:yt},wt=(0,s.K2)(t=>`\n .venn-title {\n font-size: 32px;\n fill: ${t.vennTitleTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${t.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${t.vennSetTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${t.fontFamily};\n color: ${t.vennSetTextColor};\n }\n`,"getStyles");function Tt(t){const e=new Map;for(const n of t){const t=n.targets.join("|"),r=e.get(t);r?Object.assign(r,n.styles):e.set(t,{...n.styles})}return e}(0,s.K2)(Tt,"buildStyleByKey");var kt=(0,s.K2)((t,e,n,i)=>{const s=i.db,c=s.getConfig?.(),{themeVariables:p,look:f,handDrawnSeed:g}=(0,a.zj)(),m="handDrawn"===f,y=[p.venn1,p.venn2,p.venn3,p.venn4,p.venn5,p.venn6,p.venn7,p.venn8].filter(Boolean),v=s.getDiagramTitle?.(),x=s.getSubsetData(),b=s.getTextData(),w=Tt(s.getStyleData()),T=c?.width??800,k=c?.height??450,E=T/1600,A=v?48*E:0,_=p.primaryTextColor??p.textColor,C=(0,r.D)(e);C.attr("viewBox",`0 0 ${T} ${k}`),v&&C.append("text").text(v).attr("class","venn-title").attr("font-size",32*E+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*E).style("fill",p.vennTitleTextColor||p.titleColor);const S=(0,o.Ltv)(document.createElement("div")),L=K().width(T).height(k-A);S.datum(x).call(L);const D=m?X.A.svg(S.select("svg").node()):void 0,I=function(t,e={}){const{lossFunction:n,layoutFunction:r=R,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=e;let f=r(t,{lossFunction:"default"!==n&&n?"logRatio"===n?M:n:N,distinct:d});i&&(f=$(f,a,s));const g=B(f,o,l,c,h),m=G(g,t,u),y=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),v=t.map(t=>{const e=t.sets.map(t=>y.get(t)),n=W(e);return{circles:e,arcs:n,path:V(n,p),area:t,has:new Set(t.sets)}});function x(t){let e="";for(const n of v)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}return v.map(({circles:t,arcs:e,path:n,area:r})=>({data:r,text:m[r.sets],circles:t,arcs:e,path:n,distinctPath:n+x(r.sets)}))}(x,{width:T,height:k-A,padding:c?.padding??15}),O=new Map;for(const r of I){const t=Et([...r.data.sets].sort());O.set(t,r)}b.length>0&&At(c,O,S,b,E,w);const P=(0,l.A)(p.background||"#f4f4f4");S.selectAll(".venn-circle").each(function(t,e){const n=(0,o.Ltv)(this),r=Et([...t.sets].sort()),i=w.get(r),a=i?.fill||y[e%y.length]||p.primaryColor;n.classed("venn-set-"+e%8,!0);const s=i?.["fill-opacity"]??.1,l=i?.stroke||a,c=i?.["stroke-width"]||""+5*E;if(m&&D){const t=O.get(r);if(t&&t.circles.length>0){const r=t.circles[0],i=D.circle(r.x,r.y,2*r.radius,{roughness:.7,seed:g,fill:h(a,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*e-41,stroke:l,strokeWidth:parseFloat(String(c))});n.select("path").remove(),n.node()?.insertBefore(i,n.select("text").node())}}else n.select("path").style("fill",a).style("fill-opacity",s).style("stroke",l).style("stroke-width",c).style("stroke-opacity",.95);const f=i?.color||(P?(0,u.A)(a,30):(0,d.A)(a,30));n.select("text").style("font-size",48*E+"px").style("fill",f)}),m&&D?S.selectAll(".venn-intersection").each(function(t){const e=(0,o.Ltv)(this),n=Et([...t.sets].sort()),r=w.get(n),i=r?.fill;if(i){const t=e.select("path"),n=t.attr("d");if(n){const e=D.path(n,{roughness:.7,seed:g,fill:h(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),r=t.node();r?.parentNode?.insertBefore(e,r),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",48*E+"px").style("fill",r?.color??p.vennSetTextColor??_)}):(S.selectAll(".venn-intersection text").style("font-size",48*E+"px").style("fill",t=>{const e=Et([...t.sets].sort());return w.get(e)?.color??p.vennSetTextColor??_}),S.selectAll(".venn-intersection path").style("fill-opacity",t=>{const e=Et([...t.sets].sort());return w.get(e)?.fill?1:0}).style("fill",t=>{const e=Et([...t.sets].sort());return w.get(e)?.fill??"transparent"}));const F=C.append("g").attr("transform",`translate(0, ${A})`),z=S.select("svg").node();if(z&&"childNodes"in z)for(const r of[...z.childNodes])F.node()?.appendChild(r);(0,a.a$)(C,k,T,c?.useMaxWidth??!0)},"draw");function Et(t){return t.join("|")}function At(t,e,n,r,i,a){const s=t?.useDebugLayout??!1,o=n.select("svg").append("g").attr("class","venn-text-nodes"),l=new Map;for(const c of r){const t=Et(c.sets),e=l.get(t);e?e.push(c):l.set(t,[c])}for(const[c,h]of l.entries()){const t=e.get(c);if(!t?.text)continue;const n=t.text.x,r=t.text.y,l=Math.min(...t.circles.map(t=>t.radius)),u=Math.min(...t.circles.map(t=>t.radius-Math.hypot(n-t.x,r-t.y)));let d=Number.isFinite(u)?Math.max(0,u):0;0===d&&Number.isFinite(l)&&(d=.6*l);const p=o.append("g").attr("class","venn-text-area").attr("font-size",40*i+"px");s&&p.append("circle").attr("class","venn-text-debug-circle").attr("cx",n).attr("cy",r).attr("r",d).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const f=Math.max(80*i,2*d*.95),g=Math.max(60*i,2*d*.95),m=(t.data.label&&t.data.label.length>0?Math.min(32*i,.25*d):0)+(h.length<=2?30*i:0),y=n-f/2,v=r-g/2+m,x=Math.max(1,Math.ceil(Math.sqrt(h.length))),b=f/x,w=g/Math.max(1,Math.ceil(h.length/x));for(const[e,o]of h.entries()){const t=e%x,n=Math.floor(e/x),r=y+b*(t+.5),l=v+w*(n+.5);s&&p.append("rect").attr("class","venn-text-debug-cell").attr("x",y+b*t).attr("y",v+w*n).attr("width",b).attr("height",w).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const c=.9*b,h=.9*w,u=p.append("foreignObject").attr("class","venn-text-node-fo").attr("width",c).attr("height",h).attr("x",r-c/2).attr("y",l-h/2).attr("overflow","visible"),d=a.get(o.id)?.color,f=u.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(o.label??o.id);d&&f.style("color",d)}}}(0,s.K2)(Et,"stableSetsKey"),(0,s.K2)(At,"renderTextNodes");var _t={parser:J,db:bt,renderer:{draw:kt},styles:wt}},5359(t,e,n){"use strict";n.d(e,{diagram:()=>et});var r=n(1475),i=n(6779),a=n(796),s=n(4098),o=n(797),l=n(1444),c=function(){var t=(0,o.K2)(function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},"o"),e=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],f=[1,31],g=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],T=[1,42],k=[1,47],E=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],R={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,o.K2)(function(t,e,n,r,i,a,s){var o=a.length-1;switch(i){case 5:r.setOrientation(a[o]);break;case 9:r.setDiagramTitle(a[o].text.trim());break;case 12:r.setLineData({text:"",type:"text"},a[o]);break;case 13:r.setLineData(a[o-1],a[o]);break;case 14:r.setBarData({text:"",type:"text"},a[o]);break;case 15:r.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:r.setXAxisTitle(a[o]);break;case 23:r.setXAxisTitle(a[o-1]);break;case 24:r.setXAxisTitle({type:"text",text:""});break;case 25:r.setXAxisBand(a[o]);break;case 26:r.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:r.setYAxisTitle(a[o]);break;case 31:r.setYAxisTitle(a[o-1]);break;case 32:r.setYAxisTitle({type:"text",text:""});break;case 33:r.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(e,n,{3:1,4:2,7:4,5:r,34:i,35:a,36:s}),{1:[3]},t(e,n,{4:2,7:4,3:8,5:r,34:i,35:a,36:s}),t(e,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,n,{4:2,7:4,3:21,5:r,34:i,35:a,36:s}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:T,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:k,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},t(A,[2,18]),{1:[2,2]},t(A,[2,8]),t(A,[2,9]),t(_,[2,37],{40:55,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b}),t(_,[2,38]),t(_,[2,39]),t(C,[2,40]),t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),t(C,[2,50]),t(C,[2,51]),t(A,[2,10]),t(A,[2,22],{30:41,29:56,24:w,27:T}),t(A,[2,24]),t(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},t(A,[2,11]),t(A,[2,30],{33:60,27:k}),t(A,[2,32]),{31:[1,61]},t(A,[2,12]),{17:62,24:E},{25:63,27:S},t(A,[2,14]),{17:65,24:E},t(A,[2,16]),t(A,[2,17]),t(C,[2,41]),t(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(A,[2,31]),{27:[1,69]},t(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(A,[2,15]),t(A,[2,26]),t(A,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:x,50:b},t(A,[2,33]),t(A,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,n=[0],r=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=r.pop()||p.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var x,b,w,T,k,E,A,_,C,S={};;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==x&&(x=v()),T=s[w]&&s[w][x]),void 0===T||!T.length||!T[0]){var R="";for(E in C=[],s[w])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(T[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(T[1]),x=null,b?(x=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[T[1]][1],S.$=i[i.length-A],S._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},L=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,n,r){switch(n){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function D(){this.yy={}}return R.lexer=L,(0,o.K2)(D,"Parser"),D.prototype=R,R.Parser=D,new D}();c.parser=c;var h=c;function u(t){return"bar"===t.type}function d(t){return"band"===t.type}function p(t){return"linear"===t.type}(0,o.K2)(u,"isBarPlot"),(0,o.K2)(d,"isBandAxisData"),(0,o.K2)(p,"isLinearAxisData");var f=class{constructor(t){this.parentGroup=t}static{(0,o.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};const n={width:0,height:0},r=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const a of t){const t=(0,i.W6)(r,1,a),s=t?t.width:a.length*e,o=t?t.height:e;n.width=Math.max(n.width,s),n.height=Math.max(n.height,o)}return r.remove(),n}},g=class{constructor(t,e,n,r){this.axisConfig=t,this.title=e,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,o.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),r=.2*t.width;this.outerPadding=Math.min(n.width/2,r);const i=n.height+2*this.axisConfig.labelPadding;this.labelTextHeight=n.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),r=.2*t.height;this.outerPadding=Math.min(n.height/2,r);const i=n.width+2*this.axisConfig.labelPadding;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends g{static{(0,o.K2)(this,"BandAxis")}constructor(t,e,n,r,i){super(t,r,i,e),this.categories=n,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),o.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends g{static{(0,o.K2)(this,"LinearAxis")}constructor(t,e,n,r,i){super(t,r,i,e),this.domain=n,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function v(t,e,n,r){const i=new f(r);return d(t)?new m(e,n,t.categories,t.title,i):new y(e,n,[t.min,t.max],t.title,i)}(0,o.K2)(v,"getAxis");var x=class{constructor(t,e,n,r){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,o.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=n&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function b(t,e,n,r){const i=new f(r);return new x(i,t,e,n)}(0,o.K2)(b,"getChartTitleComponent");var w=class{constructor(t,e,n,r,i){this.plotData=t,this.xAxis=e,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{(0,o.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let e;return e="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},T=class{constructor(t,e,n,r,i,a){this.barData=t,this.boundingRect=e,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{(0,o.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),n=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-n,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-n,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},k=class{constructor(t,e,n){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,o.K2)(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[e,n]of this.chartData.plots.entries())switch(n.type){case"line":{const r=new w(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...r.getDrawableElement())}break;case"bar":{const r=new T(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...r.getDrawableElement())}}return t}};function E(t,e,n){return new k(t,e,n)}(0,o.K2)(E,"getPlotComponent");var A,_=class{constructor(t,e,n,r){this.chartConfig=t,this.chartData=e,this.componentStore={title:b(t,e,n,r),plot:E(t,e,n),xAxis:v(e.xAxis,t.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:v(e.yAxis,t.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{(0,o.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,n=0,r=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),n=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,r=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=n+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},C=class{static{(0,o.K2)(this,"XYChartBuilder")}static build(t,e,n,r){return new _(t,e,n,r).getDrawableElement()}},S=0,R=P(),L=O(),D=$(),I=L.plotColorPalette.split(",").map(t=>t.trim()),N=!1,M=!1;function O(){const t=(0,s.P$)(),e=(0,s.zj)();return(0,a.$t)(t.xyChart,e.themeVariables.xyChart)}function P(){const t=(0,s.zj)();return(0,a.$t)(s.UI.xyChart,t.xyChart)}function $(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const e=(0,s.zj)();return(0,s.jZ)(t.trim(),e)}function F(t){A=t}function z(t){R.chartOrientation="horizontal"===t?"horizontal":"vertical"}function K(t){D.xAxis.title=B(t.text)}function q(t,e){D.xAxis={type:"linear",title:D.xAxis.title,min:t,max:e},N=!0}function U(t){D.xAxis={type:"band",title:D.xAxis.title,categories:t.map(t=>B(t.text))},N=!0}function j(t){D.yAxis.title=B(t.text)}function Y(t,e){D.yAxis={type:"linear",title:D.yAxis.title,min:t,max:e},M=!0}function G(t){const e=Math.min(...t),n=Math.max(...t),r=p(D.yAxis)?D.yAxis.min:1/0,i=p(D.yAxis)?D.yAxis.max:-1/0;D.yAxis={type:"linear",title:D.yAxis.title,min:Math.min(r,e),max:Math.max(i,n)}}function W(t){let e=[];if(0===t.length)return e;if(!N){const e=p(D.xAxis)?D.xAxis.min:1/0,n=p(D.xAxis)?D.xAxis.max:-1/0;q(Math.min(e,1),Math.max(n,t.length))}if(M||G(t),d(D.xAxis)&&(e=D.xAxis.categories.map((e,n)=>[e,t[n]])),p(D.xAxis)){const n=D.xAxis.min,r=D.xAxis.max,i=(r-n)/(t.length-1),a=[];for(let t=n;t<=r;t+=i)a.push(`${t}`);e=a.map((e,n)=>[e,t[n]])}return e}function V(t){return I[0===t?0:t%I.length]}function H(t,e){const n=W(e);D.plots.push({type:"line",strokeFill:V(S),strokeWidth:2,data:n}),S++}function X(t,e){const n=W(e);D.plots.push({type:"bar",fill:V(S),data:n}),S++}function Z(){if(0===D.plots.length)throw Error("No Plot to render, please provide a plot with some data");return D.title=(0,s.ab)(),C.build(R,D,L,A)}function Q(){return L}function J(){return R}function tt(){return D}(0,o.K2)(O,"getChartDefaultThemeConfig"),(0,o.K2)(P,"getChartDefaultConfig"),(0,o.K2)($,"getChartDefaultData"),(0,o.K2)(B,"textSanitizer"),(0,o.K2)(F,"setTmpSVGG"),(0,o.K2)(z,"setOrientation"),(0,o.K2)(K,"setXAxisTitle"),(0,o.K2)(q,"setXAxisRangeData"),(0,o.K2)(U,"setXAxisBand"),(0,o.K2)(j,"setYAxisTitle"),(0,o.K2)(Y,"setYAxisRangeData"),(0,o.K2)(G,"setYAxisRangeFromPlotData"),(0,o.K2)(W,"transformDataWithoutCategory"),(0,o.K2)(V,"getPlotColorFromPalette"),(0,o.K2)(H,"setLineData"),(0,o.K2)(X,"setBarData"),(0,o.K2)(Z,"getDrawableElem"),(0,o.K2)(Q,"getChartThemeConfig"),(0,o.K2)(J,"getChartConfig"),(0,o.K2)(tt,"getXYChartData");var et={parser:h,db:{getDrawableElem:Z,clear:(0,o.K2)(function(){(0,s.IU)(),S=0,R=P(),D={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=O(),I=L.plotColorPalette.split(",").map(t=>t.trim()),N=!1,M=!1},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI,setOrientation:z,setXAxisTitle:K,setXAxisRangeData:q,setXAxisBand:U,setYAxisTitle:j,setYAxisRangeData:Y,setLineData:H,setBarData:X,setTmpSVGG:F,getChartThemeConfig:Q,getChartConfig:J,getXYChartData:tt},renderer:{draw:(0,o.K2)((t,e,n,i)=>{const a=i.db,l=a.getChartThemeConfig(),c=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function d(t){return"left"===t?"start":"right"===t?"end":"middle"}function p(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,o.K2)(u,"getDominantBaseLine"),(0,o.K2)(d,"getTextAnchor"),(0,o.K2)(p,"getTextTransformation"),o.Rm.debug("Rendering xychart chart\n"+t);const f=(0,r.D)(e),g=f.append("g").attr("class","main"),m=g.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,s.a$)(f,c.height,c.width,!0),f.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",l.backgroundColor),a.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),v={};function x(t){let e=g,n="";for(const[r]of t.entries()){let i=g;r>0&&v[n]&&(i=v[n]),n+=t[r],e=v[n],e||(e=v[n]=i.append("g").attr("class",t[r]))}return e}(0,o.K2)(x,"getGroup");for(const r of y){if(0===r.data.length)continue;const t=x(r.groupTexts);switch(r.type){case"rect":if(t.selectAll("rect").data(r.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel)if("horizontal"===c.chartOrientation){let e=function(t,e){const{data:r,label:i}=t;return e*i.length*n<=r.width-10};(0,o.K2)(e,"fitsHorizontally");const n=.7,i=r.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),a=i.map(t=>{const{data:n}=t;let r=.7*n.height;for(;!e(t,r)&&r>0;)r-=1;return r}),s=Math.floor(Math.min(...a));t.selectAll("text").data(i).enter().append("text").attr("x",t=>t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${s}px`).text(t=>t.label)}else{let e=function(t,e,n){const{data:r,label:i}=t,a=e*i.length*.7,s=r.x+r.width/2,o=s+a/2,l=s-a/2>=r.x&&o<=r.x+r.width,c=r.y+n+e<=r.y+r.height;return l&&c};(0,o.K2)(e,"fitsInBar");const n=10,i=r.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),a=i.map(t=>{const{data:r,label:i}=t;let a=r.width/(.7*i.length);for(;!e(t,a,n)&&a>0;)a-=1;return a}),s=Math.floor(Math.min(...a));t.selectAll("text").data(i).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",t=>t.data.y+n).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${s}px`).text(t=>t.label)}break;case"text":t.selectAll("text").data(r.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>d(t.horizontalPos)).attr("transform",t=>p(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(r.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}},3047(t,e,n){"use strict";n.d(e,{A:()=>ot});const{entries:r,setPrototypeOf:i,isFrozen:a,getPrototypeOf:s,getOwnPropertyDescriptor:o}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t.apply(e,r)}),d||(d=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const p=S(Array.prototype.forEach),f=S(Array.prototype.lastIndexOf),g=S(Array.prototype.pop),m=S(Array.prototype.push),y=S(Array.prototype.splice),v=S(String.prototype.toLowerCase),x=S(String.prototype.toString),b=S(String.prototype.match),w=S(String.prototype.replace),T=S(String.prototype.indexOf),k=S(String.prototype.trim),E=S(Object.prototype.hasOwnProperty),A=S(RegExp.prototype.test),_=(C=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return d(C,e)});var C;function S(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function R(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;i&&i(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(a(e)||(e[r]=t),i=t)}t[i]=!0}return t}function L(t){for(let e=0;e<t.length;e++){E(t,e)||(t[e]=null)}return t}function D(t){const e=h(null);for(const[n,i]of r(t)){E(t,n)&&(Array.isArray(i)?e[n]=L(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=D(i):e[n]=i)}return e}function I(t,e){for(;null!==t;){const n=o(t,e);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}t=s(t)}return function(){return null}}const N=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),O=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),B=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=l(["#text"]),z=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),q=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Y=c(/<%[\w\W]*|[\w\W]*%>/gm),G=c(/\$\{[\w\W]*/gm),W=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=c(/^aria-[\-\w]+$/),H=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Z=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:W,DOCTYPE_NAME:Q,ERB_EXPR:Y,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:j,TMPLIT_EXPR:G});const et=1,nt=3,rt=7,it=8,at=9,st=function(){return"undefined"==typeof window?null:window};var ot=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const n=e=>t(e);if(n.version="3.3.3",n.removed=[],!e||!e.document||e.document.nodeType!==at||!e.Element)return n.isSupported=!1,n;let{document:i}=e;const a=i,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:c,Node:u,Element:d,NodeFilter:C,NamedNodeMap:S=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:j,trustedTypes:Y}=e,G=d.prototype,W=I(G,"cloneNode"),V=I(G,"remove"),X=I(G,"nextSibling"),Z=I(G,"childNodes"),J=I(G,"parentNode");if("function"==typeof c){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let ot,lt="";const{implementation:ct,createNodeIterator:ht,createDocumentFragment:ut,getElementsByTagName:dt}=i,{importNode:pt}=a;let ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof J&&ct&&void 0!==ct.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:mt,TMPLIT_EXPR:yt,DATA_ATTR:vt,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:bt,ATTR_WHITESPACE:wt,CUSTOM_ELEMENT:Tt}=tt;let{IS_ALLOWED_URI:kt}=tt,Et=null;const At=R({},[...N,...M,...O,...$,...F]);let _t=null;const Ct=R({},[...z,...K,...q,...U]);let St=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Rt=null,Lt=null;const Dt=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let It=!0,Nt=!0,Mt=!1,Ot=!0,Pt=!1,$t=!0,Bt=!1,Ft=!1,zt=!1,Kt=!1,qt=!1,Ut=!1,jt=!0,Yt=!1,Gt=!0,Wt=!1,Vt={},Ht=null;const Xt=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=R({},["audio","video","img","source","image","track"]);let Jt=null;const te=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let ie=re,ae=!1,se=null;const oe=R({},[ee,ne,re],x);let le=R({},["mi","mo","mn","ms","mtext"]),ce=R({},["annotation-xml"]);const he=R({},["title","style","font","a","script"]);let ue=null;const de=["application/xhtml+xml","text/html"];let pe=null,fe=null;const ge=i.createElement("form"),me=function(t){return t instanceof RegExp||t instanceof Function},ye=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!fe||fe!==t){if(t&&"object"==typeof t||(t={}),t=D(t),ue=-1===de.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===ue?x:v,Et=E(t,"ALLOWED_TAGS")?R({},t.ALLOWED_TAGS,pe):At,_t=E(t,"ALLOWED_ATTR")?R({},t.ALLOWED_ATTR,pe):Ct,se=E(t,"ALLOWED_NAMESPACES")?R({},t.ALLOWED_NAMESPACES,x):oe,Jt=E(t,"ADD_URI_SAFE_ATTR")?R(D(te),t.ADD_URI_SAFE_ATTR,pe):te,Zt=E(t,"ADD_DATA_URI_TAGS")?R(D(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Ht=E(t,"FORBID_CONTENTS")?R({},t.FORBID_CONTENTS,pe):Xt,Rt=E(t,"FORBID_TAGS")?R({},t.FORBID_TAGS,pe):D({}),Lt=E(t,"FORBID_ATTR")?R({},t.FORBID_ATTR,pe):D({}),Vt=!!E(t,"USE_PROFILES")&&t.USE_PROFILES,It=!1!==t.ALLOW_ARIA_ATTR,Nt=!1!==t.ALLOW_DATA_ATTR,Mt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Pt=t.SAFE_FOR_TEMPLATES||!1,$t=!1!==t.SAFE_FOR_XML,Bt=t.WHOLE_DOCUMENT||!1,Kt=t.RETURN_DOM||!1,qt=t.RETURN_DOM_FRAGMENT||!1,Ut=t.RETURN_TRUSTED_TYPE||!1,zt=t.FORCE_BODY||!1,jt=!1!==t.SANITIZE_DOM,Yt=t.SANITIZE_NAMED_PROPS||!1,Gt=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,kt=t.ALLOWED_URI_REGEXP||H,ie=t.NAMESPACE||re,le=t.MATHML_TEXT_INTEGRATION_POINTS||le,ce=t.HTML_INTEGRATION_POINTS||ce,St=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(Nt=!1),qt&&(Kt=!0),Vt&&(Et=R({},F),_t=h(null),!0===Vt.html&&(R(Et,N),R(_t,z)),!0===Vt.svg&&(R(Et,M),R(_t,K),R(_t,U)),!0===Vt.svgFilters&&(R(Et,O),R(_t,K),R(_t,U)),!0===Vt.mathMl&&(R(Et,$),R(_t,q),R(_t,U))),E(t,"ADD_TAGS")||(Dt.tagCheck=null),E(t,"ADD_ATTR")||(Dt.attributeCheck=null),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Dt.tagCheck=t.ADD_TAGS:(Et===At&&(Et=D(Et)),R(Et,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Dt.attributeCheck=t.ADD_ATTR:(_t===Ct&&(_t=D(_t)),R(_t,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&R(Jt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Ht===Xt&&(Ht=D(Ht)),R(Ht,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Ht===Xt&&(Ht=D(Ht)),R(Ht,t.ADD_FORBID_CONTENTS,pe)),Gt&&(Et["#text"]=!0),Bt&&R(Et,["html","head","body"]),Et.table&&(R(Et,["tbody"]),delete Rt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,lt=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(Y,s)),null!==ot&&"string"==typeof lt&&(lt=ot.createHTML(""));l&&l(t),fe=t}},ve=R({},[...M,...O,...P]),xe=R({},[...$,...B]),be=function(t){m(n.removed,{element:t});try{J(t).removeChild(t)}catch(e){V(t)}},we=function(t,e){try{m(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(r){m(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Kt||qt)try{be(e)}catch(r){}else try{e.setAttribute(t,"")}catch(r){}},Te=function(t){let e=null,n=null;if(zt)t="<remove></remove>"+t;else{const e=b(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===ue&&ie===re&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=ot?ot.createHTML(t):t;if(ie===re)try{e=(new j).parseFromString(r,ue)}catch(s){}if(!e||!e.documentElement){e=ct.createDocument(ie,"template",null);try{e.documentElement.innerHTML=ae?lt:r}catch(s){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),ie===re?dt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:a},ke=function(t){return ht.call(t.ownerDocument||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ee=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof S)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ae=function(t){return"function"==typeof u&&t instanceof u};function _e(t,e,r){p(t,t=>{t.call(n,e,r,fe)})}const Ce=function(t){let e=null;if(_e(ft.beforeSanitizeElements,t,null),Ee(t))return be(t),!0;const r=pe(t.nodeName);if(_e(ft.uponSanitizeElement,t,{tagName:r,allowedTags:Et}),$t&&t.hasChildNodes()&&!Ae(t.firstElementChild)&&A(/<[/\w!]/g,t.innerHTML)&&A(/<[/\w!]/g,t.textContent))return be(t),!0;if(t.nodeType===rt)return be(t),!0;if($t&&t.nodeType===it&&A(/<[/\w]/g,t.data))return be(t),!0;if(!(Dt.tagCheck instanceof Function&&Dt.tagCheck(r))&&(!Et[r]||Rt[r])){if(!Rt[r]&&Re(r)){if(St.tagNameCheck instanceof RegExp&&A(St.tagNameCheck,r))return!1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(r))return!1}if(Gt&&!Ht[r]){const e=J(t)||t.parentNode,n=Z(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const i=W(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,X(t))}}}return be(t),!0}return t instanceof d&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:ie,tagName:"template"});const n=v(t.tagName),r=v(e.tagName);return!!se[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===re?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===r||le[r]):Boolean(ve[n]):t.namespaceURI===ee?e.namespaceURI===re?"math"===n:e.namespaceURI===ne?"math"===n&&ce[r]:Boolean(xe[n]):t.namespaceURI===re?!(e.namespaceURI===ne&&!ce[r])&&!(e.namespaceURI===ee&&!le[r])&&!xe[n]&&(he[n]||!ve[n]):!("application/xhtml+xml"!==ue||!se[t.namespaceURI]))}(t)?(be(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,t.innerHTML)?(Pt&&t.nodeType===nt&&(e=t.textContent,p([gt,mt,yt],t=>{e=w(e,t," ")}),t.textContent!==e&&(m(n.removed,{element:t.cloneNode()}),t.textContent=e)),_e(ft.afterSanitizeElements,t,null),!1):(be(t),!0)},Se=function(t,e,n){if(Lt[e])return!1;if(jt&&("id"===e||"name"===e)&&(n in i||n in ge))return!1;if(Nt&&!Lt[e]&&A(vt,e));else if(It&&A(xt,e));else if(Dt.attributeCheck instanceof Function&&Dt.attributeCheck(e,t));else if(!_t[e]||Lt[e]){if(!(Re(t)&&(St.tagNameCheck instanceof RegExp&&A(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&A(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e,t))||"is"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&A(St.tagNameCheck,n)||St.tagNameCheck instanceof Function&&St.tagNameCheck(n))))return!1}else if(Jt[e]);else if(A(kt,w(n,wt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==T(n,"data:")||!Zt[t]){if(Mt&&!A(bt,w(n,wt,"")));else if(n)return!1}else;return!0},Re=function(t){return"annotation-xml"!==t&&b(t,Tt)},Le=function(t){_e(ft.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ee(t))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_t,forceKeepAttr:void 0};let i=e.length;for(;i--;){const s=e[i],{name:o,namespaceURI:l,value:c}=s,h=pe(o),u=c;let d="value"===o?u:k(u);if(r.attrName=h,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,_e(ft.uponSanitizeAttribute,t,r),d=r.attrValue,!Yt||"id"!==h&&"name"!==h||(we(o,t),d="user-content-"+d),$t&&A(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){we(o,t);continue}if("attributename"===h&&b(d,"href")){we(o,t);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){we(o,t);continue}if(!Ot&&A(/\/>/i,d)){we(o,t);continue}Pt&&p([gt,mt,yt],t=>{d=w(d,t," ")});const f=pe(t.nodeName);if(Se(f,h,d)){if(ot&&"object"==typeof Y&&"function"==typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(f,h)){case"TrustedHTML":d=ot.createHTML(d);break;case"TrustedScriptURL":d=ot.createScriptURL(d)}if(d!==u)try{l?t.setAttributeNS(l,o,d):t.setAttribute(o,d),Ee(t)?be(t):g(n.removed)}catch(a){we(o,t)}}else we(o,t)}_e(ft.afterSanitizeAttributes,t,null)},De=function t(e){let n=null;const r=ke(e);for(_e(ft.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)_e(ft.uponSanitizeShadowNode,n,null),Ce(n),Le(n),n.content instanceof o&&t(n.content);_e(ft.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ae(t)){if("function"!=typeof t.toString)throw _("toString is not a function");if("string"!=typeof(t=t.toString()))throw _("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Ft||ye(e),n.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=pe(t.nodeName);if(!Et[e]||Rt[e])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)r=Te("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),i.nodeType===et&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Kt&&!Pt&&!Bt&&-1===t.indexOf("<"))return ot&&Ut?ot.createHTML(t):t;if(r=Te(t),!r)return Kt?null:Ut?lt:""}r&&zt&&be(r.firstChild);const c=ke(Wt?t:r);for(;s=c.nextNode();)Ce(s),Le(s),s.content instanceof o&&De(s.content);if(Wt)return t;if(Kt){if(qt)for(l=ut.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(_t.shadowroot||_t.shadowrootmode)&&(l=pt.call(a,l,!0)),l}let h=Bt?r.outerHTML:r.innerHTML;return Bt&&Et["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&A(Q,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),Pt&&p([gt,mt,yt],t=>{h=w(h,t," ")}),ot&&Ut?ot.createHTML(h):h},n.setConfig=function(){ye(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},n.clearConfig=function(){fe=null,Ft=!1},n.isValidAttribute=function(t,e,n){fe||ye({});const r=pe(t),i=pe(e);return Se(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&m(ft[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=f(ft[t],e);return-1===n?void 0:y(ft[t],n,1)[0]}return g(ft[t])},n.removeHooks=function(t){ft[t]=[]},n.removeAllHooks=function(){ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()},6203(t,e,n){"use strict";var r,i,a,s,o,l,c,h,u,d,p,f,g,m,y,v,x,b,w,T,k,E,A,_,C,S,R,L,D,I,N,M,O,P,$,B,F,z,K,q,U,j,Y,G,W,V,H,X,Z,Q,J,tt,et,nt,rt,it,at,st,ot,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,xt,bt,wt,Tt,kt,Et,At,_t;n.r(e),n.d(e,{AnnotatedTextEdit:()=>A,ChangeAnnotation:()=>k,ChangeAnnotationIdentifier:()=>E,CodeAction:()=>at,CodeActionContext:()=>it,CodeActionKind:()=>nt,CodeActionTriggerKind:()=>rt,CodeDescription:()=>x,CodeLens:()=>st,Color:()=>u,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>w,CompletionItem:()=>U,CompletionItemKind:()=>$,CompletionItemLabelDetails:()=>q,CompletionItemTag:()=>F,CompletionList:()=>j,CreateFile:()=>C,DeleteFile:()=>R,Diagnostic:()=>b,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>X,DocumentHighlightKind:()=>H,DocumentLink:()=>lt,DocumentSymbol:()=>et,DocumentUri:()=>r,EOL:()=>Lt,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>ot,Hover:()=>G,InlayHint:()=>xt,InlayHintKind:()=>yt,InlayHintLabelPart:()=>vt,InlineCompletionContext:()=>At,InlineCompletionItem:()=>wt,InlineCompletionList:()=>Tt,InlineCompletionTriggerKind:()=>kt,InlineValueContext:()=>mt,InlineValueEvaluatableExpression:()=>gt,InlineValueText:()=>pt,InlineValueVariableLookup:()=>ft,InsertReplaceEdit:()=>z,InsertTextFormat:()=>B,InsertTextMode:()=>K,Location:()=>c,LocationLink:()=>h,MarkedString:()=>Y,MarkupContent:()=>P,MarkupKind:()=>O,OptionalVersionedTextDocumentIdentifier:()=>N,ParameterInformation:()=>W,Position:()=>o,Range:()=>l,RenameFile:()=>S,SelectedCompletionInfo:()=>Et,SelectionRange:()=>ct,SemanticTokenModifiers:()=>ut,SemanticTokenTypes:()=>ht,SemanticTokens:()=>dt,SignatureInformation:()=>V,StringValue:()=>bt,SymbolInformation:()=>J,SymbolKind:()=>Z,SymbolTag:()=>Q,TextDocument:()=>Dt,TextDocumentEdit:()=>_,TextDocumentIdentifier:()=>D,TextDocumentItem:()=>M,TextEdit:()=>T,URI:()=>i,VersionedTextDocumentIdentifier:()=>I,WorkspaceChange:()=>Rt,WorkspaceEdit:()=>L,WorkspaceFolder:()=>_t,WorkspaceSymbol:()=>tt,integer:()=>a,uinteger:()=>s}),function(t){t.is=function(t){return"string"==typeof t}}(r||(r={})),function(t){t.is=function(t){return"string"==typeof t}}(i||(i={})),function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,t.is=function(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}}(a||(a={})),function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647,t.is=function(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}}(s||(s={})),function(t){t.create=function(t,e){return t===Number.MAX_VALUE&&(t=s.MAX_VALUE),e===Number.MAX_VALUE&&(e=s.MAX_VALUE),{line:t,character:e}},t.is=function(t){let e=t;return It.objectLiteral(e)&&It.uinteger(e.line)&&It.uinteger(e.character)}}(o||(o={})),function(t){t.create=function(t,e,n,r){if(It.uinteger(t)&&It.uinteger(e)&&It.uinteger(n)&&It.uinteger(r))return{start:o.create(t,e),end:o.create(n,r)};if(o.is(t)&&o.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${n}, ${r}]`)},t.is=function(t){let e=t;return It.objectLiteral(e)&&o.is(e.start)&&o.is(e.end)}}(l||(l={})),function(t){t.create=function(t,e){return{uri:t,range:e}},t.is=function(t){let e=t;return It.objectLiteral(e)&&l.is(e.range)&&(It.string(e.uri)||It.undefined(e.uri))}}(c||(c={})),function(t){t.create=function(t,e,n,r){return{targetUri:t,targetRange:e,targetSelectionRange:n,originSelectionRange:r}},t.is=function(t){let e=t;return It.objectLiteral(e)&&l.is(e.targetRange)&&It.string(e.targetUri)&&l.is(e.targetSelectionRange)&&(l.is(e.originSelectionRange)||It.undefined(e.originSelectionRange))}}(h||(h={})),function(t){t.create=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},t.is=function(t){const e=t;return It.objectLiteral(e)&&It.numberRange(e.red,0,1)&&It.numberRange(e.green,0,1)&&It.numberRange(e.blue,0,1)&&It.numberRange(e.alpha,0,1)}}(u||(u={})),function(t){t.create=function(t,e){return{range:t,color:e}},t.is=function(t){const e=t;return It.objectLiteral(e)&&l.is(e.range)&&u.is(e.color)}}(d||(d={})),function(t){t.create=function(t,e,n){return{label:t,textEdit:e,additionalTextEdits:n}},t.is=function(t){const e=t;return It.objectLiteral(e)&&It.string(e.label)&&(It.undefined(e.textEdit)||T.is(e))&&(It.undefined(e.additionalTextEdits)||It.typedArray(e.additionalTextEdits,T.is))}}(p||(p={})),function(t){t.Comment="comment",t.Imports="imports",t.Region="region"}(f||(f={})),function(t){t.create=function(t,e,n,r,i,a){const s={startLine:t,endLine:e};return It.defined(n)&&(s.startCharacter=n),It.defined(r)&&(s.endCharacter=r),It.defined(i)&&(s.kind=i),It.defined(a)&&(s.collapsedText=a),s},t.is=function(t){const e=t;return It.objectLiteral(e)&&It.uinteger(e.startLine)&&It.uinteger(e.startLine)&&(It.undefined(e.startCharacter)||It.uinteger(e.startCharacter))&&(It.undefined(e.endCharacter)||It.uinteger(e.endCharacter))&&(It.undefined(e.kind)||It.string(e.kind))}}(g||(g={})),function(t){t.create=function(t,e){return{location:t,message:e}},t.is=function(t){let e=t;return It.defined(e)&&c.is(e.location)&&It.string(e.message)}}(m||(m={})),function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4}(y||(y={})),function(t){t.Unnecessary=1,t.Deprecated=2}(v||(v={})),function(t){t.is=function(t){const e=t;return It.objectLiteral(e)&&It.string(e.href)}}(x||(x={})),function(t){t.create=function(t,e,n,r,i,a){let s={range:t,message:e};return It.defined(n)&&(s.severity=n),It.defined(r)&&(s.code=r),It.defined(i)&&(s.source=i),It.defined(a)&&(s.relatedInformation=a),s},t.is=function(t){var e;let n=t;return It.defined(n)&&l.is(n.range)&&It.string(n.message)&&(It.number(n.severity)||It.undefined(n.severity))&&(It.integer(n.code)||It.string(n.code)||It.undefined(n.code))&&(It.undefined(n.codeDescription)||It.string(null===(e=n.codeDescription)||void 0===e?void 0:e.href))&&(It.string(n.source)||It.undefined(n.source))&&(It.undefined(n.relatedInformation)||It.typedArray(n.relatedInformation,m.is))}}(b||(b={})),function(t){t.create=function(t,e,...n){let r={title:t,command:e};return It.defined(n)&&n.length>0&&(r.arguments=n),r},t.is=function(t){let e=t;return It.defined(e)&&It.string(e.title)&&It.string(e.command)}}(w||(w={})),function(t){t.replace=function(t,e){return{range:t,newText:e}},t.insert=function(t,e){return{range:{start:t,end:t},newText:e}},t.del=function(t){return{range:t,newText:""}},t.is=function(t){const e=t;return It.objectLiteral(e)&&It.string(e.newText)&&l.is(e.range)}}(T||(T={})),function(t){t.create=function(t,e,n){const r={label:t};return void 0!==e&&(r.needsConfirmation=e),void 0!==n&&(r.description=n),r},t.is=function(t){const e=t;return It.objectLiteral(e)&&It.string(e.label)&&(It.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(It.string(e.description)||void 0===e.description)}}(k||(k={})),function(t){t.is=function(t){const e=t;return It.string(e)}}(E||(E={})),function(t){t.replace=function(t,e,n){return{range:t,newText:e,annotationId:n}},t.insert=function(t,e,n){return{range:{start:t,end:t},newText:e,annotationId:n}},t.del=function(t,e){return{range:t,newText:"",annotationId:e}},t.is=function(t){const e=t;return T.is(e)&&(k.is(e.annotationId)||E.is(e.annotationId))}}(A||(A={})),function(t){t.create=function(t,e){return{textDocument:t,edits:e}},t.is=function(t){let e=t;return It.defined(e)&&N.is(e.textDocument)&&Array.isArray(e.edits)}}(_||(_={})),function(t){t.create=function(t,e,n){let r={kind:"create",uri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(r.options=e),void 0!==n&&(r.annotationId=n),r},t.is=function(t){let e=t;return e&&"create"===e.kind&&It.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||It.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||It.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||E.is(e.annotationId))}}(C||(C={})),function(t){t.create=function(t,e,n,r){let i={kind:"rename",oldUri:t,newUri:e};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},t.is=function(t){let e=t;return e&&"rename"===e.kind&&It.string(e.oldUri)&&It.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||It.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||It.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||E.is(e.annotationId))}}(S||(S={})),function(t){t.create=function(t,e,n){let r={kind:"delete",uri:t};return void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(r.options=e),void 0!==n&&(r.annotationId=n),r},t.is=function(t){let e=t;return e&&"delete"===e.kind&&It.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||It.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||It.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||E.is(e.annotationId))}}(R||(R={})),function(t){t.is=function(t){let e=t;return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(t=>It.string(t.kind)?C.is(t)||S.is(t)||R.is(t):_.is(t)))}}(L||(L={}));class Ct{constructor(t,e){this.edits=t,this.changeAnnotations=e}insert(t,e,n){let r,i;if(void 0===n?r=T.insert(t,e):E.is(n)?(i=n,r=A.insert(t,e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=A.insert(t,e,i)),this.edits.push(r),void 0!==i)return i}replace(t,e,n){let r,i;if(void 0===n?r=T.replace(t,e):E.is(n)?(i=n,r=A.replace(t,e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=A.replace(t,e,i)),this.edits.push(r),void 0!==i)return i}delete(t,e){let n,r;if(void 0===e?n=T.del(t):E.is(e)?(r=e,n=A.del(t,e)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(e),n=A.del(t,r)),this.edits.push(n),void 0!==r)return r}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(void 0===t)throw new Error("Text edit change is not configured to manage change annotations.")}}class St{constructor(t){this._annotations=void 0===t?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,e){let n;if(E.is(t)?n=t:(n=this.nextId(),e=t),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===e)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=e,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Rt{constructor(t){this._textEditChanges=Object.create(null),void 0!==t?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new St(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(t=>{if(_.is(t)){const e=new Ct(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(e=>{const n=new Ct(t.changes[e]);this._textEditChanges[e]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(N.is(t)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const e={uri:t.uri,version:t.version};let n=this._textEditChanges[e.uri];if(!n){const t=[],r={textDocument:e,edits:t};this._workspaceEdit.documentChanges.push(r),n=new Ct(t,this._changeAnnotations),this._textEditChanges[e.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[t];if(!e){let n=[];this._workspaceEdit.changes[t]=n,e=new Ct(n),this._textEditChanges[t]=e}return e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new St,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,e,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,a;if(k.is(e)||E.is(e)?r=e:n=e,void 0===r?i=C.create(t,n):(a=E.is(r)?r:this._changeAnnotations.manage(r),i=C.create(t,n,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}renameFile(t,e,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,a,s;if(k.is(n)||E.is(n)?i=n:r=n,void 0===i?a=S.create(t,e,r):(s=E.is(i)?i:this._changeAnnotations.manage(i),a=S.create(t,e,r,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(t,e,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,a;if(k.is(e)||E.is(e)?r=e:n=e,void 0===r?i=R.create(t,n):(a=E.is(r)?r:this._changeAnnotations.manage(r),i=R.create(t,n,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}}!function(t){t.create=function(t){return{uri:t}},t.is=function(t){let e=t;return It.defined(e)&&It.string(e.uri)}}(D||(D={})),function(t){t.create=function(t,e){return{uri:t,version:e}},t.is=function(t){let e=t;return It.defined(e)&&It.string(e.uri)&&It.integer(e.version)}}(I||(I={})),function(t){t.create=function(t,e){return{uri:t,version:e}},t.is=function(t){let e=t;return It.defined(e)&&It.string(e.uri)&&(null===e.version||It.integer(e.version))}}(N||(N={})),function(t){t.create=function(t,e,n,r){return{uri:t,languageId:e,version:n,text:r}},t.is=function(t){let e=t;return It.defined(e)&&It.string(e.uri)&&It.string(e.languageId)&&It.integer(e.version)&&It.string(e.text)}}(M||(M={})),function(t){t.PlainText="plaintext",t.Markdown="markdown",t.is=function(e){const n=e;return n===t.PlainText||n===t.Markdown}}(O||(O={})),function(t){t.is=function(t){const e=t;return It.objectLiteral(t)&&O.is(e.kind)&&It.string(e.value)}}(P||(P={})),function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25}($||($={})),function(t){t.PlainText=1,t.Snippet=2}(B||(B={})),function(t){t.Deprecated=1}(F||(F={})),function(t){t.create=function(t,e,n){return{newText:t,insert:e,replace:n}},t.is=function(t){const e=t;return e&&It.string(e.newText)&&l.is(e.insert)&&l.is(e.replace)}}(z||(z={})),function(t){t.asIs=1,t.adjustIndentation=2}(K||(K={})),function(t){t.is=function(t){const e=t;return e&&(It.string(e.detail)||void 0===e.detail)&&(It.string(e.description)||void 0===e.description)}}(q||(q={})),function(t){t.create=function(t){return{label:t}}}(U||(U={})),function(t){t.create=function(t,e){return{items:t||[],isIncomplete:!!e}}}(j||(j={})),function(t){t.fromPlainText=function(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},t.is=function(t){const e=t;return It.string(e)||It.objectLiteral(e)&&It.string(e.language)&&It.string(e.value)}}(Y||(Y={})),function(t){t.is=function(t){let e=t;return!!e&&It.objectLiteral(e)&&(P.is(e.contents)||Y.is(e.contents)||It.typedArray(e.contents,Y.is))&&(void 0===t.range||l.is(t.range))}}(G||(G={})),function(t){t.create=function(t,e){return e?{label:t,documentation:e}:{label:t}}}(W||(W={})),function(t){t.create=function(t,e,...n){let r={label:t};return It.defined(e)&&(r.documentation=e),It.defined(n)?r.parameters=n:r.parameters=[],r}}(V||(V={})),function(t){t.Text=1,t.Read=2,t.Write=3}(H||(H={})),function(t){t.create=function(t,e){let n={range:t};return It.number(e)&&(n.kind=e),n}}(X||(X={})),function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26}(Z||(Z={})),function(t){t.Deprecated=1}(Q||(Q={})),function(t){t.create=function(t,e,n,r,i){let a={name:t,kind:e,location:{uri:r,range:n}};return i&&(a.containerName=i),a}}(J||(J={})),function(t){t.create=function(t,e,n,r){return void 0!==r?{name:t,kind:e,location:{uri:n,range:r}}:{name:t,kind:e,location:{uri:n}}}}(tt||(tt={})),function(t){t.create=function(t,e,n,r,i,a){let s={name:t,detail:e,kind:n,range:r,selectionRange:i};return void 0!==a&&(s.children=a),s},t.is=function(t){let e=t;return e&&It.string(e.name)&&It.number(e.kind)&&l.is(e.range)&&l.is(e.selectionRange)&&(void 0===e.detail||It.string(e.detail))&&(void 0===e.deprecated||It.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}}(et||(et={})),function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"}(nt||(nt={})),function(t){t.Invoked=1,t.Automatic=2}(rt||(rt={})),function(t){t.create=function(t,e,n){let r={diagnostics:t};return null!=e&&(r.only=e),null!=n&&(r.triggerKind=n),r},t.is=function(t){let e=t;return It.defined(e)&&It.typedArray(e.diagnostics,b.is)&&(void 0===e.only||It.typedArray(e.only,It.string))&&(void 0===e.triggerKind||e.triggerKind===rt.Invoked||e.triggerKind===rt.Automatic)}}(it||(it={})),function(t){t.create=function(t,e,n){let r={title:t},i=!0;return"string"==typeof e?(i=!1,r.kind=e):w.is(e)?r.command=e:r.edit=e,i&&void 0!==n&&(r.kind=n),r},t.is=function(t){let e=t;return e&&It.string(e.title)&&(void 0===e.diagnostics||It.typedArray(e.diagnostics,b.is))&&(void 0===e.kind||It.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||w.is(e.command))&&(void 0===e.isPreferred||It.boolean(e.isPreferred))&&(void 0===e.edit||L.is(e.edit))}}(at||(at={})),function(t){t.create=function(t,e){let n={range:t};return It.defined(e)&&(n.data=e),n},t.is=function(t){let e=t;return It.defined(e)&&l.is(e.range)&&(It.undefined(e.command)||w.is(e.command))}}(st||(st={})),function(t){t.create=function(t,e){return{tabSize:t,insertSpaces:e}},t.is=function(t){let e=t;return It.defined(e)&&It.uinteger(e.tabSize)&&It.boolean(e.insertSpaces)}}(ot||(ot={})),function(t){t.create=function(t,e,n){return{range:t,target:e,data:n}},t.is=function(t){let e=t;return It.defined(e)&&l.is(e.range)&&(It.undefined(e.target)||It.string(e.target))}}(lt||(lt={})),function(t){t.create=function(t,e){return{range:t,parent:e}},t.is=function(e){let n=e;return It.objectLiteral(n)&&l.is(n.range)&&(void 0===n.parent||t.is(n.parent))}}(ct||(ct={})),function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"}(ht||(ht={})),function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"}(ut||(ut={})),function(t){t.is=function(t){const e=t;return It.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}}(dt||(dt={})),function(t){t.create=function(t,e){return{range:t,text:e}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&It.string(e.text)}}(pt||(pt={})),function(t){t.create=function(t,e,n){return{range:t,variableName:e,caseSensitiveLookup:n}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&It.boolean(e.caseSensitiveLookup)&&(It.string(e.variableName)||void 0===e.variableName)}}(ft||(ft={})),function(t){t.create=function(t,e){return{range:t,expression:e}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&(It.string(e.expression)||void 0===e.expression)}}(gt||(gt={})),function(t){t.create=function(t,e){return{frameId:t,stoppedLocation:e}},t.is=function(t){const e=t;return It.defined(e)&&l.is(t.stoppedLocation)}}(mt||(mt={})),function(t){t.Type=1,t.Parameter=2,t.is=function(t){return 1===t||2===t}}(yt||(yt={})),function(t){t.create=function(t){return{value:t}},t.is=function(t){const e=t;return It.objectLiteral(e)&&(void 0===e.tooltip||It.string(e.tooltip)||P.is(e.tooltip))&&(void 0===e.location||c.is(e.location))&&(void 0===e.command||w.is(e.command))}}(vt||(vt={})),function(t){t.create=function(t,e,n){const r={position:t,label:e};return void 0!==n&&(r.kind=n),r},t.is=function(t){const e=t;return It.objectLiteral(e)&&o.is(e.position)&&(It.string(e.label)||It.typedArray(e.label,vt.is))&&(void 0===e.kind||yt.is(e.kind))&&void 0===e.textEdits||It.typedArray(e.textEdits,T.is)&&(void 0===e.tooltip||It.string(e.tooltip)||P.is(e.tooltip))&&(void 0===e.paddingLeft||It.boolean(e.paddingLeft))&&(void 0===e.paddingRight||It.boolean(e.paddingRight))}}(xt||(xt={})),function(t){t.createSnippet=function(t){return{kind:"snippet",value:t}}}(bt||(bt={})),function(t){t.create=function(t,e,n,r){return{insertText:t,filterText:e,range:n,command:r}}}(wt||(wt={})),function(t){t.create=function(t){return{items:t}}}(Tt||(Tt={})),function(t){t.Invoked=0,t.Automatic=1}(kt||(kt={})),function(t){t.create=function(t,e){return{range:t,text:e}}}(Et||(Et={})),function(t){t.create=function(t,e){return{triggerKind:t,selectedCompletionInfo:e}}}(At||(At={})),function(t){t.is=function(t){const e=t;return It.objectLiteral(e)&&i.is(e.uri)&&It.string(e.name)}}(_t||(_t={}));const Lt=["\n","\r\n","\r"];var Dt,It;!function(t){function e(t,n){if(t.length<=1)return t;const r=t.length/2|0,i=t.slice(0,r),a=t.slice(r);e(i,n),e(a,n);let s=0,o=0,l=0;for(;s<i.length&&o<a.length;){let e=n(i[s],a[o]);t[l++]=e<=0?i[s++]:a[o++]}for(;s<i.length;)t[l++]=i[s++];for(;o<a.length;)t[l++]=a[o++];return t}t.create=function(t,e,n,r){return new Nt(t,e,n,r)},t.is=function(t){let e=t;return!!(It.defined(e)&&It.string(e.uri)&&(It.undefined(e.languageId)||It.string(e.languageId))&&It.uinteger(e.lineCount)&&It.func(e.getText)&&It.func(e.positionAt)&&It.func(e.offsetAt))},t.applyEdits=function(t,n){let r=t.getText(),i=e(n,(t,e)=>{let n=t.range.start.line-e.range.start.line;return 0===n?t.range.start.character-e.range.start.character:n}),a=r.length;for(let e=i.length-1;e>=0;e--){let n=i[e],s=t.offsetAt(n.range.start),o=t.offsetAt(n.range.end);if(!(o<=a))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(o,r.length),a=s}return r}}(Dt||(Dt={}));class Nt{constructor(t,e,n,r){this._uri=t,this._languageId=e,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let e=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(e,n)}return this._content}update(t,e){this._content=t.text,this._version=e,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],e=this._content,n=!0;for(let r=0;r<e.length;r++){n&&(t.push(r),n=!1);let i=e.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<e.length&&"\n"===e.charAt(r+1)&&r++}n&&e.length>0&&t.push(e.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),n=0,r=e.length;if(0===r)return o.create(0,t);for(;n<r;){let i=Math.floor((n+r)/2);e[i]>t?r=i:n=i+1}let i=n-1;return o.create(i,t-e[i])}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let n=e[t.line],r=t.line+1<e.length?e[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(t){const e=Object.prototype.toString;t.defined=function(t){return void 0!==t},t.undefined=function(t){return void 0===t},t.boolean=function(t){return!0===t||!1===t},t.string=function(t){return"[object String]"===e.call(t)},t.number=function(t){return"[object Number]"===e.call(t)},t.numberRange=function(t,n,r){return"[object Number]"===e.call(t)&&n<=t&&t<=r},t.integer=function(t){return"[object Number]"===e.call(t)&&-2147483648<=t&&t<=2147483647},t.uinteger=function(t){return"[object Number]"===e.call(t)&&0<=t&&t<=2147483647},t.func=function(t){return"[object Function]"===e.call(t)},t.objectLiteral=function(t){return null!==t&&"object"==typeof t},t.typedArray=function(t,e){return Array.isArray(t)&&t.every(e)}}(It||(It={}))},7608(t,e,n){"use strict";var r;n.d(e,{A:()=>a,r:()=>i}),(()=>{var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o<t.length)n=t.charCodeAt(o);else{if(47===n)break;n=47}if(47===n){if(a===o-1||1===s);else if(a!==o-1&&2===s){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),a=o,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=o,s=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(a+1,o):r=t.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var t,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(r=s+"/"+r,i=47===s.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,s=a-i,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var l=n.length-o,c=s<l?s:l,h=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===n.charCodeAt(o+u))return n.slice(o+u+1);if(0===u)return n.slice(o+u)}else s>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==n.charCodeAt(o+u))break;47===d&&(h=u)}var p="";for(u=i+h+1;u<=a;++u)u!==a&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(o+h):(o+=h,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(n=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,i=0,a=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var o=n.length-1,l=-1;for(r=t.length-1;r>=0;--r){var c=t.charCodeAt(r);if(47===c){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),o>=0&&(c===n.charCodeAt(o)?-1==--o&&(a=r):(o=-1,a=l))}return i===a?a=l:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!s){i=r+1;break}}else-1===a&&(s=!1,a=r+1);return-1===a?"":t.slice(i,a)},extname:function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,s=0,o=t.length-1;o>=0;--o){var l=t.charCodeAt(o);if(47!==l)-1===i&&(a=!1,i=o+1),46===l?-1===n?n=o:1!==s&&(s=1):-1!==n&&(s=-1);else if(!a){r=o+1;break}}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var s=-1,o=0,l=-1,c=!0,h=t.length-1,u=0;h>=r;--h)if(47!==(i=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){o=h+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===o+1?-1!==l&&(n.base=n.name=0===o&&a?t.slice(1,l):t.slice(o,l)):(0===o&&a?(n.name=t.slice(1,s),n.base=t.slice(1,l)):(n.name=t.slice(o,s),n.base=t.slice(o,l)),n.ext=t.slice(s,l)),o>0?n.dir=t.slice(0,o-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};let a;if(n.r(i),n.d(i,{URI:()=>p,Utils:()=>C}),"object"==typeof process)a="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;a=t.indexOf("Windows")>=0}const s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function c(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(t){return t instanceof p||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,n,r,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,a),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==u&&(e=u+e):e=u}return e}(this.scheme,n||h),this.query=r||h,this.fragment=i||h,c(this,a))}get fsPath(){return x(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:n,path:r,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===n?n=this.authority:null===n&&(n=h),void 0===r?r=this.path:null===r&&(r=h),void 0===i?i=this.query:null===i&&(i=h),void 0===a?a=this.fragment:null===a&&(a=h),e===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new g(e,n,r,i,a)}static parse(t,e=!1){const n=d.exec(t);return n?new g(n[2]||h,k(n[4]||h),k(n[5]||h),k(n[7]||h),k(n[9]||h),e):new g(h,h,h,h,h)}static file(t){let e=h;if(a&&(t=t.replace(/\\/g,u)),t[0]===u&&t[1]===u){const n=t.indexOf(u,2);-1===n?(e=t.substring(2),t=u):(e=t.substring(2,n),t=t.substring(n)||u)}return new g("file",e,t,h,h)}static from(t){const e=new g(t.scheme,t.authority,t.path,t.query,t.fragment);return c(e,!0),e}toString(t=!1){return b(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof p)return t;{const e=new g(t);return e._formatted=t.external,e._fsPath=t._sep===f?t.fsPath:null,e}}return t}}const f=a?1:void 0;class g extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(t=!1){return t?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=f),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(t,e,n){let r,i=-1;for(let a=0;a<t.length;a++){const s=t.charCodeAt(a);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==i&&(r+=encodeURIComponent(t.substring(i,a)),i=-1),void 0!==r&&(r+=t.charAt(a));else{void 0===r&&(r=t.substr(0,a));const e=m[s];void 0!==e?(-1!==i&&(r+=encodeURIComponent(t.substring(i,a)),i=-1),r+=e):-1===i&&(i=a)}}return-1!==i&&(r+=encodeURIComponent(t.substring(i))),void 0!==r?r:t}function v(t){let e;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);35===r||63===r?(void 0===e&&(e=t.substr(0,n)),e+=m[r]):void 0!==e&&(e+=t[n])}return void 0!==e?e:t}function x(t,e){let n;return n=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,a&&(n=n.replace(/\//g,"\\")),n}function b(t,e){const n=e?v:y;let r="",{scheme:i,authority:a,path:s,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(a||"file"===i)&&(r+=u,r+=u),a){let t=a.indexOf("@");if(-1!==t){const e=a.substr(0,t);a=a.substr(t+1),t=e.lastIndexOf(":"),-1===t?r+=n(e,!1,!1):(r+=n(e.substr(0,t),!1,!1),r+=":",r+=n(e.substr(t+1),!1,!0)),r+="@"}a=a.toLowerCase(),t=a.lastIndexOf(":"),-1===t?r+=n(a,!1,!0):(r+=n(a.substr(0,t),!1,!0),r+=a.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:y(l,!1,!1)),r}function w(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(t){return t.match(T)?t.replace(T,t=>w(t)):t}var E=n(975);const A=E.posix||E,_="/";var C;!function(t){t.joinPath=function(t,...e){return t.with({path:A.join(t.path,...e)})},t.resolvePath=function(t,...e){let n=t.path,r=!1;n[0]!==_&&(n=_+n,r=!0);let i=A.resolve(n,...e);return r&&i[0]===_&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===_)return t;let e=A.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return A.basename(t.path)},t.extname=function(t){return A.extname(t.path)}}(C||(C={})),r=i})();const{URI:i,Utils:a}=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r].call(a.exports,a,a.exports,n),a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>Qe});var t=n(1475),e=n(3283),i=n(9856),a=(n(5948),n(4769),n(1174),n(7879),n(1960),n(6779)),s=n(796),o=n(4098),l=n(797),c=n(513),h=n(1444),u="comm",d="rule",p="decl",f=Math.abs,g=String.fromCharCode;Object.assign;function m(t){return t.trim()}function y(t,e,n){return t.replace(e,n)}function v(t,e,n){return t.indexOf(e,n)}function x(t,e){return 0|t.charCodeAt(e)}function b(t,e,n){return t.slice(e,n)}function w(t){return t.length}function T(t,e){return e.push(t),t}function k(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function E(t,e,n,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case p:return t.return=t.return||t.value;case u:return"";case"@keyframes":return t.return=t.value+"{"+k(t.children,r)+"}";case d:if(!w(t.value=t.props.join(",")))return""}return w(n=k(t.children,r))?t.return=t.value+"{"+n+"}":""}var A=1,_=1,C=0,S=0,R=0,L="";function D(t,e,n,r,i,a,s,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:A,column:_,length:s,return:"",siblings:o}}function I(){return R=S>0?x(L,--S):0,_--,10===R&&(_=1,A--),R}function N(){return R=S<C?x(L,S++):0,_++,10===R&&(_=1,A++),R}function M(){return x(L,S)}function O(){return S}function P(t,e){return b(L,t,e)}function $(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function B(t){return A=_=1,C=w(L=t),S=0,[]}function F(t){return L="",t}function z(t){return m(P(S-1,U(91===t?t+2:40===t?t+1:t)))}function K(t){for(;(R=M())&&R<33;)N();return $(t)>2||$(R)>3?"":" "}function q(t,e){for(;--e&&N()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return P(t,O()+(e<6&&32==M()&&32==N()))}function U(t){for(;N();)switch(R){case t:return S;case 34:case 39:34!==t&&39!==t&&U(R);break;case 40:41===t&&U(t);break;case 92:N()}return S}function j(t,e){for(;N()&&t+R!==57&&(t+R!==84||47!==M()););return"/*"+P(e,S-1)+"*"+g(47===t?t:N())}function Y(t){for(;!$(M());)N();return P(t,S)}function G(t){return F(W("",null,null,null,[""],t=B(t),0,[0],t))}function W(t,e,n,r,i,a,s,o,l){for(var c=0,h=0,u=s,d=0,p=0,m=0,k=1,E=1,A=1,_=0,C="",S=i,R=a,L=r,D=C;E;)switch(m=_,_=N()){case 40:if(108!=m&&58==x(D,u-1)){-1!=v(D+=y(z(_),"&","&\f"),"&\f",f(c?o[c-1]:0))&&(A=-1);break}case 34:case 39:case 91:D+=z(_);break;case 9:case 10:case 13:case 32:D+=K(m);break;case 92:D+=q(O()-1,7);continue;case 47:switch(M()){case 42:case 47:T(H(j(N(),O()),e,n,l),l),5!=$(m||1)&&5!=$(M()||1)||!w(D)||" "===b(D,-1,void 0)||(D+=" ");break;default:D+="/"}break;case 123*k:o[c++]=w(D)*A;case 125*k:case 59:case 0:switch(_){case 0:case 125:E=0;case 59+h:-1==A&&(D=y(D,/\f/g,"")),p>0&&(w(D)-u||0===k&&47===m)&&T(p>32?X(D+";",r,n,u-1,l):X(y(D," ","")+";",r,n,u-2,l),l);break;case 59:D+=";";default:if(T(L=V(D,e,n,c,h,i,o,C,S=[],R=[],u,a),a),123===_)if(0===h)W(D,e,L,L,S,a,u,o,R);else{switch(d){case 99:if(110===x(D,3))break;case 108:if(97===x(D,2))break;default:h=0;case 100:case 109:case 115:}h?W(t,L,L,r&&T(V(t,L,L,0,0,i,o,C,i,S=[],u,R),R),i,R,u,o,r?S:R):W(D,L,L,L,[""],R,0,o,R)}}c=h=p=0,k=A=1,C=D="",u=s;break;case 58:u=1+w(D),p=m;default:if(k<1)if(123==_)--k;else if(125==_&&0==k++&&125==I())continue;switch(D+=g(_),_*k){case 38:A=h>0?1:(D+="\f",-1);break;case 44:o[c++]=(w(D)-1)*A,A=1;break;case 64:45===M()&&(D+=z(N())),d=M(),h=u=w(C=D+=Y(O())),_++;break;case 45:45===m&&2==w(D)&&(k=0)}}return a}function V(t,e,n,r,i,a,s,o,l,c,h,u){for(var p=i-1,g=0===i?a:[""],v=function(t){return t.length}(g),x=0,w=0,T=0;x<r;++x)for(var k=0,E=b(t,p+1,p=f(w=s[x])),A=t;k<v;++k)(A=m(w>0?g[k]+" "+E:y(E,/&\f/g,g[k])))&&(l[T++]=A);return D(t,e,n,0===i?d:o,l,c,h,u)}function H(t,e,n,r){return D(t,e,n,u,g(R),b(t,2,-2),0,r)}function X(t,e,n,r,i){return D(t,e,n,p,b(t,0,r),b(t,r+1,-1),r,i)}var Z=n(3047),Q=n(6401),J={id:"c4",detector:(0,l.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,8659));return{id:"c4",diagram:t}},"loader")},tt="flowchart",et={id:tt,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,2038));return{id:tt,diagram:t}},"loader")},nt="flowchart-v2",rt={id:nt,detector:(0,l.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,2038));return{id:nt,diagram:t}},"loader")},it={id:"er",detector:(0,l.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5378));return{id:"er",diagram:t}},"loader")},at="gitGraph",st={id:at,detector:(0,l.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,1679));return{id:at,diagram:t}},"loader")},ot="gantt",lt={id:ot,detector:(0,l.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5944));return{id:ot,diagram:t}},"loader")},ct="info",ht={id:ct,detector:(0,l.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,7999));return{id:ct,diagram:t}},"loader")},ut={id:"pie",detector:(0,l.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5518));return{id:"pie",diagram:t}},"loader")},dt="quadrantChart",pt={id:dt,detector:(0,l.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,7333));return{id:dt,diagram:t}},"loader")},ft="xychart",gt={id:ft,detector:(0,l.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5359));return{id:ft,diagram:t}},"loader")},mt="requirement",yt={id:mt,detector:(0,l.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5895));return{id:mt,diagram:t}},"loader")},vt="sequence",xt={id:vt,detector:(0,l.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,1031));return{id:vt,diagram:t}},"loader")},bt="class",wt={id:bt,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,4377));return{id:bt,diagram:t}},"loader")},Tt="classDiagram",kt={id:Tt,detector:(0,l.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,9169));return{id:Tt,diagram:t}},"loader")},Et="state",At={id:Et,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,4070));return{id:Et,diagram:t}},"loader")},_t="stateDiagram",Ct={id:_t,detector:(0,l.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,4293));return{id:_t,diagram:t}},"loader")},St="journey",Rt={id:St,detector:(0,l.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,8894));return{id:St,diagram:t}},"loader")},Lt={draw:(0,l.K2)((e,n,r)=>{l.Rm.debug("rendering svg for syntax error\n");const i=(0,t.D)(n),a=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,o.a$)(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Dt=Lt,It={db:{},renderer:Lt,parser:{parse:(0,l.K2)(()=>{},"parse")}},Nt="flowchart-elk",Mt={id:Nt,detector:(0,l.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,2038));return{id:Nt,diagram:t}},"loader")},Ot="timeline",Pt={id:Ot,detector:(0,l.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,6550));return{id:Ot,diagram:t}},"loader")},$t="mindmap",Bt={id:$t,detector:(0,l.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,7969));return{id:$t,diagram:t}},"loader")},Ft="kanban",zt={id:Ft,detector:(0,l.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,716));return{id:Ft,diagram:t}},"loader")},Kt="sankey",qt={id:Kt,detector:(0,l.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,8535));return{id:Kt,diagram:t}},"loader")},Ut="packet",jt={id:Ut,detector:(0,l.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,7598));return{id:Ut,diagram:t}},"loader")},Yt="radar",Gt={id:Yt,detector:(0,l.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,5447));return{id:Yt,diagram:t}},"loader")},Wt="block",Vt={id:Wt,detector:(0,l.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,7367));return{id:Wt,diagram:t}},"loader")},Ht="architecture",Xt={id:Ht,detector:(0,l.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,9311));return{id:Ht,diagram:t}},"loader")},Zt="ishikawa",Qt={id:Zt,detector:(0,l.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,878));return{id:Zt,diagram:t}},"loader")},Jt="venn",te={id:Jt,detector:(0,l.K2)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,957));return{id:Jt,diagram:t}},"loader")},ee="treemap",ne={id:ee,detector:(0,l.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(n.bind(n,8811));return{id:ee,diagram:t}},"loader")},re=!1,ie=(0,l.K2)(()=>{re||(re=!0,(0,o.Js)("error",It,t=>"error"===t.toLowerCase().trim()),(0,o.Js)("---",{db:{clear:(0,l.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,l.K2)(()=>{},"draw")},parser:{parse:(0,l.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,l.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,o.Xd)(Mt,Bt,Xt),(0,o.Xd)(J,zt,kt,wt,it,lt,ht,ut,yt,xt,rt,et,Pt,st,Ct,At,Rt,pt,qt,jt,gt,Vt,Gt,Qt,ne,te))},"addDiagrams"),ae=(0,l.K2)(async()=>{l.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(o.mW).map(async([t,{detector:e,loader:n}])=>{if(n)try{(0,o.Gs)(t)}catch{try{const{diagram:t,id:r}=await n();(0,o.Js)(r,t,e)}catch(r){throw l.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete o.mW[t],r}}}))).filter(t=>"rejected"===t.status);if(t.length>0){l.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)l.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function se(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function oe(t,e,n,r){if(void 0!==t.insert){if(n){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(n)}if(e){const n=`chart-title-${r}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}(0,l.K2)(se,"setA11yDiagramInfo"),(0,l.K2)(oe,"addSVGa11yTitleDescription");var le=class t{constructor(t,e,n,r,i){this.type=t,this.text=e,this.db=n,this.parser=r,this.renderer=i}static{(0,l.K2)(this,"Diagram")}static async fromText(e,n={}){const r=(0,o.zj)(),i=(0,o.Ch)(e,r);e=(0,s.C4)(e)+"\n";try{(0,o.Gs)(i)}catch{const t=(0,o.J$)(i);if(!t)throw new o.C0(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();(0,o.Js)(e,n)}const{db:a,parser:l,renderer:c,init:h}=(0,o.Gs)(i);return l.parser&&(l.parser.yy=a),a.clear?.(),h?.(r),n.title&&a.setDiagramTitle?.(n.title),await l.parse(e),new t(i,e,a,l,c)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ce=[],he=(0,l.K2)(()=>{ce.forEach(t=>{t()}),ce=[]},"attachFunctions"),ue=(0,l.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function de(t){const n=t.match(o.EJ);if(!n)return{text:t,metadata:{}};let r=(0,e.H)(n[1],{schema:e.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(n[0].length),metadata:i}}(0,l.K2)(de,"extractFrontMatter");var pe=(0,l.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,n)=>"<"+e+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fe=(0,l.K2)(t=>{const{text:e,metadata:n}=de(t),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||(a.gantt={}),a.gantt.displayMode=r),{title:i,config:a,text:e}},"processFrontmatter"),ge=(0,l.K2)(t=>{const e=s._K.detectInit(t)??{},n=s._K.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:t})=>"wrap"===t):"wrap"===n?.type&&(e.wrap=!0),{text:(0,s.vU)(t),directive:e}},"processDirectives");function me(t){const e=pe(t),n=fe(e),r=ge(n.text),i=(0,s.$t)(n.config,r.directive);return{code:t=ue(r.text),title:n.title,config:i}}function ye(t){const e=(new TextEncoder).encode(t),n=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(n)}(0,l.K2)(me,"preprocessDiagram"),(0,l.K2)(ye,"toBase64");var ve=["foreignobject"],xe=["dominant-baseline"];function be(t){const e=me(t);return(0,o.cL)(),(0,o.xA)(e.config??{}),e}async function we(t,e){ie();try{const{code:e,config:n}=be(t);return{diagramType:(await Ie(e)).type,config:n}}catch(n){if(e?.suppressErrors)return!1;throw n}}(0,l.K2)(be,"processAndSetConfigs"),(0,l.K2)(we,"parse");var Te=(0,l.K2)((t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),ke=(0,l.K2)((t,e=new Map)=>{let n="";if(void 0!==t.themeCSS&&(n+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const r=(0,o.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,Q.A)(t.styles)||r.forEach(e=>{n+=Te(t.id,e,t.styles)}),(0,Q.A)(t.textStyles)||(n+=Te(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),Ee=(0,l.K2)((t,e,n,r)=>{const i=ke(t,n);return k(G(`${r}{${(0,o.tM)(e,i,t.themeVariables)}}`),E)},"createUserStyles"),Ae=(0,l.K2)((t="",e,n)=>{let r=t;return n||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=(0,s.Sm)(r),r=r.replace(/<br>/g,"<br/>"),r},"cleanUpSvgCode"),_e=(0,l.K2)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${ye(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),Ce=(0,l.K2)((t,e,n,r,i)=>{const a=t.append("div");a.attr("id",n),r&&a.attr("style",r);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function Se(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,l.K2)(Se,"sandboxedIframe");var Re=(0,l.K2)((t,e,n,r)=>{t.getElementById(e)?.remove(),t.getElementById(n)?.remove(),t.getElementById(r)?.remove()},"removeExistingElements"),Le=(0,l.K2)(async function(t,e,n){ie();const r=be(e);e=r.code;const i=(0,o.zj)();l.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a="#"+t,s="i"+t,c="#"+s,u="d"+t,d="#"+u,p=(0,l.K2)(()=>{const t=g?c:d,e=(0,h.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let f=(0,h.Ltv)("body");const g="sandbox"===i.securityLevel,m="loose"===i.securityLevel,y=i.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),g){const t=Se((0,h.Ltv)(n),s);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=(0,h.Ltv)(n);Ce(f,t,u,`font-family: ${y}`,"http://www.w3.org/1999/xlink")}else{if(Re(document,t,u,s),g){const t=Se((0,h.Ltv)("body"),s);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=(0,h.Ltv)("body");Ce(f,t,u)}let v,x;try{v=await le.fromText(e,{title:r.title})}catch(D){if(i.suppressErrorRendering)throw p(),D;v=await le.fromText("error"),x=D}const b=f.select(d).node(),w=v.type,T=b.firstChild,k=T.firstChild,E=v.renderer.getClasses?.(e,v),A=Ee(i,w,E,a),_=document.createElement("style");_.innerHTML=A,T.insertBefore(_,k);try{await v.renderer.draw(e,t,"11.13.0",v)}catch(I){throw i.suppressErrorRendering?p():Dt.draw(e,t,"11.13.0"),I}const C=f.select(`${d} svg`),S=v.db.getAccTitle?.(),R=v.db.getAccDescription?.();Ne(w,C,S,R),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=f.select(d).node().innerHTML;if(l.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),L=Ae(L,g,(0,o._3)(i.arrowMarkerAbsolute)),g){const t=f.select(d+" svg").node();L=_e(L,t)}else m||(L=Z.A.sanitize(L,{ADD_TAGS:ve,ADD_ATTR:xe,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(he(),x)throw x;return p(),{diagramType:w,svg:L,bindFunctions:v.db.bindFunctions}},"render");function De(t={}){const e=(0,o.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,o.wZ)(e),e?.theme&&e.theme in o.H$?e.themeVariables=o.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=o.H$.default.getThemeVariables(e.themeVariables));const n="object"==typeof e?(0,o.UU)(e):(0,o.Q2)();(0,l.He)(n.logLevel),ie()}(0,l.K2)(De,"initialize");var Ie=(0,l.K2)((t,e={})=>{const{code:n}=me(t);return le.fromText(n,e)},"getDiagramFromText");function Ne(t,e,n,r){se(e,t),oe(e,n,r,e.attr("id"))}(0,l.K2)(Ne,"addA11yInfo");var Me=Object.freeze({render:Le,parse:we,getDiagramFromText:Ie,initialize:De,getConfig:o.zj,setConfig:o.Nk,getSiteConfig:o.Q2,updateSiteConfig:o.B6,reset:(0,l.K2)(()=>{(0,o.cL)()},"reset"),globalReset:(0,l.K2)(()=>{(0,o.cL)(o.sb)},"globalReset"),defaultConfig:o.sb});(0,l.He)((0,o.zj)().logLevel),(0,o.cL)((0,o.zj)());var Oe=(0,l.K2)((t,e,n)=>{l.Rm.warn(t),(0,s.dq)(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Pe=(0,l.K2)(async function(t={querySelector:".mermaid"}){try{await $e(t)}catch(e){if((0,s.dq)(e)&&l.Rm.error(e.str),He.parseError&&He.parseError(e),!t.suppressErrors)throw l.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),$e=(0,l.K2)(async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const r=Me.getConfig();let i;if(l.Rm.debug((t?"":"No ")+"Callback function found"),n)i=n;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}l.Rm.debug(`Found ${i.length} diagrams`),void 0!==r?.startOnLoad&&(l.Rm.debug("Start On Load: "+r?.startOnLoad),Me.updateSiteConfig({startOnLoad:r?.startOnLoad}));const a=new s._K.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const h=[];for(const d of Array.from(i)){if(l.Rm.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=d.innerHTML,o=(0,c.T)(s._K.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const n=s._K.detectInit(o);n&&l.Rm.debug("Detected early reinit: ",n);try{const{svg:n,bindFunctions:r}=await We(e,o,d);d.innerHTML=n,t&&await t(e),r&&r(d)}catch(u){Oe(u,h,He.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),Be=(0,l.K2)(function(t){Me.initialize(t)},"initialize"),Fe=(0,l.K2)(async function(t,e,n){l.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Be(t);const r={postRenderCallback:n,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Pe(r)},"init"),ze=(0,l.K2)(async(t,{lazyLoad:e=!0}={})=>{ie(),(0,o.Xd)(...t),!1===e&&await ae()},"registerExternalDiagrams"),Ke=(0,l.K2)(function(){if(He.startOnLoad){const{startOnLoad:t}=Me.getConfig();t&&He.run().catch(t=>l.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ke,!1);var qe=(0,l.K2)(function(t){He.parseError=t},"setParseErrorHandler"),Ue=[],je=!1,Ye=(0,l.K2)(async()=>{if(!je){for(je=!0;Ue.length>0;){const e=Ue.shift();if(e)try{await e()}catch(t){l.Rm.error("Error executing queue",t)}}je=!1}},"executeQueue"),Ge=(0,l.K2)(async(t,e)=>new Promise((n,r)=>{const i=(0,l.K2)(()=>new Promise((i,a)=>{Me.parse(t,e).then(t=>{i(t),n(t)},t=>{l.Rm.error("Error parsing",t),He.parseError?.(t),a(t),r(t)})}),"performCall");Ue.push(i),Ye().catch(r)}),"parse"),We=(0,l.K2)((t,e,n)=>new Promise((r,i)=>{const a=(0,l.K2)(()=>new Promise((a,s)=>{Me.render(t,e,n).then(t=>{a(t),r(t)},t=>{l.Rm.error("Error parsing",t),He.parseError?.(t),s(t),i(t)})}),"performCall");Ue.push(a),Ye().catch(i)}),"render"),Ve=(0,l.K2)(()=>Object.keys(o.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),He={startOnLoad:!0,mermaidAPI:Me,parse:Ge,render:We,init:Fe,run:Pe,registerExternalDiagrams:ze,registerLayoutLoaders:i.sO,initialize:Be,parseError:void 0,contentLoaded:Ke,setParseErrorHandler:qe,detectType:o.Ch,registerIconPacks:a.pC,getRegisteredDiagramsMetadata:Ve},Xe=He;function Ze(t){var e=t.querySelectorAll(".mermaid");Xe.init({},e),e.forEach(function(t){return t.classList.add("content-center")})}const Qe={initMermaid:function(){Ze(document),document.querySelectorAll(".pluggable").forEach(function(t){return t.addEventListener("onPluginReady",function(){Ze(t)})})}}})(),window.__DOCS_MERMAID__=r})();