(function(){"use strict";var __webpack_modules__={630:function(t,e,n){n.r(e),n.d(e,{FormContainer:function(){return a},InputGroup:function(){return s}});var r=n(510),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&(this.inputGroupsByName=e.reduce((function(t,e){return e.onDataRequested(i.handleItemDataRequested),t[e.name]=e,t}),this.inputGroupsByName)),n.length>0&&(this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),n.filter((function(t){return null!=i.inputGroupsByName[t]})),!0))}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=o([t.name],this.enabledInputGroupNames,!0):e>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[t.name],!1):this.enabledInputGroupNames=o(o(o([],this.enabledInputGroupNames.slice(0,e),!0),[t.name],!1),this.enabledInputGroupNames.slice(e),!0):this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[t.name],!1),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=i(i({},t),e.inputGroupsByName[n].data)),t}),{})})}));var r=document.createElement("div");return r.className="input-groups",this.enabledInputGroupNames.forEach((function(t){e.inputGroupsByName[t]&&r.appendChild(e.inputGroupsByName[t].element)})),n.appendChild(r),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}()},478:function(t,e,n){n.d(e,{TB:function(){return l}});var r=n(541),i=n(510),o=n(630),s=function(){return s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var r=e.labelElementRef.getBoundingClientRect(),i=r.width,o=r.height;switch(e.props.labelPosition){case"up":case"down":n-=o;break;case"left":case"right":t-=i}}var s={width:e.props.width,height:e.props.height},a={width:t,height:n};e.sizeChanged(s,a)&&(e.resizeElement(t,n),e.resizedEventManager.emit({item:e,prevSize:s,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="".concat(this.props.x,"px"),t.style.top="".concat(this.props.y,"px"),this.props.alertOutline&&t.classList.add("is-alert-triggered"),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 r=document.createElement("div");r.className="visual-console-spinner",n.appendChild(r);for(var i=t.composedPath(),o="visual-console-container",s=0;s0){var n=document.createElement("table"),r=document.createElement("tr"),i=document.createElement("tr"),o=document.createElement("tr"),s=document.createElement("td");switch(s.innerHTML=e,r.appendChild(s),n.appendChild(i),n.appendChild(r),n.appendChild(o),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}t.appendChild(n)}return t},t.prototype.getLabelWithMacrosReplaced=function(){var t=this.props;return(0,r.No)([{macro:"_date_",value:(0,r.rN)(new Date)},{macro:"_time_",value:(0,r.bc)(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 s({},this.itemProps)},set:function(t){this.setProps(t)},enumerable:!1,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 s({},this._metadata)},set:function(t){this.setMeta(t)},enumerable:!1,configurable:!0}),t.prototype.setMeta=function(t){var e=this._metadata;this._metadata=s(s({},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),!t||13!=t.type&&21!=t.type||this.updateDomElement(this.childElementRef),t&&!this.positionChanged(t,this.props)||(this.moveElement(this.props.x,this.props.y),t&&13!=t.type&&21!=t.type&&this.updateDomElement(this.childElementRef)),t&&!this.sizeChanged(t,this.props)||(this.resizeElement(this.props.width,this.props.height),t&&13!=t.type&&21!=t.type&&this.updateDomElement(this.childElementRef));var n=this.labelElementRef.innerHTML,r=this.createLabelDomElement().innerHTML;if(n!==r&&(this.labelElementRef.innerHTML=r),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 i=this.createContainerDomElement();i.innerHTML=this.elementRef.innerHTML;for(var o=this.elementRef.attributes,s=0;s0?e.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}},t.prototype.moveElement=function(t,e){this.elementRef.style.left="".concat(t,"px"),this.elementRef.style.top="".concat(e,"px")},t.prototype.move=function(t,e){this.moveElement(t,e),this.itemProps=s(s({},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?"".concat(t,"px"):"",this.childElementRef.style.height=e>0?"".concat(e,"px"):""),this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),r=n.length>0?n.item(0):null;if(r)switch(this.props.labelPosition){case"up":case"down":r.style.width=t>0?"".concat(t,"px"):"";break;case"left":case"right":r.style.height=e>0?"".concat(e,"px"):""}}},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=s(s({},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=s(s({},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=s(s({},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=(0,r.t)("Static image");break;case 1:e=(0,r.t)("Module graph");break;case 2:case 6:case 7:case 8:e=(0,r.t)("Simple value");break;case 3:case 9:case 15:case 16:e=(0,r.t)("Percentile item");break;case 4:e=(0,r.t)("Label");break;case 5:e=(0,r.t)("Icon");break;case 10:e=(0,r.t)("Service");break;case 11:e=(0,r.t)("Group");break;case 12:e=(0,r.t)("Box");break;case 13:e=(0,r.t)("Line");break;case 14:e=(0,r.t)("Event history graph");break;case 17:e=(0,r.t)("Serialized pie graph");break;case 18:e=(0,r.t)("Bars graph");break;case 19:e=(0,r.t)("Clock");break;case 20:e=(0,r.t)("Color cloud");break;case 21:e=(0,r.t)("Network link");break;case 22:e=(0,r.t)("Odometer");break;case 23:e=(0,r.t)("Basic chart");break;default:e=(0,r.t)("Item")}return e}(t.type):(0,r.t)("Item");return new o.FormContainer(e,[],[])},t}();e.ZP=c},709:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{K:function(){return barsGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function 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,r=arguments.length;n=i;)s++,t/=i;return t=i?Math.round(2*t)/2:Math.round(2*t),isNaN(t)&&(t=0),t+" "+["","K","M","G","T","P","E","Z","Y"][s]+n},BasicChart.prototype.pad=function(t,e,n){var r=t+"";return e<=r.length?r:this.pad(r+n,e,n)},BasicChart}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=BasicChart},369:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{p:function(){return donutGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function 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,r=arguments.length;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)}))}}},541:function(t,e,n){n.d(e,{Dw:function(){return M},Aq:function(){return C},Ds:function(){return E},NV:function(){return _},fk:function(){return x},rN:function(){return y},bc:function(){return v},SM:function(){return m},bs:function(){return h},MH:function(){return d},JW:function(){return a},gx:function(){return l},xn:function(){return o},I1:function(){return i},oF:function(){return p},OR:function(){return f},No:function(){return g},HY:function(){return u},VJ:function(){return s},t:function(){return k}});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&!isNaN(parseInt(t))?parseInt(t):e}function o(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseFloat(t))?parseFloat(t):e}function s(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="".concat(t)),"number"==typeof n&&(n="".concat(n));var r=e-t.length;if(0===r)return t;if(r<0)return t.substr(Math.abs(r));if(r===n.length)return"".concat(n).concat(t);if(r0&&r_||d+o+y.width-g>u.width||o===b&&d<0&&r>f+b+c,x=i0&&im||v+s+y.height-g>u.height||s===E&&v<0&&i>h+E+p;(e=w?0:k?b:d+o)<0&&(e=0),(n=x?0:P?E:v+s)<0&&(n=0),a=r,l=i,e===o&&n===s||(C(e,n),M(e,n),o=e,s=n)},x=function(){o=0,s=0,a=0,l=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",x),t.draggable=i,document.body.style.userSelect="auto"},P=function(e){if(2!==e.button){e.stopPropagation(),t.draggable=!1,t.setAttribute("ondragstart","return false;"),t.setAttribute("draggable","false");var n=w(t,r);o=n.left,s=n.top,a=e.pageX,l=e.pageY,c=e.offsetX,p=e.offsetY,u=r.getBoundingClientRect(),d=w(r),h=d.top,m=h+u.height,f=d.left,_=f+u.width,y=t.getBoundingClientRect(),v=window.getComputedStyle(t).borderWidth||"0",g=2*Number.parseInt(v),document.addEventListener("mousemove",k),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}};return t.addEventListener("mousedown",P),function(){t.removeEventListener("mousedown",P),x()}}function C(t,e){var n=document.createElement("div");n.className="resize-draggable",t.appendChild(n);var r=t.parentElement,i=t.draggable,o=0,s=0,a=0,l=0,c=0,p=r.getBoundingClientRect(),u=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(t),y=_.top,v=_.left,g=window.getComputedStyle(t).borderWidth||"0",M=Number.parseInt(g),C=E(32,e),k=b(16,e),x=function(t){var e=o+(t.pageX-a),n=s+(t.pageY-l);e===o&&n===s||ev+(o-c)||(e<15?e=15:e+v-M/2>=f&&(e=f-v),n<15?n=15:n+y-M/2>=h&&(n=h-y),k(e,n),C(e,n),o=e,s=n,a=t.pageX,l=t.pageY)},P=function(){o=0,s=0,a=0,l=0,c=0,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P),t.draggable=i,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",(function(e){e.stopPropagation(),t.draggable=!1;var n=t.getBoundingClientRect(),i=n.width,g=n.height;o=i,s=g,a=e.pageX,l=e.pageY,c=e.offsetX,e.offsetY,p=r.getBoundingClientRect(),u=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(t),y=_.top,v=_.left,document.addEventListener("mousemove",x),document.addEventListener("mouseup",P),document.body.style.userSelect="none"})),function(){n.remove(),P()}}function k(t){return t}function x(t,e,n){return void 0===e&&(e=140),void 0===n&&(n="…"),t.trim().length>e?t.substr(0,e).trim()+n:t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(t,e){for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};!function(){var t,e=__webpack_require__(541),n=__webpack_require__(478),r=(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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var y=_.item(0);if(null!=y){y.setAttribute("width","".concat(i+s)),y.setAttribute("height","".concat(o+s));var v=y.getElementsByTagNameNS(A,"line");if(v.length>0){var g=v.item(0);null!=g&&(g.setAttribute("x1","".concat(d)),g.setAttribute("y1","".concat(h)),g.setAttribute("x2","".concat(m)),g.setAttribute("y2","".concat(f)),g.setAttribute("stroke",u||"black"),g.setAttribute("stroke-width","".concat(s)))}}}if(this.moveMode){var b=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var w=t.getElementsByClassName("visual-console-item-line-circle-start");w.length>0&&(k=w.item(0))&&(b=k);var M=t.getElementsByClassName("visual-console-item-line-circle-end");M.length>0&&(k=M.item(0))&&(E=k)}if(b.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),b.style.width="".concat(2*this.circleRadius,"px"),b.style.height="".concat(2*this.circleRadius,"px"),b.style.borderRadius="50%",b.style.backgroundColor="".concat(u),b.style.position="absolute",b.style.left="".concat(d-this.circleRadius,"px"),b.style.top="".concat(h-this.circleRadius,"px"),b.style.cursor="move",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width="".concat(2*this.circleRadius,"px"),E.style.height="".concat(2*this.circleRadius,"px"),E.style.borderRadius="50%",E.style.backgroundColor="".concat(u),E.style.position="absolute",E.style.left="".concat(m-this.circleRadius,"px"),E.style.top="".concat(f-this.circleRadius,"px"),E.style.cursor="move",null!==t.parentElement){for(var C=t.parentElement.getElementsByClassName("visual-console-item-line-circle");C.length>0;)(k=C.item(0))&&k.remove();t.parentElement.appendChild(b),t.parentElement.appendChild(E)}this.initStartPositionMovementListener(b,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==t.parentElement)for(C=t.parentElement.getElementsByClassName("visual-console-item-line-circle");C.length>0;){var k;(k=C.item(0))&&k.remove()}},n.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)}},n.prototype.move=function(e,n){t.prototype.moveElement.call(this,e,n);var r=this.props.startPosition.x-this.props.endPosition.x<=0,i=this.props.startPosition.y-this.props.endPosition.y<=0,o={x:r?e:this.props.width+e,y:i?n:this.props.height+n},s={x:r?this.props.width+e:e,y:i?this.props.height+n:n};this.props=T(T({},this.props),{startPosition:o,endPosition:s})},n.prototype.remove=function(){this.stopStartPositionMovementListener(),t.prototype.remove.call(this)},n.prototype.onLineMovementFinished=function(t){var e=this.lineMovedEventManager.on(t);return this.lineMovedEventDisposables.push(e),e},n}(n.ZP),S=L,D=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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(){return R=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){if(null!=(r=g.item(0))){for(var b=r.getElementsByTagNameNS(N,"line"),E=r.getElementsByTagNameNS(N,"g");E.length>0;)E[0].remove();b.length>0&&(n=b.item(0))}if(null!=r&&null!=n){var w=25,M=p.x-o+a/2+l/2,C=p.y-s+a/2+c/2,k=u.x-o+a/2+l/2,x=u.y-s+a/2+c/2,P=p.x-o+a/2+l/2,I=p.y-s+a/2+c/2,T=u.x-o+a/2+l/2,O=u.y-s+a/2+c/2,A=180*Math.atan2(x-C,k-M)/Math.PI;if(y<=0&&(b=m.split("
"),y=0,b.forEach((function(t){t.length>y&&(y=10*t.length)})),v<=0&&(v=25*b.length)),f<=0&&(b=h.split("
"),f=0,b.forEach((function(t){t.length>f&&(f=10*t.length)})),_<=0&&(_=25*b.length)),PT&&(P-=w+y,T+=w),IO&&(I-=w+v,O+=w),void 0===d&&(d="#000"),null!==e.parentElement){for(var L=e.parentElement.getElementsByClassName("vc-item-nl-label");L.length>0;){var S=L.item(0);S&&S.remove()}for(var D=e.parentElement.getElementsByClassName("vc-item-nl-arrow");D.length>0;){var R=D.item(0);R&&R.remove()}}var B=2*a,z=M+(k-M)/2-B,W=C+(x-C)/2-B,j=document.createElement("div");j.classList.add("vc-item-nl-arrow"),j.style.position="absolute",j.style.border="".concat(B,"px solid transparent"),j.style.borderBottom="".concat(B,"px solid ").concat(d),j.style.left="".concat(z,"px"),j.style.top="".concat(W,"px"),j.style.transform="rotate(".concat(90+A,"deg)");var H=document.createElement("div");if(H.classList.add("vc-item-nl-arrow"),H.style.position="absolute",H.style.border="".concat(B,"px solid transparent"),H.style.borderBottom="".concat(B,"px solid ").concat(d),H.style.left="".concat(z,"px"),H.style.top="".concat(W,"px"),H.style.transform="rotate(".concat(270+A,"deg)"),null!==e.parentElement&&(e.parentElement.appendChild(j),e.parentElement.appendChild(H)),""!=m){var V=document.createElement("div");try{V.innerHTML=m,V.style.position="absolute",V.style.left="".concat(P,"px"),V.style.top="".concat(I,"px"),V.style.width="".concat(y,"px"),V.style.border="2px solid ".concat(d),V.classList.add("vc-item-nl-label","label-start")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(V)}if(""!=h){var G=document.createElement("div");try{G.innerHTML=h,G.style.position="absolute",G.style.left="".concat(T,"px"),G.style.top="".concat(O,"px"),G.style.width="".concat(f,"px"),G.style.border="2px solid ".concat(d),G.classList.add("vc-item-nl-label","label-end")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(G)}}}},n}(S),W=z,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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(){return H=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var _=document.createElementNS(t,"text");_.setAttribute("text-anchor","middle"),_.setAttribute("font-size","8"),_.setAttribute("transform","translate(30 50) rotate(90)"),_.setAttribute("fill",r),_.textContent=f,h.append(_)}var y=document.createElementNS(t,"g");y.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",r),g.setAttribute("stroke-width","5");var b=document.createElementNS(t,"line");b.setAttribute("x1","36"),b.setAttribute("y1","0"),b.setAttribute("x2","46"),b.setAttribute("y2","0"),b.setAttribute("stroke",n),b.setAttribute("stroke-width","1"),v.append(g,b),y.append(v);for(var E=1;E<60;E++){var w=document.createElementNS(t,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",r),w.setAttribute("transform","translate(50 50) rotate(".concat(6*E,")")),E%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",E%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),y.append(w)}var M=document.createElementNS(t,"g");M.setAttribute("class","hour-hand"),M.setAttribute("transform","translate(50 50)");var C=document.createElementNS(t,"line");C.setAttribute("class","hour-hand-a"),C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2","30"),C.setAttribute("y2","0"),C.setAttribute("stroke",o),C.setAttribute("stroke-width","4"),C.setAttribute("stroke-linecap","round");var k=document.createElementNS(t,"line");k.setAttribute("class","hour-hand-b"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","29.9"),k.setAttribute("y2","0"),k.setAttribute("stroke",i),k.setAttribute("stroke-width","3.1"),k.setAttribute("stroke-linecap","round"),M.append(C,k);var x=document.createElementNS(t,"g");x.setAttribute("class","minute-hand"),x.setAttribute("transform","translate(50 50)");var P=document.createElementNS(t,"line");P.setAttribute("class","minute-hand-a"),P.setAttribute("x1","0"),P.setAttribute("y1","0"),P.setAttribute("x2","40"),P.setAttribute("y2","0"),P.setAttribute("stroke",o),P.setAttribute("stroke-width","2"),P.setAttribute("stroke-linecap","round");var I=document.createElementNS(t,"line");I.setAttribute("class","minute-hand-b"),I.setAttribute("x1","0"),I.setAttribute("y1","0"),I.setAttribute("x2","39.9"),I.setAttribute("y2","0"),I.setAttribute("stroke",i),I.setAttribute("stroke-width","1.5"),I.setAttribute("stroke-linecap","round");var T=document.createElementNS(t,"circle");T.setAttribute("r","3"),T.setAttribute("fill",i),x.append(P,I,T);var O=document.createElementNS(t,"g");O.setAttribute("class","second-hand"),O.setAttribute("transform","translate(50 50)");var A=document.createElementNS(t,"line");A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","46"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","1"),A.setAttribute("stroke-linecap","round");var L=document.createElementNS(t,"circle");L.setAttribute("r","2"),L.setAttribute("fill",s),O.append(A,L);var S=document.createElementNS(t,"circle");S.setAttribute("cx","50"),S.setAttribute("cy","50"),S.setAttribute("r","0.3"),S.setAttribute("fill",i);var D=this.getOriginDate(),R=D.getSeconds(),N=D.getMinutes(),B=6*R,z=6*N+R/60*6,W=30*D.getHours()+N/60*30;if(M.setAttribute("transform","translate(50 50) rotate(".concat(W,")")),x.setAttribute("transform","translate(50 50) rotate(".concat(z,")")),O.setAttribute("transform","translate(50 50) rotate(".concat(B,")")),d.append(h,y,M,x,O,S),d.setAttribute("transform","rotate(-90)"),u.innerHTML="\n \n "),u.append(d),"datetime"===this.props.clockFormat){var j=document.createElement("span");j.className="date",j.textContent=(0,e.rN)(D,"default"),j.style.fontSize="".concat(p,"px"),this.props.color&&(j.style.color=this.props.color),u.append(j)}return u},n.prototype.createDigitalClock=function(){var t=document.createElement("div");t.className="digital-clock";var n=this.getElementSize(),r=n.width,i=n.height,o=r;i0){var m=document.createElement("span");m.className="timezone",m.textContent=h,m.style.fontSize="".concat(c,"px"),this.props.color&&(m.style.color=this.props.color),t.append(m)}return t},n.prototype.getOriginDate=function(t){void 0===t&&(t=null);var e=t||new Date,n=1e3*this.props.clockTimezoneOffset,r=60*e.getTimezoneOffset()*1e3,i=e.getTime()+n+r;return new Date(i)},n.prototype.getHumanTimezone=function(t){void 0===t&&(t=this.props.clockTimezone);var e=t.split("/")[1];return(void 0===e?"":e).replace("_"," ")},n.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 r=0;return"datetime"===this.props.clockFormat&&(r=e/8),{width:n,height:n+r};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.")}},n.TICK_INTERVAL=1e3,n}(n.ZP),X=Y,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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(){return $=Object.assign||function(t){for(var e,n=1,r=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="".concat(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="".concat(n,"px"),this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}},e}(n.ZP),nt=et,rt=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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(){return it=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&(r=(0,e.No)([{macro:/\(?_VALUE_\)?/i,value:r}],i)),t.innerHTML=r}return t},n.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},n}(n.ZP),ht=dt,mt=__webpack_require__(280),ft=Math.PI,_t=2*ft,yt=1e-6,vt=_t-yt;function gt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function bt(){return new gt}gt.prototype=bt.prototype={constructor:gt,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-t,l=r-e,c=o-t,p=s-e,u=c*c+p*p;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>yt)if(Math.abs(p*a-l*c)>yt&&i){var d=n-o,h=r-s,m=a*a+l*l,f=d*d+h*h,_=Math.sqrt(m),y=Math.sqrt(u),v=i*Math.tan((ft-Math.acos((m+u-f)/(2*_*y)))/2),g=v/y,b=v/_;Math.abs(g-1)>yt&&(this._+="L"+(t+g*c)+","+(e+g*p)),this._+="A"+i+","+i+",0,0,"+ +(p*d>c*h)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=t+s,c=e+a,p=1^o,u=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>yt||Math.abs(this._y1-c)>yt)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%_t+_t),u>vt?this._+="A"+n+","+n+",0,1,"+p+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+p+","+(this._x1=l)+","+(this._y1=c):u>yt&&(this._+="A"+n+","+n+",0,"+ +(u>=ft)+","+p+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Et=bt;function wt(t){return function(){return t}}var Mt=Math.abs,Ct=Math.atan2,kt=Math.cos,xt=Math.max,Pt=Math.min,It=Math.sin,Tt=Math.sqrt,Ot=1e-12,At=Math.PI,Lt=At/2,St=2*At;function Dt(t){return t>1?0:t<-1?At:Math.acos(t)}function Rt(t){return t>=1?Lt:t<=-1?-Lt:Math.asin(t)}function Nt(t){return t.innerRadius}function Bt(t){return t.outerRadius}function zt(t){return t.startAngle}function Wt(t){return t.endAngle}function jt(t){return t&&t.padAngle}function Ht(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,p=s-i,u=a-o,d=u*l-p*c;if(!(d*dO*O+A*A&&(C=x,k=P),{cx:C,cy:k,x01:-p,y01:-u,x11:C*(i/E-1),y11:k*(i/E-1)}}var Gt=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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(){return Ut=Object.assign||function(t){for(var e,n=1,r=arguments.length;nd;if(a||(a=l=Et()),uOt)if(m>St-Ot)a.moveTo(u*kt(d),u*It(d)),a.arc(0,0,u,d,h,!f),p>Ot&&(a.moveTo(p*kt(h),p*It(h)),a.arc(0,0,p,h,d,f));else{var _,y,v=d,g=h,b=d,E=h,w=m,M=m,C=s.apply(this,arguments)/2,k=C>Ot&&(r?+r.apply(this,arguments):Tt(p*p+u*u)),x=Pt(Mt(u-p)/2,+n.apply(this,arguments)),P=x,I=x;if(k>Ot){var T=Rt(k/p*It(C)),O=Rt(k/u*It(C));(w-=2*T)>Ot?(b+=T*=f?1:-1,E-=T):(w=0,b=E=(d+h)/2),(M-=2*O)>Ot?(v+=O*=f?1:-1,g-=O):(M=0,v=g=(d+h)/2)}var A=u*kt(v),L=u*It(v),S=p*kt(E),D=p*It(E);if(x>Ot){var R,N=u*kt(g),B=u*It(g),z=p*kt(b),W=p*It(b);if(mOt?I>Ot?(_=Vt(z,W,A,L,u,I,f),y=Vt(N,B,S,D,u,I,f),a.moveTo(_.cx+_.x01,_.cy+_.y01),IOt&&w>Ot?P>Ot?(_=Vt(S,D,N,B,p,-P,f),y=Vt(A,L,z,W,p,-P,f),a.lineTo(_.cx+_.x01,_.cy+_.y01),P0){var d=document.createElementNS(qt,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent="".concat(t),d.style.fontSize="8pt";var h=document.createElementNS(qt,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent="".concat(this.props.unit),h.style.fontSize="8pt",u.append(d,h),u.setAttribute("transform","translate(50 33)")}else u.textContent="".concat(t),u.style.fontSize="8pt",u.setAttribute("transform","translate(50 50)");else u.textContent="".concat(n,"%"),u.setAttribute("transform","translate(50 50)");i.append(u)}return!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||i.setAttribute("opacity","0.2"),null!==i&&r.append(i),r},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,Ut(Ut({},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}(n.ZP),Yt=Jt,Xt=__webpack_require__(369),Qt=__webpack_require__(709),$t=__webpack_require__(600),te=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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n3&&n<=6?e=" K":n>6&&n<=9?e=" M":n>9&&n<=12?e=" G":n>12&&n<=15&&(e=" T"),e},e.prototype.getCoords=function(t,e){if(""!==this.props.minMaxValue){var n=JSON.parse(this.props.minMaxValue);if(n.min===t)t=0;else if(n.max===t||100===t)t=100;else{var r=n.max-n.min;t=100-100*(n.max-t)/r}}t=180-1.8*t;var i=e+Math.cos(t*Math.PI/180)*e,o=e-Math.sin(t*Math.PI/180)*e;return"".concat(i,",").concat(o)},e.prototype.truncateTitle=function(t){if(null!=t&&t.length>22){var e=t.length/2,n=e-9,r=t.substr(0,e-n),i=t.substr(e+n);return"".concat(r,"...").concat(i)}return t},e}(n.ZP),pe=ce,ue=__webpack_require__(880),de=function(){return de=Object.assign||function(t){for(var e,n=1,r=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 n=t.id,r=t.name,i=t.groupId,o=t.backgroundURL,s=t.backgroundColor,a=t.isFavorite,l=t.relationLineWidth,c=t.maintenanceMode;if(null==n||isNaN(parseInt(n)))throw new TypeError("invalid Id.");if("string"!=typeof r||0===r.length)throw new TypeError("invalid name.");if(null==i||isNaN(parseInt(i)))throw new TypeError("invalid group Id.");return de({id:parseInt(n),name:r,groupId:parseInt(i),backgroundURL:(0,e.JW)(o,null),backgroundColor:(0,e.JW)(s,null),isFavorite:(0,e.gx)(a),relationLineWidth:(0,e.I1)(l,0),maintenanceMode:c},(0,e.HY)(t))}(n),this.render(),(r=r.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 S&&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:r}):this.lines[e].start>0&&(this.lineLinks[this.lines[e].start][e].start=0,this.lines[e].start=0),r>0?(null==this.lineLinks[r]&&(this.lineLinks[r]={}),this.lineLinks[r][e]={start:n,end:r}):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:r},this.lineLinks)this.lineLinks[i][e]&&(0==this.lineLinks[i][e].start&&0==this.lineLinks[i][e].end&&(delete this.lineLinks[i][e],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i]),(this.lineLinks[i][e].start!=n&&this.lineLinks[i][e].end==r||this.lineLinks[i][e].start==n&&this.lineLinks[i][e].end!=r)&&(delete this.lineLinks[i][e],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i]))}catch(t){console.error(t)}},t.prototype.updateLinesConnected=function(t,n,r){var i=this;null!=this.lineLinks[t.id]&&(Object.keys(this.lineLinks[t.id]).forEach((function(o){var s=parseInt(o);if(-1!==i.elementIds.indexOf(s)){var a=i.elementsById[s];if(a.props){var l=a.props.startPosition.x,c=a.props.startPosition.y,p=a.props.endPosition.x,u=a.props.endPosition.y;t.id==i.lineLinks[t.id][s].start&&(l=n.x+t.width/2,c=n.y+t.height/2),t.id==i.lineLinks[t.id][s].end&&(p=n.x+t.width/2,u=n.y+t.height/2),i.updateElement(de(de({},a.props),{startX:l,startY:c,endX:p,endY:u})),r&&(0,e.Ds)(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:p,endY:u})}}})),this.buildRelations(t.id,n.x+t.width/2,n.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:!1,configurable:!0}),t.prototype.addElement=function(t,n){void 0===n&&(n=this);try{var r=function(t){var n=(0,e.I1)(t.type,null);if(null==n)throw new TypeError("missing item type.");var r=(0,e.SM)(t);switch(n){case 0:return new l(s(t),r);case 1:return new $t.Z((0,$t.C)(t),r);case 2:case 6:case 7:case 8:return new ht(ut(t),r);case 3:case 9:case 15:case 16:return new Yt(Zt(t),r);case 4:return new at(ot(t),r);case 5:return new h(u(t),r);case 10:return new ie(ne(t),r);case 11:return new U(V(t),r);case 12:return new nt(tt(t),r);case 13:return new S(O(t),r);case 14:return new mt.Z((0,mt.o)(t),r);case 17:return new Xt.Z((0,Xt.p)(t),r);case 18:return new Qt.Z((0,Qt.K)(t),r);case 19:return new X(J(t),r);case 20:return new x(E(t),r);case 21:return new W(B(t),r);case 22:return new pe(ae(t),r);case 23:return new ue.Z((0,ue.u)(t),r);default:throw new TypeError("item not found")}}(t);return n.elementsById[r.props.id]=r,n.elementIds.push(r.props.id),r.onRemove(n.handleElementRemove),r.onSelectionChanged(n.handleElementSelectionChanged),r.onClick(n.handleElementClick),r.onDblClick(n.handleElementDblClick),r instanceof S?(r.onLineMovementFinished(n.handleLineElementMovementFinished),this.refreshLink(r)):(r.onMoved(n.handleElementMovement),r.onMovementFinished(n.handleElementMovementFinished),r.onResized(n.handleElementResizement),r.onResizeFinished(n.handleElementResizementFinished)),n.containerRef.append(r.elementRef),r}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=he(t)}catch(t){console.error("Error updating an element:",t.message)}})),this.buildRelations()},t.prototype.updateElement=function(t){try{this.elementsById[t.id].props=de({},he(t))}catch(t){console.error("Error updating element:",t.message)}this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return de({},this._props)},set:function(t){var e=this.props;this._props=t,this.render(e)},enumerable:!1,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(".concat(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(".concat(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="".concat(t,"px"),this.containerRef.style.height="".concat(e,"px")},t.prototype.resize=function(t,e){this.props=de(de({},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 r=this;this.clearRelations(),this.elements.forEach((function(i){if(null!==i.props.parentId){var o=r.elementsById[i.props.parentId],s=r.elementsById[i.props.id];o&&s&&(null!=t?i.props.parentId==t?r.addRelationLine(o,s,e,n):i.props.id==t?r.addRelationLine(o,s,void 0,void 0,e,n):r.addRelationLine(o,s):r.addRelationLine(o,s))}}))},t.prototype.clearRelations=function(t){if(null!=t)for(var e in this.relations){var n=e.split("|"),r=Number.parseInt(n[0]),i=Number.parseInt(n[1]);t!==r&&t!==i||(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="".concat(t,"|").concat(e);return this.relations[n]||null},t.prototype.getItemRelations=function(t){var e=[];for(var n in this.relations){var r=n.split("|"),i=Number.parseInt(r[0]),o=Number.parseInt(r[1]);t!==i&&t!==o||e.push({parentId:i,childId:o,line:this.relations[n]})}return e},t.prototype.getVisualCenter=function(t,e){var n=t.x+e.elementRef.clientWidth/2,r=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":r=t.y+(e.elementRef.clientHeight+e.labelElementRef.clientHeight)/2;break;case"down":r=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:r}},t.prototype.addRelationLine=function(t,n,r,i,o,s){var a="".concat(t.props.id,"|").concat(n.props.id);null!=this.relations[a]&&this.relations[a].remove();var l=this.getVisualCenter(t.props,t),c=l.x,p=l.y,u=this.getVisualCenter(n.props,n),d=u.x,h=u.y;null!=r&&(c=r),null!=i&&(p=i),null!=o&&(d=o),null!=s&&(h=s);var m=new S(O({id:0,type:13,startX:c,startY:p,endX:d,endY:h,width:0,height:0,lineWidth:this.props.relationLineWidth,color:(0,e.JW)(n.props.colorStatus,"#CCC")}),(0,e.SM)({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=de(de({},t.meta),{editMode:!0})})),this.containerRef.classList.add("is-editing")},t.prototype.disableEditMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{editMode:!1})})),this.containerRef.classList.remove("is-editing")},t.prototype.enableMaintenanceMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{maintenanceMode:!0})})),this.containerRef.classList.add("is-maintenance"),this.containerRef.classList.remove("is-editing")},t.prototype.disableMaintenanceMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{maintenanceMode:!1})})),this.containerRef.classList.remove("is-maintenance"),this.containerRef.classList.add("is-editing")},t.prototype.selectItem=function(t,e){var n=this;void 0===e&&(e=!1),e?this.elementIds.forEach((function(e){var r=n.elementsById[e].meta;e!==t&&r.isSelected?n.elementsById[e].unSelectItem():e!==t||r.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 n;switch(t.props.type){case 0:n="".concat((0,e.t)("Static graph")," - ").concat(t.props.imageSrc);break;case 1:n=(0,e.t)("Module graph");break;case 19:n=(0,e.t)("Clock");break;case 18:n=(0,e.t)("Bars graph");break;case 14:n=(0,e.t)("Event history graph");break;case 3:n=(0,e.t)("Percentile bar");break;case 15:n=(0,e.t)("Circular progress bar");break;case 16:n=(0,e.t)("Circular progress bar (interior)");break;case 2:n=(0,e.t)("Simple Value");break;case 4:n=(0,e.t)("Label");break;case 11:n=(0,e.t)("Group");break;case 20:n=(0,e.t)("Color cloud");break;case 5:n="".concat((0,e.t)("Icon")," - ").concat(t.props.imageSrc);break;case 22:n=(0,e.t)("Odometer");break;case 23:n=(0,e.t)("BasicChart");break;default:n=(0,e.t)("Item")}var r=t.props;return null!=r.agentAlias&&null!=r.moduleName?n+=" (".concat((0,e.fk)(r.agentAlias,18)," - ").concat((0,e.fk)(r.moduleName,25),")"):null!=r.agentAlias&&(n+=" (".concat((0,e.fk)(r.agentAlias,25),")")),n},t.items=((le={})[0]=l,le[1]=$t.Z,le[2]=ht,le[6]=ht,le[7]=ht,le[8]=ht,le[3]=Yt,le[9]=Yt,le[15]=Yt,le[16]=Yt,le[4]=at,le[5]=h,le[10]=ie,le[11]=U,le[12]=nt,le[13]=S,le[14]=mt.Z,le[17]=Xt.Z,le[18]=Qt.Z,le[19]=X,le[20]=x,le[21]=W,le[22]=pe,le[23]=ue.Z,le),t}(),fe=function(){function t(t){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new P.Z,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:!1,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}(),_e=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 r=n>0?function(t,e){return new fe((function(){var n=null;return t.onStatusChange((function(r){"finished"===r&&(n=window.setTimeout((function(){t.init()}),e))})),t.init(),{cancel:function(){n&&clearTimeout(n),t.cancel()}}}))}(new fe(e),n):new fe(e);return this.tasks[t]=r,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=me,window.VisualConsole.Form=m,window.AsyncTaskManager=_e}()})(); //# sourceMappingURL=vc.main.min.js.map