diff options
Diffstat (limited to 'web/gui/v2/1282.85b2e2b7b55a9479f23e.js')
-rw-r--r-- | web/gui/v2/1282.85b2e2b7b55a9479f23e.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v2/1282.85b2e2b7b55a9479f23e.js b/web/gui/v2/1282.85b2e2b7b55a9479f23e.js new file mode 100644 index 0000000000..1876394e0a --- /dev/null +++ b/web/gui/v2/1282.85b2e2b7b55a9479f23e.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a37b166-32d1-4ae9-938d-abc7edc4509c",e._sentryDebugIdIdentifier="sentry-dbid-7a37b166-32d1-4ae9-938d-abc7edc4509c")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"87c851dd993868e23dcd9f806e1591f7b1aedb1a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1282],{90026:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=o(r(58960)),n=r(24298),s=o(r(93492));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.default=function(e,t){var r,o,a,u,c=(0,i.default)(e,t),d=function(){c.render();var e=t.getAttributes(),r=e.hoverX;if(e.loaded){var i=t.getPayload().data,n=i[r?t.getClosestRow(r[0]):i.length-1];if(Array.isArray(n)){c.render();var s=t.getAttribute("getValueRange")(t),o=s[0],l=s[1];o===a&&l===u||c.sdk.trigger("yAxisChange",t,o,l),a=o,u=l,c.trigger("rendered")}}};return l(l({},c),{},{mount:function(e){c.mount(e),o=(0,s.default)(e,(function(){return c.trigger("resize")}));var i=t.getAttributes().loaded;r=(0,n.unregister)(t.onAttributeChange("hoverX",d),!i&&t.onceAttributeChange("loaded",d)),c.trigger("resize"),d()},unmount:function(){r&&r(),o&&o(),c.unmount(),a=null,u=null},render:d})}},62369:function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.__esModule=!0,t.default=void 0;t.default=function(e,t){void 0===t&&(t={});var r=e.getElement(),n=r.clientWidth,s=r.clientHeight;return{header:{title:{text:"",color:"",fontSize:"",fontWeight:""},subtitle:{text:"",color:"",fontSize:"",fontWeight:""},titleSubtitlePadding:1},footer:{text:"",color:"",fontSize:"",fontWeight:"",location:""},data:i({sortOrder:"label-asc",smallSegmentGrouping:{enabled:!0,value:5,valueType:"count",label:"smaller",caption:"rest of dimensions",color:e.chart.getThemeAttribute("themeD3pieSmallColor")},content:[]},t),labels:{outer:{format:"label-value2",hideWhenLessThanPercentage:null,pieDistance:10},inner:{format:"percentage",hideWhenLessThanPercentage:101},mainLabel:{color:"segment",fontSize:"0.9em",fontWeight:"normal",font:'-apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif'},percentage:{color:e.chart.getThemeAttribute("themeInnerLabelColor"),fontSize:"1em",fontWeight:"strong",decimalPlaces:0,font:'-apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif'},value:{color:e.chart.getThemeAttribute("themeD3pieSmallColor"),fontSize:"1.2em",fontWeight:"strong",font:'-apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif'},lines:{enabled:!0,style:"curved",color:"segment"},truncation:{enabled:!1,truncateLength:30},formatter:function(t){return"value"===t.part?("No data"===t.realLabel?"-":e.chart.getConvertedValue(t.value))+" "+e.chart.getUnitSign():"percentage"===t.part?t.label+"%":t.label}},effects:{load:{effect:"none",speed:0},pullOutSegmentOnClick:{effect:"bounce",speed:400,size:5},highlightSegmentOnMouseover:!0,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"caption",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:"#000000",backgroundOpacity:.5,color:"#ffffff",borderRadius:2,fontSize:"11px",padding:4}},misc:{colors:{background:"transparent",segments:[],segmentStroke:e.chart.getThemeAttribute("themeD3pieStroke")},gradient:{enabled:!1},canvasPadding:{top:0,right:0,bottom:0,left:0},pieCenterOffset:{x:0,y:0},cssPrefix:null},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null},size:{canvasHeight:Math.floor(s),canvasWidth:Math.floor(n),pieInnerRadius:"50%",pieOuterRadius:"75%"}}}},16469:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=c(r(58960)),n=r(24298),s=c(r(93492)),o=c(r(81220)),a=c(r(53087)),l=c(r(94015)),u=c(r(62369));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.default=function(e,t){var r,c,d,p,m=(0,i.default)(e,t),g=null,b=(0,o.default)(),h=function(){g&&(g.destroy(),g.recreate())},y=function(){m.render();var e=t.getAttributes(),r=e.hoverX,i=e.loaded;if(g&&i){var n=t.getPayload().data,s=r?t.getClosestRow(r[0]):-1;s=-1===s?n.length-1:s;var o=t.getVisibleDimensionIds().map((function(e){return{label:(0,a.default)(e,30),value:t.getDimensionValue(e,s),color:t.selectDimensionColor(e),caption:e}})).filter((function(e){return!!e.value})),l=t.getAttribute("getValueRange")(t),c=l[0],f=l[1];c===d&&f===p||m.sdk.trigger("yAxisChange",t,c,f),d=c,p=f,m.render(),g.options.data.content=o.length?o:[{label:"No data",value:1,color:m.chart.getThemeAttribute("themeD3pieSmallColor")}],g.options.labels=(0,u.default)(m).labels,window.requestAnimationFrame((function(){h()})),m.trigger("rendered")}};return f(f({},m),{},{mount:function(e){if(!g){m.mount(e);var i=t.getAttribute("theme");e.classList.add(i);var o=t.getAttributes().loaded;g=new l.default(e,(0,u.default)(m)),c=(0,s.default)(e.parentNode,(function(){g.options=f(f({},g.options),{},{size:(0,u.default)(m).size}),h(),m.trigger("resize")}));var a=b.add(y);r=(0,n.unregister)(t.onAttributeChange("hoverX",a),!o&&t.onceAttributeChange("loaded",a),t.onAttributeChange("theme",a),t.on("visibleDimensionsChanged",a)),m.trigger("resize"),y()}},unmount:function(){r&&r(),c&&c(),g&&(g.destroy(),g=null),d=null,p=null,m.unmount()},render:y})}},94015:function(e,t,r){"use strict";var i,n,s,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}i.default=e,r&&r.set(e,i);return i}(r(36358));function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}n=[],i=function(){var e="d3pie",t="0.2.1",r=0,i={header:{title:{text:"",color:"#333333",fontSize:"18px",fontWeight:"bold",font:"arial"},subtitle:{text:"",color:"#666666",fontSize:"14px",fontWeight:"bold",font:"arial"},location:"top-center",titleSubtitlePadding:8},footer:{text:"",color:"#666666",fontSize:"14px",fontWeight:"bold",font:"arial",location:"left"},size:{canvasHeight:500,canvasWidth:500,pieInnerRadius:"0%",pieOuterRadius:null},data:{sortOrder:"none",ignoreSmallSegments:{enabled:!1,valueType:"percentage",value:null},smallSegmentGrouping:{enabled:!1,value:1,valueType:"percentage",label:"Other",color:"#cccccc"},content:[]},labels:{outer:{format:"label",hideWhenLessThanPercentage:null,pieDistance:30},inner:{format:"percentage",hideWhenLessThanPercentage:null},mainLabel:{color:"#333333",font:"arial",fontWeight:"normal",fontSize:"10px"},percentage:{color:"#dddddd",font:"arial",fontWeight:"bold",fontSize:"10px",decimalPlaces:0},value:{color:"#cccc44",fontWeight:"bold",font:"arial",fontSize:"10px"},lines:{enabled:!0,style:"curved",color:"segment"},truncation:{enabled:!1,truncateLength:30},formatter:null},effects:{load:{effect:"none",speed:1e3},pullOutSegmentOnClick:{effect:"none",speed:300,size:10},highlightSegmentOnMouseover:!1,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:"#000000",backgroundOpacity:.5,color:"#efefef",borderRadius:2,font:"arial",fontWeight:"bold",fontSize:"10px",padding:4}},misc:{colors:{background:null,segments:["#2484c1","#65a620","#7b6888","#a05d56","#961a1a","#d8d23a","#e98125","#d0743c","#635222","#6ada6a","#0c6197","#7d9058","#207f33","#44b9b0","#bca44a","#e4a14b","#a3acb2","#8cc3e9","#69a6f9","#5b388f","#546e91","#8bde95","#d2ab58","#273c71","#98bf6e","#4daa4b","#98abc5","#cc1010","#31383b","#006391","#c2643f","#b0a474","#a5a39c","#a9c2bc","#22af8c","#7fcecf","#987ac6","#3d3b87","#b77b1c","#c9c2b6","#807ece","#8db27c","#be66a2","#9ed3c6","#00644b","#005064","#77979f","#77e079","#9c73ab","#1f79a7"],segmentStroke:"#ffffff"},gradient:{enabled:!1,percentage:95,color:"#000000"},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:null},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},n={initialCheck:function(e){var t=e.cssPrefix,r=e.element,i=e.options;if(!(r instanceof HTMLElement||r instanceof SVGElement))return!1;if(!/[a-zA-Z][a-zA-Z0-9_-]*$/.test(t))return!1;if(!s.isArray(i.data.content))return!1;for(var n=[],o=0;o<i.data.content.length;o++)"number"!==typeof i.data.content[o].value||isNaN(i.data.content[o].value)||i.data.content[o].value<=0||n.push(i.data.content[o]);return e.options.data.content=n,!0}},s={addSVGSpace:function(e){var t=e.element,r=e.options.size.canvasWidth,i=e.options.size.canvasHeight,n=e.options.misc.colors.background,s=o.select(t).append("svg:svg").attr("width",r).attr("height",i);return"transparent"!==n&&s.style("background-color",(function(){return n})),s},shuffleArray:function(e){for(var t,r,i=e.length;0!==i;)r=Math.floor(Math.random()*i),t=e[i-=1],e[i]=e[r],e[r]=t;return e},processObj:function(e,t,r){return"string"===typeof t?s.processObj(e,t.split("."),r):1===t.length&&void 0!==r?(e[t[0]]=r,e[t[0]]):0===t.length?e:s.processObj(e[t[0]],t.slice(1),r)},getDimensions:function(e){"string"===typeof e&&(e=document.getElementById(e));var t=0,r=0;if(e){var i=e.getBBox();t=i.width,r=i.height}return{w:t,h:r}},rectIntersect:function(e,t){return!(t.x>e.x+e.w||t.x+t.w<e.x||t.y+t.h<e.y||t.y>e.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var r="#",i=0;i<3;i++){var n=parseInt(e.substr(2*i,2),16);r+=("00"+(n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16))).substr(n.length)}return r},initSegmentColors:function(e){for(var t=e.options.data.content,r=e.options.misc.colors.segments,i=[],n=0;n<t.length;n++)t[n].hasOwnProperty("color")?i.push(t[n].color):i.push(r[n]);return i},applySmallSegmentGrouping:function(e,t){var r=[],i=[],n=0,s=0;if("count"===t.valueType){for(var o=[],a=0,c=0;c<e.length;c++)o[a++]={idx:c,value:e[c].value};for(o.sort((function(e,t){return e.value<t.value?1:-1})),a=0;a<o.length;a++)e[o[a].idx].smallSegmentPriority=a;for(c=0;c<e.length;c++)e[c].smallSegmentPriority>=t.value?(i.push(e[c]),n+=e[c].value,s++):(e[c].isGrouped=!1,r.push(e[c]))}else if("percentage"===t.valueType){var d=l.getTotalPieSize(e);for(c=0;c<e.length;c++)if("percentage"===t.valueType){if(e[c].value/d*100<=t.value){i.push(e[c]),n+=e[c].value,s++;continue}e[c].isGrouped=!1,r.push(e[c])}}else for(c=0;c<e.length;c++)e[c].value<=t.value?(i.push(e[c]),n+=e[c].value,s++):(e[c].isGrouped=!1,r.push(e[c]));return i.length&&r.push(u(u({},t),{},{color:t.color,label:"["+t.label+" "+s+"]",value:n,isGrouped:!0,groupedData:i})),r},showPoint:function(e,t,r){e.append("circle").attr("cx",t).attr("cy",r).attr("r",2).style("fill","black")},isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)}},a=function e(){var t,r,i,n,s,o,a=arguments[0]||{},l=1,u=arguments.length,c=!1,d=Object.prototype.toString,f=Object.prototype.hasOwnProperty,p={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},m={isFunction:function(e){return"function"===m.type(e)},isArray:Array.isArray||function(e){return"array"===m.type(e)},isWindow:function(e){return null!==e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null===e?String(e):p[d.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==m.type(e)||e.nodeType)return!1;try{if(e.constructor&&!f.call(e,"constructor")&&!f.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}var t;for(t in e);return void 0===t||f.call(e,t)}};for("boolean"===typeof a&&(c=a,a=arguments[1]||{},l=2),"object"===typeof a||m.isFunction(a)||(a={}),u===l&&(a=this,--l);l<u;l++)if(null!==(t=arguments[l]))for(r in t)i=a[r],a!==(n=t[r])&&(c&&n&&(m.isPlainObject(n)||(s=m.isArray(n)))?(s?(s=!1,o=i&&m.isArray(i)?i:[]):o=i&&m.isPlainObject(i)?i:{},a[r]=e(c,o,n)):void 0!==n&&(a[r]=n));return a},l={toRadians:function(e){return e*(Math.PI/180)},toDegrees:function(e){return e*(180/Math.PI)},computePieRadius:function(e){var t=e.options.size,r=e.options.misc.canvasPadding,i=t.canvasWidth-r.left-r.right,n=t.canvasHeight-r.top-r.bottom;"pie-center"!==e.options.header.location&&(n-=e.textComponents.headerHeight),e.textComponents.footer.exists&&(n-=e.textComponents.footer.h);var s,o,a=(i<(n=n<0?0:n)?i:n)/3;if(null!==t.pieOuterRadius)if(/%/.test(t.pieOuterRadius)){o=(o=(o=parseInt(t.pieOuterRadius.replace(/[\D]/,""),10))>99?99:o)<0?0:o;var l=i<n?i:n;if("none"!==e.options.labels.outer.format){var u=2*parseInt(e.options.labels.outer.pieDistance,10);l-u>0&&(l-=u)}a=Math.floor(l/100*o)/2}else a=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(o=(o=(o=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:o)<0?0:o,s=Math.floor(a/100*o)):s=parseInt(t.pieInnerRadius,10),e.innerRadius=s,e.outerRadius=a},getTotalPieSize:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r].value;return t},sortPieData:function(e){var t=e.options.data.content;switch(e.options.data.sortOrder){case"none":break;case"random":t=s.shuffleArray(t);break;case"value-asc":t.sort((function(e,t){return e.value<t.value?-1:1}));break;case"value-desc":t.sort((function(e,t){return e.value<t.value?1:-1}));break;case"label-asc":t.sort((function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()<t.label.toLowerCase()?1:-1}))}return t},getPieTranslateCenter:function(e){return"translate("+e.x+","+e.y+")"},calculatePieCenter:function(e){var t=e.options.misc.pieCenterOffset,r=e.textComponents.title.exists&&"pie-center"!==e.options.header.location,i=e.textComponents.subtitle.exists&&"pie-center"!==e.options.header.location,n=e.options.misc.canvasPadding.top;r&&i?n+=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h:r?n+=e.textComponents.title.h:i&&(n+=e.textComponents.subtitle.h);var s=0;e.textComponents.footer.exists&&(s=e.textComponents.footer.h+e.options.misc.canvasPadding.bottom);var o=(e.options.size.canvasWidth-e.options.misc.canvasPadding.left-e.options.misc.canvasPadding.right)/2+e.options.misc.canvasPadding.left,a=(e.options.size.canvasHeight-s-n)/2+n;o+=t.x,a+=t.y,e.pieCenter={x:o,y:a}},rotate:function(e,t,r,i,n){n=n*Math.PI/180;var s=Math.cos,o=Math.sin;return{x:(e-r)*s(n)-(t-i)*o(n)+r,y:(e-r)*o(n)+(t-i)*s(n)+i}},translate:function(e,t,r,i){var n=l.toRadians(i);return{x:e+r*Math.sin(n),y:t-r*Math.cos(n)}},pointIsInArc:function(e,t,r){var i=r.innerRadius()(t),n=r.outerRadius()(t),s=r.startAngle()(t),o=r.endAngle()(t),a=e.x*e.x+e.y*e.y,l=Math.atan2(e.x,-e.y);return l=l<0?l+2*Math.PI:l,i*i<=a&&a<=n*n&&s<=l&&l<=o}},c={add:function(e,t,r){var i=c.getIncludes(r),n=e.options.labels,s=e.svg.insert("g","."+e.cssPrefix+"labels-"+t).attr("class",e.cssPrefix+"labels-"+t),o=e.__labels[t]=s.selectAll("."+e.cssPrefix+"labelGroup-"+t).data(e.options.data.content).enter().append("g").attr("id",(function(r,i){return e.cssPrefix+"labelGroup"+i+"-"+t})).attr("data-index",(function(e,t){return t})).attr("class",e.cssPrefix+"labelGroup-"+t).style("opacity",0),a={section:t,sectionDisplayType:r};i.mainLabel&&o.append("text").attr("id",(function(r,i){return e.cssPrefix+"segmentMainLabel"+i+"-"+t})).attr("class",e.cssPrefix+"segmentMainLabel-"+t).text((function(e,t){var r=e.label;return n.formatter?(a.index=t,a.part="mainLabel",a.value=e.value,a.label=r,r=n.formatter(a)):n.truncation.enabled&&e.label.length>n.truncation.truncateLength&&(r=e.label.substring(0,n.truncation.truncateLength)+"..."),r})).style("font-size",n.mainLabel.fontSize).style("font-family",n.mainLabel.font).style("font-weight",n.mainLabel.fontWeight).style("fill",(function(t,r){return"segment"===n.mainLabel.color?e.options.colors[r]:n.mainLabel.color})),i.percentage&&o.append("text").attr("id",(function(r,i){return e.cssPrefix+"segmentPercentage"+i+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var r=e.percentage;return n.formatter?(a.index=t,a.part="percentage",a.value=e.value,a.label=e.percentage,r=n.formatter(a)):r+="%",r})).style("font-size",n.percentage.fontSize).style("font-family",n.percentage.font).style("font-weight",n.percentage.fontWeight).style("fill",n.percentage.color),i.value&&o.append("text").attr("id",(function(r,i){return e.cssPrefix+"segmentValue"+i+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return a.index=t,a.part="value",a.value=e.value,a.label=e.value,a.realLabel=e.label,n.formatter?n.formatter(a,e.value):e.value})).style("font-size",n.value.fontSize).style("font-family",n.value.font).style("font-weight",n.value.fontWeight).style("fill",n.value.color)},positionLabelElements:function(e,t,r){c["dimensions-"+t]=[],e.__labels[t].each((function(r,i){var n=o.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),s=o.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),a=o.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);c["dimensions-"+t].push({mainLabel:null!==n.node()?n.node().getBBox():null,percentage:null!==s.node()?s.node().getBBox():null,value:null!==a.node()?a.node().getBBox():null})}));var i=5,n=c["dimensions-"+t];switch(r){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+i}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return n[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+i}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width/2-n[t].percentage.width/2})).attr("dy",(function(e,t){return n[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,r){return c.computeLinePosition(e,r)}))},computeLinePosition:function(e,t){var r,i,n,s,o=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),a=l.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,o),u=e.outerLabelGroupData[t].h/5,c=6,d=Math.floor(o/90),p=4;switch(2===d&&180===o&&(d=1),d){case 0:r=e.outerLabelGroupData[t].x-c-(e.outerLabelGroupData[t].x-c-a.x)/2,i=e.outerLabelGroupData[t].y+(a.y-e.outerLabelGroupData[t].y)/p,n=e.outerLabelGroupData[t].x-c,s=e.outerLabelGroupData[t].y-u;break;case 1:r=a.x+(e.outerLabelGroupData[t].x-a.x)/p,i=a.y+(e.outerLabelGroupData[t].y-a.y)/p,n=e.outerLabelGroupData[t].x-c,s=e.outerLabelGroupData[t].y-u;break;case 2:var m=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;r=a.x-(a.x-m)/p,i=a.y+(e.outerLabelGroupData[t].y-a.y)/p,n=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,s=e.outerLabelGroupData[t].y-u;break;case 3:var g=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;r=g+(a.x-g)/p,i=e.outerLabelGroupData[t].y+(a.y-e.outerLabelGroupData[t].y)/p,n=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,s=e.outerLabelGroupData[t].y-u}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:a.x,y:a.y},{x:n,y:s}]:e.lineCoordGroups[t]=[{x:a.x,y:a.y},{x:r,y:i},{x:n,y:s}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),r=o.line().curve(o.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",r).attr("stroke",(function(t,r){return"segment"===e.options.labels.lines.color?e.options.colors[r]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,r){var i=e.options.labels.outer.hideWhenLessThanPercentage;return null!==i&&t.percentage<i||""===e.options.data.content[r].label?0:1}))},positionLabelGroups:function(e,t){"none"!==e.options.labels[t].format&&e.__labels[t].style("opacity",(function(r,i){var n=e.options.labels[t].hideWhenLessThanPercentage;return null!==n&&r.percentage<n?0:1})).attr("transform",(function(r,i){var n,o;if("outer"===t)n=e.outerLabelGroupData[i].x,o=e.outerLabelGroupData[i].y;else{var u=a(!0,{},e.pieCenter);if(e.innerRadius>0){var c=f.getSegmentAngle(i,e.options.data.content,e.totalSize,{midpoint:!0}),d=l.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,c);u.x=d.x,u.y=d.y}var p=s.getDimensions(e.cssPrefix+"labelGroup"+i+"-inner"),m=p.w/2,g=p.h/4;n=u.x+(e.lineCoordGroups[i][0].x-u.x)/1.8,o=u.y+(e.lineCoordGroups[i][0].y-u.y)/1.8,n-=m,o+=g}return"translate("+n+","+o+")"}))},getIncludes:function(e){var t=!1,r=!1,i=!1;switch(e){case"label":t=!0;break;case"value":r=!0;break;case"percentage":i=!0;break;case"label-value1":case"label-value2":t=!0,r=!0;break;case"label-percentage1":case"label-percentage2":t=!0,i=!0}return{mainLabel:t,value:r,percentage:i}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,r){return c.getIdealOuterLabelPositions(e,r)})),c.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;c.checkConflict(e,0,"clockwise",t),c.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,r,i){var n,o;if(!(i<=1)){var a=e.outerLabelGroupData[t].hs;if(("clockwise"!==r||"right"===a)&&("anticlockwise"!==r||"left"===a)){var l="clockwise"===r?t+1:t-1,u=e.outerLabelGroupData[t],d=e.outerLabelGroupData[l],f={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===r){for(n=0;n<=t;n++)if(o=e.outerLabelGroupData[n],!c.isLabelHidden(e,n)&&s.rectIntersect(o,d)){c.adjustLabelPos(e,l,u,f);break}}else for(n=i-1;n>=t;n--)if(o=e.outerLabelGroupData[n],!c.isLabelHidden(e,n)&&s.rectIntersect(o,d)){c.adjustLabelPos(e,l,u,f);break}c.checkConflict(e,l,r,i)}}},isLabelHidden:function(e,t){var r=e.options.labels.outer.hideWhenLessThanPercentage;return null!==r&&d.percentage<r||""===e.options.data.content[t].label},adjustLabelPos:function(e,t,r,i){var n,s,o,a;a=r.y+i.heightChange,s=i.center.y-a,n=Math.abs(i.lineLength)>Math.abs(s)?Math.sqrt(i.lineLength*i.lineLength-s*s):Math.sqrt(s*s-i.lineLength*i.lineLength),o="right"===r.hs?i.center.x+n:i.center.x-n-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=o,e.outerLabelGroupData[t].y=a},getIdealOuterLabelPositions:function(e,t){var r=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(r){var i=r.getBBox(),n=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),s=e.pieCenter.x,o=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),a=l.rotate(s,o,e.pieCenter.x,e.pieCenter.y,n),u="right";n>180?(a.x-=i.width+8,u="left"):a.x+=8,e.outerLabelGroupData[t]={x:a.x,y:a.y,w:i.width,h:i.height,hs:u}}}},f={effectMap:{none:o.easeLinear,bounce:o.easeBounce,linear:o.easeLinear,sin:o.easeSin,elastic:o.easeElastic,back:o.easeBack,quad:o.easeQuad,circle:o.easeCircle,exp:o.easeExp},create:function(e){var t=e.pieCenter,r=e.options.colors,i=(e.options.effects.load,e.options.misc.colors.segmentStroke),n=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return l.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),s=o.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));n.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,r){return e.cssPrefix+"segment"+r})).attr("fill",(function(t,i){var n=r[i];return e.options.misc.gradient.enabled&&(n="url(#"+e.cssPrefix+"grad"+i+")"),n})).style("stroke",i).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",s),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,r){var i=0;return r>0&&(i=f.getSegmentAngle(r-1,e.options.data.content,e.totalSize)),"rotate("+i+")"})),e.arc=s},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,r){return e.cssPrefix+"grad"+r}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,r){return e.options.colors[r]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,r=o.select(this);if(r.attr("class")===e.cssPrefix+"arc")t=r.select("path");else{var i=r.attr("data-index");t=o.select("#"+e.cssPrefix+"segment"+i)}var n=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,n),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(n?f.closeSegment(e,t.node()):f.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,r,i=o.select(this);if(i.attr("class")===e.cssPrefix+"arc"?t=i.select("path"):(r=i.attr("data-index"),t=o.select("#"+e.cssPrefix+"segment"+r)),e.options.effects.highlightSegmentOnMouseover){r=t.attr("data-index");var n=e.options.colors[r];t.style("fill",s.getColorShade(n,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(r=t.attr("data-index"),m.showTooltip(e,r));var a=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,a)})),t.on("mousemove",(function(){m.moveTooltip(e)})),t.on("mouseout",(function(){var t,r,i=o.select(this);if(i.attr("class")===e.cssPrefix+"arc"?t=i.select("path"):(r=i.attr("data-index"),t=o.select("#"+e.cssPrefix+"segment"+r)),e.options.effects.highlightSegmentOnMouseover){r=t.attr("data-index");var n=e.options.colors[r];e.options.misc.gradient.enabled&&(n="url(#"+e.cssPrefix+"grad"+r+")"),t.style("fill",n)}e.options.tooltips.enabled&&(r=t.attr("data-index"),m.hideTooltip(e,r));var s=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,s)}))},onSegmentEvent:function(e,t,r,i){if(s.isFunction(t)){var n=parseInt(r.attr("data-index"),10);t({segment:r.node(),index:n,expanded:i,data:e.options.data.content[n]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,f.maybeCloseOpenSegment(e),o.select(t).transition().ease(f.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,r){var i=e.arc.centroid(t),n=i[0],s=i[1],o=Math.sqrt(n*n+s*s),a=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+n/o*a+","+s/o*a+")"})).on("end",(function(r,i){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,o.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&f.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){o.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(r,i){o.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,r,i){var n,s=a({compounded:!0,midpoint:!1},i),o=t[e].value;if(s.compounded){n=0;for(var l=0;l<=e;l++)n+=t[l].value}"undefined"===typeof n&&(n=o);var u=n/r*360;return s.midpoint&&(u-=o/r*360/2),u}},p={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,r=e.textComponents,i=e.options.header.location,n=e.options.misc.canvasPadding,s=e.options.size.canvasWidth,o=e.options.header.titleSubtitlePadding;t="top-left"===i?n.left:(s-n.right)/2+n.left,t+=e.options.misc.pieCenterOffset.x;var a=n.top+r.title.h;"pie-center"===i&&(a=e.pieCenter.y,r.subtitle.exists?a=a-(r.title.h+o+r.subtitle.h)/2+r.title.h:a+=r.title.h/4),e.__title.attr("x",t).attr("y",a)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,r=e.options.misc.canvasPadding,i=e.options.size.canvasWidth;t="top-left"===e.options.header.location?r.left:(i-r.right)/2+r.left,t+=e.options.misc.pieCenterOffset.x;var n=p.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",n)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,r=e.options.footer.location,i=e.textComponents.footer.w,n=e.options.size.canvasWidth,s=e.options.size.canvasHeight,o=e.options.misc.canvasPadding;t="bottom-left"===r?o.left:"bottom-right"===r?n-i-o.right:n/2,e.__footer.attr("x",t).attr("y",s-o.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var r=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-r/2+r:r+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var i=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-i)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},m={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,r){return e.cssPrefix+"tooltip"+r})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,r){var i=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(i=t.caption),m.replacePlaceholders(e,i,r,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,r){return s.getDimensions(e.cssPrefix+"tooltip"+r).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,r){return s.getDimensions(e.cssPrefix+"tooltip"+r).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,r){return-s.getDimensions(e.cssPrefix+"tooltip"+r).h/2+1}))},showTooltip:function(e,t){var r=e.options.tooltips.styles.fadeInSpeed;m.currentTooltip===t&&(r=1),m.currentTooltip=t,o.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(r).style("opacity",(function(){return 1})),m.moveTooltip(e)},moveTooltip:function(e){o.selectAll("#"+e.cssPrefix+"tooltip"+m.currentTooltip).attr("transform",(function(t){var r=o.pointer(this.parentNode);return"translate("+(r[0]+e.options.tooltips.styles.padding+2)+","+(r[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){o.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),o.select("#"+e.cssPrefix+"tooltip"+m.currentTooltip).attr("transform",(function(t,r){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,r,i){s.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(r,i);var n=function(){return function(e){var t=arguments[1];return i.hasOwnProperty(t)?i[arguments[1]]:arguments[0]}};return t.replace(/\{(\w+)\}/g,n(i))}},g=function(s,l){if(this.element=s,"string"===typeof s){var u=s.replace(/^#/,"");this.element=document.getElementById(u)}var c={};a(!0,c,i,l),this.options=c,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+r+"_",r++),n.initialCheck(this)&&(o.select(this.element).attr(e,t),b.call(this),h.call(this))};g.prototype.recreate=function(){n.initialCheck(this)&&(b.call(this),h.call(this))},g.prototype.redraw=function(){this.element.innerHTML="",h.call(this)},g.prototype.destroy=function(){this.element.innerHTML="",o.select(this.element).attr(e,null)},g.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(o.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},g.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||f.openSegment(this,o.select("#"+this.cssPrefix+"segment"+e).node())},g.prototype.closeSegment=function(){f.maybeCloseOpenSegment(this)},g.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var r=s.processObj(this.options,e);s.processObj(this.options,e,t),o.select("#"+this.cssPrefix+"title").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"header.subtitle.text":var i=s.processObj(this.options,e);s.processObj(this.options,e,t),o.select("#"+this.cssPrefix+"subtitle").html(t),(""===i&&""!==t||""!==i&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":s.processObj(this.options,e,t);break;default:s.processObj(this.options,e,t),this.destroy(),this.recreate()}};var b=function(){this.options.data.content=l.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=s.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=s.initSegmentColors(this),this.totalSize=l.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;t<this.options.data.content.length;t++)this.options.data.content[t].percentage=y(this.options.data.content[t].value,this.totalSize,e);for(var r=0,i=0;i<this.options.data.content.length;i++)i===this.options.data.content.length-1&&(this.options.data.content[i].percentage=(100-r).toFixed(e)),r+=parseFloat(this.options.data.content[i].percentage)},h=function(){this.svg=s.addSVGSpace(this),this.textComponents={headerHeight:0,title:{exists:""!==this.options.header.title.text,h:0,w:0},subtitle:{exists:""!==this.options.header.subtitle.text,h:0,w:0},footer:{exists:""!==this.options.footer.text,h:0,w:0}},this.outerLabelGroupData=[],p.addTitle(this),p.addSubtitle(this),p.addFooter(this);var e=this;p.positionFooter(e);var t=s.getDimensions(e.__footer.node());if(e.textComponents.footer.h=t.h,e.textComponents.footer.w=t.w,e.textComponents.title.exists){var r=s.getDimensions(e.__title.node());e.textComponents.title.h=r.h,e.textComponents.title.w=r.w}if(e.textComponents.subtitle.exists){var i=s.getDimensions(e.__subtitle.node());e.textComponents.subtitle.h=i.h,e.textComponents.subtitle.w=i.w}if(e.textComponents.title.exists||e.textComponents.subtitle.exists){var n=0;e.textComponents.title.exists&&(n+=e.textComponents.title.h,e.textComponents.subtitle.exists&&(n+=e.options.header.titleSubtitlePadding)),e.textComponents.subtitle.exists&&(n+=e.textComponents.subtitle.h),e.textComponents.headerHeight=n}if(l.computePieRadius(e),l.calculatePieCenter(e),p.positionTitle(e),p.positionSubtitle(e),e.options.misc.gradient.enabled&&f.addGradients(e),f.create(e),e.__labels={},c.add(e,"inner",e.options.labels.inner.format),c.add(e,"outer",e.options.labels.outer.format),c.positionLabelElements(e,"inner",e.options.labels.inner.format),c.positionLabelElements(e,"outer",e.options.labels.outer.format),c.computeOuterLabelCoords(e),c.positionLabelGroups(e,"outer"),c.computeLabelLinePositions(e),e.options.labels.lines.enabled&&"none"!==e.options.labels.outer.format&&c.addLabelLines(e),c.positionLabelGroups(e,"inner"),s.isFunction(e.options.callbacks.onload))try{e.options.callbacks.onload()}catch(o){}e.options.tooltips.enabled&&m.addTooltips(e),f.addSegmentEventHandlers(e)},y=function(e,t,r){var i=e/t;return r<=0?Math.round(100*i):(100*i).toFixed(r)};return g},void 0===(s="function"===typeof i?i.apply(t,n):i)||(e.exports=s)},49021:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e,t){var r=e.getDygraph(),i=r.getArea().h,n=r.canvas_ctx_,s=e.chart.getPayload().data[t];if(Array.isArray(s)){var o=r.toDomXCoord(s[0]),a=e.chart.getThemeAttribute("themeCrosshair");r.setSelection(t),n.save(),n.beginPath(),n.setLineDash([5,5]),n.strokeStyle=a,n.moveTo(o,0),n.lineTo(o,i),n.stroke(),n.closePath(),n.restore()}}},60579:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){var t,r,i,n,s=function(t,r,i){var n=i&&function(t,r){if(Array.isArray(r)){var i=t.offsetY;if(i>e.getDygraph().getArea().h-10)return"ANNOTATIONS";if(i<15)return"ANOMALY_RATE";for(var n=r[0],s=Math.abs(r[0].canvasy-i),o=1;o<r.length;o++){var a=Math.abs(r[o].canvasy-i);a<s&&(s=a,n=r[o])}return n.name}}(t,i);if(n){var s=e.getDygraph().getPropertiesForSeries(n);if(s){var o=e.chart.getPayloadDimensionIds();if(null!=o&&o.length){var a=o[s.column-1]||s.name;e.sdk.trigger("highlightHover",e.chart,r,a),e.chart.trigger("highlightHover",r,a)}}}},o=function(e,o,a){n!==o&&(i=a,n=o,t=e.offsetX,r=e.offsetY,s(e,o,a))},a=function(e){Math.abs(e.offsetX-t)<5&&Math.abs(e.offsetY-r)<5||(t=e.offsetX,r=e.offsetY,s(e,n,i))},l=function(){e.sdk.trigger("highlightBlur",e.chart),e.chart.trigger("highlightBlur")},u=function(){r=null,i=null,n=null,e.off("highlightCallback",o),e.off("mousemove",a)};return{toggle:function(t){return t?e.on("highlightCallback",o).on("mousemove",a).on("mouseout",l):u()},destroy:u}}},67514:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=m(r(7494)),n=m(r(58960)),s=m(r(81220)),o=m(r(93492)),a=r(93501),l=r(79635),u=r(56778),c=m(r(97962)),d=m(r(60579)),f=m(r(34613)),p=m(r(49021));function m(e){return e&&e.__esModule?e:{default:e}}function g(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.default=function(e,t){var r,m,b,h=(0,n.default)(e,t),v=null,_=[],O=null,w=null,A=null,P=null,k={line:(0,l.makeLinePlotter)(h),stackedBar:(0,l.makeStackedBarPlotter)(h),multiBar:(0,l.makeMultiColumnBarPlotter)(h),heatmap:(0,l.makeHeatmapPlotter)(h),default:null},j={yRangePad:30,strokeWidth:.7,fillAlpha:.2,fillGraph:!1,stackedGraph:!1,forceIncludeZero:!1,errorBars:!1,makeYAxisLabelFormatter:function(){return function(e,r,i,n){var s=n.axes_[0].extremeRange,o=n.axes_[0].valueRange||[null,null],a=o[0],l=o[1];return a=null===a?s[0]:a,l=null===l?s[1]:l,a===m&&l===b||(m=a,b=l,h.sdk.trigger("yAxisChange",t,a,l)),t.getConvertedValue(e)}},makeYTicker:function(){return u.numericTicker},highlightCircleSize:4},x={line:y(y({},j),{},{strokeWidth:1.5,fillAlpha:.2}),stacked:y(y({},j),{},{strokeWidth:.1,fillAlpha:.8,fillGraph:!0,stackedGraph:!0,forceIncludeZero:!0}),area:y(y({},j),{},{fillGraph:!0,forceIncludeZero:!0}),stackedBar:y(y({},j),{},{stackedGraph:!0,forceIncludeZero:!0}),heatmap:y(y({},j),{},{makeYAxisLabelFormatter:function(){return function(e){var r=t.getAttribute("min"),i=t.getAttribute("max");r===m&&i===b||(m=r,b=i,h.sdk.trigger("yAxisChange",t,r,i));var n=parseFloat(parseFloat(e).toFixed(5));return isNaN(n)?e:n}},makeYTicker:function(e){return function(t,r,i,n,s){return(0,u.heatmapTicker)(t,r,i,n,s,e)}},highlightCircleSize:0}),default:y({},j)},C=function(){var e=t.getPayload().labels,r=t.getAttributes(),n=r.chartType,s=r.includeZero,o=r.enabledXAxis,l=r.enabledYAxis,u=r.yAxisLabelWidth,c=k[n]||k.default,d=x[n]||x.default,f=d.strokeWidth,p=d.fillAlpha,m=d.fillGraph,g=d.stackedGraph,b=d.forceIncludeZero,h=d.makeYAxisLabelFormatter,v=d.errorBars,_=d.makeYTicker,O=d.highlightCircleSize,w=d.yRangePad,A=h(e),P=_?_(t.getVisibleDimensionIds()):null,j=t.getAttributes().selectedLegendDimensions,C=t.getPayloadDimensionIds();return{yRangePad:w,stackedGraph:g,fillGraph:m,fillAlpha:p,highlightCircleSize:O,strokeWidth:f,includeZero:s||b&&C.length>1&&j.length>1,stackedGraphNaNFill:"none",plotter:c,errorBars:v,axes:{x:o?{ticker:i.default.dateTicker,axisLabelFormatter:t.formatXAxis,axisLabelWidth:60}:{drawAxis:!1},y:l?y(y(y({},P&&{ticker:P}),{},{axisLabelFormatter:A},u&&{axisLabelWidth:u}),{},{pixelsPerLabel:15}):{drawAxis:!1}},ylabel:t.getAttribute("hasYlabel")&&t.getUnitSign({long:!0,withoutConversion:(0,a.isHeatmap)(n)})}},S=function(){var e=h.chart.getThemeAttribute("themeGridColor");return{axisLineColor:e,gridLineColor:e}},M=function(){var e=t.getPayloadDimensionIds(),r=t.getPayload().labels;if(null==e||!e.length||null==r||!r.length)return{visibility:!1};var i=r.length-e.length,n=Array(i>0?i:0).fill(!0),s=t.getAttribute("selectedLegendDimensions");return{visibility:[].concat(g(e.map(s.length?t.isDimensionVisible:function(){return!0})),g(n))}},D=function(){var e=t.getAttributes(),r=e.outOfLimits,i=e.getValueRange,n=e.staticValueRange,s=e.chartType,o=t.getPayload(),l=o.data,u=o.labels,c=t.getDateWindow(),d=r||0===l.length;return{file:d?[[0]]:l,labels:d?["X"]:u,dateWindow:c,valueRange:n||((0,a.isHeatmap)(s)?[0,t.getVisibleDimensionIds().length]:i(t,{dygraph:!0}))}},B=function(){return t.isSparkline()?{drawGrid:!1,drawAxis:!1,ylabel:void 0,yLabelWidth:0,highlightCircleSize:3,fillAlpha:1,strokeWidth:0}:null},E=function(){var e=t.getPayloadDimensionIds();return e.length?{colors:e.map(t.selectDimensionColor)}:{}},T=y(y({},h),{},{getChartWidth:function(){return v?v.getArea().w:h.getChartWidth()},getChartHeight:function(){return v?v.getArea().h:100},getPreceded:function(){if(!v)return-1;if(1e3*t.getFirstEntry()<v.xAxisRange()[0])return-1;var e=v.xAxisExtremes()[0];return v.toDomXCoord(e)},mount:function(e){if(!v){h.mount(e);var n=t.getAttribute("theme");e.classList.add(n);var u=t.getAttributes(),c=t.getPayload(),d=c.data,f=c.labels;r=(0,s.default)();var m=u.outOfLimits||0===d.length;v=new i.default(e,m?[[0]]:d,y(y(y(y(y(y({legend:"never",showLabelsOnHighlight:!1,labels:m?["X"]:f,dateWindow:t.getDateWindow(),highlightCallback:r.add((function(e,t,r,i,n){return h.trigger("highlightCallback",e,t,r,i,n)})),unhighlightCallback:r.add((function(){return h.trigger("unhighlightCallback")})),drawCallback:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["drawCallback"].concat(t))},underlayCallback:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["underlayCallback"].concat(t))})),interactionModel:{willDestroyContextMyself:!0,mouseout:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["mouseout"].concat(t))})),mousedown:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["mousedown"].concat(t))})),mousemove:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["mousemove"].concat(t))})),mouseover:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["mouseover"].concat(t))})),mouseup:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["mouseup"].concat(t))})),touchstart:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["touchstart"].concat(t))})),touchmove:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["touchmove"].concat(t))})),touchend:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["touchend"].concat(t))})),dblclick:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["dblclick"].concat(t))})),wheel:r.add((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.trigger.apply(h,["wheel"].concat(t))}))},series:{ANOMALY_RATE:{plotter:(0,l.makeAnomalyPlotter)(h),drawPoints:!1,pointSize:0,highlightCircleSize:0},ANNOTATIONS:{plotter:(0,l.makeAnnotationsPlotter)(h),drawPoints:!1,pointSize:0,highlightCircleSize:0}},strokeBorderWidth:0,axisLabelFontSize:u.axisLabelFontSize,axisLineWidth:1,gridLineWidth:1,maxNumberWidth:8,highlightSeriesBackgroundAlpha:1,drawGapEdgePoints:!0,ylabel:t.getAttribute("hasYlabel")&&t.getUnitSign({long:!0}),digitsAfterDecimal:t.getAttribute("unitsConversionFractionDigits")<0?0:t.getAttribute("unitsConversionFractionDigits"),yLabelWidth:12,yRangePad:30,labelsSeparateLines:!0,rightGap:-5},C()),S()),M()),D()),B()),E())),A=(0,o.default)(e,(function(){h.trigger("resize")})),w.toggle(u.enabledHover),O.toggle(u.enabledNavigation,u.navigation),_=[h.on("resize",r.add((function(){return v.resize()}))),t.onAttributeChange("hoverX",r.add((function(e){var r=e?t.getClosestRow(e[0]):-1;if(-1===r)return v.setSelection();(0,p.default)(T,r)}))),t.onAttributeChange("enabledHover",w.toggle),t.onAttributeChange("enabledNavigation",O.toggle),t.onAttributeChange("navigation",O.set),t.onAttributeChange("overlays",P.toggle),t.onAttributeChange("theme",(function(t,r){e.classList.remove(r),e.classList.add(t),v.updateOptions(S())})),t.onAttributeChange("chartType",(function(){t.getAttribute("processing")||v.updateOptions(C())})),t.onAttributeChange("selectedLegendDimensions",(function(){t.getAttribute("processing")||v.updateOptions(y(y(y(y({},M()),E()),C()),{},{digitsAfterDecimal:t.getAttribute("unitsConversionFractionDigits")<0?0:t.getAttribute("unitsConversionFractionDigits")}))})),t.onAttributeChange("unitsConversion",(function(){return v.updateOptions(y(y({},C()),{},{digitsAfterDecimal:t.getAttribute("unitsConversionFractionDigits")<0?0:t.getAttribute("unitsConversionFractionDigits")}))})),t.onAttributeChange("staticValueRange",(function(e){var r=e[0],i=e[1];v.updateOptions({valueRange:(0,a.isHeatmap)(u.chartType)?[Math.ceil(r),Math.ceil(i)]:u.getValueRange(t,{dygraph:!0})})})),t.onAttributeChange("timezone",(function(){return v.updateOptions({})}))].filter(Boolean),P.toggle(),h.trigger("resize"),h.render()}},unmount:function(){v&&(A(),r&&r.clear(),_.forEach((function(e){return e()})),_=[],h.unmount(),w.destroy(),O.destroy(),v.destroy(),v=null,P.destroy())},getDygraph:function(){return v},getXAxisRange:function(){var e;return null==(e=v)?void 0:e.xAxisRange()},render:function(){if(v){var e=t.getAttributes(), |