2 lines
71 KiB
JavaScript
2 lines
71 KiB
JavaScript
!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=9)}([function(t,e,n){"use strict";n.d(e,"h",function(){return r}),n.d(e,"g",function(){return s}),n.d(e,"l",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"f",function(){return c}),n.d(e,"e",function(){return l}),n.d(e,"i",function(){return h}),n.d(e,"k",function(){return u}),n.d(e,"c",function(){return _}),n.d(e,"b",function(){return p}),n.d(e,"j",function(){return f}),n.d(e,"a",function(){return y});var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!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 c(t){return"boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&("1"===t||"true"===t)}function l(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(i<n.length)return""+n.substring(0,i)+t;for(var r=Math.floor(i/n.length),s=i-n.length*r,o="",a=0;a<r;a++)o+=n;return 0===s?""+o+t:""+o+n.substring(0,s)+t}function h(t){return{x:r(t.x,0),y:r(t.y,0)}}function u(t){if(null==t.width||isNaN(parseInt(t.width))||null==t.height||isNaN(parseInt(t.height)))throw new TypeError("invalid size.");return{width:parseInt(t.width),height:parseInt(t.height)}}function _(t){var e=t.moduleId,n=t.moduleName;return i({moduleId:r(e,null),moduleName:"string"==typeof n&&n.length>0?n:null},function(t){var e=t.metaconsoleId,n=t.agentId,s=t.agentName,o={agentId:r(n,null),agentName:"string"==typeof s&&s.length>0?s:null};return null!=e?i({metaconsoleId:e},o):o}(t))}function p(t){var e=t.metaconsoleId,n=t.linkedLayoutId,s=t.linkedLayoutAgentId,o={linkedLayoutStatusType:"default"};switch(t.linkedLayoutStatusType){case"weight":var a=r(t.linkedLayoutStatusTypeWeight,null);if(null==a)throw new TypeError("invalid status calculation properties.");t.linkedLayoutStatusTypeWeight&&(o={linkedLayoutStatusType:"weight",linkedLayoutStatusTypeWeight:a});break;case"service":var c=r(t.linkedLayoutStatusTypeWarningThreshold,null),l=r(t.linkedLayoutStatusTypeCriticalThreshold,null);if(null==c||null==l)throw new TypeError("invalid status calculation properties.");o={linkedLayoutStatusType:"service",linkedLayoutStatusTypeWarningThreshold:c,linkedLayoutStatusTypeCriticalThreshold:l}}var h=i({linkedLayoutId:r(n,null),linkedLayoutAgentId:r(s,null)},o);return null!=e?i({metaconsoleId:e},h):h}function f(t,e){var n=t+": "+e+";";return["-webkit-"+n,"-moz-"+n,"-ms-"+n,"-o-"+n,""+n]}function y(t){return decodeURIComponent(escape(window.atob(t)))}},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var i=n(0),r=n(2),s=function(){return(s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o=function(t){switch(t){case"up":case"right":case"down":case"left":return t;default:return"down"}};function a(t){if(null==t.id||isNaN(parseInt(t.id)))throw new TypeError("invalid id.");if(null==t.type||isNaN(parseInt(t.type)))throw new TypeError("invalid type.");return s({id:parseInt(t.id),type:parseInt(t.type),label:Object(i.d)(t.label,null),labelPosition:o(t.labelPosition),isLinkEnabled:Object(i.f)(t.isLinkEnabled),link:Object(i.d)(t.link,null),isOnTop:Object(i.f)(t.isOnTop),parentId:Object(i.h)(t.parentId,null),aclGroupId:Object(i.h)(t.aclGroupId,null)},Object(i.k)(t),Object(i.i)(t))}var c=function(){function t(t){this.clickEventManager=new r.a,this.removeEventManager=new r.a,this.disposables=[],this.itemProps=t,this.elementRef=this.createContainerDomElement(),this.labelElementRef=this.createLabelDomElement(),this.childElementRef=this.createDomElement(),this.elementRef.append(this.childElementRef,this.labelElementRef),this.resizeElement(t.width,t.height),this.changeLabelPosition(t.labelPosition)}return 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=document.createElement("div"),t.className="visual-console-item",t.style.zIndex=this.props.isOnTop?"2":"1",t.style.left=this.props.x+"px",t.style.top=this.props.y+"px",t.onclick=function(t){return e.clickEventManager.emit({data:e.props,nativeEvent:t})},t},t.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",this.props.label&&this.props.label.length&&(t.innerHTML=this.props.label),t},t.prototype.updateDomElement=function(t){t.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(t.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(t){var e=this.props;this.itemProps=t,this.shouldBeUpdated(e,t)&&this.render(e)},enumerable:!0,configurable:!0}),t.prototype.shouldBeUpdated=function(t,e){return t!==e},t.prototype.render=function(t){if(void 0===t&&(t=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),t&&t.label===this.props.label||(this.labelElementRef.innerHTML=this.createLabelDomElement().innerHTML),t&&(t.isLinkEnabled!==this.props.isLinkEnabled||this.props.isLinkEnabled&&t.link!==this.props.link)){var e=this.createContainerDomElement();e.innerHTML=this.elementRef.innerHTML,null!==this.elementRef.parentNode&&this.elementRef.parentNode.replaceChild(e,this.elementRef),this.elementRef=e}t&&t.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition)},t.prototype.remove=function(){this.removeEventManager.emit({data:this.props}),this.disposables.forEach(function(t){try{t.dispose()}catch(t){}}),this.elementRef.remove()},t.prototype.positionChanged=function(t,e){return t.x!==e.x||t.y!==e.y},t.prototype.changeLabelPosition=function(t){switch(t){case"up":this.elementRef.style.flexDirection="column-reverse";break;case"left":this.elementRef.style.flexDirection="row-reverse";break;case"right":this.elementRef.style.flexDirection="row";break;case"down":default:this.elementRef.style.flexDirection="column"}},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=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){this.childElementRef.style.width=t>0?t+"px":null,this.childElementRef.style.height=e>0?e+"px":null},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=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.onRemove=function(t){var e=this.removeEventManager.on(t);return this.disposables.push(e),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(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;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function eventsHistoryPropsDecoder(t){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.encodedHtml))throw new TypeError("missing html content.");return __assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(t),{type:14,maxTime:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.h)(t.maxTime,null),html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.a)(t.encodedHtml):t.html},Object(_lib__WEBPACK_IMPORTED_MODULE_0__.c)(t))}var EventsHistory=function(_super){function EventsHistory(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EventsHistory,_super),EventsHistory.prototype.createDomElement=function(){var element=document.createElement("div");element.className="events-history",element.innerHTML=this.props.html;for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout(function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}},0)},i=0;i<scripts.length;i++)_loop_1(i);return element},EventsHistory.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},EventsHistory}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=EventsHistory},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return donutGraphPropsDecoder});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;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function donutGraphPropsDecoder(t){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.encodedHtml))throw new TypeError("missing html content.");return __assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(t),{type:17,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.a)(t.encodedHtml):t.html},Object(_lib__WEBPACK_IMPORTED_MODULE_0__.c)(t),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.b)(t))}var DonutGraph=function(_super){function DonutGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DonutGraph,_super),DonutGraph.prototype.resizeElement=function(t,e){t<=0&&(t=200),e<=0&&(e=200),_super.prototype.resizeElement.call(this,t,e)},DonutGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.className="donut-graph",element.innerHTML=this.props.html;for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){setTimeout(function(){0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},0)},i=0;i<scripts.length;i++)_loop_1(i);return element},DonutGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},DonutGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=DonutGraph},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",function(){return barsGraphPropsDecoder});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;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function barsGraphPropsDecoder(t){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.encodedHtml))throw new TypeError("missing html content.");return __assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(t),{type:18,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.a)(t.encodedHtml):t.html},Object(_lib__WEBPACK_IMPORTED_MODULE_0__.c)(t))}var BarsGraph=function(_super){function BarsGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BarsGraph,_super),BarsGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.className="bars-graph",element.innerHTML=this.props.html;for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){setTimeout(function(){0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},0)},i=0;i<scripts.length;i++)_loop_1(i);return element},BarsGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},BarsGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.b=BarsGraph},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return moduleGraphPropsDecoder});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;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function moduleGraphPropsDecoder(t){if(Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)&&Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.encodedHtml))throw new TypeError("missing html content.");return __assign({},Object(_Item__WEBPACK_IMPORTED_MODULE_1__.b)(t),{type:1,html:Object(_lib__WEBPACK_IMPORTED_MODULE_0__.l)(t.html)?Object(_lib__WEBPACK_IMPORTED_MODULE_0__.a)(t.encodedHtml):t.html},Object(_lib__WEBPACK_IMPORTED_MODULE_0__.c)(t),Object(_lib__WEBPACK_IMPORTED_MODULE_0__.b)(t))}var ModuleGraph=function(_super){function ModuleGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ModuleGraph,_super),ModuleGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.className="module-graph",element.innerHTML=this.props.html;for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout(function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}},0)},i=0;i<scripts.length;i++)_loop_1(i);return element},ModuleGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},ModuleGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.a=ModuleGraph},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";n.r(e);n(7);var i,r=n(0),s=n(1),o=(i=function(t,e){return(i=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}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},c=function(t){switch(t){case"default":case"enabled":case"disabled":return t;default:return"default"}};function l(t){if("string"!=typeof t.imageSrc||0===t.imageSrc.length)throw new TypeError("invalid image src.");return a({},Object(s.b)(t),{type:0,imageSrc:t.imageSrc,showLastValueTooltip:c(t.showLastValueTooltip),statusImageSrc:Object(r.d)(t.statusImageSrc,null),lastValue:Object(r.d)(t.lastValue,null)},Object(r.c)(t),Object(r.b)(t))}var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.createDomElement=function(){var t=document.createElement("img");return t.className="static-graph",t.src=this.props.statusImageSrc||this.props.imageSrc,null!==this.props.lastValue&&"disabled"!==this.props.showLastValueTooltip&&(t.className="static-graph image forced_title",t.setAttribute("data-use_title_for_force_title","1"),t.setAttribute("data-title",this.props.lastValue),t.alt=this.props.lastValue),t},e}(s.a),u=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)}}(),_=function(){return(_=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function p(t){if("string"!=typeof t.imageSrc||0===t.imageSrc.length)throw new TypeError("invalid image src.");return _({},Object(s.b)(t),{type:5,imageSrc:t.imageSrc},Object(r.b)(t))}var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.createDomElement=function(){var t=document.createElement("img");return t.className="icon",t.src=this.props.imageSrc,t},e}(s.a),y=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;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function m(t){if("string"!=typeof t.color||0===t.color.length)throw new TypeError("invalid color.");return d({},Object(s.b)(t),{type:20,color:t.color},Object(r.c)(t),Object(r.b)(t))}var b="http://www.w3.org/2000/svg",x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="color-cloud",t.append(this.createSvgElement()),t},e.prototype.createSvgElement=function(){var t="grad_"+this.props.id,e=document.createElementNS(b,"svg");e.setAttribute("viewBox","0 0 100 100");var n=document.createElementNS(b,"defs"),i=document.createElementNS(b,"radialGradient");i.setAttribute("id",t),i.setAttribute("cx","50%"),i.setAttribute("cy","50%"),i.setAttribute("r","50%"),i.setAttribute("fx","50%"),i.setAttribute("fy","50%");var r=document.createElementNS(b,"stop");r.setAttribute("offset","0%"),r.setAttribute("style","stop-color:"+this.props.color+";stop-opacity:0.9");var s=document.createElementNS(b,"stop");s.setAttribute("offset","100%"),s.setAttribute("style","stop-color:"+this.props.color+";stop-opacity:0");var o=document.createElementNS(b,"circle");return o.setAttribute("fill","url(#"+t+")"),o.setAttribute("cx","50%"),o.setAttribute("cy","50%"),o.setAttribute("r","50%"),i.append(r,s),n.append(i),e.append(n,o),e},e}(s.a),v=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)}}(),g=function(){return(g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function E(t){if(("string"!=typeof t.imageSrc||0===t.imageSrc.length)&&null===t.encodedHtml)throw new TypeError("invalid image src.");if(null===Object(r.h)(t.groupId,null))throw new TypeError("invalid group Id.");return g({},Object(s.b)(t),{type:11,imageSrc:Object(r.d)(t.imageSrc,null),groupId:parseInt(t.groupId),html:Object(r.l)(t.encodedHtml)?null:Object(r.a)(t.encodedHtml),statusImageSrc:Object(r.d)(t.statusImageSrc,null)},Object(r.b)(t))}var O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return v(e,t),e.prototype.createDomElement=function(){if(null!==this.props.html){var t=document.createElement("div");return t.innerHTML=this.props.html,t}var e=document.createElement("img");return e.className="group",null!=this.props.statusImageSrc&&(e.src=this.props.statusImageSrc),e},e}(s.a),w=(n(8),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)}}()),T=function(){return(T=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},A=function(t){switch(t){case"analogic":case"digital":return t;default:return"analogic"}},k=function(t){switch(t){case"datetime":case"date":case"time":return t;default:return"datetime"}};function j(t){if("string"!=typeof t.clockTimezone||0===t.clockTimezone.length)throw new TypeError("invalid timezone.");return T({},Object(s.b)(t),{type:19,clockType:A(t.clockType),clockFormat:k(t.clockFormat),clockTimezone:t.clockTimezone,clockTimezoneOffset:Object(r.h)(t.clockTimezoneOffset,0),showClockTimezone:Object(r.f)(t.showClockTimezone),color:Object(r.d)(t.color,null)},Object(r.b)(t))}var P=function(t){function e(n){var i=t.call(this,n)||this;return i.intervalRef=null,i.startTick(function(){i.childElementRef.innerHTML=i.createClock().innerHTML},"analogic"===i.props.clockType?2e4:e.TICK_INTERVAL),i}return w(e,t),e.prototype.stopTick=function(){null!==this.intervalRef&&(window.clearInterval(this.intervalRef),this.intervalRef=null)},e.prototype.startTick=function(t,n){void 0===n&&(n=e.TICK_INTERVAL),this.stopTick(),this.intervalRef=window.setInterval(t,n)},e.prototype.createDomElement=function(){return this.createClock()},e.prototype.remove=function(){this.stopTick(),t.prototype.remove.call(this)},e.prototype.resizeElement=function(e,n){var i=this.getElementSize(e,n),r=i.width,s=i.height;t.prototype.resizeElement.call(this,r,s),"digital"===this.props.clockType&&(this.childElementRef.innerHTML=this.createClock().innerHTML)},e.prototype.createClock=function(){switch(this.props.clockType){case"analogic":return this.createAnalogicClock();case"digital":return this.createDigitalClock();default:throw new Error("invalid clock type.")}},e.prototype.createAnalogicClock=function(){var t="http://www.w3.org/2000/svg",e="#FFFFF0",n="#242124",i="#242124",s="#242124",o="#525252",a="#DC143C",c=this.getElementSize(),l=c.width,h=c.height,u=document.createElement("div");u.className="analogic-clock",u.style.width=l+"px",u.style.height=h+"px";var _=document.createElementNS(t,"svg");_.setAttribute("viewBox","0 0 100 100");var p=document.createElementNS(t,"g");p.setAttribute("class","clockface");var f=document.createElementNS(t,"circle");f.setAttribute("cx","50"),f.setAttribute("cy","50"),f.setAttribute("r","48"),f.setAttribute("fill",e),f.setAttribute("stroke",n),f.setAttribute("stroke-width","2"),f.setAttribute("stroke-linecap","round"),p.append(f);var y=this.getHumanTimezone();if(y.length>0){var d=document.createElementNS(t,"text");d.setAttribute("text-anchor","middle"),d.setAttribute("font-size","8"),d.setAttribute("transform","translate(30 50) rotate(90)"),d.setAttribute("fill",i),d.textContent=y,p.append(d)}var m=document.createElementNS(t,"g");m.setAttribute("class","marks");var b=document.createElementNS(t,"g");b.setAttribute("class","mark"),b.setAttribute("transform","translate(50 50)");var x=document.createElementNS(t,"line");x.setAttribute("x1","36"),x.setAttribute("y1","0"),x.setAttribute("x2","46"),x.setAttribute("y2","0"),x.setAttribute("stroke",i),x.setAttribute("stroke-width","5");var v=document.createElementNS(t,"line");v.setAttribute("x1","36"),v.setAttribute("y1","0"),v.setAttribute("x2","46"),v.setAttribute("y2","0"),v.setAttribute("stroke",e),v.setAttribute("stroke-width","1"),b.append(x,v),m.append(b);for(var g=1;g<60;g++){var E=document.createElementNS(t,"line");E.setAttribute("y1","0"),E.setAttribute("y2","0"),E.setAttribute("stroke",i),E.setAttribute("transform","translate(50 50) rotate("+6*g+")"),g%5==0?(E.setAttribute("x1","38"),E.setAttribute("x2","46"),E.setAttribute("stroke-width",g%15==0?"2":"1")):(E.setAttribute("x1","42"),E.setAttribute("x2","46"),E.setAttribute("stroke-width","0.5")),m.append(E)}var O=document.createElementNS(t,"g");O.setAttribute("class","hour-hand"),O.setAttribute("transform","translate(50 50)");var w=document.createElementNS(t,"line");w.setAttribute("class","hour-hand-a"),w.setAttribute("x1","0"),w.setAttribute("y1","0"),w.setAttribute("x2","30"),w.setAttribute("y2","0"),w.setAttribute("stroke",o),w.setAttribute("stroke-width","4"),w.setAttribute("stroke-linecap","round");var T=document.createElementNS(t,"line");T.setAttribute("class","hour-hand-b"),T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","29.9"),T.setAttribute("y2","0"),T.setAttribute("stroke",s),T.setAttribute("stroke-width","3.1"),T.setAttribute("stroke-linecap","round"),O.append(w,T);var A=document.createElementNS(t,"g");A.setAttribute("class","minute-hand"),A.setAttribute("transform","translate(50 50)");var k=document.createElementNS(t,"line");k.setAttribute("class","minute-hand-a"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","40"),k.setAttribute("y2","0"),k.setAttribute("stroke",o),k.setAttribute("stroke-width","2"),k.setAttribute("stroke-linecap","round");var j=document.createElementNS(t,"line");j.setAttribute("class","minute-hand-b"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","39.9"),j.setAttribute("y2","0"),j.setAttribute("stroke",s),j.setAttribute("stroke-width","1.5"),j.setAttribute("stroke-linecap","round");var P=document.createElementNS(t,"circle");P.setAttribute("r","3"),P.setAttribute("fill",s),A.append(k,j,P);var M=document.createElementNS(t,"g");M.setAttribute("class","second-hand"),M.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),M.append(S,I);var D=document.createElementNS(t,"circle");D.setAttribute("cx","50"),D.setAttribute("cy","50"),D.setAttribute("r","0.3"),D.setAttribute("fill",s);var N=this.getDate(),L=N.getSeconds(),C=N.getMinutes(),R=6*L,B=6*C+L/60*6,H=30*N.getHours()+C/60*30;return O.setAttribute("transform","translate(50 50) rotate("+H+")"),A.setAttribute("transform","translate(50 50) rotate("+B+")"),M.setAttribute("transform","translate(50 50) rotate("+R+")"),_.append(p,m,O,A,M,D),_.setAttribute("transform","rotate(-90)"),u.innerHTML="\n <style>\n @keyframes rotate-hour {\n from {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+H+"deg)").join("\n")+"\n }\n to {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+(H+360)+"deg)").join("\n")+"\n }\n }\n @keyframes rotate-minute {\n from {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+B+"deg)").join("\n")+"\n }\n to {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+(B+360)+"deg)").join("\n")+"\n }\n }\n @keyframes rotate-second {\n from {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+R+"deg)").join("\n")+"\n }\n to {\n "+Object(r.j)("transform","translate(50px, 50px) rotate("+(R+360)+"deg)").join("\n")+"\n }\n }\n </style>\n ",u.append(_),u},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,r=10*e/100,s=Math.min(20*n*e/100,e/100*10);if("datetime"===this.props.clockFormat){var o=document.createElement("span");o.className="date",o.textContent=this.getDigitalDate(),o.style.fontSize=r+"px",this.props.color&&(o.style.color=this.props.color),t.append(o)}var a=document.createElement("span");a.className="time",a.textContent=this.getDigitalTime(),a.style.fontSize=i+"px",this.props.color&&(a.style.color=this.props.color),t.append(a);var c=this.getHumanTimezone();if(c.length>0){var l=document.createElement("span");l.className="timezone",l.textContent=c,l.style.fontSize=s+"px",this.props.color&&(l.style.color=this.props.color),t.append(l)}return t},e.prototype.getDate=function(){var t=new Date,e=1e3*this.props.clockTimezoneOffset,n=60*t.getTimezoneOffset()*1e3,i=t.getTime()+e+n;return new Date(i)},e.prototype.getDigitalDate=function(t){void 0===t&&(t=null);var e=t||this.getDate();return Object(r.e)(e.getDate(),2,0)+"/"+Object(r.e)(e.getMonth()+1,2,0)+"/"+Object(r.e)(e.getFullYear(),4,0)},e.prototype.getDigitalTime=function(t){void 0===t&&(t=null);var e=t||this.getDate();return Object(r.e)(e.getHours(),2,0)+":"+Object(r.e)(e.getMinutes(),2,0)+":"+Object(r.e)(e.getSeconds(),2,0)},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;return t>0&&e>0?n=Math.min(t,e):t>0?n=t:e>0&&(n=e),{width:n,height:n};case"digital":return t>0&&e>0?e=t/2<e?t/2:e:t>0?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),M=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)}}(),S=function(){return(S=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function I(t){return S({},Object(s.b)(t),{type:12,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,borderWidth:Object(r.h)(t.borderWidth,0),borderColor:Object(r.d)(t.borderColor,null),fillColor:Object(r.d)(t.fillColor,null)})}var D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");if(t.className="box",t.style.boxSizing="border-box",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)}return t},e}(s.a),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)}}(),L=function(){return(L=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function C(t){var e=L({},Object(s.b)(L({},t,{width:1,height:1})),{type:13,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,x:0,y:0,width:0,height:0,startPosition:{x:Object(r.h)(t.startX,0),y:Object(r.h)(t.startY,0)},endPosition:{x:Object(r.h)(t.endX,0),y:Object(r.h)(t.endY,0)},lineWidth:Object(r.h)(t.lineWidth||t.borderWidth,1),color:Object(r.d)(t.borderColor||t.color,null)});return L({},e,R.extractBoxSizeAndPosition(e))}var R=function(t){function e(n){return t.call(this,L({},n,e.extractBoxSizeAndPosition(n)))||this}return N(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");t.className="line";var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");n.setAttribute("width",(this.props.width+this.props.lineWidth).toString()),n.setAttribute("height",(this.props.height+this.props.lineWidth).toString());var i=document.createElementNS(e,"line");return i.setAttribute("x1",""+(this.props.startPosition.x-this.props.x+this.props.lineWidth/2)),i.setAttribute("y1",""+(this.props.startPosition.y-this.props.y+this.props.lineWidth/2)),i.setAttribute("x2",""+(this.props.endPosition.x-this.props.x+this.props.lineWidth/2)),i.setAttribute("y2",""+(this.props.endPosition.y-this.props.y+this.props.lineWidth/2)),i.setAttribute("stroke",this.props.color||"black"),i.setAttribute("stroke-width",this.props.lineWidth.toString()),n.append(i),t.append(n),t},e.extractBoxSizeAndPosition=function(t){return{width:Math.abs(t.startPosition.x-t.endPosition.x),height:Math.abs(t.startPosition.y-t.endPosition.y),x:Math.min(t.startPosition.x,t.endPosition.x),y:Math.min(t.startPosition.y,t.endPosition.y)}},e}(s.a),B=R,H=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)}}(),W=function(){return(W=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function z(t){return W({},Object(s.b)(t),{type:4},Object(r.b)(t))}var U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="label",t.innerHTML=this.props.label||"",t},e.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},e}(s.a),K=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)}}(),G=function(){return(G=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},q=function(t){switch(t){case"string":case"image":return t;default:return"string"}},V=function(t){switch(t){case"none":case"avg":case"max":case"min":return t;default:return"none"}};function F(t){if("string"!=typeof t.value||0===t.value.length)throw new TypeError("invalid value");var e=V(t.processValue);return G({},Object(s.b)(t),{type:2,valueType:q(t.valueType),value:t.value},"none"===e?{processValue:e}:{processValue:e,period:Object(r.h)(t.period,0)},Object(r.c)(t),Object(r.b)(t))}var Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");if(t.className="simple-value","image"===this.props.valueType){var e=document.createElement("img");e.src=this.props.value,t.append(e)}else{var n=this.props.value;this.props.label&&(n=this.props.label.replace(/\(?_VALUE_\)?/i,n)),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),X=n(3),Z=Math.PI,Q=2*Z,J=Q-1e-6;function $(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function tt(){return new $}$.prototype=tt.prototype={constructor:$,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,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,c=i-e,l=s-t,h=o-e,u=l*l+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>1e-6)if(Math.abs(h*a-c*l)>1e-6&&r){var _=n-s,p=i-o,f=a*a+c*c,y=_*_+p*p,d=Math.sqrt(f),m=Math.sqrt(u),b=r*Math.tan((Z-Math.acos((f+u-y)/(2*d*m)))/2),x=b/m,v=b/d;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*l)+","+(e+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*_>l*p)+","+(this._x1=t+v*a)+","+(this._y1=e+v*c)}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),c=t+o,l=e+a,h=1^s,u=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+c+","+l),n&&(u<0&&(u=u%Q+Q),u>J?this._+="A"+n+","+n+",0,1,"+h+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+h+","+(this._x1=c)+","+(this._y1=l):u>1e-6&&(this._+="A"+n+","+n+",0,"+ +(u>=Z)+","+h+","+(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 et=tt,nt=function(t){return function(){return t}},it=Math.abs,rt=Math.atan2,st=Math.cos,ot=Math.max,at=Math.min,ct=Math.sin,lt=Math.sqrt,ht=1e-12,ut=Math.PI,_t=ut/2,pt=2*ut;function ft(t){return t>=1?_t:t<=-1?-_t:Math.asin(t)}function yt(t){return t.innerRadius}function dt(t){return t.outerRadius}function mt(t){return t.startAngle}function bt(t){return t.endAngle}function xt(t){return t&&t.padAngle}function vt(t,e,n,i,r,s,o){var a=t-n,c=e-i,l=(o?s:-s)/lt(a*a+c*c),h=l*c,u=-l*a,_=t+h,p=e+u,f=n+h,y=i+u,d=(_+f)/2,m=(p+y)/2,b=f-_,x=y-p,v=b*b+x*x,g=r-s,E=_*y-f*p,O=(x<0?-1:1)*lt(ot(0,g*g*v-E*E)),w=(E*x-b*O)/v,T=(-E*b-x*O)/v,A=(E*x+b*O)/v,k=(-E*b+x*O)/v,j=w-d,P=T-m,M=A-d,S=k-m;return j*j+P*P>M*M+S*S&&(w=A,T=k),{cx:w,cy:T,x01:-h,y01:-u,x11:w*(r/g-1),y11:T*(r/g-1)}}var gt=function(){var t=yt,e=dt,n=nt(0),i=null,r=mt,s=bt,o=xt,a=null;function c(){var c,l,h,u=+t.apply(this,arguments),_=+e.apply(this,arguments),p=r.apply(this,arguments)-_t,f=s.apply(this,arguments)-_t,y=it(f-p),d=f>p;if(a||(a=c=et()),_<u&&(l=_,_=u,u=l),_>ht)if(y>pt-ht)a.moveTo(_*st(p),_*ct(p)),a.arc(0,0,_,p,f,!d),u>ht&&(a.moveTo(u*st(f),u*ct(f)),a.arc(0,0,u,f,p,d));else{var m,b,x=p,v=f,g=p,E=f,O=y,w=y,T=o.apply(this,arguments)/2,A=T>ht&&(i?+i.apply(this,arguments):lt(u*u+_*_)),k=at(it(_-u)/2,+n.apply(this,arguments)),j=k,P=k;if(A>ht){var M=ft(A/u*ct(T)),S=ft(A/_*ct(T));(O-=2*M)>ht?(g+=M*=d?1:-1,E-=M):(O=0,g=E=(p+f)/2),(w-=2*S)>ht?(x+=S*=d?1:-1,v-=S):(w=0,x=v=(p+f)/2)}var I=_*st(x),D=_*ct(x),N=u*st(E),L=u*ct(E);if(k>ht){var C,R=_*st(v),B=_*ct(v),H=u*st(g),W=u*ct(g);if(y<ut&&(C=function(t,e,n,i,r,s,o,a){var c=n-t,l=i-e,h=o-r,u=a-s,_=u*c-h*l;if(!(_*_<ht))return[t+(_=(h*(e-s)-u*(t-r))/_)*c,e+_*l]}(I,D,H,W,R,B,N,L))){var z=I-C[0],U=D-C[1],K=R-C[0],G=B-C[1],q=1/ct(((h=(z*K+U*G)/(lt(z*z+U*U)*lt(K*K+G*G)))>1?0:h<-1?ut:Math.acos(h))/2),V=lt(C[0]*C[0]+C[1]*C[1]);j=at(k,(u-V)/(q-1)),P=at(k,(_-V)/(q+1))}}w>ht?P>ht?(m=vt(H,W,I,D,_,P,d),b=vt(R,B,N,L,_,P,d),a.moveTo(m.cx+m.x01,m.cy+m.y01),P<k?a.arc(m.cx,m.cy,P,rt(m.y01,m.x01),rt(b.y01,b.x01),!d):(a.arc(m.cx,m.cy,P,rt(m.y01,m.x01),rt(m.y11,m.x11),!d),a.arc(0,0,_,rt(m.cy+m.y11,m.cx+m.x11),rt(b.cy+b.y11,b.cx+b.x11),!d),a.arc(b.cx,b.cy,P,rt(b.y11,b.x11),rt(b.y01,b.x01),!d))):(a.moveTo(I,D),a.arc(0,0,_,x,v,!d)):a.moveTo(I,D),u>ht&&O>ht?j>ht?(m=vt(N,L,R,B,u,-j,d),b=vt(I,D,H,W,u,-j,d),a.lineTo(m.cx+m.x01,m.cy+m.y01),j<k?a.arc(m.cx,m.cy,j,rt(m.y01,m.x01),rt(b.y01,b.x01),!d):(a.arc(m.cx,m.cy,j,rt(m.y01,m.x01),rt(m.y11,m.x11),!d),a.arc(0,0,u,rt(m.cy+m.y11,m.cx+m.x11),rt(b.cy+b.y11,b.cx+b.x11),d),a.arc(b.cx,b.cy,j,rt(b.y11,b.x11),rt(b.y01,b.x01),!d))):a.arc(0,0,u,E,g,d):a.lineTo(N,L)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-ut/2;return[st(i)*n,ct(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:nt(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:nt(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:nt(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:nt(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:nt(+t),c):r},c.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:nt(+t),c):s},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:nt(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c};function Et(t){this._context=t}Et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ot=function(t){return new Et(t)};Tt(Ot);function wt(t){this._curve=t}function Tt(t){function e(e){return new wt(t(e))}return e._curve=t,e}wt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var At=Math.sin(ut/10)/Math.sin(7*ut/10),kt=(Math.sin(pt/10),Math.cos(pt/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function jt(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Pt(t){this._context=t}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:jt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:jt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Mt(t){this._context=t}Mt.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:jt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function St(t){this._context=t}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:jt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function It(t,e){this._basis=new Pt(t),this._beta=e}It.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],s=e[0],o=t[n]-r,a=e[n]-s,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*o),this._beta*e[c]+(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 Pt(t):new It(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Dt(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 Nt(t,e){this._context=t,this._k=(1-e)/6}Nt.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:Dt(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:Dt(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 Nt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Lt(t,e){this._context=t,this._k=(1-e)/6}Lt.prototype={areaStart:kt,areaEnd:kt,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:Dt(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 Lt(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ct(t,e){this._context=t,this._k=(1-e)/6}Ct.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:Dt(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 Ct(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Rt(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>ht){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>ht){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*l+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}function Bt(t,e){this._context=t,this._alpha=e}Bt.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:Rt(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 Bt(t,e):new Nt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Ht(t,e){this._context=t,this._alpha=e}Ht.prototype={areaStart:kt,areaEnd:kt,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:Rt(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 Ht(t,e):new Lt(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Wt(t,e){this._context=t,this._alpha=e}Wt.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:Rt(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 Wt(t,e):new Ct(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function zt(t){this._context=t}zt.prototype={areaStart:kt,areaEnd:kt,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 Ut(t){return t<0?-1:1}function Kt(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(Ut(s)+Ut(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Gt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qt(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 Vt(t){this._context=t}function Ft(t){this._context=new Yt(t)}function Yt(t){this._context=t}function Xt(t){this._context=t}function Zt(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<i-1;++e)r[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,s[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/s[e-1],s[e]-=n,o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/s[i-1],e=i-2;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<i-1;++e)s[e]=2*t[e+1]-r[e+1];return[r,s]}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qt(this,this._t0,Gt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,qt(this,Gt(this,n=Kt(this,t,e)),n);break;default:qt(this,this._t0,n=Kt(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Ft.prototype=Object.create(Vt.prototype)).point=function(t,e){Vt.prototype.point.call(this,e,t)},Yt.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,s){this._context.bezierCurveTo(e,t,i,n,s,r)}},Xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=Zt(t),r=Zt(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[1][s],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Qt(t,e){this._context=t,this._t=e}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Jt=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)}}(),$t=function(){return($t=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function te(t){switch(t){case"progress-bar":case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":return t;default:case 3:return"progress-bar";case 9:return"bubble";case 15:return"circular-progress-bar";case 16:return"circular-progress-bar-alt"}}function ee(t){switch(t){case"percent":case"value":return t;default:return"percent"}}function ne(t){return $t({},Object(s.b)(t),{type:3,percentileType:te(t.percentileType||t.type),valueType:ee(t.valueType),minValue:Object(r.h)(t.minValue,null),maxValue:Object(r.h)(t.maxValue,null),color:Object(r.d)(t.color,null),labelColor:Object(r.d)(t.labelColor,null),value:Object(r.g)(t.value,null),unit:Object(r.d)(t.unit,null)},Object(r.c)(t),Object(r.b)(t))}var ie="http://www.w3.org/2000/svg",re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jt(e,t),e.prototype.createDomElement=function(){var t={background:"#000000",progress:this.props.color||"#F0F0F0",text:this.props.labelColor||"#444444"},e=this.getProgress(),n=document.createElement("div"),i=document.createElementNS(ie,"svg");switch(this.props.percentileType){case"progress-bar":var r=document.createElementNS(ie,"rect");r.setAttribute("fill",t.background),r.setAttribute("fill-opacity","0.5"),r.setAttribute("width","100"),r.setAttribute("height","20"),r.setAttribute("rx","5"),r.setAttribute("ry","5");var s=document.createElementNS(ie,"rect");s.setAttribute("fill",t.progress),s.setAttribute("fill-opacity","1"),s.setAttribute("width",""+e),s.setAttribute("height","20"),s.setAttribute("rx","5"),s.setAttribute("ry","5"),(h=document.createElementNS(ie,"text")).setAttribute("text-anchor","middle"),h.setAttribute("alignment-baseline","middle"),h.setAttribute("font-size","12"),h.setAttribute("font-family","arial"),h.setAttribute("font-weight","bold"),h.setAttribute("transform","translate(50 11)"),h.setAttribute("fill",t.text),"value"===this.props.valueType?h.textContent=this.props.unit?this.props.value+" "+this.props.unit:""+this.props.value:h.textContent=e+"%",i.setAttribute("viewBox","0 0 100 20"),i.append(r,s,h);break;case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":if(i.setAttribute("viewBox","0 0 100 100"),"bubble"===this.props.percentileType){(o=document.createElementNS(ie,"circle")).setAttribute("transform","translate(50 50)"),o.setAttribute("fill",t.background),o.setAttribute("fill-opacity","0.5"),o.setAttribute("r","50"),(a=document.createElementNS(ie,"circle")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.progress),a.setAttribute("fill-opacity","1"),a.setAttribute("r",""+e/2),i.append(o,a)}else{var o,a,c={innerRadius:"circular-progress-bar"===this.props.percentileType?30:0,outerRadius:50,startAngle:0,endAngle:2*Math.PI},l=gt();(o=document.createElementNS(ie,"path")).setAttribute("transform","translate(50 50)"),o.setAttribute("fill",t.background),o.setAttribute("fill-opacity","0.5"),o.setAttribute("d",""+l(c)),(a=document.createElementNS(ie,"path")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",t.progress),a.setAttribute("fill-opacity","1"),a.setAttribute("d",""+l($t({},c,{endAngle:c.endAngle*(e/100)}))),i.append(o,a)}var h;if((h=document.createElementNS(ie,"text")).setAttribute("text-anchor","middle"),h.setAttribute("alignment-baseline","middle"),h.setAttribute("font-size","16"),h.setAttribute("font-family","arial"),h.setAttribute("font-weight","bold"),h.setAttribute("fill",t.text),"value"===this.props.valueType)if(this.props.unit&&this.props.unit.length>0){var u=document.createElementNS(ie,"tspan");u.setAttribute("x","0"),u.setAttribute("dy","1em"),u.textContent=""+this.props.value;var _=document.createElementNS(ie,"tspan");_.setAttribute("x","0"),_.setAttribute("dy","1em"),_.textContent=""+this.props.unit,h.append(u,_),h.setAttribute("transform","translate(50 33)")}else h.textContent=""+this.props.value,h.setAttribute("transform","translate(50 50)");else h.textContent=e+"%",h.setAttribute("transform","translate(50 50)");i.append(h)}return n.append(i),n},e.prototype.getProgress=function(){var t=this.props.minValue||0,e=this.props.maxValue||100,n=this.props.value||100;return n<=t?0:n>=e?100:(n-t)/(e-t)*100},e}(s.a),se=n(2),oe=n(4),ae=n(5),ce=n(6),le=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)}}(),he=function(){return(he=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function ue(t){if(null!==t.imageSrc){if("string"!=typeof t.statusImageSrc||0===t.imageSrc.statusImageSrc)throw new TypeError("invalid status image src.")}else if(Object(r.l)(t.encodedTitle))throw new TypeError("missing encode tittle content.");if(null===Object(r.h)(t.serviceId,null))throw new TypeError("invalid service id.");return he({},Object(s.b)(t),{type:10,serviceId:t.serviceId,imageSrc:Object(r.d)(t.imageSrc,null),statusImageSrc:Object(r.d)(t.statusImageSrc,null),encodedTitle:Object(r.d)(t.encodedTitle,null)})}var _e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return le(e,t),e.prototype.createDomElement=function(){var t=document.createElement("img");if(null!==this.props.statusImageSrc)t.className="icon",t.src=this.props.statusImageSrc;else if(null!==this.props.encodedTitle){var e=document.createElement("div");return e.innerHTML=Object(r.a)(this.props.encodedTitle),e}return t},e}(s.a),pe=function(){return(pe=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function fe(t){var e=Object(r.h)(t.type,null);if(null==e)throw new TypeError("missing item type.");switch(e){case 0:return new h(l(t));case 1:return new ce.a(Object(ce.b)(t));case 2:case 6:case 7:case 8:return new Y(F(t));case 3:case 9:case 15:case 16:return new re(ne(t));case 4:return new U(z(t));case 5:return new f(p(t));case 10:return new _e(ue(t));case 11:return new O(E(t));case 12:return new D(I(t));case 13:return new B(C(t));case 14:return new X.a(Object(X.b)(t));case 17:return new oe.a(Object(oe.b)(t));case 18:return new ae.b(Object(ae.a)(t));case 19:return new P(j(t));case 20:return new x(m(t));default:throw new TypeError("item not found")}}var ye=function(){function t(t,e,n){var i=this;this.elementsById={},this.elementIds=[],this.relations={},this.clickEventManager=new se.a,this.disposables=[],this.handleElementClick=function(t){i.clickEventManager.emit(t)},this.handleElementRemove=function(t){i.elementIds=i.elementIds.filter(function(e){return e!==t.data.id}),delete i.elementsById[t.data.id],i.clearRelations(t.data.id)},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,c=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 pe({id:parseInt(e),name:n,groupId:parseInt(i),backgroundURL:Object(r.d)(s,null),backgroundColor:Object(r.d)(o,null),isFavorite:Object(r.f)(a),relationLineWidth:Object(r.h)(c,0)},Object(r.k)(t))}(e),this.render(),(n=n.sort(function(t,e){return null==t.isOnTop||null==e.isOnTop||null==t.id||null==e.id?0:t.isOnTop&&!e.isOnTop?1:!t.isOnTop&&e.isOnTop?-1:t.id<e.id?1:-1})).forEach(function(t){try{var e=fe(t);i.elementsById[e.props.id]=e,i.elementIds.push(e.props.id),e.onClick(i.handleElementClick),e.onRemove(i.handleElementRemove),i.containerRef.append(e.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}}),this.buildRelations()}return 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.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])try{var n=fe(t);e.elementsById[n.props.id]=n,n.onClick(e.handleElementClick),n.onRemove(e.handleElementRemove),e.containerRef.append(n.elementRef)}catch(t){console.log("Error creating a new element:",t.message)}else try{e.elementsById[t.id].props=function(t){var e=Object(r.h)(t.type,null);if(null==e)throw new TypeError("missing item type.");switch(e){case 0:return l(t);case 1:return Object(ce.b)(t);case 2:case 6:case 7:case 8:return F(t);case 3:case 9:case 15:case 16:return ne(t);case 4:return z(t);case 5:return p(t);case 10:return ue(t);case 11:return E(t);case 12:return I(t);case 13:return C(t);case 14:return Object(X.b)(t);case 17:return Object(oe.b)(t);case 18:return Object(ae.a)(t);case 19:return j(t);case 20:return m(t);default:throw new TypeError("decoder not found")}}(t)}catch(t){console.log("Error updating an element:",t.message)}}),this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return pe({},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),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.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":null,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=pe({},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.innerHTML=""},t.prototype.buildRelations=function(){var t=this;this.clearRelations(),this.elements.forEach(function(e){if(null!==e.props.parentId){var n=t.elementsById[e.props.parentId],i=t.elementsById[e.props.id];n&&i&&t.addRelationLine(n,i)}})},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.addRelationLine=function(t,e){var n=t.props.id+"|"+e.props.id;null!=this.relations[n]&&this.relations[n].remove();var i=t.props.x+t.elementRef.clientWidth/2,r=t.props.y+(t.elementRef.clientHeight-t.labelElementRef.clientHeight)/2,s=e.props.x+e.elementRef.clientWidth/2,o=e.props.y+(e.elementRef.clientHeight-e.labelElementRef.clientHeight)/2,a=new B(C({id:0,type:13,startX:i,startY:r,endX:s,endY:o,width:0,height:0,lineWidth:this.props.relationLineWidth,color:"#CCCCCC"}));return this.relations[n]=a,a.elementRef.style.zIndex="0",this.containerRef.append(a.elementRef),a},t.prototype.onClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t}();window.VisualConsole=ye}]);
|
|
//# sourceMappingURL=vc.main.131a9bb7.min.js.map
|