@syncfusion/ej2-treemap 30.2.4 → 31.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/ej2-treemap.min.js +3 -3
  2. package/dist/ej2-treemap.umd.min.js +3 -3
  3. package/dist/ej2-treemap.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-treemap.es2015.js +0 -4
  5. package/dist/es6/ej2-treemap.es2015.js.map +1 -1
  6. package/dist/es6/ej2-treemap.es5.js +0 -4
  7. package/dist/es6/ej2-treemap.es5.js.map +1 -1
  8. package/dist/global/ej2-treemap.min.js +3 -3
  9. package/dist/global/ej2-treemap.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/dist/ts/index.d.ts +4 -0
  12. package/dist/ts/index.ts +4 -0
  13. package/dist/ts/treemap/index.d.ts +19 -0
  14. package/dist/ts/treemap/index.ts +19 -0
  15. package/dist/ts/treemap/layout/legend.d.ts +137 -0
  16. package/dist/ts/treemap/layout/legend.ts +1095 -0
  17. package/dist/ts/treemap/layout/render-panel.d.ts +47 -0
  18. package/dist/ts/treemap/layout/render-panel.ts +758 -0
  19. package/dist/ts/treemap/model/base-model.d.ts +795 -0
  20. package/dist/ts/treemap/model/base.d.ts +671 -0
  21. package/dist/ts/treemap/model/base.ts +798 -0
  22. package/dist/ts/treemap/model/constants.d.ts +117 -0
  23. package/dist/ts/treemap/model/constants.ts +118 -0
  24. package/dist/ts/treemap/model/image-export.d.ts +34 -0
  25. package/dist/ts/treemap/model/image-export.ts +117 -0
  26. package/dist/ts/treemap/model/interface.d.ts +555 -0
  27. package/dist/ts/treemap/model/interface.ts +583 -0
  28. package/dist/ts/treemap/model/pdf-export.d.ts +36 -0
  29. package/dist/ts/treemap/model/pdf-export.ts +105 -0
  30. package/dist/ts/treemap/model/print.d.ts +45 -0
  31. package/dist/ts/treemap/model/print.ts +106 -0
  32. package/dist/ts/treemap/model/theme.d.ts +19 -0
  33. package/dist/ts/treemap/model/theme.ts +450 -0
  34. package/dist/ts/treemap/treemap-model.d.ts +374 -0
  35. package/dist/ts/treemap/treemap.d.ts +724 -0
  36. package/dist/ts/treemap/treemap.ts +1817 -0
  37. package/dist/ts/treemap/user-interaction/highlight-selection.d.ts +118 -0
  38. package/dist/ts/treemap/user-interaction/highlight-selection.ts +799 -0
  39. package/dist/ts/treemap/user-interaction/tooltip.d.ts +42 -0
  40. package/dist/ts/treemap/user-interaction/tooltip.ts +228 -0
  41. package/dist/ts/treemap/utils/enum.d.ts +256 -0
  42. package/dist/ts/treemap/utils/enum.ts +263 -0
  43. package/dist/ts/treemap/utils/helper.d.ts +543 -0
  44. package/dist/ts/treemap/utils/helper.ts +1453 -0
  45. package/package.json +52 -17
  46. package/src/treemap/treemap.d.ts +0 -1
  47. package/src/treemap/treemap.js +0 -4
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-treemap.min.js
3
- * version : 30.2.4
4
- * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
3
+ * version : 31.2.2
4
+ * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- this.ej=this.ej||{},this.ej.treemap=function(e,t,i,l,o){"use strict";function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e,i){var l=document.getElementById("treeMapMeasureText");return null===l&&(l=t.createElement("text",{id:"treeMapMeasureText"}),document.body.appendChild(l)),l.innerHTML=t.SanitizeHtmlHelper.sanitize(e),l.style.position="absolute",l.style.fontSize=i.size,l.style.fontWeight=i.fontWeight,l.style.fontStyle=i.fontStyle,l.style.fontFamily=i.fontFamily,l.style.visibility="hidden",l.style.top="-100",l.style.left="0",l.style.whiteSpace="nowrap",l.style.lineHeight="normal",new Ce(l.clientWidth,l.clientHeight)}function a(e,t,i){var l=t,o=r(t,i).width;if(o>e)for(var n=t.length-1;n>=0;--n)if(l=t.substring(0,n)+"...",(o=r(l,i).width)<=e||l.length<4)return l.length<4&&(l=" "),l;return l}function s(e,t,i,l){var o;switch(t){case"Near":o=e.x;break;case"Center":o="title"===l?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":o="title"===l?e.width-e.y-i.width:e.x+e.width-i.width}var n="title"===l?e.y+i.height/2:e.y+e.height/2+i.height/2;return new Te(o,n)}function d(e,t,i){var l=e.createText(t,i);return l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.style["user-select"]="none",l.style["-moz-user-select"]="none",l.style["-webkit-touch-callout"]="none",l.style["-webkit-user-select"]="none",l.style["-khtml-user-select"]="none",l.style["-ms-user-select"]="none",l.style["-o-user-select"]="none",l}function h(e,l,o,n,a){void 0===a&&(a=!1);var s,h,p,g={"font-size":l.size,"font-style":l.fontStyle,"font-family":l.fontFamily,"font-weight":l.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:l.opacity,"dominant-baseline":e.baseLine,id:e.id,x:e.x,y:e.y,fill:o},c="string"==typeof e.text?e.text:a?e.text[e.text.length-1]:e.text[0],m=new i.SvgRenderer("");if(!t.isNullOrUndefined(c)&&!t.isNullOrUndefined(e.connectorText)&&c.includes(e.connectorText[1]))for(var u=c.split("#"),f=0;f<u.length;f++){var y=-1===u[f].search(e.connectorText)||t.isNullOrUndefined(e.connectorText)?u[f]:e.connectorText;if(g.id=e.id+"_"+f,p=d(m,g,y),f%2==0&&0!==f){y=y.replace(/\s+/g,"&nbsp")}var v=r(y,l);g.x=0!==f?g.x+v.width:g.x+v.width+5,n.appendChild(p)}else p=d(m,g,c),n.appendChild(p);if("string"!=typeof e.text&&e.text.length>1){for(var S=1,x=e.text.length;S<x;S++)h=r(e.text[S],l).height,s=m.createTSpan({x:e.x,id:e.id,y:e.y+S*h},e.text[S]),p.appendChild(s);n.appendChild(p)}return p}function p(e,i,l){var o,n=e.split("_RectPath")[0];o=e.indexOf("_LabelTemplate")>-1?i:document.querySelector("#"+n+"_LabelTemplate"),t.isNullOrUndefined(o)||(o.innerHTML=l)}function g(e){return document.getElementById(e)}function c(e,t){return e.weight===t.weight?0:e.weight<t.weight?1:-1}function m(e,t,i,l){for(var o,n=!1,r="",a=l.leafItemSettings,s=0;s<e.length;s++){var d=i[o=l.levels[s]?l.levels[s].groupPath:a.labelPath?a.labelPath:l.weightValuePath]||"undefined";if(e[s]===d&&(r+=d+(s===e.length-1?"":"#"))===t){n=!0;break}}return n}function u(e){var t;if(e){var i=Object.keys(e);t={};for(var l=0;l<i.length;l++)if(e[i[l]]instanceof Array){t.values=e[i[l]],t.key=i[l];break}}return t}function f(e,t,i,l){if("Child"===i){t.push(e.levelOrderName);var o=u(e).values;if(o&&o.length>0){for(s=0;s<o.length;s++)-1===t.indexOf(o[s].levelOrderName)&&t.push(o[s].levelOrderName);for(var n=0;n<o.length;n++)f(o[n],t,i,l)}}else if("Parent"===i)"string"==typeof e.levelOrderName&&-1===t.indexOf(e.levelOrderName)&&(t.push(e.levelOrderName),f(e.parent,t,i,l));else if("All"===i)for(var r=e.levelOrderName.split("#")[0],a=void 0,s=0;s<l.layout.renderItems.length;s++)(a=l.layout.renderItems[s]).levelOrderName.indexOf(r)>-1&&-1===t.indexOf(a.levelOrderName)&&t.push(a.levelOrderName);else t.push(e.levelOrderName);return t}function y(e){var i=null;try{i="function"!=typeof e&&document.querySelectorAll(e).length?t.compile(document.querySelector(e).innerHTML.trim()):t.compile(e)}catch(l){i=t.compile(e)}return i}function v(e,i,l){var o=t.createElement("div",{id:i});o.style.cssText="position: absolute;pointer-events: auto;";for(var n=e.length;n>0;)o.appendChild(e[0]),n--;for(var r=o.innerHTML,a=Object.keys(l),s=0;s<a.length;s++){var d=RegExp;r=r.replace(new d("{{:"+a[s]+"}}","g"),l[a[s].toString()])}return o.innerHTML=r,o}function S(e,t,i,l,o){var n=new Te(0,0),r="Template"===l?o.areaRect.x:0,a="Template"===l?o.areaRect.y:0;return n.x=Math.abs(r-(t.indexOf("Left")>-1?e.x+5:t.indexOf("Right")>-1?e.x+e.width-i.width:e.x+(e.width/2-i.width/2)))-2,!o.enableDrillDown||"BottomLeftTopRight"!==o.renderDirection&&"BottomRightTopLeft"!==o.renderDirection?n.y=Math.abs(a-(t.indexOf("Top")>-1?"Template"===l?e.y:e.y+i.height:t.indexOf("Bottom")>-1?e.y+e.height-i.height:"Template"===l?e.y+(e.height/2-i.height/2):e.y+e.height/2+i.height/4)):n.y=Math.abs(e.y+e.height-i.height+5),n}function x(e,t){var i=new Ce(0,0);t.appendChild(e),i.height=e.offsetHeight,i.width=e.offsetWidth;var l=document.getElementById(e.id);return l.parentNode.removeChild(l),i}function b(e){return(e.width-e.x)*(e.height-e.y)}function I(e){var t=C(e),i=t.width,l=t.height;return Math.min(i,l)}function C(e){var t=e.x,i=e.y;return{x:t,y:i,width:e.width-t,height:e.height-i}}function F(e){var t=e.x,i=e.y;return{x:t,y:i,width:t+e.width,height:i+e.height}}function w(e,t,i){var l=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,a=i.ownerDocument.documentElement.clientLeft,s=l.left+o-a,d=l.top+n-r;return new Te(e-s,t-d)}function O(e,i,l){var o,n,r=[];if(t.isNullOrUndefined(i)&&t.isNullOrUndefined(l)&&isNaN(l))return null;for(var a=0;a<e.length;a++){var s=!1,d=l;t.isNullOrUndefined(e[a].from)||t.isNullOrUndefined(e[a].to)||t.isNullOrUndefined(e[a].value)?(t.isNullOrUndefined(e[a].from)||t.isNullOrUndefined(e[a].to))&&t.isNullOrUndefined(e[a].value)||(l>=e[a].from&&e[a].to>=l||e[a].value===i)&&(e[a].value===i&&(s=!0),o="[object Array]"===Object.prototype.toString.call(e[a].color)?s?e[a].color[0]:T(e[a],d):e[a].color):l>=e[a].from&&e[a].to>=l&&e[a].value===i&&(s=!0,o="[object Array]"===Object.prototype.toString.call(e[a].color)?s?e[a].color[0]:T(e[a],d):e[a].color),(l>=e[a].from&&l<=e[a].to||e[a].value===i)&&!t.isNullOrUndefined(e[a].minOpacity)&&!t.isNullOrUndefined(e[a].maxOpacity)&&o&&(n=L(e[a],l)),(""===o||t.isNullOrUndefined(o))&&t.isNullOrUndefined(e[a].from)&&t.isNullOrUndefined(e[a].to)&&t.isNullOrUndefined(e[a].minOpacity)&&t.isNullOrUndefined(e[a].maxOpacity)&&t.isNullOrUndefined(e[a].value)&&(o="[object Array]"===Object.prototype.toString.call(e[a].color)?e[a].color[0]:e[a].color),n=t.isNullOrUndefined(n)?"1":n,r.push(o)}for(var h=r.length-1;h>=0;h--)h=(o=r[h])?-1:h;return{fill:o,opacity:n}}function L(e,t){var i=1;return t>=e.from&&t<=e.to&&(i=(t-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity),i.toString()}function T(e,t){return N(e,t)}function M(e,t,i){return"#"+G(e)+G(t)+G(i)}function N(e,t){var i;return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:M((i=_(Number(t),e)).r,i.g,i.b)}function _(e,t){var i=t.from,l=t.to,o=0,n=l-i;o=(e-i)/n;var r,a;if(t.color.length<=2)r="#"===t.color[0].charAt(0)?t.color[0]:X(t.color[0]),a="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:X(t.color[t.color.length-1]);else{r="#"===t.color[0].charAt(0)?t.color[0]:X(t.color[0]),a="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:X(t.color[t.color.length-1]);for(var s=n/(t.color.length-1),d=t.color.length-1,h=[],p={},g=1;g<d;g++)p={b:i+g*s,color:t.color[g]},h.push(p);for(var c=0;c<h.length;c++)i<=e&&e<=h[c].b&&0===c?(a="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),o=e<h[c].b?1-Math.abs((e-h[c].b)/s):(e-h[c].b)/s):h[c].b<=e&&e<=l&&c===h.length-1&&(r="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),o=e<h[c].b?1-Math.abs((e-h[c].b)/s):(e-h[c].b)/s),c!==h.length-1&&c<h.length&&h[c].b<=e&&e<=h[c+1].b&&(r="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),a="#"===h[c+1].color.charAt(0)?h[c+1].color:X(h[c+1].color),o=Math.abs(e-h[c+1].b)/s)}return E(o,r,a)}function E(e,t,i){var l=i.split("#")[1],o=t.split("#")[1],n=D(e,parseInt(o.substr(0,2),16),parseInt(l.substr(0,2),16)),r=D(e,parseInt(o.substr(2,2),16),parseInt(l.substr(2,2),16)),a=D(e,parseInt(o.substr(4,2),16),parseInt(l.substr(4,2),16));return new Me(n,r,a)}function D(e,t,i){var l=i-t;return Math.round(t+l*e)}function P(e,t,i){for(var l,o=t.split(" "),n="",s=[],d=0,h=o.length;d<h;d++)l=o[d],r(n.concat(l),i).width<e?n=n.concat((""===n?"":" ")+l):""!==n?(s.push(a(e,n,i)),n=l):(s.push(a(e,l,i)),l=""),n&&d===h-1&&s.push(a(e,n,i));return s}function B(e,t,i){var l=[],o=0,n=r(t,i).width,a=t.length;if(e>=n)return l.push(t),l;for(var s=t.length;s>o;s--){var d=t.slice(o,s);if((n=r(d,i).width)<=e){if(l.push(d),o+=d.length,a===o)return l;s=a+1}}return l}function z(e,t,i,l){var o=r(i,l);return o.width>e||o.height>t?" ":i}function H(e,t){return e.itemArea===t.itemArea?0:e.itemArea<t.itemArea?1:-1}function R(e,t,i){var l=e.levelSelection;if(l)for(var o=0;o<l.length;o++)t.getAttribute("id")===l[o]||t.children[0].id===l[o]?t.childElementCount>0&&-1===t.children[0].id.indexOf("_Group")&&(t.children[0].setAttribute("class",i),A(t.childNodes[0],{border:e.selectionSettings.border,fill:e.selectionSettings.fill,opacity:e.selectionSettings.opacity})):t.setAttribute("class","")}function U(e,i){var l=e.legendId;if(l)for(var o=0;o<l.length;o++)if("Interactive"===e.legendSettings.mode){for(var n=0;n<i.childElementCount;n++)if(i.childNodes[n].id===l[o]||parseFloat(i.childNodes[n].id.split("Index_")[1])===parseFloat(l[o].split("Index_")[1])){var r=i.childNodes[n];r.setAttribute("fill",e.selectionSettings.fill),r.setAttribute("opacity",e.selectionSettings.opacity),-1===r.id.indexOf("Text")?(r.setAttribute("stroke-width",e.selectionSettings.border.width.toString()),r.setAttribute("stroke",e.selectionSettings.border.color)):(r.setAttribute("stroke",null),r.setAttribute("stroke-width",null))}}else{var a=document.getElementById(l[o]);t.isNullOrUndefined(a)||(a.setAttribute("fill",e.selectionSettings.fill),a.setAttribute("opacity",e.selectionSettings.opacity),-1===a.id.indexOf("Text")?(a.setAttribute("stroke",e.selectionSettings.border.color),a.setAttribute("stroke-width",e.selectionSettings.border.width.toString())):(a.setAttribute("stroke",null),a.setAttribute("stroke-width",null)))}}function k(e,i,l){for(var o,n=0;n<e.length;n++)A(o=t.isNullOrUndefined(e[n].childNodes[0])?e[n]:e[n].childNodes[0],l.layout.renderItems[parseFloat(o.id.split("_Item_Index_")[1])].options),e[n].classList.remove(i),n-=1}function A(e,i){e.setAttribute("opacity",i.opacity),t.isNullOrUndefined(i.fill)?e.setAttribute("fill","black"):e.setAttribute("fill",i.fill),e.setAttribute("stroke",i.border.color),e.setAttribute("stroke-width",i.border.width)}function W(e,i,l){if(t.isNullOrUndefined(e))return null;for(var o=0,n=Object.keys(i);o<n.length;o++){var r=n[o];e=e.split("${"+r+"}").join(j(i[r],l).toString())}return e}function j(e,t){return(t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e)||""}function V(e){return"#"+G(e.r)+G(e.g)+G(e.b)}function G(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function q(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new Me(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new Me(255,255,255)}function X(e){e="transparent"===e?"white":e;var t=document.getElementById("treeMapMeasureText");t.style.color=e;var i=(e=window.getComputedStyle(t).color).replace(/[()RGBrgba ]/g,"").split(",");return V(new Me(parseInt(i[0],10),parseInt(i[1],10),parseInt(i[2],10)))}function J(e,t,l,o,n){var r=new i.SvgRenderer(""),a=Y(e,l,t,n,o);return r["draw"+a.functionName](a.renderOption)}function Y(e,i,l,o,n){var r,a="Path",s=i.width,d=i.height,h=e.x,p=e.y,g=e.x+-s/2,c=e.y+-d/2;switch(l){case"Circle":case"Bubble":a="Ellipse",t.merge(o,{rx:s/2,ry:d/2,cx:h,cy:p});break;case"VerticalLine":r="M "+h+" "+(p+d/2)+" L "+h+" "+(p+-d/2),t.merge(o,{d:r});break;case"Diamond":r="M "+g+" "+p+" L "+h+" "+(p+-d/2)+" L "+(h+s/2)+" "+p+" L "+h+" "+(p+d/2)+" L "+g+" "+p+" z",t.merge(o,{d:r});break;case"Rectangle":r="M "+g+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+d/2)+" L "+g+" "+(p+d/2)+" L "+g+" "+(p+-d/2)+" z",t.merge(o,{d:r});break;case"Triangle":r="M "+g+" "+(p+d/2)+" L "+h+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+d/2)+" L "+g+" "+(p+d/2)+" z",t.merge(o,{d:r});break;case"InvertedTriangle":r="M "+(h+s/2)+" "+(p-d/2)+" L "+h+" "+(p+d/2)+" L "+(h-s/2)+" "+(p-d/2)+" L "+(h+s/2)+" "+(p-d/2)+" z",t.merge(o,{d:r});break;case"Pentagon":for(var m=void 0,u=void 0,f=0;f<=5;f++)m=s/2*Math.cos(Math.PI/180*(72*f)),u=s/2*Math.sin(Math.PI/180*(72*f)),r=0===f?"M "+(h+m)+" "+(p+u)+" ":r.concat("L "+(h+m)+" "+(p+u)+" ");r=r.concat("Z"),t.merge(o,{d:r});break;case"Star":r="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(o,{d:r});break;case"Cross":r="M "+g+" "+p+" L "+(h+s/2)+" "+p+" M "+h+" "+(p+d/2)+" L "+h+" "+(p+-d/2),t.merge(o,{d:r});break;case"Image":a="Image",t.merge(o,{href:n,height:d,width:s,x:g,y:c})}return{renderOption:o,functionName:a}}function Z(e,t){for(var i=!1,l=0;l<e.length;l++)if(t.levelOrderName===e[l].levelOrderName){i=!0;break}return i}function Q(e){if(e.length>0)for(var t=0;t<e.length;t++){var i=e[t];K(i.legendEle,i.oldFill,i.oldOpacity,i.oldBorderColor,i.oldBorderWidth)}}function $(e,i){if(e.length>0)for(var l=0;l<e.length;l++){var o=e[l],n=parseFloat(o.legendEle.id.split("_Index_")[1]),r=o.legendEle.id.indexOf("Text")>-1?o.legendEle.id.replace("_Text",""):o.legendEle.id,a="Interactive"===i.legendSettings.mode?document.getElementById(r):document.getElementById(i.element.id+"_Legend_Shape_Index_"+n),s="Interactive"===i.legendSettings.mode?document.getElementById(r+"_Text"):document.getElementById(i.element.id+"_Legend_Text_Index_"+n);t.isNullOrUndefined(a)||K(a,o.oldFill,o.oldOpacity,"none","0px"),t.isNullOrUndefined(s)||K(s,i.legendSettings.textStyle.color||i.themeStyle.legendTextColor,o.oldOpacity,null,null);for(var d=t.isNullOrUndefined(o.ShapeCollection)?0:o.ShapeCollection.Elements.length,h=0;h<d;h++){var p=document.getElementById(o.ShapeCollection.Elements[h].id);t.isNullOrUndefined(p)||K(p,o.shapeOldFill,o.shapeOldOpacity,o.shapeOldBorderColor,o.shapeOldBorderWidth)}}}function K(e,i,l,o,n){e.setAttribute("fill",i),e.setAttribute("opacity",l),t.isNullOrUndefined(o)||e.setAttribute("stroke",o),t.isNullOrUndefined(n)||e.setAttribute("stroke-width",n)}function ee(e,t,i){$(e,i),k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function te(e,i,l){for(var o,n=""!==l.rangeColorValuePath?l.rangeColorValuePath:null,r=!1,a=0;a<e&&!r;a++){var s=l.treeMapLegendModule.legendCollections[a].legendData.length;if(s>0){for(var d=0;d<s;d++)if(!t.isNullOrUndefined(n)&&l.leafItemSettings.colorMapping.length>0?l.treeMapLegendModule.legendCollections[a].legendData[d].data[n]===i.data[n]:l.treeMapLegendModule.legendCollections[a].legendData[d].levelOrderName===i.levelOrderName||i.levelOrderName.indexOf(l.treeMapLegendModule.legendCollections[a].legendName)>-1){o=a,r=!0;break}}else if(l.palette&&l.palette.length>0&&(l.treeMapLegendModule.legendCollections[a].levelOrderName===i.levelOrderName||i.levelOrderName.indexOf(l.treeMapLegendModule.legendCollections[a].levelOrderName)>-1)&&l.treeMapLegendModule.legendCollections[a].legendName===i.name){o=a;break}}return o}function ie(e,t,i,l,o,n,r){e.push({legendEle:l,oldFill:r[t].legendFill,oldOpacity:r[t].opacity,oldBorderColor:r[t].borderColor,oldBorderWidth:r[t].borderWidth,shapeElement:o,shapeOldFill:n[i].options.fill,shapeOldOpacity:n[i].options.opacity,shapeOldBorderColor:n[i].options.border.color,shapeOldBorderWidth:n[i].options.border.width})}function le(e,i,l,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:l}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function oe(e){var i=document.getElementById(e);return i?t.remove(i):null}function ne(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":t={backgroundColor:i,titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:re,legendBorderColor:"#000000",legendBorderWidth:0};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",labelFontFamily:re,fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",titleFontWeight:"Normal",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind":t={backgroundColor:"transparent",titleFontColor:"#374151",titleFontWeight:"Normal",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwinddark":t={backgroundColor:"transparent",titleFontColor:"#D1D5DB",titleFontWeight:"Normal",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontWeight:"Normal",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3":t={backgroundColor:"transparent",titleFontColor:"#111827",titleFontWeight:"600",subTitleFontColor:"#111827",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#111827",legendTextColor:"#111827",fontFamily:"Inter",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Inter",fontWeight:"400",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5":t={backgroundColor:"transparent",titleFontColor:"#212529",titleFontWeight:"400",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5dark":t={backgroundColor:"transparent",titleFontColor:"#DEE2E6",titleFontWeight:"400",subTitleFontColor:"#DEE2E6",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#DEE2E6",legendTextColor:"#DEE2E6",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",titleFontWeight:"Normal",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",titleFontWeight:"Normal",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3":t={backgroundColor:"transparent",titleFontColor:"#1C1B1F",titleFontWeight:"500",subTitleFontColor:"#1C1B1F",tooltipFillColor:"#313033",tooltipFontColor:"#F4EFF4",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#1C1B1F",legendTextColor:"#49454E",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3dark":t={backgroundColor:"transparent",titleFontColor:"#E6E1E5",titleFontWeight:"500",subTitleFontColor:"#E6E1E5",tooltipFillColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#E6E1E5",legendTextColor:"#CAC4D0",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2":t={backgroundColor:"transparent",titleFontColor:"#242424",titleFontWeight:"600",subTitleFontColor:"#242424",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#242424",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#242424",legendTextColor:"#242424",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#292929",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2highcontrast":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#FFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",tooltipBorderWidth:1};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontWeight:"Normal",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#353535",legendTextColor:"#353535",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:re,legendBorderColor:"#000000",legendBorderWidth:0}}return t}var re="Roboto, Segoe UI, Noto, Sans-serif",ae=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function l(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(l.prototype=i.prototype,new l)}}(),se=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property("#808080")],i.prototype,"color",void 0),se([t.Property(0)],i.prototype,"width",void 0),i}(t.ChildProperty),he=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(10)],i.prototype,"left",void 0),se([t.Property(10)],i.prototype,"right",void 0),se([t.Property(10)],i.prototype,"top",void 0),se([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),pe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"size",void 0),se([t.Property(null)],i.prototype,"color",void 0),se([t.Property(re)],i.prototype,"fontFamily",void 0),se([t.Property("")],i.prototype,"fontWeight",void 0),se([t.Property("Normal")],i.prototype,"fontStyle",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property("")],i.prototype,"text",void 0),se([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),ce=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Complex({fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),i}(ge),me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Complex({fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),se([t.Complex({},ce)],i.prototype,"subtitleSettings",void 0),i}(ge),ue=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"from",void 0),se([t.Property(null)],i.prototype,"to",void 0),se([t.Property(null)],i.prototype,"color",void 0),se([t.Property(null)],i.prototype,"label",void 0),se([t.Property(null)],i.prototype,"value",void 0),se([t.Property(null)],i.prototype,"minOpacity",void 0),se([t.Property(null)],i.prototype,"maxOpacity",void 0),se([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),fe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"visible",void 0),se([t.Property("Default")],i.prototype,"mode",void 0),se([t.Property("transparent")],i.prototype,"background",void 0),se([t.Property("Circle")],i.prototype,"shape",void 0),se([t.Property("")],i.prototype,"width",void 0),se([t.Property("")],i.prototype,"height",void 0),se([t.Complex({size:null,fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(15)],i.prototype,"shapeWidth",void 0),se([t.Property(15)],i.prototype,"shapeHeight",void 0),se([t.Property(10)],i.prototype,"shapePadding",void 0),se([t.Property(null)],i.prototype,"imageUrl",void 0),se([t.Complex({color:null,width:null},de)],i.prototype,"border",void 0),se([t.Complex({color:"#000000",width:0},de)],i.prototype,"shapeBorder",void 0),se([t.Complex({},ge)],i.prototype,"title",void 0),se([t.Complex({size:null,fontFamily:null,fontWeight:null},pe)],i.prototype,"titleStyle",void 0),se([t.Property("Bottom")],i.prototype,"position",void 0),se([t.Property("None")],i.prototype,"orientation",void 0),se([t.Property(!1)],i.prototype,"invertedPointer",void 0),se([t.Property("After")],i.prototype,"labelPosition",void 0),se([t.Property("None")],i.prototype,"labelDisplayMode",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),se([t.Property({x:0,y:0})],i.prototype,"location",void 0),se([t.Property(null)],i.prototype,"showLegendPath",void 0),se([t.Property(null)],i.prototype,"valuePath",void 0),se([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),i}(t.ChildProperty),ye=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"groupIndex",void 0),se([t.Property(null)],i.prototype,"groupName",void 0),i}(t.ChildProperty),ve=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(!1)],i.prototype,"autoFill",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property(0)],i.prototype,"gap",void 0),se([t.Property(10)],i.prototype,"padding",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(!0)],i.prototype,"showLabels",void 0),se([t.Property(null)],i.prototype,"labelPath",void 0),se([t.Property(null)],i.prototype,"labelFormat",void 0),se([t.Property("TopLeft")],i.prototype,"labelPosition",void 0),se([t.Complex({color:null,size:null,fontFamily:null},pe)],i.prototype,"labelStyle",void 0),se([t.Property(null)],i.prototype,"labelTemplate",void 0),se([t.Property("Center")],i.prototype,"templatePosition",void 0),se([t.Property("Trim")],i.prototype,"interSectAction",void 0),se([t.Collection([],ue)],i.prototype,"colorMapping",void 0),i}(t.ChildProperty),Se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"visible",void 0),se([t.Property("")],i.prototype,"template",void 0),se([t.Property(null)],i.prototype,"format",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(.75)],i.prototype,"opacity",void 0),se([t.Property(["Circle"])],i.prototype,"markerShapes",void 0),se([t.Complex({width:null,color:null},de)],i.prototype,"border",void 0),se([t.Complex({fontFamily:null,size:null,fontWeight:null,opacity:null},pe)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),xe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"enable",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property("0.5")],i.prototype,"opacity",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property("Item")],i.prototype,"mode",void 0),i}(t.ChildProperty),be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"enable",void 0),se([t.Property("#808080")],i.prototype,"fill",void 0),se([t.Property("0.5")],i.prototype,"opacity",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property("Item")],i.prototype,"mode",void 0),i}(t.ChildProperty),Ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"groupPath",void 0),se([t.Property(0)],i.prototype,"groupGap",void 0),se([t.Property(10)],i.prototype,"groupPadding",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(!1)],i.prototype,"autoFill",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(!0)],i.prototype,"showHeader",void 0),se([t.Property(20)],i.prototype,"headerHeight",void 0),se([t.Property(null)],i.prototype,"headerTemplate",void 0),se([t.Property(null)],i.prototype,"headerFormat",void 0),se([t.Property("Near")],i.prototype,"headerAlignment",void 0),se([t.Complex({color:null,size:"13px",fontFamily:null},pe)],i.prototype,"headerStyle",void 0),se([t.Property("TopLeft")],i.prototype,"templatePosition",void 0),se([t.Collection([],ue)],i.prototype,"colorMapping",void 0),i}(t.ChildProperty),Ce=function(){function e(e,t){this.width=e,this.height=t}return e}(),Fe=function(){function e(e,t,i,l){this.x=e,this.y=t,this.width=i,this.height=l}return e}(),we=function(){function e(e,t,i,l,o,n){this.y=o.y,this.x=o.x,this.height=o.height,this.width=o.width,this.id=e,this.fill=t,this.opacity=l,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=n}return e}(),Oe=function(){function e(e,t,i,l,o,n,r){this.id=e,this.opacity=o,this.fill=t,this.stroke=l,this["stroke-width"]=i,this["stroke-dasharray"]=n,this.d=r}return e}(),Le=function(){function e(e,t,i,l,o,n,r,a){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=o,this.transform=n,this.anchor=l,this.x=t,this.y=i,this.baseLine=r,this.connectorText=a}return e}(),Te=function(){function e(e,t){this.x=e,this.y=t}return e}(),Me=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),Ne=function(){function e(e,t,i,l,o){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=l,this.sendData=o}return e}(),_e=function(){function e(e){this.treemap=e}return e.prototype.processLayoutPanel=function(){var e,i;if(this.treemap.treemapLevelData.levelsData&&this.treemap.treemapLevelData.levelsData.length>0)if(e=t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||t.isNullOrUndefined(this.treemap.initialDrillDown.groupName)||(t.isNullOrUndefined(this.treemap.drilledItems)?!t.isNullOrUndefined(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?this.treemap.treemapLevelData.levelsData[0]:this.getDrilldownData(this.treemap.treemapLevelData.levelsData[0],[])[0],i=t.extend({},this.treemap.areaRect,i,!1),t.isNullOrUndefined(this.treemap.treeMapLegendModule)||t.isNullOrUndefined(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(i=this.treemap.totalRect),t.isNullOrUndefined(this.treemap.currentLevel)||(t.isNullOrUndefined(this.treemap.drilledItems)?t.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length))!t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)&&(t.isNullOrUndefined(this.treemap.drilledItems)?t.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(e||this.treemap.treemapLevelData.levelsData[0],i),this.renderLayoutItems();else{var l=this.treemap.drilledItems.length-1,o=this.treemap.drilledItems[l].data,n={};n[this.treemap.drilledItems[l].data.groupName]=[o],t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[l].data.groupIndex),this.calculateLayoutItems(n||this.treemap.treemapLevelData.levelsData[0],i),this.renderLayoutItems()}},e.prototype.getDrilldownData=function(e,t){var i=this.treemap,l={},o=u(e).values;if(o&&o.length>0&&0===t.length){for(var n=0;n<o.length;n++)o[n].groupIndex===i.initialDrillDown.groupIndex&&o[n].name===i.initialDrillDown.groupName&&(o[n].isDrilled=!0,l[o[n].groupName]=[o[n]],t.push(l));for(var r=0;r<o.length;r++)this.getDrilldownData(o[r],t)}return t},e.prototype.calculateLayoutItems=function(e,i){this.renderItems=[],this.parentData=[],t.isNullOrUndefined(this.treemap.weightValuePath)||(this.treemap.layoutType.indexOf("SliceAndDice")>-1?this.computeSliceAndDiceDimensional(e,i):(i.height=i.height+i.y,i.width=i.width+i.x,this.computeSquarifyDimensional(e,i)))},e.prototype.computeSliceAndDiceDimensional=function(e,t){var i,l,o,n,r=this.treemap.leafItemSettings,a=this.treemap.levels,s=u(e).values;if(s&&s.length>0&&(this.sliceAndDiceProcess(s,t),this.treemap.levels.length>0))for(var d=0;d<s.length;d++)l=s[d].groupIndex,o=0===a.length||l===a.length?r.gap:a[l].groupGap,n=0===a.length?0:a[l]?a[l].showHeader?a[l].headerHeight:0:a[l-1].showHeader?a[l-1].headerHeight:0,i=s[d].rect,i=new Fe(i.x+o/2,i.y+(n+o/2),i.width-o,Math.abs(i.height-(o+n))),this.computeSliceAndDiceDimensional(s[d],i);return e},e.prototype.sliceAndDiceProcess=function(e,i){var l,o=i.height*i.width,n=this.treemap.levels,r=0,a=0;e.forEach(function(e){a+=e.weight}),e.forEach(function(e){e.weightArea=o*e.weight/a});var s="SliceAndDiceAuto"===this.treemap.layoutType?i.width>i.height:"SliceAndDiceHorizontal"===this.treemap.layoutType;e.sort(c);for(var d=0;d<e.length;d++){var h=e[d];h.isLeafItem=0===n.length||(this.treemap.isHierarchicalData||t.isNullOrUndefined(this.treemap.leafItemSettings.labelPath)?h.groupIndex===n.length-1:h.groupIndex===this.treemap.levels.length),s?(l=o/a*e[d].weight/i.height,r<=i.width&&(e[d].rect=new Fe(r+i.x,i.y,l,i.height))):(l=o/a*e[d].weight/i.width,r<=i.height&&(e[d].rect=new Fe(i.x,r+i.y,i.width,l))),r+=l,this.renderItems.push(e[d])}},e.prototype.computeSquarifyDimensional=function(e,t){var i,l,o,n,r,a=this.treemap.leafItemSettings,s=this.treemap.levels,d=u(e).values;if(d&&d.length>0&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(d)),this.calculateChildrenLayout(e,d,t),this.treemap.levels.length>0))for(var h=0;h<d.length;h++)o=(l=d[h]).groupIndex,i=l.rect,n=(l.isLeafItem?a.padding:s[o].groupPadding)/2,r=this.treemap.isHierarchicalData?0===o&&l.isLeafItem?0:s[o]&&s[o].showHeader?s[o].headerHeight:0:0===s.length?0:s[o]&&s[o].showHeader?s[o].headerHeight:0,i=new Fe(i.x+n,i.y+(r+n),i.width-n,i.height-n),!l.isLeafItem&&l.weight>0&&this.computeSquarifyDimensional(d[h],i)},e.prototype.calculateChildrenLayout=function(e,t,i){this.computeTotalArea(t,b(i)),t.sort(H),this.performRowsLayout(t,[],i,[])},e.prototype.performRowsLayout=function(e,t,i,l){var o=e.length;if(0===o){c=this.getCoordinates(t,i);return m=l.concat(c)}var n=I(i),r=e[0],a=e.slice(1,o);if(this.aspectRatio(t,r,n)){var s=t.concat(r);return this.performRowsLayout(a,s,i,l)}for(var d=t.length,h=0,p=0;p<d;p+=1)h+=t[p].itemArea;var g=this.cutArea(i,h),c=this.getCoordinates(t,i),m=l.concat(c);return this.performRowsLayout(e,[],g,m)},e.prototype.aspectRatio=function(e,t,i){if(0===e.length)return!0;var l=e.concat(t);return this.findMaxAspectRatio(e,i)>=this.findMaxAspectRatio(l,i)},e.prototype.findMaxAspectRatio=function(e,t){for(var i=e.length,l=1/0,o=-1/0,n=0,r=0;r<i;r+=1){var a=e[r].itemArea;a<l&&(l=a),a>o&&(o=a),n+=a}return Math.max(Math.pow(t,2)*o/Math.pow(n,2),Math.pow(n,2)/(Math.pow(t,2)*l))},e.prototype.cutArea=function(e,t){var i=C(e),l=i.width,o=i.height,n=i.x,r=i.y;if(l>=o){var a=t/o;return F(d={x:n+a,y:r,width:l-a,height:o})}var s=t/l,d={x:n,y:r+s,width:l,height:o-s};return F(d)},e.prototype.getCoordinates=function(e,i){for(var l,o=C(i),n=o.width,r=o.height,a=o.x,s=o.y,d=e.length,h=this.treemap.levels,p=this.treemap.leafItemSettings,g=0,c=0;c<d;c+=1)g+=e[c].itemArea;for(var m,u,f,y=g/r,v=g/n,S=a,x=s,b=[],c=0;c<d;c+=1){var I=e[c];if(l=I.groupIndex,I.isLeafItem=0===h.length||(this.treemap.isHierarchicalData?l===h.length:!t.isNullOrUndefined(p.labelPath)&&l===h.length),u=Z(this.parentData[0],I),f=u?this.treemap.areaRect:I.parent.rect,m=I.isLeafItem?p.padding:h[l].groupPadding,n>=r){var F=x+I.itemArea/y;I.rect={x:S,y:x,width:S+y,height:F},x=F}else{var w=S+I.itemArea/v;I.rect={x:S,y:x,width:w,height:x+v},S=w}I.weight>0&&(u||Math.round(i.y+m/2)<=Math.round(f.y+(f.height-f.y))&&Math.round(i.x+m/2)<=Math.round(f.x+(f.width-f.x)))&&(this.renderItems.push(I),b.push(I))}return b},e.prototype.computeTotalArea=function(e,t){for(var i=e.length,l=[],o=0;o<i;o+=1){for(var n=e.length,r=0,a=0;a<n;a+=1)r+=e[a].weight;for(var s=t/r,d=void 0,h=0;h<n;h++)(d=e[h]).itemArea=d.weight*s,l.push(d)}return l},e.prototype.onDemandProcess=function(e){var i,l={};l=e[0].parent,this.treemap.currentLevel=l.isDrilled?l.groupIndex:null;var o={};t.isNullOrUndefined(l.groupName)?o=l:o[l.groupName]=[l],i=t.extend({},this.treemap.areaRect,i,!1),t.isNullOrUndefined(this.treemap.treeMapLegendModule)||t.isNullOrUndefined(this.treemap.totalRect)||(i=this.treemap.totalRect);for(var n=this.treemap.levels.length,r=0;r<n;r++)n===e[0].groupIndex?this.treemap.levels[n]=this.treemap.levels[r]:this.treemap.levels.splice(n-1,1);this.calculateLayoutItems(o,i),this.renderLayoutItems()},e.prototype.renderLayoutItems=function(){var e,i,l,o,n=this,r=this.treemap;this.renderer=r.renderer;var a,s,d,h,p,g,c,m,f,y,v,S,x,b=r.element.id,I=r.layoutType,F=this.treemap.leafItemSettings.interSectAction,w="",O=document.getElementById(r.element.id+"_Secondary_Element"),L=r.levels;this.layoutGroup=this.renderer.createGroup({id:b+"_TreeMap_"+I+"_Layout"});var T,M,N,_=t.createElement("div",{id:r.element.id+"_Label_Template_Group",className:"template"});_.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+r.areaRect.y+"px;left:"+r.areaRect.x+"px;height:"+r.areaRect.height+"px;width:"+r.areaRect.width+"px;";for(var E,D,P=!1,B=r.leafItemSettings,z=this,H=0;H<this.renderItems.length;H++)!function(I){if(c=z.renderItems[I],s=c.groupIndex,z.treemap.drillDownView&&t.isNullOrUndefined(z.treemap.currentLevel)&&s>0||z.treemap.drillDownView&&s>z.treemap.currentLevel+1)return"continue";h=c.rect,P=c.isLeafItem,y=b+"_Level_Index_"+s+"_Item_Index_"+I,T=z.renderer.createGroup({id:y+"_Group"}),S=(P?B.gap:L[s].groupGap)/2;var H=z.treemap.totalRect?r.legendSettings.visible?z.treemap.totalRect:C(z.treemap.totalRect):z.treemap.areaRect;"Squarified"===r.layoutType&&(h.width=Math.abs(h.x-h.width)-S,h.height=Math.abs(h.y-h.height)-S),"TopRightBottomLeft"===r.renderDirection?h.x=H.x+H.width-h.width-Math.abs(H.x-h.x):"BottomLeftTopRight"===r.renderDirection?h.y=H.y+H.height-h.height-Math.abs(H.y-h.y):"BottomRightTopLeft"===r.renderDirection&&(h.x=H.x+H.width-h.width-Math.abs(H.x-h.x),h.y=H.y+H.height-h.height-Math.abs(H.y-h.y)),l=z.getItemColor(P,c),g=l.fill,f=l.opacity,p=P?B.labelFormat:L[s].headerFormat;var U;if(i=P?B.showLabels:L[s].showHeader,s===z.treemap.currentLevel)if(z.treemap.enableBreadcrumb){D="#"+z.treemap.breadcrumbConnector+"#",U=c.levelOrderName.replace(/#/gi,D),U=0!==s?"#"+U:U}else U=c.name;else z.treemap.enableBreadcrumb&&(c.isDrilled=!1),U=c.name;m=W(p,c.data,z.treemap)||U||"undefined",E=u(c).values,m=!P&&E&&E.length>0&&z.treemap.enableDrillDown?c.isDrilled?r.enableRtl?m+" [-]":"[-] "+m:r.enableRtl?m+" [+]":"[+] "+m:m,r.enableHtmlSanitizer&&(m=t.SanitizeHtmlHelper.sanitize(m));var k=P?B.labelStyle.fontFamily:L[s].headerStyle.fontFamily;k=k||z.treemap.themeStyle.labelFontFamily;var A=P?B.labelStyle.size:L[s].headerStyle.size;A=A||z.treemap.themeStyle.labelFontSize;var j=P?B.labelStyle.fontWeight:L[s].headerStyle.fontWeight;j=j||z.treemap.themeStyle.fontWeight;var V=P?B.labelStyle.color:L[s].headerStyle.color,G=P?B.labelStyle.fontStyle:L[s].headerStyle.fontStyle,q=P?B.labelStyle.opacity:L[s].headerStyle.opacity;x={fontFamily:k,size:A,fontWeight:j,color:V,fontStyle:G,opacity:q},N=P?B.border:L[s].border,e=P?B.labelPosition:"Near"===L[s].headerAlignment?"TopLeft":"Center"===L[s].headerAlignment?"TopCenter":"TopRight",d=P?B.templatePosition:L[s].templatePosition,M=P?B.labelTemplate:L[s].headerTemplate,c.options={border:N,opacity:f,fill:g},o={cancel:!1,name:"itemRendering",treemap:z.treemap,text:m,currentItem:c,RenderItems:z.renderItems,options:c.options,textColor:x.color},z.treemap.trigger("itemRendering",o,function(l){if(!l.cancel){w=" M "+h.x+" "+h.y+" L "+(h.x+h.width)+" "+h.y+" L "+(h.x+h.width)+" "+(h.y+h.height)+" L "+h.x+" "+(h.y+h.height)+"z",a=new Oe(y+"_RectPath",g,N.width,N.color,f,null,w);var r=n.renderer.drawPath(a);T.appendChild(r),i&&(o.text!==m&&(o.text=W(o.text,c.data,n.treemap)||U),x.color=o.textColor?o.textColor:x.color,n.renderItemText(o.text.toString(),T,x,h,F,y,g,e,D)),M&&(v=n.renderTemplate(O,y,h,d,M,c,P),t.isNullOrUndefined(v)||(_.appendChild(v),n.treemap.renderReactTemplates())),T.setAttribute("aria-label",c.name),n.treemap.enableDrillDown&&!P||n.treemap.selectionSettings.enable||n.treemap.highlightSettings.enable?(T.setAttribute("role","button"),T.setAttribute("tabindex",n.treemap.tabIndex.toString()),T.style.outline="none",T.style.cursor=n.treemap.highlightSettings.enable&&!n.treemap.selectionSettings.enable&&n.treemap.enableDrillDown&&c.groupIndex===n.treemap.levels.length-1?"default":!n.treemap.highlightSettings.enable||n.treemap.selectionSettings.enable||n.treemap.enableDrillDown?"pointer":"default"):T.setAttribute("role","region"),R(n.treemap,T,"treeMapSelection"),n.layoutGroup.appendChild(T)}})}(H);_.childNodes.length>0&&O.appendChild(_),this.treemap.svgObject.appendChild(this.layoutGroup),R(this.treemap,this.layoutGroup,"treeMapSelection")},e.prototype.renderItemText=function(e,i,l,o,n,s,d,p,g){var c,m,u,f=[],y=[],v=0;if(f=-1!==e.indexOf("<br>")?e.split("<br>"):null,m=this.labelInterSectAction(o,e,l,n),c=r(f&&f[0]||m[0],l),this.treemap.enableRtl){var x=r(e,l),b=e.search("[+]")||e.search("[-]");if(o.width<x.width&&b>0){var I=e.substring(b-1,e.length),C=r("[+]",l);m[0]=a(o.width-C.width-5,m[0],l)+I}}var F=S(o,p,c,"Text",this.treemap);if(!t.isNullOrUndefined(f)){for(var w=[],O=null,L=[],T=0;T<f.length;T++)v+=(c=r(O=a(o.width-5,f[T],l),l)).height,L.push(c.width),w.push(O);m=w,c.width=Math.max.apply(null,L),c.height=v}if("WrapByWord"===n||"Wrap"===n||"Trim"===n){for(var M=0;M<m.length;M++)v+=(c=r(m[M],l)).height,o.height-5>v&&y.push(m[M]);if("Wrap"===n&&m.length!==y.length&&y.length){var N=y.length-1,_=y[N];_=_.substring(0,_.length-1)+"...",y.splice(N),"..."!==_&&y.push(_)}}else u=m,y.push(u);h(new Le(s+"_Text",F.x,F.y,"start",y,"","",g),l,l.color||this.getSaturatedColor(d),i)},e.prototype.getItemColor=function(e,i){var l=this.treemap,o=e?l.leafItemSettings.fill:l.levels[i.groupIndex].fill,n=e?l.leafItemSettings.opacity:l.levels[i.groupIndex].opacity;t.isNullOrUndefined(l.treemapLevelData.defaultLevelsData)||l.treemapLevelData.defaultLevelsData.length>0&&(l.treemapLevelData.levelsData=l.treemapLevelData.defaultLevelsData);var r=u(l.treemapLevelData.levelsData[0]).values,a=e?l.leafItemSettings.colorMapping:l.levels[i.groupIndex].colorMapping;if(a.length>0){var s=O(a,i.data[l.equalColorValuePath],i.data[l.rangeColorValuePath]);t.isNullOrUndefined(s)||(o=t.isNullOrUndefined(s.fill)?l.leafItemSettings.fill:s.fill,n=s.opacity)}else for(var d=0;d<r.length;d++)r[d].levelOrderName===i.levelOrderName.split("#")[0]&&(o=t.isNullOrUndefined(o)?t.isNullOrUndefined(l.colorValuePath)?t.isNullOrUndefined(i.options)?!t.isNullOrUndefined(l.palette)&&l.palette.length>0?l.palette[d%l.palette.length]:"#808080":i.options.fill:r[d].data[l.colorValuePath]:o);return{fill:o,opacity:n}},e.prototype.getSaturatedColor=function(e){var t=e,i=q(X(t="transparent"===t?window.getComputedStyle(document.body,null).backgroundColor:t));return Math.round((299*i.r+587*i.g+114*i.b)/1e3)>=128?"black":"white"},e.prototype.renderTemplate=function(e,i,l,o,n,r,a){var s=a?i+"_LabelTemplate":i+"_HeaderTemplate",d=a?"_LabelTemplate":"_HeaderTemplate";if(t.isNullOrUndefined(n.prototype)&&"string"==typeof n)for(var h=Object.keys(r.data),p=0;p<h.length;p++){var g=RegExp;n=n.replace(new g("{{:"+h[p]+"}}","g"),r.data[h[p].toString()])}this.treemap.enableHtmlSanitizer&&"string"==typeof n&&(n=t.SanitizeHtmlHelper.sanitize(n));var c;if(!t.isNullOrUndefined(document.getElementById(this.treemap.element.id+"_Secondary_Element"))){var m=S(l,o,x(c=v(y(n)(r.data,this.treemap,n,this.treemap.element.id+d,!1),s,r.data),e),"Template",this.treemap);c.style.left=m.x+"px",c.style.top=m.y+"px"}return c},e.prototype.labelInterSectAction=function(e,t,i,l){var o,n=e.width-10;switch(l){case"Hide":o=[z(n,e.height,t,i)];break;case"Trim":o=[a(n+3,t,i)];break;case"WrapByWord":o=P(n,t,i);break;case"Wrap":o=B(n,t,i)}return o},e.prototype.destroy=function(){this.treemap=null,this.currentRect=null,this.layoutGroup=null,this.renderer=null,this.renderItems=[],this.parentData=[]},e}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(e.Theme||(e.Theme={}));var Ee=function(){function e(e){}return e.prototype.print=function(e,i){var l=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no");l.moveTo(0,0),l.resizeTo(screen.availWidth,screen.availHeight);var o={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:"beforePrint"};e.trigger("beforePrint",o,function(){o.cancel||t.print(o.htmlContent,l)})},e.prototype.getHTMLContent=function(e,i){var l=t.createElement("div");if(i)i instanceof Array?i.forEach(function(e){l.appendChild(g(e).cloneNode(!0))}):i instanceof Element?l.appendChild(i.cloneNode(!0)):l.appendChild(g(i).cloneNode(!0));else{var o=e.element.cloneNode(!0),n=o.getElementsByTagName("svg")[0];if(!t.isNullOrUndefined(n)&&(n=n.childNodes[0],!t.isNullOrUndefined(n))){var r=n.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||n.setAttribute("fill","rgba(0, 0, 0, 1)"):n.setAttribute("fill","rgba(255,255,255, 1)")}l.appendChild(o)}return l},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),De=function(){function e(e){}return e.prototype.export=function(e,i,l,o){return new Promise(function(n,r){var a=t.createElement("canvas",{id:"ej2-canvas",attrs:{height:e.availableSize.height.toString(),width:e.availableSize.width.toString()}}),s=e.svgObject.cloneNode(!0),d=s.childNodes[0];if(!t.isNullOrUndefined(d)){var h=d.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h||s.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):s.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),g='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+s.outerHTML+"</svg>",c=window.URL.createObjectURL(new Blob("SVG"===i?[g]:[(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}));if("SVG"===i)o?le(l,i,c,p):n(null);else{var m=new Image,u=a.getContext("2d");m.onload=function(){u.drawImage(m,0,0),window.URL.revokeObjectURL(c),o?le(l,i,a.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"JPEG"===i?n(a.toDataURL("image/jpeg")):"PNG"===i&&n(a.toDataURL("image/png"))},m.src=c}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),Pe=function(){function e(e){}return e.prototype.export=function(e,i,l,n,r){return new Promise(function(i,a){var s=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});n=t.isNullOrUndefined(n)?o.PdfPageOrientation.Landscape:n;var d=e.svgObject.cloneNode(!0),h=d.childNodes[0];if(!t.isNullOrUndefined(h)){var p=h.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p||d.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):d.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var g=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(d)],{type:"image/svg+xml"})),c=new Image,m=s.getContext("2d");c.onload=function(){m.drawImage(c,0,0),window.URL.revokeObjectURL(g);var t=new o.PdfDocument,a=s.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");t.pageSettings.orientation=n,a=a.slice(a.indexOf(",")+1),t.pages.add().graphics.drawImage(new o.PdfBitmap(a),0,0,e.availableSize.width-60,e.availableSize.height),r?(t.save(l+".pdf"),t.destroy()):i(null)},c.src=g})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}(),Be=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function l(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(l.prototype=i.prototype,new l)}}(),ze=function(e,t,i,l){var o,n=arguments.length,r=n<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},He=function(e){function o(t,i){var l=e.call(this,t,i)||this;return l.isResize=!1,l.orientation="Horizontal",l.drilledItems=[],l.isHierarchicalData=!1,l.levelSelection=[],l.legendId=[],l}return Be(o,e),o.prototype.preRender=function(){var e=this;this.trigger("load",{treemap:this},function(){e.initPrivateVariable(),e.unWireEVents(),e.createSvg(),e.wireEVents(),e.setCulture()})},o.prototype.render=function(){this.renderElements()},o.prototype.renderElements=function(){this.treemapLevelData=new Re,this.treemapLevelData.levelsData=null,this.treemapLevelData.defaultLevelsData=null,this.treemapLevelData.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=ne(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),t.isNullOrUndefined(this.treemapLevelData.levelsData)||(this.treemapLevelData.defaultLevelsData=this.treemapLevelData.levelsData),this.processDataManager()},o.prototype.processDataManager=function(){var e,i,o,n,r=this;this.dataSource instanceof l.DataManager?(e=this.dataSource,i=this.query instanceof l.Query?this.query:new l.Query,e.executeQuery(i).then(function(e){r.dataSource=e.result,r.renderTreeMapElements()})):this.dataSource instanceof Ne?(n=this.dataSource,(o=new t.Fetch(n.dataOptions,n.type,n.contentType)).onSuccess=function(e){if(t.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type)r.dataSource=e,r.renderTreeMapElements();else{var i=new FileReader,l=r;i.onload=function(){e=JSON.parse(i.result.toString()),l.dataSource=e,l.renderTreeMapElements()},i.readAsText(e)}},o.send(n.sendData)):this.renderTreeMapElements()},o.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),!t.isNullOrUndefined(this.treeMapLegendModule)&&this.legendSettings.visible&&U(this,this.treeMapLegendModule.legendGroup),this.elementChange(),this.trigger("loaded",{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},o.prototype.createSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}t.isNullOrUndefined(this.renderer)&&(this.renderer=new i.SvgRenderer(this.element.id)),t.isNullOrUndefined(this.layout)&&(this.layout=new _e(this)),this.clearTemplate();var e=this.element.clientWidth,l=this.element.clientHeight;this.availableSize=new Ce(n(this.width,e)||e||600,n(this.height,l)||l||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},o.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-treemap").length;this.element.id="treemap_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.layout=new _e(this)},o.prototype.createSecondaryElement=function(){var e=document.getElementById(this.element.id+"_Secondary_Element");if(e&&e.childElementCount>0&&e.parentNode.removeChild(e),t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var i=t.createElement("div",{id:this.element.id+"_Secondary_Element"});i.style.cssText="position: absolute;z-index:1;",this.element.appendChild(i)}},o.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!t.isNullOrUndefined(this.svgObject)&&!t.isNullOrUndefined(document.getElementById(this.layout.layoutGroup.id))&&!t.isNullOrUndefined(document.getElementById(this.treeMapLegendModule.legendGroup.id))&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},o.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");if((this.border.width>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var l=new we(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new Fe(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(l))}else i&&i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},o.prototype.renderTitle=function(e,i,l,o){var n,d={color:e.textStyle.color,size:e.textStyle.size,fontFamily:e.textStyle.fontFamily,fontStyle:e.textStyle.fontStyle,fontWeight:e.textStyle.fontWeight,opacity:e.textStyle.opacity},p=this.availableSize.width-this.margin.right-this.margin.left;if(d.fontFamily=d.fontFamily||this.themeStyle.fontFamily,d.fontWeight=d.fontWeight||this.themeStyle.titleFontWeight,d.size=d.size||("title"===i?this.themeStyle.fontSize:this.themeStyle.subtitleFontSize),e.text){t.isNullOrUndefined(o)&&(o=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var g=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text,c=a(p,g,d),m=r(c,d),u=s(t.isNullOrUndefined(l)?new Fe(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):l,e.alignment,m,i),f=new Le(this.element.id+"_TreeMap_"+i,u.x,u.y,"start",c),y=new Fe(u.x,u.y,m.width,m.height),v=h(f,d,d.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),o);v.setAttribute("aria-label",e.description||g),v.setAttribute("role","region"),v.setAttribute("tabindex",this.tabIndex.toString()),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(n=this.availableSize.height-y.y-10-this.margin.bottom,this.areaRect=new Fe(this.margin.left,y.y+10,p,n)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",y,o):this.svgObject.appendChild(o)}else n=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new Fe(this.margin.left,this.margin.top,p,n)},o.prototype.processingData=function(){var e,i=this;if(this.dataSource=this.dataSource,!t.isNullOrUndefined(this.dataSource)&&this.dataSource.length>0&&this.weightValuePath){if(this.treemapLevelData.levelsData=[],this.dataSource.map(function(e){e[i.weightValuePath]=e[i.weightValuePath]?e[i.weightValuePath].toString():e[i.weightValuePath]}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var l={};l.level=0,e=this.leafItemSettings.labelPath,l[e]=[];for(n=0;n<this.dataSource.length;n++){var o=u(this.dataSource[n]).values;this.isHierarchicalData&&o&&o.length>0?o.forEach(function(t){t[e]&&l[e].push({groupIndex:0,name:t[e],levelOrderName:t[e].toString(),data:t,weight:t[i.weightValuePath]})}):this.dataSource[n][e]&&l[e].push({groupIndex:0,name:this.dataSource[n][e],levelOrderName:this.dataSource[n][e].toString(),data:this.dataSource[n],weight:this.dataSource[n][this.weightValuePath]})}this.treemapLevelData.levelsData.push(l)}else{if(this.isHierarchicalData){this.treemapLevelData.hierarchyData=[],this.treemapLevelData.hierarchyData=t.extend([],this.dataSource,this.treemapLevelData.hierarchyData,!0);for(var n=0;n<this.treemapLevelData.hierarchyData.length;n++)this.processHierarchicalData(this.treemapLevelData.hierarchyData[n],n);this.treemapLevelData.levelsData=this.treemapLevelData.hierarchyData}else this.processFlatJsonData(),this.treemapLevelData.levelsData.length>1&&this.reOrderLevelData(this.treemapLevelData.levelsData.length-1);e=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(this.treemapLevelData.levelsData[0][e],"Parent")}},o.prototype.checkIsHierarchicalData=function(){var e;this.dataSource=this.dataSource;for(var t=0;t<this.dataSource.length;t++){if((e=u(this.dataSource[t]).values)&&e.length){this.isHierarchicalData=!0;break}t===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},o.prototype.processHierarchicalData=function(e,i){var l,o,n,r=this,a={},s=this.leafItemSettings.labelPath?this.leafItemSettings.labelPath:this.weightValuePath;if(a=u(e),(l=a?a.values:null)&&l.length>0){n=a.key;for(var d=0;d<this.levels.length;d++)n===this.levels[d].groupPath&&(o=d);for(var h=0;h<l.length;h++){l[h].name=l[h][s],l[h].levelOrderName=(0===o?l[h].name:e.levelOrderName+"#"+l[h].name)+"";var p=l[h].levelOrderName,g=void 0;p.search("#")>0&&(g=p.split("#").length-1),l[h].groupIndex=t.isNullOrUndefined(o)?g===this.levels.length?this.levels.length:g:o,0!==o&&(l[h].parent=e),l[h].groupName=n,l[h].data=l[h],l[h].isDrilled=!1,l[h].weight=l[h][this.weightValuePath]}l.forEach(function(e){r.processHierarchicalData(e,i)})}if(i===this.treemapLevelData.hierarchyData.length-1){var c=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];if(!t.isNullOrUndefined(c)){for(var m=0;m<this.treemapLevelData.hierarchyData.length;m++)l=u(this.treemapLevelData.hierarchyData[m]).values,0!==m&&l&&(l.forEach(function(e){c.push(e)}),this.treemapLevelData.hierarchyData.splice(m,1),m-=1);c=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];for(var f=0;f<c.length;f++)a[this.levels[0].groupPath]=c,c[f].parent=a}}},o.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(this,e)},o.prototype.export=function(e,i,l,o){var n=this;return t.isNullOrUndefined(o)&&(o=!0),"PDF"===e&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(t,r){t(n.pdfExportModule.export(n,e,i,l,o))}):this.allowImageExport&&"PDF"!==e&&this.imageExportModule?new Promise(function(t,l){t(n.imageExportModule.export(n,e,i,o))}):null},o.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var e,i=[],l=0;l<this.levels.length+1;l++){e=this.levels[l]?this.levels[l].groupPath:this.leafItemSettings.labelPath;var o={};o.level=l,o[e]=[],this.treemapLevelData.levelsData.push(o);for(var n=0;n<this.dataSource.length;n++){var r={},a="";if(!t.isNullOrUndefined(e)){var s=this.dataSource[n][e];if(0!==l)for(var d=0;d<=l;d++){var h=this.levels[d]?this.levels[d].groupPath:e;a+=this.dataSource[n][h]+(d===l?"":"#")}i.length>0&&-1!==i.indexOf(a||s)||(r.name=s,r.levelOrderName=(a||s)+"",r.groupIndex=l,r.isDrilled=!1,r.groupName=e,r.data=this.dataSource[n],this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][e].push(r),i.push(a||s))}}}},o.prototype.reOrderLevelData=function(e){for(var i,l=this.levels[e]?this.levels[e].groupPath:this.leafItemSettings.labelPath,o=this.levels[e-1].groupPath,n=this.treemapLevelData.levelsData[e][l],r=this.treemapLevelData.levelsData[e-1][o],a=0;a<n.length;a++){i=n[a].levelOrderName;for(var s=0;s<r.length;s++)if(r[s][l]=t.isNullOrUndefined(r[s][l])?[]:r[s][l],this.IsChildHierarchy(i.split("#"),r[s].levelOrderName.split("#"))){t.isNullOrUndefined(n[a].parent)&&(n[a].parent=r[s]),r[s][l].push(n[a]);break}}this.findTotalWeight(this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][l],"Child"),this.treemapLevelData.levelsData.splice(e,1),e-1>0&&this.reOrderLevelData(e-1)},o.prototype.IsChildHierarchy=function(e,t){for(var i=!1,l=0;l<t.length;l++){if(e.length<l||t[l]!==e[l])return!1;i=!0}return i},o.prototype.findTotalWeight=function(e,t){for(var i,l,o,n=this,r={},a=this,s=0;s<e.length;s++)!function(s){i=0,o=e[s].groupName,l=e[s].levelOrderName.split("#"),a.dataSource.forEach(function(t){m(l,e[s].levelOrderName,t,n)&&(i+=parseFloat(t[n.weightValuePath]))}),"Parent"===t&&(r[o]=e,e[s].parent=r),e[s].weight=i}(s)},o.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.clickOnTreeMap),t.EventHandler.remove(this.element,"dblclick",this.doubleClickOnTreeMap),t.EventHandler.remove(this.element,"contextmenu",this.rightClickOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnTreeMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focusout",this.focusHandler),window.removeEventListener("resize",this.resizeEvent)},o.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.clickOnTreeMap,this),t.EventHandler.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),t.EventHandler.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnTreeMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focusout",this.focusHandler,this),this.resizeEvent=this.resizeOnTreeMap.bind(this),window.addEventListener("resize",this.resizeEvent),this.setStyle(this.element)},o.prototype.setStyle=function(e){e.style.overflow="hidden"},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("role","region"),this.element.setAttribute("tabindex",this.tabIndex.toString())},o.prototype.resizeOnTreeMap=function(e){var i=this;if(!this.isDestroyed){this.isResize=!0;var l={name:"resize",cancel:!1,previousSize:this.availableSize,currentSize:new Ce(0,0),treemap:this};this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSvg(),i.refreshing=!0,i.wireEVents(),l.currentSize=i.availableSize,i.trigger("resize",l,function(e){i.render(),i.refreshing=!1})},500))}},o.prototype.clickOnTreeMap=function(e){var i,l,o=this,n=e.target,r=n.id,a=n.innerHTML,s={cancel:!1,name:"click",treemap:this,mouseEvent:e};this.trigger("click",s),r.indexOf("_Item_Index")>-1&&(e.preventDefault(),l=parseFloat(r.split("_Item_Index_")[1]),i={cancel:!1,name:"itemClick",treemap:this,item:this.layout.renderItems[l],mouseEvent:e,groupIndex:this.layout.renderItems[l].groupIndex,groupName:this.layout.renderItems[l].name,text:a,contentItemTemplate:a},this.trigger("itemClick",i,function(e){e.text===a&&e.contentItemTemplate===a||(t.isNullOrUndefined(o.leafItemSettings.labelTemplate)?(e.text=W(e.text,e.item.data,e.treemap),n.textContent=e.text):p(r,n,e.contentItemTemplate))}));var d,h=(new Date).getMilliseconds();t.isNullOrUndefined(this.doubleClick)||(!t.isNullOrUndefined(d)&&h-d<500&&this.doubleClickOnTreeMap(e),d=h)},o.prototype.doubleClickOnTreeMap=function(e){var t={cancel:!1,name:"doubleClick",treemap:this,mouseEvent:e};this.trigger("doubleClick",t)},o.prototype.rightClickOnTreeMap=function(e){var t={cancel:!1,name:"rightClick",treemap:this,mouseEvent:e};this.trigger("rightClick",t)},o.prototype.mouseDownOnTreeMap=function(e){e.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),"touchstart"!==e.type&&"mousedown"!==e.type||(this.removeFocus("none"),e.preventDefault()),this.notify(t.Browser.touchStartEvent,e)},o.prototype.mouseMoveOnTreeMap=function(e){var i,l,o=e.target.id,n={cancel:!1,name:"mouseMove",treemap:this,mouseEvent:e};this.trigger("mouseMove",n);var r;this.removeFocus("none"),o.indexOf("_Item_Index")>-1?(r=u(l=this.layout.renderItems[parseFloat(o.split("_Item_Index_")[1])]).values,this.element.style.cursor=!l.isLeafItem&&r&&r.length>0&&this.enableDrillDown?"pointer":"auto",i={cancel:!1,name:"itemMove",treemap:this,item:l,mouseEvent:e},this.trigger("itemMove",i)):this.element.style.cursor="default",this.notify(t.Browser.touchMoveEvent,e)},o.prototype.calculateSelectedTextLevels=function(e,t){for(var i,l,o,n=t.levelOrderName.split("#"),r=0,a=Object.keys(n);r<a.length;r++)n[l=a[r]]===e&&(i=parseInt(l,10),o=e);return{drillLevel:i,currentLevelLabel:o,levelText:n}},o.prototype.calculatePreviousLevelChildItems=function(e,i,l){for(var o,n,r,a=0,s=this.layout.renderItems[0].levelOrderName.split("#").length,d=0;d<s;d++)r=0===d?e.levelText[d]:r+"#"+e.levelText[d];a=s>1?s:a;for(var h=0,p=Object.values(this.layout.renderItems);h<p.length;h++)(n=p[h]).levelOrderName.split("#")[0]===e.levelText[0]&&(o=0===a?t.isNullOrUndefined(r)?r:e.levelText[a]:l?r:r+"#"+e.levelText[a])===n.levelOrderName&&(this.drilledItems.push({name:n.levelOrderName,data:n}),l=!0,++a<=i.groupIndex&&(r=o=o+"#"+e.levelText[a]));return l},o.prototype.compareSelectedLabelWithDrillDownItems=function(e,t,i){var l,o={};return e.drillLevel+1===this.drilledItems[i].data.groupIndex?((l=this.drilledItems[i].data.parent).isDrilled=!0,o[l[this.drilledItems[i].data.groupName]]=[l],this.drilledItems.splice(i,this.drilledItems.length)):e.drillLevel!==this.drilledItems.length-1&&e.drillLevel!==t.groupIndex||(o[t.groupName]=[t]),o},o.prototype.mouseEndOnTreeMap=function(e){var i,l,o,n,r,a,s,d=this,h=e.target,p=h.id,g=!1,c={},m=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",f=this.element.id+"_Label_Template_Group";if(p.indexOf("_Item_Index")>-1&&this.enableDrillDown&&!this.drillMouseMove){e.cancelable&&e.preventDefault(),n=parseFloat(p.split("_Item_Index_")[1]),r=this.layout.renderItems[n];var y=h.textContent;if(this.enableBreadcrumb&&(s=this.calculateSelectedTextLevels(y,r),a=s.drillLevel,this.drillDownView||-1===y.search("[+]")||(g=this.calculatePreviousLevelChildItems(s,r,g))),0!==this.levels.length&&!r.isLeafItem&&u(r).values&&u(r).values.length>0){if(this.drilledItems.length>0){r=g?this.drilledItems[this.drilledItems.length-1].data:r;for(var v=0;v<this.drilledItems.length;v++){if(!t.isNullOrUndefined(a)){var S=this.drilledItems.length;if(c=this.compareSelectedLabelWithDrillDownItems(s,r,v),S!==this.drilledItems.length){v-=1;break}}if(r.levelOrderName===this.drilledItems[v].name&&!g&&t.isNullOrUndefined(a)){0===r.groupIndex&&r.parent[r.groupName]instanceof Array?(r.isDrilled=!r.isDrilled,r.isDrilled?c[r.groupName]=[r]:c=r.parent):(r.isDrilled=!1,r.parent.isDrilled=!0,r=r.parent,c[r.groupName]=[r]),this.drilledItems.splice(v,1),v-=1;break}v===this.drilledItems.length-1&&t.isNullOrUndefined(a)&&(r.isDrilled=!0,c[r.groupName]=[r])}}else r.isDrilled=!0,c[r.groupName]=[r];l={cancel:!1,name:"drillStart",treemap:this,element:h,groupIndex:this.enableBreadcrumb&&0!==this.drilledItems.length&&!t.isNullOrUndefined(a)?this.drilledItems[this.drilledItems.length-1].data.groupIndex:r.groupIndex,groupName:this.enableBreadcrumb&&0!==this.drilledItems.length&&!t.isNullOrUndefined(a)?this.drilledItems[this.drilledItems.length-1].data.name:r.name,rightClick:3===e.which,childItems:null,item:c},this.trigger("drillStart",l,function(e){if(d.currentLevel=r.isDrilled&&t.isNullOrUndefined(a)?r.groupIndex:!t.isNullOrUndefined(a)&&d.enableBreadcrumb&&r.isDrilled?a:null,!e.cancel){if(document.getElementById(m)){var l=document.getElementById(m);l.parentNode.removeChild(l)}if(i=t.extend({},d.areaRect,i,!0),d.legendSettings.visible&&!t.isNullOrUndefined(d.treeMapLegendModule)&&(t.isNullOrUndefined(c)||(d.treeMapLegendModule.legendGroup.textContent="",d.treeMapLegendModule.legendGroup=null,d.treeMapLegendModule.widthIncrement=0,d.treeMapLegendModule.heightIncrement=0,d.enableBreadcrumb&&!t.isNullOrUndefined(a)?d.drilledLegendItems={name:d.drilledItems[d.drilledItems.length-1].data.levelOrderName,data:d.drilledItems[d.drilledItems.length-1].data}:d.drilledLegendItems={name:r.levelOrderName,data:r},d.treeMapLegendModule.renderLegend()),i=t.isNullOrUndefined(d.totalRect)?i:d.totalRect),document.getElementById(f)){var o=document.getElementById(f);o.parentNode.removeChild(o)}t.isNullOrUndefined(e.childItems)||e.cancel?(d.layout.calculateLayoutItems(c,i),d.layout.renderLayoutItems()):d.layout.onDemandProcess(e.childItems)}}),o={cancel:!1,name:"drillEnd",treemap:this,renderItems:this.layout.renderItems},this.trigger("drillEnd",o),!g&&t.isNullOrUndefined(a)&&this.drilledItems.push({name:r.levelOrderName,data:r})}}this.mouseDown=!1,this.notify(t.Browser.touchEndEvent,e)},o.prototype.mouseLeaveOnTreeMap=function(e){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&($(this.treeMapHighlightModule.shapeHighlightCollection,this),this.treeMapHighlightModule.highLightId=""),this.removeFocus("")},o.prototype.keyUpHandler=function(e){if("Tab"===e.code){var t=e.target.id,i=document.getElementById(t);if(t.indexOf("Item_Index")>-1||t.indexOf("Legend")>-1)if(this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapHighlightModule&&this.highlightSettings.enable){i.style.setProperty("outline","none"),i.classList.add("keyboard-focused");var l=t.indexOf("_Legend_")>-1&&"Default"===this.legendSettings.mode?i.children[0]:i;this.treeMapHighlightModule.highlightOnMouseMove(l)}else this.removeFocus(""),i.style.outline="2px solid black",i.classList.add("keyboard-focused");else k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&$(this.treeMapHighlightModule.shapeHighlightCollection,this),this.removeFocus("none")}},o.prototype.keyDownHandler=function(e){var t=e.target.id,i=document.getElementById(t);if("Enter"===e.code){if(this.selectionSettings.enable&&(t.indexOf("Item_Index")>-1||t.indexOf("Legend")>-1)){var l=t.indexOf("_Legend_")>-1&&"Default"===this.legendSettings.mode?i.children[0]:i;this.treeMapSelectionModule.selectionOnMouseDown(l)}this.enableDrillDown&&i.childElementCount>0&&this.mouseEndOnTreeMap(e)}},o.prototype.focusHandler=function(e){var t=e.target.id;(!this.element.contains(e.relatedTarget)||t.indexOf("Item_Index")>-1&&e.relatedTarget.id.indexOf("Legend")>-1||t.indexOf("Legend")>-1&&e.relatedTarget.id.indexOf("Item_Index")>-1)&&(this.treeMapHighlightModule&&this.highlightSettings.enable?(k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),$(this.treeMapHighlightModule.legendHighlightCollection,this),this.treeMapHighlightModule.highLightId=""):this.removeFocus("none"))},o.prototype.removeFocus=function(e){var t=document.querySelector(".keyboard-focused");t&&(t.style.outline=e,t.classList.remove("keyboard-focused"))},o.prototype.selectItem=function(e,i){t.isNullOrUndefined(i)&&(i=!0);for(var l="",o=0;o<e.length;o++)o!==e.length-1?l+=e[o]+"#":l+=e[o];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(l,i)},o.prototype.requiredModules=function(){var e=[];return this.tooltipSettings.visible&&e.push({member:"treeMapTooltip",args:[this],name:"TreeMapTooltip"}),this.highlightSettings.enable&&e.push({member:"treeMapHighlight",args:[this],name:"TreeMapHighlight"}),this.selectionSettings.enable&&e.push({member:"treeMapSelection",args:[this],name:"TreeMapSelection"}),this.legendSettings.visible&&e.push({member:"treeMapLegend",args:[this],name:"TreeMapLegend"}),this.allowPrint&&e.push({member:"Print",args:[this,Ee],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this,De],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this,Pe],name:"PdfExport"}),e},o.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,l=0,o=Object.keys(e);l<o.length;l++)switch(o[l]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}i&&(this.createSvg(),this.renderElements())}},o.prototype.getModuleName=function(){return"treemap"},o.prototype.destroy=function(){this.unWireEVents(),oe("treeMapMeasureText"),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),e.prototype.destroy.call(this),this.areaRect=null,this.themeStyle=null,this.totalRect=null,this.drilledLegendItems=null,this.doubleTapTimer=null,this.treemapLevelData=null,this.resizeEvent=null,this.availableSize=null,this.intl=null,t.isNullOrUndefined(this.layout)||this.layout.destroy(),this.layout=null,this.renderer=null},o.prototype.removeSvg=function(){if(oe(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},o.prototype.getPersistData=function(){return""},ze([t.Property(!1)],o.prototype,"allowPrint",void 0),ze([t.Property(!1)],o.prototype,"allowImageExport",void 0),ze([t.Property(!1)],o.prototype,"allowPdfExport",void 0),ze([t.Property(null)],o.prototype,"width",void 0),ze([t.Property(null)],o.prototype,"height",void 0),ze([t.Complex({},de)],o.prototype,"border",void 0),ze([t.Complex({},he)],o.prototype,"margin",void 0),ze([t.Property(null)],o.prototype,"background",void 0),ze([t.Property("Material")],o.prototype,"theme",void 0),ze([t.Complex({},me)],o.prototype,"titleSettings",void 0),ze([t.Property("Squarified")],o.prototype,"layoutType",void 0),ze([t.Property(null)],o.prototype,"dataSource",void 0),ze([t.Property(null)],o.prototype,"query",void 0),ze([t.Property(null)],o.prototype,"weightValuePath",void 0),ze([t.Property("")],o.prototype,"rangeColorValuePath",void 0),ze([t.Property("")],o.prototype,"equalColorValuePath",void 0),ze([t.Property(null)],o.prototype,"colorValuePath",void 0),ze([t.Property([])],o.prototype,"palette",void 0),ze([t.Property("TopLeftBottomRight")],o.prototype,"renderDirection",void 0),ze([t.Property(!1)],o.prototype,"enableDrillDown",void 0),ze([t.Property(!1)],o.prototype,"enableBreadcrumb",void 0),ze([t.Property(" - ")],o.prototype,"breadcrumbConnector",void 0),ze([t.Property(!1)],o.prototype,"drillDownView",void 0),ze([t.Property(!1)],o.prototype,"enableHtmlSanitizer",void 0),ze([t.Complex({},ye)],o.prototype,"initialDrillDown",void 0),ze([t.Complex({},ve)],o.prototype,"leafItemSettings",void 0),ze([t.Collection([],Ie)],o.prototype,"levels",void 0),ze([t.Complex({},be)],o.prototype,"highlightSettings",void 0),ze([t.Complex({},xe)],o.prototype,"selectionSettings",void 0),ze([t.Complex({},Se)],o.prototype,"tooltipSettings",void 0),ze([t.Complex({},fe)],o.prototype,"legendSettings",void 0),ze([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),ze([t.Property(null)],o.prototype,"description",void 0),ze([t.Property(0)],o.prototype,"tabIndex",void 0),ze([t.Property(null)],o.prototype,"format",void 0),ze([t.Event()],o.prototype,"load",void 0),ze([t.Event()],o.prototype,"beforePrint",void 0),ze([t.Event()],o.prototype,"loaded",void 0),ze([t.Event()],o.prototype,"itemRendering",void 0),ze([t.Event()],o.prototype,"drillStart",void 0),ze([t.Event()],o.prototype,"drillEnd",void 0),ze([t.Event()],o.prototype,"itemSelected",void 0),ze([t.Event()],o.prototype,"itemHighlight",void 0),ze([t.Event()],o.prototype,"tooltipRendering",void 0),ze([t.Event()],o.prototype,"itemClick",void 0),ze([t.Event()],o.prototype,"itemMove",void 0),ze([t.Event()],o.prototype,"click",void 0),ze([t.Event()],o.prototype,"doubleClick",void 0),ze([t.Event()],o.prototype,"rightClick",void 0),ze([t.Event()],o.prototype,"mouseMove",void 0),ze([t.Event()],o.prototype,"resize",void 0),ze([t.Event()],o.prototype,"legendItemRendering",void 0),ze([t.Event()],o.prototype,"legendRendering",void 0),o=ze([t.NotifyPropertyChanges],o)}(t.Component),Re=function(){function e(){}return e}(),Ue=function(){function e(e){this.page=0,this.legendBorderRect=new Fe(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new Fe(0,0,0,0),this.treemap=e,this.addEventListener()}return e.prototype.renderLegend=function(){var e=this;this.page=0,this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement);var t={cancel:!1,name:"legendRendering",treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position};this.treemap.trigger("legendRendering",t,function(t){t.cancel||t._changePosition===e.treemap.legendSettings.position||(e.treemap.legendSettings.position=t._changePosition),e.calculateLegendBounds(),e.legendCollections.length>0&&e.drawLegend()})},e.prototype.calculateLegendBounds=function(){var e=this,i=this.treemap,l=i.legendSettings;if(this.findColorMappingLegendItems(i.treemapLevelData.levelsData[0]),(!t.isNullOrUndefined(this.treemap.palette)&&this.treemap.palette.length>0||!t.isNullOrUndefined(i.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(i.treemapLevelData.levelsData[0]),this.legendCollections.length>0){this.legendCollections.sort(function(e,t){return e.levelIndex>t.levelIndex?1:e.levelIndex<t.levelIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.groupIndex>t.groupIndex?1:e.groupIndex<t.groupIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.leafIndex>t.leafIndex?1:e.leafIndex<t.leafIndex?-1:0});var o=l.position,n=i.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(l.title.text):l.title.text,s=l.titleStyle,d=l.mode,h=0,p=0,g=0,c=0,m=l.shapeHeight,u=l.shapeWidth,f=[],y=[],v="None"===l.orientation?"Top"===o||"Bottom"===o||"Auto"===o&&i.availableSize.width<=i.availableSize.height?"Horizontal":"Vertical":l.orientation,S=l.width.length>1?l.width.indexOf("%")>-1?i.availableSize.width/100*parseFloat(l.width):parseFloat(l.width):null,x=l.height.length>1?l.height.indexOf("%")>-1?i.availableSize.height/100*parseFloat(l.height):parseFloat(l.height):null;s.fontFamily=s.fontFamily||i.themeStyle.fontFamily,s.fontWeight=s.fontWeight||i.themeStyle.titleFontWeight,s.size=s.size||i.themeStyle.subtitleFontSize;var b=r(n,s),I=0,C=0,F=l.shapePadding,w=l.textStyle;if(w.size=w.size||i.themeStyle.legendFontSize,w.fontFamily=w.fontFamily||i.themeStyle.fontFamily,w.fontWeight=w.fontWeight||i.themeStyle.fontWeight,"Default"===d){S=t.isNullOrUndefined(S)?i.areaRect.width:S,x=t.isNullOrUndefined(x)?i.areaRect.height:x;for(var O=0,L=0;L<this.legendCollections.length;L++){var T=this.legendCollections[L];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var M=r(i.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(T.legendName):T.legendName,w);if(this.textMaxWidth=Math.max(this.textMaxWidth,M.width),0===L)I=h=10+u/2,C=p=10+b.height+(m>M.height?m/2:M.height/4);else{var N=M.height>m?M.height:m;if("Horizontal"===v){var _=y[O-1].x+y[O-1].width+10+u;if(_+F+M.width>S){var E=(y[O-1].y>f[O-1].y+m/2?y[O-1].y:f[O-1].y+m/2)+10;E+N>x?(this.getPageChanged(),O=0,f=[],y=[],h=I,p=C):(h=f[0].x,p=E+N/2)}else h=_-u/2,p=f[O-1].y}else{var D=y[O-1].y>f[O-1].y+m/2?y[O-1].y:f[O-1].y+m/2;if(D+10+N>x){var P=y[O-1].x+this.textMaxWidth+10;P+F+M.width>S?(h=I,p=C,y=[],f=[],this.getPageChanged(),O=0):(h=P+u/2,p=f[0].y)}else h=f[O-1].x,p=D+10+m/2}}g=h+u/2+F,c=p+M.height/4,f.push({x:h,y:p}),y.push({x:g,y:c,width:M.width,height:M.height/2}),this.totalPages[this.page].Collection.push({DisplayText:T.legendName,element:T.gradientElement,Shape:{x:h,y:p},Text:{x:g,y:c},Fill:T.legendFill,Data:T.legendData,Rect:{x:f[O].x-u/2,y:f[O].y-m/2<c-M.height?f[O].y-m/2:c-M.height,width:Math.abs(f[O].x-u/2-(g+M.width)),height:m>M.height?m:M.height}}),O++}var B=this.totalPages[0].Collection;B.forEach(function(t,i){var l=new Fe(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(I=l.x,C=l.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(I-(l.x+l.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(C-(l.y+l.height)))}),S=this.widthIncrement<S?this.widthIncrement:S,x=this.heightIncrement<x?this.heightIncrement:x,this.legendItemRect={x:B[0].Rect.x,y:B[0].Rect.y,width:S,height:x}}else{var z=this.legendCollections.length,H="Horizontal"===v?t.isNullOrUndefined(S)?i.areaRect.width/z:S/z:t.isNullOrUndefined(S)?25:S,R="Horizontal"===v?t.isNullOrUndefined(x)?25:x:t.isNullOrUndefined(x)?i.areaRect.height/z:x/z;I=0,C=b.height+10;for(var U=l.labelPosition,k=0,A=0,W=l.labelDisplayMode,j=0,V=0,L=0;L<this.legendCollections.length;L++){I="Horizontal"===v?I+H:I,C="Horizontal"===v?C:C+R;var G=this.legendCollections[L].legendName,q=new Ce(0,0);"None"===W?q=r(G,w):"Trim"===W?q=r(G=a("Horizontal"===v?H:R,G,w),w):G="",j=Math.max(j,q.height),V=Math.max(V,q.width),q.width>0&&q.height>0&&("Horizontal"===v?(g=I+H/2,c="After"===U?C+R+q.height/2+10:C-10):(g="After"===U?I-q.width/2-10:I+H+q.width/2+10,c=C+R/2+q.height/4)),0===L&&(k="Horizontal"===v?I:"After"===U?g-q.width/2:I,A="Horizontal"===v?"After"===U?C:c-q.height/2:C),L===z-1&&(S="Horizontal"===v?Math.abs(I+H-k):H+V+10,x="Horizontal"===v?R+j/2+10:Math.abs(C+R-A)),this.legendRenderingCollections.push({fill:this.legendCollections[L].legendFill,x:I,y:C,width:H,height:R,element:this.legendCollections[L].gradientElement,text:G,textX:g,textY:c,textWidth:q.width,textHeight:q.height,data:this.legendCollections[L].legendData})}this.legendItemRect={x:k,y:A,width:S,height:x}}}},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.findColorMappingLegendItems=function(e){var t=u(e).values;if(t&&t.length>0&&(this.calculateLegendItems(t),this.treemap.levels.length>0))for(var i=0;i<t.length;i++)this.findColorMappingLegendItems(t[i])},e.prototype.findPaletteLegendItems=function(e){var i,l;if(!t.isNullOrUndefined(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!t.isNullOrUndefined(this.treemap.initialDrillDown.groupName)&&t.isNullOrUndefined(this.treemap.drilledLegendItems))for(var o=u(e).values,n=0;n<o.length;n++)if(o[n].Name===this.treemap.initialDrillDown.groupName){o[n].isDrilled=!o[n].isDrilled,e=o[n],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,l=this.treemap.palette.length>0?this.treemap.palette[n%this.treemap.palette.length]:o[n].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!t.isNullOrUndefined(this.treemap.drilledLegendItems)){var r=this.treemap.drilledLegendItems;if(t.isNullOrUndefined(r.data.options))for(n=0;n<r.length;n++){l=this.treemap.palette.length>0?this.treemap.palette[n%this.treemap.palette.length]:r[n].data[this.treemap.colorValuePath];break}else l=r.data.options.fill;i=r.data.isDrilled?u(r.data).values:u(r.data.parent).values}else i=u(e).values;var a;if(i&&i.length>0){for(var s=0;s<i.length;s++)(t.isNullOrUndefined(i[s].data[this.treemap.legendSettings.showLegendPath])||i[s].data[this.treemap.legendSettings.showLegendPath])&&(a=i[s].data[this.treemap.legendSettings.valuePath]?i[s].data[this.treemap.legendSettings.valuePath]:i[s].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,a)||this.legendCollections.push({legendName:a,legendFill:this.treemap.palette.length>0?t.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[s%this.treemap.palette.length]:l:i[s].data[this.treemap.colorValuePath],legendData:[],itemArea:i[s].weight,levelOrderName:i[s].levelOrderName}));if(this.legendCollections.sort(H),this.treemap.palette.length>0)for(var d=0;d<this.legendCollections.length;d++)this.legendCollections[d].legendFill=t.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[d%this.treemap.palette.length]:l}},e.prototype.calculateLegendItems=function(e){var i,l,o,n,r,a,s,d,h,p,g,c,m,u,f,y,v,S,x,b=!1,I=this.treemap.leafItemSettings,C=this.treemap.levels,F=this.treemap.legendSettings.position,w=!1,O=0;this.outOfRangeLegend=null;for(var L=0;L<e.length;L++){l="",f=!1,y=!1,w=!1,n=e[L].data,d=e[L].groupIndex,s=(a=0===this.treemap.levels.length||d===this.treemap.levels.length)?I.colorMapping:C[d].colorMapping;for(var T=0;T<s.length;T++){var M=s[T];if(p=null,o=Number(n[this.treemap.rangeColorValuePath]),h=n[this.treemap.equalColorValuePath],M.value=t.isNullOrUndefined(M.value)?M.value:M.value.toString(),!t.isNullOrUndefined(M.from)&&!t.isNullOrUndefined(M.to)&&o>=M.from&&o<=M.to&&M.showLegend?(b=!0,y=!0,m=M.from+" - "+M.to,r=t.isNullOrUndefined(M.label)?M.from+" - "+M.to:M.label,l=t.isNullOrUndefined(M.color)?l:M.color,i=this.isAddNewLegendData(m)):!t.isNullOrUndefined(M.value)&&h===M.value&&M.showLegend&&(b=!0,f=!0,m=M.value.toString(),r=t.isNullOrUndefined(M.label)?M.value.toString():M.label,l=t.isNullOrUndefined(M.color)?l:"[object Array]"===Object.prototype.toString.call(M.color)?M.color[0]:M.color,i=this.isAddNewLegendData(m)),b&&t.isNullOrUndefined(M.value)&&M.maxOpacity&&M.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var N=[];if(w=!0,"[object Array]"===Object.prototype.toString.call(M.color))for(var _=0;_<M.color.length;_++){E={colorStop:(_*(100/(M.color.length-1))+"%").toString(),color:M.color[_]};N.push(E)}else{var E={colorStop:"0%",color:l},D={colorStop:"100%",color:l};N.push(E),N.push(D)}g="Top"===F||"Bottom"===F?"100%":"0%",c="Top"===F||"Bottom"===F?"0%":"100%";var P={id:"groupIndex_"+d+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:g,y2:c};p=this.treemap.renderer.drawGradient("linearGradient",P,N).childNodes[0],"[object Array]"!==Object.prototype.toString.call(M.color)&&(p.childNodes[0].setAttribute("stop-opacity",M.minOpacity.toString()),p.childNodes[1].setAttribute("stop-opacity",M.maxOpacity.toString())),this.defsElement.appendChild(p),this.gradientCount++}if(u=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,r),i&&i.process&&b&&!u?(b=!1,l="[object Array]"===Object.prototype.toString.call(M.color)&&t.isNullOrUndefined(p)&&t.isNullOrUndefined(M.value)?this.legendGradientColor(M,O):l,this.legendCollections.push({actualValue:m,levelIndex:a?-1:T,leafIndex:a?T:-1,legendName:r,legendFill:l,legendData:[],groupIndex:a?-1:d,gradientElement:t.isNullOrUndefined(p)?t.isNullOrUndefined(M.value)?this.legendLinearGradient:null:p,name:e[L].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(e[L]),O++):b&&(b=!1,this.legendCollections[i.value].legendData.push(e[L])),!y&&!w&&!f&&t.isNullOrUndefined(M.from)&&t.isNullOrUndefined(M.to)&&t.isNullOrUndefined(M.minOpacity)&&t.isNullOrUndefined(M.maxOpacity)&&t.isNullOrUndefined(M.value)&&!t.isNullOrUndefined(M.color)){v="[object Array]"===Object.prototype.toString.call(M.color)?M.color[0]:M.color,S=t.isNullOrUndefined(M.label)?"Others":M.label,u=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,S),t.isNullOrUndefined(this.outOfRangeLegend)&&!u&&(this.legendCollections.push({actualValue:S,legendData:[],legendName:S,legendFill:v,groupIndex:!a||d>-1?d:-1}),x=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[x-1],O++);for(var B=this.legendCollections.length-1;B>=0;B--)if(this.legendCollections[B].actualValue===(M.label||"Others")){this.legendCollections[B].legendData.push(e[L]);break}}}}},e.prototype.removeDuplicates=function(e,t){for(var i=!1,l=0;l<e.length;l++)if(e[l].legendName===t){i=!0;break}return i},e.prototype.isAddNewLegendData=function(e){var t,i;if(0===this.legendCollections.length)t=!0;else for(var l=0;l<this.legendCollections.length;l++){if(e===this.legendCollections[l].actualValue){t=!1,i=l;break}l===this.legendCollections.length-1&&(t=!0)}return{process:t,value:i}},e.prototype.drawLegend=function(){var e,i,l=this.treemap.legendSettings,o=this.treemap.renderer,n=l.textStyle;if(this.legendGroup=o.createGroup({id:this.treemap.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===l.mode)this.drawLegendItem(this.currentPage);else for(var r=0;r<this.legendRenderingCollections.length;r++){var a=this.treemap.element.id+"_Legend_Index_"+r,s=this.treemap.element.id+"_Legend_Index_"+r+"_Text",d=this.legendRenderingCollections[r];e=(i=d.element)?"url(#"+i.id+")":d.fill;var p=new Fe(d.x,d.y,d.width,d.height),g=new Te(d.textX,d.textY),c=new we(a,e,l.shapeBorder,l.opacity,p);this.treemap.enableRtl&&("Left"===this.treemap.legendSettings.position||"Right"===this.treemap.legendSettings.position||"Auto"===this.treemap.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(c.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+c.height)-Math.abs(this.legendBorderRect.y-c.y),g.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+d.textHeight/2-Math.abs(this.legendBorderRect.y-g.y)):(c.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+c.width)-Math.abs(this.legendBorderRect.x-c.x),g.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-g.x)));var m=this.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(d.text):d.text;h(new Le(s,g.x,g.y,"middle",m,"",""),n,n.color||this.treemap.themeStyle.legendTextColor,this.legendGroup);var u=o.drawRectangle(c);u.setAttribute("tabindex",this.treemap.tabIndex.toString()),u.style.outline="",this.legendGroup.appendChild(u)}U(this.treemap,this.legendGroup)},e.prototype.defaultLegendRtlLocation=function(e,t,i,l){var o=e.Shape,n=e.Text,a=r(e.DisplayText,l.textStyle);return o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+t)-Math.abs(this.legendBorderRect.x-o.x),n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+a.width+t)-Math.abs(this.legendBorderRect.x-n.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)-l.shapeHeight/2,n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)),{shapeLocation:o,textLocation:n}},e.prototype.drawLegendItem=function(e){var i,l,o,n=this,a=this.treemap,s=a.legendSettings,d=new Ce(s.shapeWidth,s.shapeHeight),p=a.renderer,g=s.shapeBorder;if(e>=0&&e<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var c="HorizontalLine"===s.shape||"VerticalLine"===s.shape||"Cross"===s.shape,m=c?t.isNullOrUndefined(s.fill)?"#000000":s.fill:g.color,u=c&&0===g.width?1:g.width,f=this,y=0;y<this.totalPages[e].Collection.length;y++)!function(r){var g=f.totalPages[e].Collection[r],y=f.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(g.DisplayText):g.DisplayText,v=p.createGroup({id:a.element.id+"_Legend_Index_"+r});v.setAttribute("aria-label",y+" Legend"),v.setAttribute("role","region"),v.setAttribute("tabindex",f.treemap.tabIndex.toString()),v.style.outline="none";var S=a.element.id+"_Legend_Shape_Index_"+r,x=a.element.id+"_Legend_Text_Index_"+r,b=g.Shape,I=g.Text;a.enableRtl&&(l=f.defaultLegendRtlLocation(g,10,a,s),b=l.shapeLocation,I=l.textLocation),o={cancel:!1,name:"legendItemRendering",treemap:a,fill:g.Fill,shape:s.shape,imageUrl:s.imageUrl},a.trigger("legendItemRendering",o,function(e){var t=new Oe(S,e.fill,u,c?g.Fill:m,s.opacity,"");v.appendChild(J(b,e.shape,d,e.imageUrl,t)),h(i=new Le(x,I.x,I.y,"start",y,"",""),s.textStyle,s.textStyle.color||a.themeStyle.legendTextColor,v),n.legendGroup.appendChild(v)})}(y);var v=void 0;if(0!==this.page){var S=e+1+"/"+this.totalPages.length,x=s.textStyle,b=r(S,x),I=this.legendItemRect.x+this.legendItemRect.width-b.width-20-10,C=this.legendItemRect.x+this.legendItemRect.width,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10,w=C-10-b.width/2-5;v=p.createGroup({id:a.element.id+"_Legend_Paging_Group"});var O=p.createGroup({id:a.element.id+"_Legend_Left_Paging_Group"}),L=p.createGroup({id:a.element.id+"_Legend_Right_Paging_Group"}),T=" M "+C+" "+F+" L "+(C-10)+" "+(F-5)+" L "+(C-10)+" "+(F+5)+" z ",M=" M "+I+" "+F+" L "+(I+10)+" "+(F-5)+" L "+(I+10)+" "+(F+5)+" z ",N=new Oe(a.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",M);O.appendChild(p.drawPath(N));var _=new we(a.element.id+"_Left_Page_Rect","transparent",{},1,new Fe(I-5,F-10,20,20),"");O.appendChild(p.drawRectangle(_)),this.wireEvents(O);var E=new Oe(a.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",T);L.appendChild(p.drawPath(E));var D=new we(a.element.id+"_Right_Page_Rect","transparent",{},1,new Fe(C-10,F-5,10,10),"");L.appendChild(p.drawRectangle(D)),this.wireEvents(L),v.appendChild(O),v.appendChild(L);var P={id:a.element.id+"_Paging_Text",x:w,y:F+b.height/4,fill:"#a6a6a6","font-size":"14px","font-style":x.fontStyle,"font-family":x.fontFamily,"font-weight":x.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":"",role:"region","aria-label":S};v.appendChild(p.createText(P,S)),this.legendGroup.appendChild(v)}}},e.prototype.renderLegendBorder=function(){var e=this.treemap,t=e.legendSettings,i=t.title.text,l=t.titleStyle,o=r(a(this.legendItemRect.width+20,i,l),l);this.legendBorderRect=new Fe(this.legendItemRect.x-10,this.legendItemRect.y-10-o.height,this.legendItemRect.width+20,this.legendItemRect.height+20+o.height+("Interactive"===t.mode?0:0!==this.page?10:0));var n={color:t.border.color||this.treemap.themeStyle.legendBorderColor,width:t.border.width||this.treemap.themeStyle.legendBorderWidth},s=new we(e.element.id+"_Legend_Border",t.background,n,1,this.legendBorderRect,""),d=e.renderer.drawRectangle(s);d.style.pointerEvents="none",this.legendGroup.appendChild(d),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),e.svgObject.appendChild(this.legendGroup)},e.prototype.renderLegendTitle=function(){var e,i=this.treemap.legendSettings,l=i.titleStyle,o=this.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i.title.text):i.title.text,n=a(this.legendItemRect.width+20,o,l),s=r(n,l);if(o){var d=h(e=new Le(this.treemap.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-s.height/2-5,"middle",n,""),l,l.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup);d.setAttribute("role","region"),d.setAttribute("aria-label",o)}},e.prototype.renderInteractivePointer=function(e){var i=this.treemap,l=e.target,o=i.element.id+"_Interactive_Legend",n=!1;l=e.type.indexOf("touch")>-1?document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY):l;var r,a=i.legendSettings;if(l.id.indexOf("_Item_Index")>-1&&a.visible&&this.legendRenderingCollections.length>0){var s=void 0,d=void 0,h=void 0,p=void 0,g=void 0,c=void 0,m=void 0;r=i.layout.renderItems[parseFloat(l.id.split("_Item_Index_")[1])];for(var u=i.svgObject.getBoundingClientRect(),f=0;f<this.legendCollections.length&&!n;f++){s=this.legendCollections[f],d=(m=document.getElementById(i.element.id+"_Legend_Index_"+f)).getBoundingClientRect();var y=new Fe(Math.abs(d.left-u.left),Math.abs(d.top-u.top),d.width,d.height);if(p=m.getAttribute("fill"),g=a.shapeBorder.color,c=a.shapeBorder.width,!t.isNullOrUndefined(s.legendData)&&s.legendData.length>0){h=s.legendData;var v=i.rangeColorValuePath;if(r.levelOrderName.indexOf(this.legendCollections[f].legendName)>-1)this.drawInteractivePointer(a,p,g,o,c,y),n=!0;else for(var S=0;S<h.length;S++)if(i.rangeColorValuePath&&i.leafItemSettings.colorMapping.length>0?h[S].data[v]===r.data[v]:h[S].levelOrderName===r.levelOrderName||h[S].levelOrderName.indexOf(r.levelOrderName)>-1){this.drawInteractivePointer(a,p,g,o,c,y),n=!0;break}}else 0===this.treemap.leafItemSettings.colorMapping.length&&this.treemap.palette&&r.levelOrderName.indexOf(s.levelOrderName)>-1&&(this.drawInteractivePointer(a,p,g,o,c,y),n=!0)}}else this.removeInteractivePointer()},e.prototype.drawInteractivePointer=function(e,t,i,l,o,n){var r,a,s;r="Horizontal"===("None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation)?e.invertedPointer?" M "+(a=n.x+n.width/2)+" "+(s=n.y+n.height)+" L "+(a-10)+" "+(s+10)+" L "+(a+10)+" "+(s+10)+" Z ":" M "+(a=n.x+n.width/2)+" "+(s=n.y)+" L "+(a-10)+" "+(s-10)+" L "+(a+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(a=n.x)+" "+(s=n.y+n.height/2)+" L "+(a-10)+" "+(s-10)+" L "+(a-10)+" "+(s+10)+" z ":" M "+(a=n.x+n.width)+" "+(s=n.y+n.height/2)+" L "+(a+10)+" "+(s-10)+" L "+(a+10)+" "+(s+10)+" z ";var d=new Oe(l,t,o,i,1,"",r);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(d))},e.prototype.getLegendAlignment=function(e,i,l,o){var n,r,a,s=(a=t.extend({},e.areaRect,a,!0)).x,d=a.y,h=a.height,p=a.width,g=e.availableSize.width,c=e.availableSize.height,m="Auto"===o.position?g>c?"Right":"Bottom":o.position;if("Float"===o.position)this.translate=o.location;else{switch(m){case"Top":case"Bottom":a.height=h-l,n=g/2-i/2,r="Top"===m?d:d+a.height+10,a.y="Top"===m?d+l+10:d;break;case"Left":case"Right":a.width=p-i,n="Left"===m?s:s+a.width,r=c/2-l/2,a.x="Left"===m?s+i:s}switch(o.alignment){case"Near":"Top"===m||"Bottom"===m?n=a.x:r=a.y;break;case"Far":"Top"===m||"Bottom"===m?n=g-i:r=c-l}this.treemap.totalRect=a,this.translate=new Te(n,r)}},e.prototype.mouseUpHandler=function(e){this.renderInteractivePointer(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},e.prototype.removeInteractivePointer=function(){if(document.getElementById(this.treemap.element.id+"_Interactive_Legend")){var e=document.getElementById(this.treemap.element.id+"_Interactive_Legend");e.parentNode.removeChild(e)}},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.currentPage>=0&&this.currentPage<this.totalPages.length?this.drawLegend():this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?0:this.totalPages.length-1},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(t.Browser.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(t.Browser.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"treeMapLegend"},e.prototype.destroy=function(){clearTimeout(this.clearTimeout),this.clearTimeout=null,this.legendRenderingCollections=[],this.legendCollections=[],this.outOfRangeLegend=null,this.totalPages=[],this.translate=null,this.legendBorderRect=null,this.legendGroup=null,this.legendNames=[],this.defsElement=null,this.legendLinearGradient=null,this.legendInteractiveGradient=[],this.legendItemRect=null,this.removeEventListener(),this.treemap=null},e.prototype.legendGradientColor=function(e,i){var l,o="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"[object Array]"===Object.prototype.toString.call(e.color)){var n=this.treemap.renderer.createDefs(),r=document.createElementNS(o,"linearGradient"),a=this.treemap.legendSettings.position,s="Top"===a||"Bottom"===a?"100":"0",d="Top"===a||"Bottom"===a?"0":"100";r.setAttribute("id","linear_"+i),r.setAttribute("x1","0%"),r.setAttribute("y1","0%"),r.setAttribute("x2",s+"%"),r.setAttribute("y2",d+"%");for(var h=0;h<e.color.length;h++){var p=100/(e.color.length-1),g=document.createElementNS(o,"stop");g.setAttribute("offset",h*p+"%"),g.setAttribute("stop-color",e.color[h]),g.setAttribute("stop-opacity",1..toString()),r.appendChild(g)}n.appendChild(r),this.legendLinearGradient=r;var c="url(#linear_"+i+")";this.defsElement.appendChild(r),l=c}return l},e}(),ke=function(){function e(e){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=e,this.addEventListener()}return e.prototype.mouseMove=function(e){var t=e.target;return this.highlightOnMouseMove(t)},e.prototype.highlightOnMouseMove=function(e){var i,l,o,n,r,a,s,d=this.treemap,h=e.id,p=[],g=this.treemap.highlightSettings,c=[],m=this.treemap.treeMapSelectionModule,u=!1;if(m&&m.legendSelectionCollection.length>0)for(D=0;D<m.legendSelectionCollection.length;D++)for(B=0;B<m.legendSelectionCollection[D].ShapeCollection.Elements.length;B++){var y=parseFloat(m.legendSelectionCollection[D].ShapeCollection.Elements[B].id.split("Item_Index_")[1].split("_")[0]),v=h.indexOf("_Item_Index_")>-1?parseFloat(h.split("Item_Index_")[1].split("_")[0]):null;if(m.legendSelectionCollection[D].ShapeCollection.Elements[B].id===h||y===v){u=!0;break}}if(h.indexOf("_Item_Index")>-1&&!u){if(this.highLightId!==h||this.legendHighlightCollection[0]&&this.legendHighlightCollection[0].ShapeCollection.Elements.length>1){r=document.getElementById(d.element.id+"_TreeMap_"+d.layoutType+"_Layout");var S=document.getElementsByClassName("treeMapSelection");o=this.treemap.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var x=void 0;if(this.treemap.legendSettings.visible){var b=this.treemap.treeMapLegendModule.legendCollections,I=this.treemap.treeMapLegendModule.legendCollections.length;x=!d.legendSettings.removeDuplicateLegend&&d.palette&&d.palette.length>0&&0===d.leafItemSettings.colorMapping.length&&0===d.levels.length?parseFloat(h.split("_Item_Index_")[1]):te(I,o,d),t.isNullOrUndefined(x)&&($(this.legendHighlightCollection,d),$(this.shapeHighlightCollection,d),this.legendHighlightCollection=[],d.treeMapLegendModule.removeInteractivePointer()),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+x):document.getElementById(this.treemap.element.id+"_Legend_Index_"+x),null!==this.shapeElement&&(m&&this.shapeElement.id===(m&&m.shapeElement?m.shapeElement.id:null)?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(ee(this.shapeHighlightCollection,this.currentElement,d),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),$(this.shapeHighlightCollection,d),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:b[x].legendFill,oldOpacity:b[x].opacity,oldBorderColor:b[x].borderColor,oldBorderWidth:b[x].borderWidth}),K("Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+x):document.getElementById(this.treemap.element.id+"_Legend_Index_"+x+"_Text"),g.fill,g.opacity,null,null),K(this.shapeElement,g.fill,g.opacity,g.border.color,g.border.width.toString()),this.target="highlight"))}s=f(o,[],g.mode,d);for(D=0;D<r.childElementCount;D++){a=r.childNodes[D],n=!0;var C=""!==d.rangeColorValuePath?d.rangeColorValuePath:null,F=d.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];o=d.layout.renderItems[parseFloat(a.id.split("_Item_Index_")[1])];for(B=0;B<S.length;B++)if(a.id===S[B].id||a.id===S[B].parentElement.id){n=!1;break}s.indexOf(o.levelOrderName)>-1&&n&&(t.isNullOrUndefined(C)||(o.data[C]===F.data[C]||"Item"!==g.mode&&d.levels.length>0))&&(c.push(a),p.push(o))}k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d);for(var w=0;w<c.length;w++)A((a=c[w]).childNodes[0],{border:g.border,fill:g.fill,opacity:g.opacity}),a.classList.add("treeMapHighLight"),this.highLightId=h;l={cancel:!1,name:"itemHighlight",treemap:d,items:p,elements:c},d.trigger("itemHighlight",l)}}else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1||h.indexOf("_Legend_Text_Index")>-1){t.isNullOrUndefined(m)||(m.legendSelectId=t.isNullOrUndefined(d.legendId[0])?null:d.legendId[0]);var O=m&&m.legendSelectId?parseFloat(m.legendSelectId.split("Index_")[1]):m&&m.shapeSelectId?parseFloat(m.shapeSelectId.split("Index_")[1]):null,L="Default"===this.treemap.legendSettings.mode?-1===h.indexOf("Text")?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Text_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);if(this.treemap.legendSettings.visible&&L!==O){var T,M=void 0,N=void 0,C=""!==d.rangeColorValuePath?d.rangeColorValuePath:null,_=document.getElementById(h);"highlight"===this.shapeTarget&&($(this.legendHighlightCollection,this.treemap),this.legendHighlightCollection=[]),this.shapeTarget="highlight";for(var E=this.treemap.treeMapLegendModule.legendCollections[L].legendData.length,b=this.treemap.treeMapLegendModule.legendCollections,D=0;D<E;D++)for(B=0;B<this.treemap.layout.renderItems.length;B++)if(!t.isNullOrUndefined(C)&&d.leafItemSettings.colorMapping.length>0&&0===d.levels.length?d.treeMapLegendModule.legendCollections[L].legendData[D].data[C]===d.layout.renderItems[B].data[C]:d.treeMapLegendModule.legendCollections[L].legendData[D].levelOrderName===d.layout.renderItems[B].levelOrderName){M=B,N=this.treemap.layout.renderItems[B].groupIndex;z=document.getElementById(this.treemap.element.id+"_Level_Index_"+N+"_Item_Index_"+M+"_RectPath");0!==D&&0!==this.legendHighlightCollection.length||(this.legendHighlightCollection=[],ie(this.legendHighlightCollection,L,B,_,z,this.treemap.layout.renderItems,b),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection={Elements:[]});var P=void 0;_.id.indexOf("Text")>-1?(P="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+L),K(_,g.fill,g.opacity,null,null),K(P,g.fill,g.opacity,g.border.color,g.border.width.toString())):(K("Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+L),g.fill,g.opacity,null,null),K(_,g.fill,g.opacity,g.border.color,g.border.width.toString())),K(z,g.fill,g.opacity,g.border.color,g.border.width.toString()),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection.Elements.push(z)}if(0===E&&this.treemap.palette&&this.treemap.palette.length>0)for(var B=0;B<this.treemap.layout.renderItems.length;B++)if((this.treemap.treeMapLegendModule.legendCollections[L].levelOrderName===this.treemap.layout.renderItems[B].levelOrderName||this.treemap.layout.renderItems[B].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[L].levelOrderName)>-1)&&(!(!this.treemap.legendSettings.removeDuplicateLegend&&d.palette&&d.palette.length>0)||this.treemap.layout.renderItems[B].parent.isDrilled||L===B)){M=B,N=this.treemap.layout.renderItems[B].groupIndex;var z=document.getElementById(this.treemap.element.id+"_Level_Index_"+N+"_Item_Index_"+M+"_RectPath");ie(this.legendHighlightCollection,L,B,_,z,this.treemap.layout.renderItems,b),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection={Elements:[]};var H=void 0;_.id.indexOf("Text")>-1?(H="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+L),K(_,g.fill,g.opacity,null,null),K(H,g.fill,g.opacity,g.border.color,g.border.width.toString())):(K(H="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+L),g.fill,g.opacity,null,null),K(_,g.fill,g.opacity,g.border.color,g.border.width.toString())),K(z,g.fill,g.opacity,g.border.color,g.border.width.toString()),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection.Elements.push(z)}}else k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d),$(this.legendHighlightCollection,d),this.legendHighlightCollection=[]}else m&&this.shapeElement&&this.shapeElement.getAttribute("id")===m.legendSelectId||(m?this.shapeElement!==m.shapeElement:this.treemap.legendSettings.visible)&&k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||m&&this.shapeElement&&this.shapeElement.getAttribute("id")===m.legendSelectId||(m?this.shapeElement!==m.shapeElement:!m||m.legendSelect)&&($(this.shapeHighlightCollection,d),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&$(this.legendHighlightCollection,this.treemap),this.highLightId="",i=!1;return i},e.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(t.Browser.touchMoveEvent,this.mouseMove,this)},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(t.Browser.touchMoveEvent,this.mouseMove)},e.prototype.getModuleName=function(){return"treeMapHighlight"},e.prototype.destroy=function(){this.shapeElement=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.removeEventListener(),this.treemap=null},e}(),Ae=function(){function e(e){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=e,this.addEventListener()}return e.prototype.mouseDown=function(e){var t=e.target;e.preventDefault(),this.selectionOnMouseDown(t)},e.prototype.selectionOnMouseDown=function(e){var i,l=this.treemap;e.setAttribute("tabindex","-1"),e.style.outline="none",e.id.includes("Legend_Shape_Index")||e.focus();var o,n,r,a,s=[],d=e.id,h=e.innerHTML,g=[],c=l.selectionSettings,m=this.treemap.treeMapHighlightModule,u=l.element.id+"_TreeMap_"+l.layoutType+"_Layout",y=(o=l.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])])&&!o.isLeafItem&&l.enableDrillDown&&(e.textContent.indexOf("[+]")>-1||e.textContent.indexOf("[-]")>-1||!t.isNullOrUndefined(e.nextElementSibling)&&(e.nextSibling.textContent.indexOf("[+]")>-1||e.nextSibling.textContent.indexOf("[-]")>-1));if(d.indexOf("_Item_Index")>-1&&!y)if(this.treemap.selectionId!==d&&(!l.selectionId||parseFloat(l.selectionId.split("_Item_Index_")[1])!==parseFloat(d.split("_Item_Index_")[1]))||this.legendSelectionCollection[0]&&this.legendSelectionCollection[0].ShapeCollection.Elements.length>1){l.levelSelection=[],l.legendId=[],this.shapeSelectId="",$(this.legendSelectionCollection,l),this.legendSelectionCollection=[],n=document.getElementById(u);_=void 0;if(this.treemap.legendSettings.visible){this.shapeSelect=!1;var v=this.treemap.treeMapLegendModule.legendCollections.length,S=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,$(this.shapeSelectionCollection,l),m&&(m.shapeTarget="selection",m.shapeHighlightCollection=[]),_=!l.legendSettings.removeDuplicateLegend&&l.palette&&l.palette.length>0&&0===l.leafItemSettings.colorMapping.length&&0===l.levels.length?parseFloat(d.split("_Item_Index_")[1]):te(v,o,l),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_):document.getElementById(this.treemap.element.id+"_Legend_Index_"+_),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:S[_].legendFill,oldOpacity:S[_].opacity,oldBorderColor:S[_].borderColor,oldBorderWidth:S[_].borderWidth}),K(B="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_):document.getElementById(this.treemap.element.id+"_Legend_Index_"+_+"_Text"),c.fill,c.opacity,null,null),K(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),l.legendId.push(this.shapeElement.id),l.legendId.push(B.id))}a=f(o,[],c.mode,l);for(var x=0;x<n.childElementCount;x++){r=n.childNodes[x];var b=l.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])];o=l.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])];N=""!==l.rangeColorValuePath?l.rangeColorValuePath:null;a.indexOf(o.levelOrderName)>-1&&(t.isNullOrUndefined(N)||(o.data[N]===b.data[N]||"Item"!==c.mode&&l.levels.length>0))&&(g.push(r),d.indexOf("_RectPath")>-1&&l.levelSelection.push(r.id),s.push(o))}k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId=d;for(var I=document.getElementsByClassName("treeMapHighLight"),C=0;C<g.length;C++){if(r=g[C],I.length>0)for(z=0;z<I.length;z++)I[z].id===r.id&&I[z].classList.remove("treeMapHighLight"),A(r.childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),r.classList.add("treeMapSelection");else A(r.childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),r.classList.add("treeMapSelection");i={cancel:!1,name:"itemSelected",treemap:l,items:s,elements:g,text:h,contentItemTemplate:h},l.trigger("itemSelected",i,function(t){t.contentItemTemplate!==h&&p(d,e,t.contentItemTemplate)})}}else $(this.legendSelectionCollection,l),$(this.shapeSelectionCollection,l),this.treemap.legendId=[],this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.levelSelection=[],this.legendSelectId="",(this.legendSelect||this.shapeSelect)&&(k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId="");else if(d.indexOf("_Legend_Shape")>-1||d.indexOf("_Legend_Index")>-1||d.indexOf("_Legend_Text_")>-1){var S=this.treemap.treeMapLegendModule.legendCollections,F=t.isNullOrUndefined(this.legendSelectId)?null:parseFloat(this.legendSelectId.split("_Index_")[1]);if(this.treemap.legendSettings.visible&&F!==parseFloat(d.split("_Index_")[1])){var w,O=void 0,L=void 0;l.legendId=[],l.levelSelection=[],this.legendSelectId=d,this.legendSelect=!1;var T=isNaN(parseInt(d[d.length-1],10))?parseInt(d[d.length-6],10):parseInt(d[d.length-1],10),M=document.getElementById(d);$(this.legendSelectionCollection,l),k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),$(this.shapeSelectionCollection,l),this.legendSelectionCollection=[],m&&(m.shapeTarget="selection",m.legendHighlightCollection=[]);for(var N=""!==l.rangeColorValuePath?l.rangeColorValuePath:null,_="Default"===this.treemap.legendSettings.mode?-1===d.indexOf("Text")?parseFloat(d.split("_Legend_Shape_Index_")[1]):parseFloat(d.split("_Legend_Text_Index_")[1]):parseFloat(d.split("_Legend_Index_")[1]),E=this.treemap.treeMapLegendModule.legendCollections[_].legendData.length,C=0;C<E;C++)for(var D=0;D<this.treemap.layout.renderItems.length;D++)if(!t.isNullOrUndefined(N)&&l.leafItemSettings.colorMapping.length>0&&0===l.levels.length?l.treeMapLegendModule.legendCollections[_].legendData[C].data[N]===l.layout.renderItems[D].data[N]:this.treemap.treeMapLegendModule.legendCollections[_].legendData[C].levelOrderName===this.treemap.layout.renderItems[D].levelOrderName){O=D,L=this.treemap.layout.renderItems[D].groupIndex;H=document.getElementById(this.treemap.element.id+"_Level_Index_"+L+"_Item_Index_"+O+"_RectPath");this.treemap.selectionId=H.id,0!==C&&0!==this.legendSelectionCollection.length||(ie(this.legendSelectionCollection,T,D,M,H,this.treemap.layout.renderItems,S),w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection={Elements:[]}),this.treemap.selectionId=H.id;var P=void 0,B=void 0;M.id.indexOf("Text")>-1?(K(P="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_),c.fill,c.opacity,c.border.color,c.border.width.toString()),K(M,c.fill,c.opacity,null,null),this.legendSelectId=P.id,this.shapeElement=P,l.legendId.push(M.id),l.legendId.push(P.id)):(K(B="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_),c.fill,c.opacity,null,null),K(M,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.shapeElement=M,l.legendId.push(M.id),l.legendId.push(B.id)),K(H,c.fill,c.opacity,c.border.color,c.border.width.toString()),w=this.legendSelectionCollection.length,l.levelSelection.push(H.id),this.legendSelectionCollection[w-1].ShapeCollection.Elements.push(H)}if(0===E&&this.treemap.palette&&this.treemap.palette.length>0)for(var z=0;z<this.treemap.layout.renderItems.length;z++)if((this.treemap.treeMapLegendModule.legendCollections[_].levelOrderName===this.treemap.layout.renderItems[z].levelOrderName||this.treemap.layout.renderItems[z].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[_].levelOrderName)>-1)&&(!(!this.treemap.legendSettings.removeDuplicateLegend&&l.palette&&l.palette.length>0)||this.treemap.layout.renderItems[z].parent.isDrilled||_===z)){O=z,L=this.treemap.layout.renderItems[z].groupIndex;var H=document.getElementById(this.treemap.element.id+"_Level_Index_"+L+"_Item_Index_"+O+"_RectPath");ie(this.legendSelectionCollection,_,z,M,H,this.treemap.layout.renderItems,S),this.treemap.selectionId=H.id,w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection={Elements:[]};var R=void 0;M.id.indexOf("Text")>-1?(R="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_),K(M,c.fill,c.opacity,null,null),K(R,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.legendSelectId=R.id,this.shapeElement=R):(K(R="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_),c.fill,c.opacity,null,null),K(M,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.legendSelectId=d,this.shapeElement=M),K(H,c.fill,c.opacity,c.border.color,c.border.width.toString()),l.levelSelection.push(H.id),-1===l.legendId.indexOf(R.id)&&l.legendId.push(R.id),-1===l.legendId.indexOf(M.id)&&l.legendId.push(M.id),w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection.Elements.push(H)}}else $(this.legendSelectionCollection,this.treemap),$(this.shapeSelectionCollection,this.treemap),this.legendSelectionCollection=[],m&&(m.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.shapeElement=null,this.shapeSelectId="",(this.legendSelect||this.shapeSelect)&&(k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId="")}else y&&($(this.legendSelectionCollection,this.treemap),this.legendSelectionCollection=[],this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.treemap.selectionId="",this.shapeElement=null)},e.prototype.selectTreemapItem=function(e,t){if(t){for(var i=void 0,l=0;l<this.treemap.layout.renderItems.length;l++)if(e===this.treemap.layout.renderItems[l].levelOrderName){i=this.treemap.layout.renderItems[l];break}var o=this.treemap.selectionSettings,n=[],r=void 0,a=void 0,s=[];this.treemap.levelSelection=[];for(var d=this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout",h=document.getElementById(d),p=f(i,[],o.mode,this.treemap),g=0;g<h.childElementCount;g++)r=h.childNodes[g],i=this.treemap.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])],p.indexOf(i.levelOrderName)>-1&&(n.push(r),this.treemap.levelSelection.push(r.id),s.push(i));if(this.treemap.legendSettings.visible)for(var c=0;c<s.length;c++){this.shapeSelect=!1;var m=this.treemap.treeMapLegendModule.legendCollections.length,u=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,Q(this.shapeSelectionCollection),a=te(m,s[c],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+a):document.getElementById(this.treemap.element.id+"_Legend_Index_"+a),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:u[a].legendFill,oldOpacity:u[a].opacity,oldBorderColor:u[a].borderColor,oldBorderWidth:u[a].borderWidth}),K(this.shapeElement,o.fill,o.opacity,o.border.color,o.border.width.toString()))}k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);var y=document.getElementById(this.treemap.levelSelection[0]);this.treemap.selectionId=y.childNodes[0].id;for(var v=document.getElementsByClassName("treeMapHighLight"),S=0;S<n.length;S++)if(r=n[S],v.length>0)for(var x=0;x<v.length;x++)v[x].id===r.id&&v[x].classList.remove("treeMapHighLight"),A(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection");else o.fill="null"===o.fill?this.treemap.layout.renderItems[parseInt(r.id.split("Item_Index_")[1],10)].options.fill:o.fill,A(r.childNodes[0],{border:o.border,fill:o.fill,opacity:o.opacity}),r.classList.add("treeMapSelection")}else Q(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},e.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(t.Browser.touchStartEvent,this.mouseDown,this)},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(t.Browser.touchStartEvent,this.mouseDown)},e.prototype.getModuleName=function(){return"treeMapSelection"},e.prototype.destroy=function(){this.shapeElement=null,this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.removeEventListener(),this.treemap=null},e}(),We=function(e,t){var i={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(i[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,l=Object.getOwnPropertySymbols(e);o<l.length;o++)t.indexOf(l[o])<0&&(i[l[o]]=e[l[o]]);return i},je=function(){function e(e){this.treemap=e,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var i,l,o,n,r,a=this;-1!==e.type.indexOf("touch")?(this.isTouch=!0,i=(n=e).changedTouches[0].pageX,l=n.changedTouches[0].pageY,o=n.target):(this.isTouch="touch"===e.pointerType,i=e.pageX,l=e.pageY,o=e.target);var s,d,h,p,g=o.id,c={},m={},u=[];if(g.indexOf("_Item_Index")>-1&&-1===e.type.indexOf("key")){if(c=this.treemap.layout.renderItems[parseFloat(g.split("_Item_Index_")[1])],!t.isNullOrUndefined(c)){s=c.weight,m=c.data,t.isNullOrUndefined(c.options)||(p=c.options.fill),u=this.treemap.enableRtl?[(t.isNullOrUndefined(this.tooltipSettings.format)?null:W(this.tooltipSettings.format,m,this.treemap))||j(s,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[(t.isNullOrUndefined(this.tooltipSettings.format)?null:W(this.tooltipSettings.format,m,this.treemap))||this.treemap.weightValuePath.toString()+" : "+j(s,this.treemap)],document.getElementById(this.tooltipId)?d=document.getElementById(this.tooltipId):((d=t.createElement("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(d)),(h=w(i,l,this.treemap.svgObject)).y=this.tooltipSettings.template?h.y+10:h.y,this.tooltipSettings.textStyle.size=this.tooltipSettings.textStyle.size||this.treemap.themeStyle.tooltipFontSize,this.tooltipSettings.textStyle.fontFamily=this.tooltipSettings.textStyle.fontFamily||this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.fontStyle=t.isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle)?"Normal":this.tooltipSettings.textStyle.fontStyle,this.tooltipSettings.textStyle.fontWeight=this.tooltipSettings.textStyle.fontWeight||this.treemap.themeStyle.fontWeight,this.tooltipSettings.textStyle.color=this.tooltipSettings.textStyle.color||this.treemap.themeStyle.tooltipFontColor,this.tooltipSettings.textStyle.opacity=this.tooltipSettings.textStyle.opacity||this.treemap.themeStyle.tooltipTextOpacity;var f={width:this.tooltipSettings.border.width||this.treemap.themeStyle.tooltipBorderWidth||0,color:this.tooltipSettings.border.color||this.treemap.themeStyle.tooltipBorderColor||"transparent"};if(this.treemap.enableHtmlSanitizer)for(var y=0;y<u.length;y++)u[y]=t.SanitizeHtmlHelper.sanitize(u[y]);r={cancel:!1,name:"tooltipRendering",item:c,options:{location:h,text:u,data:m,border:f,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:o,eventArgs:e},this.treemap.trigger("tooltipRendering",r,function(e){a.addTooltip(r,p,d)})}}else this.removeTooltip(),this.treemap.clearTemplate()},e.prototype.addTooltip=function(e,l,o,n){var r,a;t.isNullOrUndefined(e)?(r=n.cancel,a=n):(r=e.cancel,a=We(e,["cancel"]).options),r?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new i.Tooltip({theme:this.treemap.theme,enable:!0,header:"",data:a.data,template:a.template,content:a.text,shapes:[],location:a.location,palette:[l],areaBounds:this.treemap.areaRect,textStyle:a.textStyle,fill:this.treemap.tooltipSettings.fill?this.treemap.tooltipSettings.fill:this.treemap.themeStyle.tooltipFillColor,border:a.border,enableShadow:!0}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(o),this.treemap.renderReactTemplates())},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-TreeMap-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0];e.parentNode.removeChild(e)}},e.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.treemap.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(t.Browser.touchMoveEvent,this.renderTooltip),this.treemap.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"treeMapTooltip"},e.prototype.destroy=function(){t.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,oe(this.treemap.element.id+"_TreeMapTooltip")),this.svgTooltip=null,this.tooltipSettings=null,this.removeEventListener(),this.treemap=null},e}();return He.Inject(je,Ue,ke,Ae,Ee,Pe,De),e.Border=de,e.ColorMapping=ue,e.ColorValue=Me,e.CommonTitleSettings=ge,e.Font=pe,e.HighlightSettings=be,e.ImageExport=De,e.InitialDrillSettings=ye,e.LayoutPanel=_e,e.LeafItemSettings=ve,e.LegendSettings=fe,e.LevelSettings=Ie,e.LevelsData=Re,e.Location=Te,e.Margin=he,e.PathOption=Oe,e.PdfExport=Pe,e.Print=Ee,e.Rect=Fe,e.RectOption=we,e.SelectionSettings=xe,e.Size=Ce,e.SubTitleSettings=ce,e.TextOption=Le,e.TitleSettings=me,e.TooltipSettings=Se,e.TreeMap=He,e.TreeMapAjax=Ne,e.TreeMapHighlight=ke,e.TreeMapLegend=Ue,e.TreeMapSelection=Ae,e.TreeMapTooltip=je,e.applyOptions=A,e.beforePrint="beforePrint",e.click="click",e.colorCollections=T,e.colorMap=O,e.colorNameToHex=X,e.componentToHex=G,e.convertElement=v,e.convertHexToColor=q,e.convertToContainer=C,e.convertToHexCode=V,e.convertToRect=F,e.createTextStyle=d,e.deSaturationColor=L,e.defaultFont=re,e.doubleClick="doubleClick",e.drawSymbol=J,e.drillEnd="drillEnd",e.drillStart="drillStart",e.findChildren=u,e.findHightLightItems=f,e.findLabelLocation=S,e.findPosition=s,e.formatValue=j,e.getArea=b,e.getColorByValue=N,e.getElement=g,e.getGradientColor=_,e.getLegendIndex=te,e.getMousePosition=w,e.getPercentage=D,e.getPercentageColor=E,e.getShortestEdge=I,e.getTemplateFunction=y,e.getThemeStyle=ne,e.hide=z,e.isContainsData=m,e.isParentItem=Z,e.itemClick="itemClick",e.itemHighlight="itemHighlight",e.itemMove="itemMove",e.itemRendering="itemRendering",e.itemSelected="itemSelected",e.itemsToOrder=c,e.legendItemRendering="legendItemRendering",e.legendMaintain=U,e.legendRendering="legendRendering",e.load="load",e.loaded="loaded",e.maintainSelection=R,e.measureElement=x,e.measureText=r,e.mouseMove="mouseMove",e.orderByArea=H,e.pushCollection=ie,e.removeClassNames=k,e.removeElement=oe,e.removeLegend=$,e.removeSelectionWithHighlight=ee,e.removeShape=Q,e.renderLegendShape=Y,e.renderTextElement=h,e.resize="resize",e.rgbToHex=M,e.rightClick="rightClick",e.setColor=K,e.setItemTemplateContent=p,e.stringToNumber=n,e.textFormatter=W,e.textTrim=a,e.textWrap=B,e.tooltipRendering="tooltipRendering",e.triggerDownload=le,e.wordWrap=P,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport),this.ejs=ej;
10
+ this.ej=this.ej||{},this.ej.treemap=function(e,t,i,l,n){"use strict";function o(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(e,i){var l=document.getElementById("treeMapMeasureText");return null===l&&(l=t.createElement("text",{id:"treeMapMeasureText"}),document.body.appendChild(l)),l.innerHTML=t.SanitizeHtmlHelper.sanitize(e),l.style.position="absolute",l.style.fontSize=i.size,l.style.fontWeight=i.fontWeight,l.style.fontStyle=i.fontStyle,l.style.fontFamily=i.fontFamily,l.style.visibility="hidden",l.style.top="-100",l.style.left="0",l.style.whiteSpace="nowrap",l.style.lineHeight="normal",new Ce(l.clientWidth,l.clientHeight)}function a(e,t,i){var l=t,n=r(t,i).width;if(n>e)for(var o=t.length-1;o>=0;--o)if(l=t.substring(0,o)+"...",(n=r(l,i).width)<=e||l.length<4)return l.length<4&&(l=" "),l;return l}function s(e,t,i,l){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===l?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===l?e.width-e.y-i.width:e.x+e.width-i.width}var o="title"===l?e.y+i.height/2:e.y+e.height/2+i.height/2;return new Te(n,o)}function d(e,t,i){var l=e.createText(t,i);return l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.style["user-select"]="none",l.style["-moz-user-select"]="none",l.style["-webkit-touch-callout"]="none",l.style["-webkit-user-select"]="none",l.style["-khtml-user-select"]="none",l.style["-ms-user-select"]="none",l.style["-o-user-select"]="none",l}function h(e,l,n,o,a){void 0===a&&(a=!1);var s,h,p,g={"font-size":l.size,"font-style":l.fontStyle,"font-family":l.fontFamily,"font-weight":l.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:l.opacity,"dominant-baseline":e.baseLine,id:e.id,x:e.x,y:e.y,fill:n},c="string"==typeof e.text?e.text:a?e.text[e.text.length-1]:e.text[0],m=new i.SvgRenderer("");if(!t.isNullOrUndefined(c)&&!t.isNullOrUndefined(e.connectorText)&&c.includes(e.connectorText[1]))for(var u=c.split("#"),f=0;f<u.length;f++){var y=-1===u[f].search(e.connectorText)||t.isNullOrUndefined(e.connectorText)?u[f]:e.connectorText;if(g.id=e.id+"_"+f,p=d(m,g,y),f%2==0&&0!==f){y=y.replace(/\s+/g,"&nbsp")}var v=r(y,l);g.x=0!==f?g.x+v.width:g.x+v.width+5,o.appendChild(p)}else p=d(m,g,c),o.appendChild(p);if("string"!=typeof e.text&&e.text.length>1){for(var S=1,x=e.text.length;S<x;S++)h=r(e.text[S],l).height,s=m.createTSpan({x:e.x,id:e.id,y:e.y+S*h},e.text[S]),p.appendChild(s);o.appendChild(p)}return p}function p(e,i,l){var n,o=e.split("_RectPath")[0];n=e.indexOf("_LabelTemplate")>-1?i:document.querySelector("#"+o+"_LabelTemplate"),t.isNullOrUndefined(n)||(n.innerHTML=l)}function g(e){return document.getElementById(e)}function c(e,t){return e.weight===t.weight?0:e.weight<t.weight?1:-1}function m(e,t,i,l){for(var n,o=!1,r="",a=l.leafItemSettings,s=0;s<e.length;s++){var d=i[n=l.levels[s]?l.levels[s].groupPath:a.labelPath?a.labelPath:l.weightValuePath]||"undefined";if(e[s]===d&&(r+=d+(s===e.length-1?"":"#"))===t){o=!0;break}}return o}function u(e){var t;if(e){var i=Object.keys(e);t={};for(var l=0;l<i.length;l++)if(e[i[l]]instanceof Array){t.values=e[i[l]],t.key=i[l];break}}return t}function f(e,t,i,l){if("Child"===i){t.push(e.levelOrderName);var n=u(e).values;if(n&&n.length>0){for(s=0;s<n.length;s++)-1===t.indexOf(n[s].levelOrderName)&&t.push(n[s].levelOrderName);for(var o=0;o<n.length;o++)f(n[o],t,i,l)}}else if("Parent"===i)"string"==typeof e.levelOrderName&&-1===t.indexOf(e.levelOrderName)&&(t.push(e.levelOrderName),f(e.parent,t,i,l));else if("All"===i)for(var r=e.levelOrderName.split("#")[0],a=void 0,s=0;s<l.layout.renderItems.length;s++)(a=l.layout.renderItems[s]).levelOrderName.indexOf(r)>-1&&-1===t.indexOf(a.levelOrderName)&&t.push(a.levelOrderName);else t.push(e.levelOrderName);return t}function y(e){var i=null;try{i="function"!=typeof e&&document.querySelectorAll(e).length?t.compile(document.querySelector(e).innerHTML.trim()):t.compile(e)}catch(l){i=t.compile(e)}return i}function v(e,i,l){var n=t.createElement("div",{id:i});n.style.cssText="position: absolute;pointer-events: auto;";for(var o=e.length;o>0;)n.appendChild(e[0]),o--;for(var r=n.innerHTML,a=Object.keys(l),s=0;s<a.length;s++){var d=RegExp;r=r.replace(new d("{{:"+a[s]+"}}","g"),l[a[s].toString()])}return n.innerHTML=r,n}function S(e,t,i,l,n){var o=new Te(0,0),r="Template"===l?n.areaRect.x:0,a="Template"===l?n.areaRect.y:0;return o.x=Math.abs(r-(t.indexOf("Left")>-1?e.x+5:t.indexOf("Right")>-1?e.x+e.width-i.width:e.x+(e.width/2-i.width/2)))-2,!n.enableDrillDown||"BottomLeftTopRight"!==n.renderDirection&&"BottomRightTopLeft"!==n.renderDirection?o.y=Math.abs(a-(t.indexOf("Top")>-1?"Template"===l?e.y:e.y+i.height:t.indexOf("Bottom")>-1?e.y+e.height-i.height:"Template"===l?e.y+(e.height/2-i.height/2):e.y+e.height/2+i.height/4)):o.y=Math.abs(e.y+e.height-i.height+5),o}function x(e,t){var i=new Ce(0,0);t.appendChild(e),i.height=e.offsetHeight,i.width=e.offsetWidth;var l=document.getElementById(e.id);return l.parentNode.removeChild(l),i}function b(e){return(e.width-e.x)*(e.height-e.y)}function I(e){var t=C(e),i=t.width,l=t.height;return Math.min(i,l)}function C(e){var t=e.x,i=e.y;return{x:t,y:i,width:e.width-t,height:e.height-i}}function F(e){var t=e.x,i=e.y;return{x:t,y:i,width:t+e.width,height:i+e.height}}function w(e,t,i){var l=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,o=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,a=i.ownerDocument.documentElement.clientLeft,s=l.left+n-a,d=l.top+o-r;return new Te(e-s,t-d)}function O(e,i,l){var n,o,r=[];if(t.isNullOrUndefined(i)&&t.isNullOrUndefined(l)&&isNaN(l))return null;for(var a=0;a<e.length;a++){var s=!1,d=l;t.isNullOrUndefined(e[a].from)||t.isNullOrUndefined(e[a].to)||t.isNullOrUndefined(e[a].value)?(t.isNullOrUndefined(e[a].from)||t.isNullOrUndefined(e[a].to))&&t.isNullOrUndefined(e[a].value)||(l>=e[a].from&&e[a].to>=l||e[a].value===i)&&(e[a].value===i&&(s=!0),n="[object Array]"===Object.prototype.toString.call(e[a].color)?s?e[a].color[0]:T(e[a],d):e[a].color):l>=e[a].from&&e[a].to>=l&&e[a].value===i&&(s=!0,n="[object Array]"===Object.prototype.toString.call(e[a].color)?s?e[a].color[0]:T(e[a],d):e[a].color),(l>=e[a].from&&l<=e[a].to||e[a].value===i)&&!t.isNullOrUndefined(e[a].minOpacity)&&!t.isNullOrUndefined(e[a].maxOpacity)&&n&&(o=L(e[a],l)),(""===n||t.isNullOrUndefined(n))&&t.isNullOrUndefined(e[a].from)&&t.isNullOrUndefined(e[a].to)&&t.isNullOrUndefined(e[a].minOpacity)&&t.isNullOrUndefined(e[a].maxOpacity)&&t.isNullOrUndefined(e[a].value)&&(n="[object Array]"===Object.prototype.toString.call(e[a].color)?e[a].color[0]:e[a].color),o=t.isNullOrUndefined(o)?"1":o,r.push(n)}for(var h=r.length-1;h>=0;h--)h=(n=r[h])?-1:h;return{fill:n,opacity:o}}function L(e,t){var i=1;return t>=e.from&&t<=e.to&&(i=(t-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity),i.toString()}function T(e,t){return N(e,t)}function M(e,t,i){return"#"+G(e)+G(t)+G(i)}function N(e,t){var i;return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:M((i=_(Number(t),e)).r,i.g,i.b)}function _(e,t){var i=t.from,l=t.to,n=0,o=l-i;n=(e-i)/o;var r,a;if(t.color.length<=2)r="#"===t.color[0].charAt(0)?t.color[0]:X(t.color[0]),a="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:X(t.color[t.color.length-1]);else{r="#"===t.color[0].charAt(0)?t.color[0]:X(t.color[0]),a="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:X(t.color[t.color.length-1]);for(var s=o/(t.color.length-1),d=t.color.length-1,h=[],p={},g=1;g<d;g++)p={b:i+g*s,color:t.color[g]},h.push(p);for(var c=0;c<h.length;c++)i<=e&&e<=h[c].b&&0===c?(a="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/s):(e-h[c].b)/s):h[c].b<=e&&e<=l&&c===h.length-1&&(r="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/s):(e-h[c].b)/s),c!==h.length-1&&c<h.length&&h[c].b<=e&&e<=h[c+1].b&&(r="#"===h[c].color.charAt(0)?h[c].color:X(h[c].color),a="#"===h[c+1].color.charAt(0)?h[c+1].color:X(h[c+1].color),n=Math.abs(e-h[c+1].b)/s)}return E(n,r,a)}function E(e,t,i){var l=i.split("#")[1],n=t.split("#")[1],o=D(e,parseInt(n.substr(0,2),16),parseInt(l.substr(0,2),16)),r=D(e,parseInt(n.substr(2,2),16),parseInt(l.substr(2,2),16)),a=D(e,parseInt(n.substr(4,2),16),parseInt(l.substr(4,2),16));return new Me(o,r,a)}function D(e,t,i){var l=i-t;return Math.round(t+l*e)}function P(e,t,i){for(var l,n=t.split(" "),o="",s=[],d=0,h=n.length;d<h;d++)l=n[d],r(o.concat(l),i).width<e?o=o.concat((""===o?"":" ")+l):""!==o?(s.push(a(e,o,i)),o=l):(s.push(a(e,l,i)),l=""),o&&d===h-1&&s.push(a(e,o,i));return s}function B(e,t,i){var l=[],n=0,o=r(t,i).width,a=t.length;if(e>=o)return l.push(t),l;for(var s=t.length;s>n;s--){var d=t.slice(n,s);if((o=r(d,i).width)<=e){if(l.push(d),n+=d.length,a===n)return l;s=a+1}}return l}function z(e,t,i,l){var n=r(i,l);return n.width>e||n.height>t?" ":i}function H(e,t){return e.itemArea===t.itemArea?0:e.itemArea<t.itemArea?1:-1}function R(e,t,i){var l=e.levelSelection;if(l)for(var n=0;n<l.length;n++)t.getAttribute("id")===l[n]||t.children[0].id===l[n]?t.childElementCount>0&&-1===t.children[0].id.indexOf("_Group")&&(t.children[0].setAttribute("class",i),A(t.childNodes[0],{border:e.selectionSettings.border,fill:e.selectionSettings.fill,opacity:e.selectionSettings.opacity})):t.setAttribute("class","")}function U(e,i){var l=e.legendId;if(l)for(var n=0;n<l.length;n++)if("Interactive"===e.legendSettings.mode){for(var o=0;o<i.childElementCount;o++)if(i.childNodes[o].id===l[n]||parseFloat(i.childNodes[o].id.split("Index_")[1])===parseFloat(l[n].split("Index_")[1])){var r=i.childNodes[o];r.setAttribute("fill",e.selectionSettings.fill),r.setAttribute("opacity",e.selectionSettings.opacity),-1===r.id.indexOf("Text")?(r.setAttribute("stroke-width",e.selectionSettings.border.width.toString()),r.setAttribute("stroke",e.selectionSettings.border.color)):(r.setAttribute("stroke",null),r.setAttribute("stroke-width",null))}}else{var a=document.getElementById(l[n]);t.isNullOrUndefined(a)||(a.setAttribute("fill",e.selectionSettings.fill),a.setAttribute("opacity",e.selectionSettings.opacity),-1===a.id.indexOf("Text")?(a.setAttribute("stroke",e.selectionSettings.border.color),a.setAttribute("stroke-width",e.selectionSettings.border.width.toString())):(a.setAttribute("stroke",null),a.setAttribute("stroke-width",null)))}}function k(e,i,l){for(var n,o=0;o<e.length;o++)A(n=t.isNullOrUndefined(e[o].childNodes[0])?e[o]:e[o].childNodes[0],l.layout.renderItems[parseFloat(n.id.split("_Item_Index_")[1])].options),e[o].classList.remove(i),o-=1}function A(e,i){e.setAttribute("opacity",i.opacity),t.isNullOrUndefined(i.fill)?e.setAttribute("fill","black"):e.setAttribute("fill",i.fill),e.setAttribute("stroke",i.border.color),e.setAttribute("stroke-width",i.border.width)}function W(e,i,l){if(t.isNullOrUndefined(e))return null;for(var n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];e=e.split("${"+r+"}").join(j(i[r],l).toString())}return e}function j(e,t){return(t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e)||""}function V(e){return"#"+G(e.r)+G(e.g)+G(e.b)}function G(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function q(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new Me(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new Me(255,255,255)}function X(e){e="transparent"===e?"white":e;var t=document.getElementById("treeMapMeasureText");t.style.color=e;var i=(e=window.getComputedStyle(t).color).replace(/[()RGBrgba ]/g,"").split(",");return V(new Me(parseInt(i[0],10),parseInt(i[1],10),parseInt(i[2],10)))}function J(e,t,l,n,o){var r=new i.SvgRenderer(""),a=Y(e,l,t,o,n);return r["draw"+a.functionName](a.renderOption)}function Y(e,i,l,n,o){var r,a="Path",s=i.width,d=i.height,h=e.x,p=e.y,g=e.x+-s/2,c=e.y+-d/2;switch(l){case"Circle":case"Bubble":a="Ellipse",t.merge(n,{rx:s/2,ry:d/2,cx:h,cy:p});break;case"VerticalLine":r="M "+h+" "+(p+d/2)+" L "+h+" "+(p+-d/2),t.merge(n,{d:r});break;case"Diamond":r="M "+g+" "+p+" L "+h+" "+(p+-d/2)+" L "+(h+s/2)+" "+p+" L "+h+" "+(p+d/2)+" L "+g+" "+p+" z",t.merge(n,{d:r});break;case"Rectangle":r="M "+g+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+d/2)+" L "+g+" "+(p+d/2)+" L "+g+" "+(p+-d/2)+" z",t.merge(n,{d:r});break;case"Triangle":r="M "+g+" "+(p+d/2)+" L "+h+" "+(p+-d/2)+" L "+(h+s/2)+" "+(p+d/2)+" L "+g+" "+(p+d/2)+" z",t.merge(n,{d:r});break;case"InvertedTriangle":r="M "+(h+s/2)+" "+(p-d/2)+" L "+h+" "+(p+d/2)+" L "+(h-s/2)+" "+(p-d/2)+" L "+(h+s/2)+" "+(p-d/2)+" z",t.merge(n,{d:r});break;case"Pentagon":for(var m=void 0,u=void 0,f=0;f<=5;f++)m=s/2*Math.cos(Math.PI/180*(72*f)),u=s/2*Math.sin(Math.PI/180*(72*f)),r=0===f?"M "+(h+m)+" "+(p+u)+" ":r.concat("L "+(h+m)+" "+(p+u)+" ");r=r.concat("Z"),t.merge(n,{d:r});break;case"Star":r="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(n,{d:r});break;case"Cross":r="M "+g+" "+p+" L "+(h+s/2)+" "+p+" M "+h+" "+(p+d/2)+" L "+h+" "+(p+-d/2),t.merge(n,{d:r});break;case"Image":a="Image",t.merge(n,{href:o,height:d,width:s,x:g,y:c})}return{renderOption:n,functionName:a}}function Z(e,t){for(var i=!1,l=0;l<e.length;l++)if(t.levelOrderName===e[l].levelOrderName){i=!0;break}return i}function Q(e){if(e.length>0)for(var t=0;t<e.length;t++){var i=e[t];K(i.legendEle,i.oldFill,i.oldOpacity,i.oldBorderColor,i.oldBorderWidth)}}function $(e,i){if(e.length>0)for(var l=0;l<e.length;l++){var n=e[l],o=parseFloat(n.legendEle.id.split("_Index_")[1]),r=n.legendEle.id.indexOf("Text")>-1?n.legendEle.id.replace("_Text",""):n.legendEle.id,a="Interactive"===i.legendSettings.mode?document.getElementById(r):document.getElementById(i.element.id+"_Legend_Shape_Index_"+o),s="Interactive"===i.legendSettings.mode?document.getElementById(r+"_Text"):document.getElementById(i.element.id+"_Legend_Text_Index_"+o);t.isNullOrUndefined(a)||K(a,n.oldFill,n.oldOpacity,"none","0px"),t.isNullOrUndefined(s)||K(s,i.legendSettings.textStyle.color||i.themeStyle.legendTextColor,n.oldOpacity,null,null);for(var d=t.isNullOrUndefined(n.ShapeCollection)?0:n.ShapeCollection.Elements.length,h=0;h<d;h++){var p=document.getElementById(n.ShapeCollection.Elements[h].id);t.isNullOrUndefined(p)||K(p,n.shapeOldFill,n.shapeOldOpacity,n.shapeOldBorderColor,n.shapeOldBorderWidth)}}}function K(e,i,l,n,o){e.setAttribute("fill",i),e.setAttribute("opacity",l),t.isNullOrUndefined(n)||e.setAttribute("stroke",n),t.isNullOrUndefined(o)||e.setAttribute("stroke-width",o)}function ee(e,t,i){$(e,i),k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function te(e,i,l){for(var n,o=""!==l.rangeColorValuePath?l.rangeColorValuePath:null,r=!1,a=0;a<e&&!r;a++){var s=l.treeMapLegendModule.legendCollections[a].legendData.length;if(s>0){for(var d=0;d<s;d++)if(!t.isNullOrUndefined(o)&&l.leafItemSettings.colorMapping.length>0?l.treeMapLegendModule.legendCollections[a].legendData[d].data[o]===i.data[o]:l.treeMapLegendModule.legendCollections[a].legendData[d].levelOrderName===i.levelOrderName||i.levelOrderName.indexOf(l.treeMapLegendModule.legendCollections[a].legendName)>-1){n=a,r=!0;break}}else if(l.palette&&l.palette.length>0&&(l.treeMapLegendModule.legendCollections[a].levelOrderName===i.levelOrderName||i.levelOrderName.indexOf(l.treeMapLegendModule.legendCollections[a].levelOrderName)>-1)&&l.treeMapLegendModule.legendCollections[a].legendName===i.name){n=a;break}}return n}function ie(e,t,i,l,n,o,r){e.push({legendEle:l,oldFill:r[t].legendFill,oldOpacity:r[t].opacity,oldBorderColor:r[t].borderColor,oldBorderWidth:r[t].borderWidth,shapeElement:n,shapeOldFill:o[i].options.fill,shapeOldOpacity:o[i].options.opacity,shapeOldBorderColor:o[i].options.border.color,shapeOldBorderWidth:o[i].options.border.width})}function le(e,i,l,n){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:l}}).dispatchEvent(new MouseEvent(n?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function ne(e){var i=document.getElementById(e);return i?t.remove(i):null}function oe(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":t={backgroundColor:i,titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:re,legendBorderColor:"#000000",legendBorderWidth:0};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontWeight:"Normal",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",labelFontFamily:re,fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",titleFontWeight:"Normal",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind":t={backgroundColor:"transparent",titleFontColor:"#374151",titleFontWeight:"Normal",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwinddark":t={backgroundColor:"transparent",titleFontColor:"#D1D5DB",titleFontWeight:"Normal",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontWeight:"Normal",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3":t={backgroundColor:"transparent",titleFontColor:"#111827",titleFontWeight:"600",subTitleFontColor:"#111827",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#111827",legendTextColor:"#111827",fontFamily:"Inter",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"tailwind3dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Inter",fontWeight:"400",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5":t={backgroundColor:"transparent",titleFontColor:"#212529",titleFontWeight:"400",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"bootstrap5dark":t={backgroundColor:"transparent",titleFontColor:"#DEE2E6",titleFontWeight:"400",subTitleFontColor:"#DEE2E6",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFontSize:"12px",tooltipFillOpacity:.9,legendTitleColor:"#DEE2E6",legendTextColor:"#DEE2E6",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"10px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",titleFontWeight:"Normal",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",titleFontWeight:"Normal",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFontSize:"13px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"Normal",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3":t={backgroundColor:"transparent",titleFontColor:"#1C1B1F",titleFontWeight:"500",subTitleFontColor:"#1C1B1F",tooltipFillColor:"#313033",tooltipFontColor:"#F4EFF4",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#1C1B1F",legendTextColor:"#49454E",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"material3dark":t={backgroundColor:"transparent",titleFontColor:"#E6E1E5",titleFontWeight:"500",subTitleFontColor:"#E6E1E5",tooltipFillColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#E6E1E5",legendTextColor:"#CAC4D0",fontFamily:"Roboto",fontSize:"16px",fontWeight:"400",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"Roboto",labelFontSize:"12px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2":t={backgroundColor:"transparent",titleFontColor:"#242424",titleFontWeight:"600",subTitleFontColor:"#242424",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#242424",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#242424",legendTextColor:"#242424",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#292929",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#000000",legendBorderWidth:0};break;case"fluent2highcontrast":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",titleFontWeight:"600",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Segoe UI",fontSize:"14px",fontWeight:"400",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI",labelFontSize:"10px",legendBorderColor:"#FFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",tooltipBorderWidth:1};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontWeight:"Normal",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",legendTitleColor:"#353535",legendTextColor:"#353535",fontSize:"15px",fontWeight:"Normal",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif",labelFontSize:"12px",labelFontFamily:re,legendBorderColor:"#000000",legendBorderWidth:0}}return t}var re="Roboto, Segoe UI, Noto, Sans-serif",ae=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function l(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(l.prototype=i.prototype,new l)}}(),se=function(e,t,i,l){var n,o=arguments.length,r=o<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property("#808080")],i.prototype,"color",void 0),se([t.Property(0)],i.prototype,"width",void 0),i}(t.ChildProperty),he=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(10)],i.prototype,"left",void 0),se([t.Property(10)],i.prototype,"right",void 0),se([t.Property(10)],i.prototype,"top",void 0),se([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),pe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"size",void 0),se([t.Property(null)],i.prototype,"color",void 0),se([t.Property(re)],i.prototype,"fontFamily",void 0),se([t.Property("")],i.prototype,"fontWeight",void 0),se([t.Property("Normal")],i.prototype,"fontStyle",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property("")],i.prototype,"text",void 0),se([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),ce=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Complex({fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),i}(ge),me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Complex({fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),se([t.Complex({},ce)],i.prototype,"subtitleSettings",void 0),i}(ge),ue=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"from",void 0),se([t.Property(null)],i.prototype,"to",void 0),se([t.Property(null)],i.prototype,"color",void 0),se([t.Property(null)],i.prototype,"label",void 0),se([t.Property(null)],i.prototype,"value",void 0),se([t.Property(null)],i.prototype,"minOpacity",void 0),se([t.Property(null)],i.prototype,"maxOpacity",void 0),se([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),fe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"visible",void 0),se([t.Property("Default")],i.prototype,"mode",void 0),se([t.Property("transparent")],i.prototype,"background",void 0),se([t.Property("Circle")],i.prototype,"shape",void 0),se([t.Property("")],i.prototype,"width",void 0),se([t.Property("")],i.prototype,"height",void 0),se([t.Complex({size:null,fontFamily:null,fontWeight:null},pe)],i.prototype,"textStyle",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(15)],i.prototype,"shapeWidth",void 0),se([t.Property(15)],i.prototype,"shapeHeight",void 0),se([t.Property(10)],i.prototype,"shapePadding",void 0),se([t.Property(null)],i.prototype,"imageUrl",void 0),se([t.Complex({color:null,width:null},de)],i.prototype,"border",void 0),se([t.Complex({color:"#000000",width:0},de)],i.prototype,"shapeBorder",void 0),se([t.Complex({},ge)],i.prototype,"title",void 0),se([t.Complex({size:null,fontFamily:null,fontWeight:null},pe)],i.prototype,"titleStyle",void 0),se([t.Property("Bottom")],i.prototype,"position",void 0),se([t.Property("None")],i.prototype,"orientation",void 0),se([t.Property(!1)],i.prototype,"invertedPointer",void 0),se([t.Property("After")],i.prototype,"labelPosition",void 0),se([t.Property("None")],i.prototype,"labelDisplayMode",void 0),se([t.Property("Center")],i.prototype,"alignment",void 0),se([t.Property({x:0,y:0})],i.prototype,"location",void 0),se([t.Property(null)],i.prototype,"showLegendPath",void 0),se([t.Property(null)],i.prototype,"valuePath",void 0),se([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),i}(t.ChildProperty),ye=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"groupIndex",void 0),se([t.Property(null)],i.prototype,"groupName",void 0),i}(t.ChildProperty),ve=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(!1)],i.prototype,"autoFill",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property(0)],i.prototype,"gap",void 0),se([t.Property(10)],i.prototype,"padding",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(!0)],i.prototype,"showLabels",void 0),se([t.Property(null)],i.prototype,"labelPath",void 0),se([t.Property(null)],i.prototype,"labelFormat",void 0),se([t.Property("TopLeft")],i.prototype,"labelPosition",void 0),se([t.Complex({color:null,size:null,fontFamily:null},pe)],i.prototype,"labelStyle",void 0),se([t.Property(null)],i.prototype,"labelTemplate",void 0),se([t.Property("Center")],i.prototype,"templatePosition",void 0),se([t.Property("Trim")],i.prototype,"interSectAction",void 0),se([t.Collection([],ue)],i.prototype,"colorMapping",void 0),i}(t.ChildProperty),Se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"visible",void 0),se([t.Property("")],i.prototype,"template",void 0),se([t.Property(null)],i.prototype,"format",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(.75)],i.prototype,"opacity",void 0),se([t.Property(["Circle"])],i.prototype,"markerShapes",void 0),se([t.Complex({width:null,color:null},de)],i.prototype,"border",void 0),se([t.Complex({fontFamily:null,size:null,fontWeight:null,opacity:null},pe)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),xe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"enable",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property("0.5")],i.prototype,"opacity",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property("Item")],i.prototype,"mode",void 0),i}(t.ChildProperty),be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(!1)],i.prototype,"enable",void 0),se([t.Property("#808080")],i.prototype,"fill",void 0),se([t.Property("0.5")],i.prototype,"opacity",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property("Item")],i.prototype,"mode",void 0),i}(t.ChildProperty),Ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ae(i,e),se([t.Property(null)],i.prototype,"groupPath",void 0),se([t.Property(0)],i.prototype,"groupGap",void 0),se([t.Property(10)],i.prototype,"groupPadding",void 0),se([t.Complex({},de)],i.prototype,"border",void 0),se([t.Property(null)],i.prototype,"fill",void 0),se([t.Property(!1)],i.prototype,"autoFill",void 0),se([t.Property(1)],i.prototype,"opacity",void 0),se([t.Property(!0)],i.prototype,"showHeader",void 0),se([t.Property(20)],i.prototype,"headerHeight",void 0),se([t.Property(null)],i.prototype,"headerTemplate",void 0),se([t.Property(null)],i.prototype,"headerFormat",void 0),se([t.Property("Near")],i.prototype,"headerAlignment",void 0),se([t.Complex({color:null,size:"13px",fontFamily:null},pe)],i.prototype,"headerStyle",void 0),se([t.Property("TopLeft")],i.prototype,"templatePosition",void 0),se([t.Collection([],ue)],i.prototype,"colorMapping",void 0),i}(t.ChildProperty),Ce=function(){function e(e,t){this.width=e,this.height=t}return e}(),Fe=function(){function e(e,t,i,l){this.x=e,this.y=t,this.width=i,this.height=l}return e}(),we=function(){function e(e,t,i,l,n,o){this.y=n.y,this.x=n.x,this.height=n.height,this.width=n.width,this.id=e,this.fill=t,this.opacity=l,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=o}return e}(),Oe=function(){function e(e,t,i,l,n,o,r){this.id=e,this.opacity=n,this.fill=t,this.stroke=l,this["stroke-width"]=i,this["stroke-dasharray"]=o,this.d=r}return e}(),Le=function(){function e(e,t,i,l,n,o,r,a){void 0===o&&(o=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=o,this.anchor=l,this.x=t,this.y=i,this.baseLine=r,this.connectorText=a}return e}(),Te=function(){function e(e,t){this.x=e,this.y=t}return e}(),Me=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),Ne=function(){function e(e,t,i,l,n){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=l,this.sendData=n}return e}(),_e=function(){function e(e){this.treemap=e}return e.prototype.processLayoutPanel=function(){var e,i;if(this.treemap.treemapLevelData.levelsData&&this.treemap.treemapLevelData.levelsData.length>0)if(e=t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||t.isNullOrUndefined(this.treemap.initialDrillDown.groupName)||(t.isNullOrUndefined(this.treemap.drilledItems)?!t.isNullOrUndefined(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?this.treemap.treemapLevelData.levelsData[0]:this.getDrilldownData(this.treemap.treemapLevelData.levelsData[0],[])[0],i=t.extend({},this.treemap.areaRect,i,!1),t.isNullOrUndefined(this.treemap.treeMapLegendModule)||t.isNullOrUndefined(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(i=this.treemap.totalRect),t.isNullOrUndefined(this.treemap.currentLevel)||(t.isNullOrUndefined(this.treemap.drilledItems)?t.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length))!t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)&&(t.isNullOrUndefined(this.treemap.drilledItems)?t.isNullOrUndefined(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(e||this.treemap.treemapLevelData.levelsData[0],i),this.renderLayoutItems();else{var l=this.treemap.drilledItems.length-1,n=this.treemap.drilledItems[l].data,o={};o[this.treemap.drilledItems[l].data.groupName]=[n],t.isNullOrUndefined(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[l].data.groupIndex),this.calculateLayoutItems(o||this.treemap.treemapLevelData.levelsData[0],i),this.renderLayoutItems()}},e.prototype.getDrilldownData=function(e,t){var i=this.treemap,l={},n=u(e).values;if(n&&n.length>0&&0===t.length){for(var o=0;o<n.length;o++)n[o].groupIndex===i.initialDrillDown.groupIndex&&n[o].name===i.initialDrillDown.groupName&&(n[o].isDrilled=!0,l[n[o].groupName]=[n[o]],t.push(l));for(var r=0;r<n.length;r++)this.getDrilldownData(n[r],t)}return t},e.prototype.calculateLayoutItems=function(e,i){this.renderItems=[],this.parentData=[],t.isNullOrUndefined(this.treemap.weightValuePath)||(this.treemap.layoutType.indexOf("SliceAndDice")>-1?this.computeSliceAndDiceDimensional(e,i):(i.height=i.height+i.y,i.width=i.width+i.x,this.computeSquarifyDimensional(e,i)))},e.prototype.computeSliceAndDiceDimensional=function(e,t){var i,l,n,o,r=this.treemap.leafItemSettings,a=this.treemap.levels,s=u(e).values;if(s&&s.length>0&&(this.sliceAndDiceProcess(s,t),this.treemap.levels.length>0))for(var d=0;d<s.length;d++)l=s[d].groupIndex,n=0===a.length||l===a.length?r.gap:a[l].groupGap,o=0===a.length?0:a[l]?a[l].showHeader?a[l].headerHeight:0:a[l-1].showHeader?a[l-1].headerHeight:0,i=s[d].rect,i=new Fe(i.x+n/2,i.y+(o+n/2),i.width-n,Math.abs(i.height-(n+o))),this.computeSliceAndDiceDimensional(s[d],i);return e},e.prototype.sliceAndDiceProcess=function(e,i){var l,n=i.height*i.width,o=this.treemap.levels,r=0,a=0;e.forEach(function(e){a+=e.weight}),e.forEach(function(e){e.weightArea=n*e.weight/a});var s="SliceAndDiceAuto"===this.treemap.layoutType?i.width>i.height:"SliceAndDiceHorizontal"===this.treemap.layoutType;e.sort(c);for(var d=0;d<e.length;d++){var h=e[d];h.isLeafItem=0===o.length||(this.treemap.isHierarchicalData||t.isNullOrUndefined(this.treemap.leafItemSettings.labelPath)?h.groupIndex===o.length-1:h.groupIndex===this.treemap.levels.length),s?(l=n/a*e[d].weight/i.height,r<=i.width&&(e[d].rect=new Fe(r+i.x,i.y,l,i.height))):(l=n/a*e[d].weight/i.width,r<=i.height&&(e[d].rect=new Fe(i.x,r+i.y,i.width,l))),r+=l,this.renderItems.push(e[d])}},e.prototype.computeSquarifyDimensional=function(e,t){var i,l,n,o,r,a=this.treemap.leafItemSettings,s=this.treemap.levels,d=u(e).values;if(d&&d.length>0&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(d)),this.calculateChildrenLayout(e,d,t),this.treemap.levels.length>0))for(var h=0;h<d.length;h++)n=(l=d[h]).groupIndex,i=l.rect,o=(l.isLeafItem?a.padding:s[n].groupPadding)/2,r=this.treemap.isHierarchicalData?0===n&&l.isLeafItem?0:s[n]&&s[n].showHeader?s[n].headerHeight:0:0===s.length?0:s[n]&&s[n].showHeader?s[n].headerHeight:0,i=new Fe(i.x+o,i.y+(r+o),i.width-o,i.height-o),!l.isLeafItem&&l.weight>0&&this.computeSquarifyDimensional(d[h],i)},e.prototype.calculateChildrenLayout=function(e,t,i){this.computeTotalArea(t,b(i)),t.sort(H),this.performRowsLayout(t,[],i,[])},e.prototype.performRowsLayout=function(e,t,i,l){var n=e.length;if(0===n){c=this.getCoordinates(t,i);return m=l.concat(c)}var o=I(i),r=e[0],a=e.slice(1,n);if(this.aspectRatio(t,r,o)){var s=t.concat(r);return this.performRowsLayout(a,s,i,l)}for(var d=t.length,h=0,p=0;p<d;p+=1)h+=t[p].itemArea;var g=this.cutArea(i,h),c=this.getCoordinates(t,i),m=l.concat(c);return this.performRowsLayout(e,[],g,m)},e.prototype.aspectRatio=function(e,t,i){if(0===e.length)return!0;var l=e.concat(t);return this.findMaxAspectRatio(e,i)>=this.findMaxAspectRatio(l,i)},e.prototype.findMaxAspectRatio=function(e,t){for(var i=e.length,l=1/0,n=-1/0,o=0,r=0;r<i;r+=1){var a=e[r].itemArea;a<l&&(l=a),a>n&&(n=a),o+=a}return Math.max(Math.pow(t,2)*n/Math.pow(o,2),Math.pow(o,2)/(Math.pow(t,2)*l))},e.prototype.cutArea=function(e,t){var i=C(e),l=i.width,n=i.height,o=i.x,r=i.y;if(l>=n){var a=t/n;return F(d={x:o+a,y:r,width:l-a,height:n})}var s=t/l,d={x:o,y:r+s,width:l,height:n-s};return F(d)},e.prototype.getCoordinates=function(e,i){for(var l,n=C(i),o=n.width,r=n.height,a=n.x,s=n.y,d=e.length,h=this.treemap.levels,p=this.treemap.leafItemSettings,g=0,c=0;c<d;c+=1)g+=e[c].itemArea;for(var m,u,f,y=g/r,v=g/o,S=a,x=s,b=[],c=0;c<d;c+=1){var I=e[c];if(l=I.groupIndex,I.isLeafItem=0===h.length||(this.treemap.isHierarchicalData?l===h.length:!t.isNullOrUndefined(p.labelPath)&&l===h.length),u=Z(this.parentData[0],I),f=u?this.treemap.areaRect:I.parent.rect,m=I.isLeafItem?p.padding:h[l].groupPadding,o>=r){var F=x+I.itemArea/y;I.rect={x:S,y:x,width:S+y,height:F},x=F}else{var w=S+I.itemArea/v;I.rect={x:S,y:x,width:w,height:x+v},S=w}I.weight>0&&(u||Math.round(i.y+m/2)<=Math.round(f.y+(f.height-f.y))&&Math.round(i.x+m/2)<=Math.round(f.x+(f.width-f.x)))&&(this.renderItems.push(I),b.push(I))}return b},e.prototype.computeTotalArea=function(e,t){for(var i=e.length,l=[],n=0;n<i;n+=1){for(var o=e.length,r=0,a=0;a<o;a+=1)r+=e[a].weight;for(var s=t/r,d=void 0,h=0;h<o;h++)(d=e[h]).itemArea=d.weight*s,l.push(d)}return l},e.prototype.onDemandProcess=function(e){var i,l={};l=e[0].parent,this.treemap.currentLevel=l.isDrilled?l.groupIndex:null;var n={};t.isNullOrUndefined(l.groupName)?n=l:n[l.groupName]=[l],i=t.extend({},this.treemap.areaRect,i,!1),t.isNullOrUndefined(this.treemap.treeMapLegendModule)||t.isNullOrUndefined(this.treemap.totalRect)||(i=this.treemap.totalRect);for(var o=this.treemap.levels.length,r=0;r<o;r++)o===e[0].groupIndex?this.treemap.levels[o]=this.treemap.levels[r]:this.treemap.levels.splice(o-1,1);this.calculateLayoutItems(n,i),this.renderLayoutItems()},e.prototype.renderLayoutItems=function(){var e,i,l,n,o=this,r=this.treemap;this.renderer=r.renderer;var a,s,d,h,p,g,c,m,f,y,v,S,x,b=r.element.id,I=r.layoutType,F=this.treemap.leafItemSettings.interSectAction,w="",O=document.getElementById(r.element.id+"_Secondary_Element"),L=r.levels;this.layoutGroup=this.renderer.createGroup({id:b+"_TreeMap_"+I+"_Layout"});var T,M,N,_=t.createElement("div",{id:r.element.id+"_Label_Template_Group",className:"template"});_.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+r.areaRect.y+"px;left:"+r.areaRect.x+"px;height:"+r.areaRect.height+"px;width:"+r.areaRect.width+"px;";for(var E,D,P=!1,B=r.leafItemSettings,z=this,H=0;H<this.renderItems.length;H++)!function(I){if(c=z.renderItems[I],s=c.groupIndex,z.treemap.drillDownView&&t.isNullOrUndefined(z.treemap.currentLevel)&&s>0||z.treemap.drillDownView&&s>z.treemap.currentLevel+1)return"continue";h=c.rect,P=c.isLeafItem,y=b+"_Level_Index_"+s+"_Item_Index_"+I,T=z.renderer.createGroup({id:y+"_Group"}),S=(P?B.gap:L[s].groupGap)/2;var H=z.treemap.totalRect?r.legendSettings.visible?z.treemap.totalRect:C(z.treemap.totalRect):z.treemap.areaRect;"Squarified"===r.layoutType&&(h.width=Math.abs(h.x-h.width)-S,h.height=Math.abs(h.y-h.height)-S),"TopRightBottomLeft"===r.renderDirection?h.x=H.x+H.width-h.width-Math.abs(H.x-h.x):"BottomLeftTopRight"===r.renderDirection?h.y=H.y+H.height-h.height-Math.abs(H.y-h.y):"BottomRightTopLeft"===r.renderDirection&&(h.x=H.x+H.width-h.width-Math.abs(H.x-h.x),h.y=H.y+H.height-h.height-Math.abs(H.y-h.y)),l=z.getItemColor(P,c),g=l.fill,f=l.opacity,p=P?B.labelFormat:L[s].headerFormat;var U;if(i=P?B.showLabels:L[s].showHeader,s===z.treemap.currentLevel)if(z.treemap.enableBreadcrumb){D="#"+z.treemap.breadcrumbConnector+"#",U=c.levelOrderName.replace(/#/gi,D),U=0!==s?"#"+U:U}else U=c.name;else z.treemap.enableBreadcrumb&&(c.isDrilled=!1),U=c.name;m=W(p,c.data,z.treemap)||U||"undefined",E=u(c).values,m=!P&&E&&E.length>0&&z.treemap.enableDrillDown?c.isDrilled?r.enableRtl?m+" [-]":"[-] "+m:r.enableRtl?m+" [+]":"[+] "+m:m,r.enableHtmlSanitizer&&(m=t.SanitizeHtmlHelper.sanitize(m));var k=P?B.labelStyle.fontFamily:L[s].headerStyle.fontFamily;k=k||z.treemap.themeStyle.labelFontFamily;var A=P?B.labelStyle.size:L[s].headerStyle.size;A=A||z.treemap.themeStyle.labelFontSize;var j=P?B.labelStyle.fontWeight:L[s].headerStyle.fontWeight;j=j||z.treemap.themeStyle.fontWeight;var V=P?B.labelStyle.color:L[s].headerStyle.color,G=P?B.labelStyle.fontStyle:L[s].headerStyle.fontStyle,q=P?B.labelStyle.opacity:L[s].headerStyle.opacity;x={fontFamily:k,size:A,fontWeight:j,color:V,fontStyle:G,opacity:q},N=P?B.border:L[s].border,e=P?B.labelPosition:"Near"===L[s].headerAlignment?"TopLeft":"Center"===L[s].headerAlignment?"TopCenter":"TopRight",d=P?B.templatePosition:L[s].templatePosition,M=P?B.labelTemplate:L[s].headerTemplate,c.options={border:N,opacity:f,fill:g},n={cancel:!1,name:"itemRendering",treemap:z.treemap,text:m,currentItem:c,RenderItems:z.renderItems,options:c.options,textColor:x.color},z.treemap.trigger("itemRendering",n,function(l){if(!l.cancel){w=" M "+h.x+" "+h.y+" L "+(h.x+h.width)+" "+h.y+" L "+(h.x+h.width)+" "+(h.y+h.height)+" L "+h.x+" "+(h.y+h.height)+"z",a=new Oe(y+"_RectPath",g,N.width,N.color,f,null,w);var r=o.renderer.drawPath(a);T.appendChild(r),i&&(n.text!==m&&(n.text=W(n.text,c.data,o.treemap)||U),x.color=n.textColor?n.textColor:x.color,o.renderItemText(n.text.toString(),T,x,h,F,y,g,e,D)),M&&(v=o.renderTemplate(O,y,h,d,M,c,P),t.isNullOrUndefined(v)||(_.appendChild(v),o.treemap.renderReactTemplates())),T.setAttribute("aria-label",c.name),o.treemap.enableDrillDown&&!P||o.treemap.selectionSettings.enable||o.treemap.highlightSettings.enable?(T.setAttribute("role","button"),T.setAttribute("tabindex",o.treemap.tabIndex.toString()),T.style.outline="none",T.style.cursor=o.treemap.highlightSettings.enable&&!o.treemap.selectionSettings.enable&&o.treemap.enableDrillDown&&c.groupIndex===o.treemap.levels.length-1?"default":!o.treemap.highlightSettings.enable||o.treemap.selectionSettings.enable||o.treemap.enableDrillDown?"pointer":"default"):T.setAttribute("role","region"),R(o.treemap,T,"treeMapSelection"),o.layoutGroup.appendChild(T)}})}(H);_.childNodes.length>0&&O.appendChild(_),this.treemap.svgObject.appendChild(this.layoutGroup),R(this.treemap,this.layoutGroup,"treeMapSelection")},e.prototype.renderItemText=function(e,i,l,n,o,s,d,p,g){var c,m,u,f=[],y=[],v=0;if(f=-1!==e.indexOf("<br>")?e.split("<br>"):null,m=this.labelInterSectAction(n,e,l,o),c=r(f&&f[0]||m[0],l),this.treemap.enableRtl){var x=r(e,l),b=e.search("[+]")||e.search("[-]");if(n.width<x.width&&b>0){var I=e.substring(b-1,e.length),C=r("[+]",l);m[0]=a(n.width-C.width-5,m[0],l)+I}}var F=S(n,p,c,"Text",this.treemap);if(!t.isNullOrUndefined(f)){for(var w=[],O=null,L=[],T=0;T<f.length;T++)v+=(c=r(O=a(n.width-5,f[T],l),l)).height,L.push(c.width),w.push(O);m=w,c.width=Math.max.apply(null,L),c.height=v}if("WrapByWord"===o||"Wrap"===o||"Trim"===o){for(var M=0;M<m.length;M++)v+=(c=r(m[M],l)).height,n.height-5>v&&y.push(m[M]);if("Wrap"===o&&m.length!==y.length&&y.length){var N=y.length-1,_=y[N];_=_.substring(0,_.length-1)+"...",y.splice(N),"..."!==_&&y.push(_)}}else u=m,y.push(u);h(new Le(s+"_Text",F.x,F.y,"start",y,"","",g),l,l.color||this.getSaturatedColor(d),i)},e.prototype.getItemColor=function(e,i){var l=this.treemap,n=e?l.leafItemSettings.fill:l.levels[i.groupIndex].fill,o=e?l.leafItemSettings.opacity:l.levels[i.groupIndex].opacity;t.isNullOrUndefined(l.treemapLevelData.defaultLevelsData)||l.treemapLevelData.defaultLevelsData.length>0&&(l.treemapLevelData.levelsData=l.treemapLevelData.defaultLevelsData);var r=u(l.treemapLevelData.levelsData[0]).values,a=e?l.leafItemSettings.colorMapping:l.levels[i.groupIndex].colorMapping;if(a.length>0){var s=O(a,i.data[l.equalColorValuePath],i.data[l.rangeColorValuePath]);t.isNullOrUndefined(s)||(n=t.isNullOrUndefined(s.fill)?l.leafItemSettings.fill:s.fill,o=s.opacity)}else for(var d=0;d<r.length;d++)r[d].levelOrderName===i.levelOrderName.split("#")[0]&&(n=t.isNullOrUndefined(n)?t.isNullOrUndefined(l.colorValuePath)?t.isNullOrUndefined(i.options)?!t.isNullOrUndefined(l.palette)&&l.palette.length>0?l.palette[d%l.palette.length]:"#808080":i.options.fill:r[d].data[l.colorValuePath]:n);return{fill:n,opacity:o}},e.prototype.getSaturatedColor=function(e){var t=e,i=q(X(t="transparent"===t?window.getComputedStyle(document.body,null).backgroundColor:t));return Math.round((299*i.r+587*i.g+114*i.b)/1e3)>=128?"black":"white"},e.prototype.renderTemplate=function(e,i,l,n,o,r,a){var s=a?i+"_LabelTemplate":i+"_HeaderTemplate",d=a?"_LabelTemplate":"_HeaderTemplate";if(t.isNullOrUndefined(o.prototype)&&"string"==typeof o)for(var h=Object.keys(r.data),p=0;p<h.length;p++){var g=RegExp;o=o.replace(new g("{{:"+h[p]+"}}","g"),r.data[h[p].toString()])}this.treemap.enableHtmlSanitizer&&"string"==typeof o&&(o=t.SanitizeHtmlHelper.sanitize(o));var c;if(!t.isNullOrUndefined(document.getElementById(this.treemap.element.id+"_Secondary_Element"))){var m=S(l,n,x(c=v(y(o)(r.data,this.treemap,o,this.treemap.element.id+d,!1),s,r.data),e),"Template",this.treemap);c.style.left=m.x+"px",c.style.top=m.y+"px"}return c},e.prototype.labelInterSectAction=function(e,t,i,l){var n,o=e.width-10;switch(l){case"Hide":n=[z(o,e.height,t,i)];break;case"Trim":n=[a(o+3,t,i)];break;case"WrapByWord":n=P(o,t,i);break;case"Wrap":n=B(o,t,i)}return n},e.prototype.destroy=function(){this.treemap=null,this.currentRect=null,this.layoutGroup=null,this.renderer=null,this.renderItems=[],this.parentData=[]},e}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(e.Theme||(e.Theme={}));var Ee=function(){function e(e){}return e.prototype.print=function(e,i){var l=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no");l.moveTo(0,0),l.resizeTo(screen.availWidth,screen.availHeight);var n={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:"beforePrint"};e.trigger("beforePrint",n,function(){n.cancel||t.print(n.htmlContent,l)})},e.prototype.getHTMLContent=function(e,i){var l=t.createElement("div");if(i)i instanceof Array?i.forEach(function(e){l.appendChild(g(e).cloneNode(!0))}):i instanceof Element?l.appendChild(i.cloneNode(!0)):l.appendChild(g(i).cloneNode(!0));else{var n=e.element.cloneNode(!0),o=n.getElementsByTagName("svg")[0];if(!t.isNullOrUndefined(o)&&(o=o.childNodes[0],!t.isNullOrUndefined(o))){var r=o.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||o.setAttribute("fill","rgba(0, 0, 0, 1)"):o.setAttribute("fill","rgba(255,255,255, 1)")}l.appendChild(n)}return l},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),De=function(){function e(e){}return e.prototype.export=function(e,i,l,n){return new Promise(function(o,r){var a=t.createElement("canvas",{id:"ej2-canvas",attrs:{height:e.availableSize.height.toString(),width:e.availableSize.width.toString()}}),s=e.svgObject.cloneNode(!0),d=s.childNodes[0];if(!t.isNullOrUndefined(d)){var h=d.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h||s.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):s.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),g='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+s.outerHTML+"</svg>",c=window.URL.createObjectURL(new Blob("SVG"===i?[g]:[(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}));if("SVG"===i)n?le(l,i,c,p):o(null);else{var m=new Image,u=a.getContext("2d");m.onload=function(){u.drawImage(m,0,0),window.URL.revokeObjectURL(c),n?le(l,i,a.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"JPEG"===i?o(a.toDataURL("image/jpeg")):"PNG"===i&&o(a.toDataURL("image/png"))},m.src=c}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),Pe=function(){function e(e){}return e.prototype.export=function(e,i,l,o,r){return new Promise(function(i,a){var s=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});o=t.isNullOrUndefined(o)?n.PdfPageOrientation.Landscape:o;var d=e.svgObject.cloneNode(!0),h=d.childNodes[0];if(!t.isNullOrUndefined(h)){var p=h.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p||d.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):d.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var g=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(d)],{type:"image/svg+xml"})),c=new Image,m=s.getContext("2d");c.onload=function(){m.drawImage(c,0,0),window.URL.revokeObjectURL(g);var t=new n.PdfDocument,a=s.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");t.pageSettings.orientation=o,a=a.slice(a.indexOf(",")+1),t.pages.add().graphics.drawImage(new n.PdfBitmap(a),0,0,e.availableSize.width-60,e.availableSize.height),r?(t.save(l+".pdf"),t.destroy()):i(null)},c.src=g})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}(),Be=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function l(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(l.prototype=i.prototype,new l)}}(),ze=function(e,t,i,l){var n,o=arguments.length,r=o<3?t:null===l?l=Object.getOwnPropertyDescriptor(t,i):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,l);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},He=function(e){function n(t,i){var l=e.call(this,t,i)||this;return l.isResize=!1,l.orientation="Horizontal",l.drilledItems=[],l.isHierarchicalData=!1,l.levelSelection=[],l.legendId=[],l}return Be(n,e),n.prototype.preRender=function(){var e=this;this.trigger("load",{treemap:this},function(){e.initPrivateVariable(),e.unWireEVents(),e.createSvg(),e.wireEVents(),e.setCulture()})},n.prototype.render=function(){this.renderElements()},n.prototype.renderElements=function(){this.treemapLevelData=new Re,this.treemapLevelData.levelsData=null,this.treemapLevelData.defaultLevelsData=null,this.treemapLevelData.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=oe(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),t.isNullOrUndefined(this.treemapLevelData.levelsData)||(this.treemapLevelData.defaultLevelsData=this.treemapLevelData.levelsData),this.processDataManager()},n.prototype.processDataManager=function(){var e,i,n,o,r=this;this.dataSource instanceof l.DataManager?(e=this.dataSource,i=this.query instanceof l.Query?this.query:new l.Query,e.executeQuery(i).then(function(e){r.dataSource=e.result,r.renderTreeMapElements()})):this.dataSource instanceof Ne?(o=this.dataSource,(n=new t.Fetch(o.dataOptions,o.type,o.contentType)).onSuccess=function(e){if(t.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type)r.dataSource=e,r.renderTreeMapElements();else{var i=new FileReader,l=r;i.onload=function(){e=JSON.parse(i.result.toString()),l.dataSource=e,l.renderTreeMapElements()},i.readAsText(e)}},n.send(o.sendData)):this.renderTreeMapElements()},n.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),!t.isNullOrUndefined(this.treeMapLegendModule)&&this.legendSettings.visible&&U(this,this.treeMapLegendModule.legendGroup),this.elementChange(),this.trigger("loaded",{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},n.prototype.createSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}t.isNullOrUndefined(this.renderer)&&(this.renderer=new i.SvgRenderer(this.element.id)),t.isNullOrUndefined(this.layout)&&(this.layout=new _e(this)),this.clearTemplate();var e=this.element.clientWidth,l=this.element.clientHeight;this.availableSize=new Ce(o(this.width,e)||e||600,o(this.height,l)||l||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},n.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-treemap").length;this.element.id="treemap_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.layout=new _e(this)},n.prototype.createSecondaryElement=function(){var e=document.getElementById(this.element.id+"_Secondary_Element");if(e&&e.childElementCount>0&&e.parentNode.removeChild(e),t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var i=t.createElement("div",{id:this.element.id+"_Secondary_Element"});i.style.cssText="position: absolute;z-index:1;",this.element.appendChild(i)}},n.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!t.isNullOrUndefined(this.svgObject)&&!t.isNullOrUndefined(document.getElementById(this.layout.layoutGroup.id))&&!t.isNullOrUndefined(document.getElementById(this.treeMapLegendModule.legendGroup.id))&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},n.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");if((this.border.width>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var l=new we(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new Fe(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(l))}else i&&i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},n.prototype.renderTitle=function(e,i,l,n){var o,d={color:e.textStyle.color,size:e.textStyle.size,fontFamily:e.textStyle.fontFamily,fontStyle:e.textStyle.fontStyle,fontWeight:e.textStyle.fontWeight,opacity:e.textStyle.opacity},p=this.availableSize.width-this.margin.right-this.margin.left;if(d.fontFamily=d.fontFamily||this.themeStyle.fontFamily,d.fontWeight=d.fontWeight||this.themeStyle.titleFontWeight,d.size=d.size||("title"===i?this.themeStyle.fontSize:this.themeStyle.subtitleFontSize),e.text){t.isNullOrUndefined(n)&&(n=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var g=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text,c=a(p,g,d),m=r(c,d),u=s(t.isNullOrUndefined(l)?new Fe(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):l,e.alignment,m,i),f=new Le(this.element.id+"_TreeMap_"+i,u.x,u.y,"start",c),y=new Fe(u.x,u.y,m.width,m.height),v=h(f,d,d.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),n);v.setAttribute("aria-label",e.description||g),v.setAttribute("role","region"),v.setAttribute("tabindex",this.tabIndex.toString()),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(o=this.availableSize.height-y.y-10-this.margin.bottom,this.areaRect=new Fe(this.margin.left,y.y+10,p,o)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",y,n):this.svgObject.appendChild(n)}else o=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new Fe(this.margin.left,this.margin.top,p,o)},n.prototype.processingData=function(){var e,i=this;if(this.dataSource=this.dataSource,!t.isNullOrUndefined(this.dataSource)&&this.dataSource.length>0&&this.weightValuePath){if(this.treemapLevelData.levelsData=[],this.dataSource.map(function(e){e[i.weightValuePath]=e[i.weightValuePath]?e[i.weightValuePath].toString():e[i.weightValuePath]}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var l={};l.level=0,e=this.leafItemSettings.labelPath,l[e]=[];for(o=0;o<this.dataSource.length;o++){var n=u(this.dataSource[o]).values;this.isHierarchicalData&&n&&n.length>0?n.forEach(function(t){t[e]&&l[e].push({groupIndex:0,name:t[e],levelOrderName:t[e].toString(),data:t,weight:t[i.weightValuePath]})}):this.dataSource[o][e]&&l[e].push({groupIndex:0,name:this.dataSource[o][e],levelOrderName:this.dataSource[o][e].toString(),data:this.dataSource[o],weight:this.dataSource[o][this.weightValuePath]})}this.treemapLevelData.levelsData.push(l)}else{if(this.isHierarchicalData){this.treemapLevelData.hierarchyData=[],this.treemapLevelData.hierarchyData=t.extend([],this.dataSource,this.treemapLevelData.hierarchyData,!0);for(var o=0;o<this.treemapLevelData.hierarchyData.length;o++)this.processHierarchicalData(this.treemapLevelData.hierarchyData[o],o);this.treemapLevelData.levelsData=this.treemapLevelData.hierarchyData}else this.processFlatJsonData(),this.treemapLevelData.levelsData.length>1&&this.reOrderLevelData(this.treemapLevelData.levelsData.length-1);e=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(this.treemapLevelData.levelsData[0][e],"Parent")}},n.prototype.checkIsHierarchicalData=function(){var e;this.dataSource=this.dataSource;for(var t=0;t<this.dataSource.length;t++){if((e=u(this.dataSource[t]).values)&&e.length){this.isHierarchicalData=!0;break}t===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},n.prototype.processHierarchicalData=function(e,i){var l,n,o,r=this,a={},s=this.leafItemSettings.labelPath?this.leafItemSettings.labelPath:this.weightValuePath;if(a=u(e),(l=a?a.values:null)&&l.length>0){o=a.key;for(var d=0;d<this.levels.length;d++)o===this.levels[d].groupPath&&(n=d);for(var h=0;h<l.length;h++){l[h].name=l[h][s],l[h].levelOrderName=(0===n?l[h].name:e.levelOrderName+"#"+l[h].name)+"";var p=l[h].levelOrderName,g=void 0;p.search("#")>0&&(g=p.split("#").length-1),l[h].groupIndex=t.isNullOrUndefined(n)?g===this.levels.length?this.levels.length:g:n,0!==n&&(l[h].parent=e),l[h].groupName=o,l[h].data=l[h],l[h].isDrilled=!1,l[h].weight=l[h][this.weightValuePath]}l.forEach(function(e){r.processHierarchicalData(e,i)})}if(i===this.treemapLevelData.hierarchyData.length-1){var c=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];if(!t.isNullOrUndefined(c)){for(var m=0;m<this.treemapLevelData.hierarchyData.length;m++)l=u(this.treemapLevelData.hierarchyData[m]).values,0!==m&&l&&(l.forEach(function(e){c.push(e)}),this.treemapLevelData.hierarchyData.splice(m,1),m-=1);c=this.treemapLevelData.hierarchyData[0][this.levels[0].groupPath];for(var f=0;f<c.length;f++)a[this.levels[0].groupPath]=c,c[f].parent=a}}},n.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(this,e)},n.prototype.export=function(e,i,l,n){var o=this;return t.isNullOrUndefined(n)&&(n=!0),"PDF"===e&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(t,r){t(o.pdfExportModule.export(o,e,i,l,n))}):this.allowImageExport&&"PDF"!==e&&this.imageExportModule?new Promise(function(t,l){t(o.imageExportModule.export(o,e,i,n))}):null},n.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var e,i=[],l=0;l<this.levels.length+1;l++){e=this.levels[l]?this.levels[l].groupPath:this.leafItemSettings.labelPath;var n={};n.level=l,n[e]=[],this.treemapLevelData.levelsData.push(n);for(var o=0;o<this.dataSource.length;o++){var r={},a="";if(!t.isNullOrUndefined(e)){var s=this.dataSource[o][e];if(0!==l)for(var d=0;d<=l;d++){var h=this.levels[d]?this.levels[d].groupPath:e;a+=this.dataSource[o][h]+(d===l?"":"#")}i.length>0&&-1!==i.indexOf(a||s)||(r.name=s,r.levelOrderName=(a||s)+"",r.groupIndex=l,r.isDrilled=!1,r.groupName=e,r.data=this.dataSource[o],this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][e].push(r),i.push(a||s))}}}},n.prototype.reOrderLevelData=function(e){for(var i,l=this.levels[e]?this.levels[e].groupPath:this.leafItemSettings.labelPath,n=this.levels[e-1].groupPath,o=this.treemapLevelData.levelsData[e][l],r=this.treemapLevelData.levelsData[e-1][n],a=0;a<o.length;a++){i=o[a].levelOrderName;for(var s=0;s<r.length;s++)if(r[s][l]=t.isNullOrUndefined(r[s][l])?[]:r[s][l],this.IsChildHierarchy(i.split("#"),r[s].levelOrderName.split("#"))){t.isNullOrUndefined(o[a].parent)&&(o[a].parent=r[s]),r[s][l].push(o[a]);break}}this.findTotalWeight(this.treemapLevelData.levelsData[this.treemapLevelData.levelsData.length-1][l],"Child"),this.treemapLevelData.levelsData.splice(e,1),e-1>0&&this.reOrderLevelData(e-1)},n.prototype.IsChildHierarchy=function(e,t){for(var i=!1,l=0;l<t.length;l++){if(e.length<l||t[l]!==e[l])return!1;i=!0}return i},n.prototype.findTotalWeight=function(e,t){for(var i,l,n,o=this,r={},a=this,s=0;s<e.length;s++)!function(s){i=0,n=e[s].groupName,l=e[s].levelOrderName.split("#"),a.dataSource.forEach(function(t){m(l,e[s].levelOrderName,t,o)&&(i+=parseFloat(t[o.weightValuePath]))}),"Parent"===t&&(r[n]=e,e[s].parent=r),e[s].weight=i}(s)},n.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.clickOnTreeMap),t.EventHandler.remove(this.element,"dblclick",this.doubleClickOnTreeMap),t.EventHandler.remove(this.element,"contextmenu",this.rightClickOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnTreeMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnTreeMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focusout",this.focusHandler),window.removeEventListener("resize",this.resizeEvent)},n.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.clickOnTreeMap,this),t.EventHandler.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),t.EventHandler.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnTreeMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnTreeMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focusout",this.focusHandler,this),this.resizeEvent=this.resizeOnTreeMap.bind(this),window.addEventListener("resize",this.resizeEvent)},n.prototype.setCulture=function(){this.intl=new t.Internationalization},n.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("role","region"),this.element.setAttribute("tabindex",this.tabIndex.toString())},n.prototype.resizeOnTreeMap=function(e){var i=this;if(!this.isDestroyed){this.isResize=!0;var l={name:"resize",cancel:!1,previousSize:this.availableSize,currentSize:new Ce(0,0),treemap:this};this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSvg(),i.refreshing=!0,i.wireEVents(),l.currentSize=i.availableSize,i.trigger("resize",l,function(e){i.render(),i.refreshing=!1})},500))}},n.prototype.clickOnTreeMap=function(e){var i,l,n=this,o=e.target,r=o.id,a=o.innerHTML,s={cancel:!1,name:"click",treemap:this,mouseEvent:e};this.trigger("click",s),r.indexOf("_Item_Index")>-1&&(e.preventDefault(),l=parseFloat(r.split("_Item_Index_")[1]),i={cancel:!1,name:"itemClick",treemap:this,item:this.layout.renderItems[l],mouseEvent:e,groupIndex:this.layout.renderItems[l].groupIndex,groupName:this.layout.renderItems[l].name,text:a,contentItemTemplate:a},this.trigger("itemClick",i,function(e){e.text===a&&e.contentItemTemplate===a||(t.isNullOrUndefined(n.leafItemSettings.labelTemplate)?(e.text=W(e.text,e.item.data,e.treemap),o.textContent=e.text):p(r,o,e.contentItemTemplate))}));var d,h=(new Date).getMilliseconds();t.isNullOrUndefined(this.doubleClick)||(!t.isNullOrUndefined(d)&&h-d<500&&this.doubleClickOnTreeMap(e),d=h)},n.prototype.doubleClickOnTreeMap=function(e){var t={cancel:!1,name:"doubleClick",treemap:this,mouseEvent:e};this.trigger("doubleClick",t)},n.prototype.rightClickOnTreeMap=function(e){var t={cancel:!1,name:"rightClick",treemap:this,mouseEvent:e};this.trigger("rightClick",t)},n.prototype.mouseDownOnTreeMap=function(e){e.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),"touchstart"!==e.type&&"mousedown"!==e.type||(this.removeFocus("none"),e.preventDefault()),this.notify(t.Browser.touchStartEvent,e)},n.prototype.mouseMoveOnTreeMap=function(e){var i,l,n=e.target.id,o={cancel:!1,name:"mouseMove",treemap:this,mouseEvent:e};this.trigger("mouseMove",o);var r;this.removeFocus("none"),n.indexOf("_Item_Index")>-1?(r=u(l=this.layout.renderItems[parseFloat(n.split("_Item_Index_")[1])]).values,this.element.style.cursor=!l.isLeafItem&&r&&r.length>0&&this.enableDrillDown?"pointer":"auto",i={cancel:!1,name:"itemMove",treemap:this,item:l,mouseEvent:e},this.trigger("itemMove",i)):this.element.style.cursor="default",this.notify(t.Browser.touchMoveEvent,e)},n.prototype.calculateSelectedTextLevels=function(e,t){for(var i,l,n,o=t.levelOrderName.split("#"),r=0,a=Object.keys(o);r<a.length;r++)o[l=a[r]]===e&&(i=parseInt(l,10),n=e);return{drillLevel:i,currentLevelLabel:n,levelText:o}},n.prototype.calculatePreviousLevelChildItems=function(e,i,l){for(var n,o,r,a=0,s=this.layout.renderItems[0].levelOrderName.split("#").length,d=0;d<s;d++)r=0===d?e.levelText[d]:r+"#"+e.levelText[d];a=s>1?s:a;for(var h=0,p=Object.values(this.layout.renderItems);h<p.length;h++)(o=p[h]).levelOrderName.split("#")[0]===e.levelText[0]&&(n=0===a?t.isNullOrUndefined(r)?r:e.levelText[a]:l?r:r+"#"+e.levelText[a])===o.levelOrderName&&(this.drilledItems.push({name:o.levelOrderName,data:o}),l=!0,++a<=i.groupIndex&&(r=n=n+"#"+e.levelText[a]));return l},n.prototype.compareSelectedLabelWithDrillDownItems=function(e,t,i){var l,n={};return e.drillLevel+1===this.drilledItems[i].data.groupIndex?((l=this.drilledItems[i].data.parent).isDrilled=!0,n[l[this.drilledItems[i].data.groupName]]=[l],this.drilledItems.splice(i,this.drilledItems.length)):e.drillLevel!==this.drilledItems.length-1&&e.drillLevel!==t.groupIndex||(n[t.groupName]=[t]),n},n.prototype.mouseEndOnTreeMap=function(e){var i,l,n,o,r,a,s,d=this,h=e.target,p=h.id,g=!1,c={},m=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",f=this.element.id+"_Label_Template_Group";if(p.indexOf("_Item_Index")>-1&&this.enableDrillDown&&!this.drillMouseMove){e.cancelable&&e.preventDefault(),o=parseFloat(p.split("_Item_Index_")[1]),r=this.layout.renderItems[o];var y=h.textContent;if(this.enableBreadcrumb&&(s=this.calculateSelectedTextLevels(y,r),a=s.drillLevel,this.drillDownView||-1===y.search("[+]")||(g=this.calculatePreviousLevelChildItems(s,r,g))),0!==this.levels.length&&!r.isLeafItem&&u(r).values&&u(r).values.length>0){if(this.drilledItems.length>0){r=g?this.drilledItems[this.drilledItems.length-1].data:r;for(var v=0;v<this.drilledItems.length;v++){if(!t.isNullOrUndefined(a)){var S=this.drilledItems.length;if(c=this.compareSelectedLabelWithDrillDownItems(s,r,v),S!==this.drilledItems.length){v-=1;break}}if(r.levelOrderName===this.drilledItems[v].name&&!g&&t.isNullOrUndefined(a)){0===r.groupIndex&&r.parent[r.groupName]instanceof Array?(r.isDrilled=!r.isDrilled,r.isDrilled?c[r.groupName]=[r]:c=r.parent):(r.isDrilled=!1,r.parent.isDrilled=!0,r=r.parent,c[r.groupName]=[r]),this.drilledItems.splice(v,1),v-=1;break}v===this.drilledItems.length-1&&t.isNullOrUndefined(a)&&(r.isDrilled=!0,c[r.groupName]=[r])}}else r.isDrilled=!0,c[r.groupName]=[r];l={cancel:!1,name:"drillStart",treemap:this,element:h,groupIndex:this.enableBreadcrumb&&0!==this.drilledItems.length&&!t.isNullOrUndefined(a)?this.drilledItems[this.drilledItems.length-1].data.groupIndex:r.groupIndex,groupName:this.enableBreadcrumb&&0!==this.drilledItems.length&&!t.isNullOrUndefined(a)?this.drilledItems[this.drilledItems.length-1].data.name:r.name,rightClick:3===e.which,childItems:null,item:c},this.trigger("drillStart",l,function(e){if(d.currentLevel=r.isDrilled&&t.isNullOrUndefined(a)?r.groupIndex:!t.isNullOrUndefined(a)&&d.enableBreadcrumb&&r.isDrilled?a:null,!e.cancel){if(document.getElementById(m)){var l=document.getElementById(m);l.parentNode.removeChild(l)}if(i=t.extend({},d.areaRect,i,!0),d.legendSettings.visible&&!t.isNullOrUndefined(d.treeMapLegendModule)&&(t.isNullOrUndefined(c)||(d.treeMapLegendModule.legendGroup.textContent="",d.treeMapLegendModule.legendGroup=null,d.treeMapLegendModule.widthIncrement=0,d.treeMapLegendModule.heightIncrement=0,d.enableBreadcrumb&&!t.isNullOrUndefined(a)?d.drilledLegendItems={name:d.drilledItems[d.drilledItems.length-1].data.levelOrderName,data:d.drilledItems[d.drilledItems.length-1].data}:d.drilledLegendItems={name:r.levelOrderName,data:r},d.treeMapLegendModule.renderLegend()),i=t.isNullOrUndefined(d.totalRect)?i:d.totalRect),document.getElementById(f)){var n=document.getElementById(f);n.parentNode.removeChild(n)}t.isNullOrUndefined(e.childItems)||e.cancel?(d.layout.calculateLayoutItems(c,i),d.layout.renderLayoutItems()):d.layout.onDemandProcess(e.childItems)}}),n={cancel:!1,name:"drillEnd",treemap:this,renderItems:this.layout.renderItems},this.trigger("drillEnd",n),!g&&t.isNullOrUndefined(a)&&this.drilledItems.push({name:r.levelOrderName,data:r})}}this.mouseDown=!1,this.notify(t.Browser.touchEndEvent,e)},n.prototype.mouseLeaveOnTreeMap=function(e){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&($(this.treeMapHighlightModule.shapeHighlightCollection,this),this.treeMapHighlightModule.highLightId=""),this.removeFocus("")},n.prototype.keyUpHandler=function(e){if("Tab"===e.code){var t=e.target.id,i=document.getElementById(t);if(t.indexOf("Item_Index")>-1||t.indexOf("Legend")>-1)if(this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapHighlightModule&&this.highlightSettings.enable){i.style.setProperty("outline","none"),i.classList.add("keyboard-focused");var l=t.indexOf("_Legend_")>-1&&"Default"===this.legendSettings.mode?i.children[0]:i;this.treeMapHighlightModule.highlightOnMouseMove(l)}else this.removeFocus(""),i.style.outline="2px solid black",i.classList.add("keyboard-focused");else k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&$(this.treeMapHighlightModule.shapeHighlightCollection,this),this.removeFocus("none")}},n.prototype.keyDownHandler=function(e){var t=e.target.id,i=document.getElementById(t);if("Enter"===e.code){if(this.selectionSettings.enable&&(t.indexOf("Item_Index")>-1||t.indexOf("Legend")>-1)){var l=t.indexOf("_Legend_")>-1&&"Default"===this.legendSettings.mode?i.children[0]:i;this.treeMapSelectionModule.selectionOnMouseDown(l)}this.enableDrillDown&&i.childElementCount>0&&this.mouseEndOnTreeMap(e)}},n.prototype.focusHandler=function(e){var t=e.target.id;(!this.element.contains(e.relatedTarget)||t.indexOf("Item_Index")>-1&&e.relatedTarget.id.indexOf("Legend")>-1||t.indexOf("Legend")>-1&&e.relatedTarget.id.indexOf("Item_Index")>-1)&&(this.treeMapHighlightModule&&this.highlightSettings.enable?(k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),$(this.treeMapHighlightModule.legendHighlightCollection,this),this.treeMapHighlightModule.highLightId=""):this.removeFocus("none"))},n.prototype.removeFocus=function(e){var t=document.querySelector(".keyboard-focused");t&&(t.style.outline=e,t.classList.remove("keyboard-focused"))},n.prototype.selectItem=function(e,i){t.isNullOrUndefined(i)&&(i=!0);for(var l="",n=0;n<e.length;n++)n!==e.length-1?l+=e[n]+"#":l+=e[n];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(l,i)},n.prototype.requiredModules=function(){var e=[];return this.tooltipSettings.visible&&e.push({member:"treeMapTooltip",args:[this],name:"TreeMapTooltip"}),this.highlightSettings.enable&&e.push({member:"treeMapHighlight",args:[this],name:"TreeMapHighlight"}),this.selectionSettings.enable&&e.push({member:"treeMapSelection",args:[this],name:"TreeMapSelection"}),this.legendSettings.visible&&e.push({member:"treeMapLegend",args:[this],name:"TreeMapLegend"}),this.allowPrint&&e.push({member:"Print",args:[this,Ee],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this,De],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this,Pe],name:"PdfExport"}),e},n.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,l=0,n=Object.keys(e);l<n.length;l++)switch(n[l]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}i&&(this.createSvg(),this.renderElements())}},n.prototype.getModuleName=function(){return"treemap"},n.prototype.destroy=function(){this.unWireEVents(),ne("treeMapMeasureText"),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),e.prototype.destroy.call(this),this.areaRect=null,this.themeStyle=null,this.totalRect=null,this.drilledLegendItems=null,this.doubleTapTimer=null,this.treemapLevelData=null,this.resizeEvent=null,this.availableSize=null,this.intl=null,t.isNullOrUndefined(this.layout)||this.layout.destroy(),this.layout=null,this.renderer=null},n.prototype.removeSvg=function(){if(ne(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},n.prototype.getPersistData=function(){return""},ze([t.Property(!1)],n.prototype,"allowPrint",void 0),ze([t.Property(!1)],n.prototype,"allowImageExport",void 0),ze([t.Property(!1)],n.prototype,"allowPdfExport",void 0),ze([t.Property(null)],n.prototype,"width",void 0),ze([t.Property(null)],n.prototype,"height",void 0),ze([t.Complex({},de)],n.prototype,"border",void 0),ze([t.Complex({},he)],n.prototype,"margin",void 0),ze([t.Property(null)],n.prototype,"background",void 0),ze([t.Property("Material")],n.prototype,"theme",void 0),ze([t.Complex({},me)],n.prototype,"titleSettings",void 0),ze([t.Property("Squarified")],n.prototype,"layoutType",void 0),ze([t.Property(null)],n.prototype,"dataSource",void 0),ze([t.Property(null)],n.prototype,"query",void 0),ze([t.Property(null)],n.prototype,"weightValuePath",void 0),ze([t.Property("")],n.prototype,"rangeColorValuePath",void 0),ze([t.Property("")],n.prototype,"equalColorValuePath",void 0),ze([t.Property(null)],n.prototype,"colorValuePath",void 0),ze([t.Property([])],n.prototype,"palette",void 0),ze([t.Property("TopLeftBottomRight")],n.prototype,"renderDirection",void 0),ze([t.Property(!1)],n.prototype,"enableDrillDown",void 0),ze([t.Property(!1)],n.prototype,"enableBreadcrumb",void 0),ze([t.Property(" - ")],n.prototype,"breadcrumbConnector",void 0),ze([t.Property(!1)],n.prototype,"drillDownView",void 0),ze([t.Property(!1)],n.prototype,"enableHtmlSanitizer",void 0),ze([t.Complex({},ye)],n.prototype,"initialDrillDown",void 0),ze([t.Complex({},ve)],n.prototype,"leafItemSettings",void 0),ze([t.Collection([],Ie)],n.prototype,"levels",void 0),ze([t.Complex({},be)],n.prototype,"highlightSettings",void 0),ze([t.Complex({},xe)],n.prototype,"selectionSettings",void 0),ze([t.Complex({},Se)],n.prototype,"tooltipSettings",void 0),ze([t.Complex({},fe)],n.prototype,"legendSettings",void 0),ze([t.Property(!1)],n.prototype,"useGroupingSeparator",void 0),ze([t.Property(null)],n.prototype,"description",void 0),ze([t.Property(0)],n.prototype,"tabIndex",void 0),ze([t.Property(null)],n.prototype,"format",void 0),ze([t.Event()],n.prototype,"load",void 0),ze([t.Event()],n.prototype,"beforePrint",void 0),ze([t.Event()],n.prototype,"loaded",void 0),ze([t.Event()],n.prototype,"itemRendering",void 0),ze([t.Event()],n.prototype,"drillStart",void 0),ze([t.Event()],n.prototype,"drillEnd",void 0),ze([t.Event()],n.prototype,"itemSelected",void 0),ze([t.Event()],n.prototype,"itemHighlight",void 0),ze([t.Event()],n.prototype,"tooltipRendering",void 0),ze([t.Event()],n.prototype,"itemClick",void 0),ze([t.Event()],n.prototype,"itemMove",void 0),ze([t.Event()],n.prototype,"click",void 0),ze([t.Event()],n.prototype,"doubleClick",void 0),ze([t.Event()],n.prototype,"rightClick",void 0),ze([t.Event()],n.prototype,"mouseMove",void 0),ze([t.Event()],n.prototype,"resize",void 0),ze([t.Event()],n.prototype,"legendItemRendering",void 0),ze([t.Event()],n.prototype,"legendRendering",void 0),n=ze([t.NotifyPropertyChanges],n)}(t.Component),Re=function(){function e(){}return e}(),Ue=function(){function e(e){this.page=0,this.legendBorderRect=new Fe(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new Fe(0,0,0,0),this.treemap=e,this.addEventListener()}return e.prototype.renderLegend=function(){var e=this;this.page=0,this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement);var t={cancel:!1,name:"legendRendering",treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position};this.treemap.trigger("legendRendering",t,function(t){t.cancel||t._changePosition===e.treemap.legendSettings.position||(e.treemap.legendSettings.position=t._changePosition),e.calculateLegendBounds(),e.legendCollections.length>0&&e.drawLegend()})},e.prototype.calculateLegendBounds=function(){var e=this,i=this.treemap,l=i.legendSettings;if(this.findColorMappingLegendItems(i.treemapLevelData.levelsData[0]),(!t.isNullOrUndefined(this.treemap.palette)&&this.treemap.palette.length>0||!t.isNullOrUndefined(i.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(i.treemapLevelData.levelsData[0]),this.legendCollections.length>0){this.legendCollections.sort(function(e,t){return e.levelIndex>t.levelIndex?1:e.levelIndex<t.levelIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.groupIndex>t.groupIndex?1:e.groupIndex<t.groupIndex?-1:0}),this.legendCollections.sort(function(e,t){return e.leafIndex>t.leafIndex?1:e.leafIndex<t.leafIndex?-1:0});var n=l.position,o=i.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(l.title.text):l.title.text,s=l.titleStyle,d=l.mode,h=0,p=0,g=0,c=0,m=l.shapeHeight,u=l.shapeWidth,f=[],y=[],v="None"===l.orientation?"Top"===n||"Bottom"===n||"Auto"===n&&i.availableSize.width<=i.availableSize.height?"Horizontal":"Vertical":l.orientation,S=l.width.length>1?l.width.indexOf("%")>-1?i.availableSize.width/100*parseFloat(l.width):parseFloat(l.width):null,x=l.height.length>1?l.height.indexOf("%")>-1?i.availableSize.height/100*parseFloat(l.height):parseFloat(l.height):null;s.fontFamily=s.fontFamily||i.themeStyle.fontFamily,s.fontWeight=s.fontWeight||i.themeStyle.titleFontWeight,s.size=s.size||i.themeStyle.subtitleFontSize;var b=r(o,s),I=0,C=0,F=l.shapePadding,w=l.textStyle;if(w.size=w.size||i.themeStyle.legendFontSize,w.fontFamily=w.fontFamily||i.themeStyle.fontFamily,w.fontWeight=w.fontWeight||i.themeStyle.fontWeight,"Default"===d){S=t.isNullOrUndefined(S)?i.areaRect.width:S,x=t.isNullOrUndefined(x)?i.areaRect.height:x;for(var O=0,L=0;L<this.legendCollections.length;L++){var T=this.legendCollections[L];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var M=r(i.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(T.legendName):T.legendName,w);if(this.textMaxWidth=Math.max(this.textMaxWidth,M.width),0===L)I=h=10+u/2,C=p=10+b.height+(m>M.height?m/2:M.height/4);else{var N=M.height>m?M.height:m;if("Horizontal"===v){var _=y[O-1].x+y[O-1].width+10+u;if(_+F+M.width>S){var E=(y[O-1].y>f[O-1].y+m/2?y[O-1].y:f[O-1].y+m/2)+10;E+N>x?(this.getPageChanged(),O=0,f=[],y=[],h=I,p=C):(h=f[0].x,p=E+N/2)}else h=_-u/2,p=f[O-1].y}else{var D=y[O-1].y>f[O-1].y+m/2?y[O-1].y:f[O-1].y+m/2;if(D+10+N>x){var P=y[O-1].x+this.textMaxWidth+10;P+F+M.width>S?(h=I,p=C,y=[],f=[],this.getPageChanged(),O=0):(h=P+u/2,p=f[0].y)}else h=f[O-1].x,p=D+10+m/2}}g=h+u/2+F,c=p+M.height/4,f.push({x:h,y:p}),y.push({x:g,y:c,width:M.width,height:M.height/2}),this.totalPages[this.page].Collection.push({DisplayText:T.legendName,element:T.gradientElement,Shape:{x:h,y:p},Text:{x:g,y:c},Fill:T.legendFill,Data:T.legendData,Rect:{x:f[O].x-u/2,y:f[O].y-m/2<c-M.height?f[O].y-m/2:c-M.height,width:Math.abs(f[O].x-u/2-(g+M.width)),height:m>M.height?m:M.height}}),O++}var B=this.totalPages[0].Collection;B.forEach(function(t,i){var l=new Fe(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(I=l.x,C=l.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(I-(l.x+l.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(C-(l.y+l.height)))}),S=this.widthIncrement<S?this.widthIncrement:S,x=this.heightIncrement<x?this.heightIncrement:x,this.legendItemRect={x:B[0].Rect.x,y:B[0].Rect.y,width:S,height:x}}else{var z=this.legendCollections.length,H="Horizontal"===v?t.isNullOrUndefined(S)?i.areaRect.width/z:S/z:t.isNullOrUndefined(S)?25:S,R="Horizontal"===v?t.isNullOrUndefined(x)?25:x:t.isNullOrUndefined(x)?i.areaRect.height/z:x/z;I=0,C=b.height+10;for(var U=l.labelPosition,k=0,A=0,W=l.labelDisplayMode,j=0,V=0,L=0;L<this.legendCollections.length;L++){I="Horizontal"===v?I+H:I,C="Horizontal"===v?C:C+R;var G=this.legendCollections[L].legendName,q=new Ce(0,0);"None"===W?q=r(G,w):"Trim"===W?q=r(G=a("Horizontal"===v?H:R,G,w),w):G="",j=Math.max(j,q.height),V=Math.max(V,q.width),q.width>0&&q.height>0&&("Horizontal"===v?(g=I+H/2,c="After"===U?C+R+q.height/2+10:C-10):(g="After"===U?I-q.width/2-10:I+H+q.width/2+10,c=C+R/2+q.height/4)),0===L&&(k="Horizontal"===v?I:"After"===U?g-q.width/2:I,A="Horizontal"===v?"After"===U?C:c-q.height/2:C),L===z-1&&(S="Horizontal"===v?Math.abs(I+H-k):H+V+10,x="Horizontal"===v?R+j/2+10:Math.abs(C+R-A)),this.legendRenderingCollections.push({fill:this.legendCollections[L].legendFill,x:I,y:C,width:H,height:R,element:this.legendCollections[L].gradientElement,text:G,textX:g,textY:c,textWidth:q.width,textHeight:q.height,data:this.legendCollections[L].legendData})}this.legendItemRect={x:k,y:A,width:S,height:x}}}},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.findColorMappingLegendItems=function(e){var t=u(e).values;if(t&&t.length>0&&(this.calculateLegendItems(t),this.treemap.levels.length>0))for(var i=0;i<t.length;i++)this.findColorMappingLegendItems(t[i])},e.prototype.findPaletteLegendItems=function(e){var i,l;if(!t.isNullOrUndefined(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!t.isNullOrUndefined(this.treemap.initialDrillDown.groupName)&&t.isNullOrUndefined(this.treemap.drilledLegendItems))for(var n=u(e).values,o=0;o<n.length;o++)if(n[o].Name===this.treemap.initialDrillDown.groupName){n[o].isDrilled=!n[o].isDrilled,e=n[o],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,l=this.treemap.palette.length>0?this.treemap.palette[o%this.treemap.palette.length]:n[o].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!t.isNullOrUndefined(this.treemap.drilledLegendItems)){var r=this.treemap.drilledLegendItems;if(t.isNullOrUndefined(r.data.options))for(o=0;o<r.length;o++){l=this.treemap.palette.length>0?this.treemap.palette[o%this.treemap.palette.length]:r[o].data[this.treemap.colorValuePath];break}else l=r.data.options.fill;i=r.data.isDrilled?u(r.data).values:u(r.data.parent).values}else i=u(e).values;var a;if(i&&i.length>0){for(var s=0;s<i.length;s++)(t.isNullOrUndefined(i[s].data[this.treemap.legendSettings.showLegendPath])||i[s].data[this.treemap.legendSettings.showLegendPath])&&(a=i[s].data[this.treemap.legendSettings.valuePath]?i[s].data[this.treemap.legendSettings.valuePath]:i[s].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,a)||this.legendCollections.push({legendName:a,legendFill:this.treemap.palette.length>0?t.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[s%this.treemap.palette.length]:l:i[s].data[this.treemap.colorValuePath],legendData:[],itemArea:i[s].weight,levelOrderName:i[s].levelOrderName}));if(this.legendCollections.sort(H),this.treemap.palette.length>0)for(var d=0;d<this.legendCollections.length;d++)this.legendCollections[d].legendFill=t.isNullOrUndefined(this.treemap.currentLevel)?this.treemap.palette[d%this.treemap.palette.length]:l}},e.prototype.calculateLegendItems=function(e){var i,l,n,o,r,a,s,d,h,p,g,c,m,u,f,y,v,S,x,b=!1,I=this.treemap.leafItemSettings,C=this.treemap.levels,F=this.treemap.legendSettings.position,w=!1,O=0;this.outOfRangeLegend=null;for(var L=0;L<e.length;L++){l="",f=!1,y=!1,w=!1,o=e[L].data,d=e[L].groupIndex,s=(a=0===this.treemap.levels.length||d===this.treemap.levels.length)?I.colorMapping:C[d].colorMapping;for(var T=0;T<s.length;T++){var M=s[T];if(p=null,n=Number(o[this.treemap.rangeColorValuePath]),h=o[this.treemap.equalColorValuePath],M.value=t.isNullOrUndefined(M.value)?M.value:M.value.toString(),!t.isNullOrUndefined(M.from)&&!t.isNullOrUndefined(M.to)&&n>=M.from&&n<=M.to&&M.showLegend?(b=!0,y=!0,m=M.from+" - "+M.to,r=t.isNullOrUndefined(M.label)?M.from+" - "+M.to:M.label,l=t.isNullOrUndefined(M.color)?l:M.color,i=this.isAddNewLegendData(m)):!t.isNullOrUndefined(M.value)&&h===M.value&&M.showLegend&&(b=!0,f=!0,m=M.value.toString(),r=t.isNullOrUndefined(M.label)?M.value.toString():M.label,l=t.isNullOrUndefined(M.color)?l:"[object Array]"===Object.prototype.toString.call(M.color)?M.color[0]:M.color,i=this.isAddNewLegendData(m)),b&&t.isNullOrUndefined(M.value)&&M.maxOpacity&&M.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var N=[];if(w=!0,"[object Array]"===Object.prototype.toString.call(M.color))for(var _=0;_<M.color.length;_++){E={colorStop:(_*(100/(M.color.length-1))+"%").toString(),color:M.color[_]};N.push(E)}else{var E={colorStop:"0%",color:l},D={colorStop:"100%",color:l};N.push(E),N.push(D)}g="Top"===F||"Bottom"===F?"100%":"0%",c="Top"===F||"Bottom"===F?"0%":"100%";var P={id:"groupIndex_"+d+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:g,y2:c};p=this.treemap.renderer.drawGradient("linearGradient",P,N).childNodes[0],"[object Array]"!==Object.prototype.toString.call(M.color)&&(p.childNodes[0].setAttribute("stop-opacity",M.minOpacity.toString()),p.childNodes[1].setAttribute("stop-opacity",M.maxOpacity.toString())),this.defsElement.appendChild(p),this.gradientCount++}if(u=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,r),i&&i.process&&b&&!u?(b=!1,l="[object Array]"===Object.prototype.toString.call(M.color)&&t.isNullOrUndefined(p)&&t.isNullOrUndefined(M.value)?this.legendGradientColor(M,O):l,this.legendCollections.push({actualValue:m,levelIndex:a?-1:T,leafIndex:a?T:-1,legendName:r,legendFill:l,legendData:[],groupIndex:a?-1:d,gradientElement:t.isNullOrUndefined(p)?t.isNullOrUndefined(M.value)?this.legendLinearGradient:null:p,name:e[L].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(e[L]),O++):b&&(b=!1,this.legendCollections[i.value].legendData.push(e[L])),!y&&!w&&!f&&t.isNullOrUndefined(M.from)&&t.isNullOrUndefined(M.to)&&t.isNullOrUndefined(M.minOpacity)&&t.isNullOrUndefined(M.maxOpacity)&&t.isNullOrUndefined(M.value)&&!t.isNullOrUndefined(M.color)){v="[object Array]"===Object.prototype.toString.call(M.color)?M.color[0]:M.color,S=t.isNullOrUndefined(M.label)?"Others":M.label,u=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,S),t.isNullOrUndefined(this.outOfRangeLegend)&&!u&&(this.legendCollections.push({actualValue:S,legendData:[],legendName:S,legendFill:v,groupIndex:!a||d>-1?d:-1}),x=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[x-1],O++);for(var B=this.legendCollections.length-1;B>=0;B--)if(this.legendCollections[B].actualValue===(M.label||"Others")){this.legendCollections[B].legendData.push(e[L]);break}}}}},e.prototype.removeDuplicates=function(e,t){for(var i=!1,l=0;l<e.length;l++)if(e[l].legendName===t){i=!0;break}return i},e.prototype.isAddNewLegendData=function(e){var t,i;if(0===this.legendCollections.length)t=!0;else for(var l=0;l<this.legendCollections.length;l++){if(e===this.legendCollections[l].actualValue){t=!1,i=l;break}l===this.legendCollections.length-1&&(t=!0)}return{process:t,value:i}},e.prototype.drawLegend=function(){var e,i,l=this.treemap.legendSettings,n=this.treemap.renderer,o=l.textStyle;if(this.legendGroup=n.createGroup({id:this.treemap.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===l.mode)this.drawLegendItem(this.currentPage);else for(var r=0;r<this.legendRenderingCollections.length;r++){var a=this.treemap.element.id+"_Legend_Index_"+r,s=this.treemap.element.id+"_Legend_Index_"+r+"_Text",d=this.legendRenderingCollections[r];e=(i=d.element)?"url(#"+i.id+")":d.fill;var p=new Fe(d.x,d.y,d.width,d.height),g=new Te(d.textX,d.textY),c=new we(a,e,l.shapeBorder,l.opacity,p);this.treemap.enableRtl&&("Left"===this.treemap.legendSettings.position||"Right"===this.treemap.legendSettings.position||"Auto"===this.treemap.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(c.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+c.height)-Math.abs(this.legendBorderRect.y-c.y),g.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+d.textHeight/2-Math.abs(this.legendBorderRect.y-g.y)):(c.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+c.width)-Math.abs(this.legendBorderRect.x-c.x),g.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-g.x)));var m=this.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(d.text):d.text;h(new Le(s,g.x,g.y,"middle",m,"",""),o,o.color||this.treemap.themeStyle.legendTextColor,this.legendGroup);var u=n.drawRectangle(c);u.setAttribute("tabindex",this.treemap.tabIndex.toString()),u.style.outline="",this.legendGroup.appendChild(u)}U(this.treemap,this.legendGroup)},e.prototype.defaultLegendRtlLocation=function(e,t,i,l){var n=e.Shape,o=e.Text,a=r(e.DisplayText,l.textStyle);return n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+t)-Math.abs(this.legendBorderRect.x-n.x),o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+a.width+t)-Math.abs(this.legendBorderRect.x-o.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)-l.shapeHeight/2,o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)),{shapeLocation:n,textLocation:o}},e.prototype.drawLegendItem=function(e){var i,l,n,o=this,a=this.treemap,s=a.legendSettings,d=new Ce(s.shapeWidth,s.shapeHeight),p=a.renderer,g=s.shapeBorder;if(e>=0&&e<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var c="HorizontalLine"===s.shape||"VerticalLine"===s.shape||"Cross"===s.shape,m=c?t.isNullOrUndefined(s.fill)?"#000000":s.fill:g.color,u=c&&0===g.width?1:g.width,f=this,y=0;y<this.totalPages[e].Collection.length;y++)!function(r){var g=f.totalPages[e].Collection[r],y=f.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(g.DisplayText):g.DisplayText,v=p.createGroup({id:a.element.id+"_Legend_Index_"+r});v.setAttribute("aria-label",y+" Legend"),v.setAttribute("role","region"),v.setAttribute("tabindex",f.treemap.tabIndex.toString()),v.style.outline="none";var S=a.element.id+"_Legend_Shape_Index_"+r,x=a.element.id+"_Legend_Text_Index_"+r,b=g.Shape,I=g.Text;a.enableRtl&&(l=f.defaultLegendRtlLocation(g,10,a,s),b=l.shapeLocation,I=l.textLocation),n={cancel:!1,name:"legendItemRendering",treemap:a,fill:g.Fill,shape:s.shape,imageUrl:s.imageUrl},a.trigger("legendItemRendering",n,function(e){var t=new Oe(S,e.fill,u,c?g.Fill:m,s.opacity,"");v.appendChild(J(b,e.shape,d,e.imageUrl,t)),h(i=new Le(x,I.x,I.y,"start",y,"",""),s.textStyle,s.textStyle.color||a.themeStyle.legendTextColor,v),o.legendGroup.appendChild(v)})}(y);var v=void 0;if(0!==this.page){var S=e+1+"/"+this.totalPages.length,x=s.textStyle,b=r(S,x),I=this.legendItemRect.x+this.legendItemRect.width-b.width-20-10,C=this.legendItemRect.x+this.legendItemRect.width,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10,w=C-10-b.width/2-5;v=p.createGroup({id:a.element.id+"_Legend_Paging_Group"});var O=p.createGroup({id:a.element.id+"_Legend_Left_Paging_Group"}),L=p.createGroup({id:a.element.id+"_Legend_Right_Paging_Group"}),T=" M "+C+" "+F+" L "+(C-10)+" "+(F-5)+" L "+(C-10)+" "+(F+5)+" z ",M=" M "+I+" "+F+" L "+(I+10)+" "+(F-5)+" L "+(I+10)+" "+(F+5)+" z ",N=new Oe(a.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",M);O.appendChild(p.drawPath(N));var _=new we(a.element.id+"_Left_Page_Rect","transparent",{},1,new Fe(I-5,F-10,20,20),"");O.appendChild(p.drawRectangle(_)),this.wireEvents(O);var E=new Oe(a.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",T);L.appendChild(p.drawPath(E));var D=new we(a.element.id+"_Right_Page_Rect","transparent",{},1,new Fe(C-10,F-5,10,10),"");L.appendChild(p.drawRectangle(D)),this.wireEvents(L),v.appendChild(O),v.appendChild(L);var P={id:a.element.id+"_Paging_Text",x:w,y:F+b.height/4,fill:"#a6a6a6","font-size":"14px","font-style":x.fontStyle,"font-family":x.fontFamily,"font-weight":x.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":"",role:"region","aria-label":S};v.appendChild(p.createText(P,S)),this.legendGroup.appendChild(v)}}},e.prototype.renderLegendBorder=function(){var e=this.treemap,t=e.legendSettings,i=t.title.text,l=t.titleStyle,n=r(a(this.legendItemRect.width+20,i,l),l);this.legendBorderRect=new Fe(this.legendItemRect.x-10,this.legendItemRect.y-10-n.height,this.legendItemRect.width+20,this.legendItemRect.height+20+n.height+("Interactive"===t.mode?0:0!==this.page?10:0));var o={color:t.border.color||this.treemap.themeStyle.legendBorderColor,width:t.border.width||this.treemap.themeStyle.legendBorderWidth},s=new we(e.element.id+"_Legend_Border",t.background,o,1,this.legendBorderRect,""),d=e.renderer.drawRectangle(s);d.style.pointerEvents="none",this.legendGroup.appendChild(d),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),e.svgObject.appendChild(this.legendGroup)},e.prototype.renderLegendTitle=function(){var e,i=this.treemap.legendSettings,l=i.titleStyle,n=this.treemap.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i.title.text):i.title.text,o=a(this.legendItemRect.width+20,n,l),s=r(o,l);if(n){var d=h(e=new Le(this.treemap.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-s.height/2-5,"middle",o,""),l,l.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup);d.setAttribute("role","region"),d.setAttribute("aria-label",n)}},e.prototype.renderInteractivePointer=function(e){var i=this.treemap,l=e.target,n=i.element.id+"_Interactive_Legend",o=!1;l=e.type.indexOf("touch")>-1?document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY):l;var r,a=i.legendSettings;if(l.id.indexOf("_Item_Index")>-1&&a.visible&&this.legendRenderingCollections.length>0){var s=void 0,d=void 0,h=void 0,p=void 0,g=void 0,c=void 0,m=void 0;r=i.layout.renderItems[parseFloat(l.id.split("_Item_Index_")[1])];for(var u=i.svgObject.getBoundingClientRect(),f=0;f<this.legendCollections.length&&!o;f++){s=this.legendCollections[f],d=(m=document.getElementById(i.element.id+"_Legend_Index_"+f)).getBoundingClientRect();var y=new Fe(Math.abs(d.left-u.left),Math.abs(d.top-u.top),d.width,d.height);if(p=m.getAttribute("fill"),g=a.shapeBorder.color,c=a.shapeBorder.width,!t.isNullOrUndefined(s.legendData)&&s.legendData.length>0){h=s.legendData;var v=i.rangeColorValuePath;if(r.levelOrderName.indexOf(this.legendCollections[f].legendName)>-1)this.drawInteractivePointer(a,p,g,n,c,y),o=!0;else for(var S=0;S<h.length;S++)if(i.rangeColorValuePath&&i.leafItemSettings.colorMapping.length>0?h[S].data[v]===r.data[v]:h[S].levelOrderName===r.levelOrderName||h[S].levelOrderName.indexOf(r.levelOrderName)>-1){this.drawInteractivePointer(a,p,g,n,c,y),o=!0;break}}else 0===this.treemap.leafItemSettings.colorMapping.length&&this.treemap.palette&&r.levelOrderName.indexOf(s.levelOrderName)>-1&&(this.drawInteractivePointer(a,p,g,n,c,y),o=!0)}}else this.removeInteractivePointer()},e.prototype.drawInteractivePointer=function(e,t,i,l,n,o){var r,a,s;r="Horizontal"===("None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation)?e.invertedPointer?" M "+(a=o.x+o.width/2)+" "+(s=o.y+o.height)+" L "+(a-10)+" "+(s+10)+" L "+(a+10)+" "+(s+10)+" Z ":" M "+(a=o.x+o.width/2)+" "+(s=o.y)+" L "+(a-10)+" "+(s-10)+" L "+(a+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(a=o.x)+" "+(s=o.y+o.height/2)+" L "+(a-10)+" "+(s-10)+" L "+(a-10)+" "+(s+10)+" z ":" M "+(a=o.x+o.width)+" "+(s=o.y+o.height/2)+" L "+(a+10)+" "+(s-10)+" L "+(a+10)+" "+(s+10)+" z ";var d=new Oe(l,t,n,i,1,"",r);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(d))},e.prototype.getLegendAlignment=function(e,i,l,n){var o,r,a,s=(a=t.extend({},e.areaRect,a,!0)).x,d=a.y,h=a.height,p=a.width,g=e.availableSize.width,c=e.availableSize.height,m="Auto"===n.position?g>c?"Right":"Bottom":n.position;if("Float"===n.position)this.translate=n.location;else{switch(m){case"Top":case"Bottom":a.height=h-l,o=g/2-i/2,r="Top"===m?d:d+a.height+10,a.y="Top"===m?d+l+10:d;break;case"Left":case"Right":a.width=p-i,o="Left"===m?s:s+a.width,r=c/2-l/2,a.x="Left"===m?s+i:s}switch(n.alignment){case"Near":"Top"===m||"Bottom"===m?o=a.x:r=a.y;break;case"Far":"Top"===m||"Bottom"===m?o=g-i:r=c-l}this.treemap.totalRect=a,this.translate=new Te(o,r)}},e.prototype.mouseUpHandler=function(e){this.renderInteractivePointer(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},e.prototype.removeInteractivePointer=function(){if(document.getElementById(this.treemap.element.id+"_Interactive_Legend")){var e=document.getElementById(this.treemap.element.id+"_Interactive_Legend");e.parentNode.removeChild(e)}},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.currentPage>=0&&this.currentPage<this.totalPages.length?this.drawLegend():this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?0:this.totalPages.length-1},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(t.Browser.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(t.Browser.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"treeMapLegend"},e.prototype.destroy=function(){clearTimeout(this.clearTimeout),this.clearTimeout=null,this.legendRenderingCollections=[],this.legendCollections=[],this.outOfRangeLegend=null,this.totalPages=[],this.translate=null,this.legendBorderRect=null,this.legendGroup=null,this.legendNames=[],this.defsElement=null,this.legendLinearGradient=null,this.legendInteractiveGradient=[],this.legendItemRect=null,this.removeEventListener(),this.treemap=null},e.prototype.legendGradientColor=function(e,i){var l,n="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"[object Array]"===Object.prototype.toString.call(e.color)){var o=this.treemap.renderer.createDefs(),r=document.createElementNS(n,"linearGradient"),a=this.treemap.legendSettings.position,s="Top"===a||"Bottom"===a?"100":"0",d="Top"===a||"Bottom"===a?"0":"100";r.setAttribute("id","linear_"+i),r.setAttribute("x1","0%"),r.setAttribute("y1","0%"),r.setAttribute("x2",s+"%"),r.setAttribute("y2",d+"%");for(var h=0;h<e.color.length;h++){var p=100/(e.color.length-1),g=document.createElementNS(n,"stop");g.setAttribute("offset",h*p+"%"),g.setAttribute("stop-color",e.color[h]),g.setAttribute("stop-opacity",1..toString()),r.appendChild(g)}o.appendChild(r),this.legendLinearGradient=r;var c="url(#linear_"+i+")";this.defsElement.appendChild(r),l=c}return l},e}(),ke=function(){function e(e){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=e,this.addEventListener()}return e.prototype.mouseMove=function(e){var t=e.target;return this.highlightOnMouseMove(t)},e.prototype.highlightOnMouseMove=function(e){var i,l,n,o,r,a,s,d=this.treemap,h=e.id,p=[],g=this.treemap.highlightSettings,c=[],m=this.treemap.treeMapSelectionModule,u=!1;if(m&&m.legendSelectionCollection.length>0)for(D=0;D<m.legendSelectionCollection.length;D++)for(B=0;B<m.legendSelectionCollection[D].ShapeCollection.Elements.length;B++){var y=parseFloat(m.legendSelectionCollection[D].ShapeCollection.Elements[B].id.split("Item_Index_")[1].split("_")[0]),v=h.indexOf("_Item_Index_")>-1?parseFloat(h.split("Item_Index_")[1].split("_")[0]):null;if(m.legendSelectionCollection[D].ShapeCollection.Elements[B].id===h||y===v){u=!0;break}}if(h.indexOf("_Item_Index")>-1&&!u){if(this.highLightId!==h||this.legendHighlightCollection[0]&&this.legendHighlightCollection[0].ShapeCollection.Elements.length>1){r=document.getElementById(d.element.id+"_TreeMap_"+d.layoutType+"_Layout");var S=document.getElementsByClassName("treeMapSelection");n=this.treemap.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var x=void 0;if(this.treemap.legendSettings.visible){var b=this.treemap.treeMapLegendModule.legendCollections,I=this.treemap.treeMapLegendModule.legendCollections.length;x=!d.legendSettings.removeDuplicateLegend&&d.palette&&d.palette.length>0&&0===d.leafItemSettings.colorMapping.length&&0===d.levels.length?parseFloat(h.split("_Item_Index_")[1]):te(I,n,d),t.isNullOrUndefined(x)&&($(this.legendHighlightCollection,d),$(this.shapeHighlightCollection,d),this.legendHighlightCollection=[],d.treeMapLegendModule.removeInteractivePointer()),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+x):document.getElementById(this.treemap.element.id+"_Legend_Index_"+x),null!==this.shapeElement&&(m&&this.shapeElement.id===(m&&m.shapeElement?m.shapeElement.id:null)?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(ee(this.shapeHighlightCollection,this.currentElement,d),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),$(this.shapeHighlightCollection,d),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:b[x].legendFill,oldOpacity:b[x].opacity,oldBorderColor:b[x].borderColor,oldBorderWidth:b[x].borderWidth}),K("Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+x):document.getElementById(this.treemap.element.id+"_Legend_Index_"+x+"_Text"),g.fill,g.opacity,null,null),K(this.shapeElement,g.fill,g.opacity,g.border.color,g.border.width.toString()),this.target="highlight"))}s=f(n,[],g.mode,d);for(D=0;D<r.childElementCount;D++){a=r.childNodes[D],o=!0;var C=""!==d.rangeColorValuePath?d.rangeColorValuePath:null,F=d.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];n=d.layout.renderItems[parseFloat(a.id.split("_Item_Index_")[1])];for(B=0;B<S.length;B++)if(a.id===S[B].id||a.id===S[B].parentElement.id){o=!1;break}s.indexOf(n.levelOrderName)>-1&&o&&(t.isNullOrUndefined(C)||(n.data[C]===F.data[C]||"Item"!==g.mode&&d.levels.length>0))&&(c.push(a),p.push(n))}k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d);for(var w=0;w<c.length;w++)A((a=c[w]).childNodes[0],{border:g.border,fill:g.fill,opacity:g.opacity}),a.classList.add("treeMapHighLight"),this.highLightId=h;l={cancel:!1,name:"itemHighlight",treemap:d,items:p,elements:c},d.trigger("itemHighlight",l)}}else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1||h.indexOf("_Legend_Text_Index")>-1){t.isNullOrUndefined(m)||(m.legendSelectId=t.isNullOrUndefined(d.legendId[0])?null:d.legendId[0]);var O=m&&m.legendSelectId?parseFloat(m.legendSelectId.split("Index_")[1]):m&&m.shapeSelectId?parseFloat(m.shapeSelectId.split("Index_")[1]):null,L="Default"===this.treemap.legendSettings.mode?-1===h.indexOf("Text")?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Text_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);if(this.treemap.legendSettings.visible&&L!==O){var T,M=void 0,N=void 0,C=""!==d.rangeColorValuePath?d.rangeColorValuePath:null,_=document.getElementById(h);"highlight"===this.shapeTarget&&($(this.legendHighlightCollection,this.treemap),this.legendHighlightCollection=[]),this.shapeTarget="highlight";for(var E=this.treemap.treeMapLegendModule.legendCollections[L].legendData.length,b=this.treemap.treeMapLegendModule.legendCollections,D=0;D<E;D++)for(B=0;B<this.treemap.layout.renderItems.length;B++)if(!t.isNullOrUndefined(C)&&d.leafItemSettings.colorMapping.length>0&&0===d.levels.length?d.treeMapLegendModule.legendCollections[L].legendData[D].data[C]===d.layout.renderItems[B].data[C]:d.treeMapLegendModule.legendCollections[L].legendData[D].levelOrderName===d.layout.renderItems[B].levelOrderName){M=B,N=this.treemap.layout.renderItems[B].groupIndex;z=document.getElementById(this.treemap.element.id+"_Level_Index_"+N+"_Item_Index_"+M+"_RectPath");0!==D&&0!==this.legendHighlightCollection.length||(this.legendHighlightCollection=[],ie(this.legendHighlightCollection,L,B,_,z,this.treemap.layout.renderItems,b),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection={Elements:[]});var P=void 0;_.id.indexOf("Text")>-1?(P="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+L),K(_,g.fill,g.opacity,null,null),K(P,g.fill,g.opacity,g.border.color,g.border.width.toString())):(K("Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+L),g.fill,g.opacity,null,null),K(_,g.fill,g.opacity,g.border.color,g.border.width.toString())),K(z,g.fill,g.opacity,g.border.color,g.border.width.toString()),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection.Elements.push(z)}if(0===E&&this.treemap.palette&&this.treemap.palette.length>0)for(var B=0;B<this.treemap.layout.renderItems.length;B++)if((this.treemap.treeMapLegendModule.legendCollections[L].levelOrderName===this.treemap.layout.renderItems[B].levelOrderName||this.treemap.layout.renderItems[B].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[L].levelOrderName)>-1)&&(!(!this.treemap.legendSettings.removeDuplicateLegend&&d.palette&&d.palette.length>0)||this.treemap.layout.renderItems[B].parent.isDrilled||L===B)){M=B,N=this.treemap.layout.renderItems[B].groupIndex;var z=document.getElementById(this.treemap.element.id+"_Level_Index_"+N+"_Item_Index_"+M+"_RectPath");ie(this.legendHighlightCollection,L,B,_,z,this.treemap.layout.renderItems,b),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection={Elements:[]};var H=void 0;_.id.indexOf("Text")>-1?(H="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+L),K(_,g.fill,g.opacity,null,null),K(H,g.fill,g.opacity,g.border.color,g.border.width.toString())):(K(H="Interactive"===this.treemap.legendSettings.mode?document.getElementById(_.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+L),g.fill,g.opacity,null,null),K(_,g.fill,g.opacity,g.border.color,g.border.width.toString())),K(z,g.fill,g.opacity,g.border.color,g.border.width.toString()),T=this.legendHighlightCollection.length,this.legendHighlightCollection[T-1].ShapeCollection.Elements.push(z)}}else k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d),$(this.legendHighlightCollection,d),this.legendHighlightCollection=[]}else m&&this.shapeElement&&this.shapeElement.getAttribute("id")===m.legendSelectId||(m?this.shapeElement!==m.shapeElement:this.treemap.legendSettings.visible)&&k(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",d),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||m&&this.shapeElement&&this.shapeElement.getAttribute("id")===m.legendSelectId||(m?this.shapeElement!==m.shapeElement:!m||m.legendSelect)&&($(this.shapeHighlightCollection,d),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&$(this.legendHighlightCollection,this.treemap),this.highLightId="",i=!1;return i},e.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(t.Browser.touchMoveEvent,this.mouseMove,this)},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(t.Browser.touchMoveEvent,this.mouseMove)},e.prototype.getModuleName=function(){return"treeMapHighlight"},e.prototype.destroy=function(){this.shapeElement=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.removeEventListener(),this.treemap=null},e}(),Ae=function(){function e(e){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=e,this.addEventListener()}return e.prototype.mouseDown=function(e){var t=e.target;e.preventDefault(),this.selectionOnMouseDown(t)},e.prototype.selectionOnMouseDown=function(e){var i,l=this.treemap;e.setAttribute("tabindex","-1"),e.style.outline="none",e.id.includes("Legend_Shape_Index")||e.focus();var n,o,r,a,s=[],d=e.id,h=e.innerHTML,g=[],c=l.selectionSettings,m=this.treemap.treeMapHighlightModule,u=l.element.id+"_TreeMap_"+l.layoutType+"_Layout",y=(n=l.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])])&&!n.isLeafItem&&l.enableDrillDown&&(e.textContent.indexOf("[+]")>-1||e.textContent.indexOf("[-]")>-1||!t.isNullOrUndefined(e.nextElementSibling)&&(e.nextSibling.textContent.indexOf("[+]")>-1||e.nextSibling.textContent.indexOf("[-]")>-1));if(d.indexOf("_Item_Index")>-1&&!y)if(this.treemap.selectionId!==d&&(!l.selectionId||parseFloat(l.selectionId.split("_Item_Index_")[1])!==parseFloat(d.split("_Item_Index_")[1]))||this.legendSelectionCollection[0]&&this.legendSelectionCollection[0].ShapeCollection.Elements.length>1){l.levelSelection=[],l.legendId=[],this.shapeSelectId="",$(this.legendSelectionCollection,l),this.legendSelectionCollection=[],o=document.getElementById(u);_=void 0;if(this.treemap.legendSettings.visible){this.shapeSelect=!1;var v=this.treemap.treeMapLegendModule.legendCollections.length,S=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,$(this.shapeSelectionCollection,l),m&&(m.shapeTarget="selection",m.shapeHighlightCollection=[]),_=!l.legendSettings.removeDuplicateLegend&&l.palette&&l.palette.length>0&&0===l.leafItemSettings.colorMapping.length&&0===l.levels.length?parseFloat(d.split("_Item_Index_")[1]):te(v,n,l),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_):document.getElementById(this.treemap.element.id+"_Legend_Index_"+_),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:S[_].legendFill,oldOpacity:S[_].opacity,oldBorderColor:S[_].borderColor,oldBorderWidth:S[_].borderWidth}),K(B="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_):document.getElementById(this.treemap.element.id+"_Legend_Index_"+_+"_Text"),c.fill,c.opacity,null,null),K(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),l.legendId.push(this.shapeElement.id),l.legendId.push(B.id))}a=f(n,[],c.mode,l);for(var x=0;x<o.childElementCount;x++){r=o.childNodes[x];var b=l.layout.renderItems[parseFloat(d.split("_Item_Index_")[1])];n=l.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])];N=""!==l.rangeColorValuePath?l.rangeColorValuePath:null;a.indexOf(n.levelOrderName)>-1&&(t.isNullOrUndefined(N)||(n.data[N]===b.data[N]||"Item"!==c.mode&&l.levels.length>0))&&(g.push(r),d.indexOf("_RectPath")>-1&&l.levelSelection.push(r.id),s.push(n))}k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId=d;for(var I=document.getElementsByClassName("treeMapHighLight"),C=0;C<g.length;C++){if(r=g[C],I.length>0)for(z=0;z<I.length;z++)I[z].id===r.id&&I[z].classList.remove("treeMapHighLight"),A(r.childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),r.classList.add("treeMapSelection");else A(r.childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),r.classList.add("treeMapSelection");i={cancel:!1,name:"itemSelected",treemap:l,items:s,elements:g,text:h,contentItemTemplate:h},l.trigger("itemSelected",i,function(t){t.contentItemTemplate!==h&&p(d,e,t.contentItemTemplate)})}}else $(this.legendSelectionCollection,l),$(this.shapeSelectionCollection,l),this.treemap.legendId=[],this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.levelSelection=[],this.legendSelectId="",(this.legendSelect||this.shapeSelect)&&(k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId="");else if(d.indexOf("_Legend_Shape")>-1||d.indexOf("_Legend_Index")>-1||d.indexOf("_Legend_Text_")>-1){var S=this.treemap.treeMapLegendModule.legendCollections,F=t.isNullOrUndefined(this.legendSelectId)?null:parseFloat(this.legendSelectId.split("_Index_")[1]);if(this.treemap.legendSettings.visible&&F!==parseFloat(d.split("_Index_")[1])){var w,O=void 0,L=void 0;l.legendId=[],l.levelSelection=[],this.legendSelectId=d,this.legendSelect=!1;var T=isNaN(parseInt(d[d.length-1],10))?parseInt(d[d.length-6],10):parseInt(d[d.length-1],10),M=document.getElementById(d);$(this.legendSelectionCollection,l),k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),$(this.shapeSelectionCollection,l),this.legendSelectionCollection=[],m&&(m.shapeTarget="selection",m.legendHighlightCollection=[]);for(var N=""!==l.rangeColorValuePath?l.rangeColorValuePath:null,_="Default"===this.treemap.legendSettings.mode?-1===d.indexOf("Text")?parseFloat(d.split("_Legend_Shape_Index_")[1]):parseFloat(d.split("_Legend_Text_Index_")[1]):parseFloat(d.split("_Legend_Index_")[1]),E=this.treemap.treeMapLegendModule.legendCollections[_].legendData.length,C=0;C<E;C++)for(var D=0;D<this.treemap.layout.renderItems.length;D++)if(!t.isNullOrUndefined(N)&&l.leafItemSettings.colorMapping.length>0&&0===l.levels.length?l.treeMapLegendModule.legendCollections[_].legendData[C].data[N]===l.layout.renderItems[D].data[N]:this.treemap.treeMapLegendModule.legendCollections[_].legendData[C].levelOrderName===this.treemap.layout.renderItems[D].levelOrderName){O=D,L=this.treemap.layout.renderItems[D].groupIndex;H=document.getElementById(this.treemap.element.id+"_Level_Index_"+L+"_Item_Index_"+O+"_RectPath");this.treemap.selectionId=H.id,0!==C&&0!==this.legendSelectionCollection.length||(ie(this.legendSelectionCollection,T,D,M,H,this.treemap.layout.renderItems,S),w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection={Elements:[]}),this.treemap.selectionId=H.id;var P=void 0,B=void 0;M.id.indexOf("Text")>-1?(K(P="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_),c.fill,c.opacity,c.border.color,c.border.width.toString()),K(M,c.fill,c.opacity,null,null),this.legendSelectId=P.id,this.shapeElement=P,l.legendId.push(M.id),l.legendId.push(P.id)):(K(B="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_),c.fill,c.opacity,null,null),K(M,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.shapeElement=M,l.legendId.push(M.id),l.legendId.push(B.id)),K(H,c.fill,c.opacity,c.border.color,c.border.width.toString()),w=this.legendSelectionCollection.length,l.levelSelection.push(H.id),this.legendSelectionCollection[w-1].ShapeCollection.Elements.push(H)}if(0===E&&this.treemap.palette&&this.treemap.palette.length>0)for(var z=0;z<this.treemap.layout.renderItems.length;z++)if((this.treemap.treeMapLegendModule.legendCollections[_].levelOrderName===this.treemap.layout.renderItems[z].levelOrderName||this.treemap.layout.renderItems[z].levelOrderName.indexOf(this.treemap.treeMapLegendModule.legendCollections[_].levelOrderName)>-1)&&(!(!this.treemap.legendSettings.removeDuplicateLegend&&l.palette&&l.palette.length>0)||this.treemap.layout.renderItems[z].parent.isDrilled||_===z)){O=z,L=this.treemap.layout.renderItems[z].groupIndex;var H=document.getElementById(this.treemap.element.id+"_Level_Index_"+L+"_Item_Index_"+O+"_RectPath");ie(this.legendSelectionCollection,_,z,M,H,this.treemap.layout.renderItems,S),this.treemap.selectionId=H.id,w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection={Elements:[]};var R=void 0;M.id.indexOf("Text")>-1?(R="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id.replace("_Text","")):document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+_),K(M,c.fill,c.opacity,null,null),K(R,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.legendSelectId=R.id,this.shapeElement=R):(K(R="Interactive"===this.treemap.legendSettings.mode?document.getElementById(M.id+"_Text"):document.getElementById(this.treemap.element.id+"_Legend_Text_Index_"+_),c.fill,c.opacity,null,null),K(M,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.legendSelectId=d,this.shapeElement=M),K(H,c.fill,c.opacity,c.border.color,c.border.width.toString()),l.levelSelection.push(H.id),-1===l.legendId.indexOf(R.id)&&l.legendId.push(R.id),-1===l.legendId.indexOf(M.id)&&l.legendId.push(M.id),w=this.legendSelectionCollection.length,this.legendSelectionCollection[w-1].ShapeCollection.Elements.push(H)}}else $(this.legendSelectionCollection,this.treemap),$(this.shapeSelectionCollection,this.treemap),this.legendSelectionCollection=[],m&&(m.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.shapeElement=null,this.shapeSelectId="",(this.legendSelect||this.shapeSelect)&&(k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",l),this.treemap.selectionId="")}else y&&($(this.legendSelectionCollection,this.treemap),this.legendSelectionCollection=[],this.legendSelect=!0,this.legendSelectId="",this.treemap.legendId=[],this.treemap.levelSelection=[],this.treemap.selectionId="",this.shapeElement=null)},e.prototype.selectTreemapItem=function(e,t){if(t){for(var i=void 0,l=0;l<this.treemap.layout.renderItems.length;l++)if(e===this.treemap.layout.renderItems[l].levelOrderName){i=this.treemap.layout.renderItems[l];break}var n=this.treemap.selectionSettings,o=[],r=void 0,a=void 0,s=[];this.treemap.levelSelection=[];for(var d=this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout",h=document.getElementById(d),p=f(i,[],n.mode,this.treemap),g=0;g<h.childElementCount;g++)r=h.childNodes[g],i=this.treemap.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])],p.indexOf(i.levelOrderName)>-1&&(o.push(r),this.treemap.levelSelection.push(r.id),s.push(i));if(this.treemap.legendSettings.visible)for(var c=0;c<s.length;c++){this.shapeSelect=!1;var m=this.treemap.treeMapLegendModule.legendCollections.length,u=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,Q(this.shapeSelectionCollection),a=te(m,s[c],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+a):document.getElementById(this.treemap.element.id+"_Legend_Index_"+a),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:u[a].legendFill,oldOpacity:u[a].opacity,oldBorderColor:u[a].borderColor,oldBorderWidth:u[a].borderWidth}),K(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()))}k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);var y=document.getElementById(this.treemap.levelSelection[0]);this.treemap.selectionId=y.childNodes[0].id;for(var v=document.getElementsByClassName("treeMapHighLight"),S=0;S<o.length;S++)if(r=o[S],v.length>0)for(var x=0;x<v.length;x++)v[x].id===r.id&&v[x].classList.remove("treeMapHighLight"),A(r.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),r.classList.add("treeMapSelection");else n.fill="null"===n.fill?this.treemap.layout.renderItems[parseInt(r.id.split("Item_Index_")[1],10)].options.fill:n.fill,A(r.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),r.classList.add("treeMapSelection")}else Q(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],k(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},e.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(t.Browser.touchStartEvent,this.mouseDown,this)},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(t.Browser.touchStartEvent,this.mouseDown)},e.prototype.getModuleName=function(){return"treeMapSelection"},e.prototype.destroy=function(){this.shapeElement=null,this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.removeEventListener(),this.treemap=null},e}(),We=function(e,t){var i={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(i[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);n<l.length;n++)t.indexOf(l[n])<0&&(i[l[n]]=e[l[n]]);return i},je=function(){function e(e){this.treemap=e,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var i,l,n,o,r,a=this;-1!==e.type.indexOf("touch")?(this.isTouch=!0,i=(o=e).changedTouches[0].pageX,l=o.changedTouches[0].pageY,n=o.target):(this.isTouch="touch"===e.pointerType,i=e.pageX,l=e.pageY,n=e.target);var s,d,h,p,g=n.id,c={},m={},u=[];if(g.indexOf("_Item_Index")>-1&&-1===e.type.indexOf("key")){if(c=this.treemap.layout.renderItems[parseFloat(g.split("_Item_Index_")[1])],!t.isNullOrUndefined(c)){s=c.weight,m=c.data,t.isNullOrUndefined(c.options)||(p=c.options.fill),u=this.treemap.enableRtl?[(t.isNullOrUndefined(this.tooltipSettings.format)?null:W(this.tooltipSettings.format,m,this.treemap))||j(s,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[(t.isNullOrUndefined(this.tooltipSettings.format)?null:W(this.tooltipSettings.format,m,this.treemap))||this.treemap.weightValuePath.toString()+" : "+j(s,this.treemap)],document.getElementById(this.tooltipId)?d=document.getElementById(this.tooltipId):((d=t.createElement("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(d)),(h=w(i,l,this.treemap.svgObject)).y=this.tooltipSettings.template?h.y+10:h.y,this.tooltipSettings.textStyle.size=this.tooltipSettings.textStyle.size||this.treemap.themeStyle.tooltipFontSize,this.tooltipSettings.textStyle.fontFamily=this.tooltipSettings.textStyle.fontFamily||this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.fontStyle=t.isNullOrUndefined(this.tooltipSettings.textStyle.fontStyle)?"Normal":this.tooltipSettings.textStyle.fontStyle,this.tooltipSettings.textStyle.fontWeight=this.tooltipSettings.textStyle.fontWeight||this.treemap.themeStyle.fontWeight,this.tooltipSettings.textStyle.color=this.tooltipSettings.textStyle.color||this.treemap.themeStyle.tooltipFontColor,this.tooltipSettings.textStyle.opacity=this.tooltipSettings.textStyle.opacity||this.treemap.themeStyle.tooltipTextOpacity;var f={width:this.tooltipSettings.border.width||this.treemap.themeStyle.tooltipBorderWidth||0,color:this.tooltipSettings.border.color||this.treemap.themeStyle.tooltipBorderColor||"transparent"};if(this.treemap.enableHtmlSanitizer)for(var y=0;y<u.length;y++)u[y]=t.SanitizeHtmlHelper.sanitize(u[y]);r={cancel:!1,name:"tooltipRendering",item:c,options:{location:h,text:u,data:m,border:f,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:n,eventArgs:e},this.treemap.trigger("tooltipRendering",r,function(e){a.addTooltip(r,p,d)})}}else this.removeTooltip(),this.treemap.clearTemplate()},e.prototype.addTooltip=function(e,l,n,o){var r,a;t.isNullOrUndefined(e)?(r=o.cancel,a=o):(r=e.cancel,a=We(e,["cancel"]).options),r?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new i.Tooltip({theme:this.treemap.theme,enable:!0,header:"",data:a.data,template:a.template,content:a.text,shapes:[],location:a.location,palette:[l],areaBounds:this.treemap.areaRect,textStyle:a.textStyle,fill:this.treemap.tooltipSettings.fill?this.treemap.tooltipSettings.fill:this.treemap.themeStyle.tooltipFillColor,border:a.border,enableShadow:!0}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(n),this.treemap.renderReactTemplates())},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-TreeMap-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0];e.parentNode.removeChild(e)}},e.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.treemap.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(t.Browser.touchMoveEvent,this.renderTooltip),this.treemap.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"treeMapTooltip"},e.prototype.destroy=function(){t.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,ne(this.treemap.element.id+"_TreeMapTooltip")),this.svgTooltip=null,this.tooltipSettings=null,this.removeEventListener(),this.treemap=null},e}();return He.Inject(je,Ue,ke,Ae,Ee,Pe,De),e.Border=de,e.ColorMapping=ue,e.ColorValue=Me,e.CommonTitleSettings=ge,e.Font=pe,e.HighlightSettings=be,e.ImageExport=De,e.InitialDrillSettings=ye,e.LayoutPanel=_e,e.LeafItemSettings=ve,e.LegendSettings=fe,e.LevelSettings=Ie,e.LevelsData=Re,e.Location=Te,e.Margin=he,e.PathOption=Oe,e.PdfExport=Pe,e.Print=Ee,e.Rect=Fe,e.RectOption=we,e.SelectionSettings=xe,e.Size=Ce,e.SubTitleSettings=ce,e.TextOption=Le,e.TitleSettings=me,e.TooltipSettings=Se,e.TreeMap=He,e.TreeMapAjax=Ne,e.TreeMapHighlight=ke,e.TreeMapLegend=Ue,e.TreeMapSelection=Ae,e.TreeMapTooltip=je,e.applyOptions=A,e.beforePrint="beforePrint",e.click="click",e.colorCollections=T,e.colorMap=O,e.colorNameToHex=X,e.componentToHex=G,e.convertElement=v,e.convertHexToColor=q,e.convertToContainer=C,e.convertToHexCode=V,e.convertToRect=F,e.createTextStyle=d,e.deSaturationColor=L,e.defaultFont=re,e.doubleClick="doubleClick",e.drawSymbol=J,e.drillEnd="drillEnd",e.drillStart="drillStart",e.findChildren=u,e.findHightLightItems=f,e.findLabelLocation=S,e.findPosition=s,e.formatValue=j,e.getArea=b,e.getColorByValue=N,e.getElement=g,e.getGradientColor=_,e.getLegendIndex=te,e.getMousePosition=w,e.getPercentage=D,e.getPercentageColor=E,e.getShortestEdge=I,e.getTemplateFunction=y,e.getThemeStyle=oe,e.hide=z,e.isContainsData=m,e.isParentItem=Z,e.itemClick="itemClick",e.itemHighlight="itemHighlight",e.itemMove="itemMove",e.itemRendering="itemRendering",e.itemSelected="itemSelected",e.itemsToOrder=c,e.legendItemRendering="legendItemRendering",e.legendMaintain=U,e.legendRendering="legendRendering",e.load="load",e.loaded="loaded",e.maintainSelection=R,e.measureElement=x,e.measureText=r,e.mouseMove="mouseMove",e.orderByArea=H,e.pushCollection=ie,e.removeClassNames=k,e.removeElement=ne,e.removeLegend=$,e.removeSelectionWithHighlight=ee,e.removeShape=Q,e.renderLegendShape=Y,e.renderTextElement=h,e.resize="resize",e.rgbToHex=M,e.rightClick="rightClick",e.setColor=K,e.setItemTemplateContent=p,e.stringToNumber=o,e.textFormatter=W,e.textTrim=a,e.textWrap=B,e.tooltipRendering="tooltipRendering",e.triggerDownload=le,e.wordWrap=P,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport),this.ejs=ej;
11
11
  //# sourceMappingURL=ej2-treemap.min.js.map