"use strict";!function(t,e){"object"==typeofexports&&"object"==typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define([],e):"object"==typeofexports?exports.vis=e():t.vis=e()}(this,function(){returnfunction(t){functione(o){if(i[o])returni[o].exports;varn=i[o]={exports:{},id:o,loaded:!1};returnt[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}vari={};returne.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Graph3d=i(11),e.graph3d={Camera:i(15),Filter:i(16),Point2d:i(14),Point3d:i(13),Slider:i(17),StepNumber:i(18)},e.Timeline=i(19),e.Graph2d=i(48),e.timeline={Core:i(27),DateUtil:i(26),Range:i(23),stack:i(31),TimeStep:i(29),components:{items:{Item:i(33),BackgroundItem:i(37),BoxItem:i(35),PointItem:i(36),RangeItem:i(32)},BackgroundGroup:i(34),Component:i(25),CurrentTime:i(43),CustomTime:i(41),DataAxis:i(50),DataScale:i(51),GraphGroup:i(52),Group:i(30),ItemSet:i(28),Legend:i(56),LineGraph:i(49),TimeAxis:i(38)}},e.Network=i(58),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(110)},e.network.convertDot=function(t){returne.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){returne.network.gephiParser.parseGephi(t,i)},e.moment=i(2),e.Hammer=i(20),e.keycharm=i(40)},function(t,e,i){varo=i(2),n=i(6);e.isNumber=function(t){returntinstanceofNumber||"number"==typeoft},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,o){if(e==t)return.5;varn=1/(e-t);returnMath.max(0,(o-t)*n)},e.isString=function(t){returntinstanceofString||"string"==typeoft},e.isDate=function(t){if(tinstanceofDate)return!0;if(e.isString(t)){vari=s.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){returnn.v4()},e.assignAllKeys=function(t,e){for(variint)t.hasOwnProperty(i)&&"object"!=typeoft[i]&&(t[i]=e)},e.fillIfDefined=function(t,i){varo=arguments.length<=2||void0===arguments[2]?!1:arguments[2];for(varnint)void0!==i[n]&&("object"!=typeofi[n]?void0!==i[n]&&null!==i[n]||void0===t[n]||o!==!0?t[n]=i[n]:deletet[n]:"object"==typeoft[n]&&e.fillIfDefined(t[n],i[n],o))},e.protoExtend=function(t,e){for(vari=1;i<arguments.length;i++){varo=arguments[i];for(varnino)t[n]=o[n]}returnt},e.extend=function(t,e){for(vari=1;i<arguments.length;i++){varo=arguments[i];for(varnino)o.hasOwnProperty(n)&&(t[n]=o[n])}returnt},e.selectiveExtend=function(t,e,i){if(!Array.isArray(t))thrownewError("Array with property names expected as first argument");for(varo=2;o<arguments.length;o++)for(varn=arguments[o],s=0;s<t.length;s++){varr=t[s];n.hasOwnProperty(r)&&(e[r]=n[r])}returne},e.selectiveDeepExtend=function(t,i,o){varn=arguments.length<=3||void0===arguments[3]?!1:arguments[3];if(Array.isArray(o))thrownewTypeError("Arrays are not supported by deepExtend");for(vars=2;s<arguments.length;s++)for(varr=arguments[s],a=0;a<t.length;a++){varh=t[a];if(r.hasOwnProperty(h))if(o[h]&&o[h].constructor===Object)void0===i[h]&&(i[h]={}),i[h].constructor===Object?e.deepExtend(i[h],o[h],!1,n):null===o[h]&&void0!==i[h]&&n===!0?deletei[h]:i[h]=o[h];else{if(Array.isArray(o[h]))thrownewTypeError("Arrays are not supported by deepExtend");null===o[h]&&void0!==i[h]&&n===!0?deletei[h]:i[h]=o[h]}}returni},e.selectiveNotDeepExtend=function(t,i,o){varn=arguments.length<=3||void0===arguments[3]?!1:arguments[3];if(Array.isArray(o))thrownewTypeError("Arrays are not supported by deepExtend");for(varsino)if(o.hasOwnProperty(s)&&-1==t.indexOf(s))if(o[s]&&o[s].constructor===Object)void0===i[s]&&(i[s]={}),i[s].constructor===Object?e.deepExtend(i[s],o[s]):null===o[s]&&void0!==i[s]&&n===!0?deletei[s]:i[s]=o[s];elseif(Array.isArray(o[s])){i[s]=[];for(varr=0;r<o[s].length;r++)i[s].push(o[s][r])}elsenull===o[s]&&void0!==i[s]&&n===!0?deletei[s]:i[s]=o[s];returni},e.deepExtend=function(t,i,o,n){for(varsini)if(i.hasOwnProperty(s)||o===!0)if(i[s]&&i[s].constructor===Object
null!=n&&s.push(n);elsen=this._remove(t),null!=n&&s.push(n);returns.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(n.isNumber(t)||n.isString(t)){if(this._data[t])returndeletethis._data[t],this.length--,t}elseif(tinstanceofObject){vare=t[this._fieldId];if(void0!==e&&this._data[e])returndeletethis._data[e],this.length--,e}returnnull},o.prototype.clear=function(t){vare=Object.keys(this._data);returnthis._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){vare,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){vara=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}returns},o.prototype.min=function(t){vare,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){vara=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}returns},o.prototype.distinct=function(t){vare,i,o,s=this._data,r=Object.keys(s),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){varl=r[e],u=s[l],c=u[t],p=!1;for(i=0;d>i;i++)if(a[i]==c){p=!0;break}p||void0===c||(a[d]=c,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=n.convert(a[e],h);returna},o.prototype._addItem=function(t){vare=t[this._fieldId];if(void0!=e){if(this._data[e])thrownewError("Cannot add item: item with id "+e+" already exists")}elsee=n.randomUUID(),t[this._fieldId]=e;vari,o,s={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){vara=r[i],h=this._type[a];s[a]=n.convert(t[a],h)}returnthis._data[e]=s,this.length++,e},o.prototype._getItem=function(t,e){vari,o,s,r,a=this._data[t];if(!a)returnnull;varh={},d=Object.keys(a);if(e)for(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=n.convert(o,e[i]);elsefor(s=0,r=d.length;r>s;s++)i=d[s],o=a[i],h[i]=o;returnh},o.prototype._updateItem=function(t){vare=t[this._fieldId];if(void0==e)thrownewError("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");vari=this._data[e];if(!i)thrownewError("Cannot update item: no item with id "+e+" found");for(varo=Object.keys(t),s=0,r=o.length;r>s;s++){vara=o[s],h=this._type[a];i[a]=n.convert(t[a],h)}returne},t.exports=o},function(t,e){functioni(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeoft.delay&&(this.delay=t.delay),t&&"undefined"!=typeoft.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){varo=newi(e);if(void0!==t.flush)thrownewError("Target object already has a property flush");t.flush=function(){o.flush()};varn=[{name:"flush",original:void0}];if(e&&e.replace)for(vars=0;s<e.replace.length;s++){varr=e.replace[s];n.push({name:r,original:t[r]}),o.replace(t,r)}returno._extended={object:t,methods:n},o},i.prototype.destroy=function(){if(this.flush(),this._extended){for(vart=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){varo=e[i];o.original?t[o.name]=o.original:deletet[o.name]}this._extended=null}},i.prototype.replace=function(t,e){vari=this,o=t[e];if(!o)thrownewError("Method "+e+" undefined");t[e]=function(){for(vart=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.queue({args:t,fn:o,context:this})}},i.prototype.queue=function(t){"function"==typeoft?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()},i.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeofthis.delay){vart=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){vart=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){functiono(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};vari=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}varn=i(1),s=i(8);o.prototype.setData=function(t){vare,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=
},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){functiono(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&void0==t.start)thrownewError('Property "start" missing in item '+t);n.call(this,t,e,i)}varn=i(33);i(1);o.prototype=newn(null,null,null),o.prototype.isVisible=function(t){vare=(t.end-t.start)/4;returnthis.data.start>t.start-e&&this.data.start<t.end+e},o.prototype.redraw=function(){vart=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("DIV"),t.content=document.createElement("DIV"),t.content.className="vis-item-content",t.box.appendChild(t.content),t.line=document.createElement("DIV"),t.line.className="vis-line",t.dot=document.createElement("DIV"),t.dot.className="vis-dot",t.box["timeline-item"]=this,this.dirty=!0),!this.parent)thrownewError("Cannot redraw item: no parent attached");if(!t.box.parentNode){vare=this.parent.dom.foreground;if(!e)thrownewError("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(!t.line.parentNode){vari=this.parent.dom.background;if(!i)thrownewError("Cannot redraw item: parent has no background container element");i.appendChild(t.line)}if(!t.dot.parentNode){varo=this.parent.dom.axis;if(!i)thrownewError("Cannot redraw item: parent has no axis container element");o.appendChild(t.dot)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);varn=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,s=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(n?" vis-editable":" vis-readonly");t.box.className="vis-item vis-box"+s,t.line.className="vis-item vis-line"+s,t.dot.className="vis-item vis-dot"+s,this.props.dot.height=t.dot.offsetHeight,this.props.dot.width=t.dot.offsetWidth,this.props.line.width=t.line.offsetWidth,this.width=t.box.offsetWidth,this.height=t.box.offsetHeight,this.dirty=!1}this._repaintDeleteButton(t.box)},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){vart=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}},o.prototype.repositionX=function(){vart=this.conversion.toScreen(this.data.start),e=this.options.align;"right"==e?this.left=t-this.width:"left"==e?this.left=t:this.left=t-this.width/2,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width/2+"px",this.dom.dot.style.left=t-this.props.dot.width/2+"px"},o.prototype.repositionY=function(){vart=this.options.orientation.item,e=this.dom.box,i=this.dom.line,o=this.dom.dot;if("top"==t)e.style.top=(this.top||0)+"px",i.style.top="0",i.style.height=this.parent.top+this.top+1+"px",i.style.bottom="";else{varn=this.parent.itemSet.props.height,s=n-this.parent.top-this.parent.height+this.top;e.style.top=(this.parent.height-this.top-this.height||0)+"px",i.style.top=n-s+"px",i.style.bottom="0"}o.style.top=-this.props.dot.height/2+"px"},o.prototype.getWidthLeft=function(){returnthis.width/2},o.prototype.getWidthRight=function(){returnthis.width/2},t.exports=o},function(t,e,i){functiono(t,e,i){if(this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0}},t&&void0==t.start)thrownewError('Property "start" missing in item '+t);n.call(this,t,e,i)}varn=i(33);o.prototype=newn(null,null,null),o.prototype.isVisible=function(t){vare=(t.end-t.start)/4;returnthis.data.start>t.start-e&&this.data.start<t.end+e},o.prototype.redraw=function(){vart=this.dom;if(t||(this.dom={},t=this.dom,t.point=document.createElement("div"),t.content=document.createElement("div"),t.content.className="vis-item-content",t.point.appendChild(t.content),t.dot=document.createElement("div"),t.point.appendChild(t.dot),t
o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=t,void0!==e&&(o.checked=e,e!==t&&("object"==typeoft?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));varn=this;o.onchange=function(){n._update(this.checked,i)};vars=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}},{key:"_makeTextInput",value:function(t,e,i){varo=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=e,e!==t&&this.changedOptions.push({path:i,value:e});varn=this;o.onchange=function(){n._update(this.value,i)};vars=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}},{key:"_makeColorField",value:function(t,e,i){varo=this,n=t[1],s=document.createElement("div");e=void0===e?n:e,"none"!==e?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=e):s.className="vis-configuration vis-config-colorBlock none",e=void0===e?n:e,s.onclick=function(){o._showColorPicker(e,s,i)};varr=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,s)}},{key:"_showColorPicker",value:function(t,e,i){varo=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(function(t){varn="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,o._update(n,i)}),this.colorPicker.setCloseCallback(function(){e.onclick=function(){o._showColorPicker(t,e,i)}})}},{key:"_handleObject",value:function(t){vare=arguments.length<=1||void0===arguments[1]?[]:arguments[1],i=arguments.length<=2||void0===arguments[2]?!1:arguments[2],o=!1,n=this.options.filter,s=!1;for(varrint)if(t.hasOwnProperty(r)){o=!0;vara=t[r],d=h.copyAndExtendArray(e,r);if("function"==typeofn&&(o=n(r,e),o===!1&&!(ainstanceofArray)&&"string"!=typeofa&&"boolean"!=typeofa&&ainstanceofObject&&(this.allowCreation=!1,o=this._handleObject(a,d,!0),this.allowCreation=i===!1)),o!==!1){s=!0;varl=this._getValue(d);if(ainstanceofArray)this._handleArray(a,l,d);elseif("string"==typeofa)this._makeTextInput(a,l,d);elseif("boolean"==typeofa)this._makeCheckbox(a,l,d);elseif(ainstanceofObject){varu=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==r&&(u=!1),u===!0)if(void0!==a.enabled){varc=h.copyAndExtendArray(d,"enabled"),p=this._getValue(c);if(p===!0){varf=this._makeLabel(r,d,!0);this._makeItem(d,f),s=this._handleObject(a,d)||s}elsethis._makeCheckbox(a,p,d)}else{varf=this._makeLabel(r,d,!0);this._makeItem(d,f),s=this._handleObject(a,d)||s}}elseconsole.error("dont know how to handle",a,r,d)}}returns}},{key:"_handleArray",value:function(t,e,i){"string"==typeoft[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeoft[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeoft[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){vari=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?{}:arguments[2],o=i;t="true"===t?!0:t,t="false"===t?!1:t;for(varn=0;n<e.length;n++)"global"!==e[n]&&(void0===o[e[n]]&&(o[e[n]]={}),n!==e.length-1?o=o[e[n]]:o[e[n]]=t);returni}},{key:"_printOptions",value:function(){vart=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+JSON.stringify(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(vart={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);returnt}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,i){functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varn=function(){functiont(t,e){for(vari
i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=n.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}varn=i(1),s=i(7),r=i(8),a=i(10),h=i(25),d=i(50),l=i(52),u=i(56),c=i(53),p=i(55),f=i(54),m="__ungrouped__";o.prototype=newh,o.prototype._create=function(){vart=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=newd(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=newd(this.body,this.options.dataAxis,this.svg,this.options.groups),deletethis.options.dataAxis.orientation,this.legendLeft=newu(this.body,this.options.legend,"left",this.options.groups),this.legendRight=newu(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){vare=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void0===t.graphHeight&&void0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void0!==this.body.domProps.centerContainer.height&&void0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),n.selectiveDeepExtend(e,this.options,t),n.mergeOptions(this.options,t,"interpolation"),n.mergeOptions(this.options,t,"drawPoints"),n.mergeOptions(this.options,t,"shaded"),n.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==typeoft.interpolation&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),this.groups.hasOwnProperty(m)&&this.groups[m].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},o.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},o.prototype.setItems=function(t){vare,i=this,o=this.itemsData;if(t){if(!(tinstanceofr||tinstanceofa))thrownewTypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}elsethis.itemsData=null;if(o&&(n.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){vars=this.id;n.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,s)}),e=this.itemsData.getIds(),this._onAdd(e)}},o.prototype.setGroups=function(t){vare,i=this;if(this.groupsData){n.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(varo=0;o<e.length;o++)this._removeGroup(e[o])}if(t){if(!(tinstanceofr||tinstanceofa))thrownewTypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}elsethis.groupsData=null;if(this.groupsData){vars=this.id;n.forEach(this.groupListeners,function(t,e){i.groupsData.o
background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},s.extend(this.options,this.defaultOptions)}returnn(t,[{key:"setOptions",value:function(t){vare=["useDefaultGroups"];if(void0!==t)for(variint)if(t.hasOwnProperty(i)&&-1===e.indexOf(i)){varo=t[i];this.add(i,o)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(t){vare=this.groups[t];if(void0===e)if(this.options.useDefaultGroups===!1&&this.groupsArray.length>0){vari=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{vari=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[i],this.groups[t]=e}returne}},{key:"add",value:function(t,e){returnthis.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r,t.exports=e["default"]},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});vars=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(61),a=o(r),h=i(62),d=o(h),l=i(1),u=i(8),c=i(10),p=function(){functiont(e,i,o,s){varr=this;n(this,t),this.body=e,this.images=i,this.groups=o,this.layoutEngine=s,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(t,e){r.add(e.items)},update:function(t,e){r.update(e.items,e.data)},remove:function(t,e){r.remove(e.items)}},this.options={},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"horizontal"},group:void0,hidden:!1,icon:{face:"FontAwesome",code:void0,size:50,color:"#2B7CE9"},image:void0,label:void0,labelHighlightBold:!0,level:void0,mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;varn=1/(e-t);returnMath.max(0,(o-t)*n)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,useImageSize:!1,useBorderWithImage:!1},size:25,title:void0,value:void0,x:void
if("value"ina)returna.value;varh=a.get;if(void0===h)return;returnh.call(r)}vard=Object.getPrototypeOf(n);if(null===d)return;t=d,e=s,i=r,o=!0,a=d=void0}},h=i(66),d=o(h),l=function(t){functione(t,i,o,s){n(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o),this.imageObj=s,this._swapToImageResizeWhenImageLoaded=!0}returns(e,t),r(e,[{key:"resize",value:function(){if(void0===this.imageObj.src||void0===this.imageObj.width||void0===this.imageObj.height){if(!this.width){vart=2*this.options.size;this.width=t,this.height=t,this._swapToImageResizeWhenImageLoaded=!0,this.radius=.5*this.width}}elsethis._swapToImageResizeWhenImageLoaded&&(this.width=void0,this.height=void0,this._swapToImageResizeWhenImageLoaded=!1),this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n){this.resize(),this.left=e-this.width/2,this.top=i-this.height/2;vars=Math.min(.5*this.height,.5*this.width);this._drawRawCircle(t,e,i,o,n,s),t.save(),t.clip(),this._drawImageAtPosition(t),t.restore(),this._drawImageLabel(t,e,i,o),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t,e){returnthis.resize(t),.5*this.width}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});varr=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),a=function(t,e,i){for(varo=!0;o;){varn=t,s=e,r=i;o=!1,null===n&&(n=Function.prototype);vara=Object.getOwnPropertyDescriptor(n,s);if(void0!==a){if("value"ina)returna.value;varh=a.get;if(void0===h)return;returnh.call(r)}vard=Object.getPrototypeOf(n);if(null===d)return;t=d,e=s,i=r,o=!0,a=d=void0}},h=i(64),d=o(h),l=function(t){functione(t,i,o){n(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o)}returns(e,t),r(e,[{key:"resize",value:function(t,e){if(void0===this.width){vari=5,o=this.labelModule.getTextSize(t,e),n=o.width+2*i;this.width=n,this.height=n,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,o,n){this.resize(t,o),this.left=e-this.width/2,this.top=i-this.height/2;vars=this.options.borderWidth,r=this.options.borderWidthSelected||2*this.options.borderWidth,a=(o?r:s)/this.body.view.scale;t.lineWidth=Math.min(this.width,a),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.database(e-this.width/2,i-.5*this.height,this.width,this.height),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),a>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.bo
for(tini)if(i.hasOwnProperty(t)){varo=i[t];o.from=null,o.to=null,o.connect()}}},{key:"getConnectedNodes",value:function(t){vare=[];if(void0!==this.body.edges[t]){vari=this.body.edges[t];i.fromId&&e.push(i.fromId),i.toId&&e.push(i.toId)}returne}}]),t}();e["default"]=p,t.exports=e["default"]},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});vars=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(62),a=o(r),h=i(82),d=o(h),l=i(86),u=o(l),c=i(87),p=o(c),f=i(88),m=o(f),v=i(1),g=function(){functiont(e,i,o){if(n(this,t),void0===i)throw"No body provided";this.options=v.bridgeObject(o),this.globalOptions=o,this.body=i,this.id=void0,this.fromId=void0,this.toId=void0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.colorDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void0,this.to=void0,this.edgeType=void0,this.connected=!1,this.labelModule=newa["default"](this.body,this.options),this.setOptions(e)}returns(t,[{key:"setOptions",value:function(e){if(e){this.colorDirty=!0,t.parseOptions(this.options,e,!0,this.globalOptions),void0!==e.id&&(this.id=e.id),void0!==e.from&&(this.fromId=e.from),void0!==e.to&&(this.toId=e.to),void0!==e.title&&(this.title=e.title),void0!==e.value&&(e.value=parseFloat(e.value)),this.updateLabelModule();vari=this.updateEdgeType();returnthis._setInteractionWidths(),this.connect(),(void0!==e.hidden||void0!==e.physics)&&(i=!0),i}}},{key:"updateLabelModule",value:function(){this.labelModule.setOptions(this.options,!0),void0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){vart=!1,e=!0,i=this.options.smooth;returnvoid0!==this.edgeType&&(this.edgeTypeinstanceofu["default"]&&i.enabled===!0&&"dynamic"===i.type&&(e=!1),this.edgeTypeinstanceofd["default"]&&i.enabled===!0&&"cubicBezier"===i.type&&(e=!1),this.edgeTypeinstanceofp["default"]&&i.enabled===!0&&"dynamic"!==i.type&&"cubicBezier"!==i.type&&(e=!1),this.edgeTypeinstanceofm["default"]&&i.enabled===!1&&(e=!1),e===!0&&(t=this.cleanup())),e===!0?this.options.smooth.enabled===!0?"dynamic"===this.options.smooth.type?(t=!0,this.edgeType=newu["default"](this.options,this.body,this.labelModule)):"cubicBezier"===this.options.smooth.type?this.edgeType=newd["default"](this.options,this.body,this.labelModule):this.edgeType=newp["default"](this.options,this.body,this.labelModule):this.edgeType=newm["default"](this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void0,this.to=this.body.nodes[this.toId]||void0,this.connected=void0!==this.from&&void0!==this.to,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void0),this.to&&(this.to.detachEdge(this),this.to=void0),this.connected=!1}},{key:"getTitle",value:function(){returnthis.title}},{key:"isSelected",value:function(){returnthis.selected}},{key:"getValue",value:function(){returnthis.options.value}},{key:"setValueRange",value:function(t,e,i){if(void0!==this.options.value){varo=this.options.scaling.customScalingFunction(t,e,i,this.options.value),n=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){vars=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+o*s}this.options.width=this.options.scaling.min+o*n}elsethis.options.width=this.baseWidth,this.options.font.size=this.baseFontSiz
e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.y<this.to.y&&(this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y+i*n,e=this.to.y<e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y<e?this.to.y:e)));return{x:t,y:e}}},{key:"_findBorderPosition",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?{}:arguments[2];returnthis._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){varr=arguments.length<=6||void0===arguments[6]?this._getViaCoordinates():arguments[6];returnthis._getDistanceToBezierEdge(t,e,i,o,n,s,r)}},{key:"getPoint",value:function(t){vare=arguments.length<=1||void0===arguments[1]?this._getViaCoordinates():arguments[1],i=t,o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functions(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});varr=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),a=function(t,e,i){for(varo=!0;o;){varn=t,s=e,r=i;o=!1,null===n&&(n=Function.prototype);vara=Object.getOwnPropertyDescriptor(n,s);if(void0!==a){if("value"ina)returna.value;varh=a.get;if(void0===h)return;returnh.call(r)}vard=Object.getPrototypeOf(n);if(null===d)return;t=d,e=s,i=r,o=!0,a=d=void0}},h=i(85),d=o(h),l=function(t){functione(t,i,o){n(this,e),a(Object.getPrototypeOf(e.prototype),"constructor",this).call(this,t,i,o)}returns(e,t),r(e,[{key:"_line",value:function(t){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t),t.stroke(),this.disableShadow(t)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){vari=this.to,o=this.from;t.id===this.from.id&&(i=this.from,o=this.to);varn=Math.atan2(i.y-o.y,i.x-o.x),s=i.x-o.x,r=i.y-o.y,a=Math.sqrt(s*s+r*r),h=t.distanceToBorder(e,n),d=(a-h)/a,l={};returnl.x=(1-d)*o.x+d*i.x,l.y=(1-d)*o.y+d*i.y,l}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){returnthis._getDistanceToLine(t,e,i,o,n,s)}}]),e}(d["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,i){functiono(t){returnt&&t.__esModule?t:{"default":t}}functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});vars=function(){functiont(t,e){for(vari=0;i<e.length;i++){varo=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,i,o){returni&&t(e.prototype,i),o&&t(e,o),e}}(),r=i(90),a=o(r),h=i(91),d=o(h),l=i(92),u=o(l),c=i(93),p=o(c),f=i(94),m=o(f),v=i(95),g=o(v),y=i(96),b=o(y),_=i(97),w=o(_),x=i(1),k=function(){functiont(e){n(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this
i[s]=this.body.nodes[s];for(vard=0;d<r.edges.length;d++){varl=r.edges[d];void0===this.clusteredEdges[l.id]&&(o[l.id]=l)}}}this._cluster(i,o,t,e)}},{key:"clusterByEdgeCount",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?!0:arguments[2];e=this._checkOptions(e);for(varo=[],n={},s=void0,r=void0,h=void0,d=void0,l=void0,u=0;u<this.body.nodeIndices.length;u++){varc={},p={};if(d=this.body.nodeIndices[u],void0===n[d]){l=0,h=this.body.nodes[d],r=[];for(varf=0;f<h.edges.length;f++)s=h.edges[f],void0===this.clusteredEdges[s.id]&&(s.toId!==s.fromId&&l++,r.push(s));if(l===t){for(varm=!0,f=0;f<r.length;f++){s=r[f];varv=this._getConnectedId(s,d);if(void0===e.joinCondition)p[s.id]=s,c[d]=this.body.nodes[d],c[v]=this.body.nodes[v],n[d]=!0;else{varg=a["default"].cloneOptions(this.body.nodes[d]);if(e.joinCondition(g)!==!0){m=!1;break}p[s.id]=s,c[d]=this.body.nodes[d],n[d]=!0}}Object.keys(c).length>0&&Object.keys(p).length>0&&m===!0&&o.push({nodes:c,edges:p})}}}for(varu=0;u<o.length;u++)this._cluster(o[u].nodes,o[u].edges,e,!1);i===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(t){vare=arguments.length<=1||void0===arguments[1]?!0:arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){vare=arguments.length<=1||void0===arguments[1]?!0:arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){vari=arguments.length<=2||void0===arguments[2]?!0:arguments[2];if(void0===t)thrownewError("No nodeId supplied to clusterByConnection!");if(void0===this.body.nodes[t])thrownewError("The nodeId given to clusterByConnection does not exist!");varo=this.body.nodes[t];e=this._checkOptions(e,o),void0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);varn={},s={},r=o.id,h=a["default"].cloneOptions(o);n[r]=o;for(vard=0;d<o.edges.length;d++){varl=o.edges[d];if(void0===this.clusteredEdges[l.id]){varu=this._getConnectedId(l,r);if(void0===this.clusteredNodes[u])if(u!==r)if(void0===e.joinCondition)s[l.id]=l,n[u]=this.body.nodes[u];else{varc=a["default"].cloneOptions(this.body.nodes[u]);e.joinCondition(h,c)===!0&&(s[l.id]=l,n[u]=this.body.nodes[u])}elses[l.id]=l}}this._cluster(n,s,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,o){for(varn=void0,s=void0,r=void0,h=void0,d=void0,u=void0,c=Object.keys(t),p=[],f=0;f<c.length;f++){s=c[f],r=t[s];for(varm=0;m<r.edges.length;m++)n=r.edges[m],void0===this.clusteredEdges[n.id]&&(n.toId==n.fromId?e[n.id]=n:n.toId==s?(h=i.id,d=n.fromId,u=d):(h=n.toId,d=i.id,u=h),void0===t[u]&&p.push({edge:n,fromId:d,toId:h}))}for(varm=0;m<p.length;m++){varv=p[m].edge,g=a["default"].cloneOptions(v,"edge");l.deepExtend(g,o),g.from=p[m].fromId,g.to=p[m].toId,g.id="clusterEdge:"+l.randomUUID();vary=this.body.functions.createEdge(g);y.clusteringEdgeReplacingId=v.id,this.body.edges[y.id]=y,y.connect(),this._backupEdgeOptions(v),v.setOptions({physics:!1,hidden:!0})}}},{key:"_checkOptions",value:function(){vart=arguments.length<=0||void0===arguments[0]?{}:arguments[0];returnvoid0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){varo=arguments.length<=3||void0===arguments[3]?!0:arguments[3];if(!(Object.keys(t).length<2)){for(varnint)if(t.hasOwnProperty(n)&&void0!==this.clusteredNodes[n])return;vars=l.deepExtend({},i.clusterNodeProperties);if(void0!==i.processProperties){varr=[];for(varnint)if(t.hasOwnProperty(n)){varh=a["default"].cloneOptions(t[n]);r.push(h)}varu=[];for(varcine)if(e.hasOwnProperty(c)&&"clusterEdge:"!==c.substr(0,12)){varh=a["default"].cloneOptions(e[c],"edge");u.push(h)}if(s=i.processProperties(s,r,u),!s)thrownewError("TheprocessPropertiesfunctiondoesnotreturnpropertie
if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(vare=0;e<t.length;e++){vari=t[e],o=1*t.length+10,n=2*Math.PI*this.seededRandom();void0===i.x&&(i.x=o*Math.cos(n)),void0===i.y&&(i.y=o*Math.sin(n))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(vart=0,e=0;e<this.body.nodeIndices.length;e++){vari=this.body.nodes[this.body.nodeIndices[e]];i.predefinedPosition===!0&&(t+=1)}if(t<.5*this.body.nodeIndices.length){varo=10,n=0,s=100;if(this.body.nodeIndices.length>s){for(varr=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;vara=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();varh=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)returnthis._declusterAll(),this.body.emitter.emit("_layoutFailed"),voidconsole.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(vard=70,e=0;e<this.body.nodeIndices.length;e++)this.body.nodes[this.body.nodeIndices[e]].x+=(.5-this.seededRandom())*d,this.body.nodes[this.body.nodeIndices[e]].y+=(.5-this.seededRandom())*d;this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(vart=h["default"].getRangeCore(this.body.nodes,this.body.nodeIndices),e=h["default"].findCenter(t),i=0;i<this.body.nodeIndices.length;i++)this.body.nodes[this.body.nodeIndices[i]].x-=e.x,this.body.nodes[this.body.nodeIndices[i]].y-=e.y}},{key:"_declusterAll",value:function(){for(vart=!0;t===!0;){t=!1;for(vare=0;e<this.body.nodeIndices.length;e++)this.body.nodes[this.body.nodeIndices[e]].isCluster===!0&&(t=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[e],{},!1));t===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){returnthis.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){vart=void0,e=void0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalParents={},this.hierarchicalChildren={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(einthis.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void0===t.options.x&&void0===t.options.y&&(o=!1),void0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)thrownewError("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(varsinthis.body.nodes)this.body.nodes.hasOwnProperty(s)&&void0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);varr=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){vart=this,e=!1,i={},o=function(){for(vare=a(),i=0;i<e.length-1;i++){varo=e[i].max-e[i+1].min;o!==t.options.hierarchical.treeSpacing&&n(i+1,o-t.options.hierarchical.treeSpacing)}},n=function(e,i){for(varoint.hierarchicalTrees)t.hierarchicalTrees.hasOwnProperty(o)&&t.hierarchicalTrees[o]===e&&t._setPositionForHierarchy(t.body.nodes[o],i,void0,!0)},r=function(e){vari=1e9,o=-1e9;for(varnint.hierarchicalTrees)if(t.hierarchicalTrees.hasOwnProperty(n)&&t.hierarchicalTrees[n]===e){vars=t._getPositionForHierarchy(t.body.nodes[n]);i=Math.min(s,i),o=Math.max(s,o)}retu
this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(t){this.body.emitter.emit("disablePhysics");vare=this.body.functions.getPointer(t.center),i=this.canvas.DOMtoCanvas(e);if(void0!==this.selectedControlNode)this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y;else{varo=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(t){vare=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=this.body.edges[this.edgeBeingEditedId];if(void0!==this.selectedControlNode){for(varn=this.selectionHandler._getAllNodesOverlappingWith(i),s=void0,r=n.length-1;r>=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void0!==s&&void0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{vara=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}elseo.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((newDate).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);vare=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{varo=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);varn=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(newDate).valueOf()}}},{key:"_dragControlNode",value:function(t){vare=this.body.functions.getPointer(t.center);if(void0!==this.temporaryIds.nodes[0]){vari=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{varo=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){vare=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void0;void0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(varn=this.selectionHandler._getAllNodesOverlappingWith(i),s=void0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void0!==this.body.nodes[o]&&void0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){vare=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeofthis.options.addNode){if(2!==this.options.addNode.length)thrownewError("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}elsethis.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){vari=this,o={from:t,to:e};if("function"==typeofthis.options.addEdge){if(2!==this.options.addEdge.length)thrownewError("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null
addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl}])});