@nebula.js/sn-org-chart 1.8.0 → 1.10.0

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.
@@ -1,9 +1,9 @@
1
1
  /*
2
- * @nebula.js/sn-org-chart v1.8.0
2
+ * @nebula.js/sn-org-chart v1.10.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-org-chart"]=t(e.stardust)}(this,function(e){"use strict";var t={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]};var n={getValue:function(e,t,n){const r=t.split(".");let o;if(void 0===e)return n;let a=e;for(o=0;o<r.length;++o){if(void 0===a[r[o]])return n;a=a[r[o]]}return a}};const r="object",o=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];const a=e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}});function i({theme:e,translator:t,id:n,path:r}){const i=()=>e.getStyle(n,r,"fontFamily");return{getDefaultValue:()=>i(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],i=e.getStyle("","","fontFamilies");return Array.isArray(i)&&i.length?r.push(...new Set([n,...i.map(e=>e.split(",").map(e=>e.trim()).map(e=>e.replace(/\s+/g," ").trim()).filter(Boolean).join(", "))])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFonts"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>a(e)),{value:"DefaultHeader",label:t.get("properties.allFonts"),metaText:t.get("properties.default"),groupHeader:!0},...o.map(e=>a(e))]}({theme:e,translator:t,defaultValue:i()})}}var s=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"];const l=e=>({value:e,label:e,groupHeader:!1,disabled:!1});function u({theme:e,translator:t,id:n,path:r}){const o=()=>e.getStyle(n,r,"fontSize");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:e,translator:t,defaultValue:n}){const r=[],o=e.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o])):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0},...r.map(e=>l(e)),{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0},...s.map(e=>l(e))]}({theme:e,translator:t,defaultValue:o()})}}function c({theme:e,translator:t,id:n,path:r}){return{fontFamily:i({theme:e,translator:t,id:n,path:r}),fontSize:u({theme:e,translator:t,id:n,path:r})}}const h=["__proto__","constructor"],d=e=>{if(h.some(t=>e.includes(t)))throw new Error("font-resolver: Forbidden property.")};var p,f,g,m=function(){if(f)return p;f=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!a)return!1;for(r in n);return void 0===r||e.call(n,r)},i=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return p=function e(){var t,n,r,l,u,c,h=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=s(h,n),h!==(l=s(t,n))&&(f&&l&&(a(l)||(u=o(l)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},i(h,{name:n,newValue:e(f,c,l)})):void 0!==l&&i(h,{name:n,newValue:l}));return h},p}();function b(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function y(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function v(){}(g=m)&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")&&g.default;var x=.7,w=1/x,_="\\s*([+-]?\\d+)\\s*",C="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",E="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k=/^#([0-9a-f]{3,8})$/,O=new RegExp(`^rgb\\(${_},${_},${_}\\)$`),S=new RegExp(`^rgb\\(${E},${E},${E}\\)$`),L=new RegExp(`^rgba\\(${_},${_},${_},${C}\\)$`),z=new RegExp(`^rgba\\(${E},${E},${E},${C}\\)$`),N=new RegExp(`^hsl\\(${C},${E},${E}\\)$`),R=new RegExp(`^hsla\\(${C},${E},${E},${C}\\)$`),A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function T(){return this.rgb().formatHex()}function M(){return this.rgb().formatRgb()}function $(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=k.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?j(t):3===n?new P(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?I(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?I(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=O.exec(e))?new P(t[1],t[2],t[3],1):(t=S.exec(e))?new P(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=L.exec(e))?I(t[1],t[2],t[3],t[4]):(t=z.exec(e))?I(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=N.exec(e))?K(t[1],t[2]/100,t[3]/100,1):(t=R.exec(e))?K(t[1],t[2]/100,t[3]/100,t[4]):A.hasOwnProperty(e)?j(A[e]):"transparent"===e?new P(NaN,NaN,NaN,0):null}function j(e){return new P(e>>16&255,e>>8&255,255&e,1)}function I(e,t,n,r){return r<=0&&(e=t=n=NaN),new P(e,t,n,r)}function D(e){return e instanceof v||(e=$(e)),e?new P((e=e.rgb()).r,e.g,e.b,e.opacity):new P}function B(e,t,n,r){return 1===arguments.length?D(e):new P(e,t,n,null==r?1:r)}function P(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function q(){return`#${H(this.r)}${H(this.g)}${H(this.b)}`}function F(){const e=U(this.opacity);return`${1===e?"rgb(":"rgba("}${V(this.r)}, ${V(this.g)}, ${V(this.b)}${1===e?")":`, ${e})`}`}function U(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function V(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function H(e){return((e=V(e))<16?"0":"")+e.toString(16)}function K(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new W(e,t,n,r)}function Z(e){if(e instanceof W)return new W(e.h,e.s,e.l,e.opacity);if(e instanceof v||(e=$(e)),!e)return new W;if(e instanceof W)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new W(i,s,l,e.opacity)}function W(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function G(e){return(e=(e||0)%360)<0?e+360:e}function X(e){return Math.max(0,Math.min(1,e||0))}function Y(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}b(v,$,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:T,formatHex:T,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Z(this).formatHsl()},formatRgb:M,toString:M}),b(P,B,y(v,{brighter(e){return e=null==e?w:Math.pow(w,e),new P(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?x:Math.pow(x,e),new P(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new P(V(this.r),V(this.g),V(this.b),U(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:q,formatHex:q,formatHex8:function(){return`#${H(this.r)}${H(this.g)}${H(this.b)}${H(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:F,toString:F})),b(W,function(e,t,n,r){return 1===arguments.length?Z(e):new W(e,t,n,null==r?1:r)},y(v,{brighter(e){return e=null==e?w:Math.pow(w,e),new W(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?x:Math.pow(x,e),new W(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new P(Y(e>=240?e-240:e+120,o,r),Y(e,o,r),Y(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new W(G(this.h),X(this.s),X(this.l),U(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=U(this.opacity);return`${1===e?"hsl(":"hsla("}${G(this.h)}, ${100*X(this.s)}%, ${100*X(this.l)}%${1===e?")":`, ${e})`}`}}));const J=Math.PI/180,Q=180/Math.PI,ee=.96422,te=.82521,ne=4/29,re=6/29,oe=3*re*re,ae=re*re*re;function ie(e){if(e instanceof se)return new se(e.l,e.a,e.b,e.opacity);if(e instanceof de)return pe(e);e instanceof P||(e=D(e));var t,n,r=he(e.r),o=he(e.g),a=he(e.b),i=le((.2225045*r+.7168786*o+.0606169*a)/1);return r===o&&o===a?t=n=i:(t=le((.4360747*r+.3850649*o+.1430804*a)/ee),n=le((.0139322*r+.0971045*o+.7141733*a)/te)),new se(116*i-16,500*(t-i),200*(i-n),e.opacity)}function se(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function le(e){return e>ae?Math.pow(e,1/3):e/oe+ne}function ue(e){return e>re?e*e*e:oe*(e-ne)}function ce(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function he(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function de(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function pe(e){if(isNaN(e.h))return new se(e.l,0,0,e.opacity);var t=e.h*J;return new se(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}b(se,function(e,t,n,r){return 1===arguments.length?ie(e):new se(e,t,n,null==r?1:r)},y(v,{brighter(e){return new se(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new se(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new P(ce(3.1338561*(t=ee*ue(t))-1.6168667*(e=1*ue(e))-.4906146*(n=te*ue(n))),ce(-.9787684*t+1.9161415*e+.033454*n),ce(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),b(de,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof de)return new de(e.h,e.c,e.l,e.opacity);if(e instanceof se||(e=ie(e)),0===e.a&&0===e.b)return new de(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Q;return new de(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new de(e,t,n,null==r?1:r)},y(v,{brighter(e){return new de(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new de(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return pe(this).rgb()}}));var fe=e=>()=>e;function ge(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fe(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?ge:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fe(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=B(e)).r,(t=B(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=ge(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);var me="center",be="bottom";[{key:"NoDataExist",alignment:me,condition:({layoutService:e})=>{if(!e)return!1;const{x:t,y:n}=e.meta.size;return t*n===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:me,condition:({layoutService:e})=>!!e&&e.getHyperCubeValue("qMeasureInfo").every(e=>"NaN"===e.qMin&&"NaN"===e.qMax)},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:me,condition:({layoutService:e})=>{if(!e)return!1;const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:me},{key:"DataRangeIncludingZero",alignment:be},{key:"LimitedData",alignment:be},{key:"NegativeOrZeroValues",alignment:be}].reduce((e,t)=>(e[t.key]=t,e),{});const ye=["__proto__","constructor"];function ve(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];if(ye.some(e=>r.includes(e)))return;let a=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===a[t]&&(a[t]=Number.isNaN(+r[e+1])?{}:[]),a=a[t]}void 0!==n?a[o]=n:delete a[o]}function xe(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function we(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ce)):void 0===t&&(t=_e);for(var n,r,o,a,i,s=new Oe(e),l=[s];n=l.pop();)if((o=t(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)l.push(r=o[a]=new Oe(o[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(ke)}function _e(e){return e.children}function Ce(e){return Array.isArray(e)?e[1]:null}function Ee(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function ke(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Oe(e){this.data=e,this.depth=this.height=0,this.parent=null}var Se;Oe.prototype=we.prototype={constructor:Oe,count:function(){return this.eachAfter(xe)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,a=this,i=[a],s=[],l=-1;a=i.pop();)if(s.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=s.pop();)e.call(t,a,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(e.call(t,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return we(this).eachBefore(Ee)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}},Se=function(e){
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["sn-org-chart"]=e(t.stardust)}(this,function(t){"use strict";var e={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]};var n={getValue:function(t,e,n){const r=e.split(".");let o;if(void 0===t)return n;let a=t;for(o=0;o<r.length;++o){if(void 0===a[r[o]])return n;a=a[r[o]]}return a}};const r="object",o=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];const a=t=>({value:t,label:t.charAt(0).toUpperCase()+t.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:t}});function i({theme:t,translator:e,id:n,path:r}){const i=()=>t.getStyle(n,r,"fontFamily");return{getDefaultValue:()=>i(),getOptions:()=>function({theme:t,translator:e,defaultValue:n}){const r=[],i=t.getStyle("","","fontFamilies");return Array.isArray(i)&&i.length?r.push(...new Set([n,...i.map(t=>t.split(",").map(t=>t.trim()).map(t=>t.replace(/\s+/g," ").trim()).filter(Boolean).join(", "))])):r.push(n),[{value:"ThemeHeader",label:e.get("properties.themeFonts"),metaText:e.get("properties.theme"),groupHeader:!0},...r.map(t=>a(t)),{value:"DefaultHeader",label:e.get("properties.allFonts"),metaText:e.get("properties.default"),groupHeader:!0},...o.map(t=>a(t))]}({theme:t,translator:e,defaultValue:i()})}}var s=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"];const l=t=>({value:t,label:t,groupHeader:!1,disabled:!1});function u({theme:t,translator:e,id:n,path:r}){const o=()=>t.getStyle(n,r,"fontSize");return{getDefaultValue:()=>o(),getOptions:()=>function({theme:t,translator:e,defaultValue:n}){const r=[],o=t.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push(...new Set([n,...o])):r.push(n),[{value:"ThemeHeader",label:e.get("properties.themeFontSizes"),metaText:e.get("properties.theme"),groupHeader:!0},...r.map(t=>l(t)),{value:"DefaultHeader",label:e.get("properties.allFontSizes"),metaText:e.get("properties.default"),groupHeader:!0},...s.map(t=>l(t))]}({theme:t,translator:e,defaultValue:o()})}}function c({theme:t,translator:e,id:n,path:r}){return{fontFamily:i({theme:t,translator:e,id:n,path:r}),fontSize:u({theme:t,translator:e,id:n,path:r})}}const h=["__proto__","constructor"],d=t=>{if(h.some(e=>t.includes(e)))throw new Error("font-resolver: Forbidden property.")};var p,f,g,m=function(){if(f)return p;f=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===e.call(t)},a=function(n){if(!n||"[object Object]"!==e.call(n))return!1;var r,o=t.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&t.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!a)return!1;for(r in n);return void 0===r||t.call(n,r)},i=function(t,e){n&&"__proto__"===e.name?n(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(r)return r(e,n).value}return e[n]};return p=function t(){var e,n,r,l,u,c,h=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(e=arguments[d]))for(n in e)r=s(h,n),h!==(l=s(e,n))&&(f&&l&&(a(l)||(u=o(l)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},i(h,{name:n,newValue:t(f,c,l)})):void 0!==l&&i(h,{name:n,newValue:l}));return h},p}();function b(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function y(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function v(){}(g=m)&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")&&g.default;var x=.7,w=1/x,_="\\s*([+-]?\\d+)\\s*",C="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",E="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",k=/^#([0-9a-f]{3,8})$/,O=new RegExp(`^rgb\\(${_},${_},${_}\\)$`),S=new RegExp(`^rgb\\(${E},${E},${E}\\)$`),L=new RegExp(`^rgba\\(${_},${_},${_},${C}\\)$`),N=new RegExp(`^rgba\\(${E},${E},${E},${C}\\)$`),z=new RegExp(`^hsl\\(${C},${E},${E}\\)$`),M=new RegExp(`^hsla\\(${C},${E},${E},${C}\\)$`),R={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function A(){return this.rgb().formatHex()}function T(){return this.rgb().formatRgb()}function $(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=k.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?j(e):3===n?new P(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?I(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?I(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=O.exec(t))?new P(e[1],e[2],e[3],1):(e=S.exec(t))?new P(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=L.exec(t))?I(e[1],e[2],e[3],e[4]):(e=N.exec(t))?I(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=z.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=M.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):R.hasOwnProperty(t)?j(R[t]):"transparent"===t?new P(NaN,NaN,NaN,0):null}function j(t){return new P(t>>16&255,t>>8&255,255&t,1)}function I(t,e,n,r){return r<=0&&(t=e=n=NaN),new P(t,e,n,r)}function D(t){return t instanceof v||(t=$(t)),t?new P((t=t.rgb()).r,t.g,t.b,t.opacity):new P}function B(t,e,n,r){return 1===arguments.length?D(t):new P(t,e,n,null==r?1:r)}function P(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function q(){return`#${H(this.r)}${H(this.g)}${H(this.b)}`}function F(){const t=U(this.opacity);return`${1===t?"rgb(":"rgba("}${V(this.r)}, ${V(this.g)}, ${V(this.b)}${1===t?")":`, ${t})`}`}function U(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function V(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function H(t){return((t=V(t))<16?"0":"")+t.toString(16)}function K(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function Z(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof v||(t=$(t)),!t)return new W;if(t instanceof W)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),a=Math.max(e,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new W(i,s,l,t.opacity)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function G(t){return(t=(t||0)%360)<0?t+360:t}function X(t){return Math.max(0,Math.min(1,t||0))}function Y(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}b(v,$,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Z(this).formatHsl()},formatRgb:T,toString:T}),b(P,B,y(v,{brighter(t){return t=null==t?w:Math.pow(w,t),new P(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?x:Math.pow(x,t),new P(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new P(V(this.r),V(this.g),V(this.b),U(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:q,formatHex:q,formatHex8:function(){return`#${H(this.r)}${H(this.g)}${H(this.b)}${H(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:F,toString:F})),b(W,function(t,e,n,r){return 1===arguments.length?Z(t):new W(t,e,n,null==r?1:r)},y(v,{brighter(t){return t=null==t?w:Math.pow(w,t),new W(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?x:Math.pow(x,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new P(Y(t>=240?t-240:t+120,o,r),Y(t,o,r),Y(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new W(G(this.h),X(this.s),X(this.l),U(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=U(this.opacity);return`${1===t?"hsl(":"hsla("}${G(this.h)}, ${100*X(this.s)}%, ${100*X(this.l)}%${1===t?")":`, ${t})`}`}}));const J=Math.PI/180,Q=180/Math.PI,tt=.96422,et=.82521,nt=4/29,rt=6/29,ot=3*rt*rt,at=rt*rt*rt;function it(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return pt(t);t instanceof P||(t=D(t));var e,n,r=ht(t.r),o=ht(t.g),a=ht(t.b),i=lt((.2225045*r+.7168786*o+.0606169*a)/1);return r===o&&o===a?e=n=i:(e=lt((.4360747*r+.3850649*o+.1430804*a)/tt),n=lt((.0139322*r+.0971045*o+.7141733*a)/et)),new st(116*i-16,500*(e-i),200*(i-n),t.opacity)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function lt(t){return t>at?Math.pow(t,1/3):t/ot+nt}function ut(t){return t>rt?t*t*t:ot*(t-nt)}function ct(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ht(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dt(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pt(t){if(isNaN(t.h))return new st(t.l,0,0,t.opacity);var e=t.h*J;return new st(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}b(st,function(t,e,n,r){return 1===arguments.length?it(t):new st(t,e,n,null==r?1:r)},y(v,{brighter(t){return new st(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new st(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new P(ct(3.1338561*(e=tt*ut(e))-1.6168667*(t=1*ut(t))-.4906146*(n=et*ut(n))),ct(-.9787684*e+1.9161415*t+.033454*n),ct(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),b(dt,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=it(t)),0===t.a&&0===t.b)return new dt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Q;return new dt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new dt(t,e,n,null==r?1:r)},y(v,{brighter(t){return new dt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new dt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return pt(this).rgb()}}));var ft=t=>()=>t;function gt(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ft(isNaN(t)?e:t)}!function t(e){var n=function(t){return 1===(t=+t)?gt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ft(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=B(t)).r,(e=B(e)).r),o=n(t.g,e.g),a=n(t.b,e.b),i=gt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=a(e),t.opacity=i(e),t+""}}return r.gamma=t,r}(1);var mt="center",bt="bottom";[{key:"NoDataExist",alignment:mt,condition:({layoutService:t})=>{if(!t)return!1;const{x:e,y:n}=t.meta.size;return e*n===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:mt,condition:({layoutService:t})=>!!t&&t.getHyperCubeValue("qMeasureInfo").every(t=>"NaN"===t.qMin&&"NaN"===t.qMax)},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:mt,condition:({layoutService:t})=>{if(!t)return!1;const{isContinuous:e}=t.meta;if(!e)return!1;const n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:mt},{key:"DataRangeIncludingZero",alignment:bt},{key:"LimitedData",alignment:bt},{key:"NegativeOrZeroValues",alignment:bt}].reduce((t,e)=>(t[e.key]=e,t),{});const yt=["__proto__","constructor"];function vt(t,e,n){if(void 0===t||void 0===e)return;const r=e.split("."),o=r[r.length-1];if(yt.some(t=>r.includes(t)))return;let a=t;for(let t=0;t<r.length-1;++t){const e=r[t];void 0===a[e]&&(a[e]=Number.isNaN(+r[t+1])?{}:[]),a=a[e]}void 0!==n?a[o]=n:delete a[o]}function xt(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function wt(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ct)):void 0===e&&(e=_t);for(var n,r,o,a,i,s=new Ot(t),l=[s];n=l.pop();)if((o=e(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)l.push(r=o[a]=new Ot(o[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(kt)}function _t(t){return t.children}function Ct(t){return Array.isArray(t)?t[1]:null}function Et(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function kt(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ot(t){this.data=t,this.depth=this.height=0,this.parent=null}var St;Ot.prototype=wt.prototype={constructor:Ot,count:function(){return this.eachAfter(xt)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,a=this,i=[a],s=[],l=-1;a=i.pop();)if(s.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(t.call(e,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;for(t=n.pop(),e=r.pop();t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return wt(this).eachBefore(Et)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}},St=function(t){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,a,i,s,l,u,c,h,d=e.length,p=e.search(/[0-9\-\+#]/),f=p>0?e.substring(0,p):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),b=d-m,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),x=m>0?e.substring(v,d):"";if(n=(t="-"===(e=e.substring(p,v)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",a=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(a),e[0]=c.join(""),(i=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-i;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(g="",b=(h=t[0]).length%l,d=h.length,v=0;v<d;v++)g+=h.charAt(v),!((v-b+1)%l)&&v<d-l&&(g+=a);t[0]=g}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},Se({exports:{}});const Le="'Source Sans Pro', 'Arial', 'sans-serif'",ze="#333333",Ne="#595959",Re="#737373",Ae="#cccccc",Te="#e6e6e6";function Me(e){const t={};return[...e,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ne],["object","axis.label.name","fontFamily",Le],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Ae],["object","axis.line.minor","color",Te],["object","axis.title","color"],["object","axis.title","fontFamily",Le],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Te],["object","grid.line.major","color",Ae],["object","grid.line.minor","color",Te],["object","label.value","color",Ne],["object","label.value","fontFamily",Le],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ne],[!1,"label.value","lightColor",Te],["object","outOfRange","color","#999"],["object","legend.title","color",ze],["object","legend.title","fontFamily",Le],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ne],["object","legend.label","fontFamily",Le],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",ze],["object","referenceLine.label.name","fontFamily",Le],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Te],["object","referenceLine.outOfBounds","fontFamily",Le],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Re,e=>"transparent"===e?Re:e]].reduce((e,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return t[r]||(t[r]=!0,e.push(n)),e},[]).sort((e,t)=>(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0))}const $e="object",je=e=>e;function Ie({theme:e,id:t,transform:n,extend:r,matrix:o}){const a={},i=n.reduce((e,t)=>{const[n,r]=t;return e[n]=r,e},{});return o.forEach(n=>{const[r,o,s,l,u=e=>e]=n,c=function({theme:e,base:t,path:n,attribute:r,defaultValue:o}){if(!e||!1===t)return o;const a=e.getStyle(t,n,r);return void 0===a?o:a}({theme:e,base:r===$e&&t?`${$e}.${t}`:r,path:o,attribute:s,defaultValue:l}),h=(i[`${o}.${s}`]||je)(u(c));ve(a,[o,s].filter(Boolean).join("."),h)}),r.forEach(e=>{const[t,n]=e;ve(a,t,n)}),a}var De={CARD_TITLE_FONTSIZE:"14px",CARD_BODY_FONTSIZE:"11px",FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{color:"#e6e6e6"},BACKGROUND_COLOR_TYPE:"colorPicker",BACKGROUND_COLOR:{index:-1,color:"#ffffff"},BORDER_COLOR_TYPE:"auto",BORDER_COLOR:{index:-1,color:"#737373"},BORDER_FULL:!0,BORDER_TOP:!0,FONT_COLOR_USE_EXPRESSION:!1,BACKGROUND_USE_EXPRESSION:!1,BORDER_USE_EXPRESSION:!1,IMAGE_LOCATION:"both",IMAGE_ALIGNMENT:"left",IMAGE_SHAPE:"rectangle",IMAGE_CLIP:!0};const Be=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],Pe=e=>e.contrastTextColor??!0;function qe(e,t,n){const r=`${e}.${t}`,o=`${r}.fontFamily`,a=`${r}.fontSize`,i=`${r}.color`,s=`${r}.colorExpression`;return{fontFamilyItem:{component:"dropdown",ref:o,options:()=>n.getOptions(`card.${o}`),defaultValue:()=>n.getDefaultValue(`card.${o}`)},fontSizeItem:{component:"dropdown",ref:a,options:()=>n.getOptions(`card.${a}`),defaultValue:()=>n.getDefaultValue(`card.${a}`)},fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:`${r}.useColorExpression`,width:!0,component:"dropdown",defaultValue:De.FONT_COLOR_USE_EXPRESSION,options:Be,show:e=>!Pe(e)},colorPicker:{component:"color-picker",ref:i,width:!1,dualOutput:!0,defaultValue:De.FONT_COLOR_DARK,show:n=>!Pe(n)&&!n[e]?.[t]?.useColorExpression}}},colorExpression:{component:"input-field-expression",type:"string",ref:s,width:!0,expression:"optional",defaultValue:"",show:n=>!Pe(n)&&n[e]?.[t]?.useColorExpression}}}const Fe=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],Ue=[{value:"card",translation:"Card only"},{value:"tooltip",translation:"Tooltip only"},{value:"both",translation:"Card and tooltip"}],Ve=[{value:"left",translation:"Left"},{value:"right",translation:"Right"},{value:"top",translation:"Top"},{value:"bottom",translation:"Bottom"}],He=[{value:"rectangle",translation:"Rectangle"},{value:"round",translation:"Round"}];function Ke(e,t,n){const o=function({theme:e,translator:t,config:n={}}){const{id:o,paths:a}=function({config:e={}}){const{id:t,paths:n}=e;return{id:void 0===t?r:`${r}.${t}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};a.forEach(n=>{const r=n.split(".");d(r);let a=i;for(let i=0;i<r.length;i++){const s=r[i];i===r.length-1?a[s]=c({theme:e,translator:t,id:o,path:n}):void 0===a[s]&&(a[s]={}),a=a[s]}});const s=e=>{const t=e.split(".");d(t);let n=i;for(let r=0;r<t.length;r++){const o=t[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${e}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=e=>s(e).getDefaultValue(),i.getOptions=e=>s(e).getOptions(),i}({theme:e,translator:n,config:{id:"orgChart",paths:["card.title.main","card.title.subTitle","card.label.description","card.label.measureLabel","card.label.measureValue"]}}),a=e=>(e.border?.topBar??De.BORDER_TOP)||(e.border?.fullBorder??De.BORDER_FULL),i=e=>e.border?.contrastColor??!0;return{component:"styling-panel",show:!0,chartType:"orgchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.OrgChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{contrastTextColorSection:{translation:"Object.OrgChart.Card.TextColor",component:"panel-section",items:{contrastTextColorItems:{component:"items",ref:"components",key:"card",items:{useContrast:{component:"checkbox",type:"boolean",ref:"contrastTextColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0}}}}},titleSection:{translation:"Object.OrgChart.Card.Title",component:"panel-section",items:{titleItems:{component:"items",ref:"components",key:"card",items:qe("title","main",o)}}},subtitleSection:{translation:"Object.OrgChart.Card.Subtitle",component:"panel-section",items:{subtitleItems:{component:"items",ref:"components",key:"card",items:qe("title","subTitle",o)}}},descriptionSection:{translation:"Object.OrgChart.Card.Description",component:"panel-section",items:{descriptionItems:{component:"items",ref:"components",key:"card",items:qe("label","description",o)}}},measureLabelSection:{translation:"Object.OrgChart.Card.MeasureLabel",component:"panel-section",items:{measureLabelItems:{component:"items",ref:"components",key:"card",items:qe("label","measureLabel",o)}}},measureValueSection:{translation:"Object.OrgChart.Card.MeasureValue",component:"panel-section",items:{measureValueItems:{component:"items",ref:"components",key:"card",items:qe("label","measureValue",o)}}},backgroundColorSection:{component:"panel-section",translation:"Object.OrgChart.ColorLabelExpression",items:{backgroundColorItems:{component:"items",ref:"components",key:"card",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"background.useColorExpression",width:9,component:"dropdown",defaultValue:De.BACKGROUND_USE_EXPRESSION,options:Fe},colorPicker:{component:"color-picker",type:"object",ref:"background.color",width:3,dualOutput:!0,defaultValue:De.BACKGROUND_COLOR,showAlpha:!0,show:e=>!e.background?.useColorExpression},colorExpression:{component:"input-field-expression",type:"string",ref:"background.colorExpression",expression:"optional",defaultValue:"",show:e=>e.background?.useColorExpression}}}}}}},cardBorderSection:{component:"panel-section",translation:"Object.OrgChart.CardAppearance",items:{cardBorderItems:{component:"items",ref:"components",key:"card",items:{topBar:{component:"checkbox",ref:"border.topBar",translation:"Object.OrgChart.TopBar",defaultValue:De.BORDER_TOP},fullBorder:{component:"checkbox",ref:"border.fullBorder",translation:"properties.border",defaultValue:De.BORDER_FULL},contrastBorderColorSection:{component:"checkbox",type:"boolean",key:"card",ref:"border.contrastColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0,show:e=>a(e)},borderColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{component:"dropdown",ref:"border.useColorExpression",width:9,translation:"properties.border.color",defaultValue:De.BORDER_USE_EXPRESSION,options:Fe,show:e=>a(e)&&!i(e)},colorPicker:{component:"color-picker",ref:"border.color",width:3,dualOutput:!0,defaultValue:De.BORDER_COLOR,show:e=>a(e)&&!i(e)&&!e.border?.useColorExpression},colorExpression:{component:"input-field-expression",type:"string",ref:"border.colorExpression",expression:"optional",defaultValue:"",show:e=>a(e)&&!i(e)&&e.border?.useColorExpression}}}}}}},imageSection:{component:"panel-section",translation:"Object.OrgChart.ImageOptions",items:{imageItems:{component:"items",ref:"components",key:"card",items:{location:{component:"dropdown",ref:"image.location",translation:"Object.OrgChart.ImageLocation",options:Ue,defaultValue:De.IMAGE_LOCATION},alignment:{component:"dropdown",ref:"image.alignment",translation:"Object.OrgChart.ImageAlignment",options:Ve,defaultValue:De.IMAGE_ALIGNMENT},shape:{component:"dropdown",ref:"image.shape",translation:"Object.OrgChart.ImageShape",options:He,defaultValue:De.IMAGE_SHAPE},clip:{component:"checkbox",ref:"image.clip",translation:"Object.OrgChart.ImageFit",defaultValue:De.IMAGE_CLIP,show:e=>"rectangle"===(e.image?.shape??De.IMAGE_SHAPE)}}}}}}}}const Ze=[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}],We={uses:"sorting"},Ge={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"},rowLimit:{type:"integer",translation:"$RowLimit",ref:"rowLimit",defaultValue:3e4,min:5e3,max:1e5,show:!1}}}}},Xe=(e,t,r)=>{const o=r?.sense?.theme,a={uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{orgChartStyling:Ke(o,0,e),navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:Ze},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:e=>"expandAll"!==n.getValue(e,"navigationMode")}}}}}}};return a};function Ye(e){return function({translator:e,flags:t,anything:n}){return{definition:{type:"items",component:"accordion",items:{data:{uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(e,t)=>t.getDimensions()[0]===e,ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.LabelExpression",defaultValue:"",id:"labelExpression",tid:"labelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.SubLabelExpression",defaultValue:"",id:"subLabelExpression",tid:"subLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ExtraLabelExpression",defaultValue:"",id:"extraLabelExpression",tid:"extraLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ImageUrl",defaultValue:"",id:"imageExpression",tid:"imageExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(e,t)=>t.getDimensions()[0]===e,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}},sorting:We,addOns:Ge,settings:Xe(e,0,n)}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0},migrate:{properties:e=>function(e){if(e.components?.length>0)return e;function t(e){return{useColorExpression:"byExpression"===e.colorType,color:e.color,colorExpression:e.colorExpression,colorType:e.colorType}}function n(e){return"auto"===e.colorType}const r={key:"card",title:{main:{...t(e.style?.fontColor)},subTitle:{...t(e.style?.fontColor)}},label:{description:{...t(e.style?.fontColor)},measureLabel:{...t(e.style?.fontColor)},measureValue:{...t(e.style?.fontColor)}},contrastTextColor:n(e.style?.fontColor),background:{...t(e.style?.backgroundColor)},border:{...t(e.style?.border),fullBorder:e.style?.border?.fullBorder,topBar:e.style?.border?.top,contrastColor:n(e.style?.border)}};return e.components=[r],e}(e)}}}(e)}var Je={Object_OrgChart:{id:"Object.OrgChart",locale:{"de-DE":"Organisationsdiagramm","en-US":"Org chart","es-ES":"Organigrama","fr-FR":"Organigramme","it-IT":"Organigramma","ja-JP":"組織図","ko-KR":"조직도","nl-NL":"Organisatiediagram","pl-PL":"Wykres organizacyjny","pt-BR":"Quadro organizacional","ru-RU":"Организационная диаграмма","sv-SE":"Organisationsdiagram","tr-TR":"Kuruluş grafiği","zh-CN":"组织图","zh-TW":"組織圖"}},Object_OrgChart_BackgroundColor:{id:"Object.OrgChart.BackgroundColor",locale:{"de-DE":"Hintergrundfarbe","en-US":"Background color","es-ES":"Color de fondo","fr-FR":"Couleur d'arrière-plan","it-IT":"Colore sfondo","ja-JP":"背景色","ko-KR":"배경색","nl-NL":"Achtergrondkleur","pl-PL":"Kolor tła","pt-BR":"Cor de fundo","ru-RU":"Цвет фона","sv-SE":"Bakgrundsfärg","tr-TR":"Arka plan rengi","zh-CN":"背景颜色","zh-TW":"背景顏色"}},Object_OrgChart_CardAppearance:{id:"Object.OrgChart.CardAppearance",locale:{"de-DE":"Kartendarstellung","en-US":"Card appearance","es-ES":"Aspecto de la tarjeta","fr-FR":"Aspect de la carte","it-IT":"Aspetto scheda","ja-JP":"カード スタイル","ko-KR":"카드 모양","nl-NL":"Uiterlijk van de kaart","pl-PL":"Wygląd karty","pt-BR":"Aparência do cartão","ru-RU":"Вид карточки","sv-SE":"Kortets utseende","tr-TR":"Kart görünüşü","zh-CN":"卡外观","zh-TW":"卡片外觀"}},Object_OrgChart_ColorLabelExpression:{id:"Object.OrgChart.ColorLabelExpression",locale:{"de-DE":"Hintergrundfarbe der Karte","en-US":"Card background color","es-ES":"Color de fondo de la tarjeta","fr-FR":"Couleur d'arrière-plan de la carte","it-IT":"Colore sfondo scheda","ja-JP":"カードの背景色","ko-KR":"카드 배경색","nl-NL":"Achtergrondkleur kaart","pl-PL":"Kolor tła karty","pt-BR":"Cor de fundo do cartão","ru-RU":"Цвет фона карточки","sv-SE":"Kortets bakgrundsfärg","tr-TR":"Kart arka plan rengi","zh-CN":"卡背景颜色","zh-TW":"卡片背景顏色"}},Object_OrgChart_CycleWarning:{id:"Object.OrgChart.CycleWarning",locale:{"de-DE":"Die Daten enthalten Zirkelbezüge, Knoten werden ausgelassen.","en-US":"Data contains circular references, nodes are omitted.","es-ES":"Los datos contienen referencias circulares, se omiten los nodos.","fr-FR":"Les données contiennent des références circulaires. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: i dati contengono riferimenti incrociati.","ja-JP":"データに循環参照が含まれています。ノードは省略されます。","ko-KR":"데이터가 순환 참조를 포함합니다. 노드는 생략됩니다.","nl-NL":"Gegevens bevatten cirkelreferenties, knooppunten worden weggelaten.","pl-PL":"Dane zawierają odwołania cykliczne, węzły są pomijane.","pt-BR":"Os dados contêm referências circulares, os nós são omitidos.","ru-RU":"В данных содержатся циклические ссылки, узлы опущены.","sv-SE":"Data innehåller cirkelreferenser. Noder utelämnas.","tr-TR":"Veriler döngüsel referanslar içeriyor; düğümler atlandı.","zh-CN":"数据包含循环引用,已省略节点。","zh-TW":"資料包含循環參照,已省略節點。"}},Object_OrgChart_Description:{id:"Object.OrgChart.Description",locale:{"de-DE":"Zeigt die Beziehungen einer Organisation oder ähnlich strukturierter Daten an. Startet oben und ermöglicht die Navigation durch die Hierarchie.","en-US":"Displays the relations of an organization or similarly structured data. Starts at the top and allows for navigation through the hierarchy.","es-ES":"Muestra las relaciones jerárquicas de una organización o datos estructurados de manera similar. Comienza en la parte superior y permite la navegación a través de la jerarquía.","fr-FR":"Affiche les relations d'une entreprise ou de données structurées de manière similaire. Démarre au sommet et permet la navigation à travers la hiérarchie.","it-IT":"Visualizza le relazioni di un'organizzazione o dati strutturati in modo analogo. Inizia dall'alto e consente la navigazione attraverso la gerarchia.","ja-JP":"組織の関係やそれに類似する構造のデータを表示します。上部から開始し、階層を移動できます。","ko-KR":"조직 또는 유사하게 구조화된 데이터의 관계를 표시합니다. 맨 위에서 시작하여 계층 구조를 탐색할 수 있습니다.","nl-NL":"Geeft de relaties van een organisatie of vergelijkbaar gestructureerde gegevens weer. Begint bovenaan en maakt navigatie door de hiërarchie mogelijk.","pl-PL":"Wyświetla relacje organizacji lub dane o podobnej strukturze. Zaczyna się od góry i umożliwia nawigację w hierarchii.","pt-BR":"Exibe as relações de uma organização ou dados estruturados de forma semelhante. Começa no topo e permite a navegação pela hierarquia.","ru-RU":"Отображает отношения организации или аналогично структурированные данные. Начинается сверху и позволяет перемещаться по иерархии.","sv-SE":"Visar relationerna i en organisation eller data som är strukturerat på liknande sätt. Startar högst upp och möjliggör navigering genom hierarkin.","tr-TR":"Bir kuruluşun ilişkilerini veya benzer yapılanan verileri gösterir. En üstte açılır ve hiyerarşide hareket etmenize olanak sağlar.","zh-CN":"显示组织或类似结构数据的关系。从顶部开始,并允许在层次结构中进行导航。","zh-TW":"顯示組織的關係或類似結構的資料。在頂端開始並允許瀏覽階層。"}},Object_OrgChart_DummyWarn:{id:"Object.OrgChart.DummyWarn",locale:{"de-DE":"Die Daten enthalten mehrere Root-Knoten.","en-US":"The data contains multiple root nodes.","es-ES":"Los datos contienen múltiples nodos raíz.","fr-FR":"Les données contiennent plusieurs nœuds racines.","it-IT":"I dati contengono più nodi principali.","ja-JP":"データには複数のルート ノードが含まれています。","ko-KR":"데이터가 여러 루트 노드를 포함합니다.","nl-NL":"De gegevens bevatten meerdere hoofdknooppunten.","pl-PL":"Dane zawierają wiele węzłów głównych.","pt-BR":"Os dados contêm vários nós raiz.","ru-RU":"В данных содержится несколько корневых узлов.","sv-SE":"Data innehåller flera rotnoder.","tr-TR":"Veriler birden çok kök düğümü içeriyor.","zh-CN":"数据包含多个根节点。","zh-TW":"資料包含多個根節點。"}},Object_OrgChart_ExpandAll:{id:"Object.OrgChart.ExpandAll",locale:{"de-DE":"Gesamte Struktur","en-US":"Entire tree","es-ES":"Árbol entero","fr-FR":"Arborescence complète","it-IT":"Intero albero","ja-JP":"ツリー全体","ko-KR":"전체 트리","nl-NL":"Volledige structuur","pl-PL":"Całe drzewo","pt-BR":"Árvore inteira","ru-RU":"Все дерево","sv-SE":"Hela trädet","tr-TR":"Tüm ağaç","zh-CN":"整个树","zh-TW":"整個樹狀結構"}},Object_OrgChart_ExtraLabelDesc:{id:"Object.OrgChart.ExtraLabelDesc",locale:{"de-DE":"Die Beschreibung wird nur angezeigt, wenn eine Kennzahl nicht verwendet wird","en-US":"Description is only visible when a measure is not used","es-ES":"La descripción solo está visible cuando no se usa una medida","fr-FR":"La description est visible uniquement lorsqu'une mesure n'est pas utilisée","it-IT":"È possibile visualizzare la descrizione solo se le misure non vengono utilizzate","ja-JP":"メジャーが使用されていない場合にのみ、説明が表示されます。","ko-KR":"측정값을 사용하지 않는 경우에만 설명을 볼 수 있습니다.","nl-NL":"Beschrijving is alleen zichtbaar wanneer een meting niet wordt gebruikt","pl-PL":"Opis jest widoczny tylko wtedy, gdy miara nie jest używana","pt-BR":"A descrição é visível apenas quando uma medida não é usada","ru-RU":"Описание отображается, только если мера не используется","sv-SE":"Beskrivning används bara när ett mått inte används","tr-TR":"Bir hesaplama kullanılmadığında yalnızca açıklama görünür","zh-CN":"描述仅在未使用度量时可用","zh-TW":"只有在不使用量值時才會顯示描述"}},Object_OrgChart_ExtraLabelExpression:{id:"Object.OrgChart.ExtraLabelExpression",locale:{"de-DE":"Beschreibung der Karte","en-US":"Card description","es-ES":"Descripción de la tarjeta","fr-FR":"Description de la carte","it-IT":"Descrizione scheda","ja-JP":"カードの説明","ko-KR":"카드 설명","nl-NL":"Beschrijving kaart","pl-PL":"Opis karty","pt-BR":"Descrição do cartão","ru-RU":"Описание карточки","sv-SE":"Kortets beskrivning","tr-TR":"Kart açıklaması","zh-CN":"卡描述","zh-TW":"卡片描述"}},Object_OrgChart_FontColor:{id:"Object.OrgChart.FontColor",locale:{"de-DE":"Schriftfarbe","en-US":"Font color","es-ES":"Color de fuente","fr-FR":"Couleur de police","it-IT":"Colore formato carattere","ja-JP":"フォントの色","ko-KR":"글꼴 색","nl-NL":"Tekstkleur","pl-PL":"Kolor czcionki","pt-BR":"Cor da fonte","ru-RU":"Цвет шрифта","sv-SE":"Teckenfärg","tr-TR":"Yazı tipi rengi","zh-CN":"字体颜色","zh-TW":"字型色彩"}},Object_OrgChart_FreeMode:{id:"Object.OrgChart.FreeMode",locale:{"de-DE":"Erweitern/reduzieren","en-US":"Expand/collapse","es-ES":"Expandir/contraer","fr-FR":"Développer/Réduire","it-IT":"Espandi/comprimi","ja-JP":"展開/折りたたむ","ko-KR":"확장/축소","nl-NL":"Uitvouwen/alles samenvouwen","pl-PL":"Rozwiń/zwiń","pt-BR":"Expandir/recolher","ru-RU":"Развернуть/свернуть","sv-SE":"Visa/dölj","tr-TR":"Genişlet/daralt","zh-CN":"展开/折叠","zh-TW":"展開/摺疊"}},Object_OrgChart_IncludeDescendants:{id:"Object.OrgChart.IncludeDescendants",locale:{"de-DE":"Alle untergeordneten Elemente einschließen","en-US":"Include all children","es-ES":"Incluir todos los nodos secundarios","fr-FR":"Inclure tous les enfants","it-IT":"Includi tutti i nodi secondari","ja-JP":"すべての子を含める","ko-KR":"모든 자식을 포함합니다.","nl-NL":"Alle onderliggende elementen opnemen","pl-PL":"Uwzględniaj wszystkie elementy podrzędne","pt-BR":"Incluir todos os filhos","ru-RU":"Включить все дочерние элементы","sv-SE":"Inkludera alla underordnade","tr-TR":"Tüm alt öğeleri dahil edin","zh-CN":"包含所有子项","zh-TW":"包括所有子項"}},Object_OrgChart_LabelExpression:{id:"Object.OrgChart.LabelExpression",locale:{"de-DE":"Titel der Karte","en-US":"Card title","es-ES":"Título de tarjeta","fr-FR":"Titre de la carte","it-IT":"Titolo scheda","ja-JP":"カード タイトル","ko-KR":"카드 제목","nl-NL":"Titel kaart","pl-PL":"Tytuł karty","pt-BR":"Título do cartão","ru-RU":"Заголовок карточки","sv-SE":"Kortets rubrik","tr-TR":"Kart başlığı","zh-CN":"卡标题","zh-TW":"卡片標題"}},Object_OrgChart_MaxChildren:{id:"Object.OrgChart.MaxChildren",locale:{"de-DE":"Maximale Anzahl an untergeordneten Knoten erreicht, Knoten werden ausgelassen.","en-US":"Maximum number of child nodes reached, nodes are omitted.","es-ES":"Se alcanzó el número máximo de nodos secundarios, se omiten los nodos.","fr-FR":"Nombre maximal de nœuds enfants atteint. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: numero massimo di nodi secondari raggiunto.","ja-JP":"子ノードの最大数に達しました。ノードは省略されます。","ko-KR":"최대 자식 노드 수에 도달했습니다. 노드는 생략됩니다.","nl-NL":"Maximaal aantal onderliggende knooppunten bereikt, knooppunten worden weggelaten.","pl-PL":"Osiągnięto maksymalną liczbę węzłów podrzędnych, węzły są pomijane.","pt-BR":"Número máximo de nós filhos atingidos, os nós são omitidos.","ru-RU":"Достигнуто максимальное количество дочерних узлов, узлы опущены.","sv-SE":"Maximalt antal underordnade noder har uppnåtts. Noder utelämnas.","tr-TR":"Maksimum alt öğe düğüm sayısına ulaşıldı; düğümler atlandı.","zh-CN":"已达到子节点最大数目,将省略节点。","zh-TW":"已達子節點數量上限,已省略節點。"}},Object_OrgChart_MaxData:{id:"Object.OrgChart.MaxData",locale:{"de-DE":"Die Datenobergrenze ist erreicht. Die Struktur wird möglicherweise nicht korrekt dargestellt.","en-US":"The maximum data limit is reached. The tree may display incorrectly.","es-ES":"Se ha alcanzado el límite máximo de datos. Puede que el árbol se muestre incorrectamente.","fr-FR":"La limite de données maximale est atteinte. Il se peut que l'arborescence ne s'affiche pas correctement.","it-IT":"Limite massimo dati raggiunto. La visualizzazione del grafico potrebbe essere compromessa.","ja-JP":"最大データ制限に達しました。ツリーが正しく表示されない場合があります。","ko-KR":"최대 데이터 제한에 도달했습니다. 트리가 잘못 표시될 수 있습니다.","nl-NL":"Het maximale datalimiet is bereikt. De boom kan incorrect worden weergegeven.","pl-PL":"Osiągnięto maksymalny limit danych. Drzewo może wyświetlać się nieprawidłowo.","pt-BR":"O limite máximo de dados foi atingido. A árvore pode ser exibida incorretamente.","ru-RU":"Достигнут максимальный предел данных. Дерево может отображаться некорректно.","sv-SE":"Maxgränsen för data har nåtts. Trädet kanske inte visas på rätt sätt.","tr-TR":"Maksimum veri sınırına ulaşıldı. Ağaç grafik doğru görüntülenmeyebilir.","zh-CN":"已达到最大数据限制。树的显示可能不当。","zh-TW":"已達資料上限。樹狀目錄的顯示方式可能不正確。"}},Object_OrgChart_MissingRoot:{id:"Object.OrgChart.MissingRoot",locale:{"de-DE":"Kein Root-Knoten, prüfen Sie die Daten auf Zirkelbezüge.","en-US":"No root node, check data for circular references.","es-ES":"Sin nodo raíz, verifique los datos por si hay referencias circulares.","fr-FR":"Aucun nœud racine. Recherchez les références circulaires dans les données.","it-IT":"Impossibile utilizzare i nodi principali: verificare i riferimenti circolari.","ja-JP":"ルート ノードがありません。循環参照のデータを確認してください。","ko-KR":"루트 노드가 없습니다. 순환 참조에 대한 데이터를 확인하십시오.","nl-NL":"Geen hoofdknooppunt, controleer of de gegevens cirkelreferenties bevatten.","pl-PL":"Brak węzła głównego, sprawdź dane pod kątem odwołań cyklicznych.","pt-BR":"Nenhum nó raiz, verifique os dados para referências circulares.","ru-RU":"Нет корневых узлов, проверьте данные на предмет циклических ссылок.","sv-SE":"Ingen rotnod. Kontrollera om det finns cirkelreferenser i data.","tr-TR":"Kök düğümü yok, verileri döngüsel referanslar açısından kontrol edin.","zh-CN":"无根节点,请检查数据是否存在循环引用。","zh-TW":"沒有根節點,請檢查循環參照的資料。"}},Object_OrgChart_NavigationMode:{id:"Object.OrgChart.NavigationMode",locale:{"de-DE":"Präsentationsmodus","en-US":"Presentation mode","es-ES":"Modo presentación","fr-FR":"Mode présentation","it-IT":"Modalità presentazione","ja-JP":"プレゼンテーション モード","ko-KR":"프레젠테이션 모드","nl-NL":"Presentatiemodus","pl-PL":"Tryb prezentacji","pt-BR":"Modo de apresentação","ru-RU":"Режим представления","sv-SE":"Presentationsläge","tr-TR":"Sunum modu","zh-CN":"演示模式","zh-TW":"呈現模式"}},Object_OrgChart_SingleSelect:{id:"Object.OrgChart.SingleSelect",locale:{"de-DE":"Einzelnen Knoten auswählen","en-US":"Select single node","es-ES":"Seleccionar nodo único","fr-FR":"Sélectionner un seul nœud","it-IT":"Seleziona nodo singolo","ja-JP":"単一ノードを選択","ko-KR":"단일 노드 선택","nl-NL":"Enkel knooppunt selecteren","pl-PL":"Wybierz pojedynczy węzeł","pt-BR":"Selecionar nó único","ru-RU":"Выберите один узел","sv-SE":"Välj enskild nod","tr-TR":"Tek düğüm seç","zh-CN":"选择单个节点","zh-TW":"選取單一節點"}},Object_OrgChart_SubLabelExpression:{id:"Object.OrgChart.SubLabelExpression",locale:{"de-DE":"Untertitel der Karte","en-US":"Card sub-title","es-ES":"Subtítulo de tarjeta","fr-FR":"Sous-titre de la carte","it-IT":"Sottotitolo scheda","ja-JP":"カード サブタイトル","ko-KR":"카드 소제목","nl-NL":"Ondertitel kaart","pl-PL":"Podtytuł karty","pt-BR":"Subtítulo do cartão","ru-RU":"Подзаголовок карточки","sv-SE":"Kortets underrubrik","tr-TR":"Kart alt başlığı","zh-CN":"卡子标题","zh-TW":"卡片子標題"}},Object_OrgChart_TopBar:{id:"Object.OrgChart.TopBar",locale:{"de-DE":"Obere Leiste","en-US":"Top bar","es-ES":"Barra superior","fr-FR":"Barre supérieure","it-IT":"Barra superiore","ja-JP":"上部のバー","ko-KR":"상위 막대","nl-NL":"Bovenste balk","pl-PL":"Górny słupek","pt-BR":"Barra superior","ru-RU":"Верхняя полоса","sv-SE":"Övre fältet","tr-TR":"Üst çubuk","zh-CN":"顶部栏","zh-TW":"頂端列"}},Object_OrgChart_resizeOnExpand:{id:"Object.OrgChart.resizeOnExpand",locale:{"de-DE":"Beim Erweitern/Reduzieren Größe ändern","en-US":"Resize on expand/collapse","es-ES":"Cambiar el tamaño al expandir/contraer","fr-FR":"Redimensionner avec Développer/Réduire","it-IT":"Ridimensiona quando espandi/comprimi","ja-JP":"展開/折りたたみ時にサイズ変更","ko-KR":"확장/축소하여 크기 조정","nl-NL":"Formaat wijzigen bij uitvouwen/alles samenvouwen","pl-PL":"Zmień rozmiar przy rozwijaniu/zwijaniu","pt-BR":"Redimensionar em expandir/recolher","ru-RU":"Изменить размер при разворачивании/сворачивании","sv-SE":"Ändra storlek vid visa/dölj","tr-TR":"Genişletmede/daraltmada yeniden boyutlandır","zh-CN":"调整展开/折叠的大小","zh-TW":"調整展開/摺疊大小"}}};function Qe(e){if(e&&e.get&&e.add){const t="Object.OrgChart.MaxData";if(e.get(t)!==t)return;Object.keys(Je).forEach(t=>{e.add(Je[t])})}}const et={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:De.FONT_COLOR_TYPE,color:De.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:De.BACKGROUND_COLOR_TYPE,color:De.BACKGROUND_COLOR,colorExpression:""},border:{top:De.BORDER_TOP,fullBorder:De.BORDER_FULL,colorType:De.BORDER_COLOR_TYPE,color:De.BORDER_COLOR,colorExpression:""}},components:[]};var tt={value:()=>{}};function nt(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new rt(r)}function rt(e){this._=e}function ot(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function at(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=tt,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}rt.prototype=nt.prototype={constructor:rt,on:function(e,t){var n,r,o=this._,a=(r=o,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),i=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<s;)if(n=(e=a[i]).type)o[n]=at(o[n],e.name,t);else if(null==t)for(n in o)o[n]=at(o[n],e.name,null);return this}for(;++i<s;)if((n=(e=a[i]).type)&&(n=ot(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new rt(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};var it="http://www.w3.org/1999/xhtml",st={svg:"http://www.w3.org/2000/svg",xhtml:it,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lt(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),st.hasOwnProperty(t)?{space:st[t],local:e}:e}function ut(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===it&&t.documentElement.namespaceURI===it?t.createElement(e):t.createElementNS(n,e)}}function ct(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ht(e){var t=lt(e);return(t.local?ct:ut)(t)}function dt(){}function pt(e){return null==e?dt:function(){return this.querySelector(e)}}function ft(){return[]}function gt(e){return null==e?ft:function(){return this.querySelectorAll(e)}}function mt(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function bt(e){return function(){return this.matches(e)}}function yt(e){return function(t){return t.matches(e)}}var vt=Array.prototype.find;function xt(){return this.firstElementChild}var wt=Array.prototype.filter;function _t(){return Array.from(this.children)}function Ct(e){return new Array(e.length)}function Et(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function kt(e,t,n,r,o,a){for(var i,s=0,l=t.length,u=a.length;s<u;++s)(i=t[s])?(i.__data__=a[s],r[s]=i):n[s]=new Et(e,a[s]);for(;s<l;++s)(i=t[s])&&(o[s]=i)}function Ot(e,t,n,r,o,a,i){var s,l,u,c=new Map,h=t.length,d=a.length,p=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(p[s]=u=i.call(l,l.__data__,s,t)+"",c.has(u)?o[s]=l:c.set(u,l));for(s=0;s<d;++s)u=i.call(e,a[s],s,a)+"",(l=c.get(u))?(r[s]=l,l.__data__=a[s],c.delete(u)):n[s]=new Et(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(p[s])===l&&(o[s]=l)}function St(e){return e.__data__}function Lt(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function zt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Nt(e){return function(){this.removeAttribute(e)}}function Rt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function At(e,t){return function(){this.setAttribute(e,t)}}function Tt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function $t(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function jt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function It(e){return function(){this.style.removeProperty(e)}}function Dt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Bt(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Pt(e,t){return e.style.getPropertyValue(t)||jt(e).getComputedStyle(e,null).getPropertyValue(t)}function qt(e){return function(){delete this[e]}}function Ft(e,t){return function(){this[e]=t}}function Ut(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Vt(e){return e.trim().split(/^|\s+/)}function Ht(e){return e.classList||new Kt(e)}function Kt(e){this._node=e,this._names=Vt(e.getAttribute("class")||"")}function Zt(e,t){for(var n=Ht(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Wt(e,t){for(var n=Ht(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Gt(e){return function(){Zt(this,e)}}function Xt(e){return function(){Wt(this,e)}}function Yt(e,t){return function(){(t.apply(this,arguments)?Zt:Wt)(this,e)}}function Jt(){this.textContent=""}function Qt(e){return function(){this.textContent=e}}function en(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function tn(){this.innerHTML=""}function nn(e){return function(){this.innerHTML=e}}function rn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function on(){this.nextSibling&&this.parentNode.appendChild(this)}function an(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sn(){return null}function ln(){var e=this.parentNode;e&&e.removeChild(this)}function un(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hn(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function dn(e,t,n){return function(){var r,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function pn(e,t,n){var r=jt(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function fn(e,t){return function(){return pn(this,e,t)}}function gn(e,t){return function(){return pn(this,e,t.apply(this,arguments))}}Et.prototype={constructor:Et,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Kt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var mn=[null];function bn(e,t){this._groups=e,this._parents=t}function yn(){return new bn([[document.documentElement]],mn)}function vn(e){return"string"==typeof e?new bn([[document.querySelector(e)]],[document.documentElement]):new bn([[e]],mn)}function xn(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}bn.prototype=yn.prototype={constructor:bn,select:function(e){"function"!=typeof e&&(e=pt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i,s=t[o],l=s.length,u=r[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(i=e.call(a,a.__data__,c,s))&&("__data__"in a&&(i.__data__=a.__data__),u[c]=i);return new bn(r,this._parents)},selectAll:function(e){e="function"==typeof e?mt(e):gt(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i,s=t[a],l=s.length,u=0;u<l;++u)(i=s[u])&&(r.push(e.call(i,i.__data__,u,s)),o.push(i));return new bn(r,o)},selectChild:function(e){return this.select(null==e?xt:function(e){return function(){return vt.call(this.children,e)}}("function"==typeof e?e:yt(e)))},selectChildren:function(e){return this.selectAll(null==e?_t:function(e){return function(){return wt.call(this.children,e)}}("function"==typeof e?e:yt(e)))},filter:function(e){"function"!=typeof e&&(e=bt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new bn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,St);var n,r=t?Ot:kt,o=this._parents,a=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var i=a.length,s=new Array(i),l=new Array(i),u=new Array(i),c=0;c<i;++c){var h=o[c],d=a[c],p=d.length,f=Lt(e.call(h,h&&h.__data__,c,o)),g=f.length,m=l[c]=new Array(g),b=s[c]=new Array(g);r(h,d,m,b,u[c]=new Array(p),f,t);for(var y,v,x=0,w=0;x<g;++x)if(y=m[x]){for(x>=w&&(w=x+1);!(v=b[w])&&++w<g;);y._next=v||null}}return(s=new bn(s,o))._enter=l,s._exit=u,s},enter:function(){return new bn(this._enter||this._groups.map(Ct),this._parents)},exit:function(){return new bn(this._exit||this._groups.map(Ct),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var u,c=n[l],h=r[l],d=c.length,p=s[l]=new Array(d),f=0;f<d;++f)(u=c[f]||h[f])&&(p[f]=u);for(;l<o;++l)s[l]=n[l];return new bn(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=zt);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,s=n[a],l=s.length,u=o[a]=new Array(l),c=0;c<l;++c)(i=s[c])&&(u[c]=i);u.sort(t)}return new bn(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,s=a.length;i<s;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=lt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Rt:Nt:"function"==typeof t?n.local?$t:Mt:n.local?Tt:At)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?It:"function"==typeof t?Bt:Dt)(e,t,null==n?"":n)):Pt(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?qt:"function"==typeof t?Ut:Ft)(e,t)):this.node()[e]},classed:function(e,t){var n=Vt(e+"");if(arguments.length<2){for(var r=Ht(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?Yt:t?Gt:Xt)(n,t))},text:function(e){return arguments.length?this.each(null==e?Jt:("function"==typeof e?en:Qt)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?tn:("function"==typeof e?rn:nn)(e)):this.node().innerHTML},raise:function(){return this.each(on)},lower:function(){return this.each(an)},append:function(e){var t="function"==typeof e?e:ht(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:ht(e),r=null==t?sn:"function"==typeof t?t:pt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(ln)},clone:function(e){return this.select(e?cn:un)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),i=a.length;if(!(arguments.length<2)){for(s=t?dn:hn,r=0;r<i;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<i;++r)if((o=a[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?gn:fn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};const wn={capture:!0,passive:!1};function _n(e){e.preventDefault(),e.stopImmediatePropagation()}function Cn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function En(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function kn(){}var On=.7,Sn=1/On,Ln="\\s*([+-]?\\d+)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rn=/^#([0-9a-f]{3,8})$/,An=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),Tn=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),Mn=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${zn}\\)$`),$n=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${zn}\\)$`),jn=new RegExp(`^hsl\\(${zn},${Nn},${Nn}\\)$`),In=new RegExp(`^hsla\\(${zn},${Nn},${Nn},${zn}\\)$`),Dn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Bn(){return this.rgb().formatHex()}function Pn(){return this.rgb().formatRgb()}function qn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Rn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Fn(t):3===n?new Hn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Un(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Un(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=An.exec(e))?new Hn(t[1],t[2],t[3],1):(t=Tn.exec(e))?new Hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Mn.exec(e))?Un(t[1],t[2],t[3],t[4]):(t=$n.exec(e))?Un(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=jn.exec(e))?Yn(t[1],t[2]/100,t[3]/100,1):(t=In.exec(e))?Yn(t[1],t[2]/100,t[3]/100,t[4]):Dn.hasOwnProperty(e)?Fn(Dn[e]):"transparent"===e?new Hn(NaN,NaN,NaN,0):null}function Fn(e){return new Hn(e>>16&255,e>>8&255,255&e,1)}function Un(e,t,n,r){return r<=0&&(e=t=n=NaN),new Hn(e,t,n,r)}function Vn(e,t,n,r){return 1===arguments.length?((o=e)instanceof kn||(o=qn(o)),o?new Hn((o=o.rgb()).r,o.g,o.b,o.opacity):new Hn):new Hn(e,t,n,null==r?1:r);var o}function Hn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Kn(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}`}function Zn(){const e=Wn(this.opacity);return`${1===e?"rgb(":"rgba("}${Gn(this.r)}, ${Gn(this.g)}, ${Gn(this.b)}${1===e?")":`, ${e})`}`}function Wn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xn(e){return((e=Gn(e))<16?"0":"")+e.toString(16)}function Yn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qn(e,t,n,r)}function Jn(e){if(e instanceof Qn)return new Qn(e.h,e.s,e.l,e.opacity);if(e instanceof kn||(e=qn(e)),!e)return new Qn;if(e instanceof Qn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new Qn(i,s,l,e.opacity)}function Qn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function er(e){return(e=(e||0)%360)<0?e+360:e}function tr(e){return Math.max(0,Math.min(1,e||0))}function nr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Cn(kn,qn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bn,formatHex:Bn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Jn(this).formatHsl()},formatRgb:Pn,toString:Pn}),Cn(Hn,Vn,En(kn,{brighter(e){return e=null==e?Sn:Math.pow(Sn,e),new Hn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?On:Math.pow(On,e),new Hn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hn(Gn(this.r),Gn(this.g),Gn(this.b),Wn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Kn,formatHex:Kn,formatHex8:function(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}${Xn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Zn,toString:Zn})),Cn(Qn,function(e,t,n,r){return 1===arguments.length?Jn(e):new Qn(e,t,n,null==r?1:r)},En(kn,{brighter(e){return e=null==e?Sn:Math.pow(Sn,e),new Qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?On:Math.pow(On,e),new Qn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Hn(nr(e>=240?e-240:e+120,o,r),nr(e,o,r),nr(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Qn(er(this.h),tr(this.s),tr(this.l),Wn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wn(this.opacity);return`${1===e?"hsl(":"hsla("}${er(this.h)}, ${100*tr(this.s)}%, ${100*tr(this.l)}%${1===e?")":`, ${e})`}`}}));var rr=e=>()=>e;function or(e){return 1===(e=+e)?ar:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):rr(isNaN(t)?n:t)}}function ar(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):rr(isNaN(e)?t:e)}var ir=function e(t){var n=or(t);function r(e,t){var r=n((e=Vn(e)).r,(t=Vn(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=ar(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function sr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var lr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ur=new RegExp(lr.source,"g");function cr(e,t){var n,r,o,a=lr.lastIndex=ur.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=lr.exec(e))&&(r=ur.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:sr(n,r)})),a=ur.lastIndex;return a<t.length&&(o=t.slice(a),s[i]?s[i]+=o:s[++i]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var hr,dr=180/Math.PI,pr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fr(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*dr,skewX:Math.atan(l)*dr,scaleX:i,scaleY:s}}function gr(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var s=[],l=[];return a=e(a),i=e(i),function(e,r,o,a,i,s){if(e!==o||r!==a){var l=i.push("translate(",null,t,null,n);s.push({i:l-4,x:sr(e,o)},{i:l-2,x:sr(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:sr(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(a.rotate,i.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:sr(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(a.skewX,i.skewX,s,l),function(e,t,n,r,a,i){if(e!==n||t!==r){var s=a.push(o(a)+"scale(",null,",",null,")");i.push({i:s-4,x:sr(e,n)},{i:s-2,x:sr(t,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,s,l),a=i=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var mr=gr(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pr:fr(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),br=gr(function(e){return null==e?pr:(hr||(hr=document.createElementNS("http://www.w3.org/2000/svg","g")),hr.setAttribute("transform",e),(e=hr.transform.baseVal.consolidate())?fr((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):pr)},", ",")",")");function yr(e){return((e=Math.exp(e))+1/e)/2}var vr,xr,wr=function e(t,n,r){function o(e,o){var a,i,s=e[0],l=e[1],u=e[2],c=o[0],h=o[1],d=o[2],p=c-s,f=h-l,g=p*p+f*f;if(g<1e-12)i=Math.log(d/u)/t,a=function(e){return[s+e*p,l+e*f,u*Math.exp(t*e*i)]};else{var m=Math.sqrt(g),b=(d*d-u*u+r*g)/(2*u*n*m),y=(d*d-u*u-r*g)/(2*d*n*m),v=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(y*y+1)-y);i=(x-v)/t,a=function(e){var r,o=e*i,a=yr(v),c=u/(n*m)*(a*(r=t*o+v,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(v));return[s+c*p,l+c*f,u*a/yr(t*o+v)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),_r=0,Cr=0,Er=0,kr=0,Or=0,Sr=0,Lr="object"==typeof performance&&performance.now?performance:Date,zr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nr(){return Or||(zr(Rr),Or=Lr.now()+Sr)}function Rr(){Or=0}function Ar(){this._call=this._time=this._next=null}function Tr(e,t,n){var r=new Ar;return r.restart(e,t,n),r}function Mr(){Or=(kr=Lr.now())+Sr,_r=Cr=0;try{!function(){Nr(),++_r;for(var e,t=vr;t;)(e=Or-t._time)>=0&&t._call.call(void 0,e),t=t._next;--_r}()}finally{_r=0,function(){var e,t,n=vr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:vr=t);xr=e,jr(r)}(),Or=0}}function $r(){var e=Lr.now(),t=e-kr;t>1e3&&(Sr-=t,kr=e)}function jr(e){_r||(Cr&&(Cr=clearTimeout(Cr)),e-Or>24?(e<1/0&&(Cr=setTimeout(Mr,e-Lr.now()-Sr)),Er&&(Er=clearInterval(Er))):(Er||(kr=Lr.now(),Er=setInterval($r,1e3)),_r=1,zr(Mr)))}function Ir(e,t,n){var r=new Ar;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}Ar.prototype=Tr.prototype={constructor:Ar,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Nr():+n)+(null==t?0:+t),this._next||xr===this||(xr?xr._next=this:vr=this,xr=this),this._call=e,this._time=n,jr()},stop:function(){this._call&&(this._call=null,this._time=1/0,jr())}};var Dr=nt("start","end","cancel","interrupt"),Br=[];function Pr(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)}function i(a){var u,c,h,d;if(1!==n.state)return l();for(u in o)if((d=o[u]).name===n.name){if(3===d.state)return Ir(i);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete o[u]):+u<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete o[u])}if(Ir(function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=Tr(a,0,n.time)}(e,n,{name:t,index:r,group:o,on:Dr,tween:Br,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function qr(e,t){var n=Ur(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Fr(e,t){var n=Ur(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Ur(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Vr(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete e.__transition}}function Hr(e,t){var n,r;return function(){var o=Fr(this,e),a=o.tween;if(a!==n)for(var i=0,s=(r=n=a).length;i<s;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}o.tween=r}}function Kr(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=Fr(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===t){o[l]=s;break}l===u&&o.push(s)}a.tween=o}}function Zr(e,t,n){var r=e._id;return e.each(function(){var e=Fr(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return Ur(e,r).value[t]}}function Wr(e,t){var n;return("number"==typeof t?sr:t instanceof qn?ir:(n=qn(t))?(t=n,ir):cr)(e,t)}function Gr(e){return function(){this.removeAttribute(e)}}function Xr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yr(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}}function Jr(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}function Qr(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttribute(e))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttribute(e)}}function eo(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttributeNS(e.space,e.local)}}function to(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function no(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function ro(e,t){return function(){qr(this,e).delay=+t.apply(this,arguments)}}function oo(e,t){return t=+t,function(){qr(this,e).delay=t}}function ao(e,t){return function(){Fr(this,e).duration=+t.apply(this,arguments)}}function io(e,t){return t=+t,function(){Fr(this,e).duration=t}}var so=yn.prototype.constructor;function lo(e){return function(){this.style.removeProperty(e)}}var uo=0;function co(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ho(){return++uo}var po=yn.prototype;co.prototype={constructor:co,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=pt(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s,l,u=r[i],c=u.length,h=a[i]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=e.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Pr(h[d],t,n,d,h,Ur(s,n)));return new co(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=gt(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,p=e.call(l,l.__data__,h,u),f=Ur(l,n),g=0,m=p.length;g<m;++g)(d=p[g])&&Pr(d,t,n,g,p,f);a.push(p),i.push(l)}return new co(a,i,t,n)},selectChild:po.selectChild,selectChildren:po.selectChildren,filter:function(e){"function"!=typeof e&&(e=bt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new co(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l,u=t[s],c=n[s],h=u.length,d=i[s]=new Array(h),p=0;p<h;++p)(l=u[p]||c[p])&&(d[p]=l);for(;s<r;++s)i[s]=t[s];return new co(i,this._parents,this._name,this._id)},selection:function(){return new so(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=ho(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,u=0;u<l;++u)if(i=s[u]){var c=Ur(i,t);Pr(i,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new co(r,this._parents,e,n)},call:po.call,nodes:po.nodes,node:po.node,size:po.size,empty:po.empty,each:po.each,on:function(e,t){var n=this._id;return arguments.length<2?Ur(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,a=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?qr:Fr;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}(n,e,t))},attr:function(e,t){var n=lt(e),r="transform"===n?br:Wr;return this.attrTween(e,"function"==typeof t?(n.local?eo:Qr)(n,r,Zr(this,"attr."+e,t)):null==t?(n.local?Xr:Gr)(n):(n.local?Jr:Yr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=lt(e);return this.tween(n,(r.local?to:no)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?mr:Wr;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=Pt(this,e),i=(this.style.removeProperty(e),Pt(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,lo(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=Pt(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Pt(this,e)),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}(e,r,Zr(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,s="end."+i;return function(){var l=Fr(this,e),u=l.on,c=null==l.value[i]?a||(a=lo(t)):void 0;u===n&&o===c||(r=(n=u).copy()).on(s,o=c),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=Pt(this,e);return i===a?null:i===r?o:o=t(r=i,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Zr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=Ur(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?Hr:Kr)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ro:oo)(t,e)):Ur(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ao:io)(t,e)):Ur(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Fr(this,e).ease=t}}(t,e)):Ur(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Fr(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){0===--o&&a()}};n.each(function(){var n=Fr(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),0===o&&a()})},[Symbol.iterator]:po[Symbol.iterator]};var fo={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function go(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function mo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function bo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=vo)):void 0===t&&(t=yo);for(var n,r,o,a,i,s=new _o(e),l=[s];n=l.pop();)if((o=t(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)l.push(r=o[a]=new _o(o[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(wo)}function yo(e){return e.children}function vo(e){return Array.isArray(e)?e[1]:null}function xo(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function wo(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function _o(e){this.data=e,this.depth=this.height=0,this.parent=null}function Co(e,t){return e.parent===t.parent?1:2}function Eo(e){var t=e.children;return t?t[0]:e.t}function ko(e){var t=e.children;return t?t[t.length-1]:e.t}function Oo(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function So(e,t,n){return e.a.parent===t.parent?e.a:n}function Lo(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function zo(){var e=Co,t=1,n=1,r=null;function o(o){var l=function(e){for(var t,n,r,o,a,i=new Lo(e,0),s=[i];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),o=a-1;o>=0;--o)s.push(n=t.children[o]=new Lo(r[o],o)),n.parent=t;return(i.parent=new Lo(null,0)).children=[i],i}(o);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(i),r)o.eachBefore(s);else{var u=o,c=o,h=o;o.eachBefore(function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>h.depth&&(h=e)});var d=u===c?1:e(u,c)/2,p=d-u.x,f=t/(c.x+d+p),g=n/(h.depth||1);o.eachBefore(function(e){e.x=(e.x+p)*f,e.y=e.depth*g})}return o}function a(t){var n=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,o=e.children,a=o.length;--a>=0;)(t=o[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,n,r){if(n){for(var o,a=t,i=t,s=n,l=a.parent.children[0],u=a.m,c=i.m,h=s.m,d=l.m;s=ko(s),a=Eo(a),s&&a;)l=Eo(l),(i=ko(i)).a=t,(o=s.z+h-a.z-u+e(s._,a._))>0&&(Oo(So(s,t,r),t,o),u+=o,c+=o),h+=s.m,u+=a.m,d+=l.m,c+=i.m;s&&!ko(i)&&(i.t=s,i.m+=h-c),a&&!Eo(l)&&(l.t=a,l.m+=u-d,r=t)}return r}(t,o,t.parent.A||r[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],o):r?null:[t,n]},o.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],o):r?[t,n]:null},o}yn.prototype.interrupt=function(e){return this.each(function(){Vr(this,e)})},yn.prototype.transition=function(e){var t,n;e instanceof co?(t=e._id,e=e._name):(t=ho(),(n=fo).time=Nr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,u=0;u<l;++u)(i=s[u])&&Pr(i,e,t,u,s,n||go(i,t));return new co(r,this._parents,e,t)},_o.prototype=bo.prototype={constructor:_o,count:function(){return this.eachAfter(mo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,a=this,i=[a],s=[],l=-1;a=i.pop();)if(s.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=s.pop();)e.call(t,a,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(e.call(t,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return bo(this).eachBefore(xo)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}},Lo.prototype=Object.create(_o.prototype);var No=e=>()=>e;function Ro(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Ao(e,t,n){this.k=e,this.x=t,this.y=n}Ao.prototype={constructor:Ao,scale:function(e){return 1===e?this:new Ao(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ao(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var To=new Ao(1,0,0);function Mo(e){e.stopImmediatePropagation()}function $o(e){e.preventDefault(),e.stopImmediatePropagation()}function jo(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Io(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Do(){return this.__zoom||To}function Bo(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Po(){return navigator.maxTouchPoints||"ontouchstart"in this}function qo(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function Fo(){var e,t,n,r=jo,o=Io,a=qo,i=Bo,s=Po,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,h=wr,d=nt("start","zoom","end"),p=0,f=10;function g(e){e.property("__zoom",Do).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",k).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ao(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Ao(e.k,r,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function v(e,t,n,r){e.on("start.zoom",function(){x(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(r).end()}).tween("zoom",function(){var e=this,a=arguments,i=x(e,a).event(r),s=o.apply(e,a),l=null==n?y(s):"function"==typeof n?n.apply(e,a):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=e.__zoom,d="function"==typeof t?t.apply(e,a):t,p=h(c.invert(l).concat(u/c.k),d.invert(l).concat(u/d.k));return function(e){if(1===e)e=d;else{var t=p(e),n=u/t[2];e=new Ao(n,l[0]-t[0]*n,l[1]-t[1]*n)}i.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=x(this,t).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,i.apply(this,arguments)))),c=xn(e);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=o.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[c,o.invert(c)],Vr(this),n.start()}$o(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(b(m(o,s),n.mouse[0],n.mouse[1]),n.extent,u))}}function C(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=x(this,t,!0).event(e),s=vn(e.view).on("mousemove.zoom",function(e){if($o(e),!i.moved){var t=e.clientX-c,n=e.clientY-h;i.moved=t*t+n*n>p}i.event(e).zoom("mouse",a(b(i.that.__zoom,i.mouse[0]=xn(e,o),i.mouse[1]),i.extent,u))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,r=vn(e).on("dragstart.drag",null);t&&(r.on("click.drag",_n,wn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,i.moved),$o(e),i.event(e).end()},!0),l=xn(e,o),c=e.clientX,h=e.clientY;!function(e){var t=e.document.documentElement,n=vn(e).on("dragstart.drag",_n,wn);"onselectstart"in t?n.on("selectstart.drag",_n,wn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),Mo(e),i.mouse=[l,this.__zoom.invert(l)],Vr(this),i.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=xn(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(i),l=n.k*(e.shiftKey?.5:2),h=a(b(m(n,l),i,s),o.apply(this,t),u);$o(e),c>0?vn(this).transition().duration(c).call(v,h,i,e):vn(this).call(g.transform,h,i,e)}}function k(n,...o){if(r.apply(this,arguments)){var a,i,s,l,u=n.touches,c=u.length,h=x(this,o,n.changedTouches.length===c).event(n);for(Mo(n),i=0;i<c;++i)l=[l=xn(s=u[i],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,a=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(h.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),Vr(this),h.start())}}function O(e,...t){if(this.__zooming){var n,r,o,i,s=x(this,t).event(e),l=e.changedTouches,c=l.length;for($o(e),n=0;n<c;++n)o=xn(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],p=s.touch1[0],f=s.touch1[1],g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g,y=(y=f[0]-d[0])*y+(y=f[1]-d[1])*y;r=m(r,Math.sqrt(g/y)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],i=[(d[0]+f[0])/2,(d[1]+f[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],i=s.touch0[1]}s.zoom("touch",a(b(r,o,i),s.extent,u))}}function S(e,...r){if(this.__zooming){var o,a,i=x(this,r).event(e),s=e.changedTouches,l=s.length;for(Mo(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),o=0;o<l;++o)a=s[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=xn(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<f)){var u=vn(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return g.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",Do),e!==o?v(e,t,n,r):o.interrupt().each(function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},g.scaleBy=function(e,t,n,r){g.scaleTo(e,function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)},n,r)},g.scaleTo=function(e,t,n,r){g.transform(e,function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(i),l="function"==typeof t?t.apply(this,arguments):t;return a(b(m(r,l),i,s),e,u)},n,r)},g.translateBy=function(e,t,n,r){g.transform(e,function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)},null,r)},g.translateTo=function(e,t,n,r,i){g.transform(e,function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==r?y(e):"function"==typeof r?r.apply(this,arguments):r;return a(To.translate(s[0],s[1]).scale(i.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)},r,i)},w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=vn(this.that).datum();d.call(e,this.that,new Ro(e,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:d}),t)}},g.wheelDelta=function(e){return arguments.length?(i="function"==typeof e?e:No(+e),g):i},g.filter=function(e){return arguments.length?(r="function"==typeof e?e:No(!!e),g):r},g.touchable=function(e){return arguments.length?(s="function"==typeof e?e:No(!!e),g):s},g.extent=function(e){return arguments.length?(o="function"==typeof e?e:No([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),g):o},g.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],g):[l[0],l[1]]},g.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],g):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},g.constrain=function(e){return arguments.length?(a=e,g):a},g.duration=function(e){return arguments.length?(c=+e,g):c},g.interpolate=function(e){return arguments.length?(h=e,g):h},g.on=function(){var e=d.on.apply(d,arguments);return e===d?g:e},g.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,g):Math.sqrt(p)},g.tapDistance=function(e){return arguments.length?(f=+e,g):f},g}Ao.prototype;const Uo=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,Vo=5e6,Ho=5e5;const Ko={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",a=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),a=!0),t.push(function(e,t,n){return{key:Zo(e),value:Zo(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,a))}),t}};function Zo(e){try{return decodeURIComponent(e)}catch{return e}}function Wo(e){if(!(this instanceof Wo))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>Ko.fromSearchString(t.search)}})}function Go(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}Wo.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Wo.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=Go(t.key),t.value?n+=`=${Go(t.value)}`:n+=t.useEqualSign?"=":"";return n};var Xo=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},Yo=class{decode(e){let t="";const n=new Xo(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const Jo=e=>e>=0&&e<=1114111,Qo=e=>e.match(/[\s]/);var ea=class extends Yo{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const a=e.next();if(null==a)return e.reset(),null;switch(a){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(a,16))return a;for(n=a,r=0;r<5&&(o=e.next(),null!=o&&!Qo(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const i=parseInt(n,16);return Jo(i)?String.fromCharCode(i):"�"}},ta=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},na=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,a;if(t.length===n)return a=this._value,this.setValue(r),a;const i=t.charAt(n);return this._nextMap?(o=this._nextMap[i],o||(o=new e,this._nextMap[i]=o)):(this._nextMap={},o=new e,this._nextMap[i]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return ta.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return ta.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||ta.newInstanceIfNeeded(e,t,this._value)}},ra=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new na);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const oa=(()=>{const e=[],t=[],n=new ra;let r,o,a;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(a=t[o].toLowerCase().substr(1),n.put(a,String.fromCharCode(o)));return n})();var aa=class extends Yo{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,oa.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const a=oa.getLongestMatch(o);if(null==a)return null;for(e.reset(),e.next(),t=a.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),a.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&Jo(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&Jo(r)?String.fromCharCode(r):null}},ia=class extends Yo{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,a;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(a=parseInt(n,16),Jo(a))?String.fromCharCode(a):(e.reset(),null)}};let sa;"undefined"!=typeof document&&(sa=document.createElement("div"));const la=Array.prototype.indexOf,ua=[",",".","_"," "],ca=[",",".","-","_"," "],ha={width:["%"],height:["%"]},da={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},pa={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":da.image,"background-color":da.color,"border-color":da.color,"border-image":da.image,color:da.color,icon:da.image,"list-style-image":da.image,"outline-color":da.color},fa={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function ga(e,t,n){let r;if(t){if(la)return la.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function ma(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return sa.appendChild(n),t=sa.innerHTML,sa.removeChild(n),t}function ba(e,t,n){let r,o,a,i,s,l,u,c,h;for(e=va(e).toLowerCase(),t=va(t),a=0;a<fa.attr_name.length;a++)if(e.match(fa.attr_name[a]))throw new Error(`Unsafe attribute name used: ${e}`);for(a=0;a<fa.attr_val.length;a++)if(t.toLowerCase().match(fa.attr_val[a]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=ha[e],r||(r=ca),o="",!n){for(i=0;i<e.length;i++){if(s=e.charAt(i),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&ga(u,r)<0?(h=c.toString(16),o+=`&#x${h};`):o+=u;return n||(o+='"'),o}function ya(e,t,n){let r,o,a,i,s,l,u,c,h,d;if(e=va(e).toLowerCase(),t=va(t),ga(e,fa.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<fa.css_val.length;r++)if(t.toLowerCase().indexOf(fa.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=pa[e],o||(o=da.default),a="",!n){for(i=0;i<e.length;i++){if(s=e.charAt(i),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");a+=s}a+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&ga(u,o)<0?(h=c.toString(16),d="000000".substr(h.length),a+=`\\${d}${h}`):a+=u;return a}function va(e,t){let n,r,o,a,i=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new aa,new ia,new ea];for(;!i;){r=n;for(let e=0;e<s.length;e++)a=s[e].decode(n),a!==n&&(o++,n=a);r!==n||(i=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const xa=[];for(let e=0;e<255;e++)xa[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const wa={html:e=>ma(e.unsafe),css(e){let t,n=[];const r=[],o={};let a="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=ya(t,n[t],!0),a+=ya(t,n[t],!0),o[t]=r[t]);return e.map?o:a},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=ba(e,t[e],!0),o+=ba(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function _a(e,t){throw new Error(t)}var Ca={canonicalize:va,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const a=arguments.length;for(;o<a;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?wa.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&_a(this,"Invalid parameter type"),wa.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&_a(this,"Invalid parameter type"),wa.attr(e)):void _a(this,"Invalid parameter type")},encodeForAttr:ba,encodeForAttr2:function(e){return ba("nonsens",e,!0)},encodeForCSS:ya,encodeForHref:function(e){va(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new Wo(e),n=Wo.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+Wo.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,a,i,s;for(t||(t=ua),s="",n=0;n<e.length;n++)o=e.charAt(n),a=e.charCodeAt(n),ga(o,t)>=0||null==xa[a]?s+=o:(r=a.toString(16),a<256?(i="00".substr(r.length),s+=`\\x${i}${r.toUpperCase()}`):(i="0000".substr(r.length),s+=`\\u${i}${r.toUpperCase()}`));return s},encodeForHTML:ma,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=va(t).toLowerCase():_a(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=Ho,maxByteSizeImage:r=Vo}=t??{},{mimeType:o,encoding:a,data:i}=(e=>{const[,t,n,r]=Uo.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!i)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,a,i);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const Ea={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},ka={resolveExpression:e=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(t[1]/2.55)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e),t)return e;const n=e&&Ea[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getDarkColor(e){const t=.5;let n,r,o,a;if(e.length>7){n=e.split(",");const i=-1!==n[0].indexOf("a");return r=i?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),a=parseInt(n[1],10),o=parseInt(n[2],10),`${(i?"rgba(":"rgb(")+(Math.round((0-r)*t)+r)},${Math.round((0-a)*t)+a},${Math.round((0-o)*t)+o}${i?`,${n[3]}`:")"}`}return n=parseInt(e.slice(1),16),r=n>>16,a=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*t)+r)+256*(Math.round((0-a)*t)+a)+(Math.round((0-o)*t)+o)).toString(16).slice(1)}`},isDarkColor(e){let t,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e))&&(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*t+.587*n+.114*r<125}},Oa=["data:","http:","https:"],Sa=e=>{try{return Ca.encodeForAttr2(e)}catch{return""}},La=e=>{const t=["#"," ","(",")"];let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r),a=e.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&t.indexOf(o)<0){const e=a.toString(16);n+=`\\${"000000".substr(e.length)}${e}`}else n+=o}return n},za=e=>{try{return e=e?.trim(),e&&(e=>{try{const t=new URL(e);return Oa.includes(t.protocol)}catch{return!1}})(e)&&Ca.isSafeDataURL(e)?/^data:/i.test(e)?encodeURI(Ca.canonicalize(e)):Ca.encodeForHref(e):""}catch{return""}};function Na(e){return[void 0,"left","right"].includes(e.cardImage.alignment)}function Ra(e){const t=ka.resolveExpression(e);return"none"!==t?t:La(e)}function Aa(e,t){return"default"===e?ka.isDarkColor(t)?De.FONT_COLOR_LIGHT.color:De.FONT_COLOR_DARK.color:e}const Ta=(e,t)=>`font-family:${e.fontFamily}; font-size:${e.fontSize}; color:${t}`;function Ma(e,t,n,r){const o=function(e,t){if(e.attributes&&e.attributes.color){const t=ka.resolveExpression(e.attributes.color);if("none"!==t)return t}return Ra(t)}(e,t.cardBackgroundColor),a=Ra(Aa(t.cardTitle.fontColor,o)),i=Ta(t.cardTitle,a),s=Ra(Aa(t.cardSubTitle.fontColor,o)),l=Ta(t.cardSubTitle,s),u=Ra(Aa(t.cardDescription.fontColor,o)),c=Ta(t.cardDescription,u),h=Ra(Aa(t.cardMeasureLabel.fontColor,o)),d=Ta(t.cardMeasureLabel,h),p=Ra(Aa(t.cardMeasureValue.fontColor,o)),f=Ta(t.cardMeasureValue,p),{topBar:g=De.BORDER_TOP,fullBorder:m=De.BORDER_FULL,contrastColor:b=!0}=t.cardBorder,y=b?ka.getDarkColor(o):Ra(t.cardBorder.borderColor);let v=n;r?v-=8:m?v-=4:g&&(v-=3);return{titleStyle:i,subTitleStyle:l,descriptionStyle:c,measureLabelStyle:d,measureValueStyle:f,cardStyle:`background-color:${o}; border:${m&&!r?`1px solid ${y}`:""}; border-top:${g&&!r?`3px solid ${y}`:""}; height:${v}px;`}}const $a=(e,t,n,r)=>{const o=function(e,t){let n=!1,r="";return t.api?.isActive()&&(n=-1!==t.state.indexOf(e.elemNo),r=n?" selected":" not-selected"),{isSelected:n,selectedClass:r}}(e,n),a=function(e,t){const n=e.attributes||{},r=t.measureLabel?`${t.measureLabel}: `:"";return{title:Sa(n.label||e.id),subTitle:n.subLabel?Sa(n.subLabel):void 0,description:n.extraLabel?Sa(n.extraLabel):void 0,measureLabel:e.measure?Sa(r):void 0,measureValue:e.measure?Sa(e.measure):void 0,image:za(n.image)}}(e,t),i=Ma(e,t,r,o.isSelected),s=function(e,t){return t?.image&&"tooltip"!==e.cardImage.location}(t,e.attributes),l=s?function(e){let t=" has-image";return Na(e)?(t+=" horizontal",t+="right"===e.cardImage.alignment?" right":" left"):(t+=" vertical",t+="bottom"===e.cardImage.alignment?" bottom":"",t+="round"===e.cardImage.shape?" round":""),t}(t):"",u=o.selectedClass+(Na(t)?" horizontal":" vertical");let c="";if(s){const n=function(e){let t="";return t+=["right","bottom"].includes(e.cardImage.alignment)?" image-last":"",t+=Na(e)?"":" vertical",t}(t),r=function(e){let t="";return t+=e.cardImage.clip?" clip":"",t+=Na(e)?" horizontal":"",t+="round"===e.cardImage.shape?" round":"",t}(t);c+=`<div class="sn-image-wrapper${n}"><img src="${a.image}" class="sn-org-card-image${r}" data-node-id="${Ca.encodeForAttr2(e.id)}"/></div>`}return c+=`<div class="sn-org-textbox${l}">`,c+=`<div class="sn-org-card-title" style="${Ca.encodeForAttr2(i.titleStyle)};">${a.title}</div>`,a.subTitle&&(c+=`<div class="sn-org-card-label" style="${Ca.encodeForAttr2(i.subTitleStyle)};">${a.subTitle}</div>`),a.measureValue?c+=`<div class="sn-org-card-label"><span style="${Ca.encodeForAttr2(i.measureLabelStyle)};">${a.measureLabel}</span><span style="${Ca.encodeForAttr2(i.measureValueStyle)};">${a.measureValue}</span></div>`:a.description&&(c+=`<div class="sn-org-card-label" style="${Ca.encodeForAttr2(i.descriptionStyle)};">${a.description}</div>`),c+="</div>",`<div class="sn-org-card-text${u}" style="${Ca.encodeForAttr2(i.cardStyle)};">${c}</div>`},ja={cardWidth:152,cardHeight:64,cardHeightLarge:208,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipPadding:15,maxZoom:6,minZoom:.2},Ia={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel",imageExpression:"image"},Da="max-data-limit";function Ba(e){return e[0].qText}function Pa(e){return e[1].qText}async function qa(e,t,n,r,o,a,i){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:3300}]).then(n=>{e.push(n[0]),t.push(...n[0].qMatrix),o+=n[0].qArea.qHeight}),a>=i?Da:r>o?qa(e,t,n,r,o,a+1,i):""}const Fa=async(e,t)=>{if(e.snapshotData)return{status:"",dataMatrix:e.snapshotData.dataMatrix};const n=e.qHyperCube&&e.qHyperCube.qDataPages,r=e.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,a=[...n[0].qMatrix];let i="";return r>o&&1===n.length&&t?i=await qa(e.qHyperCube.qDataPages,a,t,r,o,0,e.rowLimit/3300||10):n.forEach((e,t)=>{t>0&&a.push(...e.qMatrix)}),{status:i,dataMatrix:a}};function Ua(e,t){const n={};return e.forEach(e=>{"color"===e.prop?n[e.prop]=ka.resolveExpression(t.qValues[e.index].qText):n[e.prop]=t.qValues[e.index].qText}),n}function Va(e){if(!e)return!0;for(let t=0;t<e.length;++t)if(void 0!==e[t].children)return!1;return!0}function Ha(e){return["top","bottom"].includes(e.cardImage.alignment)&&"tooltip"!==e.cardImage.location?ja.cardHeightLarge:ja.cardHeight}async function Ka({layout:e,model:t,translator:n}){if(!e.qHyperCube)throw new Error("Require a hypercube");if(e.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await Fa(e,t),a=function(e){if(e&&e.length){const t=[];return e.forEach((e,n)=>{Ia[e.id]&&t.push({prop:Ia[e.id],index:n})}),t}return[]}(e.qHyperCube.qDimensionInfo[0].qAttrExprInfo);return o?o.length<1?null:function(e,t,n,r,o){const a={},i=[];for(let n=0;n<e.length;++n){const r=e[n],o=Ba(r),s={id:o,parentId:Pa(r),children:[],elemNo:r[0].qElemNumber,attributes:Ua(t,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};a[o]=s,i.push(s)}const s=[];let l=!1;for(let e=0;e<i.length;++e){const t=i[e],n=a[t.parentId];t.parent=n,n?n.children.length>98?l=!0:n.children.push({childNumber:n.children.length,...t}):s.length>98?l=!0:s.push(t)}if(0===s.length)return{error:"no_root",message:o.get("Object.OrgChart.MissingRoot")};const u=[];if(n===Da&&u.push(o.get("Object.OrgChart.MaxData")),l&&u.push(o.get("Object.OrgChart.MaxChildren")),function(e){const t={},n={};function r(e){t[e.id]=!0,n[e.id]=!0;for(let o=0;o<e.children.length;++o){if(!t[e.children[o].id]&&r(e.children[o]))return!0;if(n[e.children[o].id])return!0}return n[e.id]=!1,!1}for(let n=0;n<e.length;++n){const o=e[n];if(!t[o.id]&&r(o))return!0}return!1}(i)&&u.push(o.get("Object.OrgChart.CycleWarning")),1===s.length)return s[0].warn=u,s[0].navigationMode=r,s[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:s,navigationMode:r};return s.forEach((e,t)=>{e.parentId="Root",e.parent=c,e.childNumber=t}),c}(o,a,r,e.navigationMode,n):null}var Za=(e,t)=>{const{api:n,state:r,singleSelect:o,setState:a}=t;if(e&&n){let t;if(e.data.elemNo<0&&-3!==e.data.elemNo)return;if(e.data.isLocked)return;n.isActive()&&r?t=r.concat():(n.begin("/qHyperCubeDef"),t=[]);const i=t.indexOf(e.data.elemNo),s=-1===i;let l=[];o||(l=function(e,t){const n=[],r=e=>{e.children.forEach(e=>{e.data.selected=t,n.push(e.data.elemNo),e.children&&e.children.length>0&&r(e)})};return e.children&&r(e),n}(e,s)),s?(t.push(e.data.elemNo),l.forEach(e=>{-1===t.indexOf(e)&&t.push(e)})):(t.splice(i,1),l.forEach(e=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})),0===t.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,t,!1]}),a(t)}};function Wa(e){e.tooltip.active=!0,e.tooltip.timeout=setTimeout(()=>{e.tooltip.active&&e.tooltip.html(function(e,t){const n=Sa(e.data.attributes.label||e.data.id),r=e.data.attributes.subLabel?`${Sa(e.data.attributes.subLabel)}<br />`:"",o=e.data.attributes.extraLabel?`${Sa(e.data.attributes.extraLabel)}<br />`:"",a=Sa(e.data.measure?`${t.measureLabel?`${t.measureLabel}: `:""}${e.data.measure}`:"");let i=e.data.attributes.image&&"card"!==t.cardImage.location?e.data.attributes.image:"";if(i=za(i),i){const e="right"===t.cardImage.alignment?'style="padding-right:5px"':'style="padding-left:5px"';return`<div class="sn-org-tooltip-inner" style="display:flex"><img src="${i}" class="sn-org-tooltip-image" ${"right"===t.cardImage.alignment?'style="order: 1"':""} /><div class="sn-org-tooltip-text" ${e}><div class="sn-org-tooltip-header">${n}</div>${r}${o}${a}</div></div>`}return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${n}</div>${r}${o}${a}</div>`}(e.node,e.styling)).classed("sn-org-tooltip-visible",!0).attr("style",()=>function(e,t,n,r,o){const{cardWidth:a,tooltipPadding:i}=ja,s=a/2;return`bottom:${t-(r(e)*o.zoom+o.y-i)}px;left:${n(e)*o.zoom+o.x+s*o.zoom}px;`}(e.node,e.containerHeight,e.x,e.y,e.transform))},e.delay??250)}function Ga(e){clearTimeout(e.timeout),e.active=!1,e.classed("sn-org-tooltip-visible",!1)}function Xa({positioning:e,divBox:t,nodes:n,styling:r,setExpandedCallback:o,wrapperState:a,selectionObj:i,navigationMode:s,element:l,tooltip:u,flags:c,actualCardHeight:h,usePromiseStatus:d}){const{x:p,y:f}=e,{cardWidth:g,buttonWidth:m,buttonHeight:b,cardPadding:y,rootDiameter:v}=ja,{topId:x}=a.expandedState,w=n.find(e=>e.data.id===x),_=w&&w.parent?w.parent.ancestors().map(e=>e.data.id):[],C=document.getElementsByTagName("html")[0].classList.contains("touch-on"),E={tooltip:u,containerHeight:l.clientHeight,styling:r,x:p,y:f,flags:c};t.selectAll(".sn-org-nodes").data(n.filter(e=>e.parent&&"Root"===e.parent.data.id)).enter().append("div").attr("class","sn-org-root").attr("style",e=>`top:${f(e)-v-y}px;left:${p(e)+(g-v)/2}px`).attr("id",e=>e.data.id),t.selectAll(".sn-org-nodes").data(n.filter(e=>"Root"!==e.data.id)).enter().append("div").attr("class","sn-org-card").attr("style",e=>`width:${g}px;height:${h}px; top:${f(e)}px;left:${p(e)}px;`).attr("id",e=>e.data.id).on("click",(e,t)=>{if(!a.constraints.active&&"Root"!==t.data.id){const e={...E,transform:a.transform,node:t,delay:0};C&&Wa(e),Za(t,i)}}).html(e=>$a(e.data,r,i,h)).each((e,t,n)=>{if(c.isEnabled("QCB_31709_FIX_PRINTING_IMAGES")&&d?.resolve){const r=n[t].querySelector(".sn-org-card-image[data-node-id]");r&&(r.onload=()=>d.resolve(e.data.id),r.onerror=()=>d.resolve(e.data.id))}}).on("mouseenter",(e,t)=>{if(!C&&!a.constraints.active&&0===e.buttons){Wa({...E,transform:a.transform,node:t})}}).on("mouseleave",()=>{!C&&Ga(u)}).on("mousedown",()=>{Ga(u)}).on("touchmove",()=>{Ga(u)}).on("wheel",()=>{Ga(u)}),"expandAll"!==s&&t.selectAll(".sn-org-nodes").data(n.filter(e=>!!e.children&&"Root"!==e.data.id)).enter().append("div").attr("class","sn-org-traverse").attr("style",e=>`width:${m}px;height:${b}px;top:${f(e)+h+y}px;left:${p(e)+(g-m)/2}px;`).attr("id",e=>`${e.data.id}-expand`).on("mouseenter",e=>{a.constraints.active||(e.target.style.cursor="pointer")}).on("click",(e,t)=>{a.constraints.active||(o(((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>{if(e.data.id===t)n=!n,r=[];else if(o.includes(e.data.id))t=e.parent?e.parent.data.id:e.data.id,n=!!e.parent,r=[];else if(e.parent.data.id===t){const t=e.parent.children.filter(e=>r.includes(e.data.id)).every(e=>Va(e.children));r.includes(e.data.id)?r.splice(r.indexOf(e.data.id),1):Va(e.children)&&t?r.push(e.data.id):r=[e.data.id]}else t=e.parent.data.id,n=!0,r=[e.data.id];return{topId:t,isExpanded:n,expandedChildren:r}})(t,a.expandedState,_)),e.stopPropagation())}).html(e=>`${((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>e.data.id===t&&n||e.parent&&e.parent.data.id===t&&r.includes(e.data.id)||o.includes(e.data.id)?"-":"+")(e,a.expandedState,_)} ${e.data.children.length}`)}function Ya(e,t,n,r,o){e.append("path").attr("class","sn-org-path").attr("id",e=>e.data.id).attr("d",e=>{let n="";const a=function(e,t,{depthSpacing:n,isVertical:r,x:o,y:a},i,s){const{cardWidth:l,buttonHeight:u,cardPadding:c,buttonMargin:h}=ja,d=[],p=l/2,f=s/2,g={x:e.xActual,y:e.yActual};if(e.parent&&"Root"!==e.parent.data.id){const t=n/2,l="expandAll"===i?s:s+c+u,m={x:o(e.parent)+p,y:a(e.parent)+l};"expandAll"!==i&&Va(e.parent.children)?d.push(r?[{x:g.x,y:g.y+f},{x:m.x-p,y:g.y+f},{x:m.x-p,y:m.y+h},{x:m.x,y:m.y+h},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x,y:m.y-f},{x:m.x+t,y:m.y-f},{x:m.x+t,y:m.y},{x:m.x,y:m.y}]):g.x===o(e.parent)||g.y===a(e.parent)?d.push([{x:g.x+p,y:g.y},{x:m.x,y:m.y}]):d.push(r?[{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c},{x:m.x,y:g.y-c},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x-c,y:g.y},{x:g.x-c,y:m.y},{x:m.x,y:m.y}])}else e.parent&&d.push([{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c}]);return e.children&&"Root"!==e.data.id&&d.push([{x:g.x+p,y:g.y+s},{x:g.x+p,y:g.y+s+c}]),d}(e,0,t,r,o);return a.forEach(e=>{n+=function(e){const{r:t}=ja;let n,r=`M ${e[0].x} ${e[0].y} `;const o=t=>{const r=e[t].x-e[t-1].x,o=e[t].y-e[t-1].y;n={x:(r>0)-(r<0)||+r,y:(o>0)-(o<0)||+o}};o(1);for(let a=1;a<e.length;++a){const i=e[a];a<e.length-1?(r+=`L ${i.x-n.x*t} ${i.y-n.y*t} `,o(a+1),r+=`Q ${i.x} ${i.y} ${i.x+n.x*t} ${i.y+n.y*t} `):r+=`L ${i.x} ${i.y} `}return r}(e).slice(0,-1)}),n})}const Ja=(e,t,n,r,o,a)=>{const{buttonMargin:i}=ja,s=o&&o.initialX||0;return"expandAll"===a?(e[r]=e.x+s,e[r]):(e.parent?(e.parent[r]||(e.parent[r]=Ja(e.parent,t,n,r,o)),"Root"===e.parent.data.id?e[r]=e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t:e[r]=Va(e.parent.children)?e.parent[r]+i:e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t):e[r]=s,e[r])};function Qa(e,t,n,r,o){const{widthMargin:a,heightMargin:i,cardWidth:s,cardPadding:l}=ja;let u,c,h;if("ttb"===e)u=s+a,c="expandAll"===r?o+2*l:o+i,h={depthSpacing:c,isVertical:!0,x:e=>Ja(e,u,t,"xActual",n,r),y:e=>((e,t,n,r,o,a)=>{const{leafMargin:i}=ja,s=r&&r.initialY||0;return e.parent&&"Root"!==e.parent.data.id&&"expandAll"!==o&&Va(e.parent.children)?e[n]=e.parent.y+t+e.data.childNumber*(a+i)+s:e[n]=e.y+s,e[n]})(e,c,"yActual",n,r,o)};return h}const ei=(e,t,n,r,o)=>{const a=e.k,i=`${e.x}px, ${e.y}px`;t.attr("transform",e),n.classed("org-disable-transition",!0),t.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${i}) scale(${a})`)};const ti=({topId:e,isExpanded:t,expandedChildren:n},r,o,a)=>{if("expandAll"===a)return r.descendants();const i=r.descendants().find(t=>t.data.id===e)||r,s=[];if(t&&i.children&&i.children.forEach(e=>{s.push(e),e.children&&(-1!==n.indexOf(e.data.id)||o)&&e.children.forEach(t=>{s.push(t),-1!==n.indexOf(e.data.id)&&o&&t.children&&t.children.forEach(e=>{s.push(e)})})}),"free"===r.data.navigationMode&&i.parent){const e=i.parent.ancestors(),t=e.map(e=>e.data.id);e.forEach(e=>{o&&e.children.forEach(e=>{e.children&&-1===t.indexOf(e.data.id)&&e.data.id!==i.data.id&&s.unshift(...e.children)}),s.unshift(...e.children),e.parent||s.unshift(e)})}else s.unshift(i);return s},ni=({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:s,setContainerData:l,layout:u,flags:c,actualCardHeight:h})=>{e.innerHTML="",e.className="sn-org-chart";const{navigationMode:d}=u;let p=Qa("ttb",e,{},d,h);const{width:f,height:g}=e.getBoundingClientRect(),m=vn(e).append("span").attr("class","sn-org-zoomwrapper").on("click",()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))}).node(),b=vn(m).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),y=vn(m).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),v=vn(e).append("button").attr("class","sn-org-homebutton disabled").on("click",()=>{ni({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:s,setContainerData:l,layout:u,flags:c,actualCardHeight:h})}).html('<span class="lui-fade-button__icon sn-org-home-icon">\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 16 16">\n <defs>\n <path id="home-a" d="M2,7.9 L8,3.4 L14,7.9 L14,16 L12,16 L12,11.2 C12,11.0895431 11.9104569,11 11.8,11 L9.2,11 C9.08954305,11 9,11.0895431 9,11.2 L9,16 L2,16 L2,7.9 Z M7,13.8 L7,11.2 C7,11.0895431 6.91045695,11 6.8,11 L4.2,11 C4.08954305,11 4,11.0895431 4,11.2 L4,13.8 C4,13.9104569 4.08954305,14 4.2,14 L6.8,14 C6.91045695,14 7,13.9104569 7,13.8 Z M13,4.1 L16,6.5 L15,7.5 L8,2 L1,7.5 L0,6.5 L8,0 L11,2.4 L11,1 L13,1 L13,4.1 Z"/>\n </defs>\n <use xlink:href="#home-a"/>\n </svg>\n </span>').node(),x=function(e){const t=vn(e).append("div").attr("class","sn-org-tooltip").on("mousedown",()=>{t.classed("sn-org-tooltip-visible",!1)});return t}(e);if(t.error)return vn(m).append("div").attr("class","sn-org-error").html(t.message),!1;t.warn&&t.warn.length&&vn(m).append("span").attr("class","sn-org-warning").html(`*${t.warn.join(" ")}`);const w=b.append("g").attr("class","sn-org-paths"),_=zo().size([f,g]).nodeSize([ja.cardWidth+ja.cardPadding,p.depthSpacing])(bo(t)),C=!r.expandedState||!_.descendants().find(e=>e.data.id===r.expandedState.topId),E=C?{topId:_.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,k=ti(E,_,!1,d);k.forEach(e=>{e.xActual&&e.yActual||(p.x(e),p.y(e))});const O=((e,t)=>{const{cardWidth:n,buttonHeight:r,buttonMargin:o}=ja,a={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return e.forEach(e=>{a.left=Math.min(e.xActual,a.left),a.top=Math.min(e.yActual,a.top),a.right=Math.max(e.xActual,a.right),a.bottom=Math.max(e.yActual,a.bottom)}),{x:a.left,y:a.top-r-o,width:a.right-a.left+n,height:a.bottom-a.top+t+2*(r+o)}})(k,h),S=s&&s.initialZoom?s.initialZoom:((e,t,n,r)=>{const{widthMargin:o,minZoom:a}=ja,i="expandAll"===n?1/0:ja.maxZoom,{width:s,height:l}=e,{clientHeight:u,clientWidth:c}=t,h=s+2*o,d=l+r,p=Math.max(Math.min(h/c,i),a),f=Math.max(Math.min(d/u,i),a);return p>f?{initialX:-e.x+o,initialY:-e.y+(u*p-l)/2,initialZoom:p}:{initialX:-e.x+(c*f-s)/2,initialY:r/2,initialZoom:f}})(O,e,d,h);return o(S),p=Qa("ttb",e,S,d,h),function({containerData:e,setTransform:t,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:a}){const{svg:i,divBox:s,width:l,height:u,zoomWrapper:c,element:h,tooltip:d,homeButton:p}=e,{x:f=0,y:g=0}=n,{minZoom:m,maxZoom:b}=ja,y=n&&1/n.zoom||o.initialZoom,v="expandAll"===a?y:Math.max(Math.min(b,y),m),x=()=>{const e=document.createEvent("MouseEvents");e.initEvent("mousedown",!0,!1),h.dispatchEvent(e)};vn(c).call(Fo().extent([[0,0],[l,u]]).filter(e=>!(r.constraints.active||"dblclick"===e.type||"mousedown"===e.type&&3===e.which)).scaleExtent(["expandAll"===a?.8:m*v,b*v]).on("start",x).on("zoom",e=>{vn(p).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),t({zoom:e.transform.k/v,x:e.transform.x,y:e.transform.y}),x(),Ga(d),ei(To.translate(e.transform.x,e.transform.y).scale(e.transform.k/v),i,s,l,u)})),t({zoom:1/v,x:f,y:g}),ei(To.translate(f,g).scale(1/v),i,s,l,u)}({containerData:{svg:w,divBox:y,width:f,height:g,zoomWrapper:m,element:e,tooltip:x,homeButton:v},setTransform:a,transformState:s&&s.transform||{},wrapperState:r,initialZoomState:S,navigationMode:d}),C&&i(E),l({svg:w,divBox:y,allNodes:_,positioning:p,width:f,height:g,element:e,zoomWrapper:m,tooltip:x,homeButton:v})},ri=(e,t,n,r)=>{const o={expandedState:e,transform:t,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};function oi(t,n,r,o,a){const i=e.useElement();e.onTakeSnapshot(e=>{e.snapshotData||(e.snapshotData={}),r.snapshotData&&r.snapshotData.viewState||(e.snapshotData.viewState=ri(t,o,a,i)),e.snapshotData.dataMatrix=((e,t,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=ti(e,t,!0,r),a=[],{qDataPages:i}=n.qHyperCube,s=[];return i.forEach(e=>{s.push(...e.qMatrix)}),o.forEach(e=>{void 0!==e.data.rowNo&&a.push(s[e.data.rowNo])}),a})(t,n.allNodes,r)}),e.useImperativeHandle(()=>({getViewState:()=>ri(t,o,a,i)}))}function ai(e,t,n,r){if(r||void 0===e.useColorExpression)return n;let o;return o=e.useColorExpression?ka.resolveExpression(e.colorExpression):t.getColorPickerColor(e.color),"none"===o?n:o}const ii=(e,t,n,r)=>void 0===e?n??r:t??r,si=(e,t,n)=>({useColorExpression:ii(e,t?.useColorExpression,"byExpression"===n?.style?.fontColor?.colorType,De.FONT_COLOR_USE_EXPRESSION),color:ii(e,t?.color,n?.style?.fontColor?.color,De.FONT_COLOR_DARK),colorExpression:ii(e,t?.colorExpression,n?.style?.fontColor?.colorExpression,"")}),li=(e,t)=>{const{viewState:n}=e;return!n&&t.snapshotData&&t.snapshotData.viewState?t.snapshotData.viewState:n},ui=()=>{const t=e.useTheme(),n=e.useMemo(()=>function({theme:e,config:t={}}){const{id:n,resolve:r=[],transform:o=[],extend:a=[]}=t,i={theme:e,matrix:Me(r),styles:void 0};return i.styles=Ie({theme:e,id:n,transform:o,extend:a,matrix:i.matrix}),{getStyles:()=>i.styles,getTheme:()=>i.theme,setTheme:e=>{i.theme=e,i.styles=Ie({theme:e,id:n,transform:o,extend:a,matrix:i.matrix})}}}({theme:t,config:{id:"orgChart",resolve:[["object.orgChart","card.title.main","fontSize",De.CARD_TITLE_FONTSIZE],["object.orgChart","card.title.subTitle","fontSize",De.CARD_BODY_FONTSIZE],["object.orgChart","card.label.description","fontSize",De.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureLabel","fontSize",De.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureValue","fontSize",De.CARD_BODY_FONTSIZE],["object.orgChart","card.title.main","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.title.subTitle","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.description","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureLabel","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureValue","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"]]}}),[t.name()]);return n},ci=({env:t,setExpandedState:n,setTransform:r,selectionObj:o})=>{const{flags:a}=t,i=e.useModel(),s=e.useStaleLayout(),l=e.useTranslator(),u=e.useOptions(),[c,h]=e.useState(null),[d,p]=e.useState(null),[f,g]=e.useState({}),m=ui();return e.usePromise(()=>new Promise(e=>{if(!s)return void e();const t=setTimeout(()=>{e()},9e3),c=li(u,s);c?.expandedState&&n(c.expandedState),c?.transform&&r(c.transform),Ka({layout:s,model:i,translator:l}).then(n=>{o.setState([]),h(n),p((({themeService:e,layout:t})=>{const n=e.getStyles(),r=(o="card",t.components?.find(e=>e.key===o)??void 0);var o;const a=e.getTheme(),i=si(r,r?.title?.main,t),s=si(r,r?.title?.subTitle,t),l=si(r,r?.label?.description,t),u=si(r,r?.label?.measureLabel,t),c=si(r,r?.label?.measureValue,t),h={useColorExpression:ii(r,r?.background?.useColorExpression,"byExpression"===t?.style?.backgroundColor?.colorType,De.BACKGROUND_USE_EXPRESSION),color:ii(r,r?.background?.color,t?.style?.backgroundColor?.color,De.BACKGROUND_COLOR),colorExpression:ii(r,r?.background?.colorExpression,t?.style?.backgroundColor?.colorExpression,"")},d={topBar:ii(r,r?.border?.topBar,t?.style?.border?.top,De.BORDER_TOP),fullBorder:ii(r,r?.border?.fullBorder,t?.style?.border?.fullBorder,De.BORDER_FULL),contrastColor:ii(r,r?.border?.contrastColor,"auto"===t?.style?.border?.colorType,!0),useColorExpression:ii(r,r?.border?.useColorExpression,"byExpression"===t?.style?.border?.colorType,De.BORDER_USE_EXPRESSION),color:ii(r,r?.border?.color,t?.style?.border?.color,De.BORDER_COLOR),colorExpression:ii(r,r?.border?.colorExpression,t?.style?.border?.colorExpression,"")},p=ii(r,r?.contrastTextColor,"auto"===t?.style?.fontColor?.colorType,!0),f=ai(i,a,"default",p),g=ai(s,a,"default",p),m=ai(l,a,"default",p),b=ai(u,a,"default",p),y=ai(c,a,"default",p),v=ai(h,a,De.BACKGROUND_COLOR.color,!1),x=ai(d,a,ka.getDarkColor(v),d.contrastColor),w=t.qHyperCube.qMeasureInfo.length?t.qHyperCube.qMeasureInfo[0].qFallbackTitle:null;return{cardTitle:{fontSize:ii(r,r?.title?.main?.fontSize,De.CARD_TITLE_FONTSIZE,n.card.title.main.fontSize),fontFamily:r?.title?.main?.fontFamily??n.card.title.main.fontFamily,fontColor:f},cardSubTitle:{fontSize:ii(r,r?.title?.subTitle?.fontSize,De.CARD_BODY_FONTSIZE,n.card.title.subTitle.fontSize),fontFamily:r?.title?.subTitle?.fontFamily??n.card.title.subTitle.fontFamily,fontColor:g},cardDescription:{fontSize:ii(r,r?.label?.description?.fontSize,De.CARD_BODY_FONTSIZE,n.card.label.description.fontSize),fontFamily:r?.label?.description?.fontFamily??n.card.label.description.fontFamily,fontColor:m},cardMeasureLabel:{fontSize:ii(r,r?.label?.measureLabel?.fontSize,De.CARD_BODY_FONTSIZE,n.card.label.measureLabel.fontSize),fontFamily:r?.label?.measureLabel?.fontFamily??n.card.label.measureLabel.fontFamily,fontColor:b},cardMeasureValue:{fontSize:ii(r,r?.label?.measureValue?.fontSize,De.CARD_BODY_FONTSIZE,n.card.label.measureValue.fontSize),fontFamily:r?.label?.measureValue?.fontFamily??n.card.label.measureValue.fontFamily,fontColor:y},cardContrastTextColor:p,cardBackgroundColor:v,cardBorder:{topBar:d.topBar,fullBorder:d.fullBorder,contrastColor:d.contrastColor,borderColor:x},cardImage:{location:r?.image?.location??De.IMAGE_LOCATION,alignment:r?.image?.alignment??De.IMAGE_ALIGNMENT,shape:r?.image?.shape??De.IMAGE_SHAPE,clip:r?.image?.clip??De.IMAGE_CLIP},measureLabel:w}})({themeService:m,layout:s}));const r=new Set;if(a.isEnabled("QCB_31709_FIX_PRINTING_IMAGES")){const e=c?.expandedState||{topId:n.id,isExpanded:!0,expandedChildren:[]},t=bo(n);ti(e,t,!1,s.navigationMode).forEach(e=>{e.data.attributes?.image&&r.add(e.data.id)})}g({resolve:(n,o)=>{n&&r.delete(n),(0===r.size||o)&&(clearTimeout(t),e())}}),0===r.size&&(clearTimeout(t),e())})}),[s,i,l.language(),m]),{dataTree:c,styling:d,usePromiseStatus:f}};function hi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}hi(".sn-org-chart .sn-org-homebutton {\n position: absolute;\n top: 20px;\n right: 20px;\n height: 20px;\n width: 20px;\n border-color: transparent;\n background-color: transparent;\n fill: rgba(89, 89, 89, 0.8);\n transition: fill 200ms ease-out;\n}\n.sn-org-chart .sn-org-homebutton:hover {\n fill: #595959;\n}\n.sn-org-chart .sn-org-homebutton.disabled {\n display: none;\n}\n");hi(".sn-org-chart {\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes {\n position: absolute;\n transform-origin: 0% 0%;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n backface-visibility: hidden;\n}\n.sn-org-chart .sn-org-nodes:not(.org-disable-transition) {\n transition-property: all;\n transition-duration: 0.5s;\n}\n.sn-org-chart .sn-org-nodes .sn-org-traverse {\n position: absolute;\n background-color: white;\n font-size: 20px;\n font-weight: bold;\n border-radius: 3px;\n border: 1px solid #8c8c8c;\n text-align: center;\n line-height: 24px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-root {\n position: absolute;\n background-color: #8c8c8c;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card {\n position: absolute;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text {\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 3px;\n display: flex;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.selected {\n border: 4px solid black;\n border-radius: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.not-selected {\n opacity: 0.5;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.horizontal {\n flex-direction: row;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.vertical {\n flex-direction: column;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper {\n order: 0;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.image-last {\n order: 2;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.vertical {\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image {\n padding: 4px 4px;\n object-fit: contain;\n height: 130px;\n width: 130px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.round {\n border-radius: 50%;\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.clip {\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.horizontal {\n padding: 4px 0px;\n height: 50px;\n width: 50px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox {\n order: 1;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image {\n max-height: 60px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.horizontal {\n width: 85px;\n height: fit-content;\n position: relative;\n top: 50%;\n transform: translate(0, -50%);\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.left {\n padding-left: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.right {\n padding-right: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.vertical {\n width: 143px;\n margin-bottom: 4px;\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.bottom {\n padding-top: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.round {\n max-height: 80px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-title {\n font-size: 14px;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");hi(".sn-org-chart .sn-org-svg {\n position: absolute;\n /* For css only transitions, does not work in IE11 */\n}\n.sn-org-chart .sn-org-svg .sn-org-path {\n fill: none;\n stroke: #4c4c4c;\n stroke-width: 1;\n}\n.sn-org-chart .sn-org-svg .sn-org-paths:not(.org-disable-transition) {\n transform-origin: 0% 0%;\n transition-property: all;\n transition-duration: 0.5s;\n}\n");hi('.sn-org-chart {\n /* Tooltip arrow */\n}\n.sn-org-chart .sn-org-tooltip {\n visibility: hidden;\n opacity: 0;\n /* Unsupported in IE, so there we set width explicitly */\n width: max-content;\n /* Position the tooltip text */\n position: absolute;\n z-index: 1;\n}\n.sn-org-chart .sn-org-tooltip::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 0%;\n margin-left: -10px;\n border-width: 10px;\n border-style: solid;\n border-color: #404040 transparent transparent transparent;\n}\n.sn-org-chart .sn-org-tooltip-visible {\n opacity: 0.9;\n visibility: visible;\n}\n.sn-org-chart .sn-org-tooltip-inner {\n max-width: 240px;\n right: 50%;\n font-family: "QlikView Sans", sans-serif;\n position: relative;\n max-height: 150px;\n background-color: #404040;\n color: #e6e6e6;\n text-align: left;\n font-size: 13px;\n line-height: 15px;\n padding: 10px 10px 10px 10px;\n border-radius: 6px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-image {\n height: 50px;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n');return hi(".sn-org-chart .sn-org-warning {\n position: absolute;\n bottom: 0px;\n left: 0px;\n font-style: italic;\n font-size: 13px;\n color: #7b7a78;\n}\n.sn-org-chart .sn-org-error {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 1.2em;\n transform: translate(-50%, -50%);\n}\n"),function(n){const{flags:r}=n;return{qae:{properties:et,data:t},component:()=>{const t=e.useStaleLayout(),o=e.useElement(),a=e.useOptions(),i=e.useRect(),s=e.useConstraints(),l=e.useTranslator(),[u,c]=e.useState(null),[h,d]=e.useState(null),[p,f]=e.useState(null),[g,m]=e.useState(null),[b]=e.useState({transform:{},constraints:s,expandedState:h}),y=function(t){const[n,r]=e.useState(!1),o=e.useSelections(),a=!!e.useLayout().qSelectionInfo.qInSelections,[i]=e.useState({api:o,setState:e=>{i.state=e},state:[],singleSelect:!1});e.useEffect(()=>{Qe(t)},[t]);const s=()=>{i.state=[]},l=()=>{i.state=[],r(!1)};return e.useEffect(()=>i.api?(i.api=o,i.api.on("deactivated",s),i.api.on("canceled",l),i.api.on("confirmed",l),i.api.on("cleared",s),()=>{i.api.removeListener("deactivated",s),i.api.removeListener("canceled",l),i.api.removeListener("confirmed",l),i.api.removeListener("cleared",s)}):()=>{},[o]),e.useEffect(()=>{i.singleSelect=n},[n]),e.useAction(()=>({action(){r(!n)},icon:{shapes:[{type:"path",attrs:{d:"M9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 Z M15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.4,15 C14.7313708,15 15,14.7313708 15,14.4 L15,13.5 C15,13.2238576 15.2238576,13 15.5,13 Z M0.5,13 C0.776142375,13 1,13.2238576 1,13.5 L1,14.4 C1,14.7313708 1.26862915,15 1.6,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,13.5 C0,13.2238576 0.223857625,13 0.5,13 Z M6.8,9 C6.91045695,9 7,9.08954305 7,9.2 L7,12.8 C7,12.9104569 6.91045695,13 6.8,13 L3.2,13 C3.08954305,13 3,12.9104569 3,12.8 L3,9.2 C3,9.08954305 3.08954305,9 3.2,9 L6.8,9 Z M12.8,9 C12.9104569,9 13,9.08954305 13,9.2 L13,12.8 C13,12.9104569 12.9104569,13 12.8,13 L9.2,13 C9.08954305,13 9,12.9104569 9,12.8 L9,9.2 C9,9.08954305 9.08954305,9 9.2,9 L12.8,9 Z M6,10 L4,10 L4,12 L6,12 L6,10 Z M12,10 L10,10 L10,12 L12,12 L12,10 Z M15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 Z M0.5,6 C0.776142375,6 1,6.22385763 1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 0,9.77614237 0,9.5 L0,6.5 C0,6.22385763 0.223857625,6 0.5,6 Z M6.8,3 C6.91045695,3 7,3.08954305 7,3.2 L7,6.8 C7,6.91045695 6.91045695,7 6.8,7 L3.2,7 C3.08954305,7 3,6.91045695 3,6.8 L3,3.2 C3,3.08954305 3.08954305,3 3.2,3 L6.8,3 Z M12.8,3 C12.9104569,3 13,3.08954305 13,3.2 L13,6.8 C13,6.91045695 12.9104569,7 12.8,7 L9.2,7 C9.08954305,7 9,6.91045695 9,6.8 L9,3.2 C9,3.08954305 9.08954305,3 9.2,3 L12.8,3 Z M12,4 L10,4 L10,6 L12,6 L12,4 Z M2.5,5.70654635e-14 C2.77614237,5.70654635e-14 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.6,1 C1.26862915,1 1,1.26862915 1,1.6 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 0,2.77614237 0,2.5 L0,1 C0,0.44771525 0.44771525,5.70654635e-14 1,5.70654635e-14 L2.5,5.70654635e-14 Z M15,0 C15.5522847,0 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.6 C15,1.26862915 14.7313708,1 14.4,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,0 13.5,0 L15,0 Z M9.5,5.67323966e-14 C9.77614237,5.67323966e-14 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,5.67323966e-14 6.5,5.67323966e-14 L9.5,5.67323966e-14 Z"}}]},active:n,hidden:!a,label:t.get("Object.OrgChart.SingleSelect")}),[n,a]),e.useEffect(()=>{const e=e=>{"Shift"===e.key&&r(!0)},t=e=>{"Shift"===e.key&&r(!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),i}(l);e.useMemo(()=>{Qe(l)},[o,l.language()]),e.useEffect(()=>{b.constraints=s},[s]),e.useEffect(()=>{b.transform=p},[p]),e.useEffect(()=>{b.expandedState=h},[h]);const v=e=>{e.useTransitions=!0,d(e)},{dataTree:x,styling:w,usePromiseStatus:_}=ci({env:n,setExpandedState:d,setTransform:f,selectionObj:y}),C=()=>{if(o&&x&&w){const e=li(a,t),n=Ha(w);ni({element:o,dataTree:x,viewState:e,wrapperState:b,selectionObj:y,setInitialZoom:m,setTransform:f,setExpandedState:d,setContainerData:c,layout:t,flags:r,actualCardHeight:n})}},E=()=>{if(u&&h&&w){const e=Ha(w);(({containerData:e,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:a,flags:i,actualCardHeight:s,usePromiseStatus:l})=>{const{svg:u,divBox:c,allNodes:h,positioning:d,tooltip:p}=e,{navigationMode:f}=h.data;c.selectAll("*").remove(),u.selectAll("*").remove();const g=ti(r.expandedState,h,!1,f);Xa({positioning:d,divBox:c,nodes:g,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:f,element:a,tooltip:p,flags:i,actualCardHeight:s,usePromiseStatus:l}),Ya(u.selectAll(".sn-org-paths").data(g).enter(),d,r.expandedState.topId,f,s)})({containerData:u,styling:w,setExpandedCallback:v,wrapperState:b,selectionObj:y,useTransitions:h.useTransitions,element:o,flags:r,actualCardHeight:e,usePromiseStatus:_})}};e.useEffect(()=>{E()},[u,y.state]),e.useEffect(()=>{C()},[o,x,s]),e.useEffect(()=>{t.resizeOnExpand?C():E()},[h]),e.useEffect(()=>{if(u&&t&&t.snapshotData){const e=((e,t,n)=>{if(!t)return To.translate(n.x,n.y).scale(n.zoom);const{size:r}=t,o=e.width/r.w>e.height/r.h?e.height/r.h:e.width/r.w,a=t.transform.x*o,i=t.transform.y*o,s=t.transform.zoom*o;return To.translate(a,i).scale(s)})(i,t.snapshotData.viewState,p);ei(e,u.svg,u.divBox,i.width,i.height),u.divBox.classed("sn-org-chart-snapshot",!0)}},[i,u]),oi(h,u,t,p,g)},ext:Ye(n)}}});
9
+ t.exports=function(t,e){if(!t||isNaN(+e))return e;var n,r,o,a,i,s,l,u,c,h,d=t.length,p=t.search(/[0-9\-\+#]/),f=p>0?t.substring(0,p):"",g=t.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),b=d-m,y=t.substring(b,b+1),v=b+("."===y||","===y?1:0),x=m>0?t.substring(v,d):"";if(n=(e="-"===(t=t.substring(p,v)).charAt(0)?-e:+e)<0?e=-e:0,o=(r=t.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",a=r&&r[1]&&r[0]||",",t=t.split(o),e=+(e=e.toFixed(t[1]&&t[1].length))+"",s=t[1]&&t[1].lastIndexOf("0"),(!(u=e.split("."))[1]||u[1]&&u[1].length<=s)&&(e=(+e).toFixed(s+1)),c=t[0].split(a),t[0]=c.join(""),(i=t[0]&&t[0].indexOf("0"))>-1)for(;u[0].length<t[0].length-i;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((e=e.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(g="",b=(h=e[0]).length%l,d=h.length,v=0;v<d;v++)g+=h.charAt(v),!((v-b+1)%l)&&v<d-l&&(g+=a);e[0]=g}return e[1]=t[1]&&e[1]?o+e[1]:"","0"!==(r=e.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},St({exports:{}});const Lt="'Source Sans Pro', 'Arial', 'sans-serif'",Nt="#333333",zt="#595959",Mt="#737373",Rt="#cccccc",At="#e6e6e6";function Tt(t){const e={};return[...t,["","","color"],["object","","fontFamily"],["object","axis.label.name","color",zt],["object","axis.label.name","fontFamily",Lt],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Rt],["object","axis.line.minor","color",At],["object","axis.title","color"],["object","axis.title","fontFamily",Lt],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",At],["object","grid.line.major","color",Rt],["object","grid.line.minor","color",At],["object","label.value","color",zt],["object","label.value","fontFamily",Lt],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",zt],[!1,"label.value","lightColor",At],["object","outOfRange","color","#999"],["object","legend.title","color",Nt],["object","legend.title","fontFamily",Lt],["object","legend.title","fontSize","15px"],["object","legend.label","color",zt],["object","legend.label","fontFamily",Lt],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Nt],["object","referenceLine.label.name","fontFamily",Lt],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",At],["object","referenceLine.outOfBounds","fontFamily",Lt],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Mt,t=>"transparent"===t?Mt:t]].reduce((t,n)=>{const r=`${n[0]}-${n[1]}-${n[2]}}`;return e[r]||(e[r]=!0,t.push(n)),t},[]).toSorted((t,e)=>(t[0].split?t[0].split(".").length:0)-(e[0].split?e[0].split(".").length:0))}const $t="object",jt=t=>t;function It({theme:t,id:e,transform:n,extend:r,matrix:o}){const a={},i=n.reduce((t,e)=>{const[n,r]=e;return t[n]=r,t},{});return o.forEach(n=>{const[r,o,s,l,u=t=>t]=n,c=function({theme:t,base:e,path:n,attribute:r,defaultValue:o}){if(!t||!1===e)return o;const a=t.getStyle(e,n,r);return void 0===a?o:a}({theme:t,base:r===$t&&e?`${$t}.${e}`:r,path:o,attribute:s,defaultValue:l}),h=(i[`${o}.${s}`]||jt)(u(c));vt(a,[o,s].filter(Boolean).join("."),h)}),r.forEach(t=>{const[e,n]=t;vt(a,e,n)}),a}var Dt={CARD_TITLE_FONTSIZE:"14px",CARD_BODY_FONTSIZE:"11px",FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{color:"#e6e6e6"},BACKGROUND_COLOR_TYPE:"colorPicker",BACKGROUND_COLOR:{index:-1,color:"#ffffff"},BORDER_COLOR_TYPE:"auto",BORDER_COLOR:{index:-1,color:"#737373"},BORDER_FULL:!0,BORDER_TOP:!0,FONT_COLOR_USE_EXPRESSION:!1,BACKGROUND_USE_EXPRESSION:!1,BORDER_USE_EXPRESSION:!1,IMAGE_LOCATION:"both",IMAGE_ALIGNMENT:"left",IMAGE_SHAPE:"rectangle",IMAGE_CLIP:!0};const Bt=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],Pt=t=>t.contrastTextColor??!0;function qt(t,e,n){const r=`${t}.${e}`,o=`${r}.fontFamily`,a=`${r}.fontSize`,i=`${r}.color`,s=`${r}.colorExpression`;return{fontFamilyItem:{component:"dropdown",ref:o,options:()=>n.getOptions(`card.${o}`),defaultValue:()=>n.getDefaultValue(`card.${o}`)},fontSizeItem:{component:"dropdown",ref:a,options:()=>n.getOptions(`card.${a}`),defaultValue:()=>n.getDefaultValue(`card.${a}`)},fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:`${r}.useColorExpression`,width:!0,component:"dropdown",defaultValue:Dt.FONT_COLOR_USE_EXPRESSION,options:Bt,show:t=>!Pt(t)},colorPicker:{component:"color-picker",ref:i,width:!1,dualOutput:!0,defaultValue:Dt.FONT_COLOR_DARK,show:n=>!Pt(n)&&!n[t]?.[e]?.useColorExpression}}},colorExpression:{component:"input-field-expression",type:"string",ref:s,width:!0,expression:"optional",defaultValue:"",show:n=>!Pt(n)&&n[t]?.[e]?.useColorExpression}}}const Ft=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],Ut=[{value:"card",translation:"Card only"},{value:"tooltip",translation:"Tooltip only"},{value:"both",translation:"Card and tooltip"}],Vt=[{value:"left",translation:"Left"},{value:"right",translation:"Right"},{value:"top",translation:"Top"},{value:"bottom",translation:"Bottom"}],Ht=[{value:"rectangle",translation:"Rectangle"},{value:"round",translation:"Round"}];function Kt(t,e,n){const o=function({theme:t,translator:e,config:n={}}){const{id:o,paths:a}=function({config:t={}}){const{id:e,paths:n}=t;return{id:void 0===e?r:`${r}.${e}`,paths:Array.isArray(n)?n:[]}}({config:n}),i={};a.forEach(n=>{const r=n.split(".");d(r);let a=i;for(let i=0;i<r.length;i++){const s=r[i];i===r.length-1?a[s]=c({theme:t,translator:e,id:o,path:n}):void 0===a[s]&&(a[s]={}),a=a[s]}});const s=t=>{const e=t.split(".");d(e);let n=i;for(let r=0;r<e.length;r++){const o=e[r];if(void 0===n[o])throw new Error(`font-resolver: Path '${t}' could not be resolved.`);n=n[o]}return n};return i.getDefaultValue=t=>s(t).getDefaultValue(),i.getOptions=t=>s(t).getOptions(),i}({theme:t,translator:n,config:{id:"orgChart",paths:["card.title.main","card.title.subTitle","card.label.description","card.label.measureLabel","card.label.measureValue"]}}),a=t=>(t.border?.topBar??Dt.BORDER_TOP)||(t.border?.fullBorder??Dt.BORDER_FULL),i=t=>t.border?.contrastColor??!0;return{component:"styling-panel",show:!0,chartType:"orgchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.OrgChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{contrastTextColorSection:{translation:"Object.OrgChart.Card.TextColor",component:"panel-section",items:{contrastTextColorItems:{component:"items",ref:"components",key:"card",items:{useContrast:{component:"checkbox",type:"boolean",ref:"contrastTextColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0}}}}},titleSection:{translation:"Object.OrgChart.Card.Title",component:"panel-section",items:{titleItems:{component:"items",ref:"components",key:"card",items:qt("title","main",o)}}},subtitleSection:{translation:"Object.OrgChart.Card.Subtitle",component:"panel-section",items:{subtitleItems:{component:"items",ref:"components",key:"card",items:qt("title","subTitle",o)}}},descriptionSection:{translation:"Object.OrgChart.Card.Description",component:"panel-section",items:{descriptionItems:{component:"items",ref:"components",key:"card",items:qt("label","description",o)}}},measureLabelSection:{translation:"Object.OrgChart.Card.MeasureLabel",component:"panel-section",items:{measureLabelItems:{component:"items",ref:"components",key:"card",items:qt("label","measureLabel",o)}}},measureValueSection:{translation:"Object.OrgChart.Card.MeasureValue",component:"panel-section",items:{measureValueItems:{component:"items",ref:"components",key:"card",items:qt("label","measureValue",o)}}},backgroundColorSection:{component:"panel-section",translation:"Object.OrgChart.ColorLabelExpression",items:{backgroundColorItems:{component:"items",ref:"components",key:"card",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"background.useColorExpression",width:9,component:"dropdown",defaultValue:Dt.BACKGROUND_USE_EXPRESSION,options:Ft},colorPicker:{component:"color-picker",type:"object",ref:"background.color",width:3,dualOutput:!0,defaultValue:Dt.BACKGROUND_COLOR,showAlpha:!0,show:t=>!t.background?.useColorExpression},colorExpression:{component:"input-field-expression",type:"string",ref:"background.colorExpression",expression:"optional",defaultValue:"",show:t=>t.background?.useColorExpression}}}}}}},cardBorderSection:{component:"panel-section",translation:"Object.OrgChart.CardAppearance",items:{cardBorderItems:{component:"items",ref:"components",key:"card",items:{topBar:{component:"checkbox",ref:"border.topBar",translation:"Object.OrgChart.TopBar",defaultValue:Dt.BORDER_TOP},fullBorder:{component:"checkbox",ref:"border.fullBorder",translation:"properties.border",defaultValue:Dt.BORDER_FULL},contrastBorderColorSection:{component:"checkbox",type:"boolean",key:"card",ref:"border.contrastColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0,show:t=>a(t)},borderColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{component:"dropdown",ref:"border.useColorExpression",width:9,translation:"properties.border.color",defaultValue:Dt.BORDER_USE_EXPRESSION,options:Ft,show:t=>a(t)&&!i(t)},colorPicker:{component:"color-picker",ref:"border.color",width:3,dualOutput:!0,defaultValue:Dt.BORDER_COLOR,show:t=>a(t)&&!i(t)&&!t.border?.useColorExpression},colorExpression:{component:"input-field-expression",type:"string",ref:"border.colorExpression",expression:"optional",defaultValue:"",show:t=>a(t)&&!i(t)&&t.border?.useColorExpression}}}}}}},imageSection:{component:"panel-section",translation:"Object.OrgChart.ImageOptions",items:{imageItems:{component:"items",ref:"components",key:"card",items:{location:{component:"dropdown",ref:"image.location",translation:"Object.OrgChart.ImageLocation",options:Ut,defaultValue:Dt.IMAGE_LOCATION},alignment:{component:"dropdown",ref:"image.alignment",translation:"Object.OrgChart.ImageAlignment",options:Vt,defaultValue:Dt.IMAGE_ALIGNMENT},shape:{component:"dropdown",ref:"image.shape",translation:"Object.OrgChart.ImageShape",options:Ht,defaultValue:Dt.IMAGE_SHAPE},clip:{component:"checkbox",ref:"image.clip",translation:"Object.OrgChart.ImageFit",defaultValue:Dt.IMAGE_CLIP,show:t=>"rectangle"===(t.image?.shape??Dt.IMAGE_SHAPE)}}}}}}}}const Zt=[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}],Wt={uses:"sorting"},Gt={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"},rowLimit:{type:"integer",translation:"$RowLimit",ref:"rowLimit",defaultValue:3e4,min:5e3,max:1e5,show:!1}}}}},Xt=(t,e,r)=>{const o=r?.sense?.theme,a={uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{orgChartStyling:Kt(o,0,t),navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:Zt},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:t=>"expandAll"!==n.getValue(t,"navigationMode")}}}}}}};return a};function Yt(t){return function({translator:t,flags:e,anything:n}){return{definition:{type:"items",component:"accordion",items:{data:{uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(t,e)=>e.getDimensions()[0]===t,ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.LabelExpression",defaultValue:"",id:"labelExpression",tid:"labelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.SubLabelExpression",defaultValue:"",id:"subLabelExpression",tid:"subLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ExtraLabelExpression",defaultValue:"",id:"extraLabelExpression",tid:"extraLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ImageUrl",defaultValue:"",id:"imageExpression",tid:"imageExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(t,e)=>e.getDimensions()[0]===t,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}},sorting:Wt,addOns:Gt,settings:Xt(t,0,n)}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0},migrate:{properties:t=>function(t){if(t.components?.length>0)return t;function e(t){return{useColorExpression:"byExpression"===t.colorType,color:t.color,colorExpression:t.colorExpression,colorType:t.colorType}}function n(t){return"auto"===t.colorType}const r={key:"card",title:{main:{...e(t.style?.fontColor)},subTitle:{...e(t.style?.fontColor)}},label:{description:{...e(t.style?.fontColor)},measureLabel:{...e(t.style?.fontColor)},measureValue:{...e(t.style?.fontColor)}},contrastTextColor:n(t.style?.fontColor),background:{...e(t.style?.backgroundColor)},border:{...e(t.style?.border),fullBorder:t.style?.border?.fullBorder,topBar:t.style?.border?.top,contrastColor:n(t.style?.border)}};return t.components=[r],t}(t)}}}(t)}var Jt={Object_OrgChart:{id:"Object.OrgChart",locale:{"de-DE":"Organisationsdiagramm","en-US":"Org chart","es-ES":"Organigrama","fr-FR":"Organigramme","it-IT":"Organigramma","ja-JP":"組織図","ko-KR":"조직도","nl-NL":"Organisatiediagram","pl-PL":"Wykres organizacyjny","pt-BR":"Quadro organizacional","ru-RU":"Организационная диаграмма","sv-SE":"Organisationsdiagram","tr-TR":"Kuruluş grafiği","zh-CN":"组织图","zh-TW":"組織圖"}},Object_OrgChart_BackgroundColor:{id:"Object.OrgChart.BackgroundColor",locale:{"de-DE":"Hintergrundfarbe","en-US":"Background color","es-ES":"Color de fondo","fr-FR":"Couleur d'arrière-plan","it-IT":"Colore sfondo","ja-JP":"背景色","ko-KR":"배경색","nl-NL":"Achtergrondkleur","pl-PL":"Kolor tła","pt-BR":"Cor de fundo","ru-RU":"Цвет фона","sv-SE":"Bakgrundsfärg","tr-TR":"Arka plan rengi","zh-CN":"背景颜色","zh-TW":"背景顏色"}},Object_OrgChart_CardAppearance:{id:"Object.OrgChart.CardAppearance",locale:{"de-DE":"Kartendarstellung","en-US":"Card appearance","es-ES":"Aspecto de la tarjeta","fr-FR":"Aspect de la carte","it-IT":"Aspetto scheda","ja-JP":"カード スタイル","ko-KR":"카드 모양","nl-NL":"Uiterlijk van de kaart","pl-PL":"Wygląd karty","pt-BR":"Aparência do cartão","ru-RU":"Вид карточки","sv-SE":"Kortets utseende","tr-TR":"Kart görünüşü","zh-CN":"卡外观","zh-TW":"卡片外觀"}},Object_OrgChart_ColorLabelExpression:{id:"Object.OrgChart.ColorLabelExpression",locale:{"de-DE":"Hintergrundfarbe der Karte","en-US":"Card background color","es-ES":"Color de fondo de la tarjeta","fr-FR":"Couleur d'arrière-plan de la carte","it-IT":"Colore sfondo scheda","ja-JP":"カードの背景色","ko-KR":"카드 배경색","nl-NL":"Achtergrondkleur kaart","pl-PL":"Kolor tła karty","pt-BR":"Cor de fundo do cartão","ru-RU":"Цвет фона карточки","sv-SE":"Kortets bakgrundsfärg","tr-TR":"Kart arka plan rengi","zh-CN":"卡背景颜色","zh-TW":"卡片背景顏色"}},Object_OrgChart_CycleWarning:{id:"Object.OrgChart.CycleWarning",locale:{"de-DE":"Die Daten enthalten Zirkelbezüge, Knoten werden ausgelassen.","en-US":"Data contains circular references, nodes are omitted.","es-ES":"Los datos contienen referencias circulares, se omiten los nodos.","fr-FR":"Les données contiennent des références circulaires. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: i dati contengono riferimenti incrociati.","ja-JP":"データに循環参照が含まれています。ノードは省略されます。","ko-KR":"데이터가 순환 참조를 포함합니다. 노드는 생략됩니다.","nl-NL":"Gegevens bevatten cirkelreferenties, knooppunten worden weggelaten.","pl-PL":"Dane zawierają odwołania cykliczne, węzły są pomijane.","pt-BR":"Os dados contêm referências circulares, os nós são omitidos.","ru-RU":"В данных содержатся циклические ссылки, узлы опущены.","sv-SE":"Data innehåller cirkelreferenser. Noder utelämnas.","tr-TR":"Veriler döngüsel referanslar içeriyor; düğümler atlandı.","zh-CN":"数据包含循环引用,已省略节点。","zh-TW":"資料包含循環參照,已省略節點。"}},Object_OrgChart_Description:{id:"Object.OrgChart.Description",locale:{"de-DE":"Zeigt die Beziehungen einer Organisation oder ähnlich strukturierter Daten an. Startet oben und ermöglicht die Navigation durch die Hierarchie.","en-US":"Displays the relations of an organization or similarly structured data. Starts at the top and allows for navigation through the hierarchy.","es-ES":"Muestra las relaciones jerárquicas de una organización o datos estructurados de manera similar. Comienza en la parte superior y permite la navegación a través de la jerarquía.","fr-FR":"Affiche les relations d'une entreprise ou de données structurées de manière similaire. Démarre au sommet et permet la navigation à travers la hiérarchie.","it-IT":"Visualizza le relazioni di un'organizzazione o dati strutturati in modo analogo. Inizia dall'alto e consente la navigazione attraverso la gerarchia.","ja-JP":"組織の関係やそれに類似する構造のデータを表示します。上部から開始し、階層を移動できます。","ko-KR":"조직 또는 유사하게 구조화된 데이터의 관계를 표시합니다. 맨 위에서 시작하여 계층 구조를 탐색할 수 있습니다.","nl-NL":"Geeft de relaties van een organisatie of vergelijkbaar gestructureerde gegevens weer. Begint bovenaan en maakt navigatie door de hiërarchie mogelijk.","pl-PL":"Wyświetla relacje organizacji lub dane o podobnej strukturze. Zaczyna się od góry i umożliwia nawigację w hierarchii.","pt-BR":"Exibe as relações de uma organização ou dados estruturados de forma semelhante. Começa no topo e permite a navegação pela hierarquia.","ru-RU":"Отображает отношения организации или аналогично структурированные данные. Начинается сверху и позволяет перемещаться по иерархии.","sv-SE":"Visar relationerna i en organisation eller data som är strukturerat på liknande sätt. Startar högst upp och möjliggör navigering genom hierarkin.","tr-TR":"Bir kuruluşun ilişkilerini veya benzer yapılanan verileri gösterir. En üstte açılır ve hiyerarşide hareket etmenize olanak sağlar.","zh-CN":"显示组织或类似结构数据的关系。从顶部开始,并允许在层次结构中进行导航。","zh-TW":"顯示組織的關係或類似結構的資料。在頂端開始並允許瀏覽階層。"}},Object_OrgChart_DummyWarn:{id:"Object.OrgChart.DummyWarn",locale:{"de-DE":"Die Daten enthalten mehrere Root-Knoten.","en-US":"The data contains multiple root nodes.","es-ES":"Los datos contienen múltiples nodos raíz.","fr-FR":"Les données contiennent plusieurs nœuds racines.","it-IT":"I dati contengono più nodi principali.","ja-JP":"データには複数のルート ノードが含まれています。","ko-KR":"데이터가 여러 루트 노드를 포함합니다.","nl-NL":"De gegevens bevatten meerdere hoofdknooppunten.","pl-PL":"Dane zawierają wiele węzłów głównych.","pt-BR":"Os dados contêm vários nós raiz.","ru-RU":"В данных содержится несколько корневых узлов.","sv-SE":"Data innehåller flera rotnoder.","tr-TR":"Veriler birden çok kök düğümü içeriyor.","zh-CN":"数据包含多个根节点。","zh-TW":"資料包含多個根節點。"}},Object_OrgChart_ExpandAll:{id:"Object.OrgChart.ExpandAll",locale:{"de-DE":"Gesamte Struktur","en-US":"Entire tree","es-ES":"Árbol entero","fr-FR":"Arborescence complète","it-IT":"Intero albero","ja-JP":"ツリー全体","ko-KR":"전체 트리","nl-NL":"Volledige structuur","pl-PL":"Całe drzewo","pt-BR":"Árvore inteira","ru-RU":"Все дерево","sv-SE":"Hela trädet","tr-TR":"Tüm ağaç","zh-CN":"整个树","zh-TW":"整個樹狀結構"}},Object_OrgChart_ExtraLabelDesc:{id:"Object.OrgChart.ExtraLabelDesc",locale:{"de-DE":"Die Beschreibung wird nur angezeigt, wenn eine Kennzahl nicht verwendet wird","en-US":"Description is only visible when a measure is not used","es-ES":"La descripción solo está visible cuando no se usa una medida","fr-FR":"La description est visible uniquement lorsqu'une mesure n'est pas utilisée","it-IT":"È possibile visualizzare la descrizione solo se le misure non vengono utilizzate","ja-JP":"メジャーが使用されていない場合にのみ、説明が表示されます。","ko-KR":"측정값을 사용하지 않는 경우에만 설명을 볼 수 있습니다.","nl-NL":"Beschrijving is alleen zichtbaar wanneer een meting niet wordt gebruikt","pl-PL":"Opis jest widoczny tylko wtedy, gdy miara nie jest używana","pt-BR":"A descrição é visível apenas quando uma medida não é usada","ru-RU":"Описание отображается, только если мера не используется","sv-SE":"Beskrivning används bara när ett mått inte används","tr-TR":"Bir hesaplama kullanılmadığında yalnızca açıklama görünür","zh-CN":"描述仅在未使用度量时可用","zh-TW":"只有在不使用量值時才會顯示描述"}},Object_OrgChart_ExtraLabelExpression:{id:"Object.OrgChart.ExtraLabelExpression",locale:{"de-DE":"Beschreibung der Karte","en-US":"Card description","es-ES":"Descripción de la tarjeta","fr-FR":"Description de la carte","it-IT":"Descrizione scheda","ja-JP":"カードの説明","ko-KR":"카드 설명","nl-NL":"Beschrijving kaart","pl-PL":"Opis karty","pt-BR":"Descrição do cartão","ru-RU":"Описание карточки","sv-SE":"Kortets beskrivning","tr-TR":"Kart açıklaması","zh-CN":"卡描述","zh-TW":"卡片描述"}},Object_OrgChart_FontColor:{id:"Object.OrgChart.FontColor",locale:{"de-DE":"Schriftfarbe","en-US":"Font color","es-ES":"Color de fuente","fr-FR":"Couleur de police","it-IT":"Colore formato carattere","ja-JP":"フォントの色","ko-KR":"글꼴 색","nl-NL":"Tekstkleur","pl-PL":"Kolor czcionki","pt-BR":"Cor da fonte","ru-RU":"Цвет шрифта","sv-SE":"Teckenfärg","tr-TR":"Yazı tipi rengi","zh-CN":"字体颜色","zh-TW":"字型色彩"}},Object_OrgChart_FreeMode:{id:"Object.OrgChart.FreeMode",locale:{"de-DE":"Erweitern/reduzieren","en-US":"Expand/collapse","es-ES":"Expandir/contraer","fr-FR":"Développer/Réduire","it-IT":"Espandi/comprimi","ja-JP":"展開/折りたたむ","ko-KR":"확장/축소","nl-NL":"Uitvouwen/alles samenvouwen","pl-PL":"Rozwiń/zwiń","pt-BR":"Expandir/recolher","ru-RU":"Развернуть/свернуть","sv-SE":"Visa/dölj","tr-TR":"Genişlet/daralt","zh-CN":"展开/折叠","zh-TW":"展開/摺疊"}},Object_OrgChart_IncludeDescendants:{id:"Object.OrgChart.IncludeDescendants",locale:{"de-DE":"Alle untergeordneten Elemente einschließen","en-US":"Include all children","es-ES":"Incluir todos los nodos secundarios","fr-FR":"Inclure tous les enfants","it-IT":"Includi tutti i nodi secondari","ja-JP":"すべての子を含める","ko-KR":"모든 자식을 포함합니다.","nl-NL":"Alle onderliggende elementen opnemen","pl-PL":"Uwzględniaj wszystkie elementy podrzędne","pt-BR":"Incluir todos os filhos","ru-RU":"Включить все дочерние элементы","sv-SE":"Inkludera alla underordnade","tr-TR":"Tüm alt öğeleri dahil edin","zh-CN":"包含所有子项","zh-TW":"包括所有子項"}},Object_OrgChart_LabelExpression:{id:"Object.OrgChart.LabelExpression",locale:{"de-DE":"Titel der Karte","en-US":"Card title","es-ES":"Título de tarjeta","fr-FR":"Titre de la carte","it-IT":"Titolo scheda","ja-JP":"カード タイトル","ko-KR":"카드 제목","nl-NL":"Titel kaart","pl-PL":"Tytuł karty","pt-BR":"Título do cartão","ru-RU":"Заголовок карточки","sv-SE":"Kortets rubrik","tr-TR":"Kart başlığı","zh-CN":"卡标题","zh-TW":"卡片標題"}},Object_OrgChart_MaxChildren:{id:"Object.OrgChart.MaxChildren",locale:{"de-DE":"Maximale Anzahl an untergeordneten Knoten erreicht, Knoten werden ausgelassen.","en-US":"Maximum number of child nodes reached, nodes are omitted.","es-ES":"Se alcanzó el número máximo de nodos secundarios, se omiten los nodos.","fr-FR":"Nombre maximal de nœuds enfants atteint. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: numero massimo di nodi secondari raggiunto.","ja-JP":"子ノードの最大数に達しました。ノードは省略されます。","ko-KR":"최대 자식 노드 수에 도달했습니다. 노드는 생략됩니다.","nl-NL":"Maximaal aantal onderliggende knooppunten bereikt, knooppunten worden weggelaten.","pl-PL":"Osiągnięto maksymalną liczbę węzłów podrzędnych, węzły są pomijane.","pt-BR":"Número máximo de nós filhos atingidos, os nós são omitidos.","ru-RU":"Достигнуто максимальное количество дочерних узлов, узлы опущены.","sv-SE":"Maximalt antal underordnade noder har uppnåtts. Noder utelämnas.","tr-TR":"Maksimum alt öğe düğüm sayısına ulaşıldı; düğümler atlandı.","zh-CN":"已达到子节点最大数目,将省略节点。","zh-TW":"已達子節點數量上限,已省略節點。"}},Object_OrgChart_MaxData:{id:"Object.OrgChart.MaxData",locale:{"de-DE":"Die Datenobergrenze ist erreicht. Die Struktur wird möglicherweise nicht korrekt dargestellt.","en-US":"The maximum data limit is reached. The tree may display incorrectly.","es-ES":"Se ha alcanzado el límite máximo de datos. Puede que el árbol se muestre incorrectamente.","fr-FR":"La limite de données maximale est atteinte. Il se peut que l'arborescence ne s'affiche pas correctement.","it-IT":"Limite massimo dati raggiunto. La visualizzazione del grafico potrebbe essere compromessa.","ja-JP":"最大データ制限に達しました。ツリーが正しく表示されない場合があります。","ko-KR":"최대 데이터 제한에 도달했습니다. 트리가 잘못 표시될 수 있습니다.","nl-NL":"Het maximale datalimiet is bereikt. De boom kan incorrect worden weergegeven.","pl-PL":"Osiągnięto maksymalny limit danych. Drzewo może wyświetlać się nieprawidłowo.","pt-BR":"O limite máximo de dados foi atingido. A árvore pode ser exibida incorretamente.","ru-RU":"Достигнут максимальный предел данных. Дерево может отображаться некорректно.","sv-SE":"Maxgränsen för data har nåtts. Trädet kanske inte visas på rätt sätt.","tr-TR":"Maksimum veri sınırına ulaşıldı. Ağaç grafik doğru görüntülenmeyebilir.","zh-CN":"已达到最大数据限制。树的显示可能不当。","zh-TW":"已達資料上限。樹狀目錄的顯示方式可能不正確。"}},Object_OrgChart_MissingRoot:{id:"Object.OrgChart.MissingRoot",locale:{"de-DE":"Kein Root-Knoten, prüfen Sie die Daten auf Zirkelbezüge.","en-US":"No root node, check data for circular references.","es-ES":"Sin nodo raíz, verifique los datos por si hay referencias circulares.","fr-FR":"Aucun nœud racine. Recherchez les références circulaires dans les données.","it-IT":"Impossibile utilizzare i nodi principali: verificare i riferimenti circolari.","ja-JP":"ルート ノードがありません。循環参照のデータを確認してください。","ko-KR":"루트 노드가 없습니다. 순환 참조에 대한 데이터를 확인하십시오.","nl-NL":"Geen hoofdknooppunt, controleer of de gegevens cirkelreferenties bevatten.","pl-PL":"Brak węzła głównego, sprawdź dane pod kątem odwołań cyklicznych.","pt-BR":"Nenhum nó raiz, verifique os dados para referências circulares.","ru-RU":"Нет корневых узлов, проверьте данные на предмет циклических ссылок.","sv-SE":"Ingen rotnod. Kontrollera om det finns cirkelreferenser i data.","tr-TR":"Kök düğümü yok, verileri döngüsel referanslar açısından kontrol edin.","zh-CN":"无根节点,请检查数据是否存在循环引用。","zh-TW":"沒有根節點,請檢查循環參照的資料。"}},Object_OrgChart_NavigationMode:{id:"Object.OrgChart.NavigationMode",locale:{"de-DE":"Präsentationsmodus","en-US":"Presentation mode","es-ES":"Modo presentación","fr-FR":"Mode présentation","it-IT":"Modalità presentazione","ja-JP":"プレゼンテーション モード","ko-KR":"프레젠테이션 모드","nl-NL":"Presentatiemodus","pl-PL":"Tryb prezentacji","pt-BR":"Modo de apresentação","ru-RU":"Режим представления","sv-SE":"Presentationsläge","tr-TR":"Sunum modu","zh-CN":"演示模式","zh-TW":"呈現模式"}},Object_OrgChart_SingleSelect:{id:"Object.OrgChart.SingleSelect",locale:{"de-DE":"Einzelnen Knoten auswählen","en-US":"Select single node","es-ES":"Seleccionar nodo único","fr-FR":"Sélectionner un seul nœud","it-IT":"Seleziona nodo singolo","ja-JP":"単一ノードを選択","ko-KR":"단일 노드 선택","nl-NL":"Enkel knooppunt selecteren","pl-PL":"Wybierz pojedynczy węzeł","pt-BR":"Selecionar nó único","ru-RU":"Выберите один узел","sv-SE":"Välj enskild nod","tr-TR":"Tek düğüm seç","zh-CN":"选择单个节点","zh-TW":"選取單一節點"}},Object_OrgChart_SubLabelExpression:{id:"Object.OrgChart.SubLabelExpression",locale:{"de-DE":"Untertitel der Karte","en-US":"Card sub-title","es-ES":"Subtítulo de tarjeta","fr-FR":"Sous-titre de la carte","it-IT":"Sottotitolo scheda","ja-JP":"カード サブタイトル","ko-KR":"카드 소제목","nl-NL":"Ondertitel kaart","pl-PL":"Podtytuł karty","pt-BR":"Subtítulo do cartão","ru-RU":"Подзаголовок карточки","sv-SE":"Kortets underrubrik","tr-TR":"Kart alt başlığı","zh-CN":"卡子标题","zh-TW":"卡片子標題"}},Object_OrgChart_TopBar:{id:"Object.OrgChart.TopBar",locale:{"de-DE":"Obere Leiste","en-US":"Top bar","es-ES":"Barra superior","fr-FR":"Barre supérieure","it-IT":"Barra superiore","ja-JP":"上部のバー","ko-KR":"상위 막대","nl-NL":"Bovenste balk","pl-PL":"Górny słupek","pt-BR":"Barra superior","ru-RU":"Верхняя полоса","sv-SE":"Övre fältet","tr-TR":"Üst çubuk","zh-CN":"顶部栏","zh-TW":"頂端列"}},Object_OrgChart_resizeOnExpand:{id:"Object.OrgChart.resizeOnExpand",locale:{"de-DE":"Beim Erweitern/Reduzieren Größe ändern","en-US":"Resize on expand/collapse","es-ES":"Cambiar el tamaño al expandir/contraer","fr-FR":"Redimensionner avec Développer/Réduire","it-IT":"Ridimensiona quando espandi/comprimi","ja-JP":"展開/折りたたみ時にサイズ変更","ko-KR":"확장/축소하여 크기 조정","nl-NL":"Formaat wijzigen bij uitvouwen/alles samenvouwen","pl-PL":"Zmień rozmiar przy rozwijaniu/zwijaniu","pt-BR":"Redimensionar em expandir/recolher","ru-RU":"Изменить размер при разворачивании/сворачивании","sv-SE":"Ändra storlek vid visa/dölj","tr-TR":"Genişletmede/daraltmada yeniden boyutlandır","zh-CN":"调整展开/折叠的大小","zh-TW":"調整展開/摺疊大小"}}};function Qt(t){if(t&&t.get&&t.add){const e="Object.OrgChart.MaxData";if(t.get(e)!==e)return;Object.keys(Jt).forEach(e=>{t.add(Jt[e])})}}const te={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:Dt.FONT_COLOR_TYPE,color:Dt.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:Dt.BACKGROUND_COLOR_TYPE,color:Dt.BACKGROUND_COLOR,colorExpression:""},border:{top:Dt.BORDER_TOP,fullBorder:Dt.BORDER_FULL,colorType:Dt.BORDER_COLOR_TYPE,color:Dt.BORDER_COLOR,colorExpression:""}},components:[]};var ee={value:()=>{}};function ne(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new re(r)}function re(t){this._=t}function oe(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function ae(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=ee,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}re.prototype=ne.prototype={constructor:re,on:function(t,e){var n,r,o=this._,a=(r=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),i=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<s;)if(n=(t=a[i]).type)o[n]=ae(o[n],t.name,e);else if(null==e)for(n in o)o[n]=ae(o[n],t.name,null);return this}for(;++i<s;)if((n=(t=a[i]).type)&&(n=oe(o[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new re(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,a=r.length;o<a;++o)r[o].value.apply(e,n)}};var ie="http://www.w3.org/1999/xhtml",se={svg:"http://www.w3.org/2000/svg",xhtml:ie,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function le(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),se.hasOwnProperty(e)?{space:se[e],local:t}:t}function ue(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ie&&e.documentElement.namespaceURI===ie?e.createElement(t):e.createElementNS(n,t)}}function ce(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function he(t){var e=le(t);return(e.local?ce:ue)(e)}function de(){}function pe(t){return null==t?de:function(){return this.querySelector(t)}}function fe(){return[]}function ge(t){return null==t?fe:function(){return this.querySelectorAll(t)}}function me(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function be(t){return function(){return this.matches(t)}}function ye(t){return function(e){return e.matches(t)}}var ve=Array.prototype.find;function xe(){return this.firstElementChild}var we=Array.prototype.filter;function _e(){return Array.from(this.children)}function Ce(t){return new Array(t.length)}function Ee(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ke(t,e,n,r,o,a){for(var i,s=0,l=e.length,u=a.length;s<u;++s)(i=e[s])?(i.__data__=a[s],r[s]=i):n[s]=new Ee(t,a[s]);for(;s<l;++s)(i=e[s])&&(o[s]=i)}function Oe(t,e,n,r,o,a,i){var s,l,u,c=new Map,h=e.length,d=a.length,p=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(p[s]=u=i.call(l,l.__data__,s,e)+"",c.has(u)?o[s]=l:c.set(u,l));for(s=0;s<d;++s)u=i.call(t,a[s],s,a)+"",(l=c.get(u))?(r[s]=l,l.__data__=a[s],c.delete(u)):n[s]=new Ee(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(p[s])===l&&(o[s]=l)}function Se(t){return t.__data__}function Le(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ne(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ze(t){return function(){this.removeAttribute(t)}}function Me(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Re(t,e){return function(){this.setAttribute(t,e)}}function Ae(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Te(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $e(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ie(t){return function(){this.style.removeProperty(t)}}function De(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Be(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Pe(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function qe(t){return function(){delete this[t]}}function Fe(t,e){return function(){this[t]=e}}function Ue(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ve(t){return t.trim().split(/^|\s+/)}function He(t){return t.classList||new Ke(t)}function Ke(t){this._node=t,this._names=Ve(t.getAttribute("class")||"")}function Ze(t,e){for(var n=He(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function We(t,e){for(var n=He(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Ge(t){return function(){Ze(this,t)}}function Xe(t){return function(){We(this,t)}}function Ye(t,e){return function(){(e.apply(this,arguments)?Ze:We)(this,t)}}function Je(){this.textContent=""}function Qe(t){return function(){this.textContent=t}}function tn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function en(){this.innerHTML=""}function nn(t){return function(){this.innerHTML=t}}function rn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function on(){this.nextSibling&&this.parentNode.appendChild(this)}function an(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sn(){return null}function ln(){var t=this.parentNode;t&&t.removeChild(this)}function un(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function hn(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function dn(t,e,n){return function(){var r,o=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},o?o.push(r):this.__on=[r]}}function pn(t,e,n){var r=je(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function fn(t,e){return function(){return pn(this,t,e)}}function gn(t,e){return function(){return pn(this,t,e.apply(this,arguments))}}Ee.prototype={constructor:Ee,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ke.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var mn=[null];function bn(t,e){this._groups=t,this._parents=e}function yn(){return new bn([[document.documentElement]],mn)}function vn(t){return"string"==typeof t?new bn([[document.querySelector(t)]],[document.documentElement]):new bn([[t]],mn)}bn.prototype=yn.prototype={constructor:bn,select:function(t){"function"!=typeof t&&(t=pe(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var a,i,s=e[o],l=s.length,u=r[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(i=t.call(a,a.__data__,c,s))&&("__data__"in a&&(i.__data__=a.__data__),u[c]=i);return new bn(r,this._parents)},selectAll:function(t){t="function"==typeof t?me(t):ge(t);for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var i,s=e[a],l=s.length,u=0;u<l;++u)(i=s[u])&&(r.push(t.call(i,i.__data__,u,s)),o.push(i));return new bn(r,o)},selectChild:function(t){return this.select(null==t?xe:function(t){return function(){return ve.call(this.children,t)}}("function"==typeof t?t:ye(t)))},selectChildren:function(t){return this.selectAll(null==t?_e:function(t){return function(){return we.call(this.children,t)}}("function"==typeof t?t:ye(t)))},filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var a,i=e[o],s=i.length,l=r[o]=[],u=0;u<s;++u)(a=i[u])&&t.call(a,a.__data__,u,i)&&l.push(a);return new bn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Se);var n,r=e?Oe:ke,o=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var i=a.length,s=new Array(i),l=new Array(i),u=new Array(i),c=0;c<i;++c){var h=o[c],d=a[c],p=d.length,f=Le(t.call(h,h&&h.__data__,c,o)),g=f.length,m=l[c]=new Array(g),b=s[c]=new Array(g);r(h,d,m,b,u[c]=new Array(p),f,e);for(var y,v,x=0,w=0;x<g;++x)if(y=m[x]){for(x>=w&&(w=x+1);!(v=b[w])&&++w<g;);y._next=v||null}}return(s=new bn(s,o))._enter=l,s._exit=u,s},enter:function(){return new bn(this._enter||this._groups.map(Ce),this._parents)},exit:function(){return new bn(this._exit||this._groups.map(Ce),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var u,c=n[l],h=r[l],d=c.length,p=s[l]=new Array(d),f=0;f<d;++f)(u=c[f]||h[f])&&(p[f]=u);for(;l<o;++l)s[l]=n[l];return new bn(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ne);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,s=n[a],l=s.length,u=o[a]=new Array(l),c=0;c<l;++c)(i=s[c])&&(u[c]=i);u.sort(e)}return new bn(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,a=e[n],i=0,s=a.length;i<s;++i)(o=a[i])&&t.call(o,o.__data__,i,a);return this},attr:function(t,e){var n=le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Me:ze:"function"==typeof e?n.local?$e:Te:n.local?Ae:Re)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ie:"function"==typeof e?Be:De)(t,e,null==n?"":n)):Pe(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?qe:"function"==typeof e?Ue:Fe)(t,e)):this.node()[t]},classed:function(t,e){var n=Ve(t+"");if(arguments.length<2){for(var r=He(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?Ye:e?Ge:Xe)(n,e))},text:function(t){return arguments.length?this.each(null==t?Je:("function"==typeof t?tn:Qe)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?en:("function"==typeof t?rn:nn)(t)):this.node().innerHTML},raise:function(){return this.each(on)},lower:function(){return this.each(an)},append:function(t){var e="function"==typeof t?t:he(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:he(t),r=null==e?sn:"function"==typeof e?e:pe(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(ln)},clone:function(t){return this.select(t?cn:un)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),i=a.length;if(!(arguments.length<2)){for(s=e?dn:hn,r=0;r<i;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<i;++r)if((o=a[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?gn:fn)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,o=t[e],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};var xn=0;function wn(){this._="@"+(++xn).toString(36)}function _n(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}wn.prototype={constructor:wn,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Cn={capture:!0,passive:!1};function En(t){t.preventDefault(),t.stopImmediatePropagation()}function kn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function On(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Sn(){}var Ln=.7,Nn=1/Ln,zn="\\s*([+-]?\\d+)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",An=/^#([0-9a-f]{3,8})$/,Tn=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),$n=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),jn=new RegExp(`^rgba\\(${zn},${zn},${zn},${Mn}\\)$`),In=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${Mn}\\)$`),Dn=new RegExp(`^hsl\\(${Mn},${Rn},${Rn}\\)$`),Bn=new RegExp(`^hsla\\(${Mn},${Rn},${Rn},${Mn}\\)$`),Pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function qn(){return this.rgb().formatHex()}function Fn(){return this.rgb().formatRgb()}function Un(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=An.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Vn(e):3===n?new Wn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Hn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Hn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Tn.exec(t))?new Wn(e[1],e[2],e[3],1):(e=$n.exec(t))?new Wn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=jn.exec(t))?Hn(e[1],e[2],e[3],e[4]):(e=In.exec(t))?Hn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Dn.exec(t))?tr(e[1],e[2]/100,e[3]/100,1):(e=Bn.exec(t))?tr(e[1],e[2]/100,e[3]/100,e[4]):Pn.hasOwnProperty(t)?Vn(Pn[t]):"transparent"===t?new Wn(NaN,NaN,NaN,0):null}function Vn(t){return new Wn(t>>16&255,t>>8&255,255&t,1)}function Hn(t,e,n,r){return r<=0&&(t=e=n=NaN),new Wn(t,e,n,r)}function Kn(t){return t instanceof Sn||(t=Un(t)),t?new Wn((t=t.rgb()).r,t.g,t.b,t.opacity):new Wn}function Zn(t,e,n,r){return 1===arguments.length?Kn(t):new Wn(t,e,n,null==r?1:r)}function Wn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Gn(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}`}function Xn(){const t=Yn(this.opacity);return`${1===t?"rgb(":"rgba("}${Jn(this.r)}, ${Jn(this.g)}, ${Jn(this.b)}${1===t?")":`, ${t})`}`}function Yn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Jn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qn(t){return((t=Jn(t))<16?"0":"")+t.toString(16)}function tr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new nr(t,e,n,r)}function er(t){if(t instanceof nr)return new nr(t.h,t.s,t.l,t.opacity);if(t instanceof Sn||(t=Un(t)),!t)return new nr;if(t instanceof nr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),a=Math.max(e,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new nr(i,s,l,t.opacity)}function nr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rr(t){return(t=(t||0)%360)<0?t+360:t}function or(t){return Math.max(0,Math.min(1,t||0))}function ar(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}kn(Sn,Un,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:qn,formatHex:qn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return er(this).formatHsl()},formatRgb:Fn,toString:Fn}),kn(Wn,Zn,On(Sn,{brighter(t){return t=null==t?Nn:Math.pow(Nn,t),new Wn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ln:Math.pow(Ln,t),new Wn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Wn(Jn(this.r),Jn(this.g),Jn(this.b),Yn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Gn,formatHex:Gn,formatHex8:function(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}${Qn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xn,toString:Xn})),kn(nr,function(t,e,n,r){return 1===arguments.length?er(t):new nr(t,e,n,null==r?1:r)},On(Sn,{brighter(t){return t=null==t?Nn:Math.pow(Nn,t),new nr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ln:Math.pow(Ln,t),new nr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Wn(ar(t>=240?t-240:t+120,o,r),ar(t,o,r),ar(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new nr(rr(this.h),or(this.s),or(this.l),Yn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Yn(this.opacity);return`${1===t?"hsl(":"hsla("}${rr(this.h)}, ${100*or(this.s)}%, ${100*or(this.l)}%${1===t?")":`, ${t})`}`}}));const ir=Math.PI/180,sr=180/Math.PI,lr=.96422,ur=.82521,cr=4/29,hr=6/29,dr=3*hr*hr,pr=hr*hr*hr;function fr(t){if(t instanceof gr)return new gr(t.l,t.a,t.b,t.opacity);if(t instanceof xr)return wr(t);t instanceof Wn||(t=Kn(t));var e,n,r=vr(t.r),o=vr(t.g),a=vr(t.b),i=mr((.2225045*r+.7168786*o+.0606169*a)/1);return r===o&&o===a?e=n=i:(e=mr((.4360747*r+.3850649*o+.1430804*a)/lr),n=mr((.0139322*r+.0971045*o+.7141733*a)/ur)),new gr(116*i-16,500*(e-i),200*(i-n),t.opacity)}function gr(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function mr(t){return t>pr?Math.pow(t,1/3):t/dr+cr}function br(t){return t>hr?t*t*t:dr*(t-cr)}function yr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function wr(t){if(isNaN(t.h))return new gr(t.l,0,0,t.opacity);var e=t.h*ir;return new gr(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}kn(gr,function(t,e,n,r){return 1===arguments.length?fr(t):new gr(t,e,n,null==r?1:r)},On(Sn,{brighter(t){return new gr(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new gr(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Wn(yr(3.1338561*(e=lr*br(e))-1.6168667*(t=1*br(t))-.4906146*(n=ur*br(n))),yr(-.9787684*e+1.9161415*t+.033454*n),yr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),kn(xr,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof xr)return new xr(t.h,t.c,t.l,t.opacity);if(t instanceof gr||(t=fr(t)),0===t.a&&0===t.b)return new xr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*sr;return new xr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new xr(t,e,n,null==r?1:r)},On(Sn,{brighter(t){return new xr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new xr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return wr(this).rgb()}}));var _r=-.14861,Cr=1.78277,Er=-.29227,kr=-.90649,Or=1.97294,Sr=Or*kr,Lr=Or*Cr,Nr=Cr*Er-kr*_r;function zr(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Mr)return new Mr(t.h,t.s,t.l,t.opacity);t instanceof Wn||(t=Kn(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Nr*r+Sr*e-Lr*n)/(Nr+Sr-Lr),a=r-o,i=(Or*(n-o)-Er*a)/kr,s=Math.sqrt(i*i+a*a)/(Or*o*(1-o)),l=s?Math.atan2(i,a)*sr-120:NaN;return new Mr(l<0?l+360:l,s,o,t.opacity)}(t):new Mr(t,e,n,null==r?1:r)}function Mr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}kn(Mr,zr,On(Sn,{brighter(t){return t=null==t?Nn:Math.pow(Nn,t),new Mr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ln:Math.pow(Ln,t),new Mr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ir,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Wn(255*(e+n*(_r*r+Cr*o)),255*(e+n*(Er*r+kr*o)),255*(e+n*(Or*r)),this.opacity)}}));var Rr=t=>()=>t;function Ar(t,e){return function(n){return t+n*e}}function Tr(t){return 1===(t=+t)?$r:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Rr(isNaN(e)?n:e)}}function $r(t,e){var n=e-t;return n?Ar(t,n):Rr(isNaN(t)?e:t)}var jr=function t(e){var n=Tr(e);function r(t,e){var r=n((t=Zn(t)).r,(e=Zn(e)).r),o=n(t.g,e.g),a=n(t.b,e.b),i=$r(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=a(e),t.opacity=i(e),t+""}}return r.gamma=t,r}(1);function Ir(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Dr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Br=new RegExp(Dr.source,"g");function Pr(t,e){var n,r,o,a=Dr.lastIndex=Br.lastIndex=0,i=-1,s=[],l=[];for(t+="",e+="";(n=Dr.exec(t))&&(r=Br.exec(e));)(o=r.index)>a&&(o=e.slice(a,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:Ir(n,r)})),a=Br.lastIndex;return a<e.length&&(o=e.slice(a),s[i]?s[i]+=o:s[++i]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}var qr,Fr=180/Math.PI,Ur={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Vr(t,e,n,r,o,a){var i,s,l;return(i=Math.sqrt(t*t+e*e))&&(t/=i,e/=i),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*Fr,skewX:Math.atan(l)*Fr,scaleX:i,scaleY:s}}function Hr(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(a,i){var s=[],l=[];return a=t(a),i=t(i),function(t,r,o,a,i,s){if(t!==o||r!==a){var l=i.push("translate(",null,e,null,n);s.push({i:l-4,x:Ir(t,o)},{i:l-2,x:Ir(r,a)})}else(o||a)&&i.push("translate("+o+e+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,s,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Ir(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(a.rotate,i.rotate,s,l),function(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Ir(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(a.skewX,i.skewX,s,l),function(t,e,n,r,a,i){if(t!==n||e!==r){var s=a.push(o(a)+"scale(",null,",",null,")");i.push({i:s-4,x:Ir(t,n)},{i:s-2,x:Ir(e,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,s,l),a=i=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Kr=Hr(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ur:Vr(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Zr=Hr(function(t){return null==t?Ur:(qr||(qr=document.createElementNS("http://www.w3.org/2000/svg","g")),qr.setAttribute("transform",t),(t=qr.transform.baseVal.consolidate())?Vr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ur)},", ",")",")");function Wr(t){return((t=Math.exp(t))+1/t)/2}var Gr=function t(e,n,r){function o(t,o){var a,i,s=t[0],l=t[1],u=t[2],c=o[0],h=o[1],d=o[2],p=c-s,f=h-l,g=p*p+f*f;if(g<1e-12)i=Math.log(d/u)/e,a=function(t){return[s+t*p,l+t*f,u*Math.exp(e*t*i)]};else{var m=Math.sqrt(g),b=(d*d-u*u+r*g)/(2*u*n*m),y=(d*d-u*u-r*g)/(2*d*n*m),v=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(y*y+1)-y);i=(x-v)/e,a=function(t){var r,o=t*i,a=Wr(v),c=u/(n*m)*(a*(r=e*o+v,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[s+c*p,l+c*f,u*a/Wr(e*o+v)]}}return a.duration=1e3*Math.abs(i)*e/Math.SQRT2,a}return o.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},o}(Math.SQRT2,2,4);function Xr(t){return function e(n){function r(e,r){var o=t((e=zr(e)).h,(r=zr(r)).h),a=$r(e.s,r.s),i=$r(e.l,r.l),s=$r(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=a(t),e.l=i(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}Xr(function(t,e){var n=e-t;return n?Ar(t,n>180||n<-180?n-360*Math.round(n/360):n):Rr(isNaN(t)?e:t)}),Xr($r);var Yr,Jr,Qr=0,to=0,eo=0,no=0,ro=0,oo=0,ao="object"==typeof performance&&performance.now?performance:Date,io="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function so(){return ro||(io(lo),ro=ao.now()+oo)}function lo(){ro=0}function uo(){this._call=this._time=this._next=null}function co(t,e,n){var r=new uo;return r.restart(t,e,n),r}function ho(){ro=(no=ao.now())+oo,Qr=to=0;try{!function(){so(),++Qr;for(var t,e=Yr;e;)(t=ro-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qr}()}finally{Qr=0,function(){var t,e,n=Yr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Yr=e);Jr=t,fo(r)}(),ro=0}}function po(){var t=ao.now(),e=t-no;e>1e3&&(oo-=e,no=t)}function fo(t){Qr||(to&&(to=clearTimeout(to)),t-ro>24?(t<1/0&&(to=setTimeout(ho,Math.ceil(t-ao.now()-oo)+1)),eo&&(eo=clearInterval(eo))):(eo||(no=ao.now(),eo=setInterval(po,1e3)),Qr=1,io(ho)))}function go(t,e,n){var r=new uo;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}uo.prototype=co.prototype={constructor:uo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?so():+n)+(null==e?0:+e),this._next||Jr===this||(Jr?Jr._next=this:Yr=this,Jr=this),this._call=t,this._time=n,fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,fo())}};function mo(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}!function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3);var bo=1.70158;!function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(bo),function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(bo),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(bo);var yo=2*Math.PI;!function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=yo);function o(t){return e*mo(- --t)*Math.sin((r-t)/n)}return o.amplitude=function(e){return t(e,n*yo)},o.period=function(n){return t(e,n)},o}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=yo);function o(t){return 1-e*mo(t=+t)*Math.sin((t+r)/n)}return o.amplitude=function(e){return t(e,n*yo)},o.period=function(n){return t(e,n)},o}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=yo);function o(t){return((t=2*t-1)<0?e*mo(-t)*Math.sin((r-t)/n):2-e*mo(t)*Math.sin((r+t)/n))/2}return o.amplitude=function(e){return t(e,n*yo)},o.period=function(n){return t(e,n)},o}(1,.3);var vo=ne("start","end","cancel","interrupt"),xo=[];function wo(t,e,n,r,o,a){var i=t.__transition;if(i){if(n in i)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function a(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}function i(a){var u,c,h,d;if(1!==n.state)return l();for(u in o)if((d=o[u]).name===n.name){if(3===d.state)return go(i);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[u]):+u<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete o[u])}if(go(function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function s(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=co(a,0,n.time)}(t,n,{name:e,index:r,group:o,on:vo,tween:xo,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function _o(t,e){var n=Eo(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Co(t,e){var n=Eo(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Eo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ko(t,e){var n,r,o,a=t.__transition,i=!0;if(a){for(o in e=null==e?null:e+"",a)(n=a[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete t.__transition}}function Oo(t,e){var n,r;return function(){var o=Co(this,t),a=o.tween;if(a!==n)for(var i=0,s=(r=n=a).length;i<s;++i)if(r[i].name===e){(r=r.slice()).splice(i,1);break}o.tween=r}}function So(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=Co(this,t),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:e,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===e){o[l]=s;break}l===u&&o.push(s)}a.tween=o}}function Lo(t,e,n){var r=t._id;return t.each(function(){var t=Co(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Eo(t,r).value[e]}}function No(t,e){var n;return("number"==typeof e?Ir:e instanceof Un?jr:(n=Un(e))?(e=n,jr):Pr)(t,e)}function zo(t){return function(){this.removeAttribute(t)}}function Mo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ro(t,e,n){var r,o,a=n+"";return function(){var i=this.getAttribute(t);return i===a?null:i===r?o:o=e(r=i,n)}}function Ao(t,e,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(t.space,t.local);return i===a?null:i===r?o:o=e(r=i,n)}}function To(t,e,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttribute(t))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=e(r=i,l));this.removeAttribute(t)}}function $o(t,e,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=e(r=i,l));this.removeAttributeNS(t.space,t.local)}}function jo(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function Io(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function Do(t,e){return function(){_o(this,t).delay=+e.apply(this,arguments)}}function Bo(t,e){return e=+e,function(){_o(this,t).delay=e}}function Po(t,e){return function(){Co(this,t).duration=+e.apply(this,arguments)}}function qo(t,e){return e=+e,function(){Co(this,t).duration=e}}var Fo=yn.prototype.constructor;function Uo(t){return function(){this.style.removeProperty(t)}}var Vo=0;function Ho(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ko(){return++Vo}var Zo=yn.prototype;Ho.prototype={constructor:Ho,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pe(t));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s,l,u=r[i],c=u.length,h=a[i]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,wo(h[d],e,n,d,h,Eo(s,n)));return new Ho(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ge(t));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,p=t.call(l,l.__data__,h,u),f=Eo(l,n),g=0,m=p.length;g<m;++g)(d=p[g])&&wo(d,e,n,g,p,f);a.push(p),i.push(l)}return new Ho(a,i,e,n)},selectChild:Zo.selectChild,selectChildren:Zo.selectChildren,filter:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var a,i=e[o],s=i.length,l=r[o]=[],u=0;u<s;++u)(a=i[u])&&t.call(a,a.__data__,u,i)&&l.push(a);return new Ho(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l,u=e[s],c=n[s],h=u.length,d=i[s]=new Array(h),p=0;p<h;++p)(l=u[p]||c[p])&&(d[p]=l);for(;s<r;++s)i[s]=e[s];return new Ho(i,this._parents,this._name,this._id)},selection:function(){return new Fo(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ko(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,u=0;u<l;++u)if(i=s[u]){var c=Eo(i,e);wo(i,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ho(r,this._parents,t,n)},call:Zo.call,nodes:Zo.nodes,node:Zo.node,size:Zo.size,empty:Zo.empty,each:Zo.each,on:function(t,e){var n=this._id;return arguments.length<2?Eo(this.node(),n).on.on(t):this.each(function(t,e,n){var r,o,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?_o:Co;return function(){var i=a(this,t),s=i.on;s!==r&&(o=(r=s).copy()).on(e,n),i.on=o}}(n,t,e))},attr:function(t,e){var n=le(t),r="transform"===n?Zr:No;return this.attrTween(t,"function"==typeof e?(n.local?$o:To)(n,r,Lo(this,"attr."+t,e)):null==e?(n.local?Mo:zo)(n):(n.local?Ao:Ro)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=le(t);return this.tween(n,(r.local?jo:Io)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Kr:No;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var a=Pe(this,t),i=(this.style.removeProperty(t),Pe(this,t));return a===i?null:a===n&&i===r?o:o=e(n=a,r=i)}}(t,r)).on("end.style."+t,Uo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,a;return function(){var i=Pe(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Pe(this,t)),i===l?null:i===r&&l===o?a:(o=l,a=e(r=i,s))}}(t,r,Lo(this,"style."+t,e))).each(function(t,e){var n,r,o,a,i="style."+e,s="end."+i;return function(){var l=Co(this,t),u=l.on,c=null==l.value[i]?a||(a=Uo(e)):void 0;u===n&&o===c||(r=(n=u).copy()).on(s,o=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,a=n+"";return function(){var i=Pe(this,t);return i===a?null:i===r?o:o=e(r=i,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,o;function a(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Lo(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=Eo(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===t)return r.value;return null}return this.each((null==e?Oo:So)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Do:Bo)(e,t)):Eo(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Po:qo)(e,t)):Eo(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Co(this,t).ease=e}}(e,t)):Eo(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Co(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){0===--o&&a()}};n.each(function(){var n=Co(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}),0===o&&a()})},[Symbol.iterator]:Zo[Symbol.iterator]};var Wo={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Go(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Xo(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Yo(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Qo)):void 0===e&&(e=Jo);for(var n,r,o,a,i,s=new na(t),l=[s];n=l.pop();)if((o=e(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)l.push(r=o[a]=new na(o[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(ea)}function Jo(t){return t.children}function Qo(t){return Array.isArray(t)?t[1]:null}function ta(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function ea(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function na(t){this.data=t,this.depth=this.height=0,this.parent=null}function ra(t,e,n,r,o){for(var a,i=t.children,s=-1,l=i.length,u=t.value&&(r-e)/t.value;++s<l;)(a=i[s]).y0=n,a.y1=o,a.x0=e,a.x1=e+=a.value*u}function oa(t,e){return t.parent===e.parent?1:2}function aa(t){var e=t.children;return e?e[0]:t.t}function ia(t){var e=t.children;return e?e[e.length-1]:t.t}function sa(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function la(t,e,n){return t.a.parent===e.parent?t.a:n}function ua(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function ca(){var t=oa,e=1,n=1,r=null;function o(o){var l=function(t){for(var e,n,r,o,a,i=new ua(t,0),s=[i];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),o=a-1;o>=0;--o)s.push(n=e.children[o]=new ua(r[o],o)),n.parent=e;return(i.parent=new ua(null,0)).children=[i],i}(o);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(i),r)o.eachBefore(s);else{var u=o,c=o,h=o;o.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)});var d=u===c?1:t(u,c)/2,p=d-u.x,f=e/(c.x+d+p),g=n/(h.depth||1);o.eachBefore(function(t){t.x=(t.x+p)*f,t.y=t.depth*g})}return o}function a(e){var n=e.children,r=e.parent.children,o=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,o=t.children,a=o.length;--a>=0;)(e=o[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;o?(e.z=o.z+t(e._,o._),e.m=e.z-a):e.z=a}else o&&(e.z=o.z+t(e._,o._));e.parent.A=function(e,n,r){if(n){for(var o,a=e,i=e,s=n,l=a.parent.children[0],u=a.m,c=i.m,h=s.m,d=l.m;s=ia(s),a=aa(a),s&&a;)l=aa(l),(i=ia(i)).a=e,(o=s.z+h-a.z-u+t(s._,a._))>0&&(sa(la(s,e,r),e,o),u+=o,c+=o),h+=s.m,u+=a.m,d+=l.m,c+=i.m;s&&!ia(i)&&(i.t=s,i.m+=h-c),a&&!aa(l)&&(l.t=a,l.m+=u-d,r=e)}return r}(e,o,e.parent.A||r[0])}function i(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return o.separation=function(e){return arguments.length?(t=e,o):t},o.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],o):r?null:[e,n]},o.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],o):r?[e,n]:null},o}function ha(t,e,n,r,o){for(var a,i=t.children,s=-1,l=i.length,u=t.value&&(o-n)/t.value;++s<l;)(a=i[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}yn.prototype.interrupt=function(t){return this.each(function(){ko(this,t)})},yn.prototype.transition=function(t){var e,n;t instanceof Ho?(e=t._id,t=t._name):(e=Ko(),(n=Wo).time=so(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,u=0;u<l;++u)(i=s[u])&&wo(i,t,e,u,s,n||Go(i,e));return new Ho(r,this._parents,t,e)},na.prototype=Yo.prototype={constructor:na,count:function(){return this.eachAfter(Xo)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,a=this,i=[a],s=[],l=-1;a=i.pop();)if(s.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(t.call(e,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;t=n.pop(),e=r.pop();for(;t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return Yo(this).eachBefore(ta)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)a.push(e[n])}while(a.length)}},ua.prototype=Object.create(na.prototype);var da=(1+Math.sqrt(5))/2;function pa(t,e,n,r,o,a){for(var i,s,l,u,c,h,d,p,f,g,m,b=[],y=e.children,v=0,x=0,w=y.length,_=e.value;v<w;){l=o-n,u=a-r;do{c=y[x++].value}while(!c&&x<w);for(h=d=c,m=c*c*(g=Math.max(u/l,l/u)/(_*t)),f=Math.max(d/m,m/h);x<w;++x){if(c+=s=y[x].value,s<h&&(h=s),s>d&&(d=s),m=c*c*g,(p=Math.max(d/m,m/h))>f){c-=s;break}f=p}b.push(i={value:c,dice:l<u,children:y.slice(v,x)}),i.dice?ra(i,n,r,o,_?r+=u*c/_:a):ha(i,n,r,_?n+=l*c/_:o,a),_-=c,v=x}return b}!function t(e){function n(t,n,r,o,a){pa(e,t,n,r,o,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(da),function t(e){function n(t,n,r,o,a){if((i=t._squarify)&&i.ratio===e)for(var i,s,l,u,c,h=-1,d=i.length,p=t.value;++h<d;){for(l=(s=i[h]).children,u=s.value=0,c=l.length;u<c;++u)s.value+=l[u].value;s.dice?ra(s,n,r,o,p?r+=(a-r)*s.value/p:a):ha(s,n,r,p?n+=(o-n)*s.value/p:o,a),p-=s.value}else t._squarify=i=pa(e,t,n,r,o,a),i.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(da);var fa=t=>()=>t;function ga(t,{sourceEvent:e,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function ma(t,e,n){this.k=t,this.x=e,this.y=n}ma.prototype={constructor:ma,scale:function(t){return 1===t?this:new ma(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ma(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ba=new ma(1,0,0);function ya(t){t.stopImmediatePropagation()}function va(t){t.preventDefault(),t.stopImmediatePropagation()}function xa(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function wa(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function _a(){return this.__zoom||ba}function Ca(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Ea(){return navigator.maxTouchPoints||"ontouchstart"in this}function ka(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],i=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function Oa(){var t,e,n,r=xa,o=wa,a=ka,i=Ca,s=Ea,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,h=Gr,d=ne("start","zoom","end"),p=0,f=10;function g(t){t.property("__zoom",_a).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",k).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new ma(e,t.x,t.y)}function b(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new ma(t.k,r,o)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n,r){t.on("start.zoom",function(){x(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(r).end()}).tween("zoom",function(){var t=this,a=arguments,i=x(t,a).event(r),s=o.apply(t,a),l=null==n?y(s):"function"==typeof n?n.apply(t,a):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,d="function"==typeof e?e.apply(t,a):e,p=h(c.invert(l).concat(u/c.k),d.invert(l).concat(u/d.k));return function(t){if(1===t)t=d;else{var e=p(t),n=u/e[2];t=new ma(n,l[0]-e[0]*n,l[1]-e[1]*n)}i.zoom(null,t)}})}function x(t,e,n){return!n&&t.__zooming||new w(t,e)}function w(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function _(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,i.apply(this,arguments)))),c=_n(t);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=o.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[c,o.invert(c)],ko(this),n.start()}va(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(b(m(o,s),n.mouse[0],n.mouse[1]),n.extent,u))}}function C(t,...e){if(!n&&r.apply(this,arguments)){var o=t.currentTarget,i=x(this,e,!0).event(t),s=vn(t.view).on("mousemove.zoom",function(t){if(va(t),!i.moved){var e=t.clientX-c,n=t.clientY-h;i.moved=e*e+n*n>p}i.event(t).zoom("mouse",a(b(i.that.__zoom,i.mouse[0]=_n(t,o),i.mouse[1]),i.extent,u))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=vn(t).on("dragstart.drag",null);e&&(r.on("click.drag",En,Cn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,i.moved),va(t),i.event(t).end()},!0),l=_n(t,o),c=t.clientX,h=t.clientY;!function(t){var e=t.document.documentElement,n=vn(t).on("dragstart.drag",En,Cn);"onselectstart"in e?n.on("selectstart.drag",En,Cn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),ya(t),i.mouse=[l,this.__zoom.invert(l)],ko(this),i.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,i=_n(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(i),l=n.k*(t.shiftKey?.5:2),h=a(b(m(n,l),i,s),o.apply(this,e),u);va(t),c>0?vn(this).transition().duration(c).call(v,h,i,t):vn(this).call(g.transform,h,i,t)}}function k(n,...o){if(r.apply(this,arguments)){var a,i,s,l,u=n.touches,c=u.length,h=x(this,o,n.changedTouches.length===c).event(n);for(ya(n),i=0;i<c;++i)l=[l=_n(s=u[i],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,a=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(h.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),ko(this),h.start())}}function O(t,...e){if(this.__zooming){var n,r,o,i,s=x(this,e).event(t),l=t.changedTouches,c=l.length;for(va(t),n=0;n<c;++n)o=_n(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],p=s.touch1[0],f=s.touch1[1],g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g,y=(y=f[0]-d[0])*y+(y=f[1]-d[1])*y;r=m(r,Math.sqrt(g/y)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],i=[(d[0]+f[0])/2,(d[1]+f[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],i=s.touch0[1]}s.zoom("touch",a(b(r,o,i),s.extent,u))}}function S(t,...r){if(this.__zooming){var o,a,i=x(this,r).event(t),s=t.changedTouches,l=s.length;for(ya(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),o=0;o<l;++o)a=s[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=_n(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<f)){var u=vn(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return g.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",_a),t!==o?v(t,e,n,r):o.interrupt().each(function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},g.scaleBy=function(t,e,n,r){g.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},n,r)},g.scaleTo=function(t,e,n,r){g.transform(t,function(){var t=o.apply(this,arguments),r=this.__zoom,i=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(i),l="function"==typeof e?e.apply(this,arguments):e;return a(b(m(r,l),i,s),t,u)},n,r)},g.translateBy=function(t,e,n,r){g.transform(t,function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)},null,r)},g.translateTo=function(t,e,n,r,i){g.transform(t,function(){var t=o.apply(this,arguments),i=this.__zoom,s=null==r?y(t):"function"==typeof r?r.apply(this,arguments):r;return a(ba.translate(s[0],s[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)},r,i)},w.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=vn(this.that).datum();d.call(t,this.that,new ga(t,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:d}),e)}},g.wheelDelta=function(t){return arguments.length?(i="function"==typeof t?t:fa(+t),g):i},g.filter=function(t){return arguments.length?(r="function"==typeof t?t:fa(!!t),g):r},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:fa(!!t),g):s},g.extent=function(t){return arguments.length?(o="function"==typeof t?t:fa([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):o},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],g):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(c=+t,g):c},g.interpolate=function(t){return arguments.length?(h=t,g):h},g.on=function(){var t=d.on.apply(d,arguments);return t===d?g:t},g.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,g):Math.sqrt(p)},g.tapDistance=function(t){return arguments.length?(f=+t,g):f},g}ma.prototype;const Sa=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,La=5e6,Na=5e5;const za={fromSearchString:function(t){if(!t)return[];"?"===t[0]&&(t=t.substr(1));const e=[];return t.split("&").forEach(t=>{if(!t)return;const n=t.indexOf("=");let r,o="",a=!1;-1===n?r=t:(r=t.slice(0,n),o=t.slice(n+1),a=!0),e.push(function(t,e,n){return{key:Ma(t),value:Ma(e.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,a))}),e}};function Ma(t){try{return decodeURIComponent(t)}catch{return t}}function Ra(t){if(!(this instanceof Ra))throw new Error("Url needs to be called with the new keyword");if(!t)throw new Error("Url needs a string to operate on");const e=function(t){const e={authorityAndPath:"",search:"",hash:""};let n=t.indexOf("#");-1!==n&&(e.hash=t.substr(n),t=t.substr(0,n));n=t.indexOf("?"),-1!==n&&(e.search=t.substr(n),t=t.substr(0,n));return e.authorityAndPath=t,e}(t);Object.defineProperties(this,{authorityAndPath:{value:e.authorityAndPath},search:{value:e.search},hash:{value:e.hash},searchParams:{get:()=>za.fromSearchString(e.search)}})}function Aa(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}Ra.encodeAuthorityAndPath=function(t){return encodeURI(t).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Ra.encodeSearchParams=function(t){let e,n="";for(let r=0;r<t.length;r++)e=t[r],n+=0===r?"?":"&",n+=Aa(e.key),e.value?n+=`=${Aa(e.value)}`:n+=e.useEqualSign?"=":"";return n};var Ta=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(t){this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(t){this._pushback=t}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const t=this._pushback;return this._pushback=null,t}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const t=this.next();return null==t?null:t.match(/[0-9A-Fa-f]/)?t:null}peek(t){return t?!(!this._pushback||this._pushback!==t)||!!this._hasNext()&&this._input.charAt(this._index)===t:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let t=this._input.substr(this._index);return null!=this._pushback&&(t=this._pushback+t),t}},$a=class{decode(t){let e="";const n=new Ta(t);let r;for(;n.hasNext();)r=this.decodeCharacter(n),e+=null!=r?r:n.next();return e}decodeCharacter(t){return t.next()}};const ja=t=>t>=0&&t<=1114111,Ia=t=>t.match(/[\s]/);var Da=class extends $a{decodeCharacter(t){t.mark();const e=t.next();let n,r,o;if(null==e||"\\"!==e)return t.reset(),null;const a=t.next();if(null==a)return t.reset(),null;switch(a){case"\r":t.peek("\n")&&t.next();case"\n":case"\f":case"\0":return this.decodeCharacter(t)}if("NaN"===parseInt(a,16))return a;for(n=a,r=0;r<5&&(o=t.next(),null!=o&&!Ia(o));r++){if("NaN"===parseInt(o,16)){t.pushback(o);break}n+=o}const i=parseInt(n,16);return ja(i)?String.fromCharCode(i):"�"}},Ba=class t{constructor(t,e){this._key=t,this._value=e}getKey(){return this._key}getValue(){return this._value}equals(e){return e instanceof t&&(this._key===e._key&&this._value===e._value)}static newInstanceIfNeeded(){let e,n,r=arguments[0];return"string"==typeof arguments[1]?(e=arguments[1],n=r.length):(n=arguments[1],e=arguments[2]),e&&r?(r.length>n&&(r=r.substr(0,n)),new t(r,e)):null}},Pa=class t{setValue(t){this._nextMap=null,this._value=t}getNextNode(t){return this._nextMap?this._nextMap[t]:null}put(e,n,r){let o,a;if(e.length===n)return a=this._value,this.setValue(r),a;const i=e.charAt(n);return this._nextMap?(o=this._nextMap[i],o||(o=new t,this._nextMap[i]=o)):(this._nextMap={},o=new t,this._nextMap[i]=o),o.put(e,n+1,r)}get(t,e){if(t.length<=e)return this._value;const n=this.getNextNode(t.charAt(e));return n?n.get(t,e+1):null}getLongestMatch(t,e){if(t.length<=e)return Ba.newInstanceIfNeeded(t,this._value);const n=this.getNextNode(t.charAt(e));if(!n)return Ba.newInstanceIfNeeded(t,e,this._value);const r=n.getLongestMatch(t,e+1);return r||Ba.newInstanceIfNeeded(t,e,this._value)}},qa=class{constructor(){this.clear()}getLongestMatch(t){return this.root&&t?this.root.getLongestMatch(t,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(t,e){this.root||(this.root=new Pa);const n=this.root.put(t,0,e);return n||(t.length>this.maxKeyLen&&(this.maxKeyLen=t.length),this.size++,null)}};const Fa=(()=>{const t=[],e=[],n=new qa;let r,o,a;for(r in t["&quot"]="34",t["&amp"]="38",t["&lt"]="60",t["&gt"]="62",t["&nbsp"]="160",t["&iexcl"]="161",t["&cent"]="162",t["&pound"]="163",t["&curren"]="164",t["&yen"]="165",t["&brvbar"]="166",t["&sect"]="167",t["&uml"]="168",t["&copy"]="169",t["&ordf"]="170",t["&laquo"]="171",t["&not"]="172",t["&shy"]="173",t["&reg"]="174",t["&macr"]="175",t["&deg"]="176",t["&plusmn"]="177",t["&sup2"]="178",t["&sup3"]="179",t["&acute"]="180",t["&micro"]="181",t["&para"]="182",t["&middot"]="183",t["&cedil"]="184",t["&sup1"]="185",t["&ordm"]="186",t["&raquo"]="187",t["&frac14"]="188",t["&frac12"]="189",t["&frac34"]="190",t["&iquest"]="191",t["&Agrave"]="192",t["&Aacute"]="193",t["&Acirc"]="194",t["&Atilde"]="195",t["&Auml"]="196",t["&Aring"]="197",t["&AElig"]="198",t["&Ccedil"]="199",t["&Egrave"]="200",t["&Eacute"]="201",t["&Ecirc"]="202",t["&Euml"]="203",t["&Igrave"]="204",t["&Iacute"]="205",t["&Icirc"]="206",t["&Iuml"]="207",t["&ETH"]="208",t["&Ntilde"]="209",t["&Ograve"]="210",t["&Oacute"]="211",t["&Ocirc"]="212",t["&Otilde"]="213",t["&Ouml"]="214",t["&times"]="215",t["&Oslash"]="216",t["&Ugrave"]="217",t["&Uacute"]="218",t["&Ucirc"]="219",t["&Uuml"]="220",t["&Yacute"]="221",t["&THORN"]="222",t["&szlig"]="223",t["&agrave"]="224",t["&aacute"]="225",t["&acirc"]="226",t["&atilde"]="227",t["&auml"]="228",t["&aring"]="229",t["&aelig"]="230",t["&ccedil"]="231",t["&egrave"]="232",t["&eacute"]="233",t["&ecirc"]="234",t["&euml"]="235",t["&igrave"]="236",t["&iacute"]="237",t["&icirc"]="238",t["&iuml"]="239",t["&eth"]="240",t["&ntilde"]="241",t["&ograve"]="242",t["&oacute"]="243",t["&ocirc"]="244",t["&otilde"]="245",t["&ouml"]="246",t["&divide"]="247",t["&oslash"]="248",t["&ugrave"]="249",t["&uacute"]="250",t["&ucirc"]="251",t["&uuml"]="252",t["&yacute"]="253",t["&thorn"]="254",t["&yuml"]="255",t["&OElig"]="338",t["&oelig"]="339",t["&Scaron"]="352",t["&scaron"]="353",t["&Yuml"]="376",t["&fnof"]="402",t["&circ"]="710",t["&tilde"]="732",t["&Alpha"]="913",t["&Beta"]="914",t["&Gamma"]="915",t["&Delta"]="916",t["&Epsilon"]="917",t["&Zeta"]="918",t["&Eta"]="919",t["&Theta"]="920",t["&Iota"]="921",t["&Kappa"]="922",t["&Lambda"]="923",t["&Mu"]="924",t["&Nu"]="925",t["&Xi"]="926",t["&Omicron"]="927",t["&Pi"]="928",t["&Rho"]="929",t["&Sigma"]="931",t["&Tau"]="932",t["&Upsilon"]="933",t["&Phi"]="934",t["&Chi"]="935",t["&Psi"]="936",t["&Omega"]="937",t["&alpha"]="945",t["&beta"]="946",t["&gamma"]="947",t["&delta"]="948",t["&epsilon"]="949",t["&zeta"]="950",t["&eta"]="951",t["&theta"]="952",t["&iota"]="953",t["&kappa"]="954",t["&lambda"]="955",t["&mu"]="956",t["&nu"]="957",t["&xi"]="958",t["&omicron"]="959",t["&pi"]="960",t["&rho"]="961",t["&sigmaf"]="962",t["&sigma"]="963",t["&tau"]="964",t["&upsilon"]="965",t["&phi"]="966",t["&chi"]="967",t["&psi"]="968",t["&omega"]="969",t["&thetasym"]="977",t["&upsih"]="978",t["&piv"]="982",t["&ensp"]="8194",t["&emsp"]="8195",t["&thinsp"]="8201",t["&zwnj"]="8204",t["&zwj"]="8205",t["&lrm"]="8206",t["&rlm"]="8207",t["&ndash"]="8211",t["&mdash"]="8212",t["&lsquo"]="8216",t["&rsquo"]="8217",t["&sbquo"]="8218",t["&ldquo"]="8220",t["&rdquo"]="8221",t["&bdquo"]="8222",t["&dagger"]="8224",t["&Dagger"]="8225",t["&bull"]="8226",t["&hellip"]="8230",t["&permil"]="8240",t["&prime"]="8242",t["&Prime"]="8243",t["&lsaquo"]="8249",t["&rsaquo"]="8250",t["&oline"]="8254",t["&frasl"]="8260",t["&euro"]="8364",t["&image"]="8365",t["&weierp"]="8472",t["&real"]="8476",t["&trade"]="8482",t["&alefsym"]="8501",t["&larr"]="8592",t["&uarr"]="8593",t["&rarr"]="8594",t["&darr"]="8595",t["&harr"]="8596",t["&crarr"]="8629",t["&lArr"]="8656",t["&uArr"]="8657",t["&rArr"]="8658",t["&dArr"]="8659",t["&hArr"]="8660",t["&forall"]="8704",t["&part"]="8706",t["&exist"]="8707",t["&empty"]="8709",t["&nabla"]="8711",t["&isin"]="8712",t["&notin"]="8713",t["&ni"]="8715",t["&prod"]="8719",t["&sum"]="8721",t["&minus"]="8722",t["&lowast"]="8727",t["&radic"]="8730",t["&prop"]="8733",t["&infin"]="8734",t["&ang"]="8736",t["&and"]="8743",t["&or"]="8744",t["&cap"]="8745",t["&cup"]="8746",t["&int"]="8747",t["&there4"]="8756",t["&sim"]="8764",t["&cong"]="8773",t["&asymp"]="8776",t["&ne"]="8800",t["&equiv"]="8801",t["&le"]="8804",t["&ge"]="8805",t["&sub"]="8834",t["&sup"]="8835",t["&nsub"]="8836",t["&sube"]="8838",t["&supe"]="8839",t["&oplus"]="8853",t["&otimes"]="8855",t["&perp"]="8869",t["&sdot"]="8901",t["&lceil"]="8968",t["&rceil"]="8969",t["&lfloor"]="8970",t["&rfloor"]="8971",t["&lang"]="9001",t["&rang"]="9002",t["&loz"]="9674",t["&spades"]="9824",t["&clubs"]="9827",t["&hearts"]="9829",t["&diams"]="9830",t)"function"!=typeof t[r]&&t.hasOwnProperty(r)&&(e[t[r]]=r);for(o in e)"function"!=typeof e[o]&&e.hasOwnProperty(o)&&(a=e[o].toLowerCase().substr(1),n.put(a,String.fromCharCode(o)));return n})();var Ua=class extends $a{decodeCharacter(t){let e;t.mark();const n=t.next();if(null==n||"&"!==n)return t.reset(),null;const r=t.next();if(null==r)return t.reset(),null;if("#"===r){if(e=this._getNumericEntity(t),null!=e)return e}else if(r.match(/[A-Za-z]/)&&(t.pushback(r),e=this._getNamedEntity(t),null!=e))return e;return t.reset(),null}_getNamedEntity(t){let e,n,r,o="";for(e=Math.min(t.remainder().length,Fa.getMaxKeyLength()),r=0;r<e;r++)o+=t.next().toLowerCase();const a=Fa.getLongestMatch(o);if(null==a)return null;for(t.reset(),t.next(),e=a.getKey().length,n=0;n<e;n++)t.next();return t.peek(";")&&t.next(),a.getValue()}_getNumericEntity(t){const e=t.peek();return null==e?null:"x"===e||"X"===e?(t.next(),this._parseHex(t)):this._parseNumber(t)}_parseHex(t){let e,n="";for(;t.hasNext();){if(e=t.peek(),Number.isNaN(+parseInt(e,16))){if(";"===e){t.next();break}break}n+=e,t.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&ja(r)?String.fromCharCode(r):null}_parseNumber(t){let e,n="";for(;t.hasNext();){if(e=t.peek(),Number.isNaN(+parseInt(e,10))){if(";"===e){t.next();break}break}n+=e,t.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&ja(r)?String.fromCharCode(r):null}},Va=class extends $a{decodeCharacter(t){t.mark();const e=t.next();let n,r,o,a;if(null==e)return t.reset(),null;if("%"!==e)return t.reset(),null;for(n="",r=0;r<2;r++)o=t.nextHex(),null!=o&&(n+=o);return 2===n.length&&(a=parseInt(n,16),ja(a))?String.fromCharCode(a):(t.reset(),null)}};let Ha;"undefined"!=typeof document&&(Ha=document.createElement("div"));const Ka=Array.prototype.indexOf,Za=[",",".","_"," "],Wa=[",",".","-","_"," "],Ga={width:["%"],height:["%"]},Xa={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Ya={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Xa.image,"background-color":Xa.color,"border-color":Xa.color,"border-image":Xa.image,color:Xa.color,icon:Xa.image,"list-style-image":Xa.image,"outline-color":Xa.color},Ja={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Qa(t,e,n){let r;if(e){if(Ka)return Ka.call(e,t,n);for(r=e.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in e&&e[n]===t)return n}return-1}function ti(t){if(null==t)return"";let e="";const n=document.createTextNode(t);return Ha.appendChild(n),e=Ha.innerHTML,Ha.removeChild(n),e}function ei(t,e,n){let r,o,a,i,s,l,u,c,h;for(t=ri(t).toLowerCase(),e=ri(e),a=0;a<Ja.attr_name.length;a++)if(t.match(Ja.attr_name[a]))throw new Error(`Unsafe attribute name used: ${t}`);for(a=0;a<Ja.attr_val.length;a++)if(e.toLowerCase().match(Ja.attr_val[a]))throw new Error(`Unsafe attribute value used: ${e}`);if(r=Ga[t],r||(r=Wa),o="",!n){for(i=0;i<t.length;i++){if(s=t.charAt(i),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<e.length;l++)u=e.charAt(l),c=e.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&Qa(u,r)<0?(h=c.toString(16),o+=`&#x${h};`):o+=u;return n||(o+='"'),o}function ni(t,e,n){let r,o,a,i,s,l,u,c,h,d;if(t=ri(t).toLowerCase(),e=ri(e),Qa(t,Ja.css_key)>=0)throw new Error(`Unsafe property name used: ${t}`);for(r=0;r<Ja.css_val.length;r++)if(e.toLowerCase().indexOf(Ja.css_val[r])>=0)throw new Error(`Unsafe property value used: ${e}`);if(o=Ya[t],o||(o=Xa.default),a="",!n){for(i=0;i<t.length;i++){if(s=t.charAt(i),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");a+=s}a+=": "}for(l=0;l<e.length;l++)u=e.charAt(l),c=e.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&Qa(u,o)<0?(h=c.toString(16),d="000000".substr(h.length),a+=`\\${d}${h}`):a+=u;return a}function ri(t,e){let n,r,o,a,i=!1;if(null===t)return null;n=t,r=t,o=0;const s=[new Ua,new Va,new Da];for(;!i;){r=n;for(let t=0;t<s.length;t++)a=s[t].decode(n),a!==n&&(o++,n=a);r!==n||(i=!0)}if(e&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const oi=[];for(let t=0;t<255;t++)oi[t]=t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?null:t.toString(16);const ai={html:t=>ti(t.unsafe),css(t){let e,n=[];const r=[],o={};let a="";for(e in t.map?n=t.map:n[t.name]=t.unsafe,n)"function"!=typeof n[e]&&n.hasOwnProperty(e)&&(r[e]=ni(e,n[e],!0),a+=ni(e,n[e],!0),o[e]=r[e]);return t.map?o:a},attr(t){let e=[];const n=[],r={};let o="";t.map?e=t.map:e[t.name]=t.unsafe;for(const t in e)"function"!=typeof e[t]&&e.hasOwnProperty(t)&&(n[t]=ei(t,e[t],!0),o+=ei(t,e[t],!0),r[t]=n[t]);return t.map?r:o}};function ii(t,e){throw new Error(e)}var si={canonicalize:ri,encode:function(){const t={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let t,e,n;const r=arguments[0]||{};let o=1;const a=arguments.length;for(;o<a;o++)if(null!=(t=arguments[o]))for(e in t)if(t.hasOwnProperty(e)){if(n=t[e],r===n)continue;void 0!==n&&(r[e]=n)}}(t,arguments[0]):(t.context=arguments[0],2===arguments.length?"html"===t.context?t.unsafe=arguments[1]:"attr"!==t.context&&"css"!==t.context||(t.map=arguments[1]):(t.name=arguments[2],t.unsafe=arguments[1])),"html"===t.context?ai.html(t):"css"===t.context?(null!=t.map&&"object"!=typeof t.map&&ii(this,"Invalid parameter type"),ai.css(t)):"attr"===t.context?(null!=t.map&&"object"!=typeof t.map&&ii(this,"Invalid parameter type"),ai.attr(t)):void ii(this,"Invalid parameter type")},encodeForAttr:ei,encodeForAttr2:function(t){return ei("nonsens",t,!0)},encodeForCSS:ni,encodeForHref:function(t){ri(t),0!==t.search("[a-zA-Z0-9]+:")&&(t=`http://${t}`);const e=new Ra(t),n=Ra.encodeAuthorityAndPath(e.authorityAndPath),r=e.searchParams;t=n+Ra.encodeSearchParams(r)+e.hash;const o=decodeURI(t).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return t},encodeForJS:function(t,e){let n,r,o,a,i,s;for(e||(e=Za),s="",n=0;n<t.length;n++)o=t.charAt(n),a=t.charCodeAt(n),Qa(o,e)>=0||null==oi[a]?s+=o:(r=a.toString(16),a<256?(i="00".substr(r.length),s+=`\\x${i}${r.toUpperCase()}`):(i="0000".substr(r.length),s+=`\\u${i}${r.toUpperCase()}`));return s},encodeForHTML:ti,encodeForURL:function(t,e){let n="";return e&&(e.match(/^[A-Za-z\-0-9]{1,}$/)?n+=ri(e).toLowerCase():ii(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=e?'"':"",n},isSafeDataURL:(t,e)=>{const{maxByteSizeSvg:n=Na,maxByteSizeImage:r=La}=e??{},{mimeType:o,encoding:a,data:i}=(t=>{const[,e,n,r]=Sa.exec(t.trim())??[];return{encoding:n,data:r,mimeType:e?.toLocaleLowerCase()}})(t);if(!i)return!0;const s=((t,e,n)=>{const r={type:t};if(e?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===t?new Blob([n],r).size:0})(o,a,i);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(t){if(""===t||function(t){if("canParse"in URL)return URL.canParse(t);try{return new URL(t),!0}catch{return!1}}(t))return!1;const e=t.replace(/%2E/gi,".");if(e.match(/[#&=: ]/))return!1;const n=function(t){let e=t,n="";for(;e.length>0;)if(e.startsWith("../")||e.startsWith("./"))e=e.replace(/^\.\.?\//,"");else if(e.startsWith("/./"))e=e.replace(/^\/\.\//,"/");else if("/."===e)e="/";else if(e.startsWith("/../")){e=e.replace(/^\/\.\.\//,"/");const t=n.lastIndexOf("/");-1!==t&&(n=n.slice(0,t))}else if("/.."===e){e="/";const t=n.lastIndexOf("/");-1!==t&&(n=n.slice(0,t))}else if("."===e||".."===e)e="";else{const t=e.match(/^\/?[^/]*/),r=t?t[0]:"";e=e.slice(r.length),n+=r}return n}(e);return""!==n&&"/"!==n&&n}};const li={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},ui={resolveExpression:t=>{let e=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t);if(e)return`rgb(${e[1]},${e[2]},${e[3]})`;if(e=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),e)return`rgba(${e[1]},${e[2]},${e[3]},${e[4]})`;if(e=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t),e){const t=Math.round(e[1]/2.55)/100;return`rgba(${e[2]},${e[3]},${e[4]},${t})`}if(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t),e)return t;const n=t&&li[t.toLowerCase()];if(n){const t=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${t})`}return"none"},getDarkColor(t){const e=.5;let n,r,o,a;if(t.length>7){n=t.split(",");const i=-1!==n[0].indexOf("a");return r=i?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),a=parseInt(n[1],10),o=parseInt(n[2],10),`${(i?"rgba(":"rgb(")+(Math.round((0-r)*e)+r)},${Math.round((0-a)*e)+a},${Math.round((0-o)*e)+o}${i?`,${n[3]}`:")"}`}return n=parseInt(t.slice(1),16),r=n>>16,a=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*e)+r)+256*(Math.round((0-a)*e)+a)+(Math.round((0-o)*e)+o)).toString(16).slice(1)}`},isDarkColor(t){let e,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t))?(e=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))&&(e=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*e+.587*n+.114*r<125}},ci=["data:","http:","https:"],hi=t=>{try{return si.encodeForHTML(t).replace(/"/g,"&#x22;").replace(/'/g,"&#x27;")}catch{return""}},di=t=>{const e=["#"," ","(",")"];let n="";for(let r=0;r<t.length;r++){const o=t.charAt(r),a=t.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&e.indexOf(o)<0){const t=a.toString(16);n+=`\\${"000000".substr(t.length)}${t}`}else n+=o}return n},pi=t=>{try{return t=t?.trim(),t&&(t=>{try{const e=new URL(t);return ci.includes(e.protocol)}catch{return!1}})(t)&&si.isSafeDataURL(t)?/^data:/i.test(t)?encodeURI(si.canonicalize(t)):si.encodeForHref(t):""}catch{return""}};function fi(t){return[void 0,"left","right"].includes(t.cardImage.alignment)}function gi(t){const e=ui.resolveExpression(t);return"none"!==e?e:di(t)}function mi(t,e){return"default"===t?ui.isDarkColor(e)?Dt.FONT_COLOR_LIGHT.color:Dt.FONT_COLOR_DARK.color:t}const bi=(t,e)=>`font-family:${t.fontFamily}; font-size:${t.fontSize}; color:${e}`;function yi(t,e,n,r){const o=function(t,e){if(t.attributes&&t.attributes.color){const e=ui.resolveExpression(t.attributes.color);if("none"!==e)return e}return gi(e)}(t,e.cardBackgroundColor),a=gi(mi(e.cardTitle.fontColor,o)),i=bi(e.cardTitle,a),s=gi(mi(e.cardSubTitle.fontColor,o)),l=bi(e.cardSubTitle,s),u=gi(mi(e.cardDescription.fontColor,o)),c=bi(e.cardDescription,u),h=gi(mi(e.cardMeasureLabel.fontColor,o)),d=bi(e.cardMeasureLabel,h),p=gi(mi(e.cardMeasureValue.fontColor,o)),f=bi(e.cardMeasureValue,p),{topBar:g=Dt.BORDER_TOP,fullBorder:m=Dt.BORDER_FULL,contrastColor:b=!0}=e.cardBorder,y=b?ui.getDarkColor(o):gi(e.cardBorder.borderColor);let v=n;r?v-=8:m?v-=4:g&&(v-=3);return{titleStyle:i,subTitleStyle:l,descriptionStyle:c,measureLabelStyle:d,measureValueStyle:f,cardStyle:`background-color:${o}; border:${m&&!r?`1px solid ${y}`:""}; border-top:${g&&!r?`3px solid ${y}`:""}; height:${v}px;`}}const vi=(t,e,n,r)=>{const o=function(t,e){let n=!1,r="";return e.api?.isActive()&&(n=-1!==e.state.indexOf(t.elemNo),r=n?" selected":" not-selected"),{isSelected:n,selectedClass:r}}(t,n),a=function(t,e){const n=t.attributes||{},r=e.measureLabel?`${e.measureLabel}: `:"";return{title:hi(n.label||t.id),subTitle:n.subLabel?hi(n.subLabel):void 0,description:n.extraLabel?hi(n.extraLabel):void 0,measureLabel:t.measure?hi(r):void 0,measureValue:t.measure?hi(t.measure):void 0,image:pi(n.image)}}(t,e),i=yi(t,e,r,o.isSelected),s=function(t,e){return e?.image&&"tooltip"!==t.cardImage.location}(e,t.attributes),l=s?function(t){let e=" has-image";return fi(t)?(e+=" horizontal",e+="right"===t.cardImage.alignment?" right":" left"):(e+=" vertical",e+="bottom"===t.cardImage.alignment?" bottom":"",e+="round"===t.cardImage.shape?" round":""),e}(e):"",u=o.selectedClass+(fi(e)?" horizontal":" vertical");let c="";if(s){const n=function(t){let e="";return e+=["right","bottom"].includes(t.cardImage.alignment)?" image-last":"",e+=fi(t)?"":" vertical",e}(e),r=function(t){let e="";return e+=t.cardImage.clip?" clip":"",e+=fi(t)?" horizontal":"",e+="round"===t.cardImage.shape?" round":"",e}(e);c+=`<div class="sn-image-wrapper${n}"><img src="${a.image}" class="sn-org-card-image${r}" data-node-id="${si.encodeForAttr2(t.id)}"/></div>`}return c+=`<div class="sn-org-textbox${l}">`,c+=`<div class="sn-org-card-title" style="${si.encodeForAttr2(i.titleStyle)};">${a.title}</div>`,a.subTitle&&(c+=`<div class="sn-org-card-label" style="${si.encodeForAttr2(i.subTitleStyle)};">${a.subTitle}</div>`),a.measureValue?c+=`<div class="sn-org-card-label"><span style="${si.encodeForAttr2(i.measureLabelStyle)};">${a.measureLabel}</span><span style="${si.encodeForAttr2(i.measureValueStyle)};">${a.measureValue}</span></div>`:a.description&&(c+=`<div class="sn-org-card-label" style="${si.encodeForAttr2(i.descriptionStyle)};">${a.description}</div>`),c+="</div>",`<div class="sn-org-card-text${u}" style="${si.encodeForAttr2(i.cardStyle)};">${c}</div>`},xi={cardWidth:152,cardHeight:64,cardHeightLarge:208,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipPadding:15,maxZoom:6,minZoom:.2},wi={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel",imageExpression:"image"},_i="max-data-limit";function Ci(t){return t[0].qText}function Ei(t){return t[1].qText}async function ki(t,e,n,r,o,a,i){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:3300}]).then(n=>{t.push(n[0]),e.push(...n[0].qMatrix),o+=n[0].qArea.qHeight}),a>=i?_i:r>o?ki(t,e,n,r,o,a+1,i):""}const Oi=async(t,e)=>{if(t.snapshotData)return{status:"",dataMatrix:t.snapshotData.dataMatrix};const n=t.qHyperCube&&t.qHyperCube.qDataPages,r=t.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,a=[...n[0].qMatrix];let i="";return r>o&&1===n.length&&e?i=await ki(t.qHyperCube.qDataPages,a,e,r,o,0,t.rowLimit/3300||10):n.forEach((t,e)=>{e>0&&a.push(...t.qMatrix)}),{status:i,dataMatrix:a}};function Si(t,e){const n={};return t.forEach(t=>{"color"===t.prop?n[t.prop]=ui.resolveExpression(e.qValues[t.index].qText):n[t.prop]=e.qValues[t.index].qText}),n}function Li(t){if(!t)return!0;for(let e=0;e<t.length;++e)if(void 0!==t[e].children)return!1;return!0}function Ni(t){return["top","bottom"].includes(t.cardImage.alignment)&&"tooltip"!==t.cardImage.location?xi.cardHeightLarge:xi.cardHeight}async function zi({layout:t,model:e,translator:n}){if(!t.qHyperCube)throw new Error("Require a hypercube");if(t.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await Oi(t,e),a=function(t){if(t&&t.length){const e=[];return t.forEach((t,n)=>{wi[t.id]&&e.push({prop:wi[t.id],index:n})}),e}return[]}(t.qHyperCube.qDimensionInfo[0].qAttrExprInfo);return o?o.length<1?null:function(t,e,n,r,o){const a={},i=[];for(let n=0;n<t.length;++n){const r=t[n],o=Ci(r),s={id:o,parentId:Ei(r),children:[],elemNo:r[0].qElemNumber,attributes:Si(e,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};a[o]=s,i.push(s)}const s=[];let l=!1;for(let t=0;t<i.length;++t){const e=i[t],n=a[e.parentId];e.parent=n,n?n.children.length>98?l=!0:n.children.push({childNumber:n.children.length,...e}):s.length>98?l=!0:s.push(e)}if(0===s.length)return{error:"no_root",message:o.get("Object.OrgChart.MissingRoot")};const u=[];if(n===_i&&u.push(o.get("Object.OrgChart.MaxData")),l&&u.push(o.get("Object.OrgChart.MaxChildren")),function(t){const e={},n={};function r(t){e[t.id]=!0,n[t.id]=!0;for(let o=0;o<t.children.length;++o){if(!e[t.children[o].id]&&r(t.children[o]))return!0;if(n[t.children[o].id])return!0}return n[t.id]=!1,!1}for(let n=0;n<t.length;++n){const o=t[n];if(!e[o.id]&&r(o))return!0}return!1}(i)&&u.push(o.get("Object.OrgChart.CycleWarning")),1===s.length)return s[0].warn=u,s[0].navigationMode=r,s[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:s,navigationMode:r};return s.forEach((t,e)=>{t.parentId="Root",t.parent=c,t.childNumber=e}),c}(o,a,r,t.navigationMode,n):null}var Mi=(t,e)=>{const{api:n,state:r,singleSelect:o,setState:a}=e;if(t&&n){let e;if(t.data.elemNo<0&&-3!==t.data.elemNo)return;if(t.data.isLocked)return;n.isActive()&&r?e=r.concat():(n.begin("/qHyperCubeDef"),e=[]);const i=e.indexOf(t.data.elemNo),s=-1===i;let l=[];o||(l=function(t,e){const n=[],r=t=>{t.children.forEach(t=>{t.data.selected=e,n.push(t.data.elemNo),t.children&&t.children.length>0&&r(t)})};return t.children&&r(t),n}(t,s)),s?(e.push(t.data.elemNo),l.forEach(t=>{-1===e.indexOf(t)&&e.push(t)})):(e.splice(i,1),l.forEach(t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)})),0===e.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,e,!1]}),a(e)}};function Ri(t){t.tooltip.active=!0,t.tooltip.timeout=setTimeout(()=>{t.tooltip.active&&t.tooltip.html(function(t,e){const n=hi(t.data.attributes.label||t.data.id),r=t.data.attributes.subLabel?`${hi(t.data.attributes.subLabel)}<br />`:"",o=t.data.attributes.extraLabel?`${hi(t.data.attributes.extraLabel)}<br />`:"",a=hi(t.data.measure?`${e.measureLabel?`${e.measureLabel}: `:""}${t.data.measure}`:"");let i=t.data.attributes.image&&"card"!==e.cardImage.location?t.data.attributes.image:"";if(i=pi(i),i){const t="right"===e.cardImage.alignment?'style="padding-right:5px"':'style="padding-left:5px"';return`<div class="sn-org-tooltip-inner" style="display:flex"><img src="${i}" class="sn-org-tooltip-image" ${"right"===e.cardImage.alignment?'style="order: 1"':""} /><div class="sn-org-tooltip-text" ${t}><div class="sn-org-tooltip-header">${n}</div>${r}${o}${a}</div></div>`}return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${n}</div>${r}${o}${a}</div>`}(t.node,t.styling)).classed("sn-org-tooltip-visible",!0).attr("style",()=>function(t,e,n,r,o){const{cardWidth:a,tooltipPadding:i}=xi,s=a/2;return`bottom:${e-(r(t)*o.zoom+o.y-i)}px;left:${n(t)*o.zoom+o.x+s*o.zoom}px;`}(t.node,t.containerHeight,t.x,t.y,t.transform))},t.delay??250)}function Ai(t){clearTimeout(t.timeout),t.active=!1,t.classed("sn-org-tooltip-visible",!1)}function Ti({positioning:t,divBox:e,nodes:n,styling:r,setExpandedCallback:o,wrapperState:a,selectionObj:i,navigationMode:s,element:l,tooltip:u,flags:c,actualCardHeight:h,usePromiseStatus:d}){const{x:p,y:f}=t,{cardWidth:g,buttonWidth:m,buttonHeight:b,cardPadding:y,rootDiameter:v}=xi,{topId:x}=a.expandedState,w=n.find(t=>t.data.id===x),_=w&&w.parent?w.parent.ancestors().map(t=>t.data.id):[],C=document.getElementsByTagName("html")[0].classList.contains("touch-on"),E={tooltip:u,containerHeight:l.clientHeight,styling:r,x:p,y:f,flags:c};e.selectAll(".sn-org-nodes").data(n.filter(t=>t.parent&&"Root"===t.parent.data.id)).enter().append("div").attr("class","sn-org-root").attr("style",t=>`top:${f(t)-v-y}px;left:${p(t)+(g-v)/2}px`).attr("id",t=>t.data.id),e.selectAll(".sn-org-nodes").data(n.filter(t=>"Root"!==t.data.id)).enter().append("div").attr("class","sn-org-card").attr("style",t=>`width:${g}px;height:${h}px; top:${f(t)}px;left:${p(t)}px;`).attr("id",t=>t.data.id).on("click",(t,e)=>{if(!a.constraints.active&&"Root"!==e.data.id){const t={...E,transform:a.transform,node:e,delay:0};C&&Ri(t),Mi(e,i)}}).html(t=>vi(t.data,r,i,h)).each((t,e,n)=>{if(c.isEnabled("QCB_31709_FIX_PRINTING_IMAGES")&&d?.resolve){const r=n[e].querySelector(".sn-org-card-image[data-node-id]");r&&(r.onload=()=>d.resolve(t.data.id),r.onerror=()=>d.resolve(t.data.id))}}).on("mouseenter",(t,e)=>{if(!C&&!a.constraints.active&&0===t.buttons){Ri({...E,transform:a.transform,node:e})}}).on("mouseleave",()=>{!C&&Ai(u)}).on("mousedown",()=>{Ai(u)}).on("touchmove",()=>{Ai(u)}).on("wheel",()=>{Ai(u)}),"expandAll"!==s&&e.selectAll(".sn-org-nodes").data(n.filter(t=>!!t.children&&"Root"!==t.data.id)).enter().append("div").attr("class","sn-org-traverse").attr("style",t=>`width:${m}px;height:${b}px;top:${f(t)+h+y}px;left:${p(t)+(g-m)/2}px;`).attr("id",t=>`${t.data.id}-expand`).on("mouseenter",t=>{a.constraints.active||(t.target.style.cursor="pointer")}).on("click",(t,e)=>{a.constraints.active||(o(((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>{if(t.data.id===e)n=!n,r=[];else if(o.includes(t.data.id))e=t.parent?t.parent.data.id:t.data.id,n=!!t.parent,r=[];else if(t.parent.data.id===e){const e=t.parent.children.filter(t=>r.includes(t.data.id)).every(t=>Li(t.children));r.includes(t.data.id)?r.splice(r.indexOf(t.data.id),1):Li(t.children)&&e?r.push(t.data.id):r=[t.data.id]}else e=t.parent.data.id,n=!0,r=[t.data.id];return{topId:e,isExpanded:n,expandedChildren:r}})(e,a.expandedState,_)),t.stopPropagation())}).html(t=>`${((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>t.data.id===e&&n||t.parent&&t.parent.data.id===e&&r.includes(t.data.id)||o.includes(t.data.id)?"-":"+")(t,a.expandedState,_)} ${t.data.children.length}`)}function $i(t,e,n,r,o){t.append("path").attr("class","sn-org-path").attr("id",t=>t.data.id).attr("d",t=>{let n="";const a=function(t,e,{depthSpacing:n,isVertical:r,x:o,y:a},i,s){const{cardWidth:l,buttonHeight:u,cardPadding:c,buttonMargin:h}=xi,d=[],p=l/2,f=s/2,g={x:t.xActual,y:t.yActual};if(t.parent&&"Root"!==t.parent.data.id){const e=n/2,l="expandAll"===i?s:s+c+u,m={x:o(t.parent)+p,y:a(t.parent)+l};"expandAll"!==i&&Li(t.parent.children)?d.push(r?[{x:g.x,y:g.y+f},{x:m.x-p,y:g.y+f},{x:m.x-p,y:m.y+h},{x:m.x,y:m.y+h},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x,y:m.y-f},{x:m.x+e,y:m.y-f},{x:m.x+e,y:m.y},{x:m.x,y:m.y}]):g.x===o(t.parent)||g.y===a(t.parent)?d.push([{x:g.x+p,y:g.y},{x:m.x,y:m.y}]):d.push(r?[{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c},{x:m.x,y:g.y-c},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x-c,y:g.y},{x:g.x-c,y:m.y},{x:m.x,y:m.y}])}else t.parent&&d.push([{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c}]);return t.children&&"Root"!==t.data.id&&d.push([{x:g.x+p,y:g.y+s},{x:g.x+p,y:g.y+s+c}]),d}(t,0,e,r,o);return a.forEach(t=>{n+=function(t){const{r:e}=xi;let n,r=`M ${t[0].x} ${t[0].y} `;const o=e=>{const r=t[e].x-t[e-1].x,o=t[e].y-t[e-1].y;n={x:(r>0)-(r<0)||+r,y:(o>0)-(o<0)||+o}};o(1);for(let a=1;a<t.length;++a){const i=t[a];a<t.length-1?(r+=`L ${i.x-n.x*e} ${i.y-n.y*e} `,o(a+1),r+=`Q ${i.x} ${i.y} ${i.x+n.x*e} ${i.y+n.y*e} `):r+=`L ${i.x} ${i.y} `}return r}(t).slice(0,-1)}),n})}const ji=(t,e,n,r,o,a)=>{const{buttonMargin:i}=xi,s=o&&o.initialX||0;return"expandAll"===a?(t[r]=t.x+s,t[r]):(t.parent?(t.parent[r]||(t.parent[r]=ji(t.parent,e,n,r,o)),"Root"===t.parent.data.id?t[r]=t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e:t[r]=Li(t.parent.children)?t.parent[r]+i:t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e):t[r]=s,t[r])};function Ii(t,e,n,r,o){const{widthMargin:a,heightMargin:i,cardWidth:s,cardPadding:l}=xi;let u,c,h;if("ttb"===t)u=s+a,c="expandAll"===r?o+2*l:o+i,h={depthSpacing:c,isVertical:!0,x:t=>ji(t,u,e,"xActual",n,r),y:t=>((t,e,n,r,o,a)=>{const{leafMargin:i}=xi,s=r&&r.initialY||0;return t.parent&&"Root"!==t.parent.data.id&&"expandAll"!==o&&Li(t.parent.children)?t[n]=t.parent.y+e+t.data.childNumber*(a+i)+s:t[n]=t.y+s,t[n]})(t,c,"yActual",n,r,o)};return h}const Di=(t,e,n,r,o)=>{const a=t.k,i=`${t.x}px, ${t.y}px`;e.attr("transform",t),n.classed("org-disable-transition",!0),e.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${i}) scale(${a})`)};const Bi=({topId:t,isExpanded:e,expandedChildren:n},r,o,a)=>{if("expandAll"===a)return r.descendants();const i=r.descendants().find(e=>e.data.id===t)||r,s=[];if(e&&i.children&&i.children.forEach(t=>{s.push(t),t.children&&(-1!==n.indexOf(t.data.id)||o)&&t.children.forEach(e=>{s.push(e),-1!==n.indexOf(t.data.id)&&o&&e.children&&e.children.forEach(t=>{s.push(t)})})}),"free"===r.data.navigationMode&&i.parent){const t=i.parent.ancestors(),e=t.map(t=>t.data.id);t.forEach(t=>{o&&t.children.forEach(t=>{t.children&&-1===e.indexOf(t.data.id)&&t.data.id!==i.data.id&&s.unshift(...t.children)}),s.unshift(...t.children),t.parent||s.unshift(t)})}else s.unshift(i);return s},Pi=({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:s,setContainerData:l,layout:u,flags:c,actualCardHeight:h})=>{t.innerHTML="",t.className="sn-org-chart";const{navigationMode:d}=u;let p=Ii("ttb",t,{},d,h);const{width:f,height:g}=t.getBoundingClientRect(),m=vn(t).append("span").attr("class","sn-org-zoomwrapper").on("click",()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))}).node(),b=vn(m).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),y=vn(m).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),v=vn(t).append("button").attr("class","sn-org-homebutton disabled").on("click",()=>{Pi({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:s,setContainerData:l,layout:u,flags:c,actualCardHeight:h})}).html('<span class="lui-fade-button__icon sn-org-home-icon">\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 16 16">\n <defs>\n <path id="home-a" d="M2,7.9 L8,3.4 L14,7.9 L14,16 L12,16 L12,11.2 C12,11.0895431 11.9104569,11 11.8,11 L9.2,11 C9.08954305,11 9,11.0895431 9,11.2 L9,16 L2,16 L2,7.9 Z M7,13.8 L7,11.2 C7,11.0895431 6.91045695,11 6.8,11 L4.2,11 C4.08954305,11 4,11.0895431 4,11.2 L4,13.8 C4,13.9104569 4.08954305,14 4.2,14 L6.8,14 C6.91045695,14 7,13.9104569 7,13.8 Z M13,4.1 L16,6.5 L15,7.5 L8,2 L1,7.5 L0,6.5 L8,0 L11,2.4 L11,1 L13,1 L13,4.1 Z"/>\n </defs>\n <use xlink:href="#home-a"/>\n </svg>\n </span>').node(),x=function(t){const e=vn(t).append("div").attr("class","sn-org-tooltip").on("mousedown",()=>{e.classed("sn-org-tooltip-visible",!1)});return e}(t);if(e.error)return vn(m).append("div").attr("class","sn-org-error").html(e.message),!1;e.warn&&e.warn.length&&vn(m).append("span").attr("class","sn-org-warning").html(`*${e.warn.join(" ")}`);const w=b.append("g").attr("class","sn-org-paths"),_=ca().size([f,g]).nodeSize([xi.cardWidth+xi.cardPadding,p.depthSpacing])(Yo(e)),C=!r.expandedState||!_.descendants().find(t=>t.data.id===r.expandedState.topId),E=C?{topId:_.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,k=Bi(E,_,!1,d);k.forEach(t=>{t.xActual&&t.yActual||(p.x(t),p.y(t))});const O=((t,e)=>{const{cardWidth:n,buttonHeight:r,buttonMargin:o}=xi,a={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return t.forEach(t=>{a.left=Math.min(t.xActual,a.left),a.top=Math.min(t.yActual,a.top),a.right=Math.max(t.xActual,a.right),a.bottom=Math.max(t.yActual,a.bottom)}),{x:a.left,y:a.top-r-o,width:a.right-a.left+n,height:a.bottom-a.top+e+2*(r+o)}})(k,h),S=s&&s.initialZoom?s.initialZoom:((t,e,n,r)=>{const{widthMargin:o,minZoom:a}=xi,i="expandAll"===n?1/0:xi.maxZoom,{width:s,height:l}=t,{clientHeight:u,clientWidth:c}=e,h=s+2*o,d=l+r,p=Math.max(Math.min(h/c,i),a),f=Math.max(Math.min(d/u,i),a);return p>f?{initialX:-t.x+o,initialY:-t.y+(u*p-l)/2,initialZoom:p}:{initialX:-t.x+(c*f-s)/2,initialY:r/2,initialZoom:f}})(O,t,d,h);return o(S),p=Ii("ttb",t,S,d,h),function({containerData:t,setTransform:e,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:a}){const{svg:i,divBox:s,width:l,height:u,zoomWrapper:c,element:h,tooltip:d,homeButton:p}=t,{x:f=0,y:g=0}=n,{minZoom:m,maxZoom:b}=xi,y=n&&1/n.zoom||o.initialZoom,v="expandAll"===a?y:Math.max(Math.min(b,y),m),x=()=>{const t=document.createEvent("MouseEvents");t.initEvent("mousedown",!0,!1),h.dispatchEvent(t)};vn(c).call(Oa().extent([[0,0],[l,u]]).filter(t=>!(r.constraints.active||"dblclick"===t.type||"mousedown"===t.type&&3===t.which)).scaleExtent(["expandAll"===a?.8:m*v,b*v]).on("start",x).on("zoom",t=>{vn(p).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),e({zoom:t.transform.k/v,x:t.transform.x,y:t.transform.y}),x(),Ai(d),Di(ba.translate(t.transform.x,t.transform.y).scale(t.transform.k/v),i,s,l,u)})),e({zoom:1/v,x:f,y:g}),Di(ba.translate(f,g).scale(1/v),i,s,l,u)}({containerData:{svg:w,divBox:y,width:f,height:g,zoomWrapper:m,element:t,tooltip:x,homeButton:v},setTransform:a,transformState:s&&s.transform||{},wrapperState:r,initialZoomState:S,navigationMode:d}),C&&i(E),l({svg:w,divBox:y,allNodes:_,positioning:p,width:f,height:g,element:t,zoomWrapper:m,tooltip:x,homeButton:v})},qi=(t,e,n,r)=>{const o={expandedState:t,transform:e,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};function Fi(e,n,r,o,a){const i=t.useElement();t.onTakeSnapshot(t=>{t.snapshotData||(t.snapshotData={}),r.snapshotData&&r.snapshotData.viewState||(t.snapshotData.viewState=qi(e,o,a,i)),t.snapshotData.dataMatrix=((t,e,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=Bi(t,e,!0,r),a=[],{qDataPages:i}=n.qHyperCube,s=[];return i.forEach(t=>{s.push(...t.qMatrix)}),o.forEach(t=>{void 0!==t.data.rowNo&&a.push(s[t.data.rowNo])}),a})(e,n.allNodes,r)}),t.useImperativeHandle(()=>({getViewState:()=>qi(e,o,a,i)}))}function Ui(t,e,n,r){if(r||void 0===t.useColorExpression)return n;let o;return o=t.useColorExpression?ui.resolveExpression(t.colorExpression):e.getColorPickerColor(t.color),"none"===o?n:o}const Vi=(t,e,n,r)=>void 0===t?n??r:e??r,Hi=(t,e,n)=>({useColorExpression:Vi(t,e?.useColorExpression,"byExpression"===n?.style?.fontColor?.colorType,Dt.FONT_COLOR_USE_EXPRESSION),color:Vi(t,e?.color,n?.style?.fontColor?.color,Dt.FONT_COLOR_DARK),colorExpression:Vi(t,e?.colorExpression,n?.style?.fontColor?.colorExpression,"")}),Ki=(t,e)=>{const{viewState:n}=t;return!n&&e.snapshotData&&e.snapshotData.viewState?e.snapshotData.viewState:n},Zi=()=>{const e=t.useTheme(),n=t.useMemo(()=>function({theme:t,config:e={}}){const{id:n,resolve:r=[],transform:o=[],extend:a=[]}=e,i={theme:t,matrix:Tt(r),styles:void 0};return i.styles=It({theme:t,id:n,transform:o,extend:a,matrix:i.matrix}),{getStyles:()=>i.styles,getTheme:()=>i.theme,setTheme:t=>{i.theme=t,i.styles=It({theme:t,id:n,transform:o,extend:a,matrix:i.matrix})}}}({theme:e,config:{id:"orgChart",resolve:[["object.orgChart","card.title.main","fontSize",Dt.CARD_TITLE_FONTSIZE],["object.orgChart","card.title.subTitle","fontSize",Dt.CARD_BODY_FONTSIZE],["object.orgChart","card.label.description","fontSize",Dt.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureLabel","fontSize",Dt.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureValue","fontSize",Dt.CARD_BODY_FONTSIZE],["object.orgChart","card.title.main","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.title.subTitle","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.description","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureLabel","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureValue","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"]]}}),[e.name()]);return n},Wi=({env:e,setExpandedState:n,setTransform:r,selectionObj:o})=>{const{flags:a}=e,i=t.useModel(),s=t.useStaleLayout(),l=t.useTranslator(),u=t.useOptions(),[c,h]=t.useState(null),[d,p]=t.useState(null),[f,g]=t.useState({}),m=Zi();return t.usePromise(()=>new Promise(t=>{if(!s)return void t();const e=setTimeout(()=>{t()},9e3),c=Ki(u,s);c?.expandedState&&n(c.expandedState),c?.transform&&r(c.transform),zi({layout:s,model:i,translator:l}).then(n=>{o.setState([]),h(n),p((({themeService:t,layout:e})=>{const n=t.getStyles(),r=(o="card",e.components?.find(t=>t.key===o)??void 0);var o;const a=t.getTheme(),i=Hi(r,r?.title?.main,e),s=Hi(r,r?.title?.subTitle,e),l=Hi(r,r?.label?.description,e),u=Hi(r,r?.label?.measureLabel,e),c=Hi(r,r?.label?.measureValue,e),h={useColorExpression:Vi(r,r?.background?.useColorExpression,"byExpression"===e?.style?.backgroundColor?.colorType,Dt.BACKGROUND_USE_EXPRESSION),color:Vi(r,r?.background?.color,e?.style?.backgroundColor?.color,Dt.BACKGROUND_COLOR),colorExpression:Vi(r,r?.background?.colorExpression,e?.style?.backgroundColor?.colorExpression,"")},d={topBar:Vi(r,r?.border?.topBar,e?.style?.border?.top,Dt.BORDER_TOP),fullBorder:Vi(r,r?.border?.fullBorder,e?.style?.border?.fullBorder,Dt.BORDER_FULL),contrastColor:Vi(r,r?.border?.contrastColor,"auto"===e?.style?.border?.colorType,!0),useColorExpression:Vi(r,r?.border?.useColorExpression,"byExpression"===e?.style?.border?.colorType,Dt.BORDER_USE_EXPRESSION),color:Vi(r,r?.border?.color,e?.style?.border?.color,Dt.BORDER_COLOR),colorExpression:Vi(r,r?.border?.colorExpression,e?.style?.border?.colorExpression,"")},p=Vi(r,r?.contrastTextColor,"auto"===e?.style?.fontColor?.colorType,!0),f=Ui(i,a,"default",p),g=Ui(s,a,"default",p),m=Ui(l,a,"default",p),b=Ui(u,a,"default",p),y=Ui(c,a,"default",p),v=Ui(h,a,Dt.BACKGROUND_COLOR.color,!1),x=Ui(d,a,ui.getDarkColor(v),d.contrastColor),w=e.qHyperCube.qMeasureInfo.length?e.qHyperCube.qMeasureInfo[0].qFallbackTitle:null;return{cardTitle:{fontSize:Vi(r,r?.title?.main?.fontSize,Dt.CARD_TITLE_FONTSIZE,n.card.title.main.fontSize),fontFamily:r?.title?.main?.fontFamily??n.card.title.main.fontFamily,fontColor:f},cardSubTitle:{fontSize:Vi(r,r?.title?.subTitle?.fontSize,Dt.CARD_BODY_FONTSIZE,n.card.title.subTitle.fontSize),fontFamily:r?.title?.subTitle?.fontFamily??n.card.title.subTitle.fontFamily,fontColor:g},cardDescription:{fontSize:Vi(r,r?.label?.description?.fontSize,Dt.CARD_BODY_FONTSIZE,n.card.label.description.fontSize),fontFamily:r?.label?.description?.fontFamily??n.card.label.description.fontFamily,fontColor:m},cardMeasureLabel:{fontSize:Vi(r,r?.label?.measureLabel?.fontSize,Dt.CARD_BODY_FONTSIZE,n.card.label.measureLabel.fontSize),fontFamily:r?.label?.measureLabel?.fontFamily??n.card.label.measureLabel.fontFamily,fontColor:b},cardMeasureValue:{fontSize:Vi(r,r?.label?.measureValue?.fontSize,Dt.CARD_BODY_FONTSIZE,n.card.label.measureValue.fontSize),fontFamily:r?.label?.measureValue?.fontFamily??n.card.label.measureValue.fontFamily,fontColor:y},cardContrastTextColor:p,cardBackgroundColor:v,cardBorder:{topBar:d.topBar,fullBorder:d.fullBorder,contrastColor:d.contrastColor,borderColor:x},cardImage:{location:r?.image?.location??Dt.IMAGE_LOCATION,alignment:r?.image?.alignment??Dt.IMAGE_ALIGNMENT,shape:r?.image?.shape??Dt.IMAGE_SHAPE,clip:r?.image?.clip??Dt.IMAGE_CLIP},measureLabel:w}})({themeService:m,layout:s}));const r=new Set;if(a.isEnabled("QCB_31709_FIX_PRINTING_IMAGES")){const t=c?.expandedState||{topId:n.id,isExpanded:!0,expandedChildren:[]},e=Yo(n);Bi(t,e,!1,s.navigationMode).forEach(t=>{t.data.attributes?.image&&r.add(t.data.id)})}g({resolve:(n,o)=>{n&&r.delete(n),(0===r.size||o)&&(clearTimeout(e),t())}}),0===r.size&&(clearTimeout(e),t())})}),[s,i,l.language(),m]),{dataTree:c,styling:d,usePromiseStatus:f}};function Gi(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}Gi(".sn-org-chart .sn-org-homebutton {\n position: absolute;\n top: 20px;\n right: 20px;\n height: 20px;\n width: 20px;\n border-color: transparent;\n background-color: transparent;\n fill: rgba(89, 89, 89, 0.8);\n transition: fill 200ms ease-out;\n}\n.sn-org-chart .sn-org-homebutton:hover {\n fill: #595959;\n}\n.sn-org-chart .sn-org-homebutton.disabled {\n display: none;\n}\n");Gi(".sn-org-chart {\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes {\n position: absolute;\n transform-origin: 0% 0%;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n backface-visibility: hidden;\n}\n.sn-org-chart .sn-org-nodes:not(.org-disable-transition) {\n transition-property: all;\n transition-duration: 0.5s;\n}\n.sn-org-chart .sn-org-nodes .sn-org-traverse {\n position: absolute;\n background-color: white;\n font-size: 20px;\n font-weight: bold;\n border-radius: 3px;\n border: 1px solid #8c8c8c;\n text-align: center;\n line-height: 24px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-root {\n position: absolute;\n background-color: #8c8c8c;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card {\n position: absolute;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text {\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 3px;\n display: flex;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.selected {\n border: 4px solid black;\n border-radius: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.not-selected {\n opacity: 0.5;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.horizontal {\n flex-direction: row;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.vertical {\n flex-direction: column;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper {\n order: 0;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.image-last {\n order: 2;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.vertical {\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image {\n padding: 4px 4px;\n object-fit: contain;\n height: 130px;\n width: 130px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.round {\n border-radius: 50%;\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.clip {\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.horizontal {\n padding: 4px 0px;\n height: 50px;\n width: 50px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox {\n order: 1;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image {\n max-height: 60px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.horizontal {\n width: 85px;\n height: fit-content;\n position: relative;\n top: 50%;\n transform: translate(0, -50%);\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.left {\n padding-left: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.right {\n padding-right: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.vertical {\n width: 143px;\n margin-bottom: 4px;\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.bottom {\n padding-top: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.round {\n max-height: 80px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-title {\n font-size: 14px;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");Gi(".sn-org-chart .sn-org-svg {\n position: absolute;\n /* For css only transitions, does not work in IE11 */\n}\n.sn-org-chart .sn-org-svg .sn-org-path {\n fill: none;\n stroke: #4c4c4c;\n stroke-width: 1;\n}\n.sn-org-chart .sn-org-svg .sn-org-paths:not(.org-disable-transition) {\n transform-origin: 0% 0%;\n transition-property: all;\n transition-duration: 0.5s;\n}\n");Gi('.sn-org-chart {\n /* Tooltip arrow */\n}\n.sn-org-chart .sn-org-tooltip {\n visibility: hidden;\n opacity: 0;\n /* Unsupported in IE, so there we set width explicitly */\n width: max-content;\n /* Position the tooltip text */\n position: absolute;\n z-index: 1;\n}\n.sn-org-chart .sn-org-tooltip::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 0%;\n margin-left: -10px;\n border-width: 10px;\n border-style: solid;\n border-color: #404040 transparent transparent transparent;\n}\n.sn-org-chart .sn-org-tooltip-visible {\n opacity: 0.9;\n visibility: visible;\n}\n.sn-org-chart .sn-org-tooltip-inner {\n max-width: 240px;\n right: 50%;\n font-family: "QlikView Sans", sans-serif;\n position: relative;\n max-height: 150px;\n background-color: #404040;\n color: #e6e6e6;\n text-align: left;\n font-size: 13px;\n line-height: 15px;\n padding: 10px 10px 10px 10px;\n border-radius: 6px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-image {\n height: 50px;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n');return Gi(".sn-org-chart .sn-org-warning {\n position: absolute;\n bottom: 0px;\n left: 0px;\n font-style: italic;\n font-size: 13px;\n color: #7b7a78;\n}\n.sn-org-chart .sn-org-error {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 1.2em;\n transform: translate(-50%, -50%);\n}\n"),function(n){const{flags:r}=n;return{qae:{properties:te,data:e},component:()=>{const e=t.useStaleLayout(),o=t.useElement(),a=t.useOptions(),i=t.useRect(),s=t.useConstraints(),l=t.useTranslator(),[u,c]=t.useState(null),[h,d]=t.useState(null),[p,f]=t.useState(null),[g,m]=t.useState(null),[b]=t.useState({transform:{},constraints:s,expandedState:h}),y=function(e){const[n,r]=t.useState(!1),o=t.useSelections(),a=!!t.useLayout().qSelectionInfo.qInSelections,[i]=t.useState({api:o,setState:t=>{i.state=t},state:[],singleSelect:!1});t.useEffect(()=>{Qt(e)},[e]);const s=()=>{i.state=[]},l=()=>{i.state=[],r(!1)};return t.useEffect(()=>i.api?(i.api=o,i.api.on("deactivated",s),i.api.on("canceled",l),i.api.on("confirmed",l),i.api.on("cleared",s),()=>{i.api.removeListener("deactivated",s),i.api.removeListener("canceled",l),i.api.removeListener("confirmed",l),i.api.removeListener("cleared",s)}):()=>{},[o]),t.useEffect(()=>{i.singleSelect=n},[n]),t.useAction(()=>({action(){r(!n)},icon:{shapes:[{type:"path",attrs:{d:"M9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 Z M15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.4,15 C14.7313708,15 15,14.7313708 15,14.4 L15,13.5 C15,13.2238576 15.2238576,13 15.5,13 Z M0.5,13 C0.776142375,13 1,13.2238576 1,13.5 L1,14.4 C1,14.7313708 1.26862915,15 1.6,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,13.5 C0,13.2238576 0.223857625,13 0.5,13 Z M6.8,9 C6.91045695,9 7,9.08954305 7,9.2 L7,12.8 C7,12.9104569 6.91045695,13 6.8,13 L3.2,13 C3.08954305,13 3,12.9104569 3,12.8 L3,9.2 C3,9.08954305 3.08954305,9 3.2,9 L6.8,9 Z M12.8,9 C12.9104569,9 13,9.08954305 13,9.2 L13,12.8 C13,12.9104569 12.9104569,13 12.8,13 L9.2,13 C9.08954305,13 9,12.9104569 9,12.8 L9,9.2 C9,9.08954305 9.08954305,9 9.2,9 L12.8,9 Z M6,10 L4,10 L4,12 L6,12 L6,10 Z M12,10 L10,10 L10,12 L12,12 L12,10 Z M15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 Z M0.5,6 C0.776142375,6 1,6.22385763 1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 0,9.77614237 0,9.5 L0,6.5 C0,6.22385763 0.223857625,6 0.5,6 Z M6.8,3 C6.91045695,3 7,3.08954305 7,3.2 L7,6.8 C7,6.91045695 6.91045695,7 6.8,7 L3.2,7 C3.08954305,7 3,6.91045695 3,6.8 L3,3.2 C3,3.08954305 3.08954305,3 3.2,3 L6.8,3 Z M12.8,3 C12.9104569,3 13,3.08954305 13,3.2 L13,6.8 C13,6.91045695 12.9104569,7 12.8,7 L9.2,7 C9.08954305,7 9,6.91045695 9,6.8 L9,3.2 C9,3.08954305 9.08954305,3 9.2,3 L12.8,3 Z M12,4 L10,4 L10,6 L12,6 L12,4 Z M2.5,5.70654635e-14 C2.77614237,5.70654635e-14 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.6,1 C1.26862915,1 1,1.26862915 1,1.6 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 0,2.77614237 0,2.5 L0,1 C0,0.44771525 0.44771525,5.70654635e-14 1,5.70654635e-14 L2.5,5.70654635e-14 Z M15,0 C15.5522847,0 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.6 C15,1.26862915 14.7313708,1 14.4,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,0 13.5,0 L15,0 Z M9.5,5.67323966e-14 C9.77614237,5.67323966e-14 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,5.67323966e-14 6.5,5.67323966e-14 L9.5,5.67323966e-14 Z"}}]},active:n,hidden:!a,label:e.get("Object.OrgChart.SingleSelect")}),[n,a]),t.useEffect(()=>{const t=t=>{"Shift"===t.key&&r(!0)},e=t=>{"Shift"===t.key&&r(!1)};return document.addEventListener("keydown",t),document.addEventListener("keyup",e),()=>{document.removeEventListener("keydown",t),document.removeEventListener("keyup",e)}},[]),i}(l);t.useMemo(()=>{Qt(l)},[o,l.language()]),t.useEffect(()=>{b.constraints=s},[s]),t.useEffect(()=>{b.transform=p},[p]),t.useEffect(()=>{b.expandedState=h},[h]);const v=t=>{t.useTransitions=!0,d(t)},{dataTree:x,styling:w,usePromiseStatus:_}=Wi({env:n,setExpandedState:d,setTransform:f,selectionObj:y}),C=()=>{if(o&&x&&w){const t=Ki(a,e),n=Ni(w);Pi({element:o,dataTree:x,viewState:t,wrapperState:b,selectionObj:y,setInitialZoom:m,setTransform:f,setExpandedState:d,setContainerData:c,layout:e,flags:r,actualCardHeight:n})}},E=()=>{if(u&&h&&w){const t=Ni(w);(({containerData:t,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:a,flags:i,actualCardHeight:s,usePromiseStatus:l})=>{const{svg:u,divBox:c,allNodes:h,positioning:d,tooltip:p}=t,{navigationMode:f}=h.data;c.selectAll("*").remove(),u.selectAll("*").remove();const g=Bi(r.expandedState,h,!1,f);Ti({positioning:d,divBox:c,nodes:g,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:f,element:a,tooltip:p,flags:i,actualCardHeight:s,usePromiseStatus:l}),$i(u.selectAll(".sn-org-paths").data(g).enter(),d,r.expandedState.topId,f,s)})({containerData:u,styling:w,setExpandedCallback:v,wrapperState:b,selectionObj:y,useTransitions:h.useTransitions,element:o,flags:r,actualCardHeight:t,usePromiseStatus:_})}};t.useEffect(()=>{E()},[u,y.state]),t.useEffect(()=>{C()},[o,x,s]),t.useEffect(()=>{e.resizeOnExpand?C():E()},[h]),t.useEffect(()=>{if(u&&e&&e.snapshotData){const t=((t,e,n)=>{if(!e)return ba.translate(n.x,n.y).scale(n.zoom);const{size:r}=e,o=t.width/r.w>t.height/r.h?t.height/r.h:t.width/r.w,a=e.transform.x*o,i=e.transform.y*o,s=e.transform.zoom*o;return ba.translate(a,i).scale(s)})(i,e.snapshotData.viewState,p);Di(t,u.svg,u.divBox,i.width,i.height),u.divBox.classed("sn-org-chart-snapshot",!0)}},[i,u]),Fi(h,u,e,p,g)},ext:Yt(n)}}});