!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},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=14)}([function(t,e,n){"use strict";n.d(e,"n",function(){return r}),n.d(e,"m",function(){return s}),n.d(e,"s",function(){return o}),n.d(e,"k",function(){return a}),n.d(e,"l",function(){return l}),n.d(e,"o",function(){return u}),n.d(e,"r",function(){return p}),n.d(e,"j",function(){return h}),n.d(e,"i",function(){return d}),n.d(e,"h",function(){return m}),n.d(e,"p",function(){return f}),n.d(e,"d",function(){return _}),n.d(e,"f",function(){return y}),n.d(e,"g",function(){return b}),n.d(e,"q",function(){return v}),n.d(e,"c",function(){return E}),n.d(e,"a",function(){return w}),n.d(e,"b",function(){return O}),n.d(e,"t",function(){return k}),n.d(e,"e",function(){return M});n(9),n(4),n(5),n(12);var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&!isNaN(parseInt(t))?parseInt(t):e}function s(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseFloat(t))?parseFloat(t):e}function o(t){return null==t||0===t.length}function a(t,e){return"string"==typeof t&&t.length>0?t:e}function l(t){return"boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&("1"===t||"true"===t)}function c(t,e,n){void 0===n&&(n=" "),"number"==typeof t&&(t=""+t),"number"==typeof n&&(n=""+n);var i=e-t.length;if(0===i)return t;if(i<0)return t.substr(Math.abs(i));if(i===n.length)return""+n+t;if(i0&&i_||h+s+y.width-v>p.width||s===g&&h<0&&i>f+g+c,M=r0&&rm||b+o+y.height-v>p.height||o===E&&b<0&&r>d+E+u;(e=x?0:k?g:h+s)<0&&(e=0),(n=M?0:A?E:b+o)<0&&(n=0),a=i,l=r,e===s&&n===o||(O(e,n),w(e,n),s=e,o=n)},M=function(){s=0,o=0,a=0,l=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",M),t.draggable=r,document.body.style.userSelect="auto"},A=function(e){if(2!==e.button){e.stopPropagation(),t.draggable=!1,t.setAttribute("ondragstart","return false;"),t.setAttribute("draggable","false");var n=x(t,i);s=n.left,o=n.top,a=e.pageX,l=e.pageY,c=e.offsetX,u=e.offsetY,p=i.getBoundingClientRect(),h=x(i),d=h.top,m=d+p.height,f=h.left,_=f+p.width,y=t.getBoundingClientRect(),b=window.getComputedStyle(t).borderWidth||"0",v=2*Number.parseInt(b),document.addEventListener("mousemove",k),document.addEventListener("mouseup",M),document.body.style.userSelect="none"}};return t.addEventListener("mousedown",A),function(){t.removeEventListener("mousedown",A),M()}}function O(t,e){var n=document.createElement("div");n.className="resize-draggable",t.appendChild(n);var i=t.parentElement,r=t.draggable,s=0,o=0,a=0,l=0,c=0,u=i.getBoundingClientRect(),p=x(i),h=p.top,d=h+u.height,m=p.left,f=m+u.width,_=x(t),y=_.top,b=_.left,v=window.getComputedStyle(t).borderWidth||"0",w=Number.parseInt(v),O=E(32,e),k=g(16,e),M=function(t){var e=s+(t.pageX-a),n=o+(t.pageY-l);e===s&&n===o||eb+(s-c)||(e<15?e=15:e+b-w/2>=f&&(e=f-b),n<15?n=15:n+y-w/2>=d&&(n=d-y),k(e,n),O(e,n),s=e,o=n,a=t.pageX,l=t.pageY)},A=function(){s=0,o=0,a=0,l=0,c=0,0,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",A),t.draggable=r,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",function(e){e.stopPropagation(),t.draggable=!1;var n=t.getBoundingClientRect(),r=n.width,v=n.height;s=r,o=v,a=e.pageX,l=e.pageY,c=e.offsetX,e.offsetY,u=i.getBoundingClientRect(),p=x(i),h=p.top,d=h+u.height,m=p.left,f=m+u.width,_=x(t),y=_.top,b=_.left,document.addEventListener("mousemove",M),document.addEventListener("mouseup",A),document.body.style.userSelect="none"}),function(){n.remove(),A()}}function k(t){return t}function M(t,e,n){return void 0===e&&(e=140),void 0===n&&(n="…"),t.trim().length>e?t.substr(0,e).trim()+n:t}},function(t,e,n){"use strict";n.d(e,"b",function(){return l});var i=n(0),r=n(2),s=n(3),o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var i=e.labelElementRef.getBoundingClientRect(),r=i.width,s=i.height;switch(e.props.labelPosition){case"up":case"down":n-=s;break;case"left":case"right":t-=r}}var o={width:e.props.width,height:e.props.height},a={width:t,height:n};e.sizeChanged(o,a)&&(e.resizeElement(t,n),e.resizedEventManager.emit({item:e,prevSize:o,newSize:a}),e.debouncedResizementSave(t,n))}))},t.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},t.prototype.init=function(){this.elementRef=this.createContainerDomElement(),this.labelElementRef=this.createLabelDomElement(),this.childElementRef=this.createDomElement(),this.elementRef.appendChild(this.childElementRef),this.elementRef.appendChild(this.labelElementRef),this.resizeElement(this.itemProps.width,this.itemProps.height),this.changeLabelPosition(this.itemProps.labelPosition)},t.prototype.createContainerDomElement=function(){var t,e=this;return this.props.isLinkEnabled?(t=document.createElement("a"),this.props.link?t.href=this.props.link:t.className="textDecorationNone"):(t=document.createElement("div")).className="textDecorationNone",t.classList.add("visual-console-item"),this.props.isOnTop&&t.classList.add("is-on-top"),t.style.left=this.props.x+"px",t.style.top=this.props.y+"px",t.addEventListener("dblclick",function(t){e.meta.isBeingMoved||e.meta.isBeingResized||(e.unSelectItem(),e.selectItem(),e.dblClickEventManager.emit({item:e,nativeEvent:t}))}),t.addEventListener("click",function(t){if(e.meta.editMode)t.preventDefault(),t.stopPropagation();else if(e.itemProps.isLinkEnabled&&null!=e.itemProps.link){var n=document.createElement("div");n.className="div-visual-console-spinner";var i=document.createElement("div");i.className="visual-console-spinner",n.appendChild(i);var r=document.getElementById("visual-console-container");null!=r&&(r.classList.add("is-updating"),r.appendChild(n))}e.meta.isBeingMoved||e.meta.isBeingResized||e.clickEventManager.emit({item:e,nativeEvent:t})}),this.meta.editMode&&t.classList.add("is-editing"),this.meta.isFetching&&t.classList.add("is-fetching"),this.meta.isUpdating&&t.classList.add("is-updating"),this.meta.isSelected&&t.classList.add("is-selected"),t},t.prototype.createLabelDomElement=function(){var t=document.createElement("div");t.className="visual-console-item-label";var e=this.getLabelWithMacrosReplaced();if(e.length>0){var n=document.createElement("table"),i=document.createElement("tr"),r=document.createElement("tr"),s=document.createElement("tr"),o=document.createElement("td");switch(o.innerHTML=e,i.appendChild(o),n.appendChild(r),n.appendChild(i),n.appendChild(s),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}t.appendChild(n)}return t},t.prototype.getLabelWithMacrosReplaced=function(){var t=this.props;return Object(i.q)([{macro:"_date_",value:Object(i.f)(new Date)},{macro:"_time_",value:Object(i.g)(new Date)},{macro:"_agent_",value:null!=t.agentAlias?t.agentAlias:""},{macro:"_agentdescription_",value:null!=t.agentDescription?t.agentDescription:""},{macro:"_address_",value:null!=t.agentAddress?t.agentAddress:""},{macro:"_module_",value:null!=t.moduleName?t.moduleName:""},{macro:"_moduledescription_",value:null!=t.moduleDescription?t.moduleDescription:""}],this.props.label||"")},t.prototype.updateDomElement=function(t){t.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(t.prototype,"props",{get:function(){return o({},this.itemProps)},set:function(t){this.setProps(t)},enumerable:!0,configurable:!0}),t.prototype.setProps=function(t){var e=this.props;this.itemProps=t,this.shouldBeUpdated(e,t)&&this.render(e,this._metadata)},Object.defineProperty(t.prototype,"meta",{get:function(){return o({},this._metadata)},set:function(t){this.setMeta(t)},enumerable:!0,configurable:!0}),t.prototype.setMeta=function(t){var e=this._metadata;this._metadata=o({},e,t),void 0!==t.isSelected&&e.isSelected!==t.isSelected&&this.selectionChangedEventManager.emit({selected:t.isSelected}),this.render(this.itemProps,e)},t.prototype.shouldBeUpdated=function(t,e){return t!==e},t.prototype.render=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.updateDomElement(this.childElementRef),t&&!this.positionChanged(t,this.props)||this.moveElement(this.props.x,this.props.y),t&&!this.sizeChanged(t,this.props)||this.resizeElement(this.props.width,this.props.height);var n=this.labelElementRef.innerHTML,i=this.createLabelDomElement().innerHTML;if(n!==i&&(this.labelElementRef.innerHTML=i),t&&t.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),t&&t.isOnTop===this.props.isOnTop||(this.props.isOnTop?this.elementRef.classList.add("is-on-top"):this.elementRef.classList.remove("is-on-top")),t&&t.isLinkEnabled!==this.props.isLinkEnabled){var r=this.createContainerDomElement();r.innerHTML=this.elementRef.innerHTML;for(var s=this.elementRef.attributes,o=0;o0?e.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height=null);break;case"left":case"right":this.props.height>0&&(n.style.width=null,n.style.height=this.props.height+"px")}},t.prototype.moveElement=function(t,e){this.elementRef.style.left=t+"px",this.elementRef.style.top=e+"px"},t.prototype.move=function(t,e){this.moveElement(t,e),this.itemProps=o({},this.props,{x:t,y:e})},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){if(13!=this.props.type&&21!=this.props.type&&(this.childElementRef.style.width=t>0?t+"px":null,this.childElementRef.style.height=e>0?e+"px":null),this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),i=n.length>0?n.item(0):null;if(i)switch(this.props.labelPosition){case"up":case"down":i.style.width=t>0?t+"px":null;break;case"left":case"right":i.style.height=e>0?e+"px":null}}},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=o({},this.props,{width:t,height:e})},t.prototype.onClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onDblClick=function(t){var e=this.dblClickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMovementFinished=function(t){var e=this.movementFinishedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResizeFinished=function(t){var e=this.resizeFinishedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onRemove=function(t){var e=this.removeEventManager.on(t);return this.disposables.push(e),e},t.prototype.onSelectionChanged=function(t){var e=this.selectionChangedEventManager.on(t);return this.disposables.push(e),e},t.prototype.selectItem=function(){this.meta=o({},this.meta,{isSelected:!0}),this.initMovementListener(this.elementRef),13!==this.props.type&&21!==this.props.type&&this.initResizementListener(this.elementRef)},t.prototype.unSelectItem=function(){this.meta=o({},this.meta,{isSelected:!1}),this.stopMovementListener(),13!==this.props.type&&this.stopResizementListener()},t.prototype.getFormContainer=function(){return t.getFormContainer(this.props)},t.getFormContainer=function(t){var e=t.type?function(t){var e="";switch(t){case 0:e=Object(i.t)("Static image");break;case 1:e=Object(i.t)("Module graph");break;case 2:e=Object(i.t)("Simple value");break;case 3:e=Object(i.t)("Percentile item");break;case 4:e=Object(i.t)("Label");break;case 5:e=Object(i.t)("Icon");break;case 6:case 7:case 8:e=Object(i.t)("Simple value");break;case 9:e=Object(i.t)("Percentile item");break;case 10:e=Object(i.t)("Service");break;case 11:e=Object(i.t)("Group");break;case 12:e=Object(i.t)("Box");break;case 13:e=Object(i.t)("Line");break;case 14:e=Object(i.t)("Event history graph");break;case 15:case 16:e=Object(i.t)("Percentile item");break;case 17:e=Object(i.t)("Serialized pie graph");break;case 18:e=Object(i.t)("Bars graph");break;case 19:e=Object(i.t)("Clock");break;case 20:e=Object(i.t)("Color cloud");break;case 21:e=Object(i.t)("Network link");break;default:e=Object(i.t)("Item")}return e}(t.type):Object(i.t)("Item");return new s.FormContainer(e,[],[])},t}();e.a=c},function(t,e,n){"use strict";var i=function(){return function(){var t=this;this.listeners=[],this.listenersOncer=[],this.on=function(e){return t.listeners.push(e),{dispose:function(){return t.off(e)}}},this.once=function(e){t.listenersOncer.push(e)},this.off=function(e){var n=t.listeners.indexOf(e);n>-1&&t.listeners.splice(n,1)},this.emit=function(e){t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.forEach(function(t){return t(e)}),t.listenersOncer=[]},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}}}();e.a=i},function(t,e,n){"use strict";n.r(e),n.d(e,"InputGroup",function(){return s}),n.d(e,"FormContainer",function(){return o});var i=n(2),r=function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&(this.inputGroupsByName=e.reduce(function(t,e){return e.onDataRequested(r.handleItemDataRequested),t[e.name]=e,t},this.inputGroupsByName)),n.length>0&&(this.enabledInputGroupNames=this.enabledInputGroupNames.concat(n.filter(function(t){return null!=r.inputGroupsByName[t]})))}return t.prototype.getInputGroup=function(t){return this.inputGroupsByName[t]||null},t.prototype.addInputGroup=function(t,e){return void 0===e&&(e=null),t.onDataRequested(this.handleItemDataRequested),this.inputGroupsByName[t.name]=t,this.enabledInputGroupNames=this.enabledInputGroupNames.filter(function(e){return e!==t.name}),null!==e?e<=0?this.enabledInputGroupNames=[t.name].concat(this.enabledInputGroupNames):e>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=this.enabledInputGroupNames.concat([t.name]):this.enabledInputGroupNames=this.enabledInputGroupNames.slice(0,e).concat([t.name],this.enabledInputGroupNames.slice(e)):this.enabledInputGroupNames=this.enabledInputGroupNames.concat([t.name]),this},t.prototype.removeInputGroup=function(t){return delete this.inputGroupsByName[t],this.enabledInputGroupNames=this.enabledInputGroupNames.filter(function(e){return e!==t}),this},t.prototype.getFormElement=function(t){var e=this;void 0===t&&(t="update");var n=document.createElement("form");n.id="visual-console-item-edition",n.className="visual-console-item-edition",n.addEventListener("submit",function(t){t.preventDefault(),e.submitEventManager.emit({nativeEvent:t,data:e.enabledInputGroupNames.reduce(function(t,n){return e.inputGroupsByName[n]&&(t=r({},t,e.inputGroupsByName[n].data)),t},{})})});var i=document.createElement("div");return i.className="input-groups",this.enabledInputGroupNames.forEach(function(t){e.inputGroupsByName[t]&&i.appendChild(e.inputGroupsByName[t].element)}),n.appendChild(i),n},t.prototype.reset=function(){var t=this;this.enabledInputGroupNames.forEach(function(e){t.inputGroupsByName[e]&&t.inputGroupsByName[e].reset()})},t.prototype.onSubmit=function(t){return this.submitEventManager.on(t)},t.prototype.onInputGroupDataRequested=function(t){return this.itemDataRequestedEventManager.on(t)},t}()},function(t,e,n){"use strict";n(11);var i="http://www.w3.org/2000/svg";e.a=function(t,e,n){var r=void 0===n?{}:n,s=r.size,o=r.color,a=r.spin,l=r.pulse,c=document.createElement("figure");c.title=e,c.className="fa fa-"+t.iconName,s&&c.classList.add("fa-"+s),a?c.classList.add("fa-spin"):l&&c.classList.add("fa-pulse");var u=document.createElementNS(i,"svg");u.setAttribute("viewBox","0 0 "+t.icon[0]+" "+t.icon[1]),o&&u.setAttribute("fill",o);var p=document.createElementNS(i,"path"),h="string"==typeof t.icon[4]?t.icon[4]:t.icon[4][0];return p.setAttribute("d",h),u.appendChild(p),c.appendChild(u),c}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return o});var i={prefix:"fas",iconName:"list-alt",icon:[512,512,[],"f022","M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"]},r={prefix:"fas",iconName:"pencil-alt",icon:[512,512,[],"f303","M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"]},s={prefix:"fas",iconName:"plus-circle",icon:[512,512,[],"f055","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"]},o={prefix:"fas",iconName:"trash-alt",icon:[448,512,[],"f2ed","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return eventsHistoryPropsDecoder});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var y=_.item(0);if(null!=y){y.setAttribute("width",""+(r+o)),y.setAttribute("height",""+(s+o));var b=y.getElementsByTagNameNS(T,"line");if(b.length>0){var v=b.item(0);null!=v&&(v.setAttribute("x1",""+h),v.setAttribute("y1",""+d),v.setAttribute("x2",""+m),v.setAttribute("y2",""+f),v.setAttribute("stroke",p||"black"),v.setAttribute("stroke-width",""+o))}}}if(this.moveMode){var g=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var x=t.getElementsByClassName("visual-console-item-line-circle-start");if(x.length>0)(k=x.item(0))&&(g=k);var w=t.getElementsByClassName("visual-console-item-line-circle-end");if(w.length>0)(k=w.item(0))&&(E=k)}if(g.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),g.style.width=2*this.circleRadius+"px",g.style.height=2*this.circleRadius+"px",g.style.borderRadius="50%",g.style.backgroundColor=""+p,g.style.position="absolute",g.style.left=h-this.circleRadius+"px",g.style.top=d-this.circleRadius+"px",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width=2*this.circleRadius+"px",E.style.height=2*this.circleRadius+"px",E.style.borderRadius="50%",E.style.backgroundColor=""+p,E.style.position="absolute",E.style.left=m-this.circleRadius+"px",E.style.top=f-this.circleRadius+"px",null!==t.parentElement){for(var O=t.parentElement.getElementsByClassName("visual-console-item-line-circle");O.length>0;){(k=O.item(0))&&k.remove()}t.parentElement.appendChild(g),t.parentElement.appendChild(E)}this.initStartPositionMovementListener(g,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==t.parentElement)for(O=t.parentElement.getElementsByClassName("visual-console-item-line-circle");O.length>0;){var k;(k=O.item(0))&&k.remove()}},e.extractBoxSizeAndPosition=function(t,e){return{width:Math.abs(t.x-e.x),height:Math.abs(t.y-e.y),x:Math.min(t.x,e.x),y:Math.min(t.y,e.y)}},e.prototype.move=function(e,n){t.prototype.moveElement.call(this,e,n);var i=this.props.startPosition.x-this.props.endPosition.x<=0,r=this.props.startPosition.y-this.props.endPosition.y<=0,s={x:i?e:this.props.width+e,y:r?n:this.props.height+n},o={x:i?this.props.width+e:e,y:r?this.props.height+n:n};this.props=A({},this.props,{startPosition:s,endPosition:o})},e.prototype.remove=function(){this.stopStartPositionMovementListener(),t.prototype.remove.call(this)},e.prototype.onLineMovementFinished=function(t){var e=this.lineMovedEventManager.on(t);return this.lineMovedEventDisposables.push(e),e},e}(s.a),P=C,S=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),I=function(){return(I=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){if(null!=(i=v.item(0))){for(var g=i.getElementsByTagNameNS("http://www.w3.org/2000/svg","line"),E=i.getElementsByTagNameNS("http://www.w3.org/2000/svg","g");E.length>0;)E[0].remove();g.length>0&&(n=g.item(0))}if(null!=i&&null!=n){var x=u.x-s+a/2+l/2,w=u.y-o+a/2+c/2,O=p.x-s+a/2+l/2,k=p.y-o+a/2+c/2,M=u.x-s+a/2+l/2,A=u.y-o+a/2+c/2,j=p.x-s+a/2+l/2,T=p.y-o+a/2+c/2,C=180*Math.atan2(k-w,O-x)/Math.PI;if(y<=0){g=m.split("
");y=0,g.forEach(function(t){t.length>y&&(y=10*t.length)}),b<=0&&(b=25*g.length)}if(f<=0){g=d.split("
");f=0,g.forEach(function(t){t.length>f&&(f=10*t.length)}),_<=0&&(_=25*g.length)}if(Mj&&(M-=25+y,j+=25),AT&&(A-=25+b,T+=25),void 0===h&&(h="#000"),null!==e.parentElement){for(var P=e.parentElement.getElementsByClassName("vc-item-nl-label");P.length>0;){var S=P.item(0);S&&S.remove()}for(var I=e.parentElement.getElementsByClassName("vc-item-nl-arrow");I.length>0;){var L=I.item(0);L&&L.remove()}}var R=2*a,N=x+(O-x)/2-R,D=w+(k-w)/2-R,z=document.createElement("div");z.classList.add("vc-item-nl-arrow"),z.style.position="absolute",z.style.border=R+"px solid transparent",z.style.borderBottom=R+"px solid "+h,z.style.left=N+"px",z.style.top=D+"px",z.style.transform="rotate("+(90+C)+"deg)";var B=document.createElement("div");if(B.classList.add("vc-item-nl-arrow"),B.style.position="absolute",B.style.border=R+"px solid transparent",B.style.borderBottom=R+"px solid "+h,B.style.left=N+"px",B.style.top=D+"px",B.style.transform="rotate("+(270+C)+"deg)",null!==e.parentElement&&(e.parentElement.appendChild(z),e.parentElement.appendChild(B)),""!=m){var H=document.createElement("div");try{H.innerHTML=m,H.style.position="absolute",H.style.left=M+"px",H.style.top=A+"px",H.style.width=y+"px",H.style.border="2px solid "+h,H.classList.add("vc-item-nl-label","label-start")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(H)}if(""!=d){var G=document.createElement("div");try{G.innerHTML=d,G.style.position="absolute",G.style.left=j+"px",G.style.top=T+"px",G.style.width=f+"px",G.style.border="2px solid "+h,G.classList.add("vc-item-nl-label","label-end")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(G)}}}},e}(P),N=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),D=function(){return(D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var y=document.createElementNS(t,"text");y.setAttribute("text-anchor","middle"),y.setAttribute("font-size","8"),y.setAttribute("transform","translate(30 50) rotate(90)"),y.setAttribute("fill",i),y.textContent=_,m.append(y)}var b=document.createElementNS(t,"g");b.setAttribute("class","marks");var v=document.createElementNS(t,"g");v.setAttribute("class","mark"),v.setAttribute("transform","translate(50 50)");var g=document.createElementNS(t,"line");g.setAttribute("x1","36"),g.setAttribute("y1","0"),g.setAttribute("x2","46"),g.setAttribute("y2","0"),g.setAttribute("stroke",i),g.setAttribute("stroke-width","5");var E=document.createElementNS(t,"line");E.setAttribute("x1","36"),E.setAttribute("y1","0"),E.setAttribute("x2","46"),E.setAttribute("y2","0"),E.setAttribute("stroke",e),E.setAttribute("stroke-width","1"),v.append(g,E),b.append(v);for(var x=1;x<60;x++){var w=document.createElementNS(t,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",i),w.setAttribute("transform","translate(50 50) rotate("+6*x+")"),x%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",x%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),b.append(w)}var O=document.createElementNS(t,"g");O.setAttribute("class","hour-hand"),O.setAttribute("transform","translate(50 50)");var k=document.createElementNS(t,"line");k.setAttribute("class","hour-hand-a"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","30"),k.setAttribute("y2","0"),k.setAttribute("stroke",o),k.setAttribute("stroke-width","4"),k.setAttribute("stroke-linecap","round");var M=document.createElementNS(t,"line");M.setAttribute("class","hour-hand-b"),M.setAttribute("x1","0"),M.setAttribute("y1","0"),M.setAttribute("x2","29.9"),M.setAttribute("y2","0"),M.setAttribute("stroke",s),M.setAttribute("stroke-width","3.1"),M.setAttribute("stroke-linecap","round"),O.append(k,M);var A=document.createElementNS(t,"g");A.setAttribute("class","minute-hand"),A.setAttribute("transform","translate(50 50)");var j=document.createElementNS(t,"line");j.setAttribute("class","minute-hand-a"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","40"),j.setAttribute("y2","0"),j.setAttribute("stroke",o),j.setAttribute("stroke-width","2"),j.setAttribute("stroke-linecap","round");var T=document.createElementNS(t,"line");T.setAttribute("class","minute-hand-b"),T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","39.9"),T.setAttribute("y2","0"),T.setAttribute("stroke",s),T.setAttribute("stroke-width","1.5"),T.setAttribute("stroke-linecap","round");var C=document.createElementNS(t,"circle");C.setAttribute("r","3"),C.setAttribute("fill",s),A.append(j,T,C);var P=document.createElementNS(t,"g");P.setAttribute("class","second-hand"),P.setAttribute("transform","translate(50 50)");var S=document.createElementNS(t,"line");S.setAttribute("x1","0"),S.setAttribute("y1","0"),S.setAttribute("x2","46"),S.setAttribute("y2","0"),S.setAttribute("stroke",a),S.setAttribute("stroke-width","1"),S.setAttribute("stroke-linecap","round");var I=document.createElementNS(t,"circle");I.setAttribute("r","2"),I.setAttribute("fill",a),P.append(S,I);var L=document.createElementNS(t,"circle");L.setAttribute("cx","50"),L.setAttribute("cy","50"),L.setAttribute("r","0.3"),L.setAttribute("fill",s);var R=this.getOriginDate(),N=R.getSeconds(),D=R.getMinutes(),z=6*N,B=6*D+N/60*6,H=30*R.getHours()+D/60*30;if(O.setAttribute("transform","translate(50 50) rotate("+H+")"),A.setAttribute("transform","translate(50 50) rotate("+B+")"),P.setAttribute("transform","translate(50 50) rotate("+z+")"),d.append(m,b,O,A,P,L),d.setAttribute("transform","rotate(-90)"),h.innerHTML="\n \n ",h.append(d),"datetime"===this.props.clockFormat){var G=document.createElement("span");G.className="date",G.textContent=Object(r.f)(R,"default"),G.style.fontSize=p+"px",this.props.color&&(G.style.color=this.props.color),h.append(G)}return h},e.prototype.createDigitalClock=function(){var t=document.createElement("div");t.className="digital-clock";var e=this.getElementSize().width,n=6/this.props.clockTimezone.length,i=20*e/100,s=10*e/100,o=Math.min(20*n*e/100,e/100*10),a=this.getOriginDate();if("datetime"===this.props.clockFormat){var l=document.createElement("span");l.className="date",l.textContent=Object(r.f)(a,"default"),l.style.fontSize=s+"px",this.props.color&&(l.style.color=this.props.color),t.append(l)}var c=document.createElement("span");c.className="time",c.textContent=Object(r.g)(a),c.style.fontSize=i+"px",this.props.color&&(c.style.color=this.props.color),t.append(c);var u=this.getHumanTimezone();if(u.length>0){var p=document.createElement("span");p.className="timezone",p.textContent=u,p.style.fontSize=o+"px",this.props.color&&(p.style.color=this.props.color),t.append(p)}return t},e.prototype.getOriginDate=function(t){void 0===t&&(t=null);var e=t||new Date,n=1e3*this.props.clockTimezoneOffset,i=60*e.getTimezoneOffset()*1e3,r=e.getTime()+n+i;return new Date(r)},e.prototype.getHumanTimezone=function(t){void 0===t&&(t=this.props.clockTimezone);var e=t.split("/")[1];return(void 0===e?"":e).replace("_"," ")},e.prototype.getElementSize=function(t,e){switch(void 0===t&&(t=this.props.width),void 0===e&&(e=this.props.height),this.props.clockType){case"analogic":var n=100;t>0&&e>0?n=Math.min(t,e):t>0?n=t:e>0&&(n=e);var i=0;return"datetime"===this.props.clockFormat&&(i=e/8),{width:n,height:n+i};case"digital":return t>0&&e>0?e=t/20?e=t/2:e>0?t=2*e:(t=100,e=50),{width:t,height:e};default:throw new Error("invalid clock type.")}},e.TICK_INTERVAL=1e3,e}(s.a),q=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),K=function(){return(K=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth=n+"px",this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}return t},e.prototype.updateDomElement=function(t){if(this.props.fillTransparent?t.style.backgroundColor="transparent":this.props.fillColor&&(t.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth=n+"px",this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}},e}(s.a),J=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Z=function(){return(Z=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&(n=Object(r.q)([{macro:/\(?_VALUE_\)?/i,value:n}],i)),t.innerHTML=n}return t},e.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},e}(s.a),ot=n(6),at=Math.PI,lt=2*at,ct=lt-1e-6;function ut(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new ut}ut.prototype=pt.prototype={constructor:ut,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,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var s=this._x1,o=this._y1,a=n-t,l=i-e,c=s-t,u=o-e,p=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>1e-6)if(Math.abs(u*a-l*c)>1e-6&&r){var h=n-s,d=i-o,m=a*a+l*l,f=h*h+d*d,_=Math.sqrt(m),y=Math.sqrt(p),b=r*Math.tan((at-Math.acos((m+p-f)/(2*_*y)))/2),v=b/y,g=b/_;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*c)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*d)+","+(this._x1=t+g*a)+","+(this._y1=e+g*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,r,s){t=+t,e=+e;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+o,c=e+a,u=1^s,p=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(p<0&&(p=p%lt+lt),p>ct?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=at)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var ht=pt,dt=function(t){return function(){return t}},mt=Math.abs,ft=Math.atan2,_t=Math.cos,yt=Math.max,bt=Math.min,vt=Math.sin,gt=Math.sqrt,Et=1e-12,xt=Math.PI,wt=xt/2,Ot=2*xt;function kt(t){return t>=1?wt:t<=-1?-wt:Math.asin(t)}function Mt(t){return t.innerRadius}function At(t){return t.outerRadius}function jt(t){return t.startAngle}function Tt(t){return t.endAngle}function Ct(t){return t&&t.padAngle}function Pt(t,e,n,i,r,s,o){var a=t-n,l=e-i,c=(o?s:-s)/gt(a*a+l*l),u=c*l,p=-c*a,h=t+u,d=e+p,m=n+u,f=i+p,_=(h+m)/2,y=(d+f)/2,b=m-h,v=f-d,g=b*b+v*v,E=r-s,x=h*f-m*d,w=(v<0?-1:1)*gt(yt(0,E*E*g-x*x)),O=(x*v-b*w)/g,k=(-x*b-v*w)/g,M=(x*v+b*w)/g,A=(-x*b+v*w)/g,j=O-_,T=k-y,C=M-_,P=A-y;return j*j+T*T>C*C+P*P&&(O=M,k=A),{cx:O,cy:k,x01:-u,y01:-p,x11:O*(r/E-1),y11:k*(r/E-1)}}var St=function(){var t=Mt,e=At,n=dt(0),i=null,r=jt,s=Tt,o=Ct,a=null;function l(){var l,c,u,p=+t.apply(this,arguments),h=+e.apply(this,arguments),d=r.apply(this,arguments)-wt,m=s.apply(this,arguments)-wt,f=mt(m-d),_=m>d;if(a||(a=l=ht()),hEt)if(f>Ot-Et)a.moveTo(h*_t(d),h*vt(d)),a.arc(0,0,h,d,m,!_),p>Et&&(a.moveTo(p*_t(m),p*vt(m)),a.arc(0,0,p,m,d,_));else{var y,b,v=d,g=m,E=d,x=m,w=f,O=f,k=o.apply(this,arguments)/2,M=k>Et&&(i?+i.apply(this,arguments):gt(p*p+h*h)),A=bt(mt(h-p)/2,+n.apply(this,arguments)),j=A,T=A;if(M>Et){var C=kt(M/p*vt(k)),P=kt(M/h*vt(k));(w-=2*C)>Et?(E+=C*=_?1:-1,x-=C):(w=0,E=x=(d+m)/2),(O-=2*P)>Et?(v+=P*=_?1:-1,g-=P):(O=0,v=g=(d+m)/2)}var S=h*_t(v),I=h*vt(v),L=p*_t(x),R=p*vt(x);if(A>Et){var N,D=h*_t(g),z=h*vt(g),B=p*_t(E),H=p*vt(E);if(f1?0:u<-1?xt:Math.acos(u))/2),q=gt(N[0]*N[0]+N[1]*N[1]);j=bt(A,(p-q)/(V-1)),T=bt(A,(h-q)/(V+1))}}O>Et?T>Et?(y=Pt(B,H,S,I,h,T,_),b=Pt(D,z,L,R,h,T,_),a.moveTo(y.cx+y.x01,y.cy+y.y01),TEt&&w>Et?j>Et?(y=Pt(L,R,D,z,p,-j,_),b=Pt(S,I,B,H,p,-j,_),a.lineTo(y.cx+y.x01,y.cy+y.y01),j0)for(var i,r=t[0],s=e[0],o=t[n]-r,a=e[n]-s,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*o),this._beta*e[l]+(1-this._beta)*(s+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new Ht(t):new Ft(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Ut(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 Vt(t,e){this._context=t,this._k=(1-e)/6}Vt.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:Ut(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:Ut(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}};(function t(e){function n(t){return new Vt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function qt(t,e){this._context=t,this._k=(1-e)/6}qt.prototype={areaStart:zt,areaEnd:zt,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:Ut(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}};(function t(e){function n(t){return new qt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Kt(t,e){this._context=t,this._k=(1-e)/6}Kt.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:Ut(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}};(function t(e){function n(t){return new Kt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Yt(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>Et){var a=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);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Et){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}function Xt(t,e){this._context=t,this._alpha=e}Xt.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Yt(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}};(function t(e){function n(t){return e?new Xt(t,e):new Vt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Jt(t,e){this._context=t,this._alpha=e}Jt.prototype={areaStart:zt,areaEnd:zt,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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Yt(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}};(function t(e){function n(t){return e?new Jt(t,e):new qt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Zt(t,e){this._context=t,this._alpha=e}Zt.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,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Yt(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}};(function t(e){function n(t){return e?new Zt(t,e):new Kt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Qt(t){this._context=t}Qt.prototype={areaStart:zt,areaEnd:zt,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))}};function $t(t){return t<0?-1:1}function te(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return($t(s)+$t(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function ee(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ne(t,e,n){var i=t._x0,r=t._y0,s=t._x1,o=t._y1,a=(s-i)/3;t._context.bezierCurveTo(i+a,r+a*e,s-a,o-a*n,s,o)}function ie(t){this._context=t}function re(t){this._context=new se(t)}function se(t){this._context=t}function oe(t){this._context=t}function ae(t){var e,n,i=t.length-1,r=new Array(i),s=new Array(i),o=new Array(i);for(r[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/s[e];for(s[i-1]=(t[i]+r[i-1])/2,e=0;e=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}};var ce=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ue=function(){return(ue=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0){var h=document.createElementNS(me,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent=""+t,h.style.fontSize="8pt";var d=document.createElementNS(me,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent=""+this.props.unit,d.style.fontSize="8pt",p.append(h,d),p.setAttribute("transform","translate(50 33)")}else p.textContent=""+t,p.style.fontSize="8pt",p.setAttribute("transform","translate(50 50)");else p.textContent=n+"%",p.setAttribute("transform","translate(50 50)");r.append(p)}return!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||r.setAttribute("opacity","0.2"),null!==r&&i.append(r),i},e.prototype.updateDomElement=function(t){!1===this.meta.isBeingResized&&this.resizeElement(this.props.width,this.props.height),t.innerHTML=this.createDomElement().innerHTML},e.prototype.resizeElement=function(e,n){"progress-bar"===this.props.percentileType?t.prototype.resizeElement.call(this,e,35):t.prototype.resizeElement.call(this,e,e)},e.prototype.resize=function(e){this.resizeElement(e,e);var n=this.props.maxValue||0;"progress-bar"===this.props.percentileType&&(n=35),t.prototype.setProps.call(this,ue({},this.props,{width:e,height:n}))},e.prototype.getProgress=function(){var t=this.props.minValue||0,e=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=t?0:n>=e?100:Math.trunc((n-t)/(e-t)*100)},e}(s.a),_e=n(7),ye=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),be=function(){return(be=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0?t.selected=!0:t.selected=!1,i.selectionChangedEventManager.emit(t)},this.handleContainerClick=function(){i.unSelectItems()},this.containerRef=t,this._props=function(t){var e=t.id,n=t.name,i=t.groupId,s=t.backgroundURL,o=t.backgroundColor,a=t.isFavorite,l=t.relationLineWidth;if(null==e||isNaN(parseInt(e)))throw new TypeError("invalid Id.");if("string"!=typeof n||0===n.length)throw new TypeError("invalid name.");if(null==i||isNaN(parseInt(i)))throw new TypeError("invalid group Id.");return Te({id:parseInt(e),name:n,groupId:parseInt(i),backgroundURL:Object(r.k)(s,null),backgroundColor:Object(r.k)(o,null),isFavorite:Object(r.l)(a),relationLineWidth:Object(r.n)(l,0)},Object(r.r)(t))}(e),this.render(),(n=n.sort(function(t,e){return null==t.id||null==e.id?0:t.id>e.id?1:-1})).forEach(function(t){return i.addElement(t,i)}),this.buildRelations(),this.elements.forEach(function(t){t instanceof P&&i.refreshLink(t)}),this.containerRef.addEventListener("click",this.handleContainerClick)}return t.prototype.coordinatesInItem=function(t,e,n){return 13!=n.type&&21!=n.type&&(t>n.x&&tn.y&&e0?(null==this.lineLinks[n]&&(this.lineLinks[n]={}),this.lineLinks[n][e]={start:n,end:i}):this.lines[e].start>0&&(this.lineLinks[this.lines[e].start][e].start=0,this.lines[e].start=0),i>0?(null==this.lineLinks[i]&&(this.lineLinks[i]={}),this.lineLinks[i][e]={start:n,end:i}):this.lines[e].end>0&&(this.lineLinks[this.lines[e].end][e].end=0,this.lines[e].end=0),this.lines[e]={start:n,end:i},this.lineLinks)this.lineLinks[r][e]&&0==this.lineLinks[r][e].start&&0==this.lineLinks[r][e].end&&(delete this.lineLinks[r][e],0===Object.keys(this.lineLinks[r]).length&&delete this.lineLinks[r])}catch(t){console.error(t)}},t.prototype.updateLinesConnected=function(t,e,n){var i=this;null!=this.lineLinks[t.id]&&(Object.keys(this.lineLinks[t.id]).forEach(function(s){var o=parseInt(s),a=i.elementsById[o];if(a.props){var l=a.props.startPosition.x,c=a.props.startPosition.y,u=a.props.endPosition.x,p=a.props.endPosition.y;if(t.id==i.lineLinks[t.id][o].start&&(l=e.x+t.width/2,c=e.y+t.height/2),t.id==i.lineLinks[t.id][o].end&&(u=e.x+t.width/2,p=e.y+t.height/2),i.updateElement(Te({},a.props,{startX:l,startY:c,endX:u,endY:p})),n)Object(r.c)(500,function(t){i.lineMovedEventManager.emit({item:t.line,startPosition:{x:t.startX,y:t.startY},endPosition:{x:t.endX,y:t.endY}})})({line:a,startX:l,startY:c,endX:u,endY:p})}}),this.buildRelations(t.id,e.x+t.width/2,e.y+t.height/2))},Object.defineProperty(t.prototype,"elements",{get:function(){var t=this;return this.elementIds.map(function(e){return t.elementsById[e]}).filter(function(t){return null!=t})},enumerable:!0,configurable:!0}),t.prototype.addElement=function(t,e){void 0===e&&(e=this);try{var n=function(t){var e=Object(r.n)(t.type,null);if(null==e)throw new TypeError("missing item type.");var n=Object(r.h)(t);switch(e){case 0:return new u(c(t),n);case 1:return new we.a(Object(we.b)(t),n);case 2:case 6:case 7:case 8:return new st(rt(t),n);case 3:case 9:case 15:case 16:return new fe(de(t),n);case 4:return new $(Q(t),n);case 5:return new m(d(t),n);case 10:return new je(Me(t),n);case 11:return new B(z(t),n);case 12:return new X(Y(t),n);case 13:return new P(j(t),n);case 14:return new ot.a(Object(ot.b)(t),n);case 17:return new _e.a(Object(_e.b)(t),n);case 18:return new xe(Ee(t),n);case 19:return new V(U(t),n);case 20:return new O(g(t),n);case 21:return new R(L(t),n);default:throw new TypeError("item not found")}}(t);return e.elementsById[n.props.id]=n,e.elementIds.push(n.props.id),n.onRemove(e.handleElementRemove),n.onSelectionChanged(e.handleElementSelectionChanged),n.onClick(e.handleElementClick),n.onDblClick(e.handleElementDblClick),n instanceof P?(n.onLineMovementFinished(e.handleLineElementMovementFinished),this.refreshLink(n)):(n.onMoved(e.handleElementMovement),n.onMovementFinished(e.handleElementMovementFinished),n.onResized(e.handleElementResizement),n.onResizeFinished(e.handleElementResizementFinished)),e.containerRef.append(n.elementRef),n}catch(t){console.error("Error creating a new element:",t.message)}},t.prototype.updateElements=function(t){var e=this,n=t.map(function(t){return t.id||null}).filter(function(t){return null!=t});this.elementIds.filter(function(t){return n.indexOf(t)<0}).forEach(function(t){null!=e.elementsById[t]&&(e.elementsById[t].remove(),delete e.elementsById[t])}),this.elementIds=n,t.forEach(function(t){if(t.id)if(null==e.elementsById[t.id])e.addElement(t);else try{e.elementsById[t.id].props=Ce(t)}catch(t){console.error("Error updating an element:",t.message)}}),this.buildRelations()},t.prototype.updateElement=function(t){try{this.elementsById[t.id].props=Te({},Ce(t))}catch(t){console.error("Error updating element:",t.message)}this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return Te({},this._props)},set:function(t){var e=this.props;this._props=t,this.render(e)},enumerable:!0,configurable:!0}),t.prototype.render=function(t){void 0===t&&(t=null),t?(t.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),null!=this.props.backgroundColor&&t.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(t,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.resizeElement(this.props.width,this.props.height))},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){this.containerRef.style.width=t+"px",this.containerRef.style.height=e+"px"},t.prototype.resize=function(t,e){this.props=Te({},this.props,{width:t,height:e})},t.prototype.remove=function(){this.disposables.forEach(function(t){return t.dispose()}),this.elements.forEach(function(t){return t.remove()}),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.removeEventListener("click",this.handleContainerClick),this.containerRef.innerHTML=""},t.prototype.buildRelations=function(t,e,n){var i=this;this.clearRelations(),this.elements.forEach(function(r){if(null!==r.props.parentId){var s=i.elementsById[r.props.parentId],o=i.elementsById[r.props.id];s&&o&&(null!=t?r.props.parentId==t?i.addRelationLine(s,o,e,n):r.props.id==t?i.addRelationLine(s,o,void 0,void 0,e,n):i.addRelationLine(s,o):i.addRelationLine(s,o))}})},t.prototype.clearRelations=function(t){if(null!=t)for(var e in this.relations){var n=e.split("|"),i=Number.parseInt(n[0]),r=Number.parseInt(n[1]);t!==i&&t!==r||(this.relations[e].remove(),delete this.relations[e])}else for(var e in this.relations)this.relations[e].remove(),delete this.relations[e]},t.prototype.getRelationLine=function(t,e){var n=t+"|"+e;return this.relations[n]||null},t.prototype.getItemRelations=function(t){var e=[];for(var n in this.relations){var i=n.split("|"),r=Number.parseInt(i[0]),s=Number.parseInt(i[1]);t!==r&&t!==s||e.push({parentId:r,childId:s,line:this.relations[n]})}return e},t.prototype.getVisualCenter=function(t,e){var n=t.x+e.elementRef.clientWidth/2,i=t.y+e.elementRef.clientHeight/2;if(void 0!==e.props.label||""!==e.props.label||null!==e.props.label)switch(e.props.labelPosition){case"up":i=t.y+(e.elementRef.clientHeight+e.labelElementRef.clientHeight)/2;break;case"down":i=t.y+(e.elementRef.clientHeight-e.labelElementRef.clientHeight)/2;break;case"right":n=t.x+(e.elementRef.clientWidth-e.labelElementRef.clientWidth)/2;break;case"left":n=t.x+(e.elementRef.clientWidth+e.labelElementRef.clientWidth)/2}return{x:n,y:i}},t.prototype.addRelationLine=function(t,e,n,i,s,o){var a=t.props.id+"|"+e.props.id;null!=this.relations[a]&&this.relations[a].remove();var l=this.getVisualCenter(t.props,t),c=l.x,u=l.y,p=this.getVisualCenter(e.props,e),h=p.x,d=p.y;null!=n&&(c=n),null!=i&&(u=i),null!=s&&(h=s),null!=o&&(d=o);var m=new P(j({id:0,type:13,startX:c,startY:u,endX:h,endY:d,width:0,height:0,lineWidth:this.props.relationLineWidth,color:Object(r.k)(e.props.colorStatus,"#CCC")}),Object(r.h)({receivedAt:new Date}));return this.relations[a]=m,m.elementRef.style.zIndex="0",this.containerRef.append(m.elementRef),m},t.prototype.onItemClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemDblClick=function(t){var e=this.dblClickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onLineMoved=function(t){var e=this.lineMovedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemSelectionChanged=function(t){var e=this.selectionChangedEventManager.on(t);return this.disposables.push(e),e},t.prototype.enableEditMode=function(){this.elements.forEach(function(t){t.meta=Te({},t.meta,{editMode:!0})}),this.containerRef.classList.add("is-editing")},t.prototype.disableEditMode=function(){this.elements.forEach(function(t){t.meta=Te({},t.meta,{editMode:!1})}),this.containerRef.classList.remove("is-editing")},t.prototype.selectItem=function(t,e){var n=this;void 0===e&&(e=!1),e?this.elementIds.forEach(function(e){var i=n.elementsById[e].meta;e!==t&&i.isSelected?n.elementsById[e].unSelectItem():e!==t||i.isSelected||n.elementsById[e].selectItem()}):this.elementsById[t]&&this.elementsById[t].selectItem()},t.prototype.unSelectItem=function(t){this.elementsById[t]&&(this.elementsById[t].meta.isSelected&&this.elementsById[t].unSelectItem())},t.prototype.unSelectItems=function(){var t=this;this.elementIds.forEach(function(e){t.elementsById[e]&&t.elementsById[e].unSelectItem()})},t.itemDescriptiveName=function(t){var e;switch(t.props.type){case 0:e=Object(r.t)("Static graph")+" - "+t.props.imageSrc;break;case 1:e=Object(r.t)("Module graph");break;case 19:e=Object(r.t)("Clock");break;case 18:e=Object(r.t)("Bars graph");break;case 14:e=Object(r.t)("Event history graph");break;case 3:e=Object(r.t)("Percentile bar");break;case 15:e=Object(r.t)("Circular progress bar");break;case 16:e=Object(r.t)("Circular progress bar (interior)");break;case 2:e=Object(r.t)("Simple Value");break;case 4:e=Object(r.t)("Label");break;case 11:e=Object(r.t)("Group");break;case 20:e=Object(r.t)("Color cloud");break;case 5:e=Object(r.t)("Icon")+" - "+t.props.imageSrc;break;default:e=Object(r.t)("Item")}var n=t.props;return null!=n.agentAlias&&null!=n.moduleName?e+=" ("+Object(r.e)(n.agentAlias,18)+" - "+Object(r.e)(n.moduleName,25)+")":null!=n.agentAlias&&(e+=" ("+Object(r.e)(n.agentAlias,25)+")"),e},t.items=((Ae={})[0]=u,Ae[1]=we.a,Ae[2]=st,Ae[6]=st,Ae[7]=st,Ae[8]=st,Ae[3]=fe,Ae[9]=fe,Ae[15]=fe,Ae[16]=fe,Ae[4]=$,Ae[5]=m,Ae[10]=je,Ae[11]=B,Ae[12]=X,Ae[13]=P,Ae[14]=ot.a,Ae[17]=_e.a,Ae[18]=xe,Ae[19]=V,Ae[20]=O,Ae[21]=R,Ae),t}(),Se=function(){function t(t){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new k.a,this.disposables=[],this.taskInitiator=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(t){this._status=t,this.statusChangeEventManager.emit(t)},enumerable:!0,configurable:!0}),t.prototype.init=function(){var t=this;this.cancellable=this.taskInitiator(function(){t.status="finished"}),this.status="started"},t.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},t.prototype.onStatusChange=function(t){var e=this.statusChangeEventManager.on(t);return this.disposables.push(e),e},t}();var Ie=function(){function t(){this.tasks={}}return t.prototype.add=function(t,e,n){void 0===n&&(n=0),this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel();var i=n>0?function(t,e){return new Se(function(){var n=null;return t.onStatusChange(function(i){"finished"===i&&(n=window.setTimeout(function(){t.init()},e))}),t.init(),{cancel:function(){n&&clearTimeout(n),t.cancel()}}})}(new Se(e),n):new Se(e);return this.tasks[t]=i,this.tasks[t]},t.prototype.init=function(t){!this.tasks[t]||"waiting"!==this.tasks[t].status&&"cancelled"!==this.tasks[t].status&&"finished"!==this.tasks[t].status||this.tasks[t].init()},t.prototype.cancel=function(t){this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel()},t}();window.VisualConsole=Pe,window.VisualConsole.Form=f,window.AsyncTaskManager=Ie}]); //# sourceMappingURL=vc.main.min.js.map