@nebula.js/sn-bar-chart 1.12.13 → 1.12.17

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.
package/core/esm/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  /*
2
- * @nebula.js/sn-bar-chart v1.12.13
2
+ * @nebula.js/sn-bar-chart v1.12.17
3
3
  * Copyright (c) 2021 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"picasso.js";import t from"picasso-plugin-q";import n from"picasso-plugin-hammer";import r from"hammerjs";import i from"react";import{Button as o,Popover as a,List as u,ListItem as s,ListItemIcon as l,ListItemText as c}from"@material-ui/core";import f from"react-dom";import{createGenerateClassName as d,StylesProvider as p,ThemeProvider as m}from"@material-ui/styles";import{useTranslator as h,useEmbed as v,useTheme as g,useState as y,useDeviceType as b,useAppLayout as x,useEffect as q,useElement as M,useOptions as S,useLayout as D,useAction as C,useStaleLayout as w,useModel as O,useApp as T,usePlugins as A,useSelections as E,useConstraints as L,useRect as k,usePromise as N,onTakeSnapshot as I,useImperativeHandle as j}from"@nebula.js/stardust";function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,u,"next",e)}function u(e){z(o,r,i,a,u,"throw",e)}a(void 0)}))}}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function J(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?J(e):t}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $(this,n)}}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}(e,t)||te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){if(e){if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ie=Object.prototype.hasOwnProperty,oe=Object.prototype.toString,ae=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,se=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===oe.call(e)},le=function(e){if(!e||"[object Object]"!==oe.call(e))return!1;var t,n=ie.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ie.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ie.call(e,t)},ce=function(e,t){ae&&"__proto__"===t.name?ae(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},fe=function(e,t){if("__proto__"===t){if(!ie.call(e,t))return;if(ue)return ue(e,t).value}return e[t]},de=function e(){var t,n,r,i,o,a,u=arguments[0],s=1,l=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[1]||{},s=2),(null==u||"object"!==F(u)&&"function"!=typeof u)&&(u={});s<l;++s)if(null!=(t=arguments[s]))for(n in t)r=fe(u,n),u!==(i=fe(t,n))&&(c&&i&&(le(i)||(o=se(i)))?(o?(o=!1,a=r&&se(r)?r:[]):a=r&&le(r)?r:{},ce(u,{name:n,newValue:e(c,a,i)})):void 0!==i&&ce(u,{name:n,newValue:i}));return u},pe="center",me="bottom",he={NoDataExist:{label:"NoDataExist",alignment:pe,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:pe,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:pe,default:!1},LimitedData:{label:"LimitedData",alignment:me,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:me,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:me,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:me,default:!1}};var ve=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],ge={};ve.forEach((function(e){var t=Q(e,2),n=t[0],r=t[1],i=r.width,o=r.height;ge[n]={width:i,height:o}}));var ye=function(){return ge},be=function(e,t){var n;for(n=0;n<ve.length;++n)if(e>=ve[n][1].width&&t>=ve[n][1].height)return ve[n][0];return"SPARK"};function xe(e,t){return{layoutModes:ye(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?R({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}var qe=["$date","$timestamp","$time"],Me=["D","TS","T"],Se={hasTimeTag:function(e){return!!(e&&e.qTags&&e.qTags.some((function(e){return qe.some((function(t){return t===e}))})))},hasUnknownFormat:function(e){return!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType)},hasTimeFormat:function(e){return!!(e&&e.qNumFormat&&Me.some((function(t){return t===e.qNumFormat.qType})))},isTimeDimension:function(e,t){return!!(e&&t&&(Se.hasTimeTag(t)&&Se.hasUnknownFormat(t)||Se.hasTimeFormat(t)))},isTime:function(e,t){return!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&Se.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0]))},canBeContinuousDimension:function(e){if(!e)return!1;var t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((function(e){return"$numeric"===e})))},canBeContinuous:function(e){return!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&Se.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0])},maxNumberOfLines:12},De=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},Ce=function(e,t,n){if(n>=e.length)for(var r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])},we=function(e){Object.keys(e).forEach((function(t){void 0===e[t]&&delete e[t]}))},Oe=function(e){return De(e,"qHyperCube.qDimensionInfo",[])},Te=function(e){return De(e,"qHyperCube.qMeasureInfo",[])},Ae=function(e){return De(e,"barGrouping.grouping")},Ee={continuous:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!Se.canBeContinuous(e)&&(De(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis)},dimensionless:function(e){return!Oe(e).length},grouped:function(e){return!this.dimensionless(e)&&"grouped"===Ae(e)&&(Oe(e).length>1||Te(e).length>1)&&!this.continuous(e)},groupedByDimension:function(e){return this.grouped(e)&&Oe(e).length>1&&1===Te(e).length},groupedByMeasure:function(e){return this.grouped(e)&&1===Oe(e).length&&Te(e).length>1},stacked:function(e){return(!this.dimensionless(e)&&"grouped"!==Ae(e)||this.continuous(e))&&(Oe(e).length>1||Te(e).length>1)},stackedByDimension:function(e){return this.stacked(e)&&Oe(e).length>1&&1===Te(e).length},stackedByMeasure:function(e){return this.stacked(e)&&1===Oe(e).length&&Te(e).length>1},simple:function(e){return 0===Oe(e).length||1===Oe(e).length&&1===Te(e).length},snapshot:function(e){return!!De(e,"snapshotData")}};function Le(e,t){var n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}var ke=function(e){throw e.isHandled=!0,e};function Ne(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(ke).then((function(e){var n,r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),u=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[u[0],u[0]]:u.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}var Ie={getDockValue:function(e){return"near"===e||"left"===e||"top"===e?0:1},getOppositeDock:function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:function(e){return"near"===e||"left"===e?"left":"right"},getVerticalDock:function(e){return"near"===e||"bottom"===e?"bottom":"top"},getDock:function(e,t,n){return"vertical"===e||"y"===e?Ie.getVerticalDock(t):n?Ie.getOppositeDock(Ie.getHorizontalDock(t)):Ie.getHorizontalDock(t)},getInvertedOrientation:function(e){return"vertical"===e?"horizontal":"vertical"},getMinorScaleAxis:function(e){return"vertical"===e?"y":"x"},getMajorScaleAxis:function(e){return"vertical"===e?"x":"y"},getAlignment:function(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:function(e,t){return"vertical"===e||t},getDimensionScaleInvert:function(e,t){return"horizontal"===e&&t},getSize:function(e,t){var n=t.width,r=t.height;return"vertical"===e?n:r}},je=function(e,t){if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};var Pe={stringWidthOverMWidth:function(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11},getCharacterRatios:function(e){if(!e)return{latin:0,cjk:0};var t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g),i=(t=t?t.length:0)+(n=n?n.length:0)+(r=r?r.length:0);return{latin:e.length-i,cjk:i}},getTotalCharacterRatios:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"qText";if(!e)return{latinRatio:1,cjkRatio:0};var r,i={latin:0,cjk:0};void 0===t?e.forEach((function(e){r=Pe.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk})):e.forEach((function(e){r=Pe.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk}));var o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"qText",i=Pe.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e,u=Math.ceil(Pe.stringWidthOverMWidth(o)+1.0909090909090908*a);return u}};function Re(){if(!document.querySelector("#la-vie-tooltip")){var e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Fe(e){var t=e.key;return{show:!0,key:void 0===t?"tooltip":t,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Re()},beforeUpdate:function(){Re()},destroyed:function(){var e;(e=document.querySelector("#la-vie-tooltip"))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector("#la-vie-tooltip")},content:function(e){var t=e.h,n=e.data,r=e.style;return n[0].map((function(e){return t("tr",{},function(e,t){var n=t.h,r=t.style;return e.map((function(e){var t={style:R(R({},r.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),n("td",t,e.content)}))}(e,{h:t,style:r}))}))},direction:e.rtl?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var ze=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),He=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ve=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Be={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return ze.test(e)},isRtlChar:function(e){return He.test(e)||Ve.test(e)},detectTextDirection:function(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Be.isLtrChar(n))return"ltr";if(Be.isRtlChar(n))return"rtl"}return"ltr"}},_e={getColorSymbol:function(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})},getNodeFillColor:function(e){return e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0},getColor:function(e,t,n){var r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label="".concat(n.coloring.label)),"color"!==n.coloring.type&&r.fillTooltip){var u=i("fill"),s="measure"===n.coloring.fieldType;if(a.value=s&&u?u(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){var l=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===r._fillColor?_e.getNodeFillColor(t):r._fillColor,a},getMeasure:function(e,t){var n=e(t.source.key).field(t.source.field).title();return{label:"".concat(n),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}},hideColorRow:function(e,t){return void 0===e.color.value||e.measures.some((function(e){return e.field===t.coloring.field}))},getTitleRow:function(e,t){var n=Be.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow:function(e,t){var n=Be.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getFooterRow:function(e,t){return[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Be.detectTextDirection(e)},colspan:2},{}]},getImageRow:function(e,t){var n=Be.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:o,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]="url('".concat(e.src,"')");return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]},getNMoreRow:function(e,t,n){var r=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more");return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Be.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:function(){return[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}]},getColorRow:function(e,t,n){var r=Be.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Be.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,_e.getColorSymbol(e,t)]:[_e.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=Be.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],u=Be.detectTextDirection(e.value);return[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:i?r?[e.value,_e.getColorSymbol(t,n)]:[_e.getColorSymbol(t,n),e.value]:[e.value],style:{"text-align":r?"left":"right",direction:u,"vertical-align":"middle"}}]}};function Ue(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function We(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ke(){}var Ge="\\s*([+-]?\\d+)\\s*",Ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Je=/^#([0-9a-f]{3,8})$/,$e=new RegExp("^rgb\\("+[Ge,Ge,Ge]+"\\)$"),Ze=new RegExp("^rgb\\("+[Xe,Xe,Xe]+"\\)$"),Qe=new RegExp("^rgba\\("+[Ge,Ge,Ge,Ye]+"\\)$"),et=new RegExp("^rgba\\("+[Xe,Xe,Xe,Ye]+"\\)$"),tt=new RegExp("^hsl\\("+[Ye,Xe,Xe]+"\\)$"),nt=new RegExp("^hsla\\("+[Ye,Xe,Xe,Ye]+"\\)$"),rt={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 it(){return this.rgb().formatHex()}function ot(){return this.rgb().formatRgb()}function at(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Je.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ut(t):3===n?new ct(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?st(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?st(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=$e.exec(e))?new ct(t[1],t[2],t[3],1):(t=Ze.exec(e))?new ct(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Qe.exec(e))?st(t[1],t[2],t[3],t[4]):(t=et.exec(e))?st(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=tt.exec(e))?mt(t[1],t[2]/100,t[3]/100,1):(t=nt.exec(e))?mt(t[1],t[2]/100,t[3]/100,t[4]):rt.hasOwnProperty(e)?ut(rt[e]):"transparent"===e?new ct(NaN,NaN,NaN,0):null}function ut(e){return new ct(e>>16&255,e>>8&255,255&e,1)}function st(e,t,n,r){return r<=0&&(e=t=n=NaN),new ct(e,t,n,r)}function lt(e){return e instanceof Ke||(e=at(e)),e?new ct((e=e.rgb()).r,e.g,e.b,e.opacity):new ct}function ct(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ft(){return"#"+pt(this.r)+pt(this.g)+pt(this.b)}function dt(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function pt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function mt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vt(e,t,n,r)}function ht(e){if(e instanceof vt)return new vt(e.h,e.s,e.l,e.opacity);if(e instanceof Ke||(e=at(e)),!e)return new vt;if(e instanceof vt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=t===o?(n-r)/u+6*(n<r):n===o?(r-t)/u+2:(t-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new vt(a,u,s,e.opacity)}function vt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function gt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ue(Ke,at,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:it,formatHex:it,formatHsl:function(){return ht(this).formatHsl()},formatRgb:ot,toString:ot}),Ue(ct,(function(e,t,n,r){return 1===arguments.length?lt(e):new ct(e,t,n,null==r?1:r)}),We(Ke,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:ft,formatHex:ft,formatRgb:dt,toString:dt})),Ue(vt,(function(e,t,n,r){return 1===arguments.length?ht(e):new vt(e,t,n,null==r?1:r)}),We(Ke,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new vt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new vt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new ct(gt(e>=240?e-240:e+120,i,r),gt(e,i,r),gt(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var yt=Math.PI/180,bt=180/Math.PI,xt=4/29,qt=6/29,Mt=3*qt*qt;function St(e){if(e instanceof Dt)return new Dt(e.l,e.a,e.b,e.opacity);if(e instanceof Lt)return kt(e);e instanceof ct||(e=lt(e));var t,n,r=Tt(e.r),i=Tt(e.g),o=Tt(e.b),a=Ct((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ct((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Ct((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Dt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Dt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ct(e){return e>.008856451679035631?Math.pow(e,1/3):e/Mt+xt}function wt(e){return e>qt?e*e*e:Mt*(e-xt)}function Ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Tt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function At(e){if(e instanceof Lt)return new Lt(e.h,e.c,e.l,e.opacity);if(e instanceof Dt||(e=St(e)),0===e.a&&0===e.b)return new Lt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*bt;return new Lt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Et(e,t,n,r){return 1===arguments.length?At(e):new Lt(e,t,n,null==r?1:r)}function Lt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function kt(e){if(isNaN(e.h))return new Dt(e.l,0,0,e.opacity);var t=e.h*yt;return new Dt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ue(Dt,(function(e,t,n,r){return 1===arguments.length?St(e):new Dt(e,t,n,null==r?1:r)}),We(Ke,{brighter:function(e){return new Dt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Dt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){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 ct(Ot(3.1338561*(t=.96422*wt(t))-1.6168667*(e=1*wt(e))-.4906146*(n=.82521*wt(n))),Ot(-.9787684*t+1.9161415*e+.033454*n),Ot(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ue(Lt,Et,We(Ke,{brighter:function(e){return new Lt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Lt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return kt(this).rgb()}}));var Nt={isDark:function(e){return Et(e).l<70}};function It(e){var t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((function(e){e.qSortByNumeric=1,e.qSortByAscii=1}))}function jt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pt(e){return 1===e.length&&(e=function(e){return function(t,n){return jt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var Rt=Pt(jt).right,Ft=Math.sqrt(50),zt=Math.sqrt(10),Ht=Math.sqrt(2);function Vt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Ft?10:o>=zt?5:o>=Ht?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ft?10:o>=zt?5:o>=Ht?2:1)}function Bt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Ft?i*=10:o>=zt?i*=5:o>=Ht&&(i*=2),t<e?-i:i}function _t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Ut(){}function Wt(e,t){var n=new Ut;if(e instanceof Ut)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Kt(){}Ut.prototype=Wt.prototype={constructor:Ut,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var Gt=Wt.prototype;Kt.prototype={constructor:Kt,has:Gt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Gt.remove,clear:Gt.clear,values:Gt.keys,size:Gt.size,empty:Gt.empty,each:Gt.each};var Yt=Array.prototype,Xt=Yt.map,Jt=Yt.slice;function $t(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qt(){}var en=1/.7,tn="\\s*([+-]?\\d+)\\s*",nn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",on=/^#([0-9a-f]{3})$/,an=/^#([0-9a-f]{6})$/,un=new RegExp("^rgb\\("+[tn,tn,tn]+"\\)$"),sn=new RegExp("^rgb\\("+[rn,rn,rn]+"\\)$"),ln=new RegExp("^rgba\\("+[tn,tn,tn,nn]+"\\)$"),cn=new RegExp("^rgba\\("+[rn,rn,rn,nn]+"\\)$"),fn=new RegExp("^hsl\\("+[nn,rn,rn]+"\\)$"),dn=new RegExp("^hsla\\("+[nn,rn,rn,nn]+"\\)$"),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 mn(e){var t;return e=(e+"").trim().toLowerCase(),(t=on.exec(e))?new bn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=an.exec(e))?hn(parseInt(t[1],16)):(t=un.exec(e))?new bn(t[1],t[2],t[3],1):(t=sn.exec(e))?new bn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ln.exec(e))?vn(t[1],t[2],t[3],t[4]):(t=cn.exec(e))?vn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=fn.exec(e))?qn(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?qn(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?hn(pn[e]):"transparent"===e?new bn(NaN,NaN,NaN,0):null}function hn(e){return new bn(e>>16&255,e>>8&255,255&e,1)}function vn(e,t,n,r){return r<=0&&(e=t=n=NaN),new bn(e,t,n,r)}function gn(e){return e instanceof Qt||(e=mn(e)),e?new bn((e=e.rgb()).r,e.g,e.b,e.opacity):new bn}function yn(e,t,n,r){return 1===arguments.length?gn(e):new bn(e,t,n,null==r?1:r)}function bn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function xn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function qn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Sn(e,t,n,r)}function Mn(e){if(e instanceof Sn)return new Sn(e.h,e.s,e.l,e.opacity);if(e instanceof Qt||(e=mn(e)),!e)return new Sn;if(e instanceof Sn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=t===o?(n-r)/u+6*(n<r):n===o?(r-t)/u+2:(t-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new Sn(a,u,s,e.opacity)}function Sn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$t(Qt,mn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),$t(bn,yn,Zt(Qt,{brighter:function(e){return e=null==e?en:Math.pow(en,e),new bn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new bn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+xn(this.r)+xn(this.g)+xn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),$t(Sn,(function(e,t,n,r){return 1===arguments.length?Mn(e):new Sn(e,t,n,null==r?1:r)}),Zt(Qt,{brighter:function(e){return e=null==e?en:Math.pow(en,e),new Sn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Sn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new bn(Dn(e>=240?e-240:e+120,i,r),Dn(e,i,r),Dn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Cn=Math.PI/180,wn=180/Math.PI,On=4/29,Tn=6/29,An=3*Tn*Tn;function En(e){if(e instanceof Ln)return new Ln(e.l,e.a,e.b,e.opacity);if(e instanceof Rn){if(isNaN(e.h))return new Ln(e.l,0,0,e.opacity);var t=e.h*Cn;return new Ln(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof bn||(e=gn(e));var n,r,i=jn(e.r),o=jn(e.g),a=jn(e.b),u=kn((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=u:(n=kn((.4360747*i+.3850649*o+.1430804*a)/.96422),r=kn((.0139322*i+.0971045*o+.7141733*a)/.82521)),new Ln(116*u-16,500*(n-u),200*(u-r),e.opacity)}function Ln(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function kn(e){return e>.008856451679035631?Math.pow(e,1/3):e/An+On}function Nn(e){return e>Tn?e*e*e:An*(e-On)}function In(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function jn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Pn(e){if(e instanceof Rn)return new Rn(e.h,e.c,e.l,e.opacity);if(e instanceof Ln||(e=En(e)),0===e.a&&0===e.b)return new Rn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wn;return new Rn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Rn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}$t(Ln,(function(e,t,n,r){return 1===arguments.length?En(e):new Ln(e,t,n,null==r?1:r)}),Zt(Qt,{brighter:function(e){return new Ln(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ln(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){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 bn(In(3.1338561*(t=.96422*Nn(t))-1.6168667*(e=1*Nn(e))-.4906146*(n=.82521*Nn(n))),In(-.9787684*t+1.9161415*e+.033454*n),In(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),$t(Rn,(function(e,t,n,r){return 1===arguments.length?Pn(e):new Rn(e,t,n,null==r?1:r)}),Zt(Qt,{brighter:function(e){return new Rn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Rn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return En(this).rgb()}}));var Fn=-.29227,zn=-.90649,Hn=1.97294,Vn=Hn*zn,Bn=1.78277*Hn,_n=-.6557636667999999;function Un(e){if(e instanceof Wn)return new Wn(e.h,e.s,e.l,e.opacity);e instanceof bn||(e=gn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(_n*r+Vn*t-Bn*n)/(_n+Vn-Bn),o=r-i,a=(Hn*(n-i)-Fn*o)/zn,u=Math.sqrt(a*a+o*o)/(Hn*i*(1-i)),s=u?Math.atan2(a,o)*wn-120:NaN;return new Wn(s<0?s+360:s,u,i,e.opacity)}function Wn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Kn(e){return function(){return e}}function Gn(e){return 1==(e=+e)?Yn: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):Kn(isNaN(t)?n:t)}}function Yn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Kn(isNaN(e)?t:e)}$t(Wn,(function(e,t,n,r){return 1===arguments.length?Un(e):new Wn(e,t,n,null==r?1:r)}),Zt(Qt,{brighter:function(e){return e=null==e?en:Math.pow(en,e),new Wn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Wn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Cn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new bn(255*(t+n*(-.14861*r+1.78277*i)),255*(t+n*(Fn*r+zn*i)),255*(t+n*(Hn*r)),this.opacity)}}));var Xn=function e(t){var n=Gn(t);function r(e,t){var r=n((e=yn(e)).r,(t=yn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Yn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Jn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=rr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function $n(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Zn(e,t){return t-=e=+e,function(n){return e+t*n}}function Qn(e,t){var n,r={},i={};for(n in null!==e&&"object"===F(e)||(e={}),null!==t&&"object"===F(t)||(t={}),t)n in e?r[n]=rr(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tr=new RegExp(er.source,"g");function nr(e,t){var n,r,i,o=er.lastIndex=tr.lastIndex=0,a=-1,u=[],s=[];for(e+="",t+="";(n=er.exec(e))&&(r=tr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:Zn(n,r)})),o=tr.lastIndex;return o<t.length&&(i=t.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)u[(n=s[r]).i]=n.x(e);return u.join("")})}function rr(e,t){var n,r=F(t);return null==t||"boolean"===r?Kn(t):("number"===r?Zn:"string"===r?(n=mn(t))?(t=n,Xn):nr:t instanceof mn?Xn:t instanceof Date?$n:Array.isArray(t)?Jn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Zn)(e,t)}function ir(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function or(e){return+e}var ar=[0,1];function ur(e){return e}function sr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function lr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function cr(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=sr(i,r),o=n(a,o)):(r=sr(r,i),o=n(o,a)),function(e){return o(r(e))}}function fr(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=sr(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,r)-1;return o[n](i[n](t))}}function dr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pr(e,t){return function(){var e,t,n,r,i,o,a=ar,u=ar,s=rr,l=ur;function c(){return r=Math.min(a.length,u.length)>2?fr:cr,i=o=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),u,s)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(u,a.map(e),Zn)))(n)))},f.domain=function(e){return arguments.length?(a=Xt.call(e,or),l===ur||(l=lr(a)),c()):a.slice()},f.range=function(e){return arguments.length?(u=Jt.call(e),c()):u.slice()},f.rangeRound=function(e){return u=Jt.call(e),s=ir,c()},f.clamp=function(e){return arguments.length?(l=e?lr(a):ur,f):l!==ur},f.interpolate=function(e){return arguments.length?(s=e,c()):s},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function mr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hr(e){return(e=mr(Math.abs(e)))?e[1]:NaN}var vr,gr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yr(e){return new br(e)}function br(e){if(!(t=gr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function xr(e,t){var n=mr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}yr.prototype=br.prototype,br.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return xr(100*e,t)},r:xr,s:function(e,t){var n=mr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(vr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+mr(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Mr(e){return e}var Sr,Dr,Cr,wr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Or(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(e.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}):Mr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Mr,u=e.percent||"%";function s(e){var t=(e=yr(e)).fill,n=e.align,s=e.sign,l=e.symbol,c=e.zero,f=e.width,d=e.comma,p=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):qr[h]||(null==p&&(p=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var v="$"===l?i[0]:"#"===l&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",g="$"===l?i[1]:/[%p]/.test(h)?u:"",y=qr[h],b=/[defgprs%]/.test(h);function x(e){var i,u,l,x=v,q=g;if("c"===h)q=y(e)+q,e="";else{var M=(e=+e)<0;if(e=y(Math.abs(e),p),m&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0==+e&&(M=!1),x=(M?"("===s?s:"-":"-"===s||"("===s?"":s)+x,q=("s"===h?wr[8+vr/3]:"")+q+(M&&"("===s?")":""),b)for(i=-1,u=e.length;++i<u;)if(48>(l=e.charCodeAt(i))||l>57){q=(46===l?o+e.slice(i+1):e.slice(i))+q,e=e.slice(0,i);break}}d&&!c&&(e=r(e,1/0));var S=x.length+e.length+q.length,D=S<f?new Array(f-S+1).join(t):"";switch(d&&c&&(e=r(D+e,D.length?f-q.length:1/0),D=""),n){case"<":e=x+e+q+D;break;case"=":e=x+D+e+q;break;case"^":e=D.slice(0,S=D.length>>1)+x+e+q+D.slice(S);break;default:e=D+x+e+q}return a(e)}return p=null==p?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),x.toString=function(){return e+""},x}return{format:s,formatPrefix:function(e,t){var n=s(((e=yr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hr(t)/3))),i=Math.pow(10,-r),o=wr[8+r/3];return function(e){return n(i*e)+o}}}}function Tr(e,t,n,r){var i,o=Bt(e,t,n);switch((r=yr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hr(t)/3)))-hr(Math.abs(e)))}(o,a))||(r.precision=i),Cr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hr(t)-hr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-hr(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Dr(r)}function Ar(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,u=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Vt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++u<i;)o[u]=(e+u)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++u<i;)o[u]=(e-u)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Tr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,u=i[o],s=i[a];return s<u&&(r=u,u=s,s=r,r=o,o=a,a=r),(r=Vt(u,s,n))>0?r=Vt(u=Math.floor(u/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=Vt(u=Math.ceil(u*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(s/r)*r,t(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(s*r)/r,t(i)),e},e}function Er(){var e=pr(ur,ur);return e.copy=function(){return dr(e,Er())},_t.apply(e,arguments),Ar(e)}Sr=Or({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Dr=Sr.format,Cr=Sr.formatPrefix;var Lr=new Date,kr=new Date;function Nr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,u=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return u;do{u.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return u},i.filter=function(n){return Nr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return Lr.setTime(+t),kr.setTime(+r),e(Lr),e(kr),Math.floor(n(Lr,kr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Ir=Nr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Ir.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Nr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Ir:null};var jr=Nr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));Nr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),Nr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var Pr=Nr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function Rr(e){return Nr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var Fr=Rr(0),zr=Rr(1);Rr(2),Rr(3);var Hr=Rr(4);Rr(5),Rr(6),Nr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var Vr=Nr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Vr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Nr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Br=Nr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),_r=Nr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),Ur=Nr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Wr(e){return Nr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Kr=Wr(0),Gr=Wr(1);Wr(2),Wr(3);var Yr=Wr(4);Wr(5),Wr(6);var Xr=Nr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Jr=Nr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function $r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Zr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Qr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Jr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Nr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var ei,ti,ni,ri={"-":"",_:" ",0:"0"},ii=/^\s*\d+/,oi=/^%/,ai=/[\\^$*+?|[\]().{}]/g;function ui(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function si(e){return e.replace(ai,"\\$&")}function li(e){return new RegExp("^(?:"+e.map(si).join("|")+")","i")}function ci(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function fi(e,t,n){var r=ii.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function di(e,t,n){var r=ii.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function vi(e,t,n){var r=ii.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function gi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function yi(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function bi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function xi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function qi(e,t,n){var r=ii.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Mi(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Si(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Di(e,t,n){var r=ii.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ci(e,t,n){var r=ii.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function wi(e,t,n){var r=ii.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Oi(e,t,n){var r=oi.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ti(e,t,n){var r=ii.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ai(e,t,n){var r=ii.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Ei(e,t){return ui(e.getDate(),t,2)}function Li(e,t){return ui(e.getHours(),t,2)}function ki(e,t){return ui(e.getHours()%12||12,t,2)}function Ni(e,t){return ui(1+Pr.count(Vr(e),e),t,3)}function Ii(e,t){return ui(e.getMilliseconds(),t,3)}function ji(e,t){return Ii(e,t)+"000"}function Pi(e,t){return ui(e.getMonth()+1,t,2)}function Ri(e,t){return ui(e.getMinutes(),t,2)}function Fi(e,t){return ui(e.getSeconds(),t,2)}function zi(e){var t=e.getDay();return 0===t?7:t}function Hi(e,t){return ui(Fr.count(Vr(e),e),t,2)}function Vi(e,t){var n=e.getDay();return e=n>=4||0===n?Hr(e):Hr.ceil(e),ui(Hr.count(Vr(e),e)+(4===Vr(e).getDay()),t,2)}function Bi(e){return e.getDay()}function _i(e,t){return ui(zr.count(Vr(e),e),t,2)}function Ui(e,t){return ui(e.getFullYear()%100,t,2)}function Wi(e,t){return ui(e.getFullYear()%1e4,t,4)}function Ki(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ui(t/60|0,"0",2)+ui(t%60,"0",2)}function Gi(e,t){return ui(e.getUTCDate(),t,2)}function Yi(e,t){return ui(e.getUTCHours(),t,2)}function Xi(e,t){return ui(e.getUTCHours()%12||12,t,2)}function Ji(e,t){return ui(1+Ur.count(Jr(e),e),t,3)}function $i(e,t){return ui(e.getUTCMilliseconds(),t,3)}function Zi(e,t){return $i(e,t)+"000"}function Qi(e,t){return ui(e.getUTCMonth()+1,t,2)}function eo(e,t){return ui(e.getUTCMinutes(),t,2)}function to(e,t){return ui(e.getUTCSeconds(),t,2)}function no(e){var t=e.getUTCDay();return 0===t?7:t}function ro(e,t){return ui(Kr.count(Jr(e),e),t,2)}function io(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Yr(e):Yr.ceil(e),ui(Yr.count(Jr(e),e)+(4===Jr(e).getUTCDay()),t,2)}function oo(e){return e.getUTCDay()}function ao(e,t){return ui(Gr.count(Jr(e),e),t,2)}function uo(e,t){return ui(e.getUTCFullYear()%100,t,2)}function so(e,t){return ui(e.getUTCFullYear()%1e4,t,4)}function lo(){return"+0000"}function co(){return"%"}function fo(e){return+e}function po(e){return Math.floor(+e/1e3)}!function(e){ei=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,u=e.months,s=e.shortMonths,l=li(i),c=ci(i),f=li(o),d=ci(o),p=li(a),m=ci(a),h=li(u),v=ci(u),g=li(s),y=ci(s),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:null,d:Ei,e:Ei,f:ji,H:Li,I:ki,j:Ni,L:Ii,m:Pi,M:Ri,p:function(e){return i[+(e.getHours()>=12)]},Q:fo,s:po,S:Fi,u:zi,U:Hi,V:Vi,w:Bi,W:_i,x:null,X:null,y:Ui,Y:Wi,Z:Ki,"%":co},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:Gi,e:Gi,f:Zi,H:Yi,I:Xi,j:Ji,L:$i,m:Qi,M:eo,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:fo,s:po,S:to,u:no,U:ro,V:io,w:oo,W:ao,x:null,X:null,y:uo,Y:so,Z:lo,"%":co},q={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return D(e,t,n,r)},d:xi,e:xi,f:wi,H:Mi,I:Mi,j:qi,L:Ci,m:bi,M:Si,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Ti,s:Ai,S:Di,u:di,U:pi,V:mi,w:fi,W:hi,x:function(e,t,r){return D(e,n,t,r)},X:function(e,t,n){return D(e,r,t,n)},y:gi,Y:vi,Z:yi,"%":Oi};function M(e,t){return function(n){var r,i,o,a=[],u=-1,s=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++u<l;)37===e.charCodeAt(u)&&(a.push(e.slice(s,u)),null!=(i=ri[r=e.charAt(++u)])?r=e.charAt(++u):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),s=u+1);return a.push(e.slice(s,u)),a.join("")}}function S(e,t){return function(n){var r,i,o=Qr(1900);if(D(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Zr(Qr(o.y))).getUTCDay(),r=i>4||0===i?Gr.ceil(r):Gr(r),r=Ur.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(Qr(o.y))).getDay(),r=i>4||0===i?zr.ceil(r):zr(r),r=Pr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Zr(Qr(o.y)).getUTCDay():t(Qr(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Zr(o)):t(o)}}function D(e,t,n,r){for(var i,o,a=0,u=t.length,s=n.length;a<u;){if(r>=s)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in ri?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",$r);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e,Zr);return t.toString=function(){return e},t}}}(e),ti=ei.utcFormat,ni=ei.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||ti("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||ni("%Y-%m-%dT%H:%M:%S.%LZ");function mo(e){return new Date(e)}function ho(e){return e instanceof Date?+e:+new Date(+e)}function vo(e,t,n,r,i,o,a,u,s){var l=pr(ur,ur),c=l.invert,f=l.domain,d=s(".%L"),p=s(":%S"),m=s("%I:%M"),h=s("%I %p"),v=s("%a %d"),g=s("%b %d"),y=s("%B"),b=s("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function q(u){return(a(u)<u?d:o(u)<u?p:i(u)<u?m:r(u)<u?h:t(u)<u?n(u)<u?v:g:e(u)<u?y:b)(u)}function M(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Pt((function(e){return e[2]})).right(x,o);a===x.length?(i=Bt(n/31536e6,r/31536e6,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(Bt(n,r,t),1),t=u)}return null==i?t:t.every(i)}return l.invert=function(e){return new Date(c(e))},l.domain=function(e){return arguments.length?f(Xt.call(e,ho)):f().map(mo)},l.ticks=function(e,t){var n,r=f(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=M(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(e,t){return null==t?q:s(t)},l.nice=function(e,t){var n=f();return(e=M(e,n[0],n[n.length-1],t))?f(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):l},l.copy=function(){return dr(l,vo(e,t,n,r,i,o,a,u,s))},l}var go,yo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},bo=function(e){return"".concat(e," 12px -12px inset rgba(0, 0, 0, ").concat(.0625,")")},xo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:function(){return[0,1]}}},renderer:"dom",render:function(e){var t=this.settings.settings,n=t.range,r=t.orientation,i=t.rtl,o=Q(n(),2),a=o[0],u=o[1],s=Math.abs(a)<1e-15,l=Math.abs(u-1)<1e-15,c=function(e){var t,n,r,i=yo[e];return{base:(t={position:"absolute"},U(t,i.major,12),U(t,i.minor,"100%"),t),towardsStart:(n={},U(n,i.start,0),U(n,i.end,"auto"),U(n,"boxShadow",bo(i.shadow.startOffset)),n),towardsEnd:(r={},U(r,i.start,"auto"),U(r,i.end,0),U(r,"boxShadow",bo(i.shadow.endOffset)),r)}}(r),f="horizontal"===r&&i,d=[];return s||d.push(e("div",{style:R(R({},c.base),f?c.towardsEnd:c.towardsStart),class:"scroll-hint--towards-start"})),l||d.push(e("div",{style:R(R({},c.base),f?c.towardsStart:c.towardsEnd),class:"scroll-hint--towards-end"})),d}};function qo(e){var t=e.viewState,n=e.viewCache,r=e.layoutService,i=e.dockService,o=e.rtl;return!r.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:o,range:function(){return function(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}({layoutService:r,viewState:t,viewCache:n})}}}}function Mo(){go=go||document.createElement("canvas").getContext("2d")}var So={measureTextWidth:function(e){return Mo(),go.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;Mo();var a,u,s=e?e.split(/\n+|\r+|\r\n/):[],l=[],c=e?e.split(/\s+/):[],f=s[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&s.length>=r)return s.slice(0,r);for(n&&(go.font=n),o=0;o<s.length;o++){for(f=Q(c=(s[o]||"").split(/\s+/),1)[0],u="",i=1;i<c.length;i++)if(a="".concat(f," ").concat(c[i]),So.measureTextWidth(a)>t&&("number"!=typeof r||r>l.length)?(l.push(f),f=c[i]):f=a,"number"==typeof r&&l.length>=r){u=c.slice(i+1).join(" ");break}"number"!=typeof r||l.length<r?l.push(f):l[Math.max(0,l.length-1)]="".concat(l[Math.max(0,l.length-1)]||""," ").concat(f," ").concat(u)}return l},wordWrap:function(e,t,n,r,i){if(Mo(),!e||!e.length)return[];n&&(go.font=n);var o,a,u,s,l=[],c=e.slice();if(c.filter((function(e){return!!e})),"number"!=typeof t||t<0)return e.slice();for(s=0;s<c.length;s++)a=null,(u=c[s])&&(u.length<=1||So.measureTextWidth(u)<=t?l.push(u):(o=So.splitWord(u,t,void 0,r-l.length)).length<=1?l.push(o[0]):(a=o.pop(),l=l.concat(o),c[s+1]?So.measureTextWidth("".concat(a," ").concat(c[s+1]))>t&&l.length+c.length-s<=r?c.splice(s+1,0,a):c[s+1]="".concat(a," ").concat(c[s+1]):c.push(a)));return l.forEach((function(e,t,n){n[t]=e?e.trim():e})),l.length>r?(l=l.splice(0,r))[l.length-1]=So.truncate(l[l.length-1],t,n,i).text:(u=l[l.length-1])&&u.length>1&&So.measureTextWidth(u)>t&&(l[l.length-1]=So.truncate(u,t,n,i).text),l},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";Mo();var i,o,a,u=e,s=So.measureTextWidth("i"),l=Math.ceil(t/s);if(n&&(go.font=n),e&&t){if(So.measureTextWidth(u)>t){for(i=Math.min(l,u.length);i>0;i--)if(o=u.substring(0,i-1).trim()+r,So.measureTextWidth(o)<=t){a=u.substring(i-1),u=o;break}i||(a=u,u="…")}}else a=void 0;return{text:u,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;Mo();var o=e,a="",u=[];if(So.isNumber(n)&&n<=1)return[e];var s=Math.ceil(t/r);for(i=Math.min(e.length,s);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(So.measureTextWidth(o)<=t));i--);return(!i&&!o||So.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),u.push(o),a?(So.measureTextWidth(a)>t?(a=So.explodeWord(a,t,n-1,r),u=u.concat(a)):u.push(a),u.filter((function(e){return""!==e.trim()}))):u},splitWord:function(e,t,n,r){return Mo(),e&&t?(n&&(go.font=n),So.explodeWord(e,t,r,Math.max(1,So.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?So.lineWrap(e,t,n,r):[e],o=So.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return Mo(),e&&(go.font=e),1.5*So.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;Mo(),t&&(go.font=t);var u=So.getFontHeight(),s=a*u,l=[],c=0,f=[];if(o<u)return[];var d=o?Math.max(1,Math.floor(o/s)):r||1;return Array.isArray(r)?(r.forEach((function(e){c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((function(e){l.push(Number.isNaN(e)||e<=0?d-c:e)}))):l=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((function(e,n){f.length<d&&(f=f.concat(So.wrapText(e,i,t,l[n])))})):f=So.wrapText(e,i,t,l[0],n),f}},Do=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},Co=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,u="x",s="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(u="y",s="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(de({},n,(U(t={},u,i*l),U(t,s,Math.max(n.size/2,Math.min(r*c,c-n.size/2))),U(t,"startAngle",f),t)))},wo=de.bind(null,!0),Oo={},To=Array.isArray;function Ao(e){return null!=e&&!Array.isArray(e)&&"object"===F(e)}function Eo(e){return void 0===e}function Lo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ko(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=isNaN(n)?{}:[];e[n||t]=Eo(e[n||t])?o:e[t],e=e[n||t]}})),e}function No(e,t){var n=!0;if(Ao(e)&&Ao(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){No(e[r],t[r])||(n=!1)})),n);if(To(e)&&To(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!No(e[r],t[r]))return!1;return!0}return e===t}Oo.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?wo({},{val:e}).val:e}(t[i]),a=e[i],u="".concat(n,"/").concat(i);No(o,a)||Lo(t,i)||(Eo(a)?r.push({op:"add",path:u,value:o}):Ao(o)&&Ao(a)?r=r.concat(Oo.generate(a,o,u)):To(o)&&To(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&Eo(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(No(t,i))return r;if(!Eo(t[0])&&Eo(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(var u=i.length-1;u>=0;u-=1)-1===(o=a(t,i[u].qInfo&&i[u].qInfo.qId,u))?(r.push({op:"remove",path:"".concat(n,"/").concat(u)}),i.splice(u,1)):r=r.concat(Oo.generate(i[u],t[o],"".concat(n,"/").concat(u)));for(var s=0,l=t.length;s<l;s+=1)-1===(o=a(i,t[s].qInfo&&t[s].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(s),value:t[s]}),i.splice(s,0,t[s])):o!==s&&(r.push({op:"move",path:"".concat(n,"/").concat(s),from:"".concat(n,"/").concat(o)}),i.splice(s,0,i.splice(o,1)[0]));return r}(a,o,u)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){Eo(t[i])&&!Lo(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},Oo.apply=function(e,t){t.forEach((function(t){var n,r=ko(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(To(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(To(o)&&To(t.value)){var u,s=t.value.slice();o.length=0,(u=o).push.apply(u,ee(s))}else if(Ao(o)&&Ao(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!Lo(n,e)&&delete n[e]})),wo(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=ko(e,t.from);To(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(To(r)?r.splice(+i,1):delete r[i])}))},Oo.clone=function(e){return wo({},e)},Oo.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Oo.updateObject=function(e,t){Object.keys(e).length?Oo.apply(e,Oo.generate(e,t)):wo(e,t)};Math.log(10);var Io=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e+Math.abs(e)*t},jo=function(e){return"number"==typeof e&&!Number.isNaN(e)},Po=[[2,4,6],[2,4],[3]],Ro=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Fo(e,t,n){var r,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function zo(e,t,n){var r,i=e?e.length:0;for(r=0;r<i;r++)Fo(e[r],t,n)}!function(){var e,t;for(zo(Po,1,10),e=0;e<Ro.length;e++)if(Ro[e])for(t=0;t<Ro[e].length;t++)Array.isArray(Ro[e][t])&&zo(Ro[e][t])}();var Ho={isInside:function(e,t,n,r){if(!r)return!0;var i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:function(e,t){return Math.abs(e.center-t.center)},getGap:function(e,t){var n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax:function(e,t){var n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin:function(e,t){var n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax:function(e,t,n){var r=Ho.findSegmentPositionMeetMin(e,t);return Ho.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin:function(e,t,n){var r=Ho.findSegmentPositionMeetMax(e,n);return Ho.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin:function(e,t,n){for(var r,i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=e.length-1,u=t,s=0;s<a;s++)r=e[s],i=e[s+1],r.position=Ho.findSegmentPositionMeetMaxThenMin(r,u,(r.center+i.center-o)/2),u=r.position+r.radius+o/2;i.position=Ho.findSegmentPositionMeetMaxThenMin(i,u,n)},adjustPositionFromMax:function(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=e.length-1,s=Math.max(0,e[u].position+e[u].radius-n);if(0!==s){var l,c=0;for(r=u;r>0&&(i=e[r],o=e[r-1],l=Math.max(0,Ho.getGap(o,i)-a),c+=l-=Math.max(0,c+l-s),i.move=l,!(c>=s));r--);for(c<s&&(l=Math.max(0,o.position-o.radius-t),c+=l-=Math.max(0,c+l-s),o.move=l),c=0,r=0;r<=u;r++)c+=(i=e[r]).move||0,i.move=c,i.position-=c}},layout:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0))if(0!==i)Ho.layoutPositionFromMin(e,t,n,r),Ho.adjustPositionFromMax(e,t,n,r);else{var o=e[0];o.position=Ho.findSegmentPositionMeetMaxThenMin(o,t,n)}}},Vo=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Bo=function(e){return!1!==e.show&&0!==e.show&&"0"!==e.show},_o=function(e){return e.filter(Bo)},Uo=function(e,t){return _o(De(e,t,[]))},Wo=function(e){return Bo(e)&&(!1!==e.showValue||!1!==e.showLabel)},Ko=function(e){return e.filter(Wo)},Go=function(e,t){return Ko(De(e,t,[]))},Yo=function(e){var t=e.refLineLayout;return e.layoutService.meta.canBeContinuous?t.refLineExpr.value:t.refLineExpr.stringValue},Xo=function(e,t,n){var r=t.dimensionRefLineInfo;if(r[e])return r[e][n]},Jo=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.maxOrder<i},$o=function(e){var t=e.label,n=(e.dataPages||{}).qArea,r=void 0===n?{}:n,i=r.qTop,o=r.qHeight;return void 0!==i&&void 0!==o&&void 0!==t.valueInfo&&t.valueInfo.minOrder>=i+o},Zo=function(e){var t=e.value,n=e.qMin;return"NaN"!==n&&t<n},Qo=function(e){var t=e.value,n=e.qMax;return"NaN"!==n&&t>n},ea=Uo,ta=function(e){return Uo(e,"refLine.refLines")},na=function(e,t){return t?[]:Uo(e,"refLine.dimRefLines")},ra=Go,ia=function(e){return Go(e,"refLine.refLines")},oa=function(e,t){return t?[]:Go(e,"refLine.dimRefLines")},aa=function(e){var t=e.scale,n=e.size,r=e.value,i=e.valueInfo,o=e.align,a=e.invert,u=void 0!==a&&a,s=e.layoutService;if(!e.isContinuous){var l,c=t.pxScale(n);if(s.meta.isGroupedByMeasure)return l=Vo(c,o,u,s.meta.measureCount),c([r,0])+l;if(s.meta.isGroupedByDimension){if(!i)return NaN;var f,d=i.innerValues,p=i.numInnerValues,m=i.minOrder;return l=Vo(c,o,u,p),d&&d.length&&(f=function(e){for(var t=e.pxScale,n=e.value,r=e.innerValues,i=e.invert,o=e.minOrder,a=function(e){var t=e.pxScale,n=e.invert;return t.bandwidth()*(n?-1:1)}({pxScale:t,invert:i}),u=0;u<r.length;u++){var s=r[u],l=s.id,c=s.order,f=t([n,l]);if(void 0!==f)return f-a*(c-o)}}({pxScale:c,value:r,innerValues:d,invert:u,minOrder:m})),(void 0===f?c(r):f)+l}return l=Vo(c,o,u),c(r)+l}return t(r)},ua=function(e){var t=e.layout,n=e.canBeContinuous,r=e.discreteModel,i=e.layoutService.meta.isGroupedByDimension,o={},a=De(t,"qHyperCube"),u="K"===a.qMode,s=r?r.query.getCurrentDataPage():De(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]),l=De(s,u?"qData.0.qSubNodes":"qMatrix",[]),c=function(e,t){return e?t?"qValue":"qNum":"qText"}(n,u),f=function(e){return e.qArea.qTop}(s);return u?function(){for(var e=0;e<l.length;e++){var t=l[e],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}}():i?function(){for(var e,t=0;t<l.length;t++){var n=l[t][0],r=l[t][1],i=t+f,a=n[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}}():function(){for(var e=0;e<l.length;e++){var t=l[e][0],n=e+f,r=t[c];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}}(),o},sa=Yo,la=Jo,ca=$o,fa=Zo,da=Qo,pa=function(e){var t=e.value,n=e.qMin,r=e.qMax;return Zo({value:t,qMin:n})||Qo({value:t,qMax:r})},ma=function(e){var t=e.label,n=e.dataPages;return t.valueInfo.isMinOrderOk&&$o({label:t,dataPages:n})||t.valueInfo.isMaxOrderOk&&Jo({label:t,dataPages:n})},ha=function(e){var t=e.orientation,n=e.rtl,r=e.isContinuous;return"horizontal"===t?n:r};function va(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines=So.tokenize(i.title,t,"".concat("…"," ").concat(i.valueString),3,n),i.maxNumLines=i.lines.length}}function ga(e){var t=e.title,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,u=void 0===a?200:a,s=So.tokenize(t,n,r,o,u),l=s.length,c="";if(l){c=Q(s,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n").concat(s[f])}return c}function ya(e){var t=e.oobs,n=e.font,r=e.ellipsis,i=e.maxNumLines,o=void 0===i?5:i,a=e.maxWidth,u=void 0===a?200:a,s=t.map((function(e){return ga({title:e.title,font:n,ellipsis:"".concat(r," ").concat(e.valueString),maxNumLines:o,maxWidth:u})})),l=s.length,c="";if(l){c=Q(s,1)[0];for(var f=1;f<l;f++)c="".concat(c,"\n\n").concat(s[f])}return c}function ba(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";e.sort((function(e,n){return e[t]-n[t]}))}function xa(e){var t=e.inputValue,n=e.inputValueLabel,r=e.localeInfo;if(void 0===t||void 0===n||t.toString()===n)return!1;if(!r)return!0;var i="+-".concat(r.qDecimalSep||"").concat(r.qThousandSep||"").replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return n.replace(new RegExp("[0-9e".concat(i,"]"),"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;var t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(n)}var qa=function(e){var t=e.label,n=e.dataPages,r=e.qMin,i=e.qMax;if(void 0!==r&&void 0!==i){var o=t.inputValue;if(da({value:o,qMax:i}))return 1;if(fa({value:o,qMin:r}))return-1}return ca({label:t,dataPages:n})?1:la({label:t,dataPages:n})?-1:0},Ma={hasEngineFormat:xa,calculateLabelPositions:function(e){var t,n,r=e.labels,i=e.scale,o=e.size,a=e.layoutService,u=e.orientation,s=e.rtl,l=e.isContinuous,c=e.isDimension,f=ha({orientation:u,rtl:s,isContinuous:l}),d="S"===a.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",p=a.getHyperCubeValue(d),m=a.meta.canBeContinuous;if(c&&m){var h=a.getLayoutValue("qHyperCube.qDimensionInfo.0");t=h.qMin,n=h.qMax}for(var v=0;v<r.length;v++){var g=r[v],y=g.value,b=g.align,x=g.valueInfo,q=qa({label:g,dataPages:p,qMin:t,qMax:n});g.scaledValue=1===q?f?-.1:1.1:-1===q?f?1.1:-.1:aa({scale:i,size:o,value:y,valueInfo:x,align:b,invert:f,layoutService:a,isContinuous:l}),g.center=g.scaledValue*o}},getTitle:function(e){return!1!==e.showValue?!1!==e.showLabel?"".concat(e.text," ").concat(e.valueString):e.valueString:!1!==e.showLabel?e.text:""},addLabelTitles:function(e){var t,n=e.labels,r=e.formatter,i=e.isContinuous,o=e.canBeContinuous,a=e.localeInfo;if(i)for(var u=0;u<n.length;u++){var s=n[u],l=s.value,c=s.inputValue,f=s.inputValueLabel;t=xa({inputValue:c,inputValueLabel:f,localeInfo:a})?f:r?r(l):l,s.valueString="".concat(Be.lrm,"(").concat(t,")").concat(Be.lrm),s.title=Ma.getTitle(s)}else if(o)for(var d=0;d<n.length;d++){var p=n[d],m=p.valueText,h=p.inputValue,v=p.inputValueLabel;t=xa({inputValue:h,inputValueLabel:v,localeInfo:a})?v:m,p.valueString="".concat(Be.lrm,"(").concat(t,")").concat(Be.lrm),p.title=Ma.getTitle(p)}else for(var g=0;g<n.length;g++){var y=n[g];t=y.valueText,y.valueString="".concat(Be.lrm,"(").concat(t,")").concat(Be.lrm),y.title=Ma.getTitle(y)}},measureLabelsWidth:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:function(e,t){return Math.max.apply(Math,ee(e.lines.map((function(e){return t(e).width}))))},getMaxTextWidth:function(e){var t=e.map((function(e){return e.totalWidth}));return Math.max.apply(Math,ee(t))},addLabelsNeighborInfo:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e.length-1;if(!(i<0)){var o,a,u=Q(e,1);if((o=u[0]).cMin=t,0!==i){for(var s=0;s<i;s++)o=e[s],a=e[s+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n}},getTotalNumLines:function(e){var t=0;return e.forEach((function(e){t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines:function(e,t,n){for(var r=t-1,i=e.filter((function(e){return e.maxNumLines===t})),o=Math.min(n,i.length),a=i.length-1;a>=i.length-o;a--)i[a].maxNumLines=r},reduceTotalMaxNumLines:function(e,t,n){var r=Math.floor(n/t),i=3;do{var o=Ma.getTotalNumLines(e)-r;if(o<=0)return;Ma.reduceLabelsHavingMaxNumLines(e,i,o),i--}while(i>1)},reduceMaxNumLines:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;r<e.length;r++){var i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3?arguments[3]:void 0,i=0;i<e.length;i++){var o=e[i];o.width=Math.min(t,Ma.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments:function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=r.center,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo:function(e){var t=e.labels,n=e.scale,r=e.majorSize,i=e.lowerLimit,o=e.upperLimit,a=e.gap,u=e.font,s=e.maxLabelWidth,l=e.lineHeight,c=e.majorDimension,f=e.orientation,d=e.measureText,p=e.rtl,m=e.layoutService,h=e.isContinuous,v=e.isDimension,g=t.map((function(e){return e})),y=r;Ma.calculateLabelPositions({labels:t,scale:n,size:y,layoutService:m,orientation:f,rtl:p,isContinuous:h,isDimension:v}),ba(t,"center"),Ma.addLabelsNeighborInfo(t,i,o,a),va(t,u,s),Ma.reduceTotalMaxNumLines(g,l,o-(g.length-1)*a),"vertical"===f&&(Ma.reduceMaxNumLines(t,l,.05*a),function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,r=0;r<e.length;r++){var i=e[r];i.lines.length>i.maxNumLines&&(i.lines=So.tokenize(i.title,t,"".concat("…"," ").concat(i.valueString),i.maxNumLines,n))}}(t,u,s)),Ma.addLabelsSize(t,s,l,d),Ma.addLabelSegments(t,c)},createLabels:function(e){var t=e.labels,n=e.style,r=e.maxLabelWidth,i=e.areaProps,o=e.area,a=e.lineHeight,u=void 0===a?15:a,s=e.font,l=i.majorAxis,c=i.minorAxis,f=o.minorCenter,d=n.fontSize,p=n.fontFamily,m=n.background,h=[];return t.forEach((function(e){var t=e.lines,n=t.length,i=t.map((function(t,i){var o={type:"text",text:t,title:ga({title:e.title,font:s,ellipsis:"".concat("…"," ").concat(e.valueString)}),dx:0,dy:0,maxWidth:r,width:r,fontSize:d,fontFamily:p,fill:e.fill,baseline:"central",anchor:"middle"};return o[c]=f,o[l]=e.segment.position,o.y+=(i-(n-1)/2)*u,o}));e.background&&h.push(function(e){var t=e.minorCenter,n=e.majorAxis,r=e.minorAxis,i=e.label,o=e.lineHeight,a=e.background,u=i.lines,s=a.borderRadius,l=void 0===s?3:s,c=a.padding,f=void 0===c?{}:c,d=f.top,p=void 0===d?2:d,m=f.bottom,h=void 0===m?2:m,v=f.left,g=void 0===v?2:v,y=f.right,b=void 0===y?2:y,x=u.length,q={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(g+b),height:i.height+(p+h)};return q[r]=t,q[n]=i.segment.position,q.x-=i.width/2+g,q.y-=x*o/2+p,q}({minorCenter:f,majorAxis:l,minorAxis:c,label:e,lineHeight:u,background:m})),h=h.concat(i)})),h}};function Sa(e,t,n){var r,i=F(t);if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){var o=n.data()&&n.data().fields;r=o&&o[0]?o[0].formatter():null}return r}function Da(e,t,n){return"top"===e||"bottom"===e?function(e,t){var n=t.font,r=t.lineHeight,i=t.top,o=t.bottom,a=t.maxLabelWidth,u=1;return Ma.getMaxTextWidth(e)>a&&(va(e,n,a),u=Math.max.apply(Math,ee(e.map((function(e){return e.lines.length}))))),u*r+i+o}(t,n):function(e,t){var n=t.left,r=t.right,i=t.maxLabelWidth;return Math.min(i,Ma.getMaxTextWidth(e))+n+r}(t,n)}function Ca(e,t){return t?e.domain():[0,1]}function wa(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"value",i=e.filter((function(e){return e[r]>=t}));i=i.filter((function(e){return e[r]<=n}));var o=e.filter((function(e){return e[r]<t})),a=e.filter((function(e){return e[r]>n})),u=o.length,s=a.length;return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:u,numMaxOobs:s}}function Oa(e){for(var t,n=0,r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ta(e,t){return e>9?t[1]:t[0]}function Aa(e){var t=e.alignment,n=e.dockValue,r=e.oobs,i=e.style,o=e.rect,a=e.symbol,u=e.position,s=e.areaProps,l=e.radius,c=e.font,f=r?r.length:0;if(f<1)return[];var d=s.flipXY,p=s.majorAxis,m=s.minorAxis,h=o[s.minorDimension],v=Co({oob:Do({size:i.size,fill:i.fill,alignment:t}),dockValue:n,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:a}),g="c".concat(p),y="c".concat(m),b={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0};b[y]=h/2,b[g]=u;var x={type:"text",text:f>9?"9+":f,title:ya({oobs:r,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle"};return x[m]=h/2,x[p]=u,[v,b,x]}function Ea(e){var t="normal ".concat(e.fontSize," '").concat(e.fontFamily,"'");return{font:t,lineHeight:So.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}var La=function(e){return e.map((function(e){return R(R({},e),{},{value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})}))},ka={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize:function(){var e=this,t=this.scale,n=this.settings,r=n.style,i=n.layoutService,o=n.isContinuous,a=n.localeInfo,u=!!o||i.meta.canBeContinuous,s=La(this.settings.labels),l=Sa(this.chart,this.settings.formatter,t);Ma.addLabelTitles({labels:s,formatter:l,isContinuous:o,canBeContinuous:u,localeInfo:a});var c,f=function(e){var t=e.labels,n=e.scale,r=e.isContinuous,i=e.canBeContinuous,o=e.layoutService;if(r){var a=Q(Ca(n,r),2);return wa(t,a[0],a[1])}if(i){var u=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),s=u.qMin,l=u.qMax;if("NaN"!==s&&"NaN"!==l)return wa(t,s,l,"inputValue")}return{filteredLabels:t}}({labels:s,scale:t,isContinuous:o,canBeContinuous:u,layoutService:i}),d=f.numMaxOobs,p=f.numMinOobs,m=f.filteredLabels;if(this.measureText=function(t){return e.renderer.measureText({text:t,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})},m&&m.length){var h=Ea(r.label),v=this.settings.layout.dock;return Ma.measureLabelsWidth(m,this.measureText),c=Da(v,m,h),c}var g=Oa(this.measureText),y=d?Ta(d,g):0,b=p?Ta(p,g):0;return c=Math.max(y,b),c},render:function(){var e=this.scale;if(e.domain().length){var t=this.symbol,n=this.settings,r=n.style,i=n.layoutService,o=n.theme,a=n.isContinuous,u=n.isDimension,s=n.localeInfo,l=!!a||i.meta.canBeContinuous,c=La(this.settings.labels),f=this.settings.layout,d=f.dock,p=f.rtl,m=r.label.padding,h=function(e){return"left"===e||"right"===e?function(e){return{dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}}(e):function(e){return{dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}}(e)}(d),v=function(e,t,n){var r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,m),g=h.orientation,y=h.majorDimension,b=v.majorSize,x=Ea(r.label),q=x.font,M=x.lineHeight,S=x.gap,D=x.maxLabelWidth,C=Sa(this.chart,this.settings.formatter,e),w=b;Ma.addLabelTitles({labels:c,formatter:C,isContinuous:a,canBeContinuous:l,localeInfo:s}),Ma.calculateLabelPositions({labels:c,scale:e,size:w,layoutService:i,orientation:g,rtl:p,isContinuous:a,isDimension:u});var O=Q(Ca(e,a),2),T=function(e){var t=e.labels,n=e.minValue,r=e.maxValue,i=e.orientation,o=e.rtl,a=e.isContinuous,u=e.style,s=e.padding,l=e.measureText,c=e.prop,f=void 0===c?"value":c,d=wa(t,n,r,f),p=d.maxOobs,m=d.minOobs,h=d.filteredLabels,v="scaledValue"!==f&&ha({orientation:i,rtl:o,isContinuous:a}),g=function(e,t,n){return n?t:e}(m,p,v),y=function(e,t,n){return n?e:t}(m,p,v),b=g.length,x=y.length,q=Oa(l),M=Ta(b,q),S=Ta(x,q);return{filteredLabels:h,lowerOobs:g,upperOobs:y,lowerCircleSize:M,upperCircleSize:S,lowerOobSpace:function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(b,u.oob.size,M,i,s),upperOobSpace:function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(x,u.oob.size,S,i,s)}}({labels:c,minValue:O[0],maxValue:O[1],orientation:g,rtl:p,isContinuous:a,style:r,padding:m,measureText:this.measureText,prop:a?"value":"scaledValue"}),A=T.filteredLabels,E=T.lowerOobs,L=T.upperOobs,k=T.lowerCircleSize,N=T.upperCircleSize,I=T.lowerOobSpace,j=T.upperOobSpace,P=I,R=b-j;ba(E),ba(L);var F=Aa({alignment:0,dockValue:0,oobs:E,style:r.oob,rect:this.rect,symbol:t,position:r.oob.size+k/2,areaProps:h,radius:k/2,font:q}),z=Aa({alignment:1,dockValue:1,oobs:L,style:r.oob,rect:this.rect,symbol:t,position:b-(r.oob.size+N/2),areaProps:h,radius:N/2,font:q});Ma.addLabelsInfo({labels:A,scale:e,majorSize:b,lowerLimit:P,upperLimit:R,font:q,lineHeight:M,gap:S,maxLabelWidth:D,majorDimension:y,orientation:g,measureText:this.measureText,rtl:p,layoutService:i,isContinuous:a,isDimension:u}),Ho.layout(A.map((function(e){return e.segment})),P,R,r.label.gap);var H=A.filter((function(e){return Ho.isInside(e.segment,P,R,a)}));return Ma.createLabels({labels:H,style:r.label,maxLabelWidth:D,areaProps:h,area:v,lineHeight:M,font:q,theme:o}).concat([].concat(ee(F),ee(z)))}}},Na=sa,Ia=Xo,ja={resolveValue:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=Yo({refLineLayout:t,layoutService:r});return Xo(i,n,"id")},resolveInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.isGroupedByDimension){var i=Na({refLineLayout:t,layoutService:r});return Ia(i,n,"innerValues")}},resolveNumInnerValues:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService;if(r.meta.mode.K)return 0;var i=Na({refLineLayout:t,layoutService:r});return Ia(i,n,"numInnerValues")||0},resolveValueText:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=n.dimensionValuesInfo,o=r.meta.canBeContinuous,a=Na({refLineLayout:t,layoutService:r});return i[a]&&o?i[a].qText:a},resolveValueInfo:function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=Na({refLineLayout:t,layoutService:r});return n.dimensionRefLineInfo[i]}};function Pa(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dockService,u=e.chart,s=e.scale,l=e.axis,c=e.rtl,f=e.key,d=e.mainComponentKey,p=e.path,m=e.minimumLayoutMode,h=t?r.dimensionRefLines:p?r.query.getRefLines(p):r.measureRefLines;if(!h.length)return!1;var v={key:f,type:"ref-line",layout:{minimumLayoutMode:m},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}}},g=!(!t||"horizontal"!==a.meta.major.orientation||!c),y=!t||i.meta.isContinuous;return h.forEach((function(e){v.lines[l].push(function(e){var t,n,r=e.isDimension,i=e.refLineLayout,o=e.refLineModel,a=e.layoutService,u=e.colorModel,s=e.dockService,l=e.chart,c=e.scale,f=e.axis,d=e.invert,p=e.component,m=e.isContinuous,h={dir:f,line:{strokeWidth:(null==i||null===(t=i.style)||void 0===t?void 0:t.lineThickness)||2,strokeDasharray:null==i||null===(n=i.style)||void 0===n?void 0:n.lineType,stroke:u.resolveUIColor(i.paletteColor||{index:i.color})}};return!r||a.meta.isContinuous?(h.scale=c,h.value=i.refLineExpr.value):h.value=function(){var e,t=aa({scale:l.scale(c),value:ja.resolveValue({refLineLayout:i,refLineModel:o,layoutService:a}),valueInfo:ja.resolveValueInfo({refLineLayout:i,refLineModel:o,layoutService:a}),size:null===(e=l.component(p))||void 0===e?void 0:e.rect["horizontal"===s.meta.major.orientation?"width":"height"],align:i.align,invert:d,layoutService:a,isContinuous:m});return Number.isNaN(t)?void 0:t},h}({isDimension:t,refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,dockService:a,chart:u,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),v}var Ra={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Fa(e){var t=e.isDimension,n=e.refLineModel,r=void 0===n?{}:n,i=e.layoutService,o=e.colorModel,a=e.dock,u=e.scale,s=e.style,l=e.formatter,c=e.theme,f=e.localeInfo,d=e.rtl,p=e.key,m=e.path,h=t?r.dimensionRefLineLabels:m?r.query.getRefLineLabels(m):r.measureRefLineLabels;if(!h.length)return[];var v=[],g=!t||i.meta.isContinuous,y=h.map((function(e){return function(e){var t=e.refLineLayout,n=e.refLineModel,r=e.layoutService,i=e.colorModel,o=e.scale,a=e.theme,u=e.isContinuous,s=i.resolveUIColor(t.paletteColor||{index:t.color}),l={align:t.align,text:t.label,fill:t.coloredBackground?a.getContrastingColorTo(s):s,showValue:!1!==t.showValue,showLabel:!1!==t.showLabel,inputValue:t.refLineExpr.value,inputValueLabel:t.refLineExpr.label};return t.coloredBackground&&(l.background={fill:s}),u?(l.scale=o,l.value=t.refLineExpr.value):(l.value=function(){return ja.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueText=function(){return ja.resolveValueText({refLineLayout:t,refLineModel:n,layoutService:r})},l.valueInfo=function(){return ja.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r})}),l}({refLineLayout:e,refLineModel:r,layoutService:i,colorModel:o,scale:u,theme:c,isContinuous:g})}));return v.push(function(e){var t=e.isDimension,n=e.layoutService,r=e.style,i=e.labels,o=e.scale,a=e.formatter,u=e.dock,s=e.key,l=e.rtl;return{key:s,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:n,layout:{dock:u,rtl:l},theme:e.theme,isContinuous:e.isContinuous,isDimension:t,localeInfo:e.localeInfo,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===u||"right"===u?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}}}}({isDimension:t,rtl:d,style:de(!0,Ra,s),dock:a,key:p,labels:y,scale:u,formatter:l,layoutService:i,theme:c,isContinuous:g,localeInfo:f})),v}function za(e){var t=e.layoutService,n=e.discreteModel,r=t.meta,i=r.isContinuous,o=r.canBeContinuous,a=r.isGroupedByDimension,u=t.getLayout(),s="K"===u.qHyperCube.qMode,l=Ee.dimensionless(u),c=ta(u),f=na(u,l),d=ia(u),p=oa(u,l),m={},h={},v=function(){return!(!f||!f.length)&&!f.every((function(e){var n=sa({refLineLayout:e,layoutService:t});return function(e){if(o){var n=t.getLayoutValue("qHyperCube.qDimensionInfo.0"),r=n.qMin,i=n.qMax;return pa({value:e,qMin:r,qMax:i})}return!1}(n)||function(e){if(!h[e])return!1;if(!i&&a){var n={valueInfo:h[e]},r="S"===t.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=t.getHyperCubeValue(r);return ma({label:n,dataPages:o})}return!0}(n)}))},g={isKMode:s,canBeContinuous:o,measureRefLines:c,dimensionRefLines:f,measureRefLineLabels:d,dimensionRefLineLabels:p,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:function(e){return ea(u,e)},getRefLineLabels:function(e){return ra(u,e)}},update:function(){h=g.dimensionRefLineInfo,v()&&(m=ua({layout:u,canBeContinuous:o,discreteModel:n,layoutService:t}),g.dimensionValuesInfo=m,f.forEach((function(e){var n=sa({refLineLayout:e,layoutService:t});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return g.update(),g}var Ha=function(e){var t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach((function(e){e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))})),{x:t,y:r,width:n-t,height:i-r}},Va={exports:{}};function Ba(){}function _a(){}_a.resetWarningCache=Ba;Va.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_a,resetWarningCache:Ba};return n.PropTypes=n,n}();var Ua=Va.exports;function Wa(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Ka(e){var t=e.d,n=e.size,r=e.style,o=void 0===r?{}:r,a=e.viewBox,u=void 0===a?"0 0 16 16":a,s=R({fontSize:Wa(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},o);return i.createElement("i",{style:s},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:u,fill:"currentColor"},i.createElement("path",{d:t})))}var Ga={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},Ya={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Xa="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Ja={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},$a={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function Za(e,t,n){(function(e){var t=e.model,n=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()})({model:e,properties:n}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");var r=Oo.generate(t,n);r&&r.length&&(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0))}))}function Qa(e,t,n,r,i,o){e.getEffectiveProperties().then((function(a){var u=de(!0,{},a),s=u.qHyperCubeDef[r][t],l=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];l.qAttributeDimensions=s.qAttributeDimensions,s.qAttributeDimensions=[],o||(l.qAttributeExpressions=s.qAttributeExpressions,s.qAttributeExpressions=[]),u.qHyperCubeDef[r][t]=l,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=s,i&&i({oldItem:s,newItem:l,oldProperties:a,newProperties:u,model:e}),Za(e,a,u)}))}function eu(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function tu(e){var t=e.dir,n=e.dock,r=e.altList,i=e.model,o=e.translator,a=e.app,u=e.onChange;return 0===r.length?null:{dir:t,dock:n,getAlternatives:function(){var e=r.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,a,o).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Qa(i,e,t,"qDimensions",u)}}}function nu(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/qHyperCubeDef";return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:eu(e),drillUp:function(e){n.drillUp(r,t,e)}}}function ru(e){var t=e.altList,n=e.app,r=e.dir,i=e.dock,o=e.model,a=e.onChange,u=e.skipAttributeExpressions,s=e.translator;return 0===t.length?null:{dir:r,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")}));var r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,s).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Qa(o,e,t,"qMeasures",a,u)}}}function iu(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var ou=["children"],au={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},uu=function(e){var t=e.children,n=X(e,ou);return i.createElement(o,W({size:"small",disableRipple:!0,disableTouchRipple:!0},n),t)};function su(){function e(e){var t=e.title,n=e.selected,r=e.onClick,o=Be.detectTextDirection(t);return i.createElement(s,{button:!0,onClick:r,style:{textAlign:"start"}},i.createElement(l,{style:{minWidth:32}},i.createElement(Ka,{d:n?Xa:""})),i.createElement(c,{primaryTypographyProps:{dir:o}},t))}function t(t){var n=t.alignTo,r=t.changeTo,o=t.current,s=t.dir,l=t.dock,c=t.list,f=t.onClose,d=t.show,p=c.map((function(t,n){return i.createElement(e,{key:t.id,title:t.title,onClick:function(){return r(n)}})}));return i.createElement(a,W({anchorEl:n,open:d,onClose:f},au[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),i.createElement(u,{dense:!0,dir:s,component:"nav"},i.createElement(e,{title:o,selected:!0,onClick:f}),p))}e.propTypes={title:Ua.string.isRequired,selected:Ua.bool,onClick:Ua.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Ua.any,changeTo:Ua.func.isRequired,current:Ua.string.isRequired,dir:Ua.string.isRequired,dock:Ua.string.isRequired,list:Ua.array,onClose:Ua.func.isRequired,show:Ua.bool.isRequired},t.defaultProps={list:[],alignTo:null};var n=function(e){K(r,i.Component);var n=Z(r);function r(e){var t;return V(this,r),(t=n.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind(J(t)),t.closePopover=t.closePopover.bind(J(t)),t.changeTo=t.changeTo.bind(J(t)),t.alignToRef=i.createRef(),t}return _(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selections;t&&(this.onSelectionsActivated=function(){return e.setState({inSelection:!0})},this.onSelectionsDeactivated=function(){return e.setState({inSelection:!1})},t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated))}},{key:"componentWillUnmount",value:function(){var e=this.props.selections;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}},{key:"changeTo",value:function(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}},{key:"openPopover",value:function(){var e=this;this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((function(t){e.setState({open:!0,alternatives:t})}))}},{key:"closePopover",value:function(){this.setState({open:!1,closeTime:Date.now()})}},{key:"render",value:function(){var e=this.props,n=e.titleData,r=e.popover,o=e.translator,a=e.disabled,u=e.isDimension,s=e.padding,l=e.minWidth,c=e.hasAlternative,f=R({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),d=n.breadcrumbs.length,p=a||this.state.inSelection,m=n.breadcrumbs.map((function(e,t){return i.createElement(uu,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto"},key:t,onClick:function(){return p?void 0:n.drillUp(d-t)},title:e},i.createElement("span",{style:f},e),i.createElement(Ka,W({},$a,{size:"small",style:{margin:"0 8px"}})))})),h=r&&!this.state.open?this.openPopover:this.closePopover,v=!r||a||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:v&&"rgba(89, 89, 89, 0.8)",height:!u&&v&&"20px",lineHeight:!u&&v&&"20px",border:!u&&v&&"none"};s&&(g.padding=s),l&&(g.minWidth=l);var y=Be.detectTextDirection(n.text),b=i.createElement(uu,{style:g,onClick:v?void 0:h,title:n.text,tabIndex:"-1"},n.locked&&i.createElement(Ka,W({},Ya,{size:"small",title:o.get("Tooltip.selections.locked")})),i.createElement("span",{style:f,dir:y},n.text),r&&i.createElement(Ka,W({},Ja,{size:"small",style:{margin:"0 8px"}})));return i.createElement(i.Fragment,null,n.drilldown&&i.createElement(Ka,W({},Ga,{size:"small",title:o.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,i.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:c?"auto":"none"}},b),r&&i.createElement(t,{dock:r.dock,dir:r.dir,current:n.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),r}();function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:Ua.bool.isRequired,padding:Ua.string,minWidth:Ua.string,titleData:Ua.shape({breadcrumbs:Ua.arrayOf(Ua.string).isRequired,drilldown:Ua.bool.isRequired,index:Ua.number.isRequired,locked:Ua.bool.isRequired,text:Ua.string.isRequired,popoverText:Ua.string.isRequired,drillUp:Ua.func}).isRequired,popover:Ua.shape({dir:Ua.string.isRequired,dock:Ua.string.isRequired,changeTo:Ua.func.isRequired,getAlternatives:Ua.func.isRequired}),translator:Ua.shape({get:Ua.func.isRequired}).isRequired,selections:Ua.shape({isActive:Ua.func,addListener:Ua.func,removeListener:Ua.func}),style:Ua.shape({fontSize:Ua.string,color:Ua.string,fontFamily:Ua.string}).isRequired,isDimension:Ua.bool.isRequired,hasAlternative:Ua.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render:function(){var e,t=this,a=this.settings,u=a.settings,s=u.app,l=u.disabled,c=u.explicitItemInfos,f=u.hyperCube,d=u.hyperCubeDef,p=u.isDimension,m=u.minWidth,h=u.model,v=u.onChangeToAlternative,g=u.padding,y=u.rtl,b=u.selections,x=u.skipAttributeExpressions,q=u.translator,M=a.layout.dock,S="top"!==M&&"bottom"!==M||!y?"ltr":"rtl",D=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left"):"right"===e&&(n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left"),n}(M,this.rect),C=d&&d.qLayoutExclude&&d.qLayoutExclude.qHyperCubeDef,w=C&&C[p?"qDimensions":"qMeasures"]||[],O=c||f[p?"qDimensionInfo":"qMeasureInfo"],T=p?tu:ru,A=p?nu:iu,E=h&&h.colorSupport&&h.modifiers&&T({altList:w,app:s,dir:y?"rtl":"ltr",dock:r(M),model:h,onChange:v,skipAttributeExpressions:x,translator:q}),L=(e=this.settings.settings).isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings),k=O.map((function(e,r){var o="number"==typeof e.explicitColumn?e.explicitColumn:r,a=A(e,o,h),u=r===O.length-1;return i.createElement(i.Fragment,{key:e.cId},i.createElement(n,{popover:E,titleData:a,model:h,translator:q,selections:b,disabled:l(),style:t.style,isDimension:p,padding:g,minWidth:m,hasAlternative:L}),!u&&i.createElement("span",null,", "))}));return i.createElement("div",{style:D,dir:S},k)}}}function lu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function cu(e){if(e.type)return e;if("#"===e.charAt(0))return cu(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function fu(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function du(e){var t="hsl"===(e=cu(e)).type?cu(function(e){var t=(e=cu(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",s=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",s.push(t[3])),fu({type:u,values:s})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function pu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mu(){return(mu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function hu(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vu(){return(vu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gu(e){return(gu="function"==typeof Symbol&&"symbol"===F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function yu(e){return(yu="function"==typeof Symbol&&"symbol"===gu(Symbol.iterator)?function(e){return gu(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":gu(e)})(e)}function bu(e){return e&&"object"===yu(e)&&!Array.isArray(e)}function xu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?vu({},e):e;return bu(e)&&bu(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(bu(t[i])&&i in e?r[i]=xu(e[i],t[i],n):r[i]=t[i])})),r}var qu=["xs","sm","md","lg","xl"];function Mu(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,u=hu(e,["values","unit","step"]);function s(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var r=qu.indexOf(t)+1;return r===qu.length?s(e):"@media (min-width:".concat(n[e]).concat(i,") and ")+"(max-width:".concat(n[qu[r]]-a/100).concat(i,")")}return mu({keys:qu,values:n,up:s,down:function(e){var t=qu.indexOf(e)+1,r=n[qu[t]];return t===qu.length?s("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return n[e]}},u)}function Su(e,t,n){var r;return mu({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return mu({paddingLeft:t(2),paddingRight:t(2)},n,pu({},e.up("sm"),mu({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},pu(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),pu(r,e.up("sm"),{minHeight:64}),r)},n)}var Du="#7986cb",Cu="#3f51b5",wu="#303f9f",Ou="#ff4081",Tu="#f50057",Au="#c51162",Eu={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Lu="#e57373",ku="#f44336",Nu="#d32f2f",Iu={black:"#000",white:"#fff"},ju={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Iu.white,default:Eu[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Pu={text:{primary:Iu.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Eu[800],default:"#303030"},action:{active:Iu.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Ru(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=cu(e),t=lu(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return fu(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=cu(e),t=lu(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return fu(e)}(e.main,1.5*r)))}function Fu(e){var t=e.primary,n=void 0===t?{light:Du,main:Cu,dark:wu}:t,r=e.secondary,i=void 0===r?{light:Ou,main:Tu,dark:Au}:r,o=e.error,a=void 0===o?{light:Lu,main:ku,dark:Nu}:o,u=e.type,s=void 0===u?"light":u,l=e.contrastThreshold,c=void 0===l?3:l,f=e.tonalOffset,d=void 0===f?.2:f,p=hu(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=du(e),r=du(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Pu.text.primary)>=c?Pu.text.primary:ju.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=mu({},e)).main&&e[t]&&(e.main=e[t]),Ru(e,"light",n,d),Ru(e,"dark",r,d),e.contrastText||(e.contrastText=m(e.main)),e}var v={dark:Pu,light:ju};return xu(mu({common:Iu,type:s,primary:h(n),secondary:h(i,"A400","A200","A700"),error:h(a),grey:Eu,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},v[s]),p,{clone:!1})}function zu(e){return Math.round(1e5*e)/1e5}var Hu={textTransform:"uppercase"};function Vu(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,o=n.fontSize,a=void 0===o?14:o,u=n.fontWeightLight,s=void 0===u?300:u,l=n.fontWeightRegular,c=void 0===l?400:l,f=n.fontWeightMedium,d=void 0===f?500:f,p=n.fontWeightBold,m=void 0===p?700:p,h=n.htmlFontSize,v=void 0===h?16:h,g=n.allVariants,y=n.pxToRem,b=hu(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=y||function(e){return"".concat(e/v*x,"rem")},M=function(e,t,n,r,o){return mu({fontFamily:i,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(zu(r/t),"em")}:{},{},o,{},g)},S={h1:M(s,96,1,-1.5),h2:M(s,60,1,-.5),h3:M(c,48,1.04,0),h4:M(c,34,1.17,.25),h5:M(c,24,1.33,0),h6:M(d,20,1.6,.15),subtitle1:M(c,16,1.75,.15),subtitle2:M(d,14,1.57,.1),body1:M(c,16,1.5,.15),body2:M(c,14,1.43,.15),button:M(d,14,1.75,.4,Hu),caption:M(c,12,1.66,.4),overline:M(c,12,2.66,1,Hu)};return xu(mu({htmlFontSize:v,pxToRem:q,round:zu,fontFamily:i,fontSize:a,fontWeightLight:s,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},S),b,{clone:!1})}function Bu(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var _u=["none",Bu(0,2,1,-1,0,1,1,0,0,1,3,0),Bu(0,3,1,-2,0,2,2,0,0,1,5,0),Bu(0,3,3,-2,0,3,4,0,0,1,8,0),Bu(0,2,4,-1,0,4,5,0,0,1,10,0),Bu(0,3,5,-1,0,5,8,0,0,1,14,0),Bu(0,3,5,-1,0,6,10,0,0,1,18,0),Bu(0,4,5,-2,0,7,10,1,0,2,16,1),Bu(0,5,5,-3,0,8,10,1,0,3,14,2),Bu(0,5,6,-3,0,9,12,1,0,3,16,2),Bu(0,6,6,-3,0,10,14,1,0,4,18,3),Bu(0,6,7,-4,0,11,15,1,0,4,20,3),Bu(0,7,8,-4,0,12,17,2,0,5,22,4),Bu(0,7,8,-4,0,13,19,2,0,5,24,4),Bu(0,7,9,-4,0,14,21,2,0,5,26,4),Bu(0,8,9,-5,0,15,22,2,0,6,28,5),Bu(0,8,10,-5,0,16,24,2,0,6,30,5),Bu(0,8,11,-5,0,17,26,2,0,6,32,5),Bu(0,9,11,-5,0,18,28,2,0,7,34,6),Bu(0,9,12,-6,0,19,29,2,0,7,36,6),Bu(0,10,13,-6,0,20,31,3,0,8,38,7),Bu(0,10,13,-6,0,21,33,3,0,8,40,7),Bu(0,10,14,-6,0,22,35,3,0,8,42,7),Bu(0,11,14,-7,0,23,36,3,0,9,44,8),Bu(0,11,15,-7,0,24,38,3,0,9,46,8)],Uu={borderRadius:4};function Wu(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Ku={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Gu={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},Yu=function(e){return"".concat(Math.round(e),"ms")},Xu={easing:Ku,duration:Gu,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Gu.standard:n,i=t.easing,o=void 0===i?Ku.easeInOut:i,a=t.delay,u=void 0===a?0:a;return hu(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Yu(r)," ").concat(o," ").concat("string"==typeof u?u:Yu(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Ju={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var $u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,u=e.shadows,s=e.spacing,l=e.typography,c=void 0===l?{}:l,f=hu(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Fu(a),p=Mu(n),m=Wu(s),h=mu({breakpoints:p,direction:"ltr",mixins:Su(p,m,i),overrides:{},palette:d,props:{},shadows:u||_u,typography:Vu(d,c),spacing:m},xu({shape:Uu,transitions:Xu,zIndex:Ju},f));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});function Zu(e,t){return i.createElement(p,{generateClassName:t},i.createElement(m,{theme:$u},e))}var Qu=d({productionPrefix:"q".concat("2243"),disableGlobal:!0,seed:""});function es(){return function(e){var t;e.renderer("react",function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,u={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return u.x=Number.isNaN(t)?u.x:t,u.y=Number.isNaN(n)?u.y:n,u.width=Number.isNaN(r)?u.width:r,u.height=Number.isNaN(i)?u.height:i,void 0!==o&&(u.scaleRatio.x=Number.isNaN(o.x)?u.scaleRatio.x:o.x,u.scaleRatio.y=Number.isNaN(o.y)?u.scaleRatio.y:o.y),void 0!==a&&(u.margin.left=Number.isNaN(a.left)?0:a.left,u.margin.top=Number.isNaN(a.top)?0:a.top),u}return function(){var t,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,r=void 0===n?document.createElement.bind(document):n,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=r("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},render:function(e){if(!t)return!1;var n=i.scaleRatio.x,r=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*n),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*r),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(n,", ").concat(r,")"),t.style.transformOrigin="top left",f.render(Zu(e,Qu),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&f.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(f.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",su()),e.component("disclaimer",((t=function(e){K(n,i.Component);var t=Z(n);function n(){return V(this,n),t.apply(this,arguments)}return _(n,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.spanStyle;return i.createElement(i.Fragment,null,i.createElement("span",{ref:this.alignToRef,style:n,title:t},t))}}]),n}()).propTypes={label:Ua.string.isRequired,spanStyle:Ua.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,n=e.settings,r=n.label,o=n.rtl,a=e.layout.dock,u="top"!==a&&"bottom"!==a||!o?"ltr":"rtl",s=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left";break;case"right":n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left";break;case"center":n.width="".concat(t.width,"px"),n.height="".concat(t.height,"px"),n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(a,this.rect),l="center"===a?r:"* ".concat(r),c="center"!==a?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return i.createElement("div",{style:s,dir:u},i.createElement(i.Fragment,null,i.createElement(t,{label:l,spanStyle:c})))}}))}}function ts(e){var t=e.model,n=e.layoutService,r=e.definitionPath,i=void 0===r?"/qHyperCubeDef":r;return{fetch:function(e,n){var r={qStart:e,qEnd:n,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return t.getHyperCubeContinuousData(i,r,!1)},shouldFetchReduced:function(){var e=n.getLayout().qHyperCube;return e.qSize.qcy*e.qMeasureInfo.length>=2e3},computeNbrOfBins:function(){var e=n.getLayout().qHyperCube;if(!this.shouldFetchReduced())return 2e3;var t=e.qMeasureInfo.length||1,r=4+2*(t-1);return e.qDimensionInfo.length>1&&(t=Math.max(1,Math.min(12,n.meta.size.dimensions[1])),r=4),Math.ceil(2e3/(t*r))},computeMaxNumberLines:function(){return n.getLayout().qHyperCube.qDimensionInfo.length>1&&!this.shouldFetchReduced()?n.meta.size.dimensions[1]+1:12}}}function ns(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cache,n=void 0===t?{}:t;return{fetch:function(){return Promise.resolve(n.merged)}}}function rs(e){var t=e.layoutService,n=e.viewCache;return{fetch:function(){var e=t.getHyperCube(),n=e.qAxisData,r=e.qDataPages;return Promise.resolve({qAxisData:n,qDataPages:r})},getSnapshotData:function(){var e=t.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in e&&"min"in e.zoom&&"max"in e.zoom?{zoom:e.zoom}:function(e,t){var n=e.scrollOffset,r=void 0===n?0:n,i=e.viewRange,o=void 0===i?0:i,a=t+r,u=a+o;return 1===o&&0===r&&(a=t-.5,u=t+.5),{zoom:{min:a,max:u}}}(e,n.get("continuousMin"))}}}function is(){var e=function(){},t=[],n={};return e.set=function(e,r){var i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=function(e){t.forEach((function(t,r){return e(n[t],r)}))},e.has=function(e){return e in n},e}function os(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function(e){for(var t=e.start,n=e.end,r=e.matrix,i=[],o=is(),a=is(),u=0;u<r.length;u++){var s=r[u],l=s[1].qElemNumber.toString();s[0].qNum<t?o.set(l,s):s[0].qNum>n&&(a.has(l)||a.set(l,s)),s[0].qNum>=t&&s[0].qNum<=n&&i.push(s)}return o.forEach((function(e,t){return i.splice(t,0,e)})),a.forEach((function(e){return i.push(e)})),i}({start:e,end:t,matrix:n}):function(e){for(var t,n,r=e.start,i=e.end,o=e.matrix,a=[],u=0;u<o.length;u++){var s=o[u];s[0].qNum<r?t=s:s[0].qNum>i&&(n||(n=s)),s[0].qNum>=r&&s[0].qNum<=i&&a.push(s)}return t&&a.unshift(t),n&&a.push(n),a}({start:e,end:t,matrix:n})}function as(e,t){return R(R({},e),{},{qWidth:t[0]?t[0].length:0,qHeight:t.length})}function us(e,t,n){var r={qDataPages:(n.qDataPages||[]).map((function(n){var r=os(e,t,n.qMatrix),i=as(n.qArea,r);return R(R({},n),{},{qArea:i,qMatrix:r})}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((function(n){return{qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((function(n,r){return(r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n}),[])}}))}}(e,t,n.qAxisData)),r}function ss(e,t){var n={};return n.qDataPages=(e.qDataPages||[]).map((function(e,n){var r=function(e,t){if(!t||!t.length||!t[0].length)return e;for(var n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[],a=0,u=e.length;a<u;a++){var s=e[a][0];s.qNum<n?i.push(e[a]):s.qNum>r&&o.push(e[a])}return[].concat(i,ee(t),o)}(e.qMatrix,t.qDataPages[n].qMatrix),i=as(e.qArea,r);return R(R({},e),{},{qArea:i,qMatrix:r})})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((function(e){return!e.qTicks.length})))return e;for(var n=t.qAxis.map((function(e){return e.qName})),r=t.qAxis.map((function(e){return{start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}})),i=t.qAxis.map((function(e){return{qName:e.qName,qTags:ee(e.qTags),qTicks:ee(e.qTicks)}})),o=0,a=e.qAxis.length;o<a;o++){var u=e.qAxis[o],s=n.indexOf(u.qName),l=[],c=[];if(s>-1){for(var f=r[s],d=f.start,p=f.end,m=0,h=u.qTicks.length;m<h;m++){var v=u.qTicks[m];v.qStart<d?l.push(v):v.qStart>p&&c.push(v)}i[s].qTicks=[].concat(l,ee(i[s].qTicks),c)}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}function ls(e){return{qDataPages:e.qDataPages.map((function(e){var t=as(e.qArea,e.qMatrix);return R(R({},e),{},{qArea:t})})),qAxisData:e.qAxisData}}var cs=Math.pow(2,.5),fs=1/cs,ds=Math.pow(fs,44);function ps(e,t){return Math.max(1e-6,(t-e)*ds)}function ms(e){return e.qIsOtherCell}function hs(e){var t={};return e.forEach((function(e){if(!e.some(ms)){var n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}function vs(e){var t=0;return e.forEach((function(e){e.some(ms)||t++})),t}function gs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qDataPages,n=void 0===t?[]:t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.length?n[0].qMatrix:[];return r.isStackedByDimension?hs(i):vs(i)}function ys(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.qMin,n=e.qMax;return{initialMin:t=Number.isNaN(+t)?0:t,initialMax:n=Number.isNaN(+n)?0:n}}var bs={command:{processDataPage:function(){}}};function xs(e){return(xs="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function qs(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,i)}function Ms(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){qs(o,r,i,a,u,"next",e)}function u(e){qs(o,r,i,a,u,"throw",e)}a(void 0)}))}}function Ss(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ds(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach((function(t){Ss(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ws(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Os(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(e,t)||As(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ts(e){return function(e){if(Array.isArray(e))return Es(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||As(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function As(e,t){if(e){if("string"==typeof e)return Es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Es(e,t):void 0}}function Es(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ls=Object.prototype.hasOwnProperty,ks=Object.prototype.toString,Ns=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,js=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ks.call(e)},Ps=function(e){if(!e||"[object Object]"!==ks.call(e))return!1;var t,n=Ls.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ls.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ls.call(e,t)},Rs=function(e,t){Ns&&"__proto__"===t.name?Ns(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Fs=function(e,t){if("__proto__"===t){if(!Ls.call(e,t))return;if(Is)return Is(e,t).value}return e[t]},zs=function e(){var t,n,r,i,o,a,u=arguments[0],s=1,l=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[1]||{},s=2),(null==u||"object"!=F(u)&&"function"!=typeof u)&&(u={});s<l;++s)if(null!=(t=arguments[s]))for(n in t)r=Fs(u,n),u!==(i=Fs(t,n))&&(c&&i&&(Ps(i)||(o=js(i)))?(o?(o=!1,a=r&&js(r)?r:[]):a=r&&Ps(r)?r:{},Rs(u,{name:n,newValue:e(c,a,i)})):void 0!==i&&Rs(u,{name:n,newValue:i}));return u};function Hs(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Vs(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Bs(e,t,n,r,i){var o,a=i.byRow,u=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return u(r,r.raw().qCardinal);if(r){var s=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,s)}return{}}function _s(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Us(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Ws(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ks(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gs(){}var Ys=1/.7,Xs="\\s*([+-]?\\d+)\\s*",Js="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zs=/^#([0-9a-f]{3,8})$/,Qs=new RegExp("^rgb\\("+[Xs,Xs,Xs]+"\\)$"),el=new RegExp("^rgb\\("+[$s,$s,$s]+"\\)$"),tl=new RegExp("^rgba\\("+[Xs,Xs,Xs,Js]+"\\)$"),nl=new RegExp("^rgba\\("+[$s,$s,$s,Js]+"\\)$"),rl=new RegExp("^hsl\\("+[Js,$s,$s]+"\\)$"),il=new RegExp("^hsla\\("+[Js,$s,$s,Js]+"\\)$"),ol={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 al(){return this.rgb().formatHex()}function ul(){return this.rgb().formatRgb()}function sl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zs.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ll(t):3===n?new pl(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?cl(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?cl(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=Qs.exec(e))?new pl(t[1],t[2],t[3],1):(t=el.exec(e))?new pl(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=tl.exec(e))?cl(t[1],t[2],t[3],t[4]):(t=nl.exec(e))?cl(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=rl.exec(e))?gl(t[1],t[2]/100,t[3]/100,1):(t=il.exec(e))?gl(t[1],t[2]/100,t[3]/100,t[4]):ol.hasOwnProperty(e)?ll(ol[e]):"transparent"===e?new pl(NaN,NaN,NaN,0):null}function ll(e){return new pl(e>>16&255,e>>8&255,255&e,1)}function cl(e,t,n,r){return r<=0&&(e=t=n=NaN),new pl(e,t,n,r)}function fl(e){return e instanceof Gs||(e=sl(e)),e?new pl((e=e.rgb()).r,e.g,e.b,e.opacity):new pl}function dl(e,t,n,r){return 1===arguments.length?fl(e):new pl(e,t,n,null==r?1:r)}function pl(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ml(){return"#"+vl(this.r)+vl(this.g)+vl(this.b)}function hl(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function vl(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function gl(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bl(e,t,n,r)}function yl(e){if(e instanceof bl)return new bl(e.h,e.s,e.l,e.opacity);if(e instanceof Gs||(e=sl(e)),!e)return new bl;if(e instanceof bl)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=t===o?(n-r)/u+6*(n<r):n===o?(r-t)/u+2:(t-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new bl(a,u,s,e.opacity)}function bl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function xl(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function ql(e){return function(){return e}}function Ml(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ql(isNaN(e)?t:e)}Ws(Gs,sl,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:al,formatHex:al,formatHsl:function(){return yl(this).formatHsl()},formatRgb:ul,toString:ul}),Ws(pl,dl,Ks(Gs,{brighter:function(e){return e=null==e?Ys:Math.pow(Ys,e),new pl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new pl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:ml,formatHex:ml,formatRgb:hl,toString:hl})),Ws(bl,(function(e,t,n,r){return 1===arguments.length?yl(e):new bl(e,t,n,null==r?1:r)}),Ks(Gs,{brighter:function(e){return e=null==e?Ys:Math.pow(Ys,e),new bl(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new bl(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new pl(xl(e>=240?e-240:e+120,i,r),xl(e,i,r),xl(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Sl=function e(t){var n=function(e){return 1==(e=+e)?Ml: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):ql(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=dl(e)).r,(t=dl(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ml(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Dl=/^class(-pyramid)?/,Cl=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,u=o,s=t.limits,l={},c="percent"===t.limitType?s.map((function(e){return i+(o-i)*e})):s,f=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(Ts(c))),o=Math.max.apply(Math,[o].concat(Ts(c))),l.min=i,l.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))l.type="categorical",Object.assign(l,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var u=0;u<r.length;u++)if(t<r[u]){o.push(i[u]);break}}for(var s=0;s<r.length;s++)t<r[s]&&r[s]<n&&(a.push(r[s]),o.push(i[s]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var l=0;l<r.length;l++)if(r[l]>n){o.push(i[l]),o.push(i[l]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:u,range:f,limits:"percent"===t.limitType?c:s}));else if(t.breakTypes){var d=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[f[0]];for(var p=0;p<c.length;p+=1)if(d[p]){var m=f[p],h=f[p+1],v=Sl(m,h)(.5);l.range.push(v),l.domain.push(c[p]),p<c.length-1&&d[p+1]&&(l.range.push(f[p+1]),l.domain.push((c[p]+c[p+1])/2))}else l.range.push(f[p]),l.range.push(f[p+1]),l.domain.push(c[p]),l.domain.push(c[p]+Math.min(1e-6,(o-i)/1e6));l.range.push(f[f.length-1]),l.domain.push(o)}else l.domain=c,l.range=f;return l};function wl(e,t,n,r,i){var o,a,u,s=0,l=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),u=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(u)||(l[u]?l[u]+=1:l[u]=1);for(o=0;o<l.length;o+=1)l[o]&&(s+=1);return s<=r||s>=i?Math.max(s,r):wl(e,t,n,r+1,i)}var Ol=function(e,t,n,r){var i,o,a=t.theme,u=t.hc,s=r.f,l={mode:"field",fieldType:"measure",field:s?s.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],f=!0;if(s){if(Number.isNaN(+s.min())||Number.isNaN(+s.max()))return{invalid:!0};(f=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:s.key()},exclude:{fields:u.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ts(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(l.min=n.input.measureMin,l.max=n.input.measureMax,l.max<l.min)return{invalid:!0}}else if(s&&!f)l.min=s.min(),l.max=s.max();else if(s){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,Ts(c)),l.max=Math.max.apply(Math,Ts(c))}if(n.input.measureScheme&&(l.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];l.type=d&&Dl.test(d.type)?"categorical":"continuous","categorical"===l.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ts(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===l.type){for(var p=f?wl(l.max,l.min,c,1,o):o,m=(l.max-l.min)/p,h=[],v=0;v<p+1;v+=1)h.push(l.min+m*v);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return l};function Tl(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function Al(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function El(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var u=n.indexOf(o);-1===u?(n.push(o),r.push(a.primary)):r[u]=a.primary,e[o]=null}else if(a){i.push(o);var s=n.indexOf(o);-1!==s&&(n.splice(s,1),r.splice(s,1))}}return{domain:n,range:r,exclude:i}}function Ll(e,t,n,r){var i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Tl:o,u=n.input.byMeasureDef||{activeMeasureIndex:0},s=a(n,u),l=Ol(0,{theme:r,hc:i},n,{f:s});if(l.invalid)return l;("expression"===u.type||u.activeMeasureIndex<0)&&(l.label=u.label,s&&"color.altLabel"===s.raw().labelExpRef&&(l.label=n.input.altLabel)),!l.label&&s&&(l.label=s.title());var c=u.activeMeasureIndex>=0?s:null;if(!c&&s&&void 0!==s.raw().matchMeasure&&s.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[s.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===u.type)if(c){var f=c.raw().coloring;f&&f.gradient&&zs(l,Cl(e,f.gradient,l,c))}else l.auxiliary=u;return l}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?_s:i,a=r.getCByField,u=void 0===a?Us:a,s=r.getPersistence,l=void 0===s?Bs:s,c=o(t,n),f=u(n,c),d=f?f.raw():{},p=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:f?f.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&f&&(m.label=f.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),zs(m,l(t,n,c,f,{byRow:Vs,byElemNo:Hs})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,u=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(u&&u.raw().qFallbackTitle&&(Number.isFinite(u.raw().qMin)&&Number.isFinite(u.raw().qMax)||n.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:u?u.key():void 0,type:"color"};var s=Ol(0,{hc:i,theme:o},n,{f:u});return s.invalid||(s.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),s}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,u=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(u="measure"),"measure"===u){var s=[],l=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){s.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(r.primary):l.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,f=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&f&&(c={categorical:f.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:s.length?{domain:s,range:l}:void 0}}if("dimension"===u){var d=[],p=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:p}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var u=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===u?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),Cs(Cs({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===u?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return Cs(Cs({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(Al(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=El(e.measureOverrides,e.explicit),Al(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=El(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function kl(e){var t=Cs({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(zs(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=zs(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var u=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(u=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[u]&&t.hc.qDimensionInfo[u].coloring&&t.hc.qDimensionInfo[u].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[u].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=zs(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return Cl(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},u=r[0],s=r[1]?r[1].colorMap:null;if(u){var l=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:u,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=l}return s?function(e,t,n,r){var i=r.external,o=r.field,a=Cs({},e);zs(a,Hs(o,o.raw().qCardinal));var u=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},u&&!t.pal&&(a.palettes.categorical=u.key,zs(a,Hs(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(u&&(a.palettes={categorical:u.key}),zs(a,Hs(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var u=0;u<i.items.length;u++){var s=i.items[u],l=(s.text||s).label;r[l]&&-1===a.indexOf(s.value)&&(a.push(s.value),o.push(t.resolveUIColor(r[l])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,s,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=Cs(Cs({},e),r.getDataColorSpecials())),n.settings=zs(e,Ll(this,n,t,e))}return n.settings}};return i}var Nl=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},Il=function(e){throw e.isHandled=!0,e},jl=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},Pl=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Rl=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Il):Promise.reject()};function Fl(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function zl(e){return function(t){return"object"===xs(t.datum[e])?t.datum[e].value:void 0}}function Hl(e){return"object"===xs(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Vl(e){return-3===e.datum.value}var Bl=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},_l=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ul(e,t){var n=e.styleReference,r=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,u=t.theme,s=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Bl(o,r,i)},show:"function"==typeof o.show?function(){return _l(o,s,a)}:_l(o,s,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:u?u.getStyle(n,"legend.title","color"):void 0,fontSize:u?u.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:u?u.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function Wl(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ul(e,t);if(!r.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,u=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,f=t.theme,d=t.scales,p={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return zs(!0,r,{type:"legend-cat",key:"".concat(i,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:u?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:f?f.getStyle(o,"legend.label","color"):void 0,fontSize:f?f.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:f?f.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:p[n]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:s,style:l})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,i=e.rtl,o=e.settings,a=e.style,u=t.scaleKey,s=t.theme,l=Ul(e,t);return!!l.show&&zs(!0,l,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:u,major:"".concat(u,"Range"),length:1,tick:{fill:s?s.getStyle(r,"legend.label","color"):void 0,fontSize:s?s.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:s?s.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==l.layout.dock&&"bottom"!==l.layout.dock?void 0:"right",padding:parseFloat(l.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},Ss(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),Ss(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),Ss(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}var Kl=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Gl(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=kl(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return jl(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return Pl(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return Rl(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=Nl,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=Cs({},i),r={},!n.key)throw new Error("Missing key");t.set(Cs(Cs({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=Cs(Cs({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var u=n.palettes.metric||t.measureScheme,s=r.getDataColorScales().filter((function(e){return e.key===u}))[0];if(s){var l=s.colors[0]?s.colors:[[]].concat(Ts(s.colors.slice(1)));l=Array.isArray(l[0])?l.map((function(e){return e.slice().reverse()})):l.slice().reverse(),i.push({key:"quant",colors:l})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,u={},s=i;if(n){var l={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ts((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ts((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,f=Fl({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var d=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var m={data:f,range:n.range,domain:n.domain,explicit:l,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};u[s]=m,c&&(u["".concat(s,"Legend")]=Cs(Cs({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};u[s]=zs({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===u[s].type&&(u["".concat(s,"Range")]=zs({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var v={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};u[s]=v}else if("measure"===n.mode){var g={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};u[s]=g}}return u}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=zl(r),o=zl("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,u=e.mode,s=e.nil,l=e.others,c=e.primary,f=e.type;return a?function(e){return Vl(e)||o(e)?l:s}:n[t]?function(e){return Vl(e)?l:Hl(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?s:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===u?function(e){return Vl(e)||o(e)?l:Hl(e)?s:c}:"color"===f?function(e){return Vl(e)||o(e)?l:Hl(e)?s:i(e)||l}:null},u=a(t,r);if(t.measureOverrides){var s=zl("".concat(r,"MeasureIdx")),l=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=s(e);return l[t]?l[t](e):u(e)}}return u}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,u=e.addMeasureIx,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?Kl(e.qNum):e.qText&&sl(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=s);var f=Ss({},l,n);return r.qDimensionInfo.length>1&&(f["".concat(l,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),u&&(f["".concat(l,"MeasureIdx")]=s),f}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,u=e.rtl,s=e.styleReference,l=void 0===s?"object.legend":s,c=e.settings,f=void 0===c?{}:c,d=e.style,p=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return Wl({eventName:t,key:r,rtl:u,viewState:o,chart:a,styleReference:l,settings:f,style:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return o}var Yl=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Xl(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Yl),o=r.some(Yl),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function Jl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Cs(Cs(Cs({},e),t),{},{colorProps:Cs(Cs({},e.colorProps),t.colorProps||{})});return n}var $l=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Zl(e){var t,n=e.qHyperCube.qDimensionInfo.some($l),r=e.qHyperCube.qMeasureInfo.some($l),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Ql=function(){};function ec(e){var t,n,r,i,o=e.picasso,a=e.model,u=e.app,s=e.translator,l=e.layoutService,c=void 0===l?void 0:l,f=e.createConfig,d=void 0===f?Ql:f,p=e.config,m=void 0===p?{}:p,h=e.custom,v=void 0===h?{}:h,g=m.localeInfo,y=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,M=void 0===q?void 0:q,S=m.definitionPath,D=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),C={theme:x,key:y,localeInfo:g,layout:D,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:Cs(Cs({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:D?Xl(D):void 0})},w=Gl({picasso:o,model:a,app:u,translator:s,auto:M});!1!==M&&w.auto((function(e){return M?M({layout:e,defaultAuto:Zl}):Zl(e)}));var O=!1;return{getColor:function(){return w.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return w.resolveUIColor({index:t,color:n})},getData:function(){return w.data()},getDatumProps:function(e){return w.datumProps(e)},getSnapshotData:function(){return w.getSnapshotData(S)},getSettingsForMeasure:function(e){return w.settingsForMeasure(e)},getSettings:function(){return w.settings()},getLegend:function(e,t){return w.legend(e,t)},getScales:function(){return w.scales()},getPalettes:function(){return w.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return w.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return O},custom:Cs({},v),initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createConfig,n=void 0===t?d:t,r=n({getUseBaseColors:Xl}),i=Jl(C,r);w.config(i);var o=w.getAuxiliarySettings(S).then((function(){O=!0}));return o}}}function tc(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var nc=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function rc(e){var t=e.width,n=e.height,r=nc.filter((function(e){return t>=e.size.width&&n>=e.size.height})).shift();return r?r.key:"SPARK"}var ic={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function oc(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?ic[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:ic[o],start:a,end:ic[a]}}function ac(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,u=i.rtl,s=void 0!==u&&u,l={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:l,update:function(e){l.chart.size={width:e.width,height:e.height},l.chart.mode=rc(e);var t=oc({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:s}),r=t.current,i=t.opposite;l.x.dock=r,l.x.opposite=i,l.x.size=e.width;var o=oc({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:s}),a=o.current,u=o.opposite;l.y.dock=a,l.y.opposite=u,l.y.size=e.height}};return c.update(tc({chart:t,logicalSize:a})),c}var uc="vertical",sc="horizontal";function lc(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,u=i.logicalSize,s=void 0!==u&&u,l=i.rtl,c=void 0!==l&&l,f=a.fallback===uc?uc:sc,d=!!a.invert,p=a.measureAxes||[{ref:"measureAxis",name:"minor"}],m={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},h={type:"major-minor",meta:m,update:function(e){m.chart.orientation=n.getLayoutValue("orientation",f),m.chart.size={width:e.width,height:e.height},m.chart.mode=rc(e),m.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?sc:n?t===uc?sc:uc:t}({layoutService:n,chartOrientation:m.chart.orientation,invert:d});var t=oc({orientation:m.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),r=t.current,i=t.opposite;m.major.dock=r,m.major.opposite=i,m.major.size=m.major.orientation===uc?e.height:e.width,p.forEach((function(t){var r={};r.orientation=m.major.orientation===uc?sc:uc;var i=oc({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),o=i.current,a=i.opposite,u=i.start,s=i.end;r.dock=o,r.opposite=a,r.start=u,r.end=s,r.size=r.orientation===uc?e.height:e.width,m[t.name]=r}))}};return h.update(tc({chart:t,logicalSize:s})),h}function cc(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?ac:lc)({chart:t,layoutService:n,config:i,typeConfig:a})}function fc(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function dc(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var u=r[a];void 0===o[u]&&(o[u]=Number.isNaN(+r[a+1])?{}:[]),o=o[u]}void 0!==n?o[i]=n:delete o[i]}}function pc(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function mc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=pc();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function hc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var u=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(u,n)}}function vc(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];n=u;var l=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(l>=i?c():r=setTimeout(c,i-l))}}function gc(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map((function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,u=void 0===a?0:a,s=r.qSelected;return o+u+(void 0===s?0:s)}))}function yc(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:gc(e)}}}(e);case"K":return function(e){var t=gc(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=gc(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function bc(e){var t=e.source,n=e.metaAdditionsFn,r=zs(!0,{},t),i=yc(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,u=a.qDimensionInfo,s=a.qMeasureInfo,l=a.qMode,c=u.length,f=s.length,d=Cs({mode:{S:"S"===l,P:"P"===l,K:"K"===l,T:"T"===l},dimensionCount:c,measureCount:f,hasMultipleDimensions:c>1,hasMultipleMeasures:f>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return Cs(Cs({},d),r({layout:t,meta:d}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:Cs({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return fc(r,e,t)},setLayoutValue:function(e,t){dc(r,e,t),i=yc(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return fc(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){dc(r.qHyperCube,e,t),i=yc(r),a.meta=o()},getDataPages:function(){return fc(r,i.refs.dataPages)},setDataPages:function(e){dc(r,i.refs.dataPages,e),a.meta=o()}};return a}function xc(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function qc(e){return(qc="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function Mc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dc(e,t,n){return t&&Sc(e.prototype,t),n&&Sc(e,n),e}function Cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(n),!0).forEach((function(t){Cc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tc(e,t){return(Tc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ac(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ec(e,t,n){return(Ec=Ac()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Tc(i,n.prototype),i}).apply(null,arguments)}function Lc(e){return function(e){if(Array.isArray(e))return Nc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||kc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kc(e,t){if(e){if("string"==typeof e)return Nc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nc(e,t):void 0}}function Nc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ic=Object.prototype.hasOwnProperty,jc=Object.prototype.toString,Pc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Fc=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===jc.call(e)},zc=function(e){if(!e||"[object Object]"!==jc.call(e))return!1;var t,n=Ic.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ic.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ic.call(e,t)},Hc=function(e,t){Pc&&"__proto__"===t.name?Pc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Vc=function(e,t){if("__proto__"===t){if(!Ic.call(e,t))return;if(Rc)return Rc(e,t).value}return e[t]},Bc=function e(){var t,n,r,i,o,a,u=arguments[0],s=1,l=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[1]||{},s=2),(null==u||"object"!=F(u)&&"function"!=typeof u)&&(u={});s<l;++s)if(null!=(t=arguments[s]))for(n in t)r=Vc(u,n),u!==(i=Vc(t,n))&&(c&&i&&(zc(i)||(o=Fc(i)))?(o?(o=!1,a=r&&Fc(r)?r:[]):a=r&&zc(r)?r:{},Hc(u,{name:n,newValue:e(c,a,i)})):void 0!==i&&Hc(u,{name:n,newValue:i}));return u};function _c(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,u=-1;if(-1===o)for(var s=0;s<r.wrappedFields.length;s++)if(u=r.wrappedFields[s].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[s].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==u||-1!==a){o=s;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:u>=0?function(e){return e[o].qAttrDims.qValues[u]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function Uc(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Wc(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,u=e.row,s=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var d=_c(i.field,o,{cache:t});if(-1===d)return;f=Bc({qRow:a},d(u))}l[c]=Uc(i,f,{key:s})}function Kc(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var u=t.raw(),s=t.key(),l="object"===qc(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,p=Object.keys(f),m=!!i[a].trackBy,h=qc(i[a].trackBy),v={},g=[],y=[],b=0;b<u.qDataPages.length;b++){var x=_c(l,u.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<u.qDataPages[b].qMatrix.length;q++){var M=u.qDataPages[b].qArea.qTop+q,S=Bc({qRow:M},x(u.qDataPages[b].qMatrix[q])),D=Uc(d,S,{key:s});if(!d.filter||d.filter(S)){for(var C=0;C<p.length;C++){var w=f[p[C]],O=w.fields||[w];w.fields&&(D[p[C]]=[]);for(var T=0;T<O.length;T++)Wc({cache:n,f:l,mainCell:S,p:O[T],prop:p[C],props:f,page:u.qDataPages[b],rowIdx:M,row:u.qDataPages[b].qMatrix[q],sourceKey:s,target:w.fields?D[p[C]]:D,targetProp:w.fields?T:p[C]});if(w.fields){var A=D[p[C]].map((function(e){return e.value})),E=D[p[C]].map((function(e){return e.label}));D[p[C]]={value:"function"==typeof w.value?w.value(A):void 0!==w.value?w.value:A,label:"function"==typeof w.label?w.label(E):void 0!==w.label?String(w.label):String(D[p[C]].value)}}}m&&r.track({cfg:i[a],itemData:S,obj:D,target:g,tracker:v,trackType:h}),y.push(D)}}}m?o.push.apply(o,Lc(r.collect(g,{main:d,propsArr:p,props:f}))):o.push.apply(o,y)}return o}function Gc(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 Yc(e,t){var n,r,i,o,a,u=new Zc(e),s=+e.value&&(u.value=e.value),l=[u];for(null==t&&(t=Xc);n=l.pop();)if(s&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Zc(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore($c)}function Xc(e){return e.children}function Jc(e){e.data=e.data.data}function $c(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Zc(e){this.data=e,this.depth=this.height=0,this.parent=null}function Qc(e){if("function"!=typeof e)throw new Error;return e}Zc.prototype=Yc.prototype={constructor:Zc,count:function(){return this.eachAfter(Gc)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].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(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,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(){var e=[];return this.each((function(t){e.push(t)})),e},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 Yc(this).eachBefore(Jc)}};var ef={depth:-1},tf={};function nf(e){return e.id}function rf(e){return e.parentId}function of(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var u=0;u<i.length;u++){var s=of(n,i[u]);Array.isArray(s)?a.push.apply(a,Lc(s)):a.push(s)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=of(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function af(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,Lc(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,Lc(af(e[o].children,t-1,n)));return r}function uf(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=Lc(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return af(e.children,o-1,n)}}return!1}function sf(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var lf=/^qDimensionInfo(?:\/(\d+))?/,cf=/^\/?qMeasureInfo\/(\d+)/,ff=/\/qAttrExprInfo\/(\d+)/,df=/\/qAttrDimInfo\/(\d+)/;function pf(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function mf(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,u=-1,s=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,d=pf(n);return lf.test(c)&&(i=!0,o=+lf.exec(c)[1],c=r.replace(lf,"")),cf.test(c)&&("K"===n.qMode?s=+cf.exec(c)[1]:f&&-1!==f.indexOf(-1)?(s=+cf.exec(c)[1],l=0):l=+cf.exec(c)[1],c=c.replace(cf,"")),c&&(df.exec(c)?u=+df.exec(c)[1]:ff.exec(c)&&(a=+ff.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?d[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:s,measureIdx:l,attrDimIdx:u,attrIdx:a}}function hf(e,t){var n,r,i=uf(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function vf(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function gf(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,u=0;u<t.length;u++){var s=n[t[u]],l=s.fields||[s],c=void 0,f=void 0;s.fields&&(c=[],f=[]);for(var d=function(e){var n=l[e],d=void 0,p=void 0,m=void 0,h=void 0,v=void 0,g=void 0;if("primitive"===n.type?(m=n.value,g=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(p=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(v=h.map(n.valueAccessor),n.attrAccessor&&(v=v.map(n.attrAccessor)),d&&(m=v.map(d),d=null),p&&(g=v.map(p),p=null),m=n.reduce?n.reduce(m):m,g=n.reduceLabel?n.reduceLabel(g,m):String(m)):g=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=i,g=i)),s.fields){var y=d?d(m):m;c.push(y),f.push(p&&null!=g?p(g):null!=g?g:String(y))}else{var b=d?d(m):m;o[t[u]]={value:b,label:p?p(g):null!=g?g:String(b)},n.field&&(o[t[u]].source={field:n.field.key(),key:a})}},p=0;p<l.length;p++)d(p);c&&(o[t[u]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(f,r):f})}}var yf=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=of(r,e);return o&&o[0]?(t.tree=Yc(o[0],n.children||function(e){return e[i]}),t.tree):null};function bf(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},u=0;u<t.length;u++){for(var s=t[u],l="__root",c=!1,f=0;f<i.length;f++){var d=s[i[f]],p="".concat(l,"__").concat(d.qText);a[p]||(a[p]=Oc({__id:p,__parent:l,qValues:[]},d),c=!0),l=p}if(c)for(var m=0;m<o.length;m++){var h=s[o[m]];a[l].qValues.push(h)}}var v=Object.keys(a).map((function(e){return a[e]}));return function(){var e=nf,t=rf;function n(n){var r,i,o,a,u,s,l,c=n.length,f=new Array(c),d={};for(i=0;i<c;++i)r=n[i],u=f[i]=new Zc(r),null!=(s=e(r,i,n))&&(s+="")&&(d[l="$"+(u.id=s)]=l in d?tf:u);for(i=0;i<c;++i)if(u=f[i],null!=(s=t(n[i],i,n))&&(s+="")){if(!(a=d["$"+s]))throw new Error("missing: "+s);if(a===tf)throw new Error("ambiguous: "+s);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=ef,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore($c),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Qc(t),n):e},n.parentId=function(e){return arguments.length?(t=Qc(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(v)}var xf=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,u=0;u<t.length;u++)for(var s=n[t[u]],l=s.fields?s.fields:[s],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var d=hf(o,mf(f.field,{cube:r,cache:i}));f.accessor=d.nodeFn,f.valueAccessor=d.valueFn,f.attrAccessor=d.attrFn}}};function qf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?bf(t):yf(i,n,e);if(!a)return null;for(var u=a.height,s=[],l=0;l<=u;l++){var c=null;if(l>0)if("S"===i.qMode){var f=pf(i),d=f[l-1];c=n.fields[d]}else{var p=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(p=i.qDimensionInfo.length),c=n.fields[p]}var m=r.normalizeConfig(Oc(Oc({},e),{},{field:c?c.key():void 0}),t),h=m.props,v=m.main,g=Object.keys(h);s[l]={propsArr:g,props:h,main:v};var y=c?mf(c,{cube:i,cache:n}):{fieldDepth:0};xf({propsArr:g,props:h,cube:i,cache:n,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),M=0;M<q.length;M++){var S=s[q[M].depth].propsArr,D=s[q[M].depth].props,C=s[q[M].depth].main,w=x[M],O=w.data,T=vf(C,O,{key:o});gf({propsArr:S,props:D,item:w,itemData:O,ret:T,sourceKey:o,isTree:!0}),q[M].data=T}return a}function Mf(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var u=t.raw(),s=t.key();if(!yf(u,n,e))continue;var l="object"===qc(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,d=c.main,p=Object.keys(f),m=mf(l,{cube:u,cache:n}),h=hf({fieldDepth:0},m),v=h.nodeFn,g=h.attrFn,y=h.valueFn;xf({propsArr:p,props:f,cube:u,cache:n,itemDepthObject:m,f:l});for(var b=!!i[a].trackBy,x=qc(i[a].trackBy),q={},M=[],S=v(n.tree),D=[],C=0;C<S.length;C++){var w=S[C],O=g?g(y(w)):y(w);if(!d.filter||d.filter(O)){var T=vf(d,O,{key:s});gf({propsArr:p,props:f,item:w,itemData:O,ret:T,sourceKey:s}),b&&r.track({cfg:i[a],itemData:O,obj:T,target:M,tracker:q,trackType:x}),D.push(T)}}b?o.push.apply(o,Lc(r.collect(M,{main:d,propsArr:p,props:f}))):o.push.apply(o,D)}return o}var Sf,Df=(function(e){
7
+ import e from"picasso.js";import t from"picasso-plugin-q";import n from"picasso-plugin-hammer";import r from"hammerjs";import i from"react";import{Button as o,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import d from"react-dom";import{createGenerateClassName as f,StylesProvider as p,ThemeProvider as m}from"@material-ui/styles";import{useTranslator as h,useEmbed as g,useTheme as y,useState as v,useDeviceType as b,useAppLayout as x,useEffect as q,useElement as M,useOptions as S,useLayout as D,useAction as C,useStaleLayout as w,useModel as O,useApp as T,usePlugins as A,useSelections as L,useConstraints as E,useRect as N,usePromise as k,onTakeSnapshot as I,useImperativeHandle as P}from"@nebula.js/stardust";function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F=Object.prototype.hasOwnProperty,z=Object.prototype.toString,H=Object.defineProperty,V=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===z.call(e)},_=function(e){if(!e||"[object Object]"!==z.call(e))return!1;var t,n=F.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&F.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||F.call(e,t)},U=function(e,t){H&&"__proto__"===t.name?H(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},W=function(e,t){if("__proto__"===t){if(!F.call(e,t))return;if(V)return V(e,t).value}return e[t]},K=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=W(s,n),s!==(i=W(t,n))&&(c&&i&&(_(i)||(o=B(i)))?(o?(o=!1,a=r&&B(r)?r:[]):a=r&&_(r)?r:{},U(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&U(s,{name:n,newValue:i}));return s};const G="center",$="bottom";var Y={NoDataExist:{label:"NoDataExist",alignment:G,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:G,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:G,default:!1},LimitedData:{label:"LimitedData",alignment:$,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:$,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:$,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:$,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],J={};X.forEach((([e,{width:t,height:n}])=>{J[e]={width:t,height:n}}));const Z={getLayoutModes:()=>J,getLayoutMode(e,t){let n;for(n=0;n<X.length;++n)if(e>=X[n][1].width&&t>=X[n][1].height)return X[n][0];return"SPARK"}};function Q(e,t){return{layoutModes:Z.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const ee=["$date","$timestamp","$time"],te=["D","TS","T"],ne={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ee.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&te.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ne.hasTimeTag(t)&&ne.hasUnknownFormat(t)||ne.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ne.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous:e=>!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&ne.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0]),maxNumberOfLines:12},re=(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},ie=(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},oe=e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},ae=e=>re(e,"qHyperCube.qDimensionInfo",[]),se=e=>re(e,"qHyperCube.qMeasureInfo",[]),le=e=>re(e,"barGrouping.grouping"),ue={continuous:(e,t=!1)=>!!ne.canBeContinuous(e)&&(re(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ae(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===le(e)&&(ae(e).length>1||se(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ae(e).length>1&&1===se(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ae(e).length&&se(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==le(e)||this.continuous(e))&&(ae(e).length>1||se(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ae(e).length>1&&1===se(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ae(e).length&&se(e).length>1},simple:e=>0===ae(e).length||1===ae(e).length&&1===se(e).length,snapshot:e=>!!re(e,"snapshotData")};function ce(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const de=e=>{throw e.isHandled=!0,e};const fe={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?fe.getVerticalDock(t):n?fe.getOppositeDock(fe.getHorizontalDock(t)):fe.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var pe=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const me={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=me.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=me.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=me.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(me.stringWidthOverMWidth(o)+1.0909090909090908*a)}};function he(){if(!document.querySelector("#la-vie-tooltip")){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ge({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){he()},beforeUpdate(){he()},destroyed(){!function(){const e=document.querySelector("#la-vie-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#la-vie-tooltip"),content:({h:e,data:t,style:n})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:n}){return e.map((e=>{const r={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))}(t,{h:e,style:n})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const ye=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ve=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),be=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),xe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ye.test(e),isRtlChar:e=>ve.test(e)||be.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],xe.isLtrChar(r))return"ltr";if(xe.isRtlChar(r))return"rtl"}return"ltr"}},qe={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?qe.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=xe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=xe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:xe.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=xe.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=xe.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,qe.getColorSymbol(e,t)]:[qe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=xe.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=xe.detectTextDirection(e.value);let l;return l=i?r?[e.value,qe.getColorSymbol(t,n)]:[qe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Me(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Se(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function De(){}var Ce=1/.7,we="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Te="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ae=/^#([0-9a-f]{3,8})$/,Le=new RegExp("^rgb\\("+[we,we,we]+"\\)$"),Ee=new RegExp("^rgb\\("+[Te,Te,Te]+"\\)$"),Ne=new RegExp("^rgba\\("+[we,we,we,Oe]+"\\)$"),ke=new RegExp("^rgba\\("+[Te,Te,Te,Oe]+"\\)$"),Ie=new RegExp("^hsl\\("+[Oe,Te,Te]+"\\)$"),Pe=new RegExp("^hsla\\("+[Oe,Te,Te,Oe]+"\\)$"),je={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 Re(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatRgb()}function ze(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ae.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?He(t):3===n?new _e(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ve(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ve(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=Le.exec(e))?new _e(t[1],t[2],t[3],1):(t=Ee.exec(e))?new _e(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ne.exec(e))?Ve(t[1],t[2],t[3],t[4]):(t=ke.exec(e))?Ve(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ie.exec(e))?Ge(t[1],t[2]/100,t[3]/100,1):(t=Pe.exec(e))?Ge(t[1],t[2]/100,t[3]/100,t[4]):je.hasOwnProperty(e)?He(je[e]):"transparent"===e?new _e(NaN,NaN,NaN,0):null}function He(e){return new _e(e>>16&255,e>>8&255,255&e,1)}function Ve(e,t,n,r){return r<=0&&(e=t=n=NaN),new _e(e,t,n,r)}function Be(e){return e instanceof De||(e=ze(e)),e?new _e((e=e.rgb()).r,e.g,e.b,e.opacity):new _e}function _e(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ue(){return"#"+Ke(this.r)+Ke(this.g)+Ke(this.b)}function We(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Ke(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ge(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ye(e,t,n,r)}function $e(e){if(e instanceof Ye)return new Ye(e.h,e.s,e.l,e.opacity);if(e instanceof De||(e=ze(e)),!e)return new Ye;if(e instanceof Ye)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ye(a,s,l,e.opacity)}function Ye(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xe(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Me(De,ze,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Re,formatHex:Re,formatHsl:function(){return $e(this).formatHsl()},formatRgb:Fe,toString:Fe}),Me(_e,(function(e,t,n,r){return 1===arguments.length?Be(e):new _e(e,t,n,null==r?1:r)}),Se(De,{brighter:function(e){return e=null==e?Ce:Math.pow(Ce,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new _e(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:Ue,formatHex:Ue,formatRgb:We,toString:We})),Me(Ye,(function(e,t,n,r){return 1===arguments.length?$e(e):new Ye(e,t,n,null==r?1:r)}),Se(De,{brighter:function(e){return e=null==e?Ce:Math.pow(Ce,e),new Ye(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ye(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new _e(Xe(e>=240?e-240:e+120,i,r),Xe(e,i,r),Xe(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Je=Math.PI/180,Ze=180/Math.PI,Qe=4/29,et=6/29,tt=3*et*et;function nt(e){if(e instanceof rt)return new rt(e.l,e.a,e.b,e.opacity);if(e instanceof ct)return dt(e);e instanceof _e||(e=Be(e));var t,n,r=st(e.r),i=st(e.g),o=st(e.b),a=it((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=it((.4360747*r+.3850649*i+.1430804*o)/.96422),n=it((.0139322*r+.0971045*i+.7141733*o)/.82521)),new rt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function rt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function it(e){return e>.008856451679035631?Math.pow(e,1/3):e/tt+Qe}function ot(e){return e>et?e*e*e:tt*(e-Qe)}function at(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function st(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){if(e instanceof ct)return new ct(e.h,e.c,e.l,e.opacity);if(e instanceof rt||(e=nt(e)),0===e.a&&0===e.b)return new ct(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ze;return new ct(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ut(e,t,n,r){return 1===arguments.length?lt(e):new ct(e,t,n,null==r?1:r)}function ct(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function dt(e){if(isNaN(e.h))return new rt(e.l,0,0,e.opacity);var t=e.h*Je;return new rt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Me(rt,(function(e,t,n,r){return 1===arguments.length?nt(e):new rt(e,t,n,null==r?1:r)}),Se(De,{brighter:function(e){return new rt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new rt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){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 _e(at(3.1338561*(t=.96422*ot(t))-1.6168667*(e=1*ot(e))-.4906146*(n=.82521*ot(n))),at(-.9787684*t+1.9161415*e+.033454*n),at(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Me(ct,ut,Se(De,{brighter:function(e){return new ct(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new ct(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return dt(this).rgb()}}));var ft={isDark:function(e){return ut(e).l<70}};function pt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function mt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ht(e){return 1===e.length&&(e=function(e){return function(t,n){return mt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var gt=ht(mt).right,yt=Math.sqrt(50),vt=Math.sqrt(10),bt=Math.sqrt(2);function xt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=yt?10:o>=vt?5:o>=bt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=yt?10:o>=vt?5:o>=bt?2:1)}function qt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=yt?i*=10:o>=vt?i*=5:o>=bt&&(i*=2),t<e?-i:i}function Mt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function St(){}function Dt(e,t){var n=new St;if(e instanceof St)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ct(){}St.prototype=Dt.prototype={constructor:St,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var wt=Dt.prototype;Ct.prototype={constructor:Ct,has:wt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:wt.remove,clear:wt.clear,values:wt.keys,size:wt.size,empty:wt.empty,each:wt.each};var Ot=Array.prototype,Tt=Ot.map,At=Ot.slice;function Lt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Et(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Nt(){}var kt=1/.7,It="\\s*([+-]?\\d+)\\s*",Pt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rt=/^#([0-9a-f]{3})$/,Ft=/^#([0-9a-f]{6})$/,zt=new RegExp("^rgb\\("+[It,It,It]+"\\)$"),Ht=new RegExp("^rgb\\("+[jt,jt,jt]+"\\)$"),Vt=new RegExp("^rgba\\("+[It,It,It,Pt]+"\\)$"),Bt=new RegExp("^rgba\\("+[jt,jt,jt,Pt]+"\\)$"),_t=new RegExp("^hsl\\("+[Pt,jt,jt]+"\\)$"),Ut=new RegExp("^hsla\\("+[Pt,jt,jt,Pt]+"\\)$"),Wt={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 Kt(e){var t;return e=(e+"").trim().toLowerCase(),(t=Rt.exec(e))?new Jt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Ft.exec(e))?Gt(parseInt(t[1],16)):(t=zt.exec(e))?new Jt(t[1],t[2],t[3],1):(t=Ht.exec(e))?new Jt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Vt.exec(e))?$t(t[1],t[2],t[3],t[4]):(t=Bt.exec(e))?$t(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=_t.exec(e))?Qt(t[1],t[2]/100,t[3]/100,1):(t=Ut.exec(e))?Qt(t[1],t[2]/100,t[3]/100,t[4]):Wt.hasOwnProperty(e)?Gt(Wt[e]):"transparent"===e?new Jt(NaN,NaN,NaN,0):null}function Gt(e){return new Jt(e>>16&255,e>>8&255,255&e,1)}function $t(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function Yt(e){return e instanceof Nt||(e=Kt(e)),e?new Jt((e=e.rgb()).r,e.g,e.b,e.opacity):new Jt}function Xt(e,t,n,r){return 1===arguments.length?Yt(e):new Jt(e,t,n,null==r?1:r)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Zt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Qt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new tn(e,t,n,r)}function en(e){if(e instanceof tn)return new tn(e.h,e.s,e.l,e.opacity);if(e instanceof Nt||(e=Kt(e)),!e)return new tn;if(e instanceof tn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new tn(a,s,l,e.opacity)}function tn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function nn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Lt(Nt,Kt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Lt(Jt,Xt,Et(Nt,{brighter:function(e){return e=null==e?kt:Math.pow(kt,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Zt(this.r)+Zt(this.g)+Zt(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Lt(tn,(function(e,t,n,r){return 1===arguments.length?en(e):new tn(e,t,n,null==r?1:r)}),Et(Nt,{brighter:function(e){return e=null==e?kt:Math.pow(kt,e),new tn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new tn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new Jt(nn(e>=240?e-240:e+120,i,r),nn(e,i,r),nn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var rn=Math.PI/180,on=180/Math.PI,an=4/29,sn=6/29,ln=3*sn*sn;function un(e){if(e instanceof cn)return new cn(e.l,e.a,e.b,e.opacity);if(e instanceof gn){if(isNaN(e.h))return new cn(e.l,0,0,e.opacity);var t=e.h*rn;return new cn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Jt||(e=Yt(e));var n,r,i=mn(e.r),o=mn(e.g),a=mn(e.b),s=dn((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=s:(n=dn((.4360747*i+.3850649*o+.1430804*a)/.96422),r=dn((.0139322*i+.0971045*o+.7141733*a)/.82521)),new cn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function cn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function dn(e){return e>.008856451679035631?Math.pow(e,1/3):e/ln+an}function fn(e){return e>sn?e*e*e:ln*(e-an)}function pn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function mn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hn(e){if(e instanceof gn)return new gn(e.h,e.c,e.l,e.opacity);if(e instanceof cn||(e=un(e)),0===e.a&&0===e.b)return new gn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*on;return new gn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function gn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Lt(cn,(function(e,t,n,r){return 1===arguments.length?un(e):new cn(e,t,n,null==r?1:r)}),Et(Nt,{brighter:function(e){return new cn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new cn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){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 Jt(pn(3.1338561*(t=.96422*fn(t))-1.6168667*(e=1*fn(e))-.4906146*(n=.82521*fn(n))),pn(-.9787684*t+1.9161415*e+.033454*n),pn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Lt(gn,(function(e,t,n,r){return 1===arguments.length?hn(e):new gn(e,t,n,null==r?1:r)}),Et(Nt,{brighter:function(e){return new gn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new gn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return un(this).rgb()}}));var yn=-.29227,vn=-.90649,bn=1.97294,xn=bn*vn,qn=1.78277*bn,Mn=-.6557636667999999;function Sn(e){if(e instanceof Dn)return new Dn(e.h,e.s,e.l,e.opacity);e instanceof Jt||(e=Yt(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Mn*r+xn*t-qn*n)/(Mn+xn-qn),o=r-i,a=(bn*(n-i)-yn*o)/vn,s=Math.sqrt(a*a+o*o)/(bn*i*(1-i)),l=s?Math.atan2(a,o)*on-120:NaN;return new Dn(l<0?l+360:l,s,i,e.opacity)}function Dn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Cn(e){return function(){return e}}function wn(e){return 1==(e=+e)?On: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):Cn(isNaN(t)?n:t)}}function On(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Cn(isNaN(e)?t:e)}Lt(Dn,(function(e,t,n,r){return 1===arguments.length?Sn(e):new Dn(e,t,n,null==r?1:r)}),Et(Nt,{brighter:function(e){return e=null==e?kt:Math.pow(kt,e),new Dn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Dn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*rn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Jt(255*(t+n*(-.14861*r+1.78277*i)),255*(t+n*(yn*r+vn*i)),255*(t+n*(bn*r)),this.opacity)}}));var Tn=function e(t){var n=wn(t);function r(e,t){var r=n((e=Xt(e)).r,(t=Xt(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=On(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function An(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=jn(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Ln(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function En(e,t){return t-=e=+e,function(n){return e+t*n}}function Nn(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=jn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,In=new RegExp(kn.source,"g");function Pn(e,t){var n,r,i,o=kn.lastIndex=In.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=kn.exec(e))&&(r=In.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:En(n,r)})),o=In.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),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("")})}function jn(e,t){var n,r=typeof t;return null==t||"boolean"===r?Cn(t):("number"===r?En:"string"===r?(n=Kt(t))?(t=n,Tn):Pn:t instanceof Kt?Tn:t instanceof Date?Ln:Array.isArray(t)?An:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Nn:En)(e,t)}function Rn(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function Fn(e){return+e}var zn=[0,1];function Hn(e){return e}function Vn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Bn(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function _n(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Vn(i,r),o=n(a,o)):(r=Vn(r,i),o=n(o,a)),function(e){return o(r(e))}}function Un(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Vn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=gt(e,t,1,r)-1;return o[n](i[n](t))}}function Wn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Kn(e,t){return function(){var e,t,n,r,i,o,a=zn,s=zn,l=jn,u=Hn;function c(){return r=Math.min(a.length,s.length)>2?Un:_n,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),En)))(n)))},d.domain=function(e){return arguments.length?(a=Tt.call(e,Fn),u===Hn||(u=Bn(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=At.call(e),c()):s.slice()},d.rangeRound=function(e){return s=At.call(e),l=Rn,c()},d.clamp=function(e){return arguments.length?(u=e?Bn(a):Hn,d):u!==Hn},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function Gn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $n(e){return(e=Gn(Math.abs(e)))?e[1]:NaN}var Yn,Xn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jn(e){return new Zn(e)}function Zn(e){if(!(t=Xn.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Qn(e,t){var n=Gn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Jn.prototype=Zn.prototype,Zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Qn(100*e,t)},r:Qn,s:function(e,t){var n=Gn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Yn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gn(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function tr(e){return e}var nr,rr,ir,or=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ar(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):tr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):tr,s=e.percent||"%";function l(e){var t=(e=Jn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,f=e.comma,p=e.precision,m=e.trim,h=e.type;"n"===h?(f=!0,h="g"):er[h]||(null==p&&(p=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?i[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?i[1]:/[%p]/.test(h)?s:"",v=er[h],b=/[defgprs%]/.test(h);function x(e){var i,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var M=(e=+e)<0;if(e=v(Math.abs(e),p),m&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0==+e&&(M=!1),x=(M?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?or[8+Yn/3]:"")+q+(M&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){q=(46===u?o+e.slice(i+1):e.slice(i))+q,e=e.slice(0,i);break}}f&&!c&&(e=r(e,1/0));var S=x.length+e.length+q.length,D=S<d?new Array(d-S+1).join(t):"";switch(f&&c&&(e=r(D+e,D.length?d-q.length:1/0),D=""),n){case"<":e=x+e+q+D;break;case"=":e=x+D+e+q;break;case"^":e=D.slice(0,S=D.length>>1)+x+e+q+D.slice(S);break;default:e=D+x+e+q}return a(e)}return p=null==p?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Jn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor($n(t)/3))),i=Math.pow(10,-r),o=or[8+r/3];return function(e){return n(i*e)+o}}}}function sr(e,t,n,r){var i,o=qt(e,t,n);switch((r=Jn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($n(t)/3)))-$n(Math.abs(e)))}(o,a))||(r.precision=i),ir(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$n(t)-$n(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-$n(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return rr(r)}function lr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=xt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return sr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=xt(s,l,n))>0?r=xt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=xt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function ur(){var e=Kn(Hn,Hn);return e.copy=function(){return Wn(e,ur())},Mt.apply(e,arguments),lr(e)}nr=ar({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),rr=nr.format,ir=nr.formatPrefix;var cr=new Date,dr=new Date;function fr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return fr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return cr.setTime(+t),dr.setTime(+r),e(cr),e(dr),Math.floor(n(cr,dr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var pr=fr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));pr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?fr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):pr:null};var mr=fr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));fr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),fr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var hr=fr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function gr(e){return fr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var yr=gr(0),vr=gr(1);gr(2),gr(3);var br=gr(4);gr(5),gr(6),fr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var xr=fr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));xr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var qr=fr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),Mr=fr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),Sr=fr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Dr(e){return fr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Cr=Dr(0),wr=Dr(1);Dr(2),Dr(3);var Or=Dr(4);Dr(5),Dr(6);var Tr=fr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Ar=fr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Lr(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Er(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Nr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Ar.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var kr,Ir,Pr,jr={"-":"",_:" ",0:"0"},Rr=/^\s*\d+/,Fr=/^%/,zr=/[\\^$*+?|[\]().{}]/g;function Hr(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Vr(e){return e.replace(zr,"\\$&")}function Br(e){return new RegExp("^(?:"+e.map(Vr).join("|")+")","i")}function _r(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ur(e,t,n){var r=Rr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Wr(e,t,n){var r=Rr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kr(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Gr(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $r(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Yr(e,t,n){var r=Rr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xr(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Jr(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Zr(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Qr(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ei(e,t,n){var r=Rr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ti(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ni(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ri(e,t,n){var r=Rr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ii(e,t,n){var r=Rr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function oi(e,t,n){var r=Rr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ai(e,t,n){var r=Fr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function si(e,t,n){var r=Rr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function li(e,t,n){var r=Rr.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ui(e,t){return Hr(e.getDate(),t,2)}function ci(e,t){return Hr(e.getHours(),t,2)}function di(e,t){return Hr(e.getHours()%12||12,t,2)}function fi(e,t){return Hr(1+hr.count(xr(e),e),t,3)}function pi(e,t){return Hr(e.getMilliseconds(),t,3)}function mi(e,t){return pi(e,t)+"000"}function hi(e,t){return Hr(e.getMonth()+1,t,2)}function gi(e,t){return Hr(e.getMinutes(),t,2)}function yi(e,t){return Hr(e.getSeconds(),t,2)}function vi(e){var t=e.getDay();return 0===t?7:t}function bi(e,t){return Hr(yr.count(xr(e),e),t,2)}function xi(e,t){var n=e.getDay();return e=n>=4||0===n?br(e):br.ceil(e),Hr(br.count(xr(e),e)+(4===xr(e).getDay()),t,2)}function qi(e){return e.getDay()}function Mi(e,t){return Hr(vr.count(xr(e),e),t,2)}function Si(e,t){return Hr(e.getFullYear()%100,t,2)}function Di(e,t){return Hr(e.getFullYear()%1e4,t,4)}function Ci(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Hr(t/60|0,"0",2)+Hr(t%60,"0",2)}function wi(e,t){return Hr(e.getUTCDate(),t,2)}function Oi(e,t){return Hr(e.getUTCHours(),t,2)}function Ti(e,t){return Hr(e.getUTCHours()%12||12,t,2)}function Ai(e,t){return Hr(1+Sr.count(Ar(e),e),t,3)}function Li(e,t){return Hr(e.getUTCMilliseconds(),t,3)}function Ei(e,t){return Li(e,t)+"000"}function Ni(e,t){return Hr(e.getUTCMonth()+1,t,2)}function ki(e,t){return Hr(e.getUTCMinutes(),t,2)}function Ii(e,t){return Hr(e.getUTCSeconds(),t,2)}function Pi(e){var t=e.getUTCDay();return 0===t?7:t}function ji(e,t){return Hr(Cr.count(Ar(e),e),t,2)}function Ri(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Or(e):Or.ceil(e),Hr(Or.count(Ar(e),e)+(4===Ar(e).getUTCDay()),t,2)}function Fi(e){return e.getUTCDay()}function zi(e,t){return Hr(wr.count(Ar(e),e),t,2)}function Hi(e,t){return Hr(e.getUTCFullYear()%100,t,2)}function Vi(e,t){return Hr(e.getUTCFullYear()%1e4,t,4)}function Bi(){return"+0000"}function _i(){return"%"}function Ui(e){return+e}function Wi(e){return Math.floor(+e/1e3)}!function(e){kr=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Br(i),c=_r(i),d=Br(o),f=_r(o),p=Br(a),m=_r(a),h=Br(s),g=_r(s),y=Br(l),v=_r(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ui,e:ui,f:mi,H:ci,I:di,j:fi,L:pi,m:hi,M:gi,p:function(e){return i[+(e.getHours()>=12)]},Q:Ui,s:Wi,S:yi,u:vi,U:bi,V:xi,w:qi,W:Mi,x:null,X:null,y:Si,Y:Di,Z:Ci,"%":_i},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:wi,e:wi,f:Ei,H:Oi,I:Ti,j:Ai,L:Li,m:Ni,M:ki,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:Ui,s:Wi,S:Ii,u:Pi,U:ji,V:Ri,w:Fi,W:zi,x:null,X:null,y:Hi,Y:Vi,Z:Bi,"%":_i},q={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return D(e,t,n,r)},d:Qr,e:Qr,f:oi,H:ti,I:ti,j:ei,L:ii,m:Zr,M:ni,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:si,s:li,S:ri,u:Wr,U:Kr,V:Gr,w:Ur,W:$r,x:function(e,t,r){return D(e,n,t,r)},X:function(e,t,n){return D(e,r,t,n)},y:Xr,Y:Yr,Z:Jr,"%":ai};function M(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=jr[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,i,o=Nr(1900);if(D(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Er(Nr(o.y))).getUTCDay(),r=i>4||0===i?wr.ceil(r):wr(r),r=Sr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(Nr(o.y))).getDay(),r=i>4||0===i?vr.ceil(r):vr(r),r=hr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Er(Nr(o.y)).getUTCDay():t(Nr(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Er(o)):t(o)}}function D(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in jr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=M(n,b),b.X=M(r,b),b.c=M(t,b),x.x=M(n,x),x.X=M(r,x),x.c=M(t,x),{format:function(e){var t=M(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",Lr);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e,Er);return t.toString=function(){return e},t}}}(e),Ir=kr.utcFormat,Pr=kr.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Ir("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Pr("%Y-%m-%dT%H:%M:%S.%LZ");function Ki(e){return new Date(e)}function Gi(e){return e instanceof Date?+e:+new Date(+e)}function $i(e,t,n,r,i,o,a,s,l){var u=Kn(Hn,Hn),c=u.invert,d=u.domain,f=l(".%L"),p=l(":%S"),m=l("%I:%M"),h=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function q(s){return(a(s)<s?f:o(s)<s?p:i(s)<s?m:r(s)<s?h:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function M(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=ht((function(e){return e[2]})).right(x,o);a===x.length?(i=qt(n/31536e6,r/31536e6,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(qt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Tt.call(e,Gi)):d().map(Ki)},u.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=M(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?q:l(t)},u.nice=function(e,t){var n=d();return(e=M(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):u},u.copy=function(){return Wn(u,$i(e,t,n,r,i,o,a,s,l))},u}const Yi={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Xi=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var Ji={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Yi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Xi(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Xi(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Zi({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Qi;function eo(){Qi=Qi||document.createElement("canvas").getContext("2d")}const to={measureTextWidth(e){eo();const{width:t}=Qi.measureText(e);return t},lineWrap(e,t,n,r){let i,o;eo();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,f=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Qi.font=n),o=0;o<a.length;o++){for(d=a[o]||"",f=d.split(/\s+/),[p]=f,c="",i=1;i<f.length;i++)if(l=`${p} ${f[i]}`,u=to.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=f[i]):p=l,"number"==typeof r&&s.length>=r){c=f.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${c}`}return s},wordWrap(e,t,n,r,i){if(eo(),!e||!e.length)return[];n&&(Qi.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||to.measureTextWidth(u)<=t?o.push(u):(s=to.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?to.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=to.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&to.measureTextWidth(u)>t&&(o[o.length-1]=to.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){eo();let i,o,a,s,l=e;const u=to.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Qi.font=n),e&&t){if(to.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,to.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;eo();let o,a=e,s="",l=[];if(to.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(to.measureTextWidth(a)<=t));i--);return(!i&&!a||to.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(to.measureTextWidth(s)>t?(s=to.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(eo(),e&&t?(n&&(Qi.font=n),to.explodeWord(e,t,r,Math.max(1,to.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?to.lineWrap(e,t,n,r):[e],o=to.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(eo(),e&&(Qi.font=e),1.5*to.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){eo(),t&&(Qi.font=t);const s=to.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?f-c:e)}))):u=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<f&&(d=d.concat(to.wrapText(e,i,t,u[n])))})):d=to.wrapText(e,i,t,u[0],n),d}},no={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(K({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},ro=K.bind(null,!0),io={},{isArray:oo}=Array;function ao(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function so(e){return void 0===e}function lo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function uo(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=so(e[r||t])?o:e[t],e=e[r||t]})),e}function co(e,t){let n=!0;if(ao(e)&&ao(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{co(e[r],t[r])||(n=!1)})),n);if(oo(e)&&oo(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!co(e[n],t[n]))return!1;return!0}return e===t}io.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?ro({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;co(o,a)||lo(t,i)||(so(a)?r.push({op:"add",path:s,value:o}):ao(o)&&ao(a)?r=r.concat(io.generate(a,o,s)):oo(o)&&oo(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&so(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(co(t,i))return r;if(!so(t[0])&&so(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(io.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{so(t[i])&&!lo(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},io.apply=function(e,t){t.forEach((t=>{let n=uo(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(oo(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(oo(i)&&oo(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(ao(i)&&ao(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!lo(a,e)&&delete a[e]})),ro(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=uo(e,t.from);oo(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(oo(n)?n.splice(+r,1):delete n[r]);var a}))},io.clone=function(e){return ro({},e)},io.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},io.updateObject=function(e,t){Object.keys(e).length?io.apply(e,io.generate(e,t)):ro(e,t)};const fo=Math.log(10);function po(e){return 10**e}const mo={pow10:po,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/fo,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/fo),r=e/po(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*po(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/fo);const r=e/po(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*po(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return po(Math.floor(Math.log(Math.abs(e))/fo))},getFraction(e){if(0===e)return 0;return e/po(Math.floor(Math.log(Math.abs(e))/fo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/fo),r=e/po(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*po(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},ho=[[2,4,6],[2,4],[3]],go=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function yo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function vo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)yo(e[r],t,n)}!function(){let e,t;for(vo(ho,1,10),e=0;e<go.length;e++)if(go[e])for(t=0;t<go[e].length;t++)Array.isArray(go[e][t])&&vo(go[e][t])}();const bo={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=bo.findSegmentPositionMeetMin(e,t);return bo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=bo.findSegmentPositionMeetMax(e,n);return bo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=bo.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=bo.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,bo.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)bo.layoutPositionFromMin(e,t,n,r),bo.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=bo.findSegmentPositionMeetMaxThenMin(r,t,n)}}},xo=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},qo=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,Mo=e=>e.filter(qo),So=(e,t)=>Mo(re(e,t,[])),Do=e=>qo(e)&&(!1!==e.showValue||!1!==e.showLabel),Co=e=>e.filter(Do),wo=(e,t)=>Co(re(e,t,[])),Oo=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,To=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},Ao=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},Lo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},Eo=({value:e,qMin:t})=>"NaN"!==t&&e<t,No=({value:e,qMax:t})=>"NaN"!==t&&e>t,ko={isRefLineVisible:qo,getVisibleRefLines:Mo,getRefLines:So,getMeasureRefLines:e=>So(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:So(e,"refLine.dimRefLines"),isRefLineLabelVisible:Do,getVisibleRefLineLabels:Co,getRefLineLabels:wo,getMeasureRefLineLabels:e=>wo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:wo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=xo(s,i,o,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let u;return l=xo(s,i,o,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===u?s(n):u)+l}return l=xo(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=re(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():re(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=re(l,s?"qData.0.qSubNodes":"qMatrix",[]),c=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,r=t[c];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+d,a=n[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+d,r=t[c];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),o},getInputValue:Oo,extractInfoFromInputValue:To,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Oo({refLineLayout:e,layoutService:n});return To(r,t,"id")},isDiscreteMinOutOfBounds:Ao,isDiscreteMaxOutOfBounds:Lo,isContinuousMinOutOfBounds:Eo,isContinuousMaxOutOfBounds:No,isOutOfRange:({value:e,qMin:t,qMax:n})=>Eo({value:e,qMin:t})||No({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Lo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Ao({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function Io(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines=to.tokenize(i.title,t,"… "+i.valueString,3,n),i.maxNumLines=i.lines.length}}function Po({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=to.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function jo({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>Po({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function Ro(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Fo=3,zo=2;function Ho({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Vo=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ko.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ko.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ko.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ko.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Bo={hasEngineFormat:Ho,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=ko.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{canBeContinuous:d}=r.meta;let f,p;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");f=e.qMin,p=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,m=Vo({label:o,dataPages:c,qMin:f,qMax:p});o.scaledValue=1===m?l?-.1:1.1:-1===m?l?1.1:-.1:ko.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=Ho({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${xe.lrm}(${o})${xe.lrm}`,r.title=Bo.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=Ho({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${xe.lrm}(${o})${xe.lrm}`,n.title=Bo.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${xe.lrm}(${o})${xe.lrm}`,n.title=Bo.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=Bo.getTotalNumLines(e)-r;if(t<=0)return;Bo.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Bo.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:f,layoutService:p,isContinuous:m,isDimension:h}){const g=e.map((e=>e)),y=n;Bo.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:p,orientation:c,rtl:f,isContinuous:m,isDimension:h}),Ro(e,"center"),Bo.addLabelsNeighborInfo(e,r,i,o),Io(e,a,s),Bo.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===c&&(Bo.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=to.tokenize(i.title,t,"… "+i.valueString,i.maxNumLines,n))}}(e,a,s)),Bo.addLabelsSize(e,s,l,d),Bo.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l}=r,{minorCenter:u}=i,{fontSize:c,fontFamily:d,background:f}=t;let p=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const f={type:"text",text:t,title:Po({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:c,fontFamily:d,fill:e.fill,baseline:"central",anchor:"middle"};return f[l]=u,f[s]=e.segment.position,f.y+=(i-(r-1)/2)*o,f}));e.background&&p.push(function({minorCenter:e,majorAxis:t,minorAxis:n,label:r,lineHeight:i,background:o}){const{lines:a}=r,{borderRadius:s=Fo,padding:l={}}=o,{top:u=zo,bottom:c=zo,left:d=zo,right:f=zo}=l,p=a.length,m={type:"rect",rx:s,ry:s,fill:r.background.fill,width:r.width+(d+f),height:r.height+(u+c)};return m[n]=e,m[t]=r.segment.position,m.x-=r.width/2+d,m.y-=p*i/2+u,m}({minorCenter:u,majorAxis:s,minorAxis:l,label:e,lineHeight:o,background:f})),p=p.concat(i)})),p}};function _o(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Uo(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return Bo.getMaxTextWidth(e)>a&&(Io(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+i+o}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,Bo.getMaxTextWidth(e))+n+r}(t,n)}function Wo(e,t){return t?e.domain():[0,1]}function Ko(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Go(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function $o(e,t){return e>9?t[1]:t[0]}function Yo({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:f,minorAxis:p,minorDimension:m}=s,h=i[m],g=no.createOob({oob:no.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o}),y="c"+f,v="c"+p,b={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0};b[v]=h/2,b[y]=a;const x={type:"text",text:c>9?"9+":c,title:jo({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle"};return x[p]=h/2,x[f]=a,[g,b,x]}function Xo(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:to.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const Jo=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var Zo={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Jo(this.settings.labels),s=_o(this.chart,this.settings.formatter,e);Bo.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=Wo(t,n);return Ko(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Ko(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Xo(t.label),{dock:n}=this.settings.layout;return Bo.measureLabelsWidth(c,this.measureText),d=Uo(n,c,e),d}const f=Go(this.measureText),p=l?$o(l,f):0,m=u?$o(u,f):0;return d=Math.max(p,m),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,u=Jo(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:f}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),m=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,f),{orientation:h,majorDimension:g}=p,{majorSize:y}=m,{font:v,lineHeight:b,gap:x,maxLabelWidth:q}=Xo(n.label),M=_o(this.chart,this.settings.formatter,e),S=y;Bo.addLabelTitles({labels:u,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),Bo.calculateLabelPositions({labels:u,scale:e,size:S,layoutService:r,orientation:h,rtl:d,isContinuous:o,isDimension:a});const[D,C]=Wo(e,o),{filteredLabels:w,lowerOobs:O,upperOobs:T,lowerCircleSize:A,upperCircleSize:L,lowerOobSpace:E,upperOobSpace:N}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:f}=Ko(e,t,n,u),p="scaledValue"!==u&&ko.getInvert({orientation:r,rtl:i,isContinuous:o}),m=function(e,t,n){return n?t:e}(d,c,p),h=function(e,t,n){return n?e:t}(d,c,p),g=m.length,y=h.length,v=Go(l),b=$o(g,v),x=$o(y,v);return{filteredLabels:f,lowerOobs:m,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),upperOobSpace:function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s)}}({labels:u,minValue:D,maxValue:C,orientation:h,rtl:d,isContinuous:o,style:n,padding:f,measureText:this.measureText,prop:o?"value":"scaledValue"}),k=E,I=y-N;Ro(O),Ro(T);const P=Yo({alignment:0,dockValue:0,oobs:O,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+A/2,areaProps:p,radius:A/2,font:v}),j=Yo({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+L/2),areaProps:p,radius:L/2,font:v});Bo.addLabelsInfo({labels:w,scale:e,majorSize:y,lowerLimit:k,upperLimit:I,font:v,lineHeight:b,gap:x,maxLabelWidth:q,majorDimension:g,orientation:h,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),bo.layout(w.map((e=>e.segment)),k,I,n.label.gap);const R=w.filter((e=>bo.isInside(e.segment,k,I,o)));return Bo.createLabels({labels:R,style:n.label,maxLabelWidth:q,areaProps:p,area:m,lineHeight:b,font:v,theme:i}).concat([...P,...j])}};const{getInputValue:Qo,extractInfoFromInputValue:ea,resolveValue:ta}=ko;var na={resolveValue:ta,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Qo({refLineLayout:e,layoutService:n});return ea(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Qo({refLineLayout:e,layoutService:n});return ea(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=Qo({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Qo({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};function ra({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,chart:o,scale:a,axis:s,rtl:l,key:u,mainComponentKey:c,path:d,minimumLayoutMode:f}){const p=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!p.length)return!1;const m={key:u,type:"ref-line",layout:{minimumLayoutMode:f},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}})},h=!(!e||"horizontal"!==i.meta.major.orientation||!l),g=!e||n.meta.isContinuous;return p.forEach((l=>{m.lines[s].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var f,p;const m={dir:l,line:{strokeWidth:(null==t||null===(f=t.style)||void 0===f?void 0:f.lineThickness)||2,strokeDasharray:null==t||null===(p=t.style)||void 0===p?void 0:p.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(m.scale=s,m.value=t.refLineExpr.value):m.value=()=>{var e;const i=ko.getScaledPosition({scale:a.scale(s),value:na.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:na.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i},m})({isDimension:e,refLineLayout:l,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:o,scale:a,axis:s,invert:h,component:c,isContinuous:g}))})),m}const ia={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function oa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dock:i,scale:o,style:a,formatter:s,theme:l,localeInfo:u,rtl:c,key:d,path:f}){const p=e?t.dimensionRefLineLabels:f?t.query.getRefLineLabels(f):t.measureRefLineLabels;if(!p.length)return[];const m=[],h=!e||n.meta.isContinuous,g=p.map((e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>na.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>na.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>na.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:l,isContinuous:h})));return m.push((({isDimension:e,layoutService:t,style:n,labels:r,scale:i,formatter:o,dock:a,key:s,rtl:l,theme:u,isContinuous:c,localeInfo:d})=>({key:s,type:"reference-line-labels",renderer:"svg",labels:r,formatter:o,scale:i,layoutService:t,layout:{dock:a,rtl:l},theme:u,isContinuous:c,isDimension:e,localeInfo:d,style:{label:{fontFamily:n.referenceLine.label.name.fontFamily,fontSize:n.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===a||"right"===a?10:16},oob:{size:8,fill:n.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:n.referenceLine.outOfBounds.fontFamily,fontSize:n.referenceLine.outOfBounds.fontSize,fill:n.referenceLine.outOfBounds.color,background:{fill:n.referenceLine.outOfBounds.backgroundColor}}}}}))({isDimension:e,rtl:c,style:K(!0,ia,a),dock:i,key:d,labels:g,scale:o,formatter:s,layoutService:n,theme:l,isContinuous:h,localeInfo:u})),m}function aa({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ue.dimensionless(o),l=ko.getMeasureRefLines(o),u=ko.getDimensionRefLines(o,s),c=ko.getMeasureRefLineLabels(o),d=ko.getDimensionRefLineLabels(o,s);let f={},p={};const m=()=>!(!u||!u.length)&&!u.every((t=>{const o=ko.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return ko.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!p[t])return!1;if(!n&&i){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return ko.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),h={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:p,dimensionValuesInfo:f,query:{getRefLines:e=>ko.getRefLines(o,e),getRefLineLabels:e=>ko.getRefLineLabels(o,e)},update:()=>{p=h.dimensionRefLineInfo,m()&&(f=ko.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),h.dimensionValuesInfo=f,u.forEach((t=>{const n=ko.getInputValue({refLineLayout:t,layoutService:e});f[n]&&(p[n]?(p[n].innerValues=f[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,f[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,f[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||f[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||f[n].isMaxOrderOk):p[n]={id:f[n].id,qText:f[n].qText,innerValues:f[n].innerValues,minOrder:f[n].minOrder,maxOrder:f[n].maxOrder,isMinOrderOk:f[n].isMinOrderOk,isMaxOrderOk:f[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)})))}};return h.update(),h}const sa={combineBounds(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach((e=>{e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))})),{x:t,y:r,width:n-t,height:i-r}}};var la={exports:{}};function ua(){}function ca(){}ca.resetWarningCache=ua;la.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ca,resetWarningCache:ua};return n.PropTypes=n,n}();var da=la.exports;function fa(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function pa({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:fa(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return i.createElement("i",{style:o},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},i.createElement("path",{d:e})))}const ma={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},ha={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},ga="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",ya={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},va={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function ba(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=io.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function xa(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],o||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,i&&i({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),ba(e,a,s)}))}function qa({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){xa(r,e,t,"qDimensions",a)}}}function Ma(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var i}function Sa({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){xa(i,e,t,"qMeasures",o,a)}}}function Da(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const Ca={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},wa=({children:e,...t})=>i.createElement(o,j({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Oa(){function e({title:e,selected:t,onClick:n}){const r=xe.detectTextDirection(e);return i.createElement(l,{button:!0,onClick:n,style:{textAlign:"start"}},i.createElement(u,{style:{minWidth:32}},i.createElement(pa,{d:t?ga:""})),i.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:o,dock:l,list:u,onClose:c,show:d}){const f=u.map(((t,r)=>i.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return i.createElement(a,j({anchorEl:t,open:d,onClose:c},Ca[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),i.createElement(s,{dense:!0,dir:o,component:"nav"},i.createElement(e,{title:r,selected:!0,onClick:c}),f))}e.propTypes={title:da.string.isRequired,selected:da.bool,onClick:da.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:da.any,changeTo:da.func.isRequired,current:da.string.isRequired,dir:da.string.isRequired,dock:da.string.isRequired,list:da.array,onClose:da.func.isRequired,show:da.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n extends i.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=i.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:o,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},d=e.breadcrumbs.length,f=o||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>i.createElement(wa,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},i.createElement("span",{style:c},t),i.createElement(pa,j({},va,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||o||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=xe.detectTextDirection(e.text),v=i.createElement(wa,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&i.createElement(pa,j({},ha,{size:"small",title:r.get("Tooltip.selections.locked")})),i.createElement("span",{style:c,dir:y},e.text),n&&i.createElement(pa,j({},ya,{size:"small",style:{margin:"0 8px"}})));return i.createElement(i.Fragment,null,e.drilldown&&i.createElement(pa,j({},ma,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),p,i.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),n&&i.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&re(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:da.bool.isRequired,padding:da.string,minWidth:da.string,titleData:da.shape({breadcrumbs:da.arrayOf(da.string).isRequired,drilldown:da.bool.isRequired,index:da.number.isRequired,locked:da.bool.isRequired,text:da.string.isRequired,popoverText:da.string.isRequired,drillUp:da.func}).isRequired,popover:da.shape({dir:da.string.isRequired,dock:da.string.isRequired,changeTo:da.func.isRequired,getAlternatives:da.func.isRequired}),translator:da.shape({get:da.func.isRequired}).isRequired,selections:da.shape({isActive:da.func,addListener:da.func,removeListener:da.func}),style:da.shape({fontSize:da.string,color:da.string,fontFamily:da.string}).isRequired,isDimension:da.bool.isRequired,hasAlternative:da.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:d,onChangeToAlternative:f,padding:p,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,M=q&&q[u?"qDimensions":"qMeasures"]||[],S=a||s[u?"qDimensionInfo":"qMeasureInfo"],D=u?qa:Sa,C=u?Ma:Da,w=d&&d.colorSupport&&d.modifiers&&D({altList:M,app:e,dir:m?"rtl":"ltr",dock:r(v),model:d,onChange:f,skipAttributeExpressions:g,translator:y}),O=(T=this.settings.settings).isDimension&&re(T,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var T;const A=S.map(((e,r)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:r,a=C(e,o,d),s=r===S.length-1;return i.createElement(i.Fragment,{key:e.cId},i.createElement(n,{popover:w,titleData:a,model:d,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:p,minWidth:c,hasAlternative:O}),!s&&i.createElement("span",null,", "))}));return i.createElement("div",{style:x,dir:b},A)}}}function Ta(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Aa(e){if(e.type)return e;if("#"===e.charAt(0))return Aa(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function La(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Ea(e){var t="hsl"===(e=Aa(e)).type?Aa(function(e){var t=(e=Aa(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),La({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ka(){return(ka=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ia(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pa(){return(Pa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ja(e){return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ra(e){return(Ra="function"==typeof Symbol&&"symbol"===ja(Symbol.iterator)?function(e){return ja(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":ja(e)})(e)}function Fa(e){return e&&"object"===Ra(e)&&!Array.isArray(e)}function za(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Pa({},e):e;return Fa(e)&&Fa(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Fa(t[i])&&i in e?r[i]=za(e[i],t[i],n):r[i]=t[i])})),r}var Ha=["xs","sm","md","lg","xl"];function Va(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=Ia(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var r=Ha.indexOf(t)+1;return r===Ha.length?l(e):"@media (min-width:".concat(n[e]).concat(i,") and ")+"(max-width:".concat(n[Ha[r]]-a/100).concat(i,")")}return ka({keys:Ha,values:n,up:l,down:function(e){var t=Ha.indexOf(e)+1,r=n[Ha[t]];return t===Ha.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Ba(e,t,n){var r;return ka({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ka({paddingLeft:t(2),paddingRight:t(2)},n,Na({},e.up("sm"),ka({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Na(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Na(r,e.up("sm"),{minHeight:64}),r)},n)}var _a={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Ua={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Wa={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Ka={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ga={black:"#000",white:"#fff"},$a={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ga.white,default:Wa[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Ya={text:{primary:Ga.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Wa[800],default:"#303030"},action:{active:Ga.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Xa(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Aa(e),t=Ta(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return La(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Aa(e),t=Ta(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return La(e)}(e.main,1.5*r)))}function Ja(e){var t=e.primary,n=void 0===t?{light:_a[300],main:_a[500],dark:_a[700]}:t,r=e.secondary,i=void 0===r?{light:Ua.A200,main:Ua.A400,dark:Ua.A700}:r,o=e.error,a=void 0===o?{light:Ka[300],main:Ka[500],dark:Ka[700]}:o,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,d=e.tonalOffset,f=void 0===d?.2:d,p=Ia(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=Ea(e),r=Ea(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ya.text.primary)>=c?Ya.text.primary:$a.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=ka({},e)).main&&e[t]&&(e.main=e[t]),Xa(e,"light",n,f),Xa(e,"dark",r,f),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Ya,light:$a};return za(ka({common:Ga,type:l,primary:h(n),secondary:h(i,"A400","A200","A700"),error:h(a),grey:Wa,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:f},g[l]),p,{clone:!1})}function Za(e){return Math.round(1e5*e)/1e5}var Qa={textTransform:"uppercase"};function es(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,f=void 0===d?500:d,p=n.fontWeightBold,m=void 0===p?700:p,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Ia(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},M=function(e,t,n,r,o){return ka({fontFamily:i,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(Za(r/t),"em")}:{},{},o,{},y)},S={h1:M(l,96,1,-1.5),h2:M(l,60,1,-.5),h3:M(c,48,1.04,0),h4:M(c,34,1.17,.25),h5:M(c,24,1.33,0),h6:M(f,20,1.6,.15),subtitle1:M(c,16,1.75,.15),subtitle2:M(f,14,1.57,.1),body1:M(c,16,1.5,.15),body2:M(c,14,1.43,.15),button:M(f,14,1.75,.4,Qa),caption:M(c,12,1.66,.4),overline:M(c,12,2.66,1,Qa)};return za(ka({htmlFontSize:g,pxToRem:q,round:Za,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:f,fontWeightBold:m},S),b,{clone:!1})}function ts(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var ns=["none",ts(0,2,1,-1,0,1,1,0,0,1,3,0),ts(0,3,1,-2,0,2,2,0,0,1,5,0),ts(0,3,3,-2,0,3,4,0,0,1,8,0),ts(0,2,4,-1,0,4,5,0,0,1,10,0),ts(0,3,5,-1,0,5,8,0,0,1,14,0),ts(0,3,5,-1,0,6,10,0,0,1,18,0),ts(0,4,5,-2,0,7,10,1,0,2,16,1),ts(0,5,5,-3,0,8,10,1,0,3,14,2),ts(0,5,6,-3,0,9,12,1,0,3,16,2),ts(0,6,6,-3,0,10,14,1,0,4,18,3),ts(0,6,7,-4,0,11,15,1,0,4,20,3),ts(0,7,8,-4,0,12,17,2,0,5,22,4),ts(0,7,8,-4,0,13,19,2,0,5,24,4),ts(0,7,9,-4,0,14,21,2,0,5,26,4),ts(0,8,9,-5,0,15,22,2,0,6,28,5),ts(0,8,10,-5,0,16,24,2,0,6,30,5),ts(0,8,11,-5,0,17,26,2,0,6,32,5),ts(0,9,11,-5,0,18,28,2,0,7,34,6),ts(0,9,12,-6,0,19,29,2,0,7,36,6),ts(0,10,13,-6,0,20,31,3,0,8,38,7),ts(0,10,13,-6,0,21,33,3,0,8,40,7),ts(0,10,14,-6,0,22,35,3,0,8,42,7),ts(0,11,14,-7,0,23,36,3,0,9,44,8),ts(0,11,15,-7,0,24,38,3,0,9,46,8)],rs={borderRadius:4};function is(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var os={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},as={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ss=function(e){return"".concat(Math.round(e),"ms")},ls={easing:os,duration:as,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?as.standard:n,i=t.easing,o=void 0===i?os.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Ia(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ss(r)," ").concat(o," ").concat("string"==typeof s?s:ss(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},us={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const cs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,d=Ia(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),f=Ja(a),p=Va(n),m=is(l),h=ka({breakpoints:p,direction:"ltr",mixins:Ba(p,m,i),overrides:{},palette:f,props:{},shadows:s||ns,typography:es(f,c),spacing:m},za({shape:rs,transitions:ls,zIndex:us},d));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const ds=f({productionPrefix:"q2ce6",disableGlobal:!0,seed:""});function fs(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,o=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return r.style.left=Math.round(o.margin.left+o.x*t)+"px",r.style.top=Math.round(o.margin.top+o.y*n)+"px",r.style.width=Math.round(o.width)+"px",r.style.height=Math.round(o.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",d.render(function(e,t){return i.createElement(p,{generateClassName:t},i.createElement(m,{theme:cs},e))}(e,ds),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&d.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(d.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return a}}function ps(){return function(e){e.renderer("react",fs()),e.component("data-title",Oa()),e.component("disclaimer",function(){class e extends i.Component{render(){const{label:e,spanStyle:t}=this.props;return i.createElement(i.Fragment,null,i.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:da.string.isRequired,spanStyle:da.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return i.createElement("div",{style:a,dir:o},i.createElement(i.Fragment,null,i.createElement(e,{label:s,spanStyle:l})))}}}())}}function ms({model:e,layoutService:t,definitionPath:n="/qHyperCubeDef"}){return{fetch(t,r){const i={qStart:t,qEnd:r,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(n,i,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=2e3},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return 2e3;let n=e.qMeasureInfo.length||1,r=4+2*(n-1);return e.qDimensionInfo.length>1&&(n=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),r=4),Math.ceil(2e3/(n*r))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function hs(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function gs({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function ys(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function vs(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=ys(),o=ys();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function bs(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function xs(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=vs(e,t,n.qMatrix),i=bs(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}function qs(e){return e.qIsOtherCell}function Ms({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(qs)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(qs)||t++})),t}(n)}const Ss={command:{processDataPage:()=>{}}};function Ds(e){return(Ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cs(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ws(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Cs(o,r,i,a,s,"next",e)}function s(e){Cs(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ts(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function As(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ts(Object(n),!0).forEach((function(t){Os(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ts(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ls(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Es(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||ks(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ns(e){return function(e){if(Array.isArray(e))return Is(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ks(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ks(e,t){if(e){if("string"==typeof e)return Is(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Is(e,t):void 0}}function Is(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ps=Object.prototype.hasOwnProperty,js=Object.prototype.toString,Rs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,zs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===js.call(e)},Hs=function(e){if(!e||"[object Object]"!==js.call(e))return!1;var t,n=Ps.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ps.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ps.call(e,t)},Vs=function(e,t){Rs&&"__proto__"===t.name?Rs(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Bs=function(e,t){if("__proto__"===t){if(!Ps.call(e,t))return;if(Fs)return Fs(e,t).value}return e[t]},_s=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Bs(s,n),s!==(i=Bs(t,n))&&(c&&i&&(Hs(i)||(o=zs(i)))?(o?(o=!1,a=r&&zs(r)?r:[]):a=r&&Hs(r)?r:{},Vs(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Vs(s,{name:n,newValue:i}));return s};function Us(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Ws(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Ks(e,t,n,r,i){var o,a=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Gs(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function $s(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Ys(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xs(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Js(){}var Zs=1/.7,Qs="\\s*([+-]?\\d+)\\s*",el="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",tl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nl=/^#([0-9a-f]{3,8})$/,rl=new RegExp("^rgb\\("+[Qs,Qs,Qs]+"\\)$"),il=new RegExp("^rgb\\("+[tl,tl,tl]+"\\)$"),ol=new RegExp("^rgba\\("+[Qs,Qs,Qs,el]+"\\)$"),al=new RegExp("^rgba\\("+[tl,tl,tl,el]+"\\)$"),sl=new RegExp("^hsl\\("+[el,tl,tl]+"\\)$"),ll=new RegExp("^hsla\\("+[el,tl,tl,el]+"\\)$"),ul={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 cl(){return this.rgb().formatHex()}function dl(){return this.rgb().formatRgb()}function fl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=nl.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?pl(t):3===n?new yl(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ml(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ml(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=rl.exec(e))?new yl(t[1],t[2],t[3],1):(t=il.exec(e))?new yl(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ol.exec(e))?ml(t[1],t[2],t[3],t[4]):(t=al.exec(e))?ml(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=sl.exec(e))?ql(t[1],t[2]/100,t[3]/100,1):(t=ll.exec(e))?ql(t[1],t[2]/100,t[3]/100,t[4]):ul.hasOwnProperty(e)?pl(ul[e]):"transparent"===e?new yl(NaN,NaN,NaN,0):null}function pl(e){return new yl(e>>16&255,e>>8&255,255&e,1)}function ml(e,t,n,r){return r<=0&&(e=t=n=NaN),new yl(e,t,n,r)}function hl(e){return e instanceof Js||(e=fl(e)),e?new yl((e=e.rgb()).r,e.g,e.b,e.opacity):new yl}function gl(e,t,n,r){return 1===arguments.length?hl(e):new yl(e,t,n,null==r?1:r)}function yl(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function vl(){return"#"+xl(this.r)+xl(this.g)+xl(this.b)}function bl(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function xl(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ql(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Sl(e,t,n,r)}function Ml(e){if(e instanceof Sl)return new Sl(e.h,e.s,e.l,e.opacity);if(e instanceof Js||(e=fl(e)),!e)return new Sl;if(e instanceof Sl)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Sl(a,s,l,e.opacity)}function Sl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dl(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Cl(e){return function(){return e}}function wl(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Cl(isNaN(e)?t:e)}Ys(Js,fl,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:cl,formatHex:cl,formatHsl:function(){return Ml(this).formatHsl()},formatRgb:dl,toString:dl}),Ys(yl,gl,Xs(Js,{brighter:function(e){return e=null==e?Zs:Math.pow(Zs,e),new yl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new yl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:vl,formatHex:vl,formatRgb:bl,toString:bl})),Ys(Sl,(function(e,t,n,r){return 1===arguments.length?Ml(e):new Sl(e,t,n,null==r?1:r)}),Xs(Js,{brighter:function(e){return e=null==e?Zs:Math.pow(Zs,e),new Sl(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Sl(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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,i=2*n-r;return new yl(Dl(e>=240?e-240:e+120,i,r),Dl(e,i,r),Dl(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ol=function e(t){var n=function(e){return 1==(e=+e)?wl: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):Cl(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=gl(e)).r,(t=gl(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=wl(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Tl=/^class(-pyramid)?/,Al=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return i+(o-i)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(Ns(c))),o=Math.max.apply(Math,[o].concat(Ns(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var f=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var p=0;p<c.length;p+=1)if(f[p]){var m=d[p],h=d[p+1],g=Ol(m,h)(.5);u.range.push(g),u.domain.push(c[p]),p<c.length-1&&f[p+1]&&(u.range.push(d[p+1]),u.domain.push((c[p]+c[p+1])/2))}else u.range.push(d[p]),u.range.push(d[p+1]),u.domain.push(c[p]),u.domain.push(c[p]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function Ll(e,t,n,r,i){var o,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(o=0;o<u.length;o+=1)u[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):Ll(e,t,n,r+1,i)}var El=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ns(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!d)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Ns(c)),u.max=Math.max.apply(Math,Ns(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=f&&Tl.test(f.type)?"categorical":"continuous","categorical"===u.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ns(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===u.type){for(var p=d?Ll(u.max,u.min,c,1,o):o,m=(u.max-u.min)/p,h=[],g=0;g<p+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Nl(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function kl(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Il(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function Pl(e,t,n,r){var i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Nl:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=El(0,{theme:r,hc:i},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var d=c.raw().coloring;d&&d.gradient&&_s(u,Al(e,d.gradient,u,c))}else u.auxiliary=s;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?Gs:i,a=r.getCByField,s=void 0===a?$s:a,l=r.getPersistence,u=void 0===l?Ks:l,c=o(t,n),d=s(n,c),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===f.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&d&&(m.label=d.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),_s(m,u(t,n,c,d,{byRow:Ws,byElemNo:Us})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=El(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(r.primary):u.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var f=[],p=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),As(As({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return As(As({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(kl(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Il(e.measureOverrides,e.explicit),kl(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=Il(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function jl(e){var t=As({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(_s(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=_s(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=_s(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return Al(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var i=r.external,o=r.field,a=As({},e);_s(a,Us(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,_s(a,Us(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),_s(a,Us(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=As(As({},e),r.getDataColorSpecials())),n.settings=_s(e,Pl(this,n,t,e))}return n.settings}};return i}var Rl=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},Fl=function(e){throw e.isHandled=!0,e},zl=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},Hl=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Vl=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Fl):Promise.reject()};function Bl(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function _l(e){return function(t){return"object"===Ds(t.datum[e])?t.datum[e].value:void 0}}function Ul(e){return"object"===Ds(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Wl(e){return-3===e.datum.value}var Kl=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Gl=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function $l(e,t){var n=e.styleReference,r=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Kl(o,r,i)},show:"function"==typeof o.show?function(){return Gl(o,l,a)}:Gl(o,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function Yl(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=$l(e,t);if(!r.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,d=t.theme,f=t.scales,p={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return _s(!0,r,{type:"legend-cat",key:"".concat(i,"-cat"),scale:m in f?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:d?d.getStyle(o,"legend.label","color"):void 0,fontSize:d?d.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:d?d.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:p[n]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=$l(e,t);return!!u.show&&_s(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},Os(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),Os(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),Os(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}var Xl=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Jl(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=jl(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return zl(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return Hl(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return Vl(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=Rl,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=As({},i),r={},!n.key)throw new Error("Missing key");t.set(As(As({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=As(As({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Ns(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ns((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ns((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=Bl({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var m={data:d,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=As(As({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=_s({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=_s({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=_l(r),o=_l("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return Wl(e)||o(e)?u:l}:n[t]?function(e){return Wl(e)?u:Ul(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===s?function(e){return Wl(e)||o(e)?u:Ul(e)?l:c}:"color"===d?function(e){return Wl(e)||o(e)?u:Ul(e)?l:i(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=_l("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?Xl(e.qNum):e.qText&&fl(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=Os({},u,n);return r.qDimensionInfo.length>1&&(d["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(u,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,d=void 0===c?{}:c,f=e.style,p=void 0===f?{}:f,m=arguments.length>1?arguments[1]:void 0;return Yl({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:u,settings:d,style:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return o}var Zl=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Ql(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Zl),o=r.some(Zl),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function eu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=As(As(As({},e),t),{},{colorProps:As(As({},e.colorProps),t.colorProps||{})});return n}var tu=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function nu(e){var t,n=e.qHyperCube.qDimensionInfo.some(tu),r=e.qHyperCube.qMeasureInfo.some(tu),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var ru=function(){};function iu(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,f=void 0===d?ru:d,p=e.config,m=void 0===p?{}:p,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,M=void 0===q?void 0:q,S=m.definitionPath,D=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),C={theme:x,key:v,localeInfo:y,layout:D,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:As(As({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:D?Ql(D):void 0})},w=Jl({picasso:o,model:a,app:s,translator:l,auto:M});!1!==M&&w.auto((function(e){return M?M({layout:e,defaultAuto:nu}):nu(e)}));var O=!1;return{getColor:function(){return w.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return w.resolveUIColor({index:t,color:n})},getData:function(){return w.data()},getDatumProps:function(e){return w.datumProps(e)},getSnapshotData:function(){return w.getSnapshotData(S)},getSettingsForMeasure:function(e){return w.settingsForMeasure(e)},getSettings:function(){return w.settings()},getLegend:function(e,t){return w.legend(e,t)},getScales:function(){return w.scales()},getPalettes:function(){return w.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return w.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return O},custom:As({},g),initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createConfig,n=void 0===t?f:t,r=n({getUseBaseColors:Ql}),i=eu(C,r);w.config(i);var o=w.getAuxiliarySettings(S).then((function(){O=!0}));return o}}}function ou(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var au=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function su(e){var t=e.width,n=e.height,r=au.filter((function(e){return t>=e.size.width&&n>=e.size.height})).shift();return r?r.key:"SPARK"}var lu={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function uu(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?lu[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:lu[o],start:a,end:lu[a]}}function cu(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,l=void 0!==s&&s,u={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:u,update:function(e){u.chart.size={width:e.width,height:e.height},u.chart.mode=su(e);var t=uu({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),r=t.current,i=t.opposite;u.x.dock=r,u.x.opposite=i,u.x.size=e.width;var o=uu({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;u.y.dock=a,u.y.opposite=s,u.y.size=e.height}};return c.update(ou({chart:t,logicalSize:a})),c}var du="vertical",fu="horizontal";function pu(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,l=void 0!==s&&s,u=i.rtl,c=void 0!==u&&u,d=a.fallback===du?du:fu,f=!!a.invert,p=a.measureAxes||[{ref:"measureAxis",name:"minor"}],m={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},h={type:"major-minor",meta:m,update:function(e){m.chart.orientation=n.getLayoutValue("orientation",d),m.chart.size={width:e.width,height:e.height},m.chart.mode=su(e),m.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?fu:n?t===du?fu:du:t}({layoutService:n,chartOrientation:m.chart.orientation,invert:f});var t=uu({orientation:m.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),r=t.current,i=t.opposite;m.major.dock=r,m.major.opposite=i,m.major.size=m.major.orientation===du?e.height:e.width,p.forEach((function(t){var r={};r.orientation=m.major.orientation===du?fu:du;var i=uu({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),o=i.current,a=i.opposite,s=i.start,l=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=l,r.size=r.orientation===du?e.height:e.width,m[t.name]=r}))}};return h.update(ou({chart:t,logicalSize:l})),h}function mu(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?cu:pu)({chart:t,layoutService:n,config:i,typeConfig:a})}function hu(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function gu(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function yu(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function vu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=yu();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function bu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}}function xu(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}function qu(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map((function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,l=r.qSelected;return o+s+(void 0===l?0:l)}))}function Mu(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:qu(e)}}}(e);case"K":return function(e){var t=qu(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=qu(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function Su(e){var t=e.source,n=e.metaAdditionsFn,r=_s(!0,{},t),i=Mu(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,u=a.qMode,c=s.length,d=l.length,f=As({mode:{S:"S"===u,P:"P"===u,K:"K"===u,T:"T"===u},dimensionCount:c,measureCount:d,hasMultipleDimensions:c>1,hasMultipleMeasures:d>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return As(As({},f),r({layout:t,meta:f}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:As({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return hu(r,e,t)},setLayoutValue:function(e,t){gu(r,e,t),i=Mu(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return hu(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){gu(r.qHyperCube,e,t),i=Mu(r),a.meta=o()},getDataPages:function(){return hu(r,i.refs.dataPages)},setDataPages:function(e){gu(r,i.refs.dataPages,e),a.meta=o()}};return a}function Du(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function Cu(e){return(Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ou(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tu(e,t,n){return t&&Ou(e.prototype,t),n&&Ou(e,n),e}function Au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Eu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(n),!0).forEach((function(t){Au(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nu(e,t){return(Nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ku(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Iu(e,t,n){return(Iu=ku()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Nu(i,n.prototype),i}).apply(null,arguments)}function Pu(e){return function(e){if(Array.isArray(e))return Ru(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ju(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ju(e,t){if(e){if("string"==typeof e)return Ru(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ru(e,t):void 0}}function Ru(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fu=Object.prototype.hasOwnProperty,zu=Object.prototype.toString,Hu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Bu=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===zu.call(e)},_u=function(e){if(!e||"[object Object]"!==zu.call(e))return!1;var t,n=Fu.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Fu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Fu.call(e,t)},Uu=function(e,t){Hu&&"__proto__"===t.name?Hu(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Wu=function(e,t){if("__proto__"===t){if(!Fu.call(e,t))return;if(Vu)return Vu(e,t).value}return e[t]},Ku=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Wu(s,n),s!==(i=Wu(t,n))&&(c&&i&&(_u(i)||(o=Bu(i)))?(o?(o=!1,a=r&&Bu(r)?r:[]):a=r&&_u(r)?r:{},Uu(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Uu(s,{name:n,newValue:i}));return s};function Gu(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=l;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function $u(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Yu(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,d=r;if(i.field&&i.field!==n){var f=Gu(i.field,o,{cache:t});if(-1===f)return;d=Ku({qRow:a},f(s))}u[c]=$u(i,d,{key:l})}function Xu(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),l=t.key(),u="object"===Cu(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),d=c.props,f=c.main,p=Object.keys(d),m=!!i[a].trackBy,h=Cu(i[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Gu(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var M=s.qDataPages[b].qArea.qTop+q,S=Ku({qRow:M},x(s.qDataPages[b].qMatrix[q])),D=$u(f,S,{key:l});if(!f.filter||f.filter(S)){for(var C=0;C<p.length;C++){var w=d[p[C]],O=w.fields||[w];w.fields&&(D[p[C]]=[]);for(var T=0;T<O.length;T++)Yu({cache:n,f:u,mainCell:S,p:O[T],prop:p[C],props:d,page:s.qDataPages[b],rowIdx:M,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:w.fields?D[p[C]]:D,targetProp:w.fields?T:p[C]});if(w.fields){var A=D[p[C]].map((function(e){return e.value})),L=D[p[C]].map((function(e){return e.label}));D[p[C]]={value:"function"==typeof w.value?w.value(A):void 0!==w.value?w.value:A,label:"function"==typeof w.label?w.label(L):void 0!==w.label?String(w.label):String(D[p[C]].value)}}}m&&r.track({cfg:i[a],itemData:S,obj:D,target:y,tracker:g,trackType:h}),v.push(D)}}}m?o.push.apply(o,Pu(r.collect(y,{main:f,propsArr:p,props:d}))):o.push.apply(o,v)}return o}function Ju(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 Zu(e,t){var n,r,i,o,a,s=new nc(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Qu);n=u.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)u.push(r=n.children[o]=new nc(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(tc)}function Qu(e){return e.children}function ec(e){e.data=e.data.data}function tc(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function nc(e){this.data=e,this.depth=this.height=0,this.parent=null}function rc(e){if("function"!=typeof e)throw new Error;return e}nc.prototype=Zu.prototype={constructor:nc,count:function(){return this.eachAfter(Ju)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].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(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,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(){var e=[];return this.each((function(t){e.push(t)})),e},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 Zu(this).eachBefore(ec)}};var ic={depth:-1},oc={};function ac(e){return e.id}function sc(e){return e.parentId}function lc(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var l=lc(n,i[s]);Array.isArray(l)?a.push.apply(a,Pu(l)):a.push(l)}return a}if(!r[o]&&Array.isArray(i)){var u=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)u[c]=lc(n,i[c]);return u}r[o]in i&&(i=i[r[o]])}return i}function uc(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,Pu(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,Pu(uc(e[o].children,t-1,n)));return r}function cc(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=Pu(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return uc(e.children,o-1,n)}}return!1}function dc(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var fc=/^qDimensionInfo(?:\/(\d+))?/,pc=/^\/?qMeasureInfo\/(\d+)/,mc=/\/qAttrExprInfo\/(\d+)/,hc=/\/qAttrDimInfo\/(\d+)/;function gc(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function yc(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=r,d=n.qEffectiveInterColumnSortOrder,f=gc(n);return fc.test(c)&&(i=!0,o=+fc.exec(c)[1],c=r.replace(fc,"")),pc.test(c)&&("K"===n.qMode?l=+pc.exec(c)[1]:d&&-1!==d.indexOf(-1)?(l=+pc.exec(c)[1],u=0):u=+pc.exec(c)[1],c=c.replace(pc,"")),c&&(hc.exec(c)?s=+hc.exec(c)[1]:mc.exec(c)&&(a=+mc.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function vc(e,t){var n,r,i=cc(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function bc(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function xc(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,d=void 0;l.fields&&(c=[],d=[]);for(var f=function(e){var n=u[e],f=void 0,p=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(f=function(e){return n.value(e,r)}),"function"==typeof n.label&&(p=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),f&&(m=g.map(f),f=null),p&&(y=g.map(p),p=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=i,y=i)),l.fields){var v=f?f(m):m;c.push(v),d.push(p&&null!=y?p(y):null!=y?y:String(v))}else{var b=f?f(m):m;o[t[s]]={value:b,label:p?p(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},p=0;p<u.length;p++)f(p);c&&(o[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(d,r):d})}}var qc=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=lc(r,e);return o&&o[0]?(t.tree=Zu(o[0],n.children||function(e){return e[i]}),t.tree):null};function Mc(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,d=0;d<i.length;d++){var f=l[i[d]],p="".concat(u,"__").concat(f.qText);a[p]||(a[p]=Eu({__id:p,__parent:u,qValues:[]},f),c=!0),u=p}if(c)for(var m=0;m<o.length;m++){var h=l[o[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=ac,t=sc;function n(n){var r,i,o,a,s,l,u,c=n.length,d=new Array(c),f={};for(i=0;i<c;++i)r=n[i],s=d[i]=new nc(r),null!=(l=e(r,i,n))&&(l+="")&&(f[u="$"+(s.id=l)]=u in f?oc:s);for(i=0;i<c;++i)if(s=d[i],null!=(l=t(n[i],i,n))&&(l+="")){if(!(a=f["$"+l]))throw new Error("missing: "+l);if(a===oc)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=ic,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(tc),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=rc(t),n):e},n.parentId=function(e){return arguments.length?(t=rc(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Sc=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var d=u[c];if(d.field!==a){var f=vc(o,yc(d.field,{cube:r,cache:i}));d.accessor=f.nodeFn,d.valueAccessor=f.valueFn,d.attrAccessor=f.attrFn}}};function Dc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?Mc(t):qc(i,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===i.qMode){var d=gc(i),f=d[u-1];c=n.fields[f]}else{var p=i.qEffectiveInterColumnSortOrder[u-1];u>i.qEffectiveInterColumnSortOrder.length&&(p=i.qDimensionInfo.length),c=n.fields[p]}var m=r.normalizeConfig(Eu(Eu({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?yc(c,{cube:i,cache:n}):{fieldDepth:0};Sc({propsArr:y,props:h,cube:i,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),M=0;M<q.length;M++){var S=l[q[M].depth].propsArr,D=l[q[M].depth].props,C=l[q[M].depth].main,w=x[M],O=w.data,T=bc(C,O,{key:o});xc({propsArr:S,props:D,item:w,itemData:O,ret:T,sourceKey:o,isTree:!0}),q[M].data=T}return a}function Cc(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),l=t.key();if(!qc(s,n,e))continue;var u="object"===Cu(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),d=c.props,f=c.main,p=Object.keys(d),m=yc(u,{cube:s,cache:n}),h=vc({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;Sc({propsArr:p,props:d,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!i[a].trackBy,x=Cu(i[a].trackBy),q={},M=[],S=g(n.tree),D=[],C=0;C<S.length;C++){var w=S[C],O=y?y(v(w)):v(w);if(!f.filter||f.filter(O)){var T=bc(f,O,{key:l});xc({propsArr:p,props:d,item:w,itemData:O,ret:T,sourceKey:l}),b&&r.track({cfg:i[a],itemData:O,obj:T,target:M,tracker:q,trackType:x}),D.push(T)}}b?o.push.apply(o,Pu(r.collect(M,{main:f,propsArr:p,props:d}))):o.push.apply(o,D)}return o}var wc,Oc=(function(e){
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,i,o,a,u,s,l,c,f,d=e.length,p=e.search(/[0-9\-\+#]/),m=p>0?e.substring(0,p):"",h=e.split("").reverse().join(""),v=h.search(/[0-9\-\+#]/),g=d-v,y=e.substring(g,g+1),b=g+("."===y||","===y?1:0),x=v>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",u=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=u)&&(t=(+t).toFixed(u+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],s=c[1]&&c[c.length-1].length){for(h="",g=(f=t[0]).length%s,d=f.length,b=0;b<d;b++)h+=f.charAt(b),!((b-g+1)%s)&&b<d-s&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(Sf={exports:{}}),Sf.exports);function Cf(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var wf={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},Of=/%$/,Tf=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Af=/^\(oct\)/i,Ef=/^\(dec\)/i,Lf=/^\(hex\)/i,kf=/^\(bin\)/i,Nf=/^\(rom\)/i,If=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,jf=/#|0/g;function Pf(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Rf(e,t,n){var r=Cf(e);return n?r:new RegExp(r||"",t)}function Ff(e,t,n){var r,i,o,a,u,s,l,c,f,d,p,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(p=n)&&(p=Cf(p)),d&&(d=Cf(d)),f=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(p,"[#0]+)?")),a=(o=(o=m.match(f))?o[0]:"")?m.substr(0,m.indexOf(o)):m,u=o?m.substring(m.indexOf(o)+o.length):"",o||(o=m?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),s=t,t=/,/.test(n)?"¤":",",s&&(o=o.replace(Rf(s,"g"),t)),l=n,n=".",l&&(o=o.replace(Rf(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var h,v=m.split(l);v[1]&&(h=v[1].match(jf)),e.prefix=a||"",e.postfix=u||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=Of.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Rf(t,null,!0),"|").concat(Rf(n,null,!0)),"g"),e.groupTemp=s,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var zf=function(){function e(t,n,r,i,o){Mc(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return wf;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return Dc(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],If.test(e[0])&&(r.positive.isFunctional=!0),e[1]?If.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?If.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Ff(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Ff(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Ff(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,u,s,l,c=this._prepared,f="",d="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return Tf.test(t)?e=Pf(e,Number(/\d{2}/.exec(t)[0]),t,n):Af.test(t)?e=Pf(e,8,t,n):Ef.test(t)?e=Pf(e,10,t,n):Lf.test(t)?e=Pf(e,16,t,n):kf.test(t)?e=Pf(e,2,t,n):Nf.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),u=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=u[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,v=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=v[0];for(u=0,n=Number(Number(e).toExponential().split("e")[1]);g<=n&&u<v.length;)g=v[++u];u>0&&(m=v[u-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(g<0&&g-n<=c.maxPrecision?h=g:m<=n&&!(g>0&&-n<=c.maxPrecision)&&(h=m)),h&&(f=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,l=(s=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==s.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=s.split(o)[0];if(e=Df(b+=o,y)||"0",l){var x=Math.max(0,Math.min(14,l.length)),q=l.replace(/#+$/,"").length,M=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(u=M.length;u<q;u++)M+="0";M&&(e+=o+M)}else 0===y&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(s+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),u=0;u<t;u++)s+="#";e=Df(s,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Hf(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,u=void 0!==a&&a,s=r.toKey,l=void 0===s?function(e){return e}:s,c=Object.create(null),f=Object.create(null),d=0,p=0;return(t=u?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=o&&(delete c[f[p]],delete f[p],d--,p++),c[e]=t,f[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),d=0,p=0},t.size=function(){return d},t}function Vf(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ec(zf,t)}(i,e,t,n,r),a=Hf(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function u(e){return a(e)}return u.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},u.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},u}var Bf=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],_f=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Uf=["January","February","March","April","May","June","July","August","September","October","November","December"],Wf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Kf(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Gf(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Yf=function(){function e(t,n,r){Mc(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bf,qDayNames:_f,qLongMonthNames:Uf,qMonthNames:Wf}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(Cc(i={},"T",o.qTimeFmt||"hh:mm:ss"),Cc(i,"D",o.qDateFmt||"YYYY-MM-DD"),Cc(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return Dc(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,u=/t+/gi.test(t);e instanceof Date?(i=u,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Gf(t),r=60*Gf(n),i=60*Gf(r),o=1e3*Gf(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,u=r.s,s=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(u+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:u,f:s,t:c}}(e,t));var s=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Kf("".concat(t.year).slice(-2),2),YYY:Kf("".concat(t.year).slice(-3),3),def:function(e){return Kf("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Kf("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Kf("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Kf("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Kf("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Kf("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Kf("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);var f=new RegExp(l.join("|"),"g");return t.replace(f,(function(e){var t,n,r;for(n in s)if(Object.prototype.hasOwnProperty.call(s,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in s[n])if(i===e||i.toLowerCase()===e){void 0===(r=s[n][i])&&(r=s[n][i.toLowerCase()]);break}return void 0===r&&(r=s[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Xf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ec(Yf,t)}function Jf(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function $f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Xf(n,e,t),i=Hf(r.format.bind(r),{toKey:function(e){return"object"===qc(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Jf(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Xf(n,e,t),i=Hf(r.format.bind(r),{toKey:function(e){return"object"===qc(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Zf(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return $f(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Vf(n,r,i,o,t)}function Qf(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,u=t.value,s=t.type,l=t.sourceField,c=u||("dimension"===s?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},d="dimension"===s?"first":"avg",p=Zf(n,o),m="dimension"===s?"first":function(e,t){return p(t)},h={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return s},origin:function(){return l},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:d,reduceLabel:m,formatter:function(){return p},tags:function(){return n.qTags}};return h}function ed(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),u={instance:Qf(Bc({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return u.attrDims=ed("qAttrDimInfo",t,n,a,Bc({},i,{value:function(e){return e.qElemNo},type:"dimension"})),u.attrExps=ed("qAttrExprInfo",t,n,a,Bc({},i,{value:function(e){return e.qNum},type:"measure"})),u.measures=ed("qMeasureInfo",t,n,a,Bc({},i,{value:function(e){return e.qValue},type:"measure"})),u}))}function td(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,u=void 0===a?{}:a,s={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=td.util,f={cache:s,cube:l,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},d={key:function(){return i},raw:function(){return l},field:function(e){return sf(e,f)},fields:function(){return s.fields.slice()},extract:function(e){return f.extractor(e,d,s,c)},hierarchy:function(e){return f.hierarchy(e,d,s,c)},_cache:function(){return s}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=Mf,f.hierarchy=qf,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=Kc,f.pages=l.qDataPages,f.hierarchy=qf):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},d,s,c)};var p="S"===l.qMode?function(e){return e.qElemNumber}:void 0,m="S"===l.qMode?function(e){return e.qNum}:void 0;(e=s.wrappedFields).push.apply(e,Lc(ed("qDimensionInfo",l,i,"",Bc({},f,{value:p,type:"dimension"})))),(t=s.wrappedFields).push.apply(t,Lc(ed("qMeasureInfo",l,i,"",Bc({},f,{value:m,type:"measure"})))),s.fields=s.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){s.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(s.wrappedFields),(u.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=Qf(Oc({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},d,s,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));s.virtualFields.push(n)})),(n=s.allFields).push.apply(n,Lc(s.virtualFields)),d}var nd=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],rd=/\/qDimensionInfo(?:\/(\d+))?/,id=/\/qMeasureInfo\/(\d+)/,od=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,ad=/\/qAttrExprInfo\/(\d+)/,ud=/\/?qHyperCube/,sd=/\/?qTreeData/,ld=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},cd=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function fd(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};ud.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=ld):sd.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=cd);var u=!0;if(rd.test(e)&&(r=+rd.exec(e)[1]),id.test(e)&&(i=+id.exec(e)[1]),od.test(e)){i=-1,r=0;var s=+od.exec(n)[2];isNaN(s)||(r=s,n=n.replace(/\/\d+$/,"")),u=!1}if(ad.test(e)){var l=i;if(t){i=0;var c=of(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+ad.exec(n)[1]}else r>-1?(r=-1,i=+ad.exec(n)[1]):i+=+ad.exec(n)[1]+1}return nd.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(e,t)||kc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),u&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function dd(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],u={},s=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=fd(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,u.multiRangeSelectTreeDataValues||(u.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return u.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var s=e.brush.ranges();s.length&&(l=!0,u.rangeSelectHyperCubeValues||(u.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),s.forEach((function(e){return u.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,u.selectHyperCubeContinuousRange||(u.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return u.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,d=f.qNoOfLeftDims,p=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(u.selectPivotCells||(u.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||p>=d)&&d>-1?m.forEach((function(e){u.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:p-d})})):m.forEach((function(e){u.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!u.selectPivotCells.cells.length}}else u.selectHyperCubeCells||(u.selectHyperCubeCells={path:t.path,cols:[]}),u.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||u.selectHyperCubeCells.values)||(u.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!u.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!l&&s?[{method:"resetMadeSelections",params:[]}]:(u.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[u.rangeSelectHyperCubeValues.path,u.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),u.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[u.selectHyperCubeContinuousRange.path,u.selectHyperCubeContinuousRange.ranges]}),u.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[u.selectHyperCubeCells.path,u.selectHyperCubeCells.values,u.selectHyperCubeCells.cols]}),u.selectPivotCells&&a.push({method:"selectPivotCells",params:[u.selectPivotCells.path,u.selectPivotCells.cells]}),u.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[u.multiRangeSelectTreeDataValues.path,u.multiRangeSelectTreeDataValues.ranges]}),a)}function pd(e){td.util=e.data("matrix").util,e.data("q",td),e.formatter("q-number",Vf),e.formatter("q-time",$f)}function md(e){var t=fc(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function hd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===xs(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function vd(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}pd.qBrushHelper=dd,pd.selections=dd;function gd(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,u=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var s=e.filter((function(e){return-2!==e.value}));return s.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=md({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,Ts(o))})),a.filter(Boolean)}({layout:u,values:s}):s},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var yd=[],bd=0,xd=function(e){var t=yd.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},qd=function(){document.addEventListener("keyup",xd)},Md=function(){document.removeEventListener("keyup",xd)},Sd=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},Dd=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function Cd(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function wd(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,u=void 0===a?"selection":a,s=e.emit,l=void 0===s?"rangeClear":s,c=r.event===i,f=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!f)return!1;var d=t.component(o);return!!d&&(d.emit(l),"string"==typeof u&&t.brush(u).clear(),d)}function Od(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,u=void 0===a?"discrete-range-brush":a,s=e.cleared;return wd({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:u,emit:"areaClear",brushName:e.brushName})}function Td(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,u=void 0===a?"continuous-range-brush":a,s=e.cleared;return wd({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:u,brushName:e.brushName})}function Ad(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,u=void 0===a?"minorRange":a,s=e.cleared,l=void 0!==s&&s,c=e.brushName,f=wd({selectionInfo:t,chart:n,document:r,eventName:l?void 0:u,componentName:o,brushName:void 0!==c&&c});if(f){var d=f.settings.settings,p=d.scale,m=d.brush,h=n.scale(p).data().fields.map((function(e){return e.id()})),v=n.brush(m),g=v.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));v&&g.length&&g.forEach((function(e){v.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Ed(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,u=e.cleared;wd({selectionInfo:t,chart:n,document:r,eventName:void 0!==u&&u?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function Ld(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,u=void 0===a?[]:a;if(n&&o.includes(n.event)){var s=n.currentComponent;n.previousComponent!==s&&(r.clear(),u.forEach((function(e){return t.brush(e).end()})))}}function kd(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,u=e.componentName,s=void 0===u?"legend-range-brush":u,l=e.cleared,c=void 0!==l&&l,f=e.brushName;wd({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:s,brushName:void 0!==f&&f})&&i.clear()}var Nd=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=ws(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Id(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function jd(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,u=e.selections,s=e.selectionEvents;if(!1===i||!1===s)return function(){};var l=(a||{}).lasso,c=void 0!==l&&l,f=i.reset,d=void 0===f?Id:f,p=i.clear,m=!1!==p&&function(e){var t=e.clear,n=void 0===t?Nd:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(Cs({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Od(Cs(Cs({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Td(Cs(Cs({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ad(Cs(Cs({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ed(Cs(Cs({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ld(Cs(Cs({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kd(Cs(Cs({},t),e))}},t))}}({clear:p,selections:u,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:m,reset:d,lasso:c}),v={};Object.entries(h).forEach((function(e){var t=Os(e,2),n=t[0],r=t[1];v[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,s[n])}));var g=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,u=t.start,s={selections:n,selectionInfo:r,chart:o,document:a},l=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(Cs(Cs({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:l})}};return"function"==typeof u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];u(Cs(Cs({defaultFunc:c({event:e,components:t}),setSelectionInfo:l,clear:i},s),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:s,selections:u,selectionInfo:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(v).forEach((function(e){var t=Os(e,2),n=t[0],r=t[1];null==u||u.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(v).forEach((function(e){var t=Os(e,2),n=t[0],r=t[1];null==u||u.removeListener(n,r)}))}}var Pd=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Rd(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,u=void 0!==a&&a,s=o.majorScale,l=void 0===s?void 0:s,c=o.selectionActions,f=(c=void 0===c?{}:c).clear,d=c.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,h=o.brushEvents,v=void 0===h?{}:h,g=o.brushName,y=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,q=o.brushRanges,M=void 0!==q&&q,S=o.interceptors,D=void 0===S?{}:S,C=t.brush(y);if("number"==typeof x&&C.setMaxListeners(x),M){var w=!0===M?Pd:M;C.configure({ranges:w})}var O={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.picassoQ,u=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,s=void 0===u?"/qHyperCubeDef":u;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var l=++bd,c=null,f=[],d={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=gd({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),m=p.rangeInterceptor,h=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(s)}));var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};Sd(n,v);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(d=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a.selections(r,d,c).forEach((function(e){Cd(e,o.select.brushSelectionIncludeMax,g),n.select(e)}))}))):r.on("update",(function(){a.selections(r,d,c).forEach((function(e){return n.select(e)}))})),0===yd.length&&qd(),yd.push({key:l,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=yd.indexOf(yd.filter((function(e){return e.key===l}))[0]);-1!==e&&yd.splice(e,1),yd.length||Md(),Dd(n,v)}}}({brush:C,majorScale:l,actions:n,selections:r,picassoQ:i});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=Os(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:C,interceptors:D});var A=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,u=e.selectionEvents,s=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=Os(e,2),o=i[0],a=i[1],u=function(){return a({chart:n,selectionInfo:r})};return t.on(o,u),[o,u]}));return function(){a.forEach((function(e){var n=Os(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),l=jd({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:u}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},i=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){s(),l(),c()}}({chart:t,brush:C,actions:n,selections:r,selectionInfo:O.selectionInfo,selectionActions:{clear:f,reset:d},selectionEvents:m,brushEvents:v});if(u){var E=!0===u?Ts(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):u;T.allowSimultaneous(E)}return{unbindEvents:A,state:O,picassoSelections:T,brush:C}}function Fd(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,u=Rd({chart:t,actions:i,selections:n,picassoQ:pd,config:a}),s=u.unbindEvents,l=u.state,c=u.picassoSelections,f=u.brush,d=a.custom,p=void 0===d?{}:d,m=a.legendAlias,h=void 0===m?void 0:m,v=a.setBrushAliases,g=void 0===v?vd:v;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:hd(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.singleSelectIndex;return l.singleSelectDimensions[e]},getCanSelect:function(){return l.canSelect},getSelectionInfo:function(){return l.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,u={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var s=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,l=void 0===s?[]:s;return u.lockedDimensions=l.map((function(e){return!!e.qLocked})),u.singleSelectDimensions=l.map((function(e,t){return md({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),u.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),u.canSelect=0===l.length||l.some((function(e){return!e.qLocked})),u.dimensionLocked=!(null===(r=l[0])||void 0===r||!r.qLocked),u}({selections:n,picassoSelections:c,layout:e});Object.assign(l,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=ws(e,["colorField","useLegendCube"]),o=Cs({useLegendCube:r,colorField:t,brush:f,legendAlias:h},i);g(Cs(Cs({},o),{},{defaultFunc:function(){return vd(o)}}))},destroy:function(){s(),c.release()},custom:Cs({},p)}}var zd="QlikView Sans, sans-serif",Hd="#737373",Vd="#cccccc",Bd="#e6e6e6";function _d(e){var t={};return[].concat(Ts(e),Ts([["","","color"],["object","axis.title","fontFamily",zd],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",zd],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Vd],["object","axis.line.minor","color",Bd],["object","grid.line.major","color",Vd],["object","grid.line.minor","color",Bd],["object","grid.line.highContrast","color",Bd],["object","referenceLine.label.name","fontFamily",zd],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",zd],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",Bd],["object","referenceLine.outOfBounds","backgroundColor",Hd,function(e){return"transparent"===e?Hd:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function Ud(e,t){var n={};return e.forEach((function(e){var r=Os(e,5),i=r[0],o=r[1],a=r[2],u=r[3],s=r[4],l=(void 0===s?function(e){return e}:s)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,u));dc(n,[o,a].filter(Boolean).join("."),l)})),n}var Wd={created:function(){this.state={}},beforeUpdate:function(){this.state={}},beforeRender:function(e){var t=e.size;this.state.ticks=this.scale.ticks({distance:t.width}).filter((function(e){return!e.isMinor})),"linear"===this.scale.type&&function(e,t){for(var n=Q(e.domain(),2)[1],r=0;r<t.length;r++){var i=t[r],o=t[r+1];i.data={},o||1===i.end?o?(i.data.start=i.value,i.data.end=o.value,i.end=o.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.end=1)}}(this.scale,this.state.ticks)},render:function(){var e=this,t=this.scale.data().fields.length?this.scale.data().fields[0].id():"",n=this.state.ticks,r=n.map((function(n){return{type:"rect",fill:"none",data:{source:{field:t},value:[n.data.start,n.data.end]},x:n.start*e.rect.width,y:0,width:(n.end-n.start)*e.rect.width,height:e.rect.height}}));if(n.length&&n[0].start>0){var i=n[0];r.unshift({type:"rect",fill:"none",data:{source:{field:t},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return r}};function Kd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t%2==0)return e;var n=Math.round(e),r=e-n;return r>0?n+=.5:n-=.5,n}function Gd(e,t){var n=t.localProps.size,r=t.props.anchor,i=function(e){var t=e.props,n=e.localProps.size,r=e.style,i=e.renderer,o=t.label.padding,a=Math.max(0,Math.min(t.label.justify,1)),u=Math.max(0,Math.min(t.label.align,1)),s=function(e){return i.measureText({text:e,fontSize:r.label.fontSize,fontFamily:r.label.fontFamily})};return{resolve:function(e,t){var i="string"==typeof e.label?e.label:"",l=s(i),c=t.x,f=t.width;e.start===e.end&&(f=l.width+2*o,1===e.end&&(c-=f));var d={x:c+o,y:o,width:f-2*o,height:n.height-2*o},p=s("".concat(i[0]).concat("…")).width,m=Math.max(0,d.width-l.width),h=Math.max(0,d.height-l.height),v=a*m,g=u*h;return{show:d.width>=Math.min(p,l.width),text:i,dx:v,dy:g,rect:d,style:r.label,segment:{x:c+v,width:l.width+2*o}}}}}(t),o=function(e){var t=e.localProps.size,n=e.style,r=e.scale,i=e.props,o=Q(r.domain(),2),a=o[0],u=o[1],s=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:function(e,r){var i=s*r.width,o=Kd(r.x+i,n.majorGuideLine.strokeWidth);return{show:e.value>=a&&e.value<=u,x1:o,y1:0,x2:o,y2:Kd(t.height,n.majorGuideLine.strokeWidth),style:n.majorGuideLine}}}}(t),a=e.map((function(e){var t=function(e,t,n){var r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){var n=e.length;if(!(n<2)){var r,i,o=e[n-1],a=t[n-1].label;if(o&&o.start===o.end)for(var u=n-2;u>-1;u--){var s=t[u].label;s.show=s.show&&(r=s.segment,i=a.segment,!(r.x<i.x?r.x+r.width>=i.x:i.x+i.width>=r.x))}}}(e,a),a}function Yd(e,t){var n,r,i,o,a=(r=(n=t).localProps.size,i=n.props,o=n.style,{resolve:function(e){var t=Math.max(r.height-i.guideLine.minor.size,0)*Math.max(0,Math.min(i.guideLine.minor.align,1)),n=Kd(e.position*r.width,o.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:n,y1:Kd(t,o.minorGuideLine.strokeWidth),x2:n,y2:Kd(i.guideLine.minor.size+t,o.minorGuideLine.strokeWidth),style:o.minorGuideLine}}}});return t.props.guideLine.minor.show?e.map(a.resolve):[]}function Xd(e){return e.filter((function(e){return e.show})).map((function(e){return de({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})}))}var Jd={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:function(){return{size:30,edgeBleed:{left:1,right:1}}},init:function(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created:function(){this.init()},beforeUpdate:function(){this.init()},beforeRender:function(e){var t=e.size;this.localProps.size=t;var n=this.scale.ticks({distance:t.width}),r=n.filter((function(e){return!e.isMinor})),i=n.filter((function(e){return e.isMinor}));this.state.line=function(e){var t=e.localProps.size,n=e.style,r=e.props,i=Kd(1,n.line.strokeWidth);return{show:r.line.show,x1:Kd(0,n.line.strokeWidth),y1:i,x2:Kd(t.width,n.line.strokeWidth),y2:i,style:n.line}}(this),this.state.major=Gd(r,this),this.state.minor=Yd(i,this)},render:function(){return[].concat(ee(Xd([this.state.line])),ee(this.state.major.map((function(e){return e.label})).filter((function(e){return e.show})).map((function(e){return de({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge"})}))),ee(Xd(this.state.major.map((function(e){return e.guideLine})))),ee(Xd(this.state.minor.map((function(e){return e.guideLine})))))}};function $d(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((function(e,n){return e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd}))}function Zd(e){return e.qTags.indexOf("$qualified")>-1}function Qd(e){for(var t=e.qAxis,n=[],r=[],i=0;i<t.length;i++){var o=i+1,a=t[i],u=t[o];$d(a,u)?(Zd(u)?(n.push(o),r.push(i)):(n.push(i),r.push(o)),i++):(n.push(i),r.push(i))}return{qualified:n,nonQualified:r}}function ep(e){var t=e.qualifiedMeta,n=e.nonQualifiedMeta;return{resolve:function(e){for(var r,i=NaN,o=NaN,a=NaN,u=!1,s=t.length-1;s>=0;s--){var l=t[s];if(l.queries.outer(e)){var c=n[s+1];if(i=l.index,r=s,l.attrs.isDayOrShorter()&&l.queries.canFitHalfDayTicks(e)){o="auto",u=!0;break}if(c&&c.queries.inner(e)){o=c.index;var f=n[s+2];f&&f.queries.minor(e)&&(a=f.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;var d=n[r+1];d&&d.queries.minor(e)&&(a=d.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:u}}}}function tp(e){var t=e.qTicks,n=e.measureText,r=void 0===n?function(){return{width:0}}:n,i=e.cache,o=void 0===i?{}:i,a=e.scale,u=o;return{isDayOrShorter:function(){return u.isDayOrShorter=t.length>0&&Math.abs(t[0].qStart-t[0].qEnd)<=1,u.isDayOrShorter},count:function(){return t.length},maxRange:function(){return u.maxRange=t.length?Math.max.apply(Math,ee(t.map((function(e){return Math.abs(a(e.qStart)-a(e.qEnd))})))):0,u.maxRange},rangeAndWidth:function(){var e=a.clamp();return a.clamp(!1),u.rangeAndWidth=t.map((function(e){return{range:Math.abs(a(e.qStart)-a(e.qEnd)),width:r("".concat(e.qText)).width+16}})),a.clamp(e),u.rangeAndWidth}}}function np(e){var t=e.attrs,n=e.reqAutoFitWidth;return{outer:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},inner:function(e){return!t.rangeAndWidth().some((function(t){return t.width>t.range*e}))},minor:function(e){return t.maxRange()*e>=6},canFitHalfDayTicks:function(e){return e>=n*t.count()}}}function rp(e){var t=e.qualified,n=e.nonQualified,r=e.qAxis,i=e.measureText,o=e.reqAutoFitWidth,a=e.scale,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{attributesFactory:tp,queryFactory:np},s=u.attributesFactory,l=void 0===s?tp:s,c=u.queryFactory,f=void 0===c?np:c;function d(e,t){var n=e.qTicks,r=l({qTicks:n,measureText:i,scale:a});return{data:e,index:t,attrs:r,queries:f({attrs:r,reqAutoFitWidth:o})}}var p=r.map((function(e,t){return d(e,t)})),m=t.map((function(e){return p[e]})),h=n.map((function(e){return p[e]}));return{qAxisMeta:p,qualifiedMeta:m,nonQualifiedMeta:h}}function ip(e){return!Array.isArray(e)||0===e.length||e.every((function(e){return 0===e.qTicks.length}))}function op(e){var t=e.qAxis,n=void 0===t?[]:t,r=e.measureText,i=void 0===r?function(){return{width:0}}:r,o=e.cache,a=void 0===o?{}:o,u=e.reqAutoFitWidth,s=void 0===u?0:u,l=e.scale,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metaFactory:rp,mapper:Qd,resolver:ep},f=c.metaFactory,d=void 0===f?rp:f,p=c.mapper,m=void 0===p?Qd:p,h=c.resolver,v=void 0===h?ep:h,g=m({qAxis:n}),y=g.qualified,b=g.nonQualified,x=d({qAxis:n,qualified:y,nonQualified:b,measureText:i,reqAutoFitWidth:s,scale:l}),q=x.qualifiedMeta,M=x.nonQualifiedMeta,S=v({qualifiedMeta:q,nonQualifiedMeta:M});return{resolve:function(e){var t=a.key({distance:e});if(a.get(t))return a.get(t);if(ip(n))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};var r=S.resolve(e);return a.set(t,r),r}}}function ap(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}var up=ap(0).getTime();function sp(e){return(e.getTime()-up)/86400/1e3}var lp=new Date,cp=new Date;function fp(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,u=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return u;do{u.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return u},i.filter=function(n){return fp((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return lp.setTime(+t),cp.setTime(+r),e(lp),e(cp),Math.floor(n(lp,cp))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var dp=fp((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),pp=fp((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),mp=fp((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),hp=fp((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function vp(e){return fp((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var gp=vp(0);vp(1),vp(2),vp(3),vp(4),vp(5),vp(6);var yp=fp((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),bp=fp((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));bp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fp((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var xp=1,qp=2,Mp=3,Sp=4,Dp=5,Cp=6;function wp(e){var t,n=e.timeScale,r=e.labels,i=e.distance,o=e.isDayOrShorter,a=e.cache,u=e.timeOnly,s=Q(n.domain(),2),l=s[0],c=s[1],f=a.key({distance:i});a.get(f,1)?t=a.get(f,1):(t=function(e,t,n,r,i){var o=dp.count(e,t),a=pp.count(e,t),u=mp.count(e,t),s=hp.count(e,t),l=gp.count(e,t),c=yp.count(e,t),f=bp.count(e,t),d=n/r.second.width-1,p=n/r.minute.width-1,m=n/r.date.width-1,h=n/r.year.width-1,v={type:"year",desc:"year",count:f,interval:bp.every(1),formatter:r.year.formatter};return o<=d?(v.type=xp,v.desc="second",v.count=o,v.interval=dp.every(1),v.formatter=r.second.formatter):o/2<=d?(v.type=xp,v.desc="every other second",v.count=o/2,v.interval=dp.every(2),v.formatter=r.second.formatter):o/5<=d?(v.type=xp,v.desc="every 5 second",v.count=o/5,v.interval=dp.every(5),v.formatter=r.second.formatter):o/15<=d?(v.type=xp,v.desc="every 15 second",v.count=o/15,v.interval=dp.every(15),v.formatter=r.second.formatter):o/30<=d?(v.type=xp,v.desc="every 30 second",v.count=o/30,v.interval=dp.every(30),v.formatter=r.second.formatter):a<=p?(v.type=qp,v.desc="minute",v.count=a,v.interval=pp.every(1),v.formatter=r.minute.formatter):a/2<=p?(v.type=qp,v.desc="every 2 minute",v.count=a/2,v.interval=pp.every(2),v.formatter=r.minute.formatter):a/5<=p?(v.type=qp,v.desc="every 5 minute",v.count=a/5,v.interval=pp.every(5),v.formatter=r.minute.formatter):a/10<=p?(v.type=qp,v.desc="every 10 minute",v.count=a/10,v.interval=pp.every(10),v.formatter=r.minute.formatter):a/15<=p?(v.type=qp,v.desc="every 15 minute",v.count=a/15,v.interval=pp.every(15),v.formatter=r.minute.formatter):a/30<=p?(v.type=qp,v.desc="every 30 minute",v.count=a/30,v.interval=pp.every(30),v.formatter=r.minute.formatter):u<=p?(v.type=Mp,v.desc="hour",v.count=u,v.interval=mp.every(1),v.formatter=r.minute.formatter):u/2<=p?(v.type=Mp,v.desc="every 2 hour",v.count=u/2,v.interval=mp.every(2),v.formatter=r.minute.formatter):u/3<=p?(v.type=Mp,v.desc="every 3 hour",v.count=u/3,v.interval=mp.every(3),v.formatter=r.minute.formatter):u/6<=p?(v.type=Mp,v.desc="every 6 hour",v.count=u/6,v.interval=mp.every(6),v.formatter=r.minute.formatter):u/12<=p||i?(v.type=Mp,v.desc="every 12 hour",v.count=u/12,v.interval=mp.every(12),v.formatter=r.minute.formatter):s<=m?(v.type=Sp,v.desc="day",v.count=s,v.interval=hp.every(1),v.formatter=r.date.formatter):s/2<=m?(v.type=Sp,v.desc="every 2 day",v.count=s/2,v.interval=hp.every(2),v.formatter=r.date.formatter):s/3<=m?(v.type=Sp,v.desc="every 3 day",v.count=s/3,v.interval=hp.every(3),v.formatter=r.date.formatter):l<=m?(v.type=Sp,v.desc="week",v.count=l,v.interval=gp.every(1),v.formatter=r.date.formatter):l/2<=m?(v.type=Sp,v.desc="every 2 week",v.count=l/2,v.interval=gp.every(2),v.formatter=r.date.formatter):c<=m?(v.type=Dp,v.desc="month",v.count=c,v.interval=yp.every(1),v.formatter=r.date.formatter):c/3<=m?(v.type=Dp,v.desc="quarter",v.count=c/3,v.interval=yp.every(3),v.formatter=r.date.formatter):c/6<=m?(v.type=Dp,v.desc="half year",v.count=c/6,v.interval=yp.every(6),v.formatter=r.date.formatter):f<=h?(v.type=Cp,v.desc="year",v.count=f,v.interval=bp.every(1),v.formatter=r.year.formatter):f/2<=h?(v.type=Cp,v.desc="every 2 year",v.count=f/2,v.interval=bp.every(2),v.formatter=r.year.formatter):f/5<=h?(v.type=Cp,v.desc="every 5 year",v.count=f/5,v.interval=bp.every(5),v.formatter=r.year.formatter):f/10<=h?(v.type=Cp,v.desc="every 10 year",v.count=f/10,v.interval=bp.every(10),v.formatter=r.year.formatter):(v.type=Cp,v.desc="every nth year",v.count=Math.floor(f/h),v.interval=bp.every(Math.floor(f/h)),v.formatter=r.year.formatter),v}(l,c,i,r.all(),o),a.set(f,t,1));var d=n.ticks(t.interval).map((function(e,n,r){var i=r[n+1]?r[n+1]-e:c-e;return{start:e,end:new Date(e.getTime()+i),formatter:t.formatter}})),p=[];if(!u&&t.type<=Mp){var m=r.getFormat("date"),h=n.ticks(hp.every(1));p=(h.length?h:[l]).map((function(e,t,n){var r=n[t+1]?n[t+1]-e:c-e;return{start:e,end:new Date(e.getTime()+r),formatter:m.formatter}}))}return{inner:d,outer:p}}var Op={};function Tp(e,t,n,r){return{type:e,start:new Date(Date.UTC.apply(Date,ee(t))),end:new Date(Date.UTC.apply(Date,ee(n))),formatter:r}}function Ap(e,t,n){var r=t.ticks,i=r.generator,o=r.anchor,a=r.clamp,u=r.level,s=t.formatter.qNumFormat;e.clamp(a);var l=Q(e.domain(),2),c=l[0],f=l[1],d=function(){return _t.apply(vo(Jr,Xr,Kr,Ur,_r,Br,jr,Ir,ti).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([ap(c),ap(f)]);d.clamp(a),d.range(t.invert?[1,0]:[0,1]);var p,m="object"===F(i)?i.type:i;p="d3"===m?function(e,r){return wp({timeScale:d,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType})}:function(e){return function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(Op[[t,n,r,r,o]])return Op[[t,n,r,r,o]];var a,u,s,l={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},c=ap(n),f=c.getFullYear(),d=c.getMonth(),p=c.getDate(),m=r-n,h=t/(i-r),v=h/1440,g=h/86400,y=366*h,b=3*h*30,x=l.second.width/g,q=l.minute.width/v,M=l.date.width/b,S=l.year.width/y,D=0,C=0,w=null,O=null,T=null,A=null,E=null,L=null,k={outer:[],inner:[]};for(x<1?(w=1,C=1/86400):x<2?(w=2,C=1/86400*2):x<5?(w=5,C=1/86400*5):x<10?(w=10,C=1/86400*10):x<30?(w=30,C=1/86400*30):q<1?(O=1,C=1/1440):q<2?(O=2,C=1/1440*2):q<5?(O=5,C=1/1440*5):q<10?(O=10,C=1/1440*10):q<30?(O=30,C=1/1440*30):q<60?(T=1,C=1/24):q<120?(T=2,C=2/24):q<360?(T=6,C=.25):q<720?(T=12,C=.5):M<1/90?(C=1,A=1):M<2/90?(C=2,A=2):M<7/90?(C=7,A=7):M<31/90?(E=1,C=31):M<1?(E=3,C=90):S<1?(L=1,C=366):S<2?(L=2,C=732):S<5?(L=5,C=1826.25):(L=10,C=3652.5),u=Math.floor((m+n%1)/C);D<i;){s=u+1,D=sp((a=L?Tp("year",[f+u*L,0,1],[f+s*L,0,1],l.year.formatter):E?Tp("month",[f,d+u*E,1],[f,d+s*E,1],l.date.formatter):A?Tp("day",[f,d,p+u*A],[f,d,p+s*A],l.date.formatter):T?Tp("hour",[f,d,p,0+u*T],[f,d,p,0+s*T],l.minute.formatter):O?Tp("minute",[f,d,p,0,0+u*O],[f,d,p,0,0+s*O],l.minute.formatter):Tp("second",[f,d,p,0,0,0+u*w],[f,d,p,0,0,0+s*w],l.second.formatter)).start),k.inner.push(a);var N=Math.floor(D);if(!(o||L||E||A)){var I={type:"day",start:ap(N),end:ap(N+1),formatter:l.date.formatter,qStart:N};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===I.qStart||k.outer.push(I)}u++}return k.min=r,k.max=i,Op[[t,n,r,r,o]]=k,k}(n,e,i.min,c,f,"T"===s.qType)};var h={transform:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isMinor,i=void 0!==r&&r;return t.map((function(t){var n;n="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;var r=e.clamp();i&&e.clamp(!1);var a=e(n),u=e(t.qStart),s=e(t.qEnd);return e.clamp(r),{value:n,position:a,start:u,end:s,label:t.qText,isMinor:i,data:i?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))},generate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1?arguments[1]:void 0,r=p(t,n),i=r[u];return i.map((function(t){var n;return n="start"===o?sp(t.start):"end"===o?sp(t.end):(sp(t.start)+sp(t.end))/2,{position:d(t.start),start:d(t.start),end:d(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:sp(t.start),end:sp(t.end),scaleStart:e.domain()[0]}}})).filter((function(e){return e.position>=0&&e.position<=1}))}};return h}var Ep=/t+/i;function Lp(e){var t={},n=e.formatter,r=n.measureText,i=n.fn,o=n.localeInfo,a={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&Ep.test(o.qTimestampFmt)&&(a.minute.pattern+=" tt",a.second.pattern+=" tt"),a.date.pattern=o&&o.qDateFmt?o.qDateFmt:a.date.pattern,Object.keys(a).forEach((function(e){a[e].formatter=i(a[e].pattern),a[e].width=Math.max(a[e].width,r(a[e].formatter(41000.2343433)).width+16)})),t.getFormat=function(e){return a[e]},t.all=function(){return a},t.getFormatFromTicks=function(e){var t=e.filter((function(e){return!e.isMinor})),n=t.length;if(!n)return a.date;var r=ap(t[0].data.start),i=ap(t[n-1].data.start);return hp.count(r,i)/n>=1?a.date:mp.count(r,i)/n>0?a.minute:pp.count(r,i)/n>0?a.second:a.date},t}function kp(e,t,n){var r={};return Object.keys(t).forEach((function(i){var o=e[i],a=F(o);"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=de(!0,{},t[i],o)})),r}var Np={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:function(){return function(e){return e}},measureText:function(){return{width:0,height:0}},localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:function(){return!1},set:function(){},key:function(){return""}}};function Ip(e,t){var n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min.apply(Math,ee(t[t.length-1].qTicks.map((function(e){return e.qStart})))),r=Math.max.apply(Math,ee(t[t.length-1].qTicks.map((function(e){return e.qEnd}))))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}function jp(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}var Pp="continuousPan";var Rp={model:function(e){var t,n,r,i=e.model,o=e.layoutService,a=e.dataProcessorModel,u=void 0===a?bs:a,s=e.viewCache,l=e.viewState,c=e.definitionPath,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=f.engineFetcherFactory,p=void 0===d?ts:d,m=f.snapshotFetcherFactory,h=void 0===m?rs:m,v=f.cacheFetcherFactory,g=void 0===v?ns:v,y=f.cache,b=void 0===y?{initial:{},merged:{}}:y,x=p({model:i,layoutService:o,definitionPath:c}),q=h({layoutService:o,viewCache:s}),M=g({cache:b}),S=function(e){throw e.isHandled=!0,e};return{update:function(e){var i=ys(e.qHyperCube.qDimensionInfo[0]);if(n=i.initialMin,r=i.initialMax,s.set("continuousMin",n),s.set("continuousMax",r),s.set("minimiumZoomSpan",ps(n,r)),t=o.meta.isSnapshot?q:x,o.meta.isSnapshot){var a=q.getSnapshotData().zoom;n=a.min,r=a.max}l.preventSet("zoom",{min:n,max:r})},updateLayout:function(e){var t=e.qDataPages,n=e.qAxisData;return o.setHyperCubeValue("qDataPages",t),o.setHyperCubeValue("qAxisData",n),o.setHyperCubeValue("qMode","S"),e},initialFetch:function(){var e=this;return t.fetch(n,r).then((function(e){var t=ls(e);return u.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),b.initial=t,b.merged=t,e})).then((function(e){return us(n,r,e)})).then((function(t){return e.updateLayout(t)})).catch(S)},fetch:function(e,n){return t.fetch(e,n).then((function(e){return ss(b.initial,e)})).then((function(e){return u.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),b.merged=e,e})).then((function(t){return us(e,n,t)})).catch(S)},fetchFromCache:function(e,t){return M.fetch(e,t).then((function(n){return us(e,t,n)}))},fetchMinMaxData:function(){return Promise.resolve(b.initial.qDataPages||[])},getInitialCube:function(){var e=o.getHyperCube();return de({},e,R({},b.initial))},getInitialLayout:function(){var e=this.getInitialCube();return de({},o.getLayout(),{qHyperCube:e})},getDimensionCardinality:function(){return gs(b.initial,o.meta)},setSnapshotData:function(e){var t=e.qHyperCube;t.qDataPages=b.merged.qDataPages,t.qAxisData=b.merged.qAxisData}}},event:{onZoomChange:function(e,t){var n=e.layoutService,r=e.continuousDataModel;function i(e,n,i){return r[e](n,i).then((function(e){return r.updateLayout(e),t(),e}))}var o=hc((function(e,t){return i("fetch",e,t)}),50);return function(e,t){var r=e.min,a=e.max,u=t.min,s=t.max;return!n.meta.isContinuous||r===u&&a===s?Promise.resolve(null):i("fetchFromCache",r,a).then((function(e){return o(r,a),e}))}},onZoomIntercept:function(e){var t=e.viewCache,n=NaN,r=NaN,i=NaN;return function(e,o){return n=t.get("continuousMin"),r=t.get("continuousMax"),i=t.get("minimiumZoomSpan"),Math.abs(e.max-e.min)<i?o:{min:Math.min(e.max,Math.max(n,e.min)),max:Math.max(e.min,Math.min(r,e.max))}}},onZoom:function(e,t){var n=e.viewCache,r=e.viewState,i=e.chart,o=t.threshold,a=void 0===o?50:o,u=t.rtl,s=void 0!==u&&u,l=t.targetKey,c=n.get("continuousMin"),f=n.get("continuousMax");return vc((function(e,t){var n=function(e){return i.componentsFromPoint(e).filter((function(e){return e.key===l}))[0]}(e);if(n){var o=function(e,t,n){var r=e.x;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,i,n),a=s?1-o:o,u=r.get("zoom"),d=u.min,p=u.max,m=Math.abs(p-d),h=m-(t>0?fs:cs)*m,v=d+h*a,g=p-h*(1-a),y=v<c?c-v:0,b=g>f?g-f:0;r.set("zoom",{min:Math.max(v-b,c),max:Math.min(g+y,f)})}}),a)}},interactions:{areaPan:function(e){var t,n=e.targetKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache;return{type:"Pan",key:"continuous:pan",options:{event:Pp,pointers:1,threshold:10,enable:function(e,t){return this.started===Pp||!t||!!i.scroll.enabled()&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n}))}},events:(t={},U(t,"".concat(Pp,"start"),(function(e){e.preventDefault(),this.started=Pp;var t=o.get("zoom"),i=t.min,a=t.max;this[Pp]={min:i,max:a,size:r.component(n).rect.computedInner.width,span:a-i}})),U(t,"".concat(Pp,"move"),(function(e){e.preventDefault();var t=this[Pp],n=t.span,r=t.min,i=t.max,u=t.size,s=-e.deltaX/u;o.set("zoom",{min:Math.min(r+s*n,a.get("continuousMax")-n),max:Math.max(i+s*n,a.get("continuousMin")+n)})})),U(t,"".concat(Pp,"end"),(function(e){e.preventDefault(),this.started=!1})),U(t,"".concat(Pp,"cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}},picassoComponents:{axisOverlay:Wd,timeAxis:Jd},picassoScales:{time:function e(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=kp(t,Np,i),a=o.qAxis,u=Er(),s={instance:null,invert:!1},l=Ip(o,a),c=l.min,f=l.max,d=[],p=function(e){return Number.isNaN(+e)?NaN:u(e)};p.ticks=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.distance,i=e.resolve,u=void 0===i?n.resolve:i,s=u(t),l=s[o.ticks.level];if(Number.isNaN(+l)||(d=r.transform(a[l].qTicks,{isMinor:!1})),!Number.isNaN(+s.minor)){var c=r.transform(a[s.minor].qTicks,{isMinor:!0});d=d.concat(c)}return"auto"===l&&(d=r.generate(t,s.isDayOrShorter)),d},p.invert=function(e){return u.invert(e)},p.domain=function(e){return Array.isArray(e)?u.domain(e):u.domain()},p.range=function(e){return Array.isArray(e)?u.range(e):u.range()},p.norm=function(e){return jp(s,p),s.instance(e)},p.normInvert=function(e){return jp(s,p),s.instance.invert(e)},p.copy=function(){return e(t,i)},p.clamp=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.clamp(e),u.clamp()},p.min=function(){return Math.min(c,f)},p.max=function(){return Math.max(c,f)},u.range(o.invert?[1,0]:[0,1]),u.domain([c,f]),s.invert=o.invert;var m=Lp(o);return r=Ap(u.copy(),o,m),n=op({qAxis:a,measureText:o.formatter.measureText,reqAutoFitWidth:2*m.getFormat("minute").width,cache:o.cache,scale:p}),p.data=function(){return{fields:[{formatter:p.formatter,id:function(){return"qHyperCube/".concat(o.field)},key:function(){return o.field},raw:fc(i,"fields.0.raw",(function(){return{}}))}]}},p.formatter=function(){return m.getFormatFromTicks(d).formatter},p}}},Fp={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}},zp={OPTIONS:Fp,DEFAULT:Fp.MINI_CHART};function Hp(e){var t=e.layoutService,n=e.discrete;return function(e){var r=e.h,i=e.rect,o=e.orientation,a=e.minThumbSize,u=n.query.getCurrentDataPage(),s=t.meta.size.y,l="horizontal"===o,c=i[l?"width":"height"],f=u.qArea.qTop/s*c,d=u.qArea.qHeight/s*c;if(d<a){var p=(a-d)/2;f=f-p+(Math.max(0,0-(f-p))-Math.max(0,f+d+p-c)),d=a}return r("div",{style:R({position:"absolute",right:0,bottom:0,background:"red",opacity:.2},l?{top:0,left:f,width:d}:{top:f,left:0,height:d})})}}function Vp(e){var t=e.layoutService,n=e.viewState,r=e.viewCache;return t.meta.isContinuous?function(e,t){var n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(n,r):function(e){return e.get("viewRange")}(n)}var Bp=function(e){return{miniChart:e===zp.OPTIONS.MINI_CHART.value,bar:e===zp.OPTIONS.BAR.value,none:e===zp.OPTIONS.NONE.value}};function _p(e){var t=e.layoutService,n=e.override,r=void 0===n?void 0:n,i=function(e){var t=e.layoutService,n=t.getLayoutValue("scrollbar");if(n)return Bp(n);var r=t.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===r)return Bp(zp.DEFAULT.value);var i=t.getLayoutValue("dimensionAxis.continuousAuto"),o=t.getLayoutValue("preferContinuousAxis");return Bp(!r&&(i||!i&&o)?zp.OPTIONS.NONE.value:zp.OPTIONS.MINI_CHART.value)}({layoutService:t});return r&&r.predicate({layoutService:t,scrollbar:i})&&(i.miniChart=r.value===zp.OPTIONS.MINI_CHART.value,i.bar=r.value===zp.OPTIONS.BAR.value,i.none=r.value===zp.OPTIONS.NONE.value),i}function Up(e){var t=e.layoutService,n=e.dockService,r=e.discrete,i=e.continuousDataModel,o=e.viewState,a=e.viewCache,u=e.themeService,s=e.rtl,l=e.scrollbarOverride,c=e.visualizeCache,f=void 0!==c&&c,d=e.deviceType,p=_p({layoutService:t,override:l});if(p.none)return!1;var m=n.meta.major.orientation,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?n.meta.minor.start:n.meta.minor.end,minimumLayoutMode:"XSMALL"},show:function(){return t.meta.isContinuous?i.getDimensionCardinality()>1:r.query.getCanScroll()},settings:{orientation:m,rtl:s,isContinuous:t.meta.isContinuous,range:function(){return Vp({layoutService:t,viewState:o,viewCache:a})}}};p.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===d?{max:16,min:16}:{max:8,min:8}},t.meta.isContinuous||(h.settings.size.thumb={min:4}));var v=u.getStyles();return v.color&&(h.style={standard:{thumb:{"border-color":v.color,opacity:.4},before:{background:v.color,opacity:.1},after:{background:v.color,opacity:.1}}}),t.meta.isDiscrete&&f&&(h.settings.injections=function(){return[Hp({layoutService:t,discrete:r})]}),h}function Wp(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService,u=e.rtl;return function(e){var s=e.center,l=s.x,c=s.y,f=n.element.getBoundingClientRect(),d=n.component(t),p="horizontal"===a.meta.major.orientation,m=p?l-f.left-d.rect.computedInner.x:c-f.top-d.rect.computedInner.y,h=p?d.rect.computedInner.width:d.rect.computedInner.height,v=p&&u?h-m:m,g=Math.max(0,Math.min(v/h,1)),y=Q(Vp({layoutService:o,viewState:r,viewCache:i}),2),b=y[0],x=g<b,q=g>y[1],M=!x&&!q;return{pixel:v,relative:g,thumb:M?v-b*h:0,beforeThumb:x,afterThumb:q,onThumb:M}}}function Kp(e){var t=e.componentKey,n=e.chart,r=e.viewState,i=e.viewCache,o=e.layoutService,a=e.dockService;return function(){var e=n.component(t),u=a.meta.major.orientation,s=e.rect.computedInner,l=s.width,c=s.height,f="horizontal"===u?l:c,d=Q(Vp({layoutService:o,viewState:r,viewCache:i}),2),p=d[0];return{size:f,thumbSize:(d[1]-p)*f}}}function Gp(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,u=e.dockService,s=e.discrete,l=e.rtl,c=Wp({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:u,rtl:l}),f=Kp({componentKey:t,chart:n,viewState:i,viewCache:o,layoutService:a,dockService:u});return{type:"Tap",options:{event:"scrollbarTap",enable:function(e,i){return!i||!!r.scroll.enabled()&&n.componentsFromPoint({x:i.center.x,y:i.center.y}).some((function(e){return e.key===t}))}},events:{scrollbarTap:function(e){e.preventDefault();var r=c(e);if(a.meta.isContinuous){var u=i.get("zoom"),l=u.max-u.min,d=o.get("continuousMin"),p=o.get("continuousMax"),m=d+(p-d)*r.relative;i.set("zoom",{min:Math.min(m-l/2,p-l),max:Math.max(m+l/2,d+l)})}else{var h=f(),v=r.pixel-h.thumbSize/2,g=Math.max(0,v/h.size);s.command.scrollTo(g)}n.component(t).emit("render")}}}}function Yp(e){var t=e.e;return(t.srcEvent||t).srcElement.getAttribute("data-scrollbar-handle")||""}var Xp="scrollbarResize";function Jp(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,u=e.layoutService,s=e.dockService,l=e.rtl,c=Wp({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:u,dockService:s,rtl:l});return{type:"Pan",key:"event:".concat(Xp),options:{event:Xp,threshold:0,enable:function(e,t){return!(!u.meta.isContinuous||!i.scroll.enabled())&&(!t||(this[Xp]=this[Xp]||{},function(e){var t=Q(e.changedPointers,1)[0];return t&&("pointerdown"===t.type||"mousedown"===t.type)}(t)&&Yp({e:t})&&(this[Xp].panningEvent=t.srcEvent),!!this[Xp].panningEvent))}},events:(t={},U(t,"".concat(Xp,"start"),(function(e){e.preventDefault(),this[Xp]=this[Xp]||{},this[Xp].panningEvent&&r.component(n).emit("dragStart",this[Xp].panningEvent)})),U(t,"".concat(Xp,"move"),(function(e){if(e.preventDefault(),this[Xp]=this[Xp]||{},this[Xp].panningEvent){var t=o.get("zoom"),i=a.get("continuousMin"),u=a.get("continuousMax"),s=a.get("minimiumZoomSpan"),l=(u-i)*c(e).relative+i,f=Yp({e:this[Xp].panningEvent}),d="start"===f?Math.min(l,t.max):t.min,p="end"===f?Math.max(l,t.min):t.max;d===p&&(d-="start"===f?s:0,p+="end"===f?s:0),o.set("zoom",{min:d,max:p}),r.component(n).emit("render")}})),U(t,"".concat(Xp,"end"),(function(e){e.preventDefault(),this[Xp]=this[Xp]||{},delete this[Xp].panningEvent,r.component(n).emit("dragEnd")})),U(t,"".concat(Xp,"cancel"),(function(e){e.preventDefault(),this[Xp]=this[Xp]||{},delete this[Xp].panningEvent,r.component(n).emit("dragEnd")})),t)}}var $p="scrollbarPan";function Zp(e){var t,n=e.componentKey,r=e.chart,i=e.actions,o=e.viewState,a=e.viewCache,u=e.layoutService,s=e.dockService,l=e.discrete,c=e.rtl,f=Wp({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:u,dockService:s,rtl:c}),d=Kp({componentKey:n,chart:r,viewState:o,viewCache:a,layoutService:u,dockService:s});return{type:"Pan",key:"event:".concat($p),options:{event:$p,threshold:0,enable:function(e,t){return this[$p]=this[$p]||{},!(t&&!this[$p].isPanning)||!!i.scroll.enabled()&&((!t||t.target===r.element)&&r.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===n})))}},events:(t={},U(t,"".concat($p,"start"),(function(e){e.preventDefault();var t=f(e);if(this[$p]=this[$p]||{},this[$p].isPanning=!0,r.component(n).emit("lockState"),u.meta.isContinuous){var i=o.get("zoom"),s=i.max-i.min,l=a.get("continuousMin"),c=a.get("continuousMax"),p=l+(c-l)*t.relative;p<i.min?o.set("zoom",{min:Math.min(p,c-s),max:Math.max(p+s,l+s)}):p>i.max&&o.set("zoom",{min:Math.min(p-s,c-s),max:Math.max(p,l+s)}),this[$p].relative=t.relative,this[$p].zoom=o.get("zoom"),this[$p].zoom.span=this[$p].zoom.max-this[$p].zoom.min,this[$p].zoom.fullSpan=c-l}else if(t.onThumb)this[$p].offset=t.thumb;else{var m=d();this[$p].offset=t.beforeThumb?0:m.thumbSize}})),U(t,"".concat($p,"move"),(function(e){e.preventDefault();var t=f(e);if(this[$p]=this[$p]||{},u.meta.isContinuous){var i=t.relative-this[$p].relative,s=this[$p].zoom,c=s.fullSpan,p=s.span,m=s.min,h=s.max,v=a.get("continuousMin"),g=a.get("continuousMax");o.set("zoom",{min:Math.min(m+i*c,g-p),max:Math.max(h+i*c,v+p)})}else{var y=t.pixel-(this[$p].offset||0),b=d(),x=Math.max(0,y/b.size);l.command.scrollTo(x)}r.component(n).emit("render")})),U(t,"".concat($p,"end"),(function(e){e.preventDefault(),this[$p]=this[$p]||{},this[$p].isPanning=!1,r.component(n).emit("unlockState")})),U(t,"".concat($p,"cancel"),(function(e){e.preventDefault(),this[$p]=this[$p]||{},this[$p].isPanning=!1,r.component(n).emit("unlockState")})),t)}}function Qp(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService,u=e.dockService,s=e.discrete,l=e.rtl;return[Gp({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:u,discrete:s,rtl:l}),Jp({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:u,rtl:l}),Zp({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:u,discrete:s,rtl:l})]}function em(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.layoutService,o=function(e,o){if(i.meta.isContinuous){var a=n.component(t);a&&a.emit&&r.scroll.enabled()&&a.emit(e,o)}};return{type:"native",events:{mousemove:function(e){return o("hover",e)},mouseleave:function(){return o("leave")}}}}function tm(e){var t=e.componentKey,n=e.chart,r=e.actions,i=e.viewState,o=e.viewCache,a=e.layoutService;return{gestures:ee(Qp({componentKey:t,chart:n,actions:r,viewState:i,viewCache:o,layoutService:a,dockService:e.dockService,discrete:e.discrete,rtl:e.rtl})),native:em({componentKey:t,chart:n,actions:r,layoutService:a})}}var nm={background:"rgba(0, 0, 0, 0.1)"},rm={top:-1,bottom:-1,width:6},im={width:2,background:"#595959"},om={before:nm,after:nm,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:rm,endHandle:rm,startHandleBorder:im,endHandleBorder:im},am={background:"rgba(0, 0, 0, 0.1)"},um={top:-1,bottom:-1,width:6},sm={width:2,background:"#595959"},lm={before:am,after:am,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:um,endHandle:um,startHandleBorder:sm,endHandleBorder:sm},cm={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},fm={pointerEvents:"initial"},dm={pointerEvents:"none"};var pm="ew-resize",mm="default";function hm(){var e=this.rect,t=this.settings.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function vm(){var e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?pm:mm}function gm(e,t,n){var r=this.settings.settings.size.thumb.min;if(n-t<r){var i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function ym(e){var t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function bm(){var e=hm.call(this),t=e.size,n=e.start,r=e.end;this.renderer.render(this.elements(this.h,gm.call(this,t,n,r)))}function xm(){var e=this.state,t=this.settings,n=this.style,r=t.settings.style;return e.style[r]||(e.style[r]=function(e){var t=e.id,n=e.style,r="slim"===t?lm:om;return{container:R({},cm),before:R(R(R({},cm),r.before),n.before),after:R(R(R({},cm),r.after),n.after),thumb:R(R(R({},cm),r.thumb),n.thumb),startHandle:R(R(R({},cm),fm),r.startHandle),endHandle:R(R(R({},cm),fm),r.endHandle),startHandleBorder:R(R(R({},cm),dm),r.startHandleBorder),endHandleBorder:R(R(R({},cm),dm),r.endHandleBorder)}}({id:t.settings.style,style:n[r]})),e.style[r]}var qm={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:function(){return[0,1]},injections:function(){return[]}},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render:function(){bm.call(this)},lockState:function(){this.state.locked=!0},unlockState:function(){this.state.locked=!1},hover:function(e){if(!(this.state.locked||this.state.drag.start||this.state.drag.end||!ym.call(this,e)&&this.state.hover.isPristine())){this.state.hover.reset();var t=Yp({e:e});t&&(this.state.hover[t]=!0),vm.call(this),bm.call(this)}},leave:function(){this.state.locked||(this.state.hover.reset(),vm.call(this),bm.call(this))},dragStart:function(e){if(!this.state.locked){this.state.drag.reset();var t=Yp({e:e});t&&(this.state.drag[t]=!0),vm.call(this)}},dragEnd:function(){this.state.locked||(this.state.drag.reset(),vm.call(this),bm.call(this))}},preferredSize:function(e){var t=e.outer,n=this.settings.settings.size.area,r=n.min,i=n.max,o=n.ratio,a="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(r,Math.min(i,t[a]*o))},created:function(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1},isPristine:function(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset:function(){this.start=!1,this.end=!1}}}},render:function(e){this.h=e;var t=hm.call(this),n=t.size,r=t.start,i=t.end;return this.elements(e,gm.call(this,n,r,i))},properties:function(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements:function(e,t){var n=this,r=t.size,i=t.start,o=t.end,a=this.settings.settings,u=a.injections().map((function(t){return t({h:e,rect:n.rect,orientation:a.orientation,minThumbSize:a.size.thumb.min})}));return function(e){var t,n=e.h,r=e.size,i=e.start,o=e.end,a=e.properties,u=e.startHandleActive,s=e.endHandleActive,l=e.style,c=e.continuous,f=e.invert,d=e.injections,p={before:U({},a.end,r-i),after:U({},a.start,o),startHandle:{left:-3},startHandleBorder:{left:1},endHandle:{right:-3,left:"auto"},endHandleBorder:{left:3}},m=n("div",{style:R(R({},l.before),f?p.after:p.before),class:"scrollbar--before"}),h=n("div",{style:R(R({},l.after),f?p.before:p.after),class:"scrollbar--after"}),v=[];if(c){var g=n("div",U({style:R(R({},l.startHandle),f?p.endHandle:p.startHandle),class:"scrollbar--start-handle"},"data-scrollbar-handle","start"),u?n("div",{style:R(R({},l.startHandleBorder),f?p.endHandleBorder:p.startHandleBorder)}):void 0);v.push(g);var y=n("div",U({style:R(R({},l.endHandle),f?p.startHandle:p.endHandle),class:"scrollbar--end-handle"},"data-scrollbar-handle","end"),s?n("div",{style:R(R({},l.endHandleBorder),f?p.startHandleBorder:p.endHandleBorder)}):void 0);v.push(y)}var b=n("div",{style:R(R({},l.thumb),{},(t={},U(t,a.start,i),U(t,a.end,r-o),t)),class:"scrollbar--thumb"},v);return n("div",{style:R({},l.container)},[m,b,h].concat(ee(d)))}({h:e,size:r,start:i,end:o,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:xm.call(this),continuous:a.isContinuous,invert:"horizontal"===a.orientation&&a.rtl,injections:u})}},Mm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?10:t,r=e.fill,i=void 0===r?"#999":r,o=e.alignment;return{show:!0,type:"n-polygon",fill:i,stroke:"#000",strokeWidth:0,size:n,sides:3,startAngle:-90,alignment:o}},Sm=function(e){var t,n=e.oob,r=e.dockValue,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,u="x",s="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(u="y",s="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(de({},n,(U(t={},u,i*l),U(t,s,c-Math.max(n.size/2,Math.min(r*c,c-n.size/2))),U(t,"startAngle",f),t)))};function Dm(e){var t,n=e.i,r=e.width,i=e.height,o=e.resolved,a=e.keys,u=e.flipXY,s=e.calcKey,l=void 0===s?"box":s,c=null,f=null;void 0!==o.major.settings.binStart?(c=o.major.items[n].binStart,f=o.major.items[n].binEnd,t=o.major.settings.binStart.scale):c=(t=o.major.settings.major.scale)?o.major.items[n].major:0;var d=0;t?t.bandwidth?c-=(d=t.bandwidth())/2:d=f-c:d=1;var p=de({},{major:c,majorEnd:f},o.minor.items[n]);a.forEach((function(e){p[e]=o[e].items[n]}));var m=u?i:r,h=function(e){var t=e.bandwidth,n=e.width,r=e.minWidthPx,i=e.maxWidthPx,o=e.maxMajorWidth,a=t>=0?1:-1,u=Math.min(a*t*n,Number.isNaN(Number(i))?o:i/o);return(u=Number.isNaN(Number(r))?u:Math.max(r/o,u))*a}({bandwidth:d,width:p[l].width,minWidthPx:p[l].minWidthPx,maxWidthPx:p[l].maxWidthPx,maxMajorWidth:m}),v=(d-h)/2,g=v+p.major+h/2;return{item:p,boxCenter:g,boxWidth:h,boxPadding:v,rendWidth:r,rendHeight:i}}function Cm(e){var t,n=e.keys,r=e.data,i=e.defaultSettings,o=e.style,a=e.settings,u=e.width,s=e.height,l=e.resolver,c=de(!0,{},i||{},o||{}),f={major:"horizontal"===a.orientation?s:u,minor:"horizontal"===a.orientation?u:s},d=a.major;t="object"===F(d)&&"object"===F(d.ref)&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:de(!0,{},{binStart:{scale:a.major.scale,ref:a.major.ref.start},binEnd:{scale:a.major.scale,ref:a.major.ref.end}})}):"object"===F(d)&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:de(!0,{},{binStart:{scale:a.major.scale,ref:"binStart"},binEnd:{scale:a.major.scale,ref:"binEnd"}},a.major)}):l.resolve({data:r,scaled:f,defaults:{major:.5},settings:{major:a.major}});for(var p,m=a.minor||{},h={major:t,minor:l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:de(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})},v=0,g=n.length;v<g;v++)h[p=n[v]]=l.resolve({data:r,defaults:c[p],settings:a[p],scaled:f});return h}var wm=["oob"];var Om={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r=this.settings.settings.dockValue,i="horizontal"===this.settings.settings.orientation,o=this.data,a=this.style,u=this.resolver,s=this.symbol,l=Cm({keys:wm,data:o,defaultSettings:{oob:Mm()},style:a,settings:this.settings.settings,width:t,height:n,resolver:u}),c=l.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol,u=e.dockValue,s=e._calcItemRenderingOpts,l=void 0===s?Dm:s,c=[],f=i.major.items,d=0,p=f.length;d<p;d++){var m=l({i:d,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"oob"}),h=m.item,v=m.boxCenter,g=m.rendWidth,y=m.rendHeight,b=f[d].data,x=[];if(h.oob.show){x.push(Sm({oob:h.oob,dockValue:u,boxCenter:v,rendWidth:g,rendHeight:y,flipXY:r,symbol:a}));var q={type:"container",data:b,collider:{type:"bounds"},children:x};c.push(q)}}return c}({items:l.items,settings:c,width:t,height:n,flipXY:i,resolved:l,keys:wm,symbol:s,dockValue:r})}},Tm={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Am=["hat"];function Em(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var i=e[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function Lm(e){var t,n,r,i,o,a,u,s,l,c,f=e.item,d=e.boxWidth,p=e.boxPadding,m=e.rendWidth,h=e.rendHeight,v=e.flipXY,g="x",y="y",b=m,x=h,q=f.hat.alignment||0;v&&(g="y",y="x",b=h,x=m,q=1-q);var M=(p+f.major)*b,S=[(t={},U(t,g,M),U(t,y,0+x),t),(n={},U(n,g,M+d*q*b),U(n,y,8),n),(r={},U(r,g,M+d*b),U(r,y,0+x),r),(i={},U(i,g,M+d*b),U(i,y,0+x+10),i),(o={},U(o,g,M),U(o,y,0+x+10),o)],D=de({},f.hat,{type:"path",d:Em(S)});return S=[(a={},U(a,g,M),U(a,y,0),a),(u={},U(u,g,M+d*(1-q)*b),U(u,y,0+x-8),u),(s={},U(s,g,M+d*b),U(s,y,0),s),(l={},U(l,g,M+d*b),U(l,y,-10),l),(c={},U(c,g,M),U(c,y,-10),c)],[D,de({},f.hat,{type:"path",d:Em(S)})]}var km,Nm={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created:function(){this.state={}},preferredSize:function(){return this.settings.settings.size},render:function(){var e=this.rect,t=e.width,n=e.height,r="horizontal"===this.settings.settings.orientation,i=this.data,o=this.style,a=this.resolver,u=Cm({keys:Am,data:i,defaultSettings:Tm,style:o,settings:this.settings.settings,width:t,height:n,resolver:a}),s=u.settings;return function(e){for(var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e._calcItemRenderingOpts,u=void 0===a?Dm:a,s=[],l=i.major.items,c=0,f=l.length;c<f;c++){var d=u({i:c,width:t,height:n,resolved:i,keys:o,flipXY:r,calcKey:"hat"}),p=d.item,m=d.boxWidth,h=d.boxPadding,v=d.rendWidth,g=d.rendHeight,y=l[c].data,b=[];p.hat.show&&b.push.apply(b,ee(Lm({item:p,boxWidth:m,boxPadding:h,rendWidth:v,rendHeight:g,flipXY:r})));var x={type:"container",data:y,collider:{type:"bounds"},children:b};s.push(x)}return s}({items:u.items,settings:s,width:t,height:n,flipXY:r,resolved:u,keys:Am})}},Im="equal-higher",jm="equal-lower",Pm="equal-void",Rm="higher-equal",Fm="higher-higher-acute",zm="higher-higher-obtuse",Hm="higher-lower-negative",Vm="higher-lower-positive",Bm="higher-void",_m="lower-equal",Um="lower-higher-negative",Wm="lower-higher-positive",Km="lower-lower-acute",Gm="lower-lower-obtuse",Ym="lower-void",Xm="void-equal",Jm="void-higher",$m="void-lower",Zm="void-void",Qm="top",eh="top-right",th="right",nh="bottom-right",rh="bottom",ih="bottom-left",oh="left",ah="top-left";function uh(e,t,n,r){var i=function(t){var n=String(t);return e(n)};return i.ticks=function(){return t.map((function(t){var o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}))},i.bandwidth=function(){return e.bandwidth()},i.data=function(){return e.data()},i.domain=function(){return e.domain()},i.pxScale=function(r){var i=e.pxScale(r);return i===e?this:uh(i,t,n)},i}function sh(e){var t=e.scale("band");e.scale("group-by-measure",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t(e,n,r),o=i.domain(),a=i.ticks(),u=[],s=e.measureCount;return o.forEach((function(e,t){for(var n=0;n<s;++n)u.push(String([e,n]));u.push("SPACER_".concat(t,"_SPACER"))})),u.splice(-1),i.domain(u),uh(i,a,s,e.invert)}))}U(km={},"equal-equal",[Qm,rh]),U(km,Im,[rh,nh]),U(km,jm,[Qm,eh]),U(km,Pm,[Qm,rh]),U(km,Rm,[oh,ih,Qm,eh]),U(km,Fm,[rh,ih,oh,eh]),U(km,zm,[rh,Qm]),U(km,Hm,[Qm,eh,th]),U(km,Vm,[rh,ih,oh]),U(km,Bm,[Qm]),U(km,_m,[Qm]),U(km,Um,[Qm,ah]),U(km,Wm,[nh]),U(km,Km,[Qm,ah,oh,eh,th]),U(km,Gm,[Qm,rh]),U(km,Ym,[Qm]),U(km,Xm,[Qm]),U(km,Jm,[Qm,rh]),U(km,$m,[Qm,rh,oh]),U(km,Zm,[Qm]);var lh={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function ch(e){var t=e.split("/");return"qmem:"===t[0]&&""===t[1]}function fh(e){var t,n,r,i,o;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(n=(void 0!==(t=e.session.options||e.enigmaModel.session.sessionConfig).secure?t.secure:t.isSecure)?"https://":"http://",r=t.host||"localhost",i=t.port?":".concat(t.port):"","/"!==(o=t.prefix?t.prefix:"/")[o.length-1]&&(o="".concat(o,"/")),n+r+i+o):""}function dh(e,t){var n=e.replace(t,"").replace(/^\.\.\//i,"/");return"/"!==n[0]?"/".concat(n):n}function ph(e,t){return t+("/"===e[0]?e.substr(1):e)}var mh=function(e,t){var n;function r(){n&&(clearTimeout(n),n=null)}function i(e){var t=e;t.onload=null,t.onerror=null,r()}var o={small:50,medium:200,large:340,original:340};return new Promise((function(a){var u=new Image;u.referrerPolicy="no-referrer",u.onload=function(){var e,n=u.height,s=u.width,l=o[t]*(n>s?1:n/s),c=o[t]*(s>n?1:s/n);!n||!s||0===n&&0===s?(e={height:20,width:20,imageError:!0},i(u)):"original"===t?(e={height:Math.min(l,n),width:Math.min(c,s)},r()):(e={height:l,width:c},r()),a(e)},u.onerror=function(){i(u),a({height:20,width:20,imageError:!0})},u.src=e,n=setTimeout((function(){i(u),a({height:20,width:20,imageError:!0})}),3e3)}))};function hh(e,t,n){return vh.apply(this,arguments)}function vh(){return(vh=H(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,u,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.ref.qStaticContentUrl.qUrl,(o=fh(r))&&(dh(i,o),i=ph(i=(i=i.replace(/"/g,'\\"')).replace(/'/g,"\\'"),o)),e.next=5,mh(i,n);case 5:return a=e.sent,u=a.height,s=a.width,l=a.imageError,e.abrupt("return",{src:i,size:n,height:u,width:s,imageError:l});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gh(e,t,n,r,i){return yh.apply(this,arguments)}function yh(){return(yh=H(regeneratorRuntime.mark((function e(t,n,r,i,o){var a,u,s,l,c,f,d,p,m,h,v,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r.ref,o&&o.label&&(u=o.label),!(n.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=t&&t.getImage&&ch(u))){e.next=21;break}return e.prev=3,e.next=6,t.getImage(u);case 6:return s=e.sent,l="data:image/png;base64, ".concat(s),e.next=10,mh(l,i);case 10:c=e.sent,f=c.height,d=c.width,p=c.imageError,a={src:l,size:i,height:f,width:d,imageError:p},e.next=19;break;case 17:e.prev=17,e.t0=e.catch(3);case 19:e.next=28;break;case 21:return e.next=23,mh(u,i);case 23:m=e.sent,h=m.height,v=m.width,g=m.imageError,a={src:u,size:i,height:h,width:v,imageError:g};case 28:return e.abrupt("return",a);case 29:case"end":return e.stop()}}),e,null,[[3,17]])})))).apply(this,arguments)}function bh(e,t,n,r){return xh.apply(this,arguments)}function xh(){return(xh=H(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,u,s,l,c,f,d,p,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.label,u=n.qFallbackTitle,!ch(s="qmem://".concat(u,"/").concat(a))){e.next=21;break}return e.prev=4,e.next=7,t.getImage(s);case 7:if(!(l=e.sent)){e.next=17;break}return c="data:image/png;base64, ".concat(l),e.next=12,mh(c,r);case 12:f=e.sent,d=f.height,p=f.width,m=f.imageError,o={src:c,size:r,height:d,width:p,imageError:m};case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(4);case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})))).apply(this,arguments)}function qh(e,t,n,r){return Mh.apply(this,arguments)}function Mh(){return(Mh=H(regeneratorRuntime.mark((function e(t,n,r,i){var o,a,u,s,l,c,f,d,p,m,h,v,g,y,b,x,q,M;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f=n.app,d=n.flags,p=null===(o=t.layout)||void 0===o||null===(a=o.tooltip)||void 0===a?void 0:a.imageComponents){e.next=4;break}return e.abrupt("return",[]);case 4:m=Q(p,1),h=m[0],v=h.size||"small",g=h.type||"media",y=-1,b=0;case 9:if(!(b<r.length)){e.next=16;break}if(r[b].cId!==h.cId){e.next=13;break}return y=b,e.abrupt("break",16);case 13:b++,e.next=9;break;case 16:if(x=(null===(u=i.data)||void 0===u||null===(s=u.customTooltipAttrExps)||void 0===s?void 0:s.value)||[],-1!==y&&x[y]&&(q=x[y]),"media"!==g||null===(l=h.ref)||void 0===l||null===(c=l.qStaticContentUrl)||void 0===c||!c.qUrl){e.next=20;break}return e.abrupt("return",hh(h,v,f));case 20:if("url"!==g){e.next=22;break}return e.abrupt("return",gh(f,d,h,v,q));case 22:if(!(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===g&&q&&q.label)){e.next=25;break}return M=r[y],e.abrupt("return",bh(f,M,v,q));case 25:return e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Sh=function(e){return H(regeneratorRuntime.mark((function t(){var n,r,i,o,a,u,s,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,u=[],s=0;s<a.length;s++)u.push(qh(n,o,i,a[s]));return t.next=6,Promise.all(u);case 6:for(l=t.sent,c=0;c<a.length;c++)a[c].data.customTooltipImages=[l[c]];return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t)})))()},Dh=function(e){var t,n,r=null===(t=e.customTooltipModel.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0},Ch=function(e){return H(regeneratorRuntime.mark((function t(){var n,r,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.customTooltipModel,r=e.nodes,i=e.attrExps,o=e.opts,a=r,t.next=4,Sh({customTooltipModel:n,nodes:r,attrExps:i,opts:o});case 4:return a=t.sent,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()},wh=function(e){var t=e.customTooltipModel;return Dh({customTooltipModel:t})};var Oh=function(e,t){var n,r,i,o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,u=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,s=t;return{qInfo:{qType:lh.CHART.CHART_PARENT_TYPE,qId:lh.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:u,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:s}},Th=function(e){var t,n,r,i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:lh.CHART.CHART_CHILD_TYPE},qExtendsId:i}};function Ah(e){return Eh.apply(this,arguments)}function Eh(){return(Eh=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,u,s,l,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.properties,o=t.customTooltipModel,null===(n=(a=o).miniChartToken.sessionObj)||void 0===n||!n.id){e.next=5;break}return e.next=5,r.destroySessionObject(a.miniChartToken.sessionObj.id);case 5:return u=lh.CHART.STATE,s=Oh(i,u),e.next=9,r.createSessionObject(s);case 9:if(l=e.sent,c=Th(i),l.id===lh.CHART.CHART_OBJECT_ID){e.next=14;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 14:return a.miniChartToken.sessionObj=l,e.next=17,l.createChild(c);case 17:if(f=e.sent,a.miniChartToken.sessionObj&&a.miniChartToken.sessionObj.id===l.id){e.next=21;break}return r.destroySessionObject(l.id),e.abrupt("return",void 0);case 21:return a.miniChartToken.model=f,e.abrupt("return",f);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lh(e){return kh.apply(this,arguments)}function kh(){return(kh=H(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.app,r=t.customTooltipModel,i=r,o=lh.CHART.STATE,e.next=5,n.removeSessionAlternateState(o);case 5:i.miniChartToken.alternateState=void 0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nh(e){return Ih.apply(this,arguments)}function Ih(){return(Ih=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.properties,i=t.customTooltipModel,o=i,a=lh.CHART.STATE,u=r.qStateName,o.miniChartToken.alternateState){e.next=9;break}return o.miniChartToken.alternateState=a,e.next=8,n.addSessionAlternateState(a,u);case 8:o.miniChartToken.alternateState=a;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var jh,Ph,Rh={createContainer:function(e){var t,n,r=e.ctx,i=e.layout;if(!((null===(t=i.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r,i,o,a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",u=lh.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:u,height:u,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:lh.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":u,width:"100%"}},{}]}(r,i)},show:(Ph=H(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,u,s,l,c,f,d,p,m,h,v,g,y,b,x,q,M,S,D,C,w,O,T;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.app,a=t.properties,u=t.selectedNodes,s=t.dimIndex,l=t.customTooltipModel,c=t.rtl,f=l,d=null==a||null===(n=a.tooltip)||void 0===n||null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId,null!=f&&f.embed&&o.removeSessionAlternateState&&o.addSessionAlternateState&&d&&!(a.qHyperCubeDef.qDimensions.length<=0)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,Rh.hide({app:o,customTooltipModel:l});case 7:return e.prev=7,e.next=10,Nh({app:o,properties:a,customTooltipModel:l});case 10:return e.next=12,Ah({app:o,properties:a,customTooltipModel:l});case 12:if(p=e.sent,!(f.miniChartToken.alternateState&&f.miniChartToken.sessionObj&&p)){e.next=24;break}return y=u.length>0&&void 0!==(null===(m=u[0].data)||void 0===m?void 0:m.value)?[null===(h=u[0].data)||void 0===h?void 0:h.value]:[],b=void 0!==s?s:a.qHyperCubeDef.qDimensions.length-1,2===a.qHyperCubeDef.qDimensions.length&&void 0===s&&u.length>0&&null!=(M=null!==(x=u[0].data.selectionOuterDimension)&&void 0!==x?x:u[0].data.selectionDimension)&&null!==(q=M.source)&&void 0!==q&&q.field&&(D=null==M||null===(S=M.source)||void 0===S?void 0:S.field.split("/"),C=D[D.length-1],(w=void 0!==M.value?[M.value]:[]).length>0&&void 0!==C&&f.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(C),w,!1)),y.length>0&&f.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",b,y,!1),O=document.getElementById(lh.CHART.CONTAINER_ID),T={direction:c?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1},e.next=23,l.embed.render({element:O,model:f.miniChartToken.model,options:T,id:null===(v=f.miniChartToken.model)||void 0===v?void 0:v.id,type:null===(g=f.miniChartToken.model)||void 0===g?void 0:g.genericType});case 23:f.miniChartToken.vis=e.sent;case 24:e.next=30;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,Rh.hide({app:o,customTooltipModel:l});case 30:case"end":return e.stop()}}),e,null,[[7,26]])}))),function(e){return Ph.apply(this,arguments)}),hide:(jh=H(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.customTooltipModel,null!=(i=r)&&i.embed){e.next=4;break}return e.abrupt("return");case 4:return Rh.destroyVisualization({customTooltipModel:r}),e.next=7,n.destroySessionObject(lh.CHART.CHART_OBJECT_ID);case 7:return i.miniChartToken.sessionObj=void 0,e.next=10,Lh({app:n,customTooltipModel:r});case 10:case"end":return e.stop()}}),e)}))),function(e){return jh.apply(this,arguments)}),destroyVisualization:function(e){var t,n,r=e.customTooltipModel;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Fh(e,t){var n=t,r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[lh.CUSTOM.QUARANTINE]=[],e.forEach((function(e){r.quarantine[lh.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}function zh(e){var t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Hh(){var e=lh.CUSTOM,t=e.EXPRESSION,n=e.TITLE,r=e.DESCRIPTION,i=e.IMAGES,o={};return o[t]=!0,o[n]=!0,o[r]=!0,o[i]=!0,o}function Vh(e){var t=Hh();return e.filter((function(e){return t[e.id]}))}var Bh={getNodes:function(e,t){var n=function(e,t){var n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);var i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes:function(e,t){var n,r=[],i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((function(t){var o,a,u,s,l=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!l||null!==(u=t.data)&&void 0!==u&&u.customTooltipAttrExps||i[t.type]){if(null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps&&!t.data.customTooltipImages){var c=t;c.data.customTooltipImages=[],r.push(c)}}else{n||(n=[],Object.keys(i).forEach((function(t){n=n.concat(e.findShapes(t).filter((function(e){return e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]})))})));var f=n.filter((function(e){var t,n,r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===l.value&&r.label===l.label}));f.length>0&&(r=r.concat(f[0]))}})),r},displayTooltip:function(e,t,n){var r=n.nodes,i=n.opts,o=void 0===i?{}:i,a=n.customTooltipModel,u=n.extractedNodes,s=void 0===u?[]:u,l=n.hide;if(a&&!l){var c=a.layout,f=a.chart,d=Bh.getAttrExprData(c).attrExps;s.length||r.length?Ch({customTooltipModel:a,nodes:Bh.getDataNodes(f,s.length>0?s:r),attrExps:d,opts:o}).then((function(){t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var p,m;null!==(p=o.flags)&&void 0!==p&&p.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=a&&null!==(m=a.miniChartToken)&&void 0!==m&&m.alternateState&&Rh.hide({app:o.app,customTooltipModel:a}),t.emit("hide")}},checkIfPromisesExist:function(e){var t=e.customTooltipModel;return wh({customTooltipModel:t})},getAttrExps:function(e,t){var n,r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData:function(e){var t,n=[],r="",i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,u,s=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(u=a[s])||void 0===u?void 0:u.qAttrExprInfo)||[],r="qDimensionInfo/".concat(s,"/qAttrExprInfo")}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[lh.CUSTOM.QUARANTINE];if(!i){var o=r.qAttributeExpressions||[],a=Vh(o);Fh(a,e)}},unquarantineCustomTooltipAttrs:function(e){var t,n,r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[lh.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[lh.CUSTOM.QUARANTINE]},setAttrsFromQuarantine:function(e,t){var n=zh(e);if(n){var r=void 0!==t?t:n.length-1;if(n[r]){var i=this.getAttrExps(e,n[r]);if(0===Vh(i).length){var o,a,u=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],s=[].concat(ee(i),ee(u)),l=e;l.qHyperCubeDef?l.qHyperCubeDef.qDimensions[r].qAttributeExpressions=s:l.qHyperCube.qDimensionInfo[r].qAttrExprInfo=s}}}},moveCustomTooltipAttrs:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],i=zh(e)||[],o=[].concat(ee(i),[t]);o.forEach((function(e){var t=Vh(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));var a=Hh(),u=i.map((function(e){var t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((function(e){return!a[e.id]})),t})),s=void 0!==n?n:u.length-1;u.length>0&&(u[s].qAttributeExpressions=u[s].qAttributeExpressions.concat(r));var l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=u:l.qHyperCube.qDimensionInfo=u},addCallbackCustomTooltip:function(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip:function(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:function(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50};function _h(e,t,n,r){var i,o,a,u=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],s=[],l=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return l?(u.forEach((function(e,t){var i=l.qValues&&l.qValues[t]?l.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){var n;switch(e.id){case lh.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case lh.CUSTOM.TITLE:case lh.CUSTOM.DESCRIPTION:case lh.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);s.push({source:{key:"qHyperCube",field:"".concat(n,"/").concat(r,"/qAttrExprInfo/").concat(t)},label:o,value:"value"})})),s):s}var Uh=function(e,t){var n=t.dimensionCount;if(n&&!(n<1)){var r=n-1,i="qDimensionInfo";return{field:"".concat(i,"/").concat(r),value:function(t){return _h(t,e,i,r)}}}};var Wh=function(e,t,n){var r,i,o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];return Number.isNaN(a)?o:function(e,t,n,r){var i,o=(U(i={},lh.CUSTOM.TITLE,!0),U(i,lh.CUSTOM.DESCRIPTION,!0),i),a=Bh.getAttrExprData(e),u=a.attrExps,s=a.fieldPath;return 0===t.length||0===u.length||""===s||u.forEach((function(e,i){var a=t[i];if(e.id===lh.CUSTOM.EXPRESSION&&a){var u=e.qFallbackTitle,l="NaN"===a.value||e.isCustomFormatted?a.value:n("qHyperCube").field("".concat(s,"/").concat(i)).formatter()(a.value);r.customTooltipAttrExpsArr.push({label:u,value:l})}else if(o[e.id]&&a){var c="-"!==a.value&&"NaN"!==a.value?a.value:a.label;c&&"undefined"!==c&&r.customTooltipInfoAttrExpsArr.push(R(R({},e.id===lh.CUSTOM.TITLE&&{title:c}),{},{value:c,id:e.id}))}})),r}(n,a.map((function(t){return _e.getMeasure(e,t)})),e,o)};function Kh(e){return function(e,t,n){var r=[];return e.forEach((function(e){r.push(Wh(n,e,t))})),r}(e.nodes,e.layout,e.dataset).reduce((function(e,t){return{customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Gh(e){var t=lh.CUSTOM.EXPRESSION,n=e.qDef,r=n.qNumFormat,i=n.qLabel,o=n.qLabelExpression,a=n.cId;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:r,qLabel:i,qLabelExpression:o,cId:a}:{qExpression:e.qDef.qDef,id:t,qNumFormat:r,qLabel:i,qLabelExpression:o,cId:a}}function Yh(e){var t,n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Xh={attrExpr:{migrateProperties:function(e){var t,n,r,i,o=de(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],u=Yh(o);return function(e,t){var n,r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(u=function(e,t){return t.concat(e.map((function(e){return Gh(e)})))}(a,u),o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches:function(e){var t,n,r,i,o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){var r=e.length,i=[];return t.forEach((function(e){var t=Gh(e),o=JSON.stringify(t);i.push({qPath:"/qHyperCubeDef/qDimensions/".concat(n,"/qAttributeExpressions/").concat(r),qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(Yh(e),o,a)},checkForBackwardCompatibility:function(e,t){return(e.qMeasureInfo||[]).length>0&&t.length>0},updateProperties:function(e,t){var n=this;return new Promise((function(r){var i,o,a,u,s,l=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],c=(null===(o=t.tooltip)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.qHyperCube)||{},f=null===(u=t.qMeta)||void 0===u||null===(s=u.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&n.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((function(t){if(f){var i=n.migrateProperties(t);e.setProperties(i).then((function(){e.app.clearUndoBuffer(),r(!0)}))}else{var o=n.getPatches(t);e.applyPatches(o,!0).then((function(){e.app.clearUndoBuffer(),r(!0)}))}})),r(!1)}))}}},Jh=function(e){if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){var t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&Ce(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},$h=function(e,t){t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Ce(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&Ce(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},Zh=function(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}},Qh=function(e,t){var n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){var i=n[0];return i.qLibraryId?t.getDimension(i.qLibraryId).then((function(e){return e.getLayout()})).then((function(t){if(t&&t.qDimInfos&&t.qDimInfos[0]){var n=t.qDimInfos[0].qCardinal;$h(e,n)}return i})):t.getField(i.qDef.qFieldDefs[0]).then((function(t){return t.getCardinal().then((function(t){return $h(e,t),i}))}),(function(){return i}))}return Jh(e),Promise.resolve()};function ev(e){var t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,r=e.color.mode;t.length>1&&e.color?dc(e,"color.persistent",!0):"byDimension"===r&&n.length>1?dc(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?dc(e,"color.mode","primary"):0===t.length&&n.length>0&&(dc(e,"color.byMeasureDef",void 0),dc(e,"color.byDimDef",void 0),1===n.length&&dc(e,"color.mode","primary"))}var tv=function(e,t,n){ev(t),It(e),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Bh.addCallbackCustomTooltip(t)},nv=function(e){ev(e)};function rv(e){var t=e.translator,n=e.flags;return{dimensions:{min:0,max:function(e){return e>1?1:2},description:function(e,n,r){var i,o=e.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>o-1?i="Visualizations.Descriptions.Color":o>1&&0===n?"stacked"===e.barGrouping.grouping?i="Visualizations.Descriptions.Stack":(i="Visualizations.Descriptions.Group",e.qHyperCubeDef.qColumnOrder=[0,1,2]):i="Visualizations.Descriptions.Bars",t.get(i)},add:function(e,t,r){return t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=r&&r.app?Qh(t,r.app).then((function(){return tv(e,t,n),e})):(Zh(t),tv(e,t,n),e)},move:function(e,t){t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),Jh(t),ev(t),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Bh.moveCallbackCustomTooltip(t,e)},remove:function(e,t){var r=t.qHyperCubeDef.qDimensions;ev(t),1===r.length&&(t.qHyperCubeDef.qMode="S"),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Bh.removeCallbackCustomTooltip(t,e)},replace:function(e,t,r,i){n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Bh.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:function(e){return e>1?1:15},description:function(){return t.get("Visualizations.Descriptions.LengthBars")},add:function(e,t,n){return null!=n&&n.app?Qh(t,n.app).then((function(){return e.qSortBy.qSortByNumeric=-1,nv(t),e})):(Zh(t),nv(t),e)},move:function(e,t){Jh(t),ev(t)},remove:function(e,t){var n=t.qHyperCubeDef.qDimensions;ev(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function iv(e){return{properties:{version:"1.12.13",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!1,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[R({path:"/qHyperCubeDef"},rv(e))]}}}var ov={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function av(e){var t=e.env,n=t.flags,r=h();!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(ov).forEach((function(t){e.add(ov[t])}))}}(t.translator);var i=v(),o=g(),a=Q(y(),2),u=a[0],s=a[1],l=b(),c=x().localeInfo;return q((function(){s({translator:r,theme:o,embed:i,deviceType:l,localeInfo:c,flags:n})}),[c,r.language(),o.name(),l]),u}function uv(){return{viewCache:Q(y((function(){return pc()})),1)[0],viewState:Q(y((function(){return function(e){var t=Cs({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0})})),1)[0]}}var sv=function(){},lv=2,cv=20,fv=200;var dv={contains:function(e,t){if(!e)return!1;var n=e.qArea;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qMatrix.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length},n},slicer:function(e,t){for(var n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),u=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),s=Math.max(0,o-e.qArea.qLeft),l=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:u-a,qWidth:l-s,qTop:i,qLeft:o},qMatrix:[]},f=a;f<u;f++)c.qMatrix.push(e.qMatrix[f].slice(s,l));return c},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{width:0,height:0}:t;return{release:function(e,t){var r=t.qTop-10<=e.qTop,i=t.qLeft+t.qWidth+10>=e.qLeft+e.qWidth,o=t.qTop+t.qHeight+10>=e.qTop+e.qHeight,a=t.qLeft-10<=e.qLeft;return r&&e.qTop>0||i&&e.qLeft+e.qWidth<n.width||o&&e.qTop+e.qHeight<n.height||a&&e.qLeft>0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeData",args:[t,[e]]}}}};var pv={contains:function(e,t){if(!e)return!1;var n=e.qArea;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function(e){var t=e.layoutService,n=function(e){e.qArea.qHeight=e.qData[0].qSubNodes.length,e.qArea.qWidth=t.meta.size.x};return n.should=function(e){return 0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length},n},slicer:function(e,t){for(var n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),u=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),s={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[R(R({},e.qData[0]),{},{qUp:r,qDown:u,qSubNodes:[]})]},l=o;l<a;l++)s.qData[0].qSubNodes.push(e.qData[0].qSubNodes[l]);return s},cacheWarden:function(e){var t=e.bounds,n=void 0===t?{height:0}:t;return{release:function(e,t){var r=t.qTop-10<=e.qTop,i=t.qTop+t.qHeight+10>=e.qTop+e.qHeight;return r&&e.qTop>0||i&&e.qTop+e.qHeight<n.height}}},request:function(e){var t=e.layoutService,n=e.definitionPath,r=t.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return function(e){var t={method:"getHyperCubeStackData",args:[n,[e]]};return"auto"===r&&t.args.push(600),t}}};var mv={contains:function(){return!1},patcher:function(){var e=function(e){return e};return e.should=function(){return!1},e},slicer:function(e){return e},cacheWarden:function(){return{release:function(){return!0}}},request:function(e){var t=e.definitionPath;return function(e){return{method:"getHyperCubeTreeData",args:[t,[e]]}}}};var hv="pages";function vv(e){var t,n=e.chart,r=e.actions,i=e.componentKey,o=e.dockService,a=e.rtl,u=e.scroller;return{type:"Pan",key:"discrete:pan",options:{event:"discretePan",pointers:1,threshold:10,enable:function(e,t){return"discretePan"===this.started||!t||!!r.scroll.enabled()&&n.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key===i}))}},events:(t={},U(t,"".concat("discretePan","start"),(function(e){e.preventDefault(),this.started="discretePan";var t="horizontal"===o.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10})),U(t,"".concat("discretePan","move"),(function(e){e.preventDefault();var t="horizontal"===o.meta.major.orientation,n=t?e.deltaX:e.deltaY,r=t&&a?-1:1,i=(n-this.previousTotalDelta)*r;this.previousTotalDelta=n,u.scroll(i)})),U(t,"".concat("discretePan","end"),(function(e){e.preventDefault(),this.started=!1})),U(t,"".concat("discretePan","cancel"),(function(e){e.preventDefault(),this.started=!1})),t)}}function gv(e){var t=e.chart,n=e.componentKey,r=e.actions,i=e.scroller;return function(e){if(r.scroll.enabled()&&Q(t.componentsFromPoint({x:e.clientX,y:e.clientY}).filter((function(e){return e.key===n})),1)[0]){e.preventDefault();var o=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,a=100*Math.sign(-o);i.scroll(a)}}}function yv(e){var t=e.layoutService,n=void 0===e.areaBuffer?function(e){var t=e.layoutService,n=Math.floor(1e4/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height,i=Math.min(n,Math.max(fv,r));return{width:t,height:Math.max(cv,Math.min(r*lv,i))}}}({layoutService:t}):function(e){var t=e.layoutService,n=Math.floor(1e4/(t.meta.dimensionCount+t.meta.measureCount));return function(e){var t=e.width,r=e.height;return{width:t,height:Math.min(n,r)}}}({layoutService:t}),r={width:t.meta.size.x,height:t.meta.size.y};return function(e){var t=n({width:e.qWidth,height:e.qHeight}),i=t.width,o=t.height,a=o?Math.ceil((o-e.qHeight)/2):0,u=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:o?Math.min(o,r.height):e.qHeight,qWidth:i?Math.min(i,r.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-a,r.height-o)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-u,r.width-i)):e.qLeft}}}function bv(e){var t,n,r=function r(i){var o=(t=i).request,a=o.method,u=o.args;e[a].apply(e,ee(u)).then((function(e){if(t.canceled||n)return t.reject("REJECTED"),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=function(e){return new Promise((function(i,o){var a={request:e,resolve:i,reject:o,canceled:!1,cancel:function(){a.canceled=!0}};t?function(e){n&&n.reject("REJECTED"),n=e}(a):r(a)}))};return i.isProcessing=function(){return!!t},i.hasQueued=function(){return!!n},i.cancel=function(){i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject("REJECTED"),n=null)},i}var xv={command:{update:function(){}}};function qv(e){var t=e.dataStore,n=e.composition,r=e.enigmaModel,i=e.layoutService,o=e.trendLineModel,a=void 0===o?xv:o,u=e.definitionPath,s=e.areaBuffer,l=e.processDataPage,c=n.slicer,f=n.cacheWarden,d=n.request,p=function(e){var t=e.dataStore,n=e.slice,r=e.warden,i=e.expand,o=e.request,a=e.process,u=e.connectionless,s=e.processDataPage;return function(e){var l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).onProcessing;if(t.contains(e)){var c=t.getCurrent();if(u)return Promise.resolve(n(c,e));var f=r.release(c.qArea,e),d=a.isProcessing();if(!f&&d&&a.cancel(),!f||d)return Promise.resolve(n(c,e))}if(u)return Promise.resolve(t.getCurrent());a.isProcessing()&&l&&l();var p=i(e);return a(o(p)).then((function(r){return s(r),t.add(r),n(r,e)}))}}({dataStore:t,slice:c,warden:f({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:yv({layoutService:i,areaBuffer:s}),request:d({layoutService:i,definitionPath:u}),process:bv(r),connectionless:i.meta.isSnapshot,processDataPage:l}),m=vc((function(e,t){var n=t.onProcessing,r=t.onData;p(e,{onProcessing:n}).then((function(e){return r(e)})).catch((function(e){if("REJECTED"!==e)throw e}))}),50);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onProcessing,r=void 0===n?sv:n,o=t.onDataPage,u=void 0===o?sv:o;m(e,{onProcessing:r,onData:function(e){i.setDataPages(e?[e]:[]),a.command.update(),u(e)}})}}var Mv={inTotal:function(e){return e.layoutService.meta.size.x},area:function(e){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.layoutService.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],u=o/i;return[u,r.inView>=r.inTotal?u+1:u+a.qArea.qWidth/r.inView]}};var Sv={inTotal:function(e){var t=e.layoutService;if(t.meta.isSnapshot&&!t.getLayoutValue("reducedHyperCube")){var n=Q(t.getDataPages(),1)[0];if(n)return n.qArea.qHeight}return t.meta.size.y},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=void 0===i?4:i,a=Math.max(0,Math.floor(n)-o/2);return{qTop:a,qHeight:Math.min(t.meta.size.y-a,Math.max(0,Math.ceil(r+o))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=n.pixel,a=t.getDataPages()[0],u=i/r.inView,s=(o+a.qArea.qTop*u)/i;return[s,r.inView>=r.inTotal?s+1:s+a.qArea.qHeight/r.inView]}};function Dv(e){var t=e.meta,n=t.groupSize,r=t.measureCount;return null!=n?n:r}function Cv(e,t){for(var n=[],r=0;r<e.length;r++){var i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function wv(e){return Cv(e.qMatrix,(function(e){return e[0].qElemNumber}))-1}var Ov={inTotal:function(e){var t=e.layoutService,n=Dv(t);return t.meta.size.y*n*(1+1/n)-1},area:function(e){var t=e.layoutService,n=e.itemOffset,r=e.inView,i=e.areaBuffer,o=Dv(t),a=void 0===i?o:i,u=n/(o+1),s=Math.max(0,Math.floor((n-u-a/2)/o));return{qTop:s,qHeight:Math.min(t.meta.size.y-s,Math.max(0,Math.ceil((r+a)/o+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function(e){var t=e.layoutService,n=e.offsets,r=e.items,i=e.viewSize,o=Dv(t),a=t.getDataPages()[0],u=i/r.inView,s=n.pixel,l=wv(a),c=a.qArea.qHeight*o+l,f=(s+(a.qArea.qTop*o+a.qArea.qTop)*u)/i;return[f,r.inView>=r.inTotal?f+1:f+c/r.inView]}};var Tv=function(e,t){return t/(e.meta.size.y/e.meta.size.dimensions[0]+1)};function Av(e){return{itemOffset:function(t,n){if(0!==t.qArea.qTop)return Tv(e,n);var r=function(e,t){for(var n={successful:!0,count:0},r=Math.abs(Math.floor(t)),i=[],o=0;o<=r;o++){if(!e[o])return n.successful=!1,n;var a=e[o][0].qElemNumber;-1===i.indexOf(a)&&(i.push(a),r--)}return n.count=i.length-1,n}(t.qMatrix,n);return r.successful?r.count:Tv(e,n)},area:function(t,n,r){return 0!==t.qArea.qTop?Tv(e,n):Cv(t.qMatrix.slice(0,r.qTop+1),(function(e){return e[0].qElemNumber}))-1}}}var Ev={inTotal:function(e){var t=e.layoutService;return t.meta.size.y+t.meta.size.dimensions[0]-1},area:function(e){var t=e.getDataPages,n=e.layoutService,r=e.itemOffset,i=e.inView,o=Av(n).itemOffset(t(),r),a=Math.max(0,Math.floor(r-o));return{qTop:a,qHeight:Math.min(n.meta.size.y-a,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:n.meta.size.x}},scaleRange:function(e){var t=e.getDataPages,n=e.layoutService,r=e.offsets,i=e.items,o=e.viewSize,a=e.upperBound,u=n.getDataPages()[0],s=o/i.inView,l=r.item,c=r.pixel,f=Av(n).area(t(),l,u.qArea),d=wv(u),p=u.qArea.qHeight+d,m=c===a?(i.inView-p)*s/o:(c+(u.qArea.qTop+f)*s)/o;return[m,i.inView>=i.inTotal?m+1:m+p/i.inView]}};function Lv(e){var t=e.rect,n=e.dockService,r=e.itemWidths,i=e.dimensionAxis,o=e.inTotal,a=e.isMajorVisible,u=e.isMajorLabelless,s=e.maxDataRows,l=r[n.meta.chart.mode],c=l.DEFAULT,f=l.SQUEEZE,d=l.LABELLESS,p=i.axisDisplayMode,m=void 0===p?"auto":p,h=i.maxVisibleItems,v=void 0===h?10:h,g="horizontal"===n.meta.major.orientation?t.width:t.height,y=g/o>=f;switch(m){case"max":return Math.min(o,s);case"custom":return Math.min(v,s);case"auto":default:return!a||u?g/d:y?o:g/c}}function kv(e){var t=e.chart,n=e.getRect,r=e.getDataPages,i=e.layoutService,o=e.dockService,a=e.getItemWidths,u=e.axisKey,s=e.areaBuffer,l=e.rtl,c=function(e){var t=e.layoutService.meta,n=t.isDimensionless,r=t.isGrouped,i=t.isGroupedByMeasure;return n?Mv:r?i?Ov:Ev:Sv}({layoutService:i}),f=c.inTotal,d=c.area,p=c.scaleRange,m=function(){return"horizontal"===o.meta.major.orientation?n().width:n().height},h=function(e){return e?m()/e:0},v=function(e,t){return-(e-t)*h(t)};return{getItems:function(){var e=i.getLayoutValue("dimensionAxis"),r=f({layoutService:i}),s=t.component(u),l=!u||!s||s.isVisible();return{inTotal:r,inView:Lv({rect:n(),dockService:o,itemWidths:a(),dimensionAxis:e,inTotal:r,isMajorVisible:l,isMajorLabelless:"none"===e.show||"title"===e.show,maxDataRows:Math.floor(1e4/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize:function(e){var t=e.items.inView;return h(t)},getOffsets:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView,o=Math.min(0,Math.max(t,v(r,i)));return{pixel:o,item:i?Math.abs(i*o/m()):0}},getUpperBound:function(e){var t=e.items,n=t.inTotal,r=t.inView;return v(n,r)},getViewRange:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return function(e){var t=e.viewSize,n=e.inTotal,r=e.inView,i=e.pixelOffset,o=t/r*n,a=Math.abs(i)/o;return[a,a+t/o]}({viewSize:m(),inTotal:r,inView:i,pixelOffset:t})},getArea:function(e){var t=e.itemOffset,n=e.items;return d({getDataPages:r,layoutService:i,itemOffset:t,inView:n.inView,areaBuffer:s})},getScaleRange:function(e){var t=e.offsets,n=e.items,a=p({getDataPages:r,layoutService:i,offsets:t,items:n,viewSize:m(),upperBound:v(n.inTotal,n.inView)});return"horizontal"===o.meta.major.orientation&&l?function(e){return[1-e[1],1-e[0]]}(a):a},validate:{offset:function(e){var t=e.pixelOffset,n=e.items,r=n.inTotal,i=n.inView;return t<=0&&t>=v(r,i)}},convert:{itemToPixelOffset:function(e){var t=e.itemOffset,n=e.items.inView,r=t*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset:function(e){var t=e.relativeOffset,n=e.items,r=n.inTotal,i=n.inView;return-t*(h(i)*r)}}}}function Nv(e){var t=e.chart,n=e.componentKey,r=e.state,i=e.dataStore,o=e.pageData,a=e.layoutService,u=e.dockService,s=e.itemWidths,l=e.getRect,c=e.axisKey,f=e.areaBuffer,d=e.viewState,p=e.rtl;r.set("rect",{width:0,height:0}),r.set("itemWidths",{}),r.set("itemSize",0),r.set("items",{}),r.set("offsets",{}),r.set("finished",0),r.set("scaleRange",[0,1]);var m=kv({chart:t,getRect:function(){return r.get("rect")},getDataPages:i.getCurrent,layoutService:a,dockService:u,getItemWidths:function(){return r.get("itemWidths")},axisKey:c,areaBuffer:f,rtl:p}),h=function(){var e=m.getItems();return r.set("items",e),e},v=function(e){var t=e.pixelOffset,n=e.items,i=m.getOffsets({pixelOffset:t,items:n});return r.set("offsets",i),i},g=function(e){var t=Date.now(),n=h(),i=v({pixelOffset:e,items:n}),u=m.getArea({itemOffset:i.item,items:n});if(function(e){var t=Q(a.getDataPages(),1)[0].qArea;return!!t&&Object.keys(e).every((function(n){return e[n]===t[n]}))}(u))(m.validate.offset({pixelOffset:e,items:n})||d.get("scrollOffset")!==i.item)&&(r.set("finished",t),r.set("scaleRange",m.getScaleRange({offsets:i,items:n})),d.preventSet("viewRange",m.getViewRange({pixelOffset:i.pixel,items:n})),d.set("scrollOffset",i.item));else{d.preventSet("viewRange",m.getViewRange({pixelOffset:i.pixel,items:n}));var s=function(){r.get("finished")>t||(r.set("finished",t),r.set("scaleRange",m.getScaleRange({offsets:i,items:n})),d.set("scrollOffset",i.item))};o(u,{onProcessing:s,onDataPage:s})}};return{enabled:function(){var e=r.get("items");return e.inTotal>e.inView},itemSize:function(){return r.get("itemSize")},scaleRange:function(){return r.get("scaleRange")},initialize:function(){var e=t.component(n);if(!e)return Promise.resolve();r.set("rect","function"==typeof l?l():e.rect),r.set("itemWidths","function"==typeof s?s():s);var i=h();r.set("itemSize",m.getItemSize({items:i}));var u=void 0===d.get("scrollOffset")?function(e){var t=e.items;return 1===a.getLayoutValue("scrollStartPos")?m.getUpperBound({items:t}):0}({items:i}):m.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:i}),c=v({pixelOffset:u,items:i});d.preventSet("viewRange",m.getViewRange({pixelOffset:c.pixel,items:i}));var f=m.getArea({itemOffset:c.item,items:i});return new Promise((function(e){o(f,{onDataPage:function(){r.set("scaleRange",m.getScaleRange({offsets:c,items:i})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll:function(e){var t=r.get("offsets").pixel+e;g(t)},scrollToRelative:function(e){var t=r.get("items"),n=m.convert.relativeToPixelOffset({relativeOffset:e,items:t});g(n)}}}function Iv(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.enigmaModel,o=e.layoutService,a=e.dockService,u=e.trendLineModel,s=e.itemWidths,l=e.viewState,c=e.rtl,f=e.options,d=(f=void 0===f?{}:f).definitionPath,p=void 0===d?"/qHyperCubeDef":d,m=f.getRect,h=void 0===m?void 0:m,v=f.axisKey,g=void 0===v?void 0:v,y=f.areaBuffer,b=void 0===y?void 0:y,x=f.processDataPage,q=void 0===x?function(){}:x,M=pc(),S=function(e){switch(e.qMode){case"S":default:return dv;case"K":return pv;case"T":return mv}}({qMode:o.getHyperCubeValue("qMode")}),D=function(e){var t=e.state,n=e.contains;return t.set(hv,[]),{add:function(e){var n=t.get(hv);n.length=0,n.push(e)},getCurrent:function(){return t.get(hv)[0]},getAll:function(){return t.get(hv)},contains:function(e){return n(t.get(hv)[0],e)}}}({state:M,contains:S.contains});!function(e){var t=e.layoutService,n=e.dataStore,r=e.composition,i=t.getDataPages()[0];if(i){var o=r.patcher({layoutService:t});o.should(i)&&o(i),n.add(i)}}({layoutService:o,dataStore:D,composition:S});var C=function(e){var t=e.buffer;return void 0===t?void 0:2*Math.round(t/2)}({buffer:b}),w=qv({dataStore:D,composition:S,enigmaModel:i,layoutService:o,trendLineModel:u,definitionPath:p,areaBuffer:C,processDataPage:q}),O=Nv({chart:t,componentKey:r,state:M,dataStore:D,pageData:w,layoutService:o,dockService:a,itemWidths:s,getRect:h,axisKey:g,areaBuffer:C,viewState:l,rtl:c}),T=function(e){var t=e.layoutService,n=e.dataStore;return function(e){var r=fc(e,"".concat(t.refs.dataPages));r.length=0,r.push(n.getCurrent())}}({layoutService:o,dataStore:D});return{interactions:function(e){var t=e.chart,n=e.actions,r=e.componentKey,i=e.dockService,o=e.rtl,a=e.scroller;return{gestures:[vv({chart:t,actions:n,componentKey:r,dockService:i,rtl:o,scroller:a})],native:{type:"native",events:{wheel:gv({chart:t,actions:n,componentKey:r,scroller:a})}}}}({chart:t,actions:n,componentKey:r,dockService:a,rtl:c,scroller:O}),query:{getCanScroll:function(){return O.enabled()},getItemSize:function(){return O.itemSize()},getScaleRange:function(){return O.scaleRange()},getCurrentDataPage:function(){return D.getCurrent()}},command:{initialize:function(){return O.initialize()},scrollTo:function(e){return O.scrollToRelative(e)},setSnapshotData:function(e){return T(e)}}}}var jv="AVERAGE",Pv="LINEAR",Rv="POLYNOMIAL2",Fv="POLYNOMIAL3",zv="POLYNOMIAL4",Hv="EXPONENTIAL",Vv="LOG",Bv="POWER";function _v(e){var t=e.dimValue,n=e.value,r=e.qTrendLine,i=r.qType,o=r.qCoeff,a={x:t,y:o[2]*Math.pow(n,2)+o[1]*n+o[0]};switch(i){default:case Rv:return a;case Fv:return a.y+=o[3]*Math.pow(n,3),a;case zv:return a.y+=o[4]*Math.pow(n,4)+o[3]*Math.pow(n,3),a}}var Uv={average:function(e){return{x:e.dimValue,y:e.qTrendLine.qCoeff[0]}},linear:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]*n+r.qCoeff[0]}},polynomial2:_v,polynomial3:_v,polynomial4:_v,exponential:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.exp(r.qCoeff[0]+n*r.qCoeff[1])}},log:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]+r.qCoeff[0]*Math.log(n)}},power:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.pow(10,r.qCoeff[0]+r.qCoeff[1]*Math.log(n)*Math.LOG10E)}}};function Wv(e,t){for(var n=Uv[t.qType.toLowerCase()],r=Math.max(1,e/500),i=1/0,o=-1/0,a=0;a<e;a+=r){var u=n({dimValue:null,value:a+1,qTrendLine:t}).y;i=Math.min(u,i),o=Math.max(u,o)}return{min:i,max:o}}function Kv(e){return Uv[e.qType.toLowerCase()]}function Gv(e,t){return e.meta.isContinuous?function(e,t){return{generate:function(e,n,r){var i=[],o=Kv(e),a=t.get("zoom"),u=a.min,s=a.max,l=(s-u)/100;if(l>0){for(var c=function(t){var a=o({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,i.push(a)},f=u,d=u;d<=s;d+=l)c(d),f=d;f!==s&&c(s)}return i},calculate:function(e,t){return Kv(e)({dimValue:t,value:t,qTrendLine:e})},findMinMax:function(e,t){var n=this.generate(t).map((function(e){return e.y}));return{min:Math.min.apply(Math,ee(n)),max:Math.max.apply(Math,ee(n))}}}}(0,t):e.meta.mode.K?function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,u=o.qArea.qTop,s=Uv[t.qType.toLowerCase()],l=0;l<a.length;l++){var c=a[l],f=s({dimValue:c.qElemNo,value:l+u+1,qTrendLine:t});f.layerId=n,f.measureIndex=r,f.dimValue=c.qText,i.push(f)}return i},findMinMax:Wv}}(e):function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qMatrix,u=o.qArea.qTop,s=Uv[t.qType.toLowerCase()],l=0;l<a.length;l++){var c=a[l][0],f=l+u+1,d=s({dimValue:c.qElemNumber,value:f,qTrendLine:t});d.layerId=n,d.measureIndex=r,d.dimValue=c.qText,i.push(d)}return i},calculate:function(e,t,n){return(0,Uv[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e})},findMinMax:Wv}}(e)}var Yv={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},Xv={color:"#f93f17",index:9},Jv=Nt.isDark,$v={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},Zv=function(e){var t=e.layoutService,n=e.viewState,r=e.colorModel,i=e.chart,o=e.env,a=e.keys.colorScale,u=e.isEnabled,s=void 0===u?function(){return!1}:u,l=o.translator,c=[$v],f=[],d=[],p=Gv(t,n);return t.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach((function(e,t){Array.isArray(e.qTrendLines)&&(f.push.apply(f,ee(e.qTrendLines)),d.push.apply(d,ee(e.qTrendLines.map((function(){return t})))))})),{query:{hasTrendLines:function(){return!!f.length&&s()},getData:function(){return c},getStroke:mc((function(e){var t=(f[e]||{}).style,n=r.settings();if(t.autoColor){if("measure"===n.mode){var o=d[e],u=i.scale(a)(o);return Jv(u)?function(e){var t=Et(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(u):function(e){var t=Et(e);return t.l-=5,t.toString()}(u)}return r.resolveUIColor(Xv)}return t.paletteColor?r.resolveUIColor(t.paletteColor):"none"})),getLineDash:function(e){return(f[e]||{}).style.lineDash},getLabel:function(e){return(f[e]||{}).label},getType:function(e){var t=(f[e]||{}).qType;return l.get(Yv.TYPES[t])},getMinMax:function(){var e=1/0,n=-1/0;return f.forEach((function(r){var i=p.findMinMax(t.meta.size.y,r);e=Math.min(i.min,e),n=Math.max(i.max,n)})),{min:e,max:n}},getCalculatedValue:function(e,t,n){var r=f[e];return p.calculate(r,t,n)}},command:{update:function(){c.length=0,f.forEach((function(e,t){var n=p.generate(e,t,d[t]);c.push.apply(c,ee(n))}))}}}},Qv={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}},eg=function(e){var t=e.meta;return t.isContinuous?function(e){return(0,e.scale)(e.datum.value)}:t.isGroupedByMeasure?function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2}:function(e){var t=e.scale;return t(e.datum.value)+t.bandwidth()/2}},tg=function(e,t){var n=t.layoutService,r=t.trendLineModel,i=t.dockService;return r.query.hasTrendLines()?[function(e,t){var n=e.majorScale,r=e.minorScale,i=t.trendLineModel,o=t.layoutService,a=t.dockService,u=eg(o);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:Qv,settings:{connect:!0,orientation:a.meta.major.orientation,coordinates:{major:{scale:n,fn:u},minor:{scale:r},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:function(e){var t=e.datum;return i.query.getStroke(t.layer.value)},strokeDasharray:function(e){var t=e.datum;return i.query.getLineDash(t.layer.value)}}}}}}(e,{trendLineModel:r,layoutService:n,dockService:i}),function(e,t){var n=e.majorScale,r=e.minorScale,i=e.tooltipOverlay,o=void 0===i?"trend-lines-tooltip-overlay":i,a=t.layoutService,u=t.dockService,s=eg(a),l="horizontal"===u.meta.major.orientation,c={scale:n,fn:s},f={scale:r,ref:"minor"};return{key:o,type:"point",layout:{dock:"center"},data:Qv,settings:{x:l?c:f,y:l?f:c,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}}(e,{layoutService:n,dockService:i})]:[]};function ng(e,t){var n=t.query,r=n.getLabel,i=n.getType,o=n.getLineDash,a=n.getStroke;return function(t){var n=t.node,u=t.resources,s={type:"icon",style:{stroke:a(n.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":o(n.data.layer.value)}},l={content:[{content:r(n.data.layer.value),style:{"font-weight":"bold"}},{content:i(n.data.layer.value)}],style:{"min-width":"136px"}};return{title:n.data.dimValue.label,row:[s,l,{content:u.formatter(e.formatter)(n.data.minor.value)}]}}}function rg(e,t){var n=t.h,r=t.style;return e.map((function(e){var t={style:R(R({direction:"string"==typeof e.content?Be.detectTextDirection(e.content):void 0},r.cell||{}),e.style||{}),class:e.class};e.colspan&&(t.colspan=e.colspan);var i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((function(t){return e("span",{style:t.style,direction:Be.detectTextDirection(t.content)},t.content)}))):"icon"===t.type?function(e){var t=e("line",{x1:"0px",y1:"".concat(16,"px"),x2:"".concat(16,"px"),y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 ".concat(16," ").concat(16)},t)}(e):t.content}(n,e);return n("td",t,i)}))}function ig(e,t){return function(n){var r=n.h,i=n.data,o=n.style,a=i[0].title,u=i.filter((function(e){return e.title===a})),s=[function(e,t){var n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:Be.detectTextDirection(t)},t);return e("tr",{},n)}(r,a)];if(u.slice(0,2).forEach((function(e){s.push(r("tr",{},rg(e.row,{h:r,style:o})))})),i.length>2){var l=i.length-2;s.push.apply(s,ee(function(e,t,n,r){var i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=Be.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(r,e,t,l)))}return s}}function og(e,t){var n=t.trendLineModel,r=t.translator,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.query.hasTrendLines())return!1;var o=i.rtl,a=Fe({key:e.tooltip,rtl:o});return de(!0,a,{settings:{extract:ng(e,n),content:ig(r,o),placement:"pointer",direction:i.rtl?"rtl":"ltr"}})}function ag(e,t){var n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function ug(e,t){var n=t.chart,r=t.viewState,i=t.trendLineModel,o=t.layoutService,a=t.rtl,u=o.meta.isContinuous,s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=function(e){var t=ag(e,n);return n.shapesAt(t,s)};if(u){var c=i.query.getCalculatedValue;s={components:[{key:"trend-lines"}],propagation:"stop"},l=function(t,i){var o=ag(t,n),u=n.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(o),s);if(u.length){var l=function(e,t,n,r){var i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;var o=n.get("zoom"),a=o.min;return a+(o.max-a)*i}(o,i,r,a),f=n.scale(e.majorInnerScale),d=(null!=f&&f.formatter?f.formatter():n.formatter({data:{fields:["qDimensionInfo/0"]}}))(l);u.forEach((function(e){e.data.dimValue.value=l,e.data.dimValue.label=d,e.data.minor.value=c(e.data.layer.value,l).y}))}return u}}return function(t){var r=n.component(e.tooltip);if(r&&function(t){return n.componentsFromPoint({x:t.clientX,y:t.clientY}).some((function(t){return t.key===e.tooltipOverlay}))}(t)){var i=l(t,r);return i.length?(r.emit("show",t,{nodes:i}),!0):(r.emit("hide"),!1)}return!1}}var sg=function(e){return!fc(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis},lg=function(e){e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},cg=function(e){lg(e),e.qMultiDimMode="Sum",e.qXColIx=0};function fg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.translator,n=e.events,r=void 0===n?{onGlobalChange:function(){}}:n,i=e.allowStackedByDimension,o=void 0!==i&&i,a=function(e){var t=fc(e,"qHyperCubeDef.qMeasures",[]).reduce((function(e,t){return Array.isArray(t.qTrendLines)&&e.push.apply(e,ee(t.qTrendLines)),e}),[]),n=sg(e)?"Possible":"Never";t.forEach((function(e){e.qContinuousXAxis=n})),r.onGlobalChange(e,t)},u=function(e){var n=F(e.label);return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(Yv.TYPES[e.qType])};return{show:function(e,t,n){var r=n.layout;return!Ee.dimensionless(r)&&!Ee.groupedByDimension(r)&&(o||!Ee.stackedByDimension(r))},type:"array",ref:"qTrendLines",titleTranslation:Yv.HEADER,itemTitleRef:u,max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:Yv.ADD_BUTTON,add:cg,globalChange:a,items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:Yv.TYPE,options:[{value:jv,translation:Yv.TYPES.AVERAGE},{value:Pv,translation:Yv.TYPES.LINEAR},{value:Rv,translation:Yv.TYPES.POLYNOMIAL2},{value:Fv,translation:Yv.TYPES.POLYNOMIAL3},{value:zv,translation:Yv.TYPES.POLYNOMIAL4},{value:Hv,translation:Yv.TYPES.EXPONENTIAL},{value:Vv,translation:Yv.TYPES.LOG},{value:Bv,translation:Yv.TYPES.POWER}],defaultValue:jv},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:Xv,show:function(e){return!e.style.autoColor}},dashed:{ref:"style.dashed",translation:Yv.STYLE.DASHED,type:"boolean",defaultValue:!0,change:lg}}}}var dg={};function pg(){pg.init.call(this)}dg.isObject=function(e){return"object"===F(e)&&null!==e},dg.isNumber=function(e){return"number"==typeof e},dg.isUndefined=function(e){return void 0===e},dg.isFunction=function(e){return"function"==typeof e};var mg=pg;pg.EventEmitter=pg,pg.prototype._events=void 0,pg.prototype._maxListeners=void 0,pg.defaultMaxListeners=10,pg.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},pg.prototype.setMaxListeners=function(e){if(!dg.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},pg.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],dg.isUndefined(n))return!1;if(dg.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(dg.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},pg.prototype.addListener=function(e,t){var n;if(!dg.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,dg.isFunction(t.listener)?t.listener:t),this._events[e]?dg.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,dg.isObject(this._events[e])&&!this._events[e].warned)&&((n=dg.isUndefined(this._maxListeners)?pg.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,dg.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),dg.isFunction(console.trace)&&console.trace()));return this},pg.prototype.on=pg.prototype.addListener,pg.prototype.once=function(e,t){if(!dg.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},pg.prototype.removeListener=function(e,t){var n,r,i,o;if(!dg.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||dg.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(dg.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},pg.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],dg.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},pg.prototype.listeners=function(e){return this._events&&this._events[e]?dg.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},pg.listenerCount=function(e,t){return e._events&&e._events[t]?dg.isFunction(e._events[t])?1:e._events[t].length:0};var hg={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function vg(){var e=Q(y({}),1)[0],t=Q(y({}),1)[0],n=function(){var e,t,n,r=D(),i=!!r.qSelectionInfo.qInSelections,o=!(null===(e=r.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(n=t[0])||void 0===n||!n.qIsOneAndOnlyOne),a=Q(y(!1),2),u=a[0],s=a[1],l=Q(y(!1),2),c=l[0],f=l[1],d=Q(y({key:"lasso",enabled:function(){return!1},active:function(){return!1},action:function(){return!1}}),2),p=d[0],m=d[1],h=function(e){f("boolean"==typeof e?e:!c)};return C((function(){return m({key:"lasso",action:h,enabled:function(){return u},active:function(){return c}}),{key:"lasso",label:"Lasso",icon:hg,hidden:!u||!i||o,active:c,action:h}}),[i,o,c,u]),{get:function(){return p},setAllows:function(e){s(!!e)}}}(),r=Q(y(),2),i=r[0],o=r[1];return q((function(){var r={};r.scroll={key:"scroll",isActive:!0,isEnabled:!0,action:function(){this.isActive=!this.isActive},active:function(){return this.isActive},enabled:function(){var n=e.layoutService,r=e.discrete;return t.allowScroll&&((null==n?void 0:n.meta.isContinuous)||(null==r?void 0:r.query.getCanScroll()))}},r.interact={key:"interact",isEnabled:!0,enabled:function(){return t.allowInteract}},r.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action:function(e){this.isActive=!!e},active:function(){return this.isActive},enabled:function(){return t.allowTooltip}},r.select={key:"select",isActive:!1,isEnabled:!0,action:function(){this.isActive=!this.isActive},active:function(){return this.isActive},enabled:function(){return t.allowSelect}},r.lasso=n.get(),Object.keys(r).forEach((function(e){return t=r[e],Object.keys(mg.prototype).forEach((function(e){t[e]=mg.prototype[e]})),mg.init(t),t;var t})),o(r)}),[]),q((function(){i&&n&&(i.lasso=R(R({},i.lasso),n.get()))}),[n]),{get:function(){return i},setAllows:function(e){Object.assign(t,e),n.setAllows(null==e?void 0:e.allowSelect)},setContext:function(t){Object.assign(e,t)},destroy:function(){Object.keys(i).forEach((function(e){return i[e].removeAllListeners()}))}}}var gg={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},yg={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};function bg(e){var t=e.layout,n=Se.canBeContinuous(t),r=Ee.continuous(t),i=Ee.dimensionless(t);return{canBeContinuous:n,isDiscrete:!r,isContinuous:r,isTime:Se.isTime(r,t),isDimensionless:i,isSimple:Ee.simple(t),isGrouped:Ee.grouped(t),isGroupedByMeasure:Ee.groupedByMeasure(t),isGroupedByDimension:Ee.groupedByDimension(t),isStacked:Ee.stacked(t),isStackedByDimension:Ee.stackedByDimension(t),isStackedByMeasure:Ee.stackedByMeasure(t),isSnapshot:Ee.snapshot(t)}}var xg="QlikView Sans, sans-serif",qg=[["object.barChart","","fontFamily"],["object.barChart","outOfRange","color","#999"],["object.barChart","axis.title","color"],["object.barChart","axis.title","fontSize","13px"],["object.barChart","axis.title","fontFamily",xg],["object.barChart","axis.label.name","color","#595959"],["object.barChart","axis.label.name","fontSize","12px"],["object.barChart","axis.label.name","fontFamily",xg],["object.barChart","axis.line.major","color","#cccccc"],["object.barChart","axis.line.minor","color","#e6e6e6"],["object.barChart","label.value","color","#333333"],["object.barChart","label.value","fontSize","11px",function(e){return parseInt(e,10)}],["object.barChart","label.value","fontFamily",xg],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]],Mg={extractDimsAndNode:function(e){var t,n=[];return e.forEach((function(e){if(e.key===yg.COMPONENT.BAR){t=e;var r=fc(e,"data.selectionDimension",!1);r&&(n.push(r.label),r.label!==e.data.label&&n.push(e.data.label))}})),{nodeDims:n,node:t}}};function Sg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/qHyperCubeDef";return{fetch:function(){return Ne(e,t,this.settings())},settings:function(){var e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function Dg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"reducedHyperCube";return{fetch:function(){return Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}}function Cg(e){return{fetch:function(){var t=e.getHyperCube(),n=R(R({},t),{},{qDataPages:t.qDataPages.slice()});return Promise.resolve({reducedCube:n})}}}function wg(e){var t=e.layoutService.meta,n=t.isSnapshot,r=t.isStackedByDimension,i=function(e){e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return i.should=function(e){return n&&r&&1===e.qDimensionInfo.length},i}function Og(e){return 2===e.qDimensionInfo.length&&2===e.qMeasureInfo.length}function Tg(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}function Ag(e){var t=e.clearMinor,n=e.clearLegend,r=e.clearDiscrete,i=e.clearContinuous,o=e.selectionInfo;n({componentName:"legendRangeBrush"}),t({eventName:"measureRange",componentName:"measureRangeBrush"}),r({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==o.event&&i({componentName:"continuousRangeBrush",brushName:!1})}function Eg(e){var t=e.layout,n=e.defaultAuto;return t.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:t.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:n(t)}function Lg(e){var t=e.picasso,n=e.chart,r=e.environment,i=e.viewState,o=e.viewCache,a=w(),u=O(),s=T(),l=A(),c=E(),f=S(),d=Q(y(),2),p=d[0],m=d[1],h=Q(y(),2),v=h[0],g=h[1],b=Q(y(),2),x=b[0],M=b[1],D=L(),C=vg();return q((function(){if(!n)return function(){};var e=C.get(),t=function(e){var t=e.chart,n=e.actions,r=e.selections,i=t.scale(yg.SCALE.MAIN.MAJOR);return Fd({chart:t,actions:n,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:i,selectionActions:{clear:Ag},custom:{getActions:function(){return n}},setBrushAliases:function(e){var t=e.defaultFunc,n=e.brush;t(),n.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),n.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}({chart:n,actions:e,selections:c});return g(e),M(t),function(){t.destroy(),C.destroy()}}),[n]),q((function(){if(D){var e={allowScroll:!D.active,allowInteract:!D.active,allowTooltip:!D.passive,allowSelect:!D.select&&!D.active};C.setAllows(e)}}),[D]),q((function(){if(x&&r){var e=r.theme,c=r.translator,d=r.localeInfo,p=r.flags,h=r.embed,g=f.direction,y=void 0===g?"ltr":g,b=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(a)?bc({source:a}):void 0,q=function(e){var t=e.layout,n=e.options,r=void 0===n?{}:n;return!(null==t||!t.snapshotData||r.freeResize)&&{width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h}}({layout:a,options:f}),M=bc({source:a,metaAdditionsFn:bg}),S=function(e){var t={};return t.fields=function(e){var t=e.meta,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/".concat(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map((function(e,t){return"qDimensionInfo/".concat(t)})),minor:e.getHyperCubeValue("qMeasureInfo").map((function(e,t){return"qMeasureInfo/".concat(t)}))};return n.majorNumeric="".concat(t.isStackedByDimension?n.majorStack:n.major,":numeric"),n}(e),t.selectionDimensionIdx=function(e){for(var t=e.qDimensionInfo.length,n=0;n<t;n++){var r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}}(e.getHyperCube()),t.selectionDimensionProp=function(e){return void 0===t.selectionDimensionIdx||void 0!==e&&t.selectionDimensionIdx!==e?{}:{selectionDimension:{field:t.selectionDimensionIdx}}},t}(M),D=cc({chart:n,layoutService:M,config:{logicalSize:q,rtl:"rtl"===y},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),w=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:_d(void 0===n?[]:n),styles:void 0};return r.styles=Ud(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=Ud(r.styleMatrix,e)}}}({theme:e,styleMatrix:qg}),O=Rp.model({model:u,layoutService:M,viewCache:o,viewState:i}),T=function(e){var t=e.enigma,n=e.layoutService,r=e.viewModel,i=e.definitionPath,o=e.reducedHyperCubePath,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=Sg(t,n,i),s=Dg(n,o),l=Cg(n),c=wg({layoutService:n}),f={mode:{isReduced:!1}};return{fetch:function(){return n.meta.isSnapshot?s.fetch():n.meta.isContinuous?l.fetch():n.meta.isStacked||n.getHyperCubeValue("qSize.qcy",NaN)!==n.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN)?u.fetch():l.fetch()},model:function(){return f},update:function(e){c.should(e)&&c(e),f.mode=de(f.mode,n.meta),f.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,f.mode.isStackedByDimension=f.mode.isStacked&&Og(e),f.mode.isStackedByMeasure=f.mode.isStacked&&Tg(e),f.fields={major:f.mode.isStackedByDimension?"qDimensionInfo/".concat(e.qDimensionInfo.length-1):r.fields.major,majorGroup:r.fields.majorGroup,minor:f.mode.isStackedByDimension?e.qMeasureInfo.map((function(e,t){return"qMeasureInfo/".concat(t)})):r.fields.minor},f.scales={major:yg.SCALE.REDUCED.MAJOR,minor:yg.SCALE.REDUCED.MINOR},f.cube=e,a.qDataPages=e.qDataPages},fetchMinMaxData:function(){if(a.qDataPages)return Promise.resolve(a.qDataPages);var e=u.settings(),r="K"===n.getHyperCubeValue("qMode")?1:e.rect.qHeight;return e=de(!0,{},e,{rect:{qHeight:r}}),t.getHyperCubeReducedData(e.path,[e.rect],e.zoomLevel,e.filter).then((function(e){return e}))},setSnapshotData:function(e){e.reducedHyperCube=f.cube}}}({enigma:u,layoutService:M,viewModel:S});!function(e){var t=e.layoutService,n=e.viewState,r=e.viewStateOptions,i=void 0===r?{}:r,o=t.meta.isSnapshot?t.getLayoutValue("snapshotData.content.chartData",{}):i;n.preventSet("scrollOffset",o.scrollOffset),n.preventSet("legendScrollOffset",o.legendScrollOffset||0),o.zoom&&n.preventSet("zoom",o.zoom)}({layoutService:M,viewState:i,viewStateOptions:null==f?void 0:f.viewState});var A=function(e){var t=e.app,n=e.model,r=e.translator,i=e.picasso,o=e.localeInfo,a=e.theme,u=e.continuousDataModel,s=e.layoutService,l=e.legendLayoutService,c=e.reducedDataModel,f=s.meta,d=f.isContinuous,p=f.isStacked,m={main:void 0,mini:{getScales:function(){return{}},getColor:function(){return function(e){return e}},getDatumProps:function(){return{}},getAuxiliarySettings:function(){}}};return{initialize:function(){var e=[],f=c.model().mode.isReduced,h=d||f||p,v=!d&&(f||p)&&l?l.getHyperCube():void 0,g=v?"legendCube":void 0;return m.main=ec({app:t,model:n,translator:r,picasso:i,layoutService:s,config:{localeInfo:o,auto:Eg,key:yg.SCALE.MAIN.COLOR},createConfig:function(){return{hc:h?v||s.getHyperCube():c.model().cube,source:h?g:"miniCube",theme:a}}}),e.push(m.main.initialize()),d&&(m.mini=ec({app:t,model:n,translator:r,picasso:i,layoutService:s,config:{localeInfo:o,auto:Eg,key:yg.SCALE.REDUCED.COLOR},createConfig:function(){return{layout:u.getInitialLayout(),hc:u.getInitialCube(),source:"miniCube",theme:a}}}),e.push(m.mini.initialize())),Promise.all(e)},getMain:function(){return m.main},getMini:function(){return m.mini}}}({picasso:t,model:u,app:s,translator:c,localeInfo:d,theme:e,continuousDataModel:O,layoutService:M,legendLayoutService:b,reducedDataModel:T}),E=Zv({layoutService:M,viewState:i,colorModel:{settings:function(){return A.getMain().getSettings()},resolveUIColor:function(e){return A.getMain().getPaletteColor(e)}},chart:n,env:r,keys:{colorScale:yg.SCALE.MAIN.COLOR},isEnabled:function(){return!M.meta.isGroupedByDimension&&(!M.meta.isStackedByDimension||p.isEnabled("TRENDLINES_STACKED_DIM"))&&!M.meta.isDimensionless}});Xh.attrExpr.updateProperties(u,a,p);var L,k=function(e){var t=e.layout,n=e.app,r=e.picasso,i=e.model,o=e.chart,a=e.translator,u=e.localeInfo,s=e.embed;return{layout:t,app:n,picasso:r,model:i,chart:o,translator:a,localeInfo:u,useCustomTooltip:t.tooltip&&!t.tooltip.auto,utils:Bh,miniChartToken:{},embed:s}}({layout:a,app:s,model:u,picasso:t,chart:n,translator:c,localeInfo:d,embed:h,extractDimsAndNode:Mg.extractDimsAndNode});M.meta.isDiscrete&&(L=Iv({chart:n,actions:v,componentKey:yg.COMPONENT.BAR,enigmaModel:u,layoutService:M,dockService:D,trendLineModel:E,itemWidths:gg,viewState:i,rtl:"rtl"===y,options:{axisKey:yg.COMPONENT.BAR_AXIS}}));var N=za({layoutService:M,discreteModel:L}),I=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:yg.SCALE.MAIN.MINOR,MAJOR:yg.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:yg.COMPONENT.BAR,BAR_AXIS:yg.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:yg.COLLECTION.MAIN}}}}(M),j=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return Ms(regeneratorRuntime.mark((function e(){var r,a,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=Ms(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(Cs({},i));case 4:if("object"===xs(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),u=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(Cs({},i))}))),e.next=6,Promise.all([a,u]);case 6:s=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,Ts(s[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=Os(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=zs(!0,{},n.brush);zs(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===xs(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=xc({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=xc({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t,plugins:l||[],pluginArgs:I});C.setContext({discrete:L,layoutService:M}),m({discrete:L,continuous:Rp,legendLayoutService:b,layoutService:M,viewModel:S,dockService:D,themeService:w,continuousDataModel:O,reducedDataModel:T,colorService:A,trendLineModel:E,refLineModel:N,pluginService:j,customTooltipModel:k,selectionService:x,logicalSize:q})}}),[x,f,r,a]),p}function kg(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function Ng(e){return e.some(kg)}function Ig(e,t){var n=NaN,r=NaN;return e.forEach((function(e){Ng(e)||e.slice(-t).forEach((function(e){"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function jg(e){var t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){var r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function Pg(e,t){var n=NaN,r=NaN;return e.forEach((function(e){if(!Ng(e)){var i=0,o=0;e.slice(-t).forEach((function(e){"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)})),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}})),{min:n,max:r}}function Rg(e,t){var n={};e.forEach((function(e){if(!Ng(e)){var r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((function(e){"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));var r=NaN,i=NaN;return Object.keys(n).forEach((function(e){r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)})),{min:r,max:i}}function Fg(e){return"number"==typeof e&&!Number.isNaN(e)}function zg(e){var t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min.apply(Math,ee(t.filter((function(e){return Fg(e.qMin)})).map((function(e){return e.qMin})))),max:Math.max.apply(Math,ee(t.filter((function(e){return Fg(e.qMax)})).map((function(e){return e.qMax}))))}}function Hg(e){return e.length?{min:Math.min.apply(Math,ee(e[0].qSubNodes.map((function(e){return e.qMinNeg})))),max:Math.max.apply(Math,ee(e[0].qSubNodes.map((function(e){return e.qMaxPos}))))}:{min:0,max:0}}function Vg(e,t,n){for(var r=e.length-1;r>-1;r--)if(t(e[r]))return e[r];return n}function Bg(e){var t=Vg(fc(e,"0.qData.0.qSubNodes",[]),kg,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}function _g(e){return!Number.isNaN(+e.qNum)}function Ug(e){return e.qNum}function Wg(e){var t=Vg(fc(e,"0.qMatrix",[]),Ng,[]).filter(_g).map(Ug);return{min:Math.min.apply(Math,[0].concat(ee(t))),max:Math.max.apply(Math,[0].concat(ee(t)))}}function Kg(e){return!Number.isNaN(+e.qNum)}function Gg(e){return e.qNum}function Yg(e,t){return e.push.apply(e,ee(t)),e}function Xg(e){var t=fc(e,"0.qMatrix",[]).filter(Ng).reduce(Yg,[]).filter(Kg).map(Gg);return{min:Math.min.apply(Math,[0].concat(ee(t))),max:Math.max.apply(Math,[0].concat(ee(t)))}}var Jg=Io,$g=jo;function Zg(e,t){return Math.abs(e/t)<5||0===t}function Qg(e){var t,n,r,i,o,a,u,s,l=(n=(t=e).reducedDataModel,r=t.layoutService,i=t.continuousDataModel,o=r.meta,a=r.getHyperCubeValue,u=function(e){return!e.length&&o.mode.K},s=function(e){var t=a("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}},{resolve:function(){var e=a("qMeasureInfo").length,t=a("qDimensionInfo").length,r=a("qHasOtherValues");if(!o.isStacked&&!r)return Promise.resolve({qDataPages:[{}],count:e});if(o.isContinuous){var l=o.isStackedByDimension?t:e;return i.fetchMinMaxData().then((function(e){return{qDataPages:e,count:l}}))}var c=o.isStackedByDimension?1:e;return n.fetchMinMaxData().then((function(e){if(u(e))return s(r);var t=[];return r&&(t=o.mode.K?a("qStackedDataPages",[]):a("qDataPages",[])),{qDataPages:e,count:c,others:t}}))}}),c=function(e){var t=e.layoutService,n=e.trendLineModel,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.stackedByMeasureExtractor,o=void 0===i?Pg:i,a=r.stackedByDimensionExtractor,u=void 0===a?Rg:a,s=r.straightExtractor,l=void 0===s?Ig:s,c=r.measureInfoExtractor,f=void 0===c?zg:c,d=r.explicitExtractor,p=void 0===d?jg:d,m=t.meta;return{extract:function(e){var t,r,i=e.qDataPages,o=e.qStackedDataPages,a=e.others,u=e.count;if(Array.isArray(o)){var s=this.extractFromStacked(o);t=s.min,r=s.max}else{var l=this.extractFromStraight(i,u);t=l.min,r=l.max}if(n.query.hasTrendLines()){var c=n.query.getMinMax(),f=c.min,d=c.max;t=Number.isFinite(f)?Math.min(t,f):t,r=Number.isFinite(d)?Math.max(r,d):r}var p=this.extractOthers(a),m=p.min,h=p.max,v=this.extractExplicit(),g=[0,t,r].filter((function(e){return $g(e)})),y=Math.min.apply(Math,ee(g)),b=Math.max.apply(Math,ee(g));y=Zg(m,y)?Math.min(y,m):y,b=Zg(h,b)?Math.max(b,h):b;var x=[v.explicitMin,v.explicitMax,y,b].filter((function(e){return $g(e)}));return(t=Number.isNaN(v.explicitMin)?Math.min.apply(Math,ee(x)):v.explicitMin)===(r=Number.isNaN(v.explicitMax)?Math.max.apply(Math,ee(x)):v.explicitMax)&&(Number.isNaN(v.explicitMin)?t=Jg(t,-.2):Number.isNaN(v.explicitMax)&&(r=Jg(r,.2))),R({min:t,max:r,implicitMin:y,implicitMax:b,otherMin:m,otherMax:h,hasOtherMin:m<t,hasOtherMax:h>r},v)},extractExplicit:function(){var e=p(t),n=e.min,r=e.max,i=e.isExplicitMin,o=e.isExplicitMax;return{hasExplicitMinMax:i||o,hasExplicitMin:i,hasExplicitMax:o,explicitMin:n,explicitMax:r}},extractFromStacked:function(e){return Hg(e.length?e[0].qData:[])},extractFromStraight:function(e,n){var r=e.length?e[0].qMatrix:[];return m.isStackedByMeasure?o(r,n):m.isStackedByDimension?u(r,n):t.getHyperCubeValue("qHasOtherValues")?l(r,n):f(t)},extractOthers:function(e){return m.isStackedByDimension?Bg(e):m.isGroupedByDimension?Xg(e):Wg(e)}}}(e);return l.resolve().then((function(e){return c.extract(e)}))}function ey(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[function(e,t){var n,r=e.targets,i=e.requireFailure,o=e.recognizeWith,a=e.components,u=e.eventName,s=void 0===u?"tap":u,l=t.customTooltipModel?t.customTooltipModel.utils:void 0,c=l?t.debouncer(l.displayTooltip,l.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:i,recognizeWith:o,options:{event:s,interval:10,pointers:1,enable:function(e,i){return!i||!(!t.actions.select.enabled()&&!t.actions.tooltip.enabled())&&(n=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return-1!==r.indexOf(e.key)}))).length>0}},events:U({},s,(function(e){e.preventDefault();var i=function(e,t){var n,r,i=t.element.getBoundingClientRect();return e.center?(n=e.center.x,r=e.center.y):(n=e.clientX,r=e.clientY),{x:n-i.left,y:r-i.top}}(e,this.chart),o=t.hitRadius?t.hitRadius(n):0,u=o>0?{cx:i.x,cy:i.y,r:o}:i,f=t.shapesAt?t.shapesAt(u):this.chart.shapesAt(u,{components:r.map((function(e){return{key:e,propagation:"stop"}})),propagation:"stop"}),d=this.chart.component("tooltip"),p="mouse"!==e.pointerType&&d&&d.show;if(!t.isLocked(n)&&!t.tooltipOnly&&t.actions.select.enabled()){var m=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),h=m.some((function(e){return"legend-cat"===e.type}));if(!f.length&&h||(this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1,t.actions.select.emit("start",s,m)),f.length&&a){this.chart.brushSelectionIncludeMax=!1,t.actions.select.brushSelectionIncludeMax=!1;var v="function"==typeof a?a(e,f):a;this.chart.brushFromShapes(f,{components:v}),t.actions.select.emit("end",s)}}if(d&&t.actions.tooltip.enabled())if(f.length){var g=t.customTooltipModel;if(g.useCustomTooltip&&l.checkIfPromisesExist({customTooltipModel:g})){var y=l.getNodes(e,this.chart);c(e,d,{nodes:y,opts:t,customTooltipModel:g})}else d.emit("show",e,{nodes:f})}else p&&d.emit("hide")}))}}(e,t)],components:[]}}var ty=function(e,t,n){var r,i=e.eventName,o=e.key,a=e.fillTargets,u=void 0===a?[]:a,s=e.requireFailure,l=e.recognizeWith;return{key:"event:".concat(o),type:"Pan",requireFailure:s,recognizeWith:l,options:{event:i,enable:function(e,n){if(this.started===i||!n)return!0;if(!t.actions.select.enabled())return!1;var r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return-1!==u.indexOf(e.key)}));return 0===r.length&&function(e,t){var n=e.srcEvent.target;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf("".concat(t,"-")))}(n,o)?(this.started=i,!0):r.length>0}},events:(r={},U(r,"".concat(i,"start"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),t.actions.select.emit("start",i),this.chart.component(o).emit("".concat(n,"Start"),e),this.started=i})),U(r,"".concat(i,"move"),(function(e){e.preventDefault(),this.chart.component(o).emit("".concat(n,"Move"),e)})),U(r,"".concat(i,"end"),(function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,t.actions.select.brushSelectionIncludeMax=!0),e.preventDefault(),this.chart.component(o).emit("".concat(n,"End"),e),t.actions.select.emit("end",i),this.started=!1})),r)}};function ny(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.fillTargets,i=e.targetSelector,o=e.targetFillSelector,a=e.dock,u=e.scale,s=e.bubblesPlacement,l=void 0===s?"inside":s,c=e.observeBrush,f=void 0!==c&&c,d=e.multiple,p=void 0!==d&&d,m=e.toLabel,h=e.onEdited;return{key:t,type:"brush-range",layout:{dock:n.map((function(e){return"@".concat(e)})).join(",")},on:h?{bubbleEnd:function(){h()}}:{},settings:{brush:f?{context:"selection",observe:!0}:"selection",scale:u,multiple:p,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:m},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=ty(e,t,"range");return{interactions:[e.onEdited?function(e,t){var n=e.key,r=e.requireFailure,i=e.recognizeWith,o=e.eventName,a=void 0===o?"tap":o;return{prio:1,key:"event:".concat(n,"-tap"),type:"Tap",requireFailure:r,recognizeWith:i,options:{event:"".concat(a,"-").concat(n,"-tap"),interval:10,pointers:1,enable:function(e,r){return!!(r&&t.actions.select.enabled()&&(r.target&&"INPUT"===r.target.nodeName||r.target&&r.target.hasAttribute("data-other-value")&&(r.target.getAttribute("data-key")||"").split("-bubble")[0]===n))}},events:U({},"".concat(a,"-").concat(n,"-tap"),(function(e){(e.target.getAttribute("data-key")||"").split("-bubble")[0]&&(e.preventDefault(),this.chart.component(n).emit("bubbleStart",e))}))}}(e,t):null,r].filter(Boolean),components:[n]}}var ry={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}};var iy=function(e,t){return e.qDimensionInfo[t].qApprMaxGlyphCount},oy=function(e){var t,n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,r=(null==e?void 0:e.qStateCounts)||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,u=void 0===a?0:a,s=r.qSelected,l=void 0===s?0:s;return[void 0,0].includes(n)?o+u+l:n},ay={getMajorAxisMaxGlyphCount:function(e,t){var n=0;if(e.qDimensionInfo.length){var r=t?0:e.qDimensionInfo.length-1;n=iy(e,r)}else e.qMeasureInfo.forEach((function(e){n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData:function(e,t){return e.qDimensionInfo.length?fc(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo},getBarAxisMaxGlyphCount:function(e,t){if(e){var n=ay.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=ay.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return Pe.getAdjustedMaxGlyphCount(o,n,i,a)}},getGroupAxisMaxGlyphCount:function(e){if(e){var t=ay.getAxisData(e),n=iy(e,0);return Pe.getAdjustedMaxGlyphCount(n,t,0)}}},uy=3,sy=13;function ly(e,t,n,r){var i=t.layoutService.meta,o=[],a=!("none"===e.measureAxis.show),u=!("title"===e.measureAxis.show);i.isContinuous?o.push.apply(o,ee(function(e,t,n,r){var i=t.layoutService.meta,o=t.themeService.getStyles(),a=o.axis,u=o.grid,s=t.layoutService.getLayoutValue("gridLine",{}),l=s.auto,c=s.spacing,f=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,p=ry["".concat(t.dockService.meta.major.orientation,"DimensionAxis")].minimumLayoutMode,m={type:"grid-line",x:{},layout:{minimumLayoutMode:ry.gridLines.minimumLayoutMode},ticks:{stroke:u.line.major.color},minorTicks:{show:!1,stroke:u.line.minor.color}},h=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){var v=n?"end":"start",g=n?1:0,y="bottom"===t.dockService.meta.major.dock?0:1,b={label:{fill:a.label.name.color,fontSize:a.label.name.fontSize,fontFamily:a.label.name.fontFamily},majorGuideLine:{stroke:a.line.major.color},minorGuideLine:{stroke:a.line.minor.color}},x={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:p},preferredSize:function(){return{size:2*parseFloat(a.label.name.fontSize),edgeBleed:{left:1,right:1}}},settings:{anchor:v,label:{align:y,justify:g},guideLine:{major:{justify:g},minor:{align:y}}},style:b};f.push(de(!0,{},x,{key:"inner-time-axis",scale:yg.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:de(!0,{},b,{line:{stroke:a.line.major.color},majorGuideLine:{stroke:a.line.minor.color},minorGuideLine:{stroke:a.line.major.color}})})),f.push(de(!0,{},x,{key:"outer-time-axis",scale:yg.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),f.push({type:"axis-overlay",key:"outer-axis-overlay",scale:yg.SCALE.MAIN.MAJOR,layout:{dock:"@".concat("outer-time-axis"),minimumLayoutMode:p}}),f.push({type:"axis-overlay",key:"inner-axis-overlay",scale:yg.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@".concat("inner-time-axis"),minimumLayoutMode:p}}),f.push(h)}return f.push(de(!0,{},m,{key:"inner-time-grid",x:{scale:yg.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:u.line.minor.color}})),f.push(de(!0,{},m,{key:"outer-time-grid",x:{scale:yg.SCALE.MAIN.MAJOR}})),f}if(i.isContinuous){var q="continuous-axis";d&&(f.push({type:"axis",key:q,scale:yg.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:p},settings:{labels:{align:0,offset:4,fill:a.label.name.color,fontSize:a.label.name.fontSize,fontFamily:a.label.name.fontFamily},ticks:{show:!0,stroke:a.line.major.color},line:{show:!r},minorTicks:{show:!1}}}),f.push({type:"axis-overlay",key:"inner-axis-overlay",scale:yg.SCALE.MAIN.MAJOR,layout:{dock:"@".concat(q),minimumLayoutMode:p}}),f.push(h)),f.push(de(!0,{},m,{key:"continuous-grid",x:{scale:yg.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return f}(e,t,n,r))):o.push.apply(o,ee(function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];var i=t.layoutService.meta,o=t.themeService.getStyles(),a=[],u=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),s=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),l="horizontal"===t.dockService.meta.major.orientation,c=l?e.dimensionAxis.label:"auto",f="horizontal"===c?void 0:t.dockService.meta.minor.size/4,d={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:ry["".concat(t.dockService.meta.major.orientation,"DimensionAxis")].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:c,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:f,fill:o.axis.label.name.color,fontSize:o.axis.label.name.fontSize,fontFamily:o.axis.label.name.fontFamily},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension"],style:{inactive:{opacity:.3}}}]}};s&&a.push(de(!0,{},d,{key:"group-axis",scale:yg.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:u?10:4,labels:{mode:u?"horizontal":d.settings.labels.mode,maxGlyphCount:ay.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:f},line:{show:(l||!u)&&d.settings.line.show}}}));var p=ay.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return u&&a.push(de(!0,{},d,{key:yg.COMPONENT.BAR_AXIS,scale:yg.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:f,tiltThreshold:p>uy&&p<sy?1:void 0},line:{show:!(l&&s)&&d.settings.line.show}}})),l||2!==a.length?a:[a[1],a[0]]}(e,t,n,r)));var s=t.themeService.getStyles();return a&&o.push({type:"axis",key:"y-axis",formatter:yg.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:ry.measureAxis.minimumLayoutMode},scale:yg.SCALE.MAIN.MINOR,settings:{labels:{show:u,fill:s.axis.label.name.color,fontSize:s.axis.label.name.fontSize,fontFamily:s.axis.label.name.fontFamily},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}}),o}var cy={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function fy(e){var t=e.layoutService,n=e.discrete,r=e.componentKey,i=t.meta,o=i.isContinuous,a=i.isGrouped;if(o)return 1;var u=(t.getLayoutValue("components",[])||[]).filter((function(e){return e.key===r}))[0];if(u){var s=u.style;return s.strokeWidth&&"none"!==s.strokeWidth?function(){var e=cy.BAR.STROKE.WIDTH[s.strokeWidth.toUpperCase()]/n.query.getItemSize(),t=s.width+e;return t>1?s.width-(t-1):s.width}:s.width}return a?.9:.7}var dy={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function py(e,t,n){return e*(1-n)+t*n}function my(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var i=r.data,o=e.chart.component(t).rect;if(!i.items.length||!o)return 2;var a=e.viewState.get("zoom"),u=a.min,s=a.max;if(n[[u,s]])return n[[u,s]];var l=dy[be(o.width,Number.MAX_VALUE)];n={};var c=Math.abs(s-u),f=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===f)return l;var d=py(2,l,1-Math.min(c/f/.2,1));return n[[u,s]]=Math.max(2,Math.min(l,d)),n[[u,s]]}}function hy(e,t){var n=t.hasExplicitMax,r=t.explicitMax;return!!n&&e>r&&r<=0}function vy(e,t){var n=t.hasExplicitMin,r=t.explicitMin;return!!n&&e<r&&r>=0}function gy(e,t){var n=t.hasExplicitMax,r=t.explicitMax;return!!n&&e>r&&r>0}function yy(e,t){var n=t.hasExplicitMin,r=t.explicitMin;return!!n&&e<r&&r<0}var by="max",xy="min",qy={min:"Min",max:"Max"};function My(e,t,n){return void 0===n?hy(e,t)||vy(e,t):n===by?hy(e,t):vy(e,t)}function Sy(e){var t=e.minorMinMax,n=e.type;return!(function(e){var t=e.minorMinMax,n=e.type;return!t["hasExplicit".concat(qy[n])]}({minorMinMax:t,type:n})||function(e){var t=e.minorMinMax,n=e.type,r=n===by?t.implicitMax:t.implicitMin;return!My(Number(r.toFixed(13)),t,n)}({minorMinMax:t,type:n}))}function Dy(e,t){var n=t.barComponent,r=t.type,i=t.isStacked,o=e.viewCache,a=e.dockService,u=e.themeService,s=o.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;var l=r===by?s.implicitMax:s.implicitMin;if(!My(Number(l.toFixed(13)),s,r))return!1;var c=r===by?a.meta.minor.end:a.meta.minor.start,f="end";i&&(f=r===by?"sumOfPositives":"sumOfNegatives");var d=u.getStyles();return{type:"box-out-of-bounds",key:"bar-oob-".concat(r),layout:{dock:c},data:n.data,brush:n.brush,settings:{orientation:n.settings.orientation,major:n.settings.major,minor:n.settings.minor,dockValue:Ie.getDockValue(c),oob:de({},n.settings.box,{fill:d.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!i||0!==e.datum[f].value)&&My(e.datum[f].value,s,r))}})}}}function Cy(e){return Math.min(Math.max(0,e),1)}var wy=function(e,t){var n,r=t.chart,i=t.type,o=t.componentKey,a=t.collectionKey,u=e.layoutService,s=e.dockService,l=e.viewCache,c=u.meta.isStacked,f=l.get("minorMinMax"),d=e.layoutService.meta;if(!Sy({minorMinMax:f,type:i}))return!1;d.isGroupedByDimension?n=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:d.isGroupedByMeasure&&(n=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2});return{type:"box",key:"".concat(yg.COMPONENT.GHOST_BAR_OOB,"-").concat(i),data:{collection:a},settings:{orientation:s.meta.minor.orientation,major:{scale:yg.SCALE.MAIN.MAJOR,fn:n},minor:{scale:yg.SCALE.MAIN.MINOR,start:function(e){var t,n;return Cy(r.scale(yg.SCALE.MAIN.MINOR)((null==e||null===(t=e.datum)||void 0===t||null===(n=t.start)||void 0===n?void 0:n.value)||0))},end:function(e){var t=r.scale(yg.SCALE.MAIN.MINOR),n="end";c&&(n="max"===i?"sumOfPositives":"sumOfNegatives");var o=e.datum[n]?e.datum[n].value:t[i]();return Cy(t(o))}},box:{width:fy({layoutService:e.layoutService,discrete:e.discrete,componentKey:o}),minWidthPx:2,fill:"none",stroke:"transparent",show:function(e){var t=r.scale(yg.SCALE.MAIN.MINOR),n="end";c&&(n="max"===i?"sumOfPositives":"sumOfNegatives");var o=e.datum[n]?e.datum[n].value:t.max();return"max"===i?o>t.max():o<t.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Oy(e){return function(t){return Nt.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}function Ty(e){var t="horizontal"===e.dockService.meta.major.orientation;return{placements:e.simplifiedPlacements.map((function(n){return function(e,t,n){var r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:Oy(t),overflow:e.overflow,background:e.background,padding:r}}(n,e.style,t)})),label:e.label}}function Ay(e,t){if(t){if(function(e,t){return hy(e,t)}(e,t))return-1;if(function(e,t){return vy(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){var n=t.min,r=t.max;return 0===r&&0===n?1:r<=0?-1:n>=0||r>=-n?1:-1}return e>=0?1:-1}(e,t)}function Ey(e,t,n,r){var i=Ay(e,r),o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function Ly(e,t){var n=e.dataPoint;if(!n.showLabels)return!1;var r=t.layoutService.meta,i=r.isStacked,o=r.isContinuous;return!i||!o&&!!n.showSegmentLabels}function ky(e,t){var n=e.dataPoint;if(!n.showLabels)return!1;var r=t.layoutService.meta,i=r.isStacked,o=r.isContinuous;return!!i&&(!!o||!1!==n.showTotalLabels)}function Ny(e,t,n,r){var i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function Iy(e,t,n){var r=e.layout,i=e.component,o=e.minorScale;if(!Ly(r,t))return!1;var a,u=t.viewModel,s=t.ds,l=t.viewCache,c=t.layoutService,f=t.dockService,d=t.themeService,p=c.meta,m=l.get("minorMinMax"),h=d.getStyles();!p.isStacked&&(a=p.isStacked?1:0);var v=0===a?1:0,g=p.isStacked?.5:1,y=u.fields.minor[0],b=void 0===y?void 0:s.field(y).formatter(),x=-1;var q={label:p.isStacked?p.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>x?b(e.data.segment.value):""}:function(e){return e.data.end.label},simplifiedPlacements:Ny(a,v,g,p.isContinuous),style:h.label.value},M=[Ty(de(t,q))],S={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:i,selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return Ey(e.data.end.value,f.meta.minor.orientation,n,m)},labels:M,fontSize:h.label.value.fontSize,fontFamily:h.label.value.fontFamily}}}]}};return p.isStackedByDimension&&b&&(S.beforeRender=function(){x=function(e,t,n){var r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(i,t,o)}),S}var jy={isSameMeasureAndColorRow:function(e,t,n){return t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0]},getTitle:function(e,t){var n,r=e.data;return t.isStackedByDimension?n=r.stack?r.stack.label:void 0:t.isGroupedByDimension&&(n=r.group?r.group.label:void 0),void 0!==n?"".concat(r.label,", ").concat(n):r.label},getMeasure:function(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;var o,a=t.data,u=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:a.measureIndex.value]:void 0,s=n.isStacked?{source:{key:a.source.key,field:u},label:!0===(null===(o=a.null)||void 0===o?void 0:o.value)?"":n.isStackedByDimension&&i?i(a.segment.value):a.segment.label}:a.end;return _e.getMeasure(e,s)},getMeasures:function(e,t,n,r,i){var o=e.resources.dataset;return t.map((function(e){return jy.getMeasure(o,e,n,r,i)})).filter(Boolean)},getCustomTooltipAttrExps:function(e,t,n){var r=e.resources.dataset;return Kh({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData:function(e,t,n,r,i){var o={title:jy.getTitle(t,n),color:_e.getColor(e,t,r),measures:jy.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(jy.useCustomTooltip(r)){var a,u,s,l,c=jy.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=c.customTooltipAttrExpsArr,o.customTitle=c.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===lh.CUSTOM.TITLE})),o.customDescription=c.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===lh.CUSTOM.DESCRIPTION}));var f=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((function(e){var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(f=e.data.customTooltipImages)})),f.length>0&&(o.customImages=f);var d,p,m,h,v=r.layoutService.getLayout();if(r.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(a=v.tooltip)&&void 0!==a&&null!==(u=a.chart)&&void 0!==u&&null!==(s=u.object)&&void 0!==s&&s.refId&&r.customTooltipModel.embed&&"function"==typeof(null===(l=r.customTooltipModel.model)||void 0===l?void 0:l.getEffectiveProperties))if(null!==(d=(p=r.app).isInModalSelection)&&void 0!==d&&d.call(p)){if((null==v||null===(m=v.qHyperCube)||void 0===m||null===(h=m.qDimensionInfo)||void 0===h?void 0:h.length)>0){Rh.destroyVisualization({customTooltipModel:r.customTooltipModel});var g=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=g}}else{var y=Rh.createContainer({ctx:e,layout:v});o.customChart=y}}return o},getTotalStackTitle:function(e,t){return e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":""},extractStackTotalBarTooltipData:function(e,t,n){return{title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((function(e){return 0!==e})).map((function(e){return{label:"".concat(jy.getTotalStackTitle(e,t)),value:n?n(e):e}}))}},extractTooltipData:function(e,t){var n=t.chart.formatter(yg.FORMATTER.MINOR),r=t.layoutService.meta,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);var a=e.node.stackTotalBarNodes,u=a&&a.length?a.map((function(e){return jy.extractStackTotalBarTooltipData(e,t.translator,n)})):[];return{barTooltipData:i.map((function(i){return jy.extractBarTooltipData(e,i,r,t,n)})),stackTotalBarTooltipData:u,numInvisibleNodesPhase1:o}},extractBarNodeData:function(e,t,n,r,i,o,a){var u=!i&&_e.getTitleRow(t,r),s=_e.hideColorRow(t,n),l=!o&&!s&&_e.getColorRow(e,t,r),c=t.measures.map((function(i){return!a&&_e.getMeasureRow(i,e,t,r,s&&i.field===n.coloring.field)})).filter((function(e){return!jy.isSameMeasureAndColorRow(e,l,r)}));if(jy.useCustomTooltip(n)){var f=i?[]:t.customMeasures.map((function(n){return _e.getMeasureRow(n,e,t,r,!1)})),d=!(!t.customTitle[0]||i)&&_e.getTitleRow(t.customTitle[0],r),p=!(!t.customDescription[0]||i)&&_e.getDescriptionRow(t.customDescription[0],r),m=[d,p,u=!jy.shouldIgnoreTitleRowForCtt(d,p,c,f)&&u,l].concat(ee(c),ee(f));if(n.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&t.customChart&&m.push(t.customChart),t.customLimitation&&m.push(_e.getFooterRow(t.customLimitation,r)),t.customImages){var h=t.customImages.map((function(t){return _e.getImageRow(t,e)}));m.push.apply(m,ee(h))}return m.filter(Boolean)}return[u,l].concat(ee(c)).filter(Boolean)},extractStackTotalBarNodeData:function(e,t,n){var r=!!t.measures.length&&_e.getTitleRow(t,n),i=t.measures.map((function(r){return _e.getMeasureRow(r,e,t,n,!1)}));return[r].concat(ee(i)).filter(Boolean)},useCustomTooltip:function(e){return fc(e,"customTooltipModel.useCustomTooltip",!1)},shouldIgnoreTitleRow:function(e,t){return e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension},shouldIgnoreTitleRowForCtt:function(e,t,n,r){return!1===n[0]&&0===r.length&&(e.length>0||t.length>0)},shouldIgnoreColorRow:function(e,t){return t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure)},shouldIgnoreMeasureRow:function(e,t,n){return e&&t.measures.some((function(e){return e.field===n.coloring.field}))},shouldIgnoreDefaultRows:function(e,t){return jy.useCustomTooltip(t)&&fc(e,"tooltip.hideBasic",0)},extractBarsData:function(e,t,n,r){var i,o,a=t.layoutService.meta,u=t.layoutService.getLayout(),s=r.length,l=[],c=jy.shouldIgnoreDefaultRows(u,t);for(i=0;i<s;i++){o=r[i];var f=jy.shouldIgnoreTitleRow(a,i),d=c||jy.shouldIgnoreColorRow(a,i),p=c||jy.shouldIgnoreMeasureRow(d,o,t);if((l=l.concat(jy.extractBarNodeData(e,o,t,n,f,d,p))).length>=6||o.customImages||o.customChart||o.customLimitation)return{barsData:l,numInvisibleNodesPhase2:s-(i+1)}}return{barsData:l,numInvisibleNodesPhase2:0}},extractStackTotalBarsData:function(e,t,n){var r=[];return n.some((function(e){return e.measures.length}))&&n.forEach((function(n){r=r.concat(jy.extractStackTotalBarNodeData(e,n,t))})),r},extractData:function(e,t,n){var r=jy.extractTooltipData(e,t),i=r.barTooltipData,o=r.numInvisibleNodesPhase1,a=r.stackTotalBarTooltipData,u=jy.extractStackTotalBarsData(e,n,a);u.length&&u.push(_e.getSeparatorRow());var s=jy.extractBarsData(e,t,n,i),l=s.barsData,c=s.numInvisibleNodesPhase2,f=u.concat(l),d=o+c;return d&&f.push(_e.getNMoreRow(d,t.translator,n)),f},calculateBoundsFromBars:function(e){var t=e.filter((function(e){var t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return Ha(n.map((function(e){return e.bounds})))},calculateBoundsFromScale:function(e){var t,n,r,i=e.opts,o=e.barKey,a=e.scale,u=e.majorScale,s=e.data,l=e.groupProp,c=i.chart.component(o).rect,f=i.dockService.meta.major.orientation,d="horizontal"===f?"width":"height",p=i.chart.scale(a).pxScale(c[d]);if(i.layoutService.meta.isGroupedByMeasure){var m=i.viewModel.fields.minor.length;t=s.value,n=a===u&&void 0!==t?(p([t,0])+p([t,m-1]))/2:0,r=a===u&&void 0!==t?p.bandwidth([t,0]):0}else{var h=s.value;t=s[l]?s[l].value:void 0,n=p(a===u&&void 0!==t?[t,h]:h),r=a===u&&void 0!==t?p.bandwidth([t,h]):p.bandwidth(h)}var v=(n+r/2)*c[d],g={width:0,height:0};return"horizontal"===f?(g.x=v,g.y=c.height):(g.y=v,g.x=0),g},calculateTotalBounds:function(e){var t=e.opts,n=e.labels,r=e.bars,i=e.barKey,o=e.barAxisKey,a=e.majorScale,u=e.majorInnerScale,s=e.groupProp,l=r.filter((function(e){return e.children&&e.children.length}));return l.length?jy.calculateBoundsFromBars(l):jy.calculateBoundsFromScale({opts:t,barKey:i,scale:n[0].key===o?a:u,majorScale:a,data:n[0].data,groupProp:s})},filterNodesOnKeys:function(e,t){return e.filter((function(e){return e.data&&t.indexOf(e.key)>-1}))},isBarMatchingLabel:function(e,t){return t.data.value===e.data.value},isBarMatchingLabelOnProp:function(e,t,n){return t.data.value===(e.data[n]?e.data[n].value:e.data.value)},findBarsMatchingLabels:function(e,t,n,r){return e.filter((function(e){return t.some((function(t){return n(e,t,r)}))}))},findBarsFromGroupLabelsInGroupedByDim:function(e,t,n){var r=jy.isBarMatchingLabelOnProp;return jy.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:function(e,t,n){return e.filter((function(e){return t.some((function(t){return t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value}))}))},findBarsFromLabelsInSingleDim:function(e,t){var n=jy.isBarMatchingLabel;return jy.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim:function(e,t,n,r){var i=t.filter((function(e){return e.key===n})),o=t.filter((function(e){return e.key!==n})),a=jy.findBarsFromBarLabelsInGroupedByDim(e,i,r),u=jy.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(u)},findStackTotalBarsFromLabelsInStackedByDim:function(e,t){var n=jy.isBarMatchingLabel;return jy.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure:function(e,t){var n=jy.isBarMatchingLabel;return jy.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim:function(e,t,n){var r=jy.isBarMatchingLabelOnProp;return jy.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:function(e,t){return jy.findBarsFromLabelsInSingleDim(e,t)},findBarsFromLabels:function(e){var t=e.labels,n=e.opts,r=e.filterKeys,i=e.barAxisKey,o=e.groupProp,a=e.stackProp,u=n.layoutService.meta,s=jy.filterNodesOnKeys(n.chart.findShapes("container"),r);return u.isStackedByDimension?jy.findBarsFromLabelsInStackedByDim(s,t,a):u.isStackedByMeasure?jy.findBarsFromLabelsInStackedByMeasure(s,t):u.isGroupedByDimension?jy.findBarsFromLabelsInGroupedByDim(s,t,i,o):jy.findBarsFromLabelsInSingleDim(s,t)},findStackTotalBarsFromLabels:function(e){var t=e.labels,n=e.opts,r=e.stackTotalBarKey,i=n.layoutService.meta;if(i.isStacked){var o=jy.filterNodesOnKeys(n.chart.findShapes("container"),[r]);return i.isStackedByDimension?jy.findStackTotalBarsFromLabelsInStackedByDim(o,t):jy.findStackTotalBarsFromLabelsInStackedByMeasure(o,t)}return[]},isSingleBarMode:function(e,t){var n=e.isSimple||1===t.length;return n&&t[0].children&&t[0].children.length},filterNodesOnLabels:function(e){var t=e.labels,n=e.opts,r=e.barKey,i=e.stackTotalBarKey,o=e.barAxisKey,a=e.barOobMaxKey,u=e.barOobMinKey,s=e.groupProp,l=e.stackProp,c=e.majorScale,f=e.majorInnerScale,d=e.filterFn,p=n.layoutService.meta;if(t.length){var m=jy.findBarsFromLabels({labels:t,opts:n,filterKeys:[r],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:u,groupProp:s,stackProp:l});if(d&&(m=m.filter(d)),jy.isSingleBarMode(p,m))return[m[0]];if(m.length){var h=jy.findBarsFromLabels({labels:t,opts:n,filterKeys:[r,a,u],stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:a,barOobMinKey:u,groupProp:s,stackProp:l});d&&(h=h.filter(d));var v=jy.calculateTotalBounds({opts:n,labels:t,bars:h,barKey:r,barAxisKey:o,groupProp:s,majorScale:c,majorInnerScale:f}),g=jy.findStackTotalBarsFromLabels({labels:t,opts:n,stackTotalBarKey:i});return[{key:r,bounds:v,childrenNodes:m,data:m.map((function(e){return e.data})),stackTotalBarNodes:g}]}return[]}return[]},filterNodesForOob:function(e,t,n){return e.key===t&&0===e.children.length||e.key===n},filterNodes:function(e){var t=e.nodes,n=e.opts,r=e.barKey,i=e.stackTotalBarKey,o=e.barAxisKey,a=e.groupAxisKey,u=e.barOobMaxKey,s=e.barOobMinKey,l=e.groupProp,c=e.stackProp,f=e.majorScale,d=e.majorInnerScale,p=jy.filterNodesOnKeys(t,[o,a]),m=p&&p.length?[p[0]]:[],h=jy.filterNodesOnLabels({labels:m,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:u,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d});if(h&&h.length)return h;var v=n.layoutService.meta;if(v.isStackedByMeasure){m=(p=jy.filterNodesOnKeys(t,[u,s]))&&p.length?[p[0]]:[];var g=jy.filterNodesOnLabels({labels:p,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:u,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d,filterFn:function(e){return jy.filterNodesForOob(e,r,u)}});if(g&&g.length)return g[0].stackTotalBarNodes=void 0,g}if(v.isStackedByDimension){m=(p=jy.filterNodesOnKeys(t,[u,s]))&&p.length?[p[0]]:[];var y=jy.filterNodesOnLabels({labels:p,opts:n,barKey:r,stackTotalBarKey:i,barAxisKey:o,barOobMaxKey:u,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:f,majorInnerScale:d,filterFn:function(e){return jy.filterNodesForOob(e,r,u)}});if(y&&y.length)return y[0].stackTotalBarNodes=void 0,y}var b=jy.filterNodesOnKeys(t,[r,u,s]);return b.length?[b[0]]:[]}};function Py(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],i=Fe({key:yg.COMPONENT.BASE_TOOLTIP,rtl:n});return de(!0,i,{scale:yg.SCALE.MAIN.COLOR,settings:{filter:function(e){return jy.filterNodes({nodes:e,opts:t,barKey:yg.COMPONENT.BAR,stackTotalBarKey:yg.COMPONENT.STACK_TOTAL_BAR,barAxisKey:yg.COMPONENT.BAR_AXIS,groupAxisKey:yg.COMPONENT.GROUP_AXIS,barOobMaxKey:yg.COMPONENT.BAR_OOB_MAX,barOobMinKey:yg.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"})},extract:function(e){return r=e.node.childrenNodes?e.node.childrenNodes:[e.node],jy.extractData(e,t,n)},placement:"bounds",afterShow:function(){var e,i,o=t.app,a=t.properties,u=t.customTooltipModel;t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=(i=t.app).isInModalSelection)||void 0===e||!e.call(i))&&u.useCustomTooltip&&u.embed&&Rh.show({app:o,properties:a,selectedNodes:r,customTooltipModel:u,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}var Ry=function(e,t){return[_e.getTitleRow({title:e.node.data.label},t)]},Fy=function(e,t){var n=e.filter((function(e){return e.data&&e.key===t}));return n.length?[n[0]]:[]};function zy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("categorical"!==t.colorService.getMain().getSettings().type)return!1;var r=Fe({key:yg.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return de(!0,r,{scale:yg.SCALE.MAIN.COLOR,settings:{filter:function(e){return Fy(e,yg.COMPONENT.LEGEND_COLOR_CAT)},extract:function(e){return Ry(e,n)},placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function Hy(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function Vy(e,t,n){return function(e,t,n){if(!e)return!1;var r=t.translator,i=n.rtl;return{key:"disclaimer",type:"disclaimer",layout:{dock:he[e].alignment},settings:{label:r.get("Object.Disclaimer.".concat(e)),rtl:i}}}(function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(Hy))return"OnlyNanData";var n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){var r=e.qHyperCube.qDimensionInfo[1];n=oy(r)>Se.maxNumberOfLines}return!!n&&"LimitedData"}(e.layout,t),t,{rtl:n})}function By(e,t){var n,r=t.fill;return U(n={},yg.FORMATTER.MINOR,{data:{fields:e.viewModel.fields.minor}}),U(n,yg.FORMATTER.COLOR,r&&r.data&&r.data.field?{data:{field:r.data.field}}:{}),n}var _y=1,Uy=3;function Wy(e){return e.getLayoutValue("gridLine.auto")}function Ky(e){return!Wy(e)&&e.getLayoutValue("gridLine.spacing")===_y}function Gy(e){return!Wy(e)&&e.getLayoutValue("gridLine.spacing")===Uy}var Yy=function(e,t){var n=t.themeService,r=t.layoutService,i=t.dockService;if(!Wy(r)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(r))return!1;var o=n.getStyles().grid,a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:ry.measureAxis.minimumLayoutMode},preferredSize:function(){return{size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}},ticks:{show:!Ky(r)||function(e,t){return t%2==0},stroke:o.line.major.color},minorTicks:{show:Gy(r),stroke:o.line.minor.color}};return a["horizontal"===i.meta.major.orientation?"y":"x"]=yg.SCALE.MAIN.MINOR,a};function Xy(e,t){var n=[Yy(0,t)];return n[0]&&n.push(function(e){var t=e.dockService,n=e.themeService,r=e.viewCache.get("minorMinMax");if(r.min>0||r.max<0)return!1;var i=n.getStyles(),o={};return o["horizontal"===t.meta.minor.orientation?"x":"y"]=[{value:0,scale:yg.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:yg.SCALE.MAIN.MINOR,lines:o}}(t)),n}var Jy=function(e){return{type:"Pan",key:"panorama",options:{event:"areaPan",pointers:1,threshold:10,enable:function(t,n){return"areaPan"===this.started||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key===yg.COMPONENT.BAR}))}},events:{areaPanstart:function(t){t.preventDefault(),this.started="areaPan";var n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component(yg.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove:function(t){t.preventDefault();var n=this.areaPan,r=n.span,i=n.min,o=n.max,a=n.size,u=-t.deltaX/a;e.viewState.set("zoom",{min:Math.min(i+u*r,e.viewCache.get("continuousMax")-r),max:Math.max(o+u*r,e.viewCache.get("continuousMin")+r)})},areaPanend:function(e){e.preventDefault(),this.started=!1},areaPancancel:function(e){e.preventDefault(),this.started=!1}}}};function $y(e,t){if(e.layoutService.meta.isDiscrete)return{};var n=e.viewCache,r=e.viewState,i=e.chart,o=t.rtl,a=Rp.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:yg.COMPONENT.BAR}),u={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:function(t,n){return!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key===yg.COMPONENT.BAR}))}},events:{zoomstart:function(e){u.last=e.scale,e.preventDefault()},zoommove:function(e){var t=e.scale-u.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),u.last=e.scale}}}}function Zy(e,t,n){var r,i=e.chart,o=i.component(yg.COMPONENT.BASE_TOOLTIP);o&&o.show&&(o.emit("hide"),null!=n&&null!==(r=n.customTooltipModel)&&void 0!==r&&r.useCustomTooltip&&t&&t({},o,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));var a=i.component(yg.COMPONENT.LEGEND_CAT_TOOLTIP);a&&a.show&&a.emit("hide");var u=i.component(yg.COMPONENT.TREND_LINES_TOOLTIP);u&&u.show&&u.emit("hide")}function Qy(e,t){var n=e.viewCache,r=e.viewState,i=e.chart,o=e.trendLineModel,a=e.layoutService,u=t.rtl,s=e.layoutService.meta.isContinuous?Rp.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:u,threshold:50,targetKey:yg.COMPONENT.BAR}):void 0,l=ug({majorInnerScale:yg.SCALE.MAIN.MAJOR_INNER,tooltip:yg.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:yg.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:u}),c=[yg.COMPONENT.BAR,yg.COMPONENT.BAR_AXIS,yg.COMPONENT.GROUP_AXIS,yg.COMPONENT.BAR_OOB_MAX,yg.COMPONENT.BAR_OOB_MIN],f=e.customTooltipModel.utils,d=e.debouncer(f.displayTooltip,f.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel:function(t){var n,r=!1;if(e.actions.scroll.enabled()){var i={x:t.clientX,y:t.clientY};(n=Q(e.chart.componentsFromPoint(i).filter((function(e){return e.key===yg.COMPONENT.BAR})),1)[0])&&(e.layoutService.meta.isContinuous&&s(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&((n=Q(e.chart.componentsFromPoint(t).filter((function(e){return e.key===yg.COMPONENT.LEGEND_COLOR_CAT})),1)[0])&&(r=!0,function(e,t){var n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n)));r&&t.preventDefault(),Zy(e,d,e)},mousemove:function(t){if(e.actions.tooltip.enabled()){if(l(t))return;var n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(yg.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((function(e){return c.indexOf(e.key)>-1}))){var i=e.customTooltipModel;if(i.useCustomTooltip&&f.checkIfPromisesExist({customTooltipModel:i})){var o=f.getNodes(t,this.chart);d(t,r,{nodes:o,opts:e,customTooltipModel:i})}else r.emit("show",t)}else r.emit("hide");var a=this.chart.component(yg.COMPONENT.LEGEND_CAT_TOOLTIP);a&&a.show&&(n.some((function(e){return e.key===yg.COMPONENT.LEGEND_COLOR_CAT}))?a.emit("show",t):a.emit("hide"))}},mouseup:function(t){2===t.button&&Zy(this,d,e)},mouseleave:function(){Zy(this,d,e)}}}}var eb=function(e,t){return{type:"hammer",enable:!0,gestures:[].concat(ee((t.hammer||{}).gestures||[]),ee(tm(R(R({},e),{},{componentKey:"scrollbar",rtl:t.rtl})).gestures),ee(e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[Jy(e,t.rtl),$y(e,t)]))}};function tb(e,t){if(!e.actions.interact.enabled())return[];var n=[eb(e,t),Qy(e,t),tm(R(R({},e),{},{componentKey:"scrollbar",rtl:t.rtl})).native];return e.layoutService.meta.isDiscrete&&n.push(e.discrete.interactions.native),n}var nb=function(e,t,n,r,i){var o=i.ds,a=i.colorService.getMain();if("measure"===a.getSettings().mode||"field"===a.getSettings().mode||/qAttrDimInfo/.test(a.getSettings().field))return r.map((function(r){return i=r.label,e.measureText({text:i,fontSize:t,fontFamily:n});var i})).reduce((function(e,t){return t&&t.width>e.width?t:e}),{width:0});var u=o.field(a.getSettings().field).raw().qApprMaxGlyphCount;u=Pe.getAdjustedMaxGlyphCount(u,r,void 0,"label");var s=new Array(u+1).join("m");return e.measureText({text:s,fontSize:t,fontFamily:n})};var rb=function(e,t,n){var r=n.collectionKey;if(!_p({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,t,n){var r=t.reducedDataModel,i=t.colorService,o=t.continuousDataModel;return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:function(){return o.getDimensionCardinality()>1},data:{collection:n.collectionKey},settings:{box:de(!0,{},e.settings.box,{minWidthPx:2,fill:i.getMini().getColor(),strokeWidth:0}),major:de(!0,{},e.settings.major,{scale:r.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}(e,t,{collectionKey:r});var i,o=t.reducedDataModel,a=o.mode,u=o.scales;return a.isGroupedByDimension&&!a.isReduced?i=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:a.isGroupedByMeasure&&(i=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2}),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:function(){return t.discrete.query.getCanScroll()},data:{collection:r},settings:{box:R(R({},e.settings.box),{},{fill:a.isReduced||a.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0}),major:{scale:u.major,fn:i},minor:{scale:u.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}},ib=e.renderer("svg")().measureText;function ob(e,t,n){return{reducedMinor:function(e){var t=de(!0,{},e);return delete t.data,t}(t.minor),reducedMajor:function(e,t,n){var r=n.majorScaleInvert,i=n.maxPxStep,o=n.align,a=n.getProp,u={invert:r,data:{extract:e.mode.isDimensionless?e.fields.minor.map((function(e,t){return{field:e,value:t}})):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:i,align:o};return e.mode.isStackedByDimension?u.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(u.data={source:"miniCube",hierarchy:{value:function(e){return e.qElemNumber}}}):e.mode.isGroupedByMeasure?(u=de(!0,{},t)).data.extract.source="miniCube":e.mode.isContinuous&&(u=de(!0,{},t,{min:function(){return a("continuousMin")},max:function(){return a("continuousMax")}})),u}(e,t.major,n)}}var ab=50,ub=100,sb=200;function lb(e,t){var n=function(e){var t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return ab;case 1:return ub;case 2:return sb;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function cb(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function fb(e,t,n){return 0===t||0===e||t===n.length-1}function db(e){for(var t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function pb(e,t,n,r,i){e.domain([t,n]),e.nice(10);var o=Q(e.domain(),2),a=o[0],u=o[1],s=e.ticks(10),l=function(e){return e.length%2==0}(s),c=function(e){var t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((function(e){return 0===e}))}(s),f=c?fb:cb;s=s.filter(f),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);var d=i?i.formatter(yg.FORMATTER.MINOR):void 0;return db(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:a,roundedMax:u,ticks:s}}function mb(e,t,n,r,i,o,a,u){var s=o.formatter(yg.FORMATTER.MINOR),l=u.getStyles(),c="horizontal"===a.meta.major.orientation?"height":"width",f=function(e){return ib({text:e,fontSize:l.axis.label.name.fontSize,fontFamily:l.axis.label.name.fontFamily})[c]},d=Q(e.domain(),2),p=d[0],m=d[1],h=e.ticks(r);function v(){var e=h.map(s);return!db(e)&&function(e){var t=i/h.length;return Math.max.apply(Math,ee(e.map(f)))<=t}(e)}for(var g=r-1;g>0&&!v();g--){e.domain([t,n]),e.nice(g);var y=Q(e.domain(),2);p=y[0],m=y[1],h=e.ticks(g)}return{roundedMin:p,roundedMax:m,ticks:h}}var hb=function(e,t){return e.value-t.value},vb=function(e){return{value:e,isMinor:!1}},gb=function(e){return{value:e,isMinor:!0}};function yb(e,t,n){var r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((function(e){return function(e){return Number.isNaN(t)||e>=t}(e)&&function(e){return Number.isNaN(n)||e<=n}(e)})).length<=r}function bb(e){var t=e.chart,n=e.viewCache,r=e.dockService,i=e.layoutService,o=e.themeService,a=n.get("minorMinMax"),u=a.explicitMin,s=a.explicitMax,l=a.hasExplicitMin,c=a.hasExplicitMax,f=function(e){var t=e.get("minorMinMax"),n=t.min,r=t.max;return n===r&&0===n&&(n-=1,r+=1),{min:n,max:r}}(n),d=f.min,p=f.max,m=mc((function(){var e,a,f=function(e,t,n){var r;return r=e?n.meta.chart.size:t.component(yg.COMPONENT.BAR).rect,"horizontal"===n.meta.major.orientation?r.height:r.width}(n.get("isPreRender"),t,r),m=lb(f,i),h=function(e,t,n){var r=Er().domain([e,t]);return r.nice(n),r}(d,p,m),v=[];if("SPARK"===r.meta.chart.mode){var g=function(e,t){return{roundedMin:e,roundedMax:t}}(d,p);e=g.roundedMin,a=g.roundedMax}else{var y=mb(h,d,p,m,f,t,r,o);if(e=y.roundedMin,a=y.roundedMax,yb(v=y.ticks,u,s)){var b=pb(h,d,p,l||c,t);e=b.roundedMin,a=b.roundedMax,v=b.ticks}}var x=function(e,t){for(var n=[],r=0;r<e.length-1;r++)for(var i=e[r],o=(e[r+1]-i)/(t+1),a=1;a<=t;a++)n.push(i+o*a);return n}(v,1);return v=function(e,t,n){return e&&n.length&&!n.some((function(e){return e===t}))?(n.unshift(t),n.filter((function(e){return e>=t}))):n}(l,u,v),{roundedMin:e,roundedMax:a,ticks:function(e,t){return[].concat(ee(e.map(vb)),ee(t.map(gb))).sort(hb)}(v=function(e,t,n){return e&&n.length&&!n.some((function(e){return e===t}))?(n.push(t),n.filter((function(e){return e<=t}))):n}(c,s,v),x)}}),(function(){return n.get("isPreRender")}));return{values:function(){return m().ticks},min:function(){return l?u:m().roundedMin},max:function(){return c?s:m().roundedMax}}}function xb(e,t,n){var r,i,o=t.picasso,a=t.discrete,u=t.layoutService,s=t.dockService,l=t.viewModel,c=t.viewCache,f=t.reducedDataModel,d=t.colorService,p=t.themeService,m=t.viewState,h=t.chart,v=n.localeInfo,g=n.rtl,y=u.meta,b=l.fields,x=function(){if("custom"!==u.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,s.meta.chart.size["horizontal"===s.meta.major.orientation?"height":"width"]/4)},q=!("none"===u.getLayoutValue("measureAxis.show"))?(r=s.meta.minor.orientation,i=s.meta.minor.dock,"vertical"===r?"near"===i||"left"===i?0:1:"near"===i||"bottom"===i?1:0):.5,M={},S="vertical"===s.meta.minor.orientation&&g,D=d.getMain().getScales(),C=d.getMini().getScales();if(Object.assign(M,D,{reducedFill:C.reducedFill}),M[yg.SCALE.MAIN.MINOR]=function(e,t){var n=e.chart,r=e.viewModel.fields,i=e.dockService,o=e.viewCache,a=e.layoutService,u=e.themeService,s=t.rtl,l=bb({chart:n,dockService:i,viewCache:o,layoutService:a,themeService:u}),c={invert:"vertical"===i.meta.minor.orientation||s,ticks:{values:l.values},minorTicks:{count:1},min:l.min,max:l.max};return a.meta.isStacked||(c.data={source:"qHyperCube",fields:r.minor}),c}({chart:h,viewModel:l,dockService:s,viewCache:c,layoutService:u,themeService:p},{rtl:g}),y.isGroupedByDimension)[yg.SCALE.MAIN.MAJOR_INNER,yg.SCALE.MAIN.MAJOR].forEach((function(e,t){M[e]={invert:S,data:{source:"qHyperCube",hierarchy:{label:function(e){return e.qText?e.qText:""},value:function(e){return e.qElemNumber},props:R(R({},l.selectionDimensionProp(t)),{},{group:y.isGroupedByDimension?{field:b.majorGroup}:void 0})}},label:function(e){return e.datum.label},ticks:{depth:t+1},maxPxStep:x,align:q}}));else if(y.isGroupedByMeasure)M[yg.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:S,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:R({},l.selectionDimensionProp(0))}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:x,align:q};else if(y.isTime){var w=function(e,t){var n=e.layoutService,r=e.viewModel,i=e.viewCache,o=e.picasso,a=e.viewState,u=e.localeInfo,s=e.themeService,l=function(){return n.getHyperCubeValue("qAxisData.qAxis",[])},c=o.formatter("q-time"),f=s.getStyles(),d=function(e){return ib({text:e,fontSize:f.axis.label.name.fontSize,fontFamily:f.axis.label.name.fontFamily})};i.set("qTimeAxisCache",[]);var p={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;i.get("qTimeAxisCache")[n]=[e,t]},key:function(e){var t=e.distance,n=a.get("zoom"),r=n.min,o=(n.max-r)/(i.get("continuousMax")-i.get("continuousMin")),u=l().map((function(e){return e.qName}));return[t,o.toString().length>12?o.toPrecision(12):o].concat(ee(u)).toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:l,field:r.fields.majorNumeric,min:function(){return a.get("zoom").min},max:function(){return a.get("zoom").max},invert:!!t,formatter:{fn:c,localeInfo:u,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:d},ticks:{generator:{type:"d3"},level:"inner",anchor:"start",clamp:!0},cache:p},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:l,field:r.fields.majorNumeric,min:function(){return a.get("zoom").min},max:function(){return a.get("zoom").max},invert:!!t,formatter:{fn:c,localeInfo:u,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:d},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:p}}}({picasso:o,localeInfo:v,viewState:m,viewModel:l,viewCache:c,themeService:p,layoutService:u},g),O=w.innerTime,T=w.outerTime;M[yg.SCALE.MAIN.MAJOR_INNER]=O,M[yg.SCALE.MAIN.MAJOR]=T}else y.isContinuous?M[yg.SCALE.MAIN.MAJOR]={type:"linear",invert:S,data:{extract:{key:"qHyperCube",field:b.majorNumeric}},ticks:{forceBounds:!0,count:m.get("zoom").min===m.get("zoom").max?1:void 0},minorTicks:{count:1},min:function(){return m.get("zoom").min},max:function(){return m.get("zoom").max}}:M[yg.SCALE.MAIN.MAJOR]={invert:S,data:{extract:y.isDimensionless?b.minor.map((function(t,n){return{field:t,label:function(){return e.qHyperCube.qMeasureInfo[n].qFallbackTitle},value:n}})):{source:"qHyperCube",field:"qDimensionInfo/0",props:R({},l.selectionDimensionProp(0))}},type:y.isDimensionless?"band":void 0,maxPxStep:x,align:q};var A=ob(f,{major:M[yg.SCALE.MAIN.MAJOR],minor:M[yg.SCALE.MAIN.MINOR]},{majorScaleInvert:S,maxPxStep:x,align:q,getProp:c.get}),E=A.reducedMinor,L=A.reducedMajor;return y.isDiscrete&&(M[yg.SCALE.MAIN.MAJOR].range=a.query.getScaleRange,y.isGroupedByDimension&&(M[yg.SCALE.MAIN.MAJOR_INNER].range=a.query.getScaleRange)),M[f.scales.major]=L,M[f.scales.minor]=E,M}function qb(e){var t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");var n,r=R({key:"lasso"},e),i={key:(n=r).key,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:n.components},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}};return{interactions:[function(e,t){var n=e.key,r=e.componentTargetKey,i=e.requireFailure,o=e.recognizeWith;return{key:"event:".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:"lasso",enable:function(e,n){return"lasso"===this.started||!n||!!(t.actions.select.enabled()&&t.actions.lasso.enabled()&&t.actions.lasso.active())&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((function(e){return e.key===r})).length>0}},events:{lassostart:function(e){e.preventDefault(),"lasso"!==this.started&&(t.actions.select.emit("start","lasso"),this.chart.component(n).emit("lassoStart",e),this.started="lasso")},lassomove:function(e){e.preventDefault(),this.chart.component(n).emit("lassoMove",e)},lassoend:function(e){e.preventDefault(),this.started=!1,this.chart.component(n).emit("lassoEnd",e),t.actions.select.emit("end","lasso")}}}}(r,t)],components:[i]}}({key:"lasso",componentTargetKey:yg.COMPONENT.BAR,components:[t?{key:yg.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:yg.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function Mb(e){return function(e,t){var n=function(e){var t=e.key,n=e.targets,r=e.components,i=e.fillTargets,o=e.dock;return{key:t,type:"brush-area-dir",layout:{dock:n.map((function(e){return"@".concat(e)})).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[ty(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:yg.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",yg.COMPONENT.BAR_AXIS,yg.COMPONENT.BAR],fillTargets:["group-axis",yg.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function Sb(e,t){var n=void 0===t,r=e.selectionService.getIsSingleSelect(t),i=function(e,t,n){var r=e.layoutService,i=e.colorService;return ey({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?yg.COMPONENT.STACK_TOTAL_BAR:yg.COMPONENT.BAR,yg.COMPONENT.BAR_AXIS,yg.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",yg.COMPONENT.LEGEND_COLOR_CAT],components:function(e,t){var r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return[yg.COMPONENT.BAR,yg.COMPONENT.BAR_AXIS,yg.COMPONENT.GROUP_AXIS].includes(t[0].key)?[R(R({},r),{},{data:["selectionDimension"]})]:[r]}},R(R({},e),{},{isLocked:function(n){return n.some((function(e){return e.key===yg.COMPONENT.LEGEND_COLOR_CAT}))?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)}}))}(e,n,r);if(n||r)return{components:ee(i.components),gestures:ee(i.interactions)};var o=qb(e),a=function(e){return e.layoutService.meta.isStacked?{components:[],interactions:[]}:ny({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",yg.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:yg.SCALE.MAIN.MINOR,onEdited:function(){e.actions.select.emit("end","measureRange")}},e)}(e),u=function(e){return e.layoutService.meta.isContinuous?ny({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",yg.COMPONENT.BAR]:["continuous-axis",yg.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?yg.SCALE.MAIN.MAJOR_INNER:yg.SCALE.MAIN.MAJOR,toLabel:function(t){var n=t.datum,r=t.data,i=t.scale,o=e.layoutService.meta.isTime?i.formatter():e.chart.formatter(yg.FORMATTER.MINOR),a=e.chart&&e.chart.brushSelectionIncludeMax;return"".concat(n!==Math.max.apply(Math,ee(r))||a?"":"<").concat(o(n))}},e):{components:[],interactions:[]}}(e),s=Mb(e);return{components:[].concat(ee(i.components),ee(o.components),ee(a.components),ee(s.components),ee(u.components)),gestures:[].concat(ee(o.interactions),ee(i.interactions),ee(a.interactions),ee(s.interactions),ee(u.interactions))}}function Db(e){var t=e.layoutService,n=e.viewModel,r=e.dockService,i=t.meta;if(!i.isStackedByDimension||i.isContinuous)return!1;var o=n.fields,a=t.getLayoutValue("components",null),u=a?a.filter((function(e){return"bar"===e.key}))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:o.majorStack,filter:function(e){return 0!==e.qDown||0!==e.qUp},props:{start:{value:function(e){return t=e.qSubNodes,Number(t.map((function(e){return e.qMaxPos})).reduce((function(e,t){return e+t}),0).toFixed(13));var t}},end:{value:function(e){return Number(e.qMaxPos.toFixed(13))}}}},{field:o.majorStack,filter:function(e){return 0!==e.qDown||0!==e.qUp},props:{start:{value:function(e){return t=e.qSubNodes,Number(t.map((function(e){return e.qMinNeg})).reduce((function(e,t){return e+t}),0).toFixed(13));var t}},end:{value:function(e){return Number(e.qMinNeg.toFixed(13))}}}}]},settings:{major:{scale:yg.SCALE.MAIN.MAJOR},minor:{scale:yg.SCALE.MAIN.MINOR},orientation:r.meta.minor.orientation,box:{width:u&&u.style.width>0?u.style.width:.7,fill:function(){return{type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]}}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}var Cb={min:"Min",max:"Max"};function wb(e,t,n){var r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?gy(e,t)||yy(e,t):n===by?gy(e,t):yy(e,t)}(Number(r.toFixed(13)),e,t)}function Ob(e,t){var n=t.barComponent,r=t.type,i=t.isStacked,o=e.viewCache,a=e.layoutService,u=e.dockService,s=o.get("minorMinMax"),l=r===by;if(function(e,t){return!e["hasOther".concat(Cb[t])]}(s,r)){if(function(e,t){return!e["hasExplicit".concat(Cb[t])]}(s,r))return!1;if(wb(s,r,l))return!1}if(function(e,t,n){var r=n?function(e){return e<0}:function(e){return e>0};return e["hasExplicit".concat(Cb[t])]&&r(e["explicit".concat(Cb[t])])}(s,r,l))return!1;var c="end";i&&(c=l?"sumOfPositives":"sumOfNegatives");var f=function(e){var t;return function(){return void 0===t&&(t=e()),t}}((function(){return e.chart.scale(yg.SCALE.MAIN.MINOR)[r]()})),d=l?function(e){return e.datum[c].value>f()}:function(e){return e.datum[c].value<f()},p=yg.COMPONENT.BAR,m=e.layoutService.getLayoutValue("components",[]),h=m?m.filter((function(e){return e.key===p}))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-".concat(r),layout:{dock:l?u.meta.minor.end:u.meta.minor.start},data:n.data,brush:n.brush,settings:{orientation:n.settings.orientation,major:n.settings.major,minor:n.settings.minor,hat:de({},n.settings.box,{fill:a.meta.isStacked?"#999":n.settings.box.fill,alignment:1,opacity:1,show:d,width:fy({layoutService:e.layoutService,discrete:e.discrete,componentKey:p}),strokeWidth:h?cy.BAR.STROKE.WIDTH[h.style.strokeWidth.toUpperCase()]:cy.BAR.STROKE.WIDTH.NONE,stroke:h?h.style.strokeColor.color:cy.BAR.STROKE.COLOR})}}}function Tb(e,t){var n;return n=e.isContinuous?1:.7,!e.isContinuous&&t&&t.style.width>0?t.style.width:n}function Ab(e,t,n){var r=t.collectionKey,i=e.layoutService.meta,o=e.viewModel.fields,a=i.isStackedByDimension&&!i.isContinuous?"qValue":"qNum",u=function(e){return"NaN"===e[a]?0:e[a]};function s(t){var n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),i=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:u,label:function(e){return i?function(e){return"NaN"===e[a]?"-":r(e[a])}(e):e.qText}}}var l=i.isStackedByDimension?function(e){return"NaN"===e.qValue}:function(e){return!!e.qIsNull};var c={key:r,data:{extract:o.minor.map((function(t,r){var a,u=e.colorService.getMain().getDatumProps(r),c=e.colorService.getMini().getDatumProps(r),f=u[Object.keys(u)[0]],d=null==f?void 0:f.field,p=d?{field:d,reduceLabel:"none",value:function(e){return void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}}:void 0,m={field:i.isDimensionless?t:o.major,props:R(R(R(R({},e.viewModel.selectionDimensionProp()),{},{start:0,end:s(t),null:(a=t,{field:a,reduceLabel:"none",reduce:"first",value:l}),segment:i.isStacked?s(t):void 0,group:i.isGroupedByDimension?{field:o.majorGroup}:void 0,stack:i.isStacked?{field:o.majorStack}:void 0,measureIndex:i.isGroupedByDimension||i.isStackedByDimension?void 0:r,timeStart:i.isContinuous?{field:o.majorNumeric}:void 0,timeEnd:i.isContinuous?{field:o.majorNumeric}:void 0,fillTooltip:p},u),c),{},{id:{value:function(e){return"r".concat(e.qRow,"e").concat(e.qElemNumber,"m").concat(r)}},customTooltipAttrExps:0!==i.dimensionCount?Uh(e.layoutService.getLayout(),i):void 0})};return i.isDimensionless&&(m.value=r),void 0!==n&&(m.source=n),we(m.props),m}))}};return i.isStacked&&(c.data.stack={stackKey:function(e){return e.stack.value},value:function(e){return e.end.value},offset:"diverging"}),c}function Eb(e,t){var n=e.layoutService,r=e.viewModel,i=t.collectionKey,o=n.meta,a=r.fields;return!!o.isStacked&&{key:i,data:{extract:o.isStackedByMeasure?function(e,t){var n={field:0,props:{sumOfPositives:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)},reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)},reduceLabel:"none"},null:{fields:t.minor.map((function(e){return{field:e}})),value:function(e){return Array.isArray(e)&&e.every((function(e){return"NaN"===e}))},reduceLabel:"none"}}};if(e.isContinuous){var r={field:t.major,value:function(e){return e.qNum},reduceLabel:"none"};n.props.timeStart=r,n.props.timeEnd=r,n.value=function(e){return e.qNum}}return n}(o,a):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:function(e){return Number(e.qMaxPos.toFixed(13))}},sumOfNegatives:{value:function(e){return Number(e.qMinNeg.toFixed(13))}},null:{value:function(e){var t=e.qSubNodes;return(void 0===t?[]:t).every((function(e){return"NaN"===((e.qSubNodes||[])[0]||{}).qValue}))}}}};var n={field:t.majors[0],value:function(e){return e.qNum},reduceLabel:"none"};return{field:t.majorStack,trackBy:function(e){return e.qNum},reduce:function(e){return e[0]},props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:function(e){return e.reduce((function(e,t){return t>0?e+t:e}),0)}},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:function(e){return e.reduce((function(e,t){return t<0?e+t:e}),0)}},timeStart:n,timeEnd:n}}}(o,a)}}}var Lb="main-collection",kb="stack-total-collection";var Nb="mini-collection",Ib="mini-stack-collection",jb="mini-continuous-collection",Pb="miniCube",Rb=function(e,t){var n=[];return _p({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(Ab(t,{collectionKey:jb},Pb)):t.layoutService.meta.isStacked?n.push(function(e,t){var n=t.collectionKey,r=e.colorService,i=e.reducedDataModel,o=i.fields,a=i.mode;return{key:n,data:{extract:o.minor.map((function(e,t){var n=R({end:{field:e,reduceLabel:"none"}},a.isStackedByMeasure&&!a.isReduced?r.getMain().getDatumProps(t):{});return a.isContinuous&&(n.timeStart={field:o.major,value:function(e){return e.qNum}},n.timeEnd=n.timeStart),{source:"miniCube",field:o.major,props:n}})),stack:{stackKey:function(e){return e.value},value:function(e){return e.end.value},offset:"diverging"}}}}(t,{collectionKey:Ib})):n.push(function(e,t){var n=t.collectionKey,r=e.colorService,i=e.reducedDataModel,o=i.fields,a=i.mode;return{key:n,data:{extract:o.minor.map((function(e,t){var n=a.isReduced?{}:r.getMain().getDatumProps(t),i=R({end:{field:e},start:0,group:{field:o.majorGroup},measureIndex:t},n),u={source:"miniCube",field:a.isDimensionless?e:o.major,props:i};return a.isDimensionless&&(u.value=t),u}))}}}(t,{collectionKey:Nb}))),n},Fb=function(e,t){var n=function(e){var t=[Ab(e,{collectionKey:Lb})];return e.layoutService.meta.isStacked&&t.push(Eb(e,{collectionKey:kb})),t}(t),r=Rb(0,t);return n.concat(r)};function zb(e,t,n){var r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Hb(e,t,n){var r=e.layout,i=e.component;if(!ky(r,t))return!1;var o=t.layoutService.meta,a=!Ly(r,t),u=t.themeService.getStyles();function s(e){var n=t.chart.formatter(yg.FORMATTER.MINOR);return n?n(e):e}var l={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":s(e.data.sumOfPositives.value)},simplifiedPlacements:zb("outside",a,o.isContinuous),style:u.label.value},c={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":s(e.data.sumOfNegatives.value)},simplifiedPlacements:zb("opposite",a,o.isContinuous),style:u.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:i,selector:"rect",strategy:{type:"bar",settings:{direction:function(e){return Ey(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,n)},labels:[Ty(de(t,l)),Ty(de(t,c))],fontSize:u.label.value.fontSize,fontFamily:u.label.value.fontFamily}}}]}}}function Vb(e,t,n){var r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function Bb(e,t){var n=e.layout,r=e.type,i=t.layoutService,o=t.viewCache,a=t.themeService,u=i.meta,s=u.isStacked;if(!s&&!Ly(n,t)||s&&!ky(n,t))return!1;var l=o.get("minorMinMax");if(!l.hasExplicitMinMax||r===by&&0===l.max||r===xy&&0===l.min)return!1;if(!My(r===by?l.implicitMax:l.implicitMin,l,r))return!1;var c=a.getStyles();var f=function(e){return e.data.end.label};u.isStacked&&(f=r===by?function(e){if(My(e.data.sumOfNegatives.value,l,r)){var n=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,i=t.chart.formatter(yg.FORMATTER.MINOR);return i?i(n):n}return""}:function(e){if(My(e.data.sumOfPositives.value,l,r)){var n=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,i=t.chart.formatter(yg.FORMATTER.MINOR);return i?i(n):n}return""});var d={color:"#595959",lightColor:"#E6E6E6",darkColor:"#595959",fontSize:13,fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'"},p={label:f,simplifiedPlacements:Vb("outside",true,u.isContinuous),style:d},m={label:f,simplifiedPlacements:Vb("opposite",true,u.isContinuous),style:d},h=[Ty(de(t,p)),Ty(de(t,m))],v="vertical"===t.dockService.meta.minor.orientation?"down":"right",g=[{component:"".concat(yg.COMPONENT.GHOST_BAR_OOB,"-").concat(r),selector:"rect",strategy:{type:"bar",settings:{direction:v,labels:h,fontSize:c.label.value.fontSize,fontFamily:c.label.value.fontFamily}}}];return{key:"bar-oob-labels-".concat(r),type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:g}}}function _b(e){return"all"===e||"title"===e}function Ub(e,t,n){if(!_b(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;var r=t.actions,i=t.properties,o=t.themeService.getStyles(),a={hyperCube:e.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:function(){var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleDimensions&&(a.padding="0",a.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:ry["".concat(t.dockService.meta.major.orientation,"DimensionAxisTitle")].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:a,style:{fontFamily:o.axis.title.fontFamily,fontSize:o.axis.title.fontSize,color:o.axis.title.color}}}function Wb(e,t,n){if(!_b(e.measureAxis.show))return!1;var r=t.layoutService,i=t.actions,o=t.properties,a=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",u=t.themeService.getStyles(),s={hyperCube:r.getHyperCube(),hyperCubeDef:fc(o,a),isDimension:!1,disabled:function(){return!i.interact.enabled()},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleMeasures&&(s.padding="0",s.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:s,style:{fontFamily:u.axis.title.fontFamily,fontSize:u.axis.title.fontSize,color:u.axis.title.color}}}var Kb=function(e,t,n){var r,i=t.layoutService,o=t.dockService,a=t.colorService,u=t.chart,s=t.actions,l=t.discrete,c=t.continuousDataModel,f=t.reducedDataModel,d=t.viewModel,p=t.viewState,m=t.viewCache,h=t.themeService,v=t.refLineModel,g=t.pluginService,y=t.rtl,b=t.logicalSize,x=n.localeInfo,q=Vy({layout:e},t,y);if(q&&"center"===q.layout.dock)return{components:[q]};var M=xb(e,t,{localeInfo:x,rtl:y}),S=!(null!=s&&null!==(r=s.interact)&&void 0!==r&&r.enabled()),D=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:p,chart:u,styleReference:"object.barChart",rtl:y,settings:{item:{shape:{size:10}}}},{actions:s,navigationDisabled:S}),C=D.components[0];if(C){var w=C.layout.dock;if(M.fillRange&&(["right","left"].includes(w)||y)&&(M.fillRange.invert=!0),"legend-seq"===C.type&&void 0!==d.selectionDimensionIdx&&M.fillRange&&M.fillRange.min<M.fillRange.max){var O,T,A=ny({eventName:"legendRange",key:"legendRangeBrush",targets:[C.key],fillTargets:[C.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:C.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:function(){s.select.emit("end","legendRange")}},t);(O=D.components).push.apply(O,ee(A.components)),(T=D.interactions).unshift.apply(T,ee(A.interactions))}if("legend-cat"===C.type){var E=function(e,t){var n,r,i,o,a,u,s=["top","bottom"].indexOf(e.layout.dock)>-1,l=fc(t,"properties.legend.showTitle"),c=t.chart.theme().style("$font-family"),f=t.picasso.renderer(e.renderer)(),d=function(e,t,n,r){return e.measureText({text:r,fontSize:t,fontFamily:n})}(f,fc(e,"settings.title.fontSize","16px"),c,t.colorService.getMain().getSettings().label),p=s&&!l?0:Math.min(135,d.width),m=(n=e.scale,i=(r=t).ds,o=r.picasso,a=r.colorService.getMain(),u=a.getData().map((function(e){return e.key})).indexOf("attrDim"),"field"===a.getSettings().mode&&"measure"===a.getSettings().fieldType?function(e,t){for(var n=[],r=e.field(t.data.field).formatter(),i=t.domain,o=1;o<i.length;o++)n.push({label:"".concat(r(i[o-1])," - < ").concat(r(i[o]))});return n}(i,a.getScales()[n]):"measure"===a.getSettings().mode?i.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return{label:e.title()}})):u>-1?o.data("q")({data:a.getData()[u].data}).extract({field:"qDimensionInfo/0"}):i.field(a.getSettings().field).items()),h=nb(f,fc(e,"settings.item.label.fontSize","12px"),c,m,t),v=Math.min(117,h.width),g=Math.min(151,Math.max(p+16,v+24+10)),y=g-10-24,b={key:e.key,preferredSize:function(){return g},settings:{title:{maxWidth:function(){return g-16}},item:{label:{maxWidth:function(){return y},wordBreak:"break-word",maxLines:2}}}};return s&&(y=136,b={key:e.key,settings:{item:{label:{maxWidth:function(){return y}}}},beforeRender:function(e){var t=fc(e.size,"computedInner.width",0);y=(t-p-16)/m.length-10-16,y=Math.max(y,136)}}),b}(C,t);D.components.forEach((function(e){e.key===E.key&&de(!0,e,E)}))}}else M.fillRange&&y&&(M.fillRange.invert=!0);var L,k=function(e,t){var n,r,i=t.componentKey,o=t.collectionKey,a=e.layoutService.meta;a.isGroupedByDimension?n=function(e){var t=e.scale,n=e.datum;return t([n.group.value,n.value])+t.bandwidth([n.group.value,n.value])/2}:a.isGroupedByMeasure&&(n=function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2});var u=2;a.isContinuous?(r={start:"timeStart",end:"timeEnd"},u=my(e,i)):a.isStacked&&(r="stack");var s=a.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,l=function(e){var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},c=e.layoutService.getLayoutValue("components",null),f=c?c.filter((function(e){return e.key===i}))[0]:null;return{key:i,type:"box",data:{collection:o},preferredSize:a.isContinuous?function(){return{size:0,edgeBleed:{left:1,right:1}}}:void 0,brush:{consume:[{context:"selection",data:["selectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:a.isContinuous||s?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:yg.SCALE.MAIN.MAJOR,fn:n,ref:r},minor:{scale:yg.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:fy({layoutService:e.layoutService,discrete:e.discrete,componentKey:i}),minWidthPx:u,fill:e.colorService.getMain().getColor(),opacity:function(e){return l(e)?0:void 0},minHeightPx:function(e){return a.isStacked?.1:l(e)?.01:.3},strokeWidth:f?cy.BAR.STROKE.WIDTH[f.style.strokeWidth.toUpperCase()]:cy.BAR.STROKE.WIDTH.NONE,stroke:f?f.style.strokeColor.color:cy.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}(t,{componentKey:yg.COMPONENT.BAR,collectionKey:yg.COLLECTION.MAIN}),N=function(e,t){var n=t.componentKey,r=t.collectionKey,i=e.layoutService.meta;if(!i.isStacked)return!1;var o=2;i.isContinuous&&(o=my(e,n));var a=e.layoutService.getLayoutValue("components",null),u=a?a.filter((function(e){return e.key===n}))[0]:null,s={key:n,type:"box",data:{collection:r},settings:{major:{scale:yg.SCALE.MAIN.MAJOR},minor:{scale:yg.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:Tb(i,u),minWidthPx:o,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:function(e){var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1}},inactive:{opacity:function(e){var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:.3}}}}]}};return i.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s}(t,{componentKey:yg.COMPONENT.STACK_TOTAL_BAR,collectionKey:yg.COLLECTION.STACK_TOTAL}),I=Sb(t,d.selectionDimensionIdx),j=i.meta.isStacked;L=f.mode.isContinuous?yg.COLLECTION.MINI_CONTINUOUS:j?yg.COLLECTION.MINI_STACK:yg.COLLECTION.MINI;var P=j?N:k,F=Xy(0,t),z=[].concat(ee(F),[Ob(t,{barComponent:P,type:"max",isStacked:j}),Ob(t,{barComponent:P,type:"min",isStacked:j}),Dy(t,{barComponent:P,type:"max",isStacked:j}),Dy(t,{barComponent:P,type:"min",isStacked:j}),wy(t,{chart:u,barComponent:P,type:"max",scales:M,collectionKey:j?yg.COLLECTION.STACK_TOTAL:yg.COLLECTION.MAIN}),wy(t,{chart:u,barComponent:P,type:"min",scales:M,collectionKey:j?yg.COLLECTION.STACK_TOTAL:yg.COLLECTION.MAIN})],ee(ly(e,t,y,!!F[0])),[k,N,Db({layoutService:i,viewModel:d,layout:e,dockService:o}),Ub(e,t,y),Wb(e,t,y)],ee(function(e){var t=e.environment,n=e.rtl,r=e.refLineModel,i=e.layoutService,o=e.colorService,a=e.dockService,u=e.themeService,s=e.chart,l=t.theme,c=t.localeInfo,f={resolveUIColor:o.getMain().getPaletteColor},d=u.getStyles();return[Pa({refLineModel:r,layoutService:i,colorModel:f,dockService:a,chart:s,scale:yg.SCALE.MAIN.MINOR,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:yg.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:ry.refLines.minimumLayoutMode}),Pa({isDimension:!0,refLineModel:r,layoutService:i,colorModel:f,dockService:a,chart:s,scale:yg.SCALE.MAIN.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:n,key:yg.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:yg.COMPONENT.BAR,minimumLayoutMode:ry.refLines.minimumLayoutMode})].concat(ee(Fa({refLineModel:r,layoutService:i,colorModel:f,dock:a.meta.minor.opposite,scale:yg.SCALE.MAIN.MINOR,style:d,formatter:yg.FORMATTER.MINOR,theme:l,localeInfo:c,rtl:n,key:yg.COMPONENT.MEASURE_REF_LINE_LABEL})),ee(Fa({isDimension:!0,refLineModel:r,layoutService:i,colorModel:f,dock:a.meta.major.opposite,scale:yg.SCALE.MAIN.MAJOR,style:d,theme:l,localeInfo:c,rtl:n,key:yg.COMPONENT.DIMENSION_REF_LINE_LABEL})))}({environment:n,rtl:y,refLineModel:v,layoutService:i,colorService:a,dockService:o,themeService:h,chart:u})),[qo({viewState:p,viewCache:m,layoutService:i,dockService:o,rtl:y}),rb(k,t,{collectionKey:L}),Up({layoutService:i,dockService:o,discrete:l,continuousDataModel:c,viewState:p,viewCache:m,themeService:h,rtl:y})],ee(tg({majorScale:yg.SCALE.MAIN.MAJOR,minorScale:yg.SCALE.MAIN.MINOR,tooltipOverlay:yg.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},t)),ee(D.components),[Iy({layout:e,component:yg.COMPONENT.BAR,minorScale:M.minor},t,y),Hb({layout:e,component:yg.COMPONENT.STACK_TOTAL_BAR},t,y),Bb({layout:e,component:"bar-oob-max",type:"max"},t),Bb({layout:e,component:"bar-oob-min",type:"min"},t)],ee(I.components),[Py({layout:e},R(R({},t),{},{coloring:a.getMain().getSettings()}),y),zy({layout:e},R(R({},t),{},{coloring:a.getMain().getSettings()}),y),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&q,og({tooltip:yg.COMPONENT.TREND_LINES_TOOLTIP,formatter:yg.FORMATTER.MINOR,majorScale:yg.SCALE.MAIN.MAJOR},t,{rtl:y})]).filter(Boolean);return function(e){if(e&&0!==e.length)for(var t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(z),{interactions:tb(t,{rtl:y,hammer:{gestures:[].concat(ee(D.interactions),ee(I.gestures)).sort((function(e,t){return(t.prio||0)-(e.prio||0)}))}}),scales:M,palettes:a.getMain().getPalettes(),components:g.extendComponents(z),strategy:xe(0,{logicalSize:b,minCenterRatio:0}),formatters:By(t,M),collections:Fb(0,t)}};function Gb(e){var t=e.picasso,n=e.chart,r=e.services,i=e.environment,o=e.viewState,a=e.viewCache,u=k(),s=u.width,l=u.height,c=O(),f=E(),d=S(),p=Q(y(),2),m=p[0],h=p[1],v=Q(y(),2),g=v[0],b=v[1],x=Q(y(),2),M=x[0],D=x[1],C=Q(y(),2),w=C[0],A=C[1],L=T();function I(){if(!n.update)return Promise.resolve();var e=r.discrete,u=r.layoutService;a.set("isPreRender",!0);var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=r.selectionService,s=r.refLineModel,l=r.discrete,p=r.reducedDataModel,h=r.continuousDataModel,v=r.trendLineModel,g=r.pluginService,y=r.colorService,b=r.viewModel,x=r.dockService,q=r.themeService,M=r.customTooltipModel,S=r.layoutService,D=r.logicalSize,C=u.custom.getActions(),w=t.data("q")(m.prepPicassoDataSet()),O=R({picasso:t,ds:w,rtl:"rtl"===(null==d?void 0:d.direction),model:c,app:L,chart:n,actions:C,localeInfo:i.localeInfo,logicalSize:D,flags:i.flags,translator:i.translator,selections:f,isLocked:u.getIsSelectionLocked,viewCache:a,viewState:o,layoutService:S,dockService:x,viewModel:b,colorService:y,selectionService:u,themeService:q,trendLineModel:v,discrete:l,continuousDataModel:h,reducedDataModel:p.model(),customTooltipModel:M,debouncer:hc,refLineModel:s,pluginService:g},e);return Kb(S.getLayout(),O,i)}(g);m.extractDataPages(),n.update({settings:s,data:M}),a.set("isPreRender",!1),m.insertDataPages();var l=[];return 1!==s.components.length&&u.meta.isDiscrete&&l.push(e.command.initialize()),Promise.all(l)}var j=Q(N((function(){var e;if(!(t&&n&&r&&i&&o&&a))return Promise.resolve();var u=r.layoutService,s=r.selectionService,l=r.refLineModel,f=r.discrete,d=r.continuous,p=r.reducedDataModel,m=r.continuousDataModel,h=r.trendLineModel,v=r.legendLayoutService;if(null==s||null===(e=s.custom)||void 0===e||!e.getActions())return Promise.resolve();var g=function(){A(Date.now())};o.onChanged("scrollOffset",(function(){v&&v.setDataPages([f.query.getCurrentDataPage()]),l&&l.update(),g()})),o.onChanged("legendScrollOffset",g),o.intercept("zoom",d.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",d.event.onZoomChange({layoutService:u,continuousDataModel:m},g)),s.setLayout(u.getLayout());var y=[];return u.meta.isContinuous&&(m.update(u.getLayout()),y.push(m.initialFetch())),h.command.update(),y.push(p.fetch().then((function(e){var t=e.reducedCube;p.update(t)}))),y.push(function(e){var t=e.layout,n=e.model;return Ee.snapshot(t)?Promise.resolve(null):n.getEffectiveProperties().then((function(e){return{properties:e}}))}({layout:u.getLayout(),model:c,env:i})),Promise.all(y)}),[r]),1)[0],P=Q(N((function(){if(null==j||!j.length)return Promise.resolve();var e=r.layoutService,t=r.reducedDataModel,n=r.continuousDataModel,i=r.trendLineModel,o=r.colorService;return Promise.all([r.pluginService.initialize(),o.initialize(),Qg({reducedDataModel:t,layoutService:e,continuousDataModel:n,trendLineModel:i})]).then((function(e){return e.pop()}))}),[j]),1)[0];q((function(){var e;if(null!=r&&null!==(e=r.colorService)&&void 0!==e&&e.getMain()&&P){var t=r.layoutService,n=r.selectionService,o=r.reducedDataModel,u=r.continuousDataModel,s=r.trendLineModel,l=r.legendLayoutService,c=r.colorService,f=r.viewModel;a.set("minorMinMax",P);var d=t.getHyperCube(),p=t.meta.isContinuous?u.getInitialCube():o.model().cube,m=c.getMain().getSettings().field,v=!t.meta.isContinuous&&(o.model().mode.isReduced||t.meta.isStacked)&&l,g=v?l.getHyperCube():void 0;n.setBrushAliases({colorField:m,useLegendCube:v,legendAlias:"legendCube/".concat(m)});var y=function(e){var t=e.mainCube,n=e.miniCube,r=e.legendCube,i=e.localeInfo,o=e.layoutService,a=e.viewModel,u=e.trendLineModel,s=o.refs.dataPages.split(".").pop(),l=[],c=[],f=o.meta.isContinuous?[{key:a.fields.majorNumeric,from:o.meta.isStackedByDimension?a.fields.majorStack:a.fields.major,override:{value:function(e){return e.qNum}}}]:void 0;return{prepPicassoDataSet:function(){return{key:"qHyperCube",data:t,config:{localeInfo:i,virtualFields:f}}},prepPicassoData:function(e){var o=[{type:"q",key:"qHyperCube",data:t,config:{localeInfo:i,virtualFields:f}},{type:"q",key:"miniCube",data:n,config:{localeInfo:i,virtualFields:f}}].concat(ee(e));return r&&o.push({type:"q",key:"legendCube",data:r,config:{localeInfo:i,virtualFields:f}}),u.query.hasTrendLines()&&o.push({key:"trend",data:u.query.getData()}),o},extractDataPages:function(){l=t[s],c=n.qDataPages,t[s]=[],n.qDataPages=[]},insertDataPages:function(){t[s]=l,n.qDataPages=c}}}({mainCube:d,miniCube:p,legendCube:g,localeInfo:i.localeInfo,layoutService:t,viewModel:f,trendLineModel:s}),x=j[j.length-1];b(R({localeInfo:i.localeInfo},x)),h(y)}}),[P]),q((function(){if(r&&g&&m){var e=r.colorService.getMain();if(e){m.prepPicassoDataSet();var t=m.prepPicassoData(e.getData());D(t)}}}),[g]),q((function(){var e;null!=r&&null!==(e=r.colorService)&&void 0!==e&&e.getMain()&&n.update&&m&&M&&I().then((function(){var e=r.layoutService,t=r.discrete,i=r.legendLayoutService;i&&(1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()]));n.update()}))}),[M]),q((function(){if(s&&l&&m&&null!=n&&n.update&&null!=r&&r.colorService.getMain()){var e=r.dockService,t=r.themeService;e.update({width:s,height:l}),t.setTheme(i.theme),I().then((function(){n.update&&n.update()}))}}),[s,l]),q((function(){null!=n&&n.update&&n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]})}),[w])}var Yb,Xb={exports:{}};Yb=Xb,function(e,t){Yb.exports=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===F(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,f=e.length,p=e.search(/[0-9\-\+#]/),m=p>0?e.substring(0,p):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),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(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)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(h="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)h+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(wc={exports:{}}),wc.exports);function Tc(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Ac={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},Lc=/%$/,Ec=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Nc=/^\(oct\)/i,kc=/^\(dec\)/i,Ic=/^\(hex\)/i,Pc=/^\(bin\)/i,jc=/^\(rom\)/i,Rc=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Fc=/#|0/g;function zc(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Hc(e,t,n){var r=Tc(e);return n?r:new RegExp(r||"",t)}function Vc(e,t,n){var r,i,o,a,s,l,u,c,d,f,p,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),f=t,(p=n)&&(p=Tc(p)),f&&(f=Tc(f)),d=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(p,"[#0]+)?")),a=(o=(o=m.match(d))?o[0]:"")?m.substr(0,m.indexOf(o)):m,s=o?m.substring(m.indexOf(o)+o.length):"",o||(o=m?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(Hc(l,"g"),t)),u=n,n=".",u&&(o=o.replace(Hc(u,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Fc)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=Lc.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Hc(t,null,!0),"|").concat(Hc(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Bc=function(){function e(t,n,r,i,o){wu(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Ac;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return Tu(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Rc.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Rc.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Rc.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Vc(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Vc(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Vc(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,l,u,c=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return Ec.test(t)?e=zc(e,Number(/\d{2}/.exec(t)[0]),t,n):Nc.test(t)?e=zc(e,8,t,n):kc.test(t)?e=zc(e,10,t,n):Ic.test(t)?e=zc(e,16,t,n):Pc.test(t)?e=zc(e,2,t,n):jc.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(o)[0];if(e=Oc(b+=o,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,M=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=M.length;s<q;s++)M+="0";M&&(e+=o+M)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=Oc(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function _c(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),f=0,p=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return f>=o&&(delete c[d[p]],delete d[p],f--,p++),c[e]=t,d[f]=e,f++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),f=0,p=0},t.size=function(){return f},t}function Uc(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Iu(Bc,t)}(i,e,t,n,r),a=_c(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Wc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Kc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gc=["January","February","March","April","May","June","July","August","September","October","November","December"],$c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yc(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Xc(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Jc=function(){function e(t,n,r){wu(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Wc,qDayNames:Kc,qLongMonthNames:Gc,qMonthNames:$c}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(Au(i={},"T",o.qTimeFmt||"hh:mm:ss"),Au(i,"D",o.qDateFmt||"YYYY-MM-DD"),Au(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return Tu(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Xc(t),r=60*Xc(n),i=60*Xc(r),o=1e3*Xc(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Yc("".concat(t.year).slice(-2),2),YYY:Yc("".concat(t.year).slice(-3),3),def:function(e){return Yc("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Yc("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Yc("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Yc("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Yc("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Yc("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Yc("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in l[n])if(i===e||i.toLowerCase()===e){void 0===(r=l[n][i])&&(r=l[n][i.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Zc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Iu(Jc,t)}function Qc(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function ed(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Zc(n,e,t),i=_c(r.format.bind(r),{toKey:function(e){return"object"===Cu(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Qc(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Zc(n,e,t),i=_c(r.format.bind(r),{toKey:function(e){return"object"===Cu(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function td(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return ed(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Uc(n,r,i,o,t)}function nd(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},f="dimension"===l?"first":"avg",p=td(n,o),m="dimension"===l?"first":function(e,t){return p(t)},h={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:d,reduce:f,reduceLabel:m,formatter:function(){return p},tags:function(){return n.qTags}};return h}function rd(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:nd(Ku({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=rd("qAttrDimInfo",t,n,a,Ku({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=rd("qAttrExprInfo",t,n,a,Ku({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=rd("qMeasureInfo",t,n,a,Ku({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function id(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=o;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=id.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return u},field:function(e){return dc(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,f,l,c)},hierarchy:function(e){return d.hierarchy(e,f,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=Cc,d.hierarchy=Dc,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=Xu,d.pages=u.qDataPages,d.hierarchy=Dc):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},f,l,c)};var p="S"===u.qMode?function(e){return e.qElemNumber}:void 0,m="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,Pu(rd("qDimensionInfo",u,i,"",Ku({},d,{value:p,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,Pu(rd("qMeasureInfo",u,i,"",Ku({},d,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),n=nd(Eu({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},f,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,Pu(l.virtualFields)),f}var od=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ad=/\/qDimensionInfo(?:\/(\d+))?/,sd=/\/qMeasureInfo\/(\d+)/,ld=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,ud=/\/qAttrExprInfo\/(\d+)/,cd=/\/?qHyperCube/,dd=/\/?qTreeData/,fd=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},pd=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function md(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};cd.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=fd):dd.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=pd);var s=!0;if(ad.test(e)&&(r=+ad.exec(e)[1]),sd.test(e)&&(i=+sd.exec(e)[1]),ld.test(e)){i=-1,r=0;var l=+ld.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(ud.test(e)){var u=i;if(t){i=0;var c=lc(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+ud.exec(n)[1]}else r>-1?(r=-1,i=+ud.exec(n)[1]):i+=+ud.exec(n)[1]+1}return od.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||ju(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function hd(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=md(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,f=d.qNoOfLeftDims,p=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||p>=f)&&f>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:p-f})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function gd(e){id.util=e.data("matrix").util,e.data("q",id),e.formatter("q-number",Uc),e.formatter("q-time",ed)}function yd(e){var t=hu(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function vd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===Ds(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function bd(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}gd.qBrushHelper=hd,gd.selections=hd;function xd(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=yd({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,Ns(o))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var qd=[],Md=0,Sd=function(e){var t=qd.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},Dd=function(){document.addEventListener("keyup",Sd)},Cd=function(){document.removeEventListener("keyup",Sd)},wd=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},Od=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function Td(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function Ad(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof s&&t.brush(s).clear(),f)}function Ld(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return Ad({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function Ed(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return Ad({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function Nd(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,d=Ad({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:o,brushName:void 0!==c&&c});if(d){var f=d.settings.settings,p=f.scale,m=f.brush,h=n.scale(p).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function kd(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;Ad({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function Id(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Pd(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Ad({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var jd=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=Ls(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Rd(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Fd(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,d=i.reset,f=void 0===d?Rd:d,p=i.clear,m=!1!==p&&function(e){var t=e.clear,n=void 0===t?jd:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(As({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ld(As(As({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ed(As(As({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nd(As(As({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kd(As(As({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Id(As(As({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pd(As(As({},t),e))}},t))}}({clear:p,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:m,reset:f,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=Es(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(As(As({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(As(As({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=Es(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=Es(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var zd=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Hd(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,u=void 0===l?void 0:l,c=o.selectionActions,d=(c=void 0===c?{}:c).clear,f=c.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,h=o.brushEvents,g=void 0===h?{}:h,y=o.brushName,v=void 0===y?"selection":y,b=o.brushMaxListeners,x=void 0===b?20:b,q=o.brushRanges,M=void 0!==q&&q,S=o.interceptors,D=void 0===S?{}:S,C=o.selectionsFn,w=void 0===C?i.selections:C,O=t.brush(v);if("number"==typeof x&&O.setMaxListeners(x),M){var T=!0===M?zd:M;O.configure({ranges:T})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},L=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++Md,c=null,d=[],f={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=xd({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),m=p.rangeInterceptor,h=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(l)}));var g={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};wd(n,g);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(f=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a(r,f,c).forEach((function(e){Td(e,o.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,f,c).forEach((function(e){return n.select(e)}))})),0===qd.length&&Dd(),qd.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=qd.indexOf(qd.filter((function(e){return e.key===u}))[0]);-1!==e&&qd.splice(e,1),qd.length||Cd(),Od(n,g)}}}({brush:O,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:w});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=Es(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:O,interceptors:D});var E=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=Es(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=Es(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=Fd({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},i=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),u(),c()}}({chart:t,brush:O,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:d,reset:f},selectionEvents:m,brushEvents:g});if(s){var N=!0===s?Ns(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;L.allowSimultaneous(N)}return{unbindEvents:E,state:A,picassoSelections:L,brush:O}}function Vd(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=Hd({chart:t,actions:i,selections:n,picassoQ:gd,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,f=a.custom,p=void 0===f?{}:f,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?bd:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:vd(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return yd({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=Ls(e,["colorField","useLegendCube"]),o=As({useLegendCube:r,colorField:t,brush:d,legendAlias:h},i);y(As(As({},o),{},{defaultFunc:function(){return bd(o)}}))},destroy:function(){l(),c.release()},custom:As({},p)}}var Bd="QlikView Sans, sans-serif",_d="#737373",Ud="#cccccc",Wd="#e6e6e6";function Kd(e){var t={};return[].concat(Ns(e),Ns([["","","color"],["object","axis.title","fontFamily",Bd],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",Bd],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Ud],["object","axis.line.minor","color",Wd],["object","grid.line.major","color",Ud],["object","grid.line.minor","color",Wd],["object","grid.line.highContrast","color",Wd],["object","referenceLine.label.name","fontFamily",Bd],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",Bd],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",Wd],["object","referenceLine.outOfBounds","backgroundColor",_d,function(e){return"transparent"===e?_d:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function Gd(e,t){var n={};return e.forEach((function(e){var r=Es(e,5),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],u=(void 0===l?function(e){return e}:l)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,s));gu(n,[o,a].filter(Boolean).join("."),u)})),n}var $d={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Yd(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Xd(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const f={x:c+i,y:i,width:d-2*i,height:t.height-2*i},p=s(l[0]+"…").width,m=Math.max(0,f.width-u.width),h=Math.max(0,f.height-u.height),g=o*m,y=a*h;return{show:f.width>=Math.min(p,u.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:c+g,width:u.width+2*i}}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Yd(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Yd(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function Jd(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Yd(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Yd(i,n.minorGuideLine.strokeWidth),x2:o,y2:Yd(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Zd(e){return e.filter((e=>e.show)).map((e=>K({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var Qd={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Yd(1,t.line.strokeWidth);return{show:n.line.show,x1:Yd(0,t.line.strokeWidth),y1:r,x2:Yd(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Xd(n,this),this.state.minor=Jd(r,this)},render(){return[...Zd([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>K({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge"})))),...Zd(this.state.major.map((e=>e.guideLine))),...Zd(this.state.minor.map((e=>e.guideLine)))];var e}};function ef(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function tf(e){return e.qTags.indexOf("$qualified")>-1}function nf({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];ef(o,a)?(tf(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function rf({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function of({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),i.rangeAndWidth}}}function af({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function sf({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=of,queryFactory:s=af}={attributesFactory:of,queryFactory:af}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function lf({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=sf,mapper:a=nf,resolver:s=rf}={metaFactory:sf,mapper:nf,resolver:rf}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=f.resolve(t);return n.set(r,i),i}}}function uf(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const cf=uf(0).getTime();function df(e){return(e.getTime()-cf)/86400/1e3}var ff=new Date,pf=new Date;function mf(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return mf((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return ff.setTime(+t),pf.setTime(+r),e(ff),e(pf),Math.floor(n(ff,pf))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var hf=mf((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),gf=mf((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),yf=mf((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),vf=mf((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function bf(e){return mf((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var xf=bf(0);bf(1),bf(2),bf(3),bf(4),bf(5),bf(6);var qf=mf((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),Mf=mf((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Mf.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mf((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Sf=Mf;const Df=1,Cf=2,wf=3,Of=4,Tf=5,Af=6;function Lf({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Sf.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=hf.count(e,t),l=gf.count(e,t),u=yf.count(e,t),c=vf.count(e,t),d=xf.count(e,t),f=qf.count(e,t),p=Sf.count(e,t),m=n/r.second.width-1,h=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:p,interval:Sf.every(1),formatter:r.year.formatter,offset:e=>Sf.offset(e,-1),floor:Sf.floor};if(s<=m)v.type=Df,v.desc="second",v.count=s,v.interval=hf.every(1),v.formatter=r.second.formatter,v.offset=e=>hf.offset(e,-1),v.floor=hf.floor;else if(s/2<=m)v.type=Df,v.desc="every other second",v.count=s/2,v.interval=hf.every(2),v.formatter=r.second.formatter,v.offset=e=>hf.offset(e,-2),v.floor=hf.floor;else if(s/5<=m)v.type=Df,v.desc="every 5 second",v.count=s/5,v.interval=hf.every(5),v.formatter=r.second.formatter,v.offset=e=>hf.offset(e,-5),v.floor=hf.floor;else if(s/15<=m)v.type=Df,v.desc="every 15 second",v.count=s/15,v.interval=hf.every(15),v.formatter=r.second.formatter,v.offset=e=>hf.offset(e,-15),v.floor=hf.floor;else if(s/30<=m)v.type=Df,v.desc="every 30 second",v.count=s/30,v.interval=hf.every(30),v.formatter=r.second.formatter,v.offset=e=>hf.offset(e,-30),v.floor=hf.floor;else if(l<=h)v.type=Cf,v.desc="minute",v.count=l,v.interval=gf.every(1),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-1),v.floor=gf.floor;else if(l/2<=h)v.type=Cf,v.desc="every 2 minute",v.count=l/2,v.interval=gf.every(2),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-2),v.floor=gf.floor;else if(l/5<=h)v.type=Cf,v.desc="every 5 minute",v.count=l/5,v.interval=gf.every(5),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-5),v.floor=gf.floor;else if(l/10<=h)v.type=Cf,v.desc="every 10 minute",v.count=l/10,v.interval=gf.every(10),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-10),v.floor=gf.floor;else if(l/15<=h)v.type=Cf,v.desc="every 15 minute",v.count=l/15,v.interval=gf.every(15),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-15),v.floor=gf.floor;else if(l/30<=h)v.type=Cf,v.desc="every 30 minute",v.count=l/30,v.interval=gf.every(30),v.formatter=r.minute.formatter,v.offset=e=>gf.offset(e,-30),v.floor=gf.floor;else if(u<=h)v.type=wf,v.desc="hour",v.count=u,v.interval=yf.every(1),v.formatter=r.minute.formatter,v.offset=e=>yf.offset(e,-1),v.floor=yf.floor;else if(u/2<=h)v.type=wf,v.desc="every 2 hour",v.count=u/2,v.interval=yf.every(2),v.formatter=r.minute.formatter,v.offset=e=>yf.offset(e,-2),v.floor=yf.floor;else if(u/3<=h)v.type=wf,v.desc="every 3 hour",v.count=u/3,v.interval=yf.every(3),v.formatter=r.minute.formatter,v.offset=e=>yf.offset(e,-3),v.floor=yf.floor;else if(u/6<=h)v.type=wf,v.desc="every 6 hour",v.count=u/6,v.interval=yf.every(6),v.formatter=r.minute.formatter,v.offset=e=>yf.offset(e,-6),v.floor=yf.floor;else if(u/12<=h||i)v.type=wf,v.desc="every 12 hour",v.count=u/12,v.interval=yf.every(12),v.formatter=r.minute.formatter,v.offset=e=>yf.offset(e,-12),v.floor=yf.floor;else if(c<=g)v.type=Of,v.desc="day",v.count=c,v.interval=vf.every(1),v.formatter=r.date.formatter,v.offset=e=>vf.offset(e,-1),v.floor=vf.floor;else if(c/2<=g)v.type=Of,v.desc="every 2 day",v.count=c/2,v.interval=vf.every(2),v.formatter=r.date.formatter,v.offset=e=>vf.offset(e,-2),v.floor=vf.floor;else if(c/3<=g)v.type=Of,v.desc="every 3 day",v.count=c/3,v.interval=vf.every(3),v.formatter=r.date.formatter,v.offset=e=>vf.offset(e,-3),v.floor=vf.floor;else if(d<=g)v.type=Of,v.desc="week",v.count=d,v.interval=xf.every(1),v.formatter=r.date.formatter,v.offset=e=>xf.offset(e,-1),v.floor=vf.floor;else if(d/2<=g)v.type=Of,v.desc="every 2 week",v.count=d/2,v.interval=xf.every(2),v.formatter=r.date.formatter,v.offset=e=>xf.offset(e,-2),v.floor=vf.floor;else if(f<=g)v.type=Tf,v.desc="month",v.count=f,v.interval=qf.every(1),v.formatter=r.date.formatter,v.offset=e=>qf.offset(e,-1),v.floor=vf.floor;else if(f/3<=g)v.type=Tf,v.desc="quarter",v.count=f/3,v.interval=qf.every(3),v.formatter=r.date.formatter,v.offset=e=>qf.offset(e,-3),v.floor=vf.floor;else if(f/6<=g)v.type=Tf,v.desc="half year",v.count=f/6,v.interval=qf.every(6),v.formatter=r.date.formatter,v.offset=e=>qf.offset(e,-6),v.floor=vf.floor;else if(p<=y)v.type=Af,v.desc="year",v.count=p,v.interval=Sf.every(1),v.formatter=r.year.formatter,v.offset=e=>Sf.offset(e,-1),v.floor=Sf.floor;else if(p/2<=y)v.type=Af,v.desc="every 2 year",v.count=p/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Sf.offset(e,-2),v.floor=Sf.floor;else if(p/5<=y)v.type=Af,v.desc="every 5 year",v.count=p/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Sf.offset(e,-5),v.floor=Sf.floor;else if(p/10<=y)v.type=Af,v.desc="every 10 year",v.count=p/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Sf.offset(e,-10),v.floor=Sf.floor;else{const e=Math.floor(p/y);v.type=Af,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Sf.offset(t,-e),v.floor=Sf.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const f=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:c.formatter}}));let p=[];if(!o&&c.type<=wf){const n=t.getFormat("date"),r=e.ticks(vf.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(vf.offset(r[0],-1)),p=(r.length?r:[vf.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:f,outer:p}}const Ef={};function Nf(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function kf(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=function(){return Mt.apply($i(Ar,Tr,Cr,Sr,Mr,qr,mr,pr,Ir).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([uf(l),uf(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>Lf({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:uf(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Ef[[t,n,r,r,o]])return Ef[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=uf(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,f=t/(i-r),p=f/1440,m=f/86400,h=366*f,g=3*f*30,y=a.second.width/m,v=a.minute.width/p,b=a.date.width/g,x=a.year.width/h;let q,M,S,D=0,C=0,w=null,O=null,T=null,A=null,L=null,E=null;const N={outer:[],inner:[]};for(y<1?(w=1,C=1/86400):y<2?(w=2,C=1/86400*2):y<5?(w=5,C=1/86400*5):y<10?(w=10,C=1/86400*10):y<30?(w=30,C=1/86400*30):v<1?(O=1,C=1/1440):v<2?(O=2,C=1/1440*2):v<5?(O=5,C=1/1440*5):v<10?(O=10,C=1/1440*10):v<30?(O=30,C=1/1440*30):v<60?(T=1,C=1/24):v<120?(T=2,C=2/24):v<360?(T=6,C=.25):v<720?(T=12,C=.5):b<1/90?(C=1,A=1):b<2/90?(C=2,A=2):b<7/90?(C=7,A=7):b<31/90?(L=1,C=31):b<1?(L=3,C=90):x<1?(E=1,C=366):x<2?(E=2,C=732):x<5?(E=5,C=1826.25):(E=10,C=3652.5),M=Math.floor((d+n%1)/C);D<i;){S=M+1,q=E?Nf("year",[l+M*E,0,1],[l+S*E,0,1],a.year.formatter):L?Nf("month",[l,u+M*L,1],[l,u+S*L,1],a.date.formatter):A?Nf("day",[l,u,c+M*A],[l,u,c+S*A],a.date.formatter):T?Nf("hour",[l,u,c,0+M*T],[l,u,c,0+S*T],a.minute.formatter):O?Nf("minute",[l,u,c,0,0+M*O],[l,u,c,0,0+S*O],a.minute.formatter):Nf("second",[l,u,c,0,0,0+M*w],[l,u,c,0,0,0+S*w],a.second.formatter),D=df(q.start),N.inner.push(q);const e=Math.floor(D);if(!(o||E||L||A)){const t={type:"day",start:uf(e),end:uf(e+1),formatter:a.date.formatter,qStart:e};N.outer[N.outer.length-1]&&N.outer[N.outer.length-1].qStart===t.qStart||N.outer.push(t)}M++}return N.min=r,N.max=i,Ef[[t,n,r,r,o]]=N,N}(n,e,d.min,l,u,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>f(t,n)[a].map((t=>{let n;return n="start"===i?df(t.start):"end"===i?df(t.end):(df(t.start)+df(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:df(t.start),end:df(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return p}const If=/t+/i;const Pf={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function jf(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const Rf="continuousPan";var Ff={model:function({model:e,layoutService:t,dataProcessorModel:n=Ss,viewCache:r,viewState:i,definitionPath:o},a={}){const{engineFetcherFactory:s=ms,snapshotFetcherFactory:l=gs,cacheFetcherFactory:u=hs,cache:c={initial:{},merged:{}}}=a,d=s({model:e,layoutService:t,definitionPath:o}),f=l({layoutService:t,viewCache:r}),p=u({cache:c}),m=e=>{throw e.isHandled=!0,e};let h,g,y;return{update(e){var n,o;({initialMin:g,initialMax:y}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),r.set("continuousMin",g),r.set("continuousMax",y),r.set("minimiumZoomSpan",(n=g,o=y,Math.max(1e-6,2.3841857910156157e-7*(o-n)))),h=t.meta.isSnapshot?f:d,t.meta.isSnapshot&&({zoom:{min:g,max:y}}=f.getSnapshotData()),i.preventSet("zoom",{min:g,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return h.fetch(g,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=bs(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return n.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),c.initial=t,c.merged=t,e})).then((e=>xs(g,y,e))).then((e=>this.updateLayout(e))).catch(m)},fetch:(e,t)=>h.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=bs(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(c.initial,e))).then((e=>(n.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),c.merged=e,e))).then((n=>xs(e,t,n))).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>xs(e,t,n))),fetchMinMaxData:()=>Promise.resolve(c.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return K({},e,{...c.initial})},getInitialLayout(){const e=this.getInitialCube();return K({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Ms(c.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=c.merged.qDataPages,t.qAxisData=c.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=bu(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return xu(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),f=Math.abs(d-c),p=f-(r>0?.7071067811865475:1.4142135623730951)*f,m=c+p*u,h=d-p*(1-u),g=m<a?a-m:0,y=h>s?h-s:0;t.set("zoom",{min:Math.max(m-y,a),max:Math.min(h+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:Rf,pointers:1,threshold:10,enable(r,i){return this.started===Rf||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=Rf;const{min:i,max:o}=r.get("zoom");this[Rf]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Rf],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:$d,timeAxis:Qd},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=K(!0,{},t[i],o)})),r}(t,Pf,n),{qAxis:i}=r,o=ur(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,c,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(jf(a,f),a.instance(e)),f.normInvert=e=>(jf(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&If.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=uf(t[0].data.start),i=uf(t[n-1].data.start);return vf.count(r,i)/n>=1?o.date:yf.count(r,i)/n>0?o.minute:gf.count(r,i)/n>0?o.second:o.date},t}(r);return c=kf(o.copy(),r,p),u=lf({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:hu(n,"fields.0.raw",(()=>({})))}]}),f.formatter=()=>p.getFormatFromTicks(d).formatter,f}}};const zf={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Hf={OPTIONS:zf,DEFAULT:zf.MINI_CHART};function Vf({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Bf({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const _f=e=>({miniChart:e===Hf.OPTIONS.MINI_CHART.value,bar:e===Hf.OPTIONS.BAR.value,none:e===Hf.OPTIONS.NONE.value});function Uf({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return _f(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return _f(Hf.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return _f(!n&&(r||!r&&i)?Hf.OPTIONS.NONE.value:Hf.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Hf.OPTIONS.MINI_CHART.value,n.bar=t.value===Hf.OPTIONS.BAR.value,n.none=t.value===Hf.OPTIONS.NONE.value),n}function Wf({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Uf({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Bf({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const m=a.getStyles();return m.color&&(p.style={standard:{thumb:{"border-color":m.color,opacity:.4},before:{background:m.color,opacity:.1},after:{background:m.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(p.settings.injections=()=>[Vf({layoutService:e,discrete:n})]),p}function Kf({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,p=f?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,m=f?d.rect.computedInner.width:d.rect.computedInner.height,h=f&&a?m-p:p,g=Math.max(0,Math.min(h/m,1)),[y,v]=Bf({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,q=!b&&!x;return{pixel:h,relative:g,thumb:q?h-y*m:0,beforeThumb:b,afterThumb:x,onThumb:q}}}function Gf({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,f]=Bf({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(f-d)*c}}}function $f({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Kf({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Gf({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}function Yf({e:e}){return(e.srcEvent||e).srcElement.getAttribute("data-scrollbar-handle")||""}const Xf="scrollbarResize";function Jf({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Kf({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:Xf,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Xf]=this[Xf]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&Yf({e:t})&&(this[Xf].panningEvent=t.srcEvent),!!this[Xf].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[Xf]=this[Xf]||{},this[Xf].panningEvent&&t.component(e).emit("dragStart",this[Xf].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[Xf]=this[Xf]||{},!this[Xf].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Yf({e:this[Xf].panningEvent});let f="start"===d?Math.min(c,o.max):o.min,p="end"===d?Math.max(c,o.min):o.max;f===p&&(f-="start"===d?u:0,p+="end"===d?u:0),r.set("zoom",{min:f,max:p}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[Xf]=this[Xf]||{},delete this[Xf].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[Xf]=this[Xf]||{},delete this[Xf].panningEvent,t.component(e).emit("dragEnd")}}}}const Zf="scrollbarPan";function Qf({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Kf({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Gf({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Zf,threshold:0,enable(r,i){return this[Zf]=this[Zf]||{},!(i&&!this[Zf].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=u(n);if(this[Zf]=this[Zf]||{},this[Zf].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Zf].relative=a.relative,this[Zf].zoom=r.get("zoom"),this[Zf].zoom.span=this[Zf].zoom.max-this[Zf].zoom.min,this[Zf].zoom.fullSpan=o-n}else if(a.onThumb)this[Zf].offset=a.thumb;else{const e=c();this[Zf].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=u(n);if(this[Zf]=this[Zf]||{},o.meta.isContinuous){const e=a.relative-this[Zf].relative,{fullSpan:t,span:n,min:o,max:s}=this[Zf].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Zf].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Zf]=this[Zf]||{},this[Zf].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Zf]=this[Zf]||{},this[Zf].isPanning=!1,t.component(e).emit("unlockState")}}}}function ep({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[$f({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Jf({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Qf({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function tp({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function np({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...ep({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:tp({componentKey:e,chart:t,actions:n,layoutService:o})}}const rp={background:"rgba(0, 0, 0, 0.1)"},ip={top:-1,bottom:-1,width:6},op={width:2,background:"#595959"};var ap={before:rp,after:rp,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:ip,endHandle:ip,startHandleBorder:op,endHandleBorder:op};const sp={background:"rgba(0, 0, 0, 0.1)"},lp={top:-1,bottom:-1,width:6},up={width:2,background:"#595959"};var cp={before:sp,after:sp,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:lp,endHandle:lp,startHandleBorder:up,endHandleBorder:up};const dp={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},fp={pointerEvents:"initial"},pp={pointerEvents:"none"};const mp="ew-resize",hp="default";function gp(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function yp(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?mp:hp}function vp(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function bp(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function xp(){const{size:e,start:t,end:n}=gp.call(this);this.renderer.render(this.elements(this.h,vp.call(this,e,t,n)))}function qp(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?cp:ap;return{container:{...dp},before:{...dp,...n.before,...t.before},after:{...dp,...n.after,...t.after},thumb:{...dp,...n.thumb,...t.thumb},startHandle:{...dp,...fp,...n.startHandle},endHandle:{...dp,...fp,...n.endHandle},startHandleBorder:{...dp,...pp,...n.startHandleBorder},endHandleBorder:{...dp,...pp,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Mp={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){xp.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!bp.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Yf({e:e});t&&(this.state.hover[t]=!0),yp.call(this),xp.call(this)},leave(){this.state.locked||(this.state.hover.reset(),yp.call(this),xp.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Yf({e:e});t&&(this.state.drag[t]=!0),yp.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),yp.call(this),xp.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=gp.call(this);return this.elements(e,vp.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-n},f={[i.start]:r},p={left:-3},m={left:1},h={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...u?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?h:p},class:"scrollbar--start-handle","data-scrollbar-handle":"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:m}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?p:h},class:"scrollbar--end-handle","data-scrollbar-handle":"end"},a?e("div",{style:{...s.endHandleBorder,...u?m:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...c])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:qp.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};const Sp={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(K({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Dp({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=K({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const f=o?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),m=(c-p)/2,h=m+d.major+p/2;return{item:d,boxCenter:h,boxWidth:p,boxPadding:m,rendWidth:t,rendHeight:n}}function Cp({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=K(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:K(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:K(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let p;const m={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:K(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)p=e[n],m[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:u});return m}const wp=["oob"];const Op={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Cp({keys:wp,data:i,defaultSettings:{oob:Sp.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Dp}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:f,rendWidth:p,rendHeight:m}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),h=u[c].data,g=[];if(d.oob.show){g.push(Sp.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:p,rendHeight:m,flipXY:n,symbol:o}));const e={type:"container",data:h,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:wp,symbol:s,dockValue:n})}},Tp={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Ap=["hat"];function Lp(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Ep({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const d=(n+e.major)*l;let f=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const p=K({},e.hat,{type:"path",d:Lp(f)});f=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[p,K({},e.hat,{type:"path",d:Lp(f)})]}const Np={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Cp({keys:Ap,data:r,defaultSettings:Tp,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Dp}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:f,rendHeight:p}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),m=s[l].data,h=[];u.hat.show&&h.push(...Ep({item:u,boxWidth:c,boxPadding:d,rendWidth:f,rendHeight:p,flipXY:n}));const g={type:"container",data:m,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:Ap})}};function kp(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:kp(i,t,n)},i}function Ip(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),kp(i,a,l,e.invert)}))}const Pp={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function jp(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Rp={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,u=o[t]*(n>l?1:n/l),c=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Fp(e,t,n,r){var i,o,a,s,l,u;const{app:c,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[p]=f,m=p.size||"small",h=p.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===p.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=p.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?":"+t.port:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o+="/"),n+r+i+o):""}(n);i&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await Rp.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}(p,m,c);if("url"===h)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&jp(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await Rp.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Rp.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(c,d,p,m,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(jp(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await Rp.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(c,n[g],m,v)}return[]}const zp={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(Fp(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},Hp={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await zp.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>zp.checkIfPromisesExist({customTooltipModel:e})};const Vp=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:Pp.CHART.CHART_PARENT_TYPE,qId:Pp.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Bp=e=>{var t,n,r;const i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:Pp.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const _p={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=Pp.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Pp.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a,s,l;const u=i,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await _p.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=Pp.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=Pp.CHART.STATE,a=Vp(t,o),s=await e.createSessionObject(a),l=Bp(t);if(s.id!==Pp.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,f,p,m;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Pp.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(p=u.miniChartToken.model)||void 0===p?void 0:p.id,type:null===(m=u.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await _p.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(_p.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Pp.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Pp.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Up(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Wp(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Pp.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function Kp(e){const t=Wp();return e.filter((e=>t[e.id]))}const Gp={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=Gp.getAttrExprData(a);o.length||n.length?Hp.handlePromises({customTooltipModel:i,nodes:Gp.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s,l;null!==(s=r.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=i&&null!==(l=i.miniChartToken)&&void 0!==l&&l.alternateState&&_p.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Hp.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[Pp.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Pp.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Pp.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Kp(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Pp.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[Pp.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Up(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===Kp(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=Up(e)||[];[...i,t].forEach((e=>{const t=Kp(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=Wp(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:xe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=xe.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function $p(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case Pp.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Pp.CUSTOM.TITLE:case Pp.CUSTOM.DESCRIPTION:case Pp.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const Yp={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>$p(t,e,r,n)}}};const Xp={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[Pp.CUSTOM.TITLE]:!0,[Pp.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=Gp.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===Pp.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===Pp.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>qe.getMeasure(e,t))),e,o)}};function Jp({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Xp.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Zp(e){const t=Pp.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function Qp(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var em={attrExpr:{migrateProperties(e){var t,n,r,i;const o=K(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=Qp(o);return s=function(e,t){return t.concat(e.map((e=>Zp(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches(e){var t,n,r,i;const o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=Zp(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(Qp(e),o,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],u=(null===(i=t.tooltip)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const tm=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&ie(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},nm=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&ie(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&ie(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},rm=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},im=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then((e=>e.getLayout())).then((t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;nm(e,n)}return r})):t.getField(r.qDef.qFieldDefs[0]).then((t=>t.getCardinal().then((t=>(nm(e,t),r)))),(()=>r))}return tm(e),Promise.resolve()};function om(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?gu(e,"color.persistent",!0):"byDimension"===r&&n.length>1?gu(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?gu(e,"color.mode","primary"):0===t.length&&n.length>0&&(gu(e,"color.byMeasureDef",void 0),gu(e,"color.byDimDef",void 0),1===n.length&&gu(e,"color.mode","primary"))}const am=(e,t,n)=>{om(t),pt(e),n.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Gp.addCallbackCustomTooltip(t)},sm=e=>{om(e)};function lm({translator:e,flags:t}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r){let i;const o=t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>o-1?i="Visualizations.Descriptions.Color":o>1&&0===n?"stacked"===t.barGrouping.grouping?i="Visualizations.Descriptions.Stack":(i="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):i="Visualizations.Descriptions.Bars",e.get(i)},add:(e,n,r)=>(n.qHyperCubeDef.qDimensions.length>1&&"stacked"===n.barGrouping.grouping&&(n.qHyperCubeDef.qMode="K",n.qHyperCubeDef.qAlwaysFullyExpanded=!0),null!=r&&r.app?im(n,r.app).then((()=>(am(e,n,t),e))):(rm(n),am(e,n,t),e)),move(e,n){n.qHyperCubeDef.qDimensions.length>1&&"stacked"===n.barGrouping.grouping&&(n.qHyperCubeDef.qMode="K",n.qHyperCubeDef.qAlwaysFullyExpanded=!0),tm(n),om(n),t.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Gp.moveCallbackCustomTooltip(n,e)},remove(e,n){const r=n.qHyperCubeDef.qDimensions;om(n),1===r.length&&(n.qHyperCubeDef.qMode="S"),t.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Gp.removeCallbackCustomTooltip(n,e)},replace(e,n,r,i){t.isEnabled("CUSTOM_TOOLTIP_REMOVE_LIMITS")&&Gp.replaceCallbackCustomTooltip(i,n)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>null!=n&&n.app?im(t,n.app).then((()=>(e.qSortBy.qSortByNumeric=-1,sm(t),e))):(rm(t),sm(t),e),move(e,t){tm(t),om(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;om(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function um(e){return{properties:{version:"1.12.17",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!1,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...lm(e)}]}}}var cm={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function dm({env:e}){const{flags:t}=e,n=h();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(cm).forEach((t=>{e.add(cm[t])}))}}(e.translator);const r=g(),i=y(),[o,a]=v(),s=b(),l=x(),{localeInfo:u}=l;return q((()=>{a({translator:n,theme:i,embed:r,deviceType:s,localeInfo:u,flags:t})}),[u,n.language(),i.name(),s]),o}function fm(){const[e]=v((()=>yu())),[t]=v((()=>function(e){var t=As({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0})));return{viewCache:e,viewState:t}}const pm=()=>{},mm=2,hm=20,gm=200;var ym={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-10<=t.qTop,i=n.qLeft+n.qWidth+10>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+10>=t.qTop+t.qHeight,a=n.qLeft-10<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var vm={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-10<=t.qTop,i=n.qTop+n.qHeight+10>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var bm={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const xm="pages";function qm({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:"discretePan",pointers:1,threshold:10,enable(r,i){return"discretePan"===this.started||!i||!!t.scroll.enabled()&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started="discretePan";const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function Mm({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function Sm({layoutService:e,areaBuffer:t}){const n=void 0===t?function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(gm,n));return{width:e,height:Math.max(hm,Math.min(n*mm,r))}}}({layoutService:e}):function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){return{width:e,height:Math.min(t,n)}}}({layoutService:e}),r={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:t,height:i}=n({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=t?Math.ceil((t-e.qWidth)/2):0;return{qHeight:i?Math.min(i,r.height):e.qHeight,qWidth:t?Math.min(t,r.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,r.height-i)):e.qTop,qLeft:t?Math.max(0,Math.min(e.qLeft-a,r.width-t)):e.qLeft}}}function Dm(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject("REJECTED"),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject("REJECTED"),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject("REJECTED"),n=null)},i}const Cm={command:{update:()=>{}}};function wm({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=Cm,definitionPath:o,areaBuffer:a,processDataPage:s}){const{slicer:l,cacheWarden:u,request:c}=t,d=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:l,warden:u({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:Sm({layoutService:r,areaBuffer:a}),request:c({layoutService:r,definitionPath:o}),process:Dm(n),connectionless:r.meta.isSnapshot,processDataPage:s}),f=xu(((e,{onProcessing:t,onData:n})=>{d(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if("REJECTED"!==e)throw e}))}),50);return function(e,{onProcessing:t=pm,onDataPage:n=pm}={}){f(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var Om={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var Tm={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function Am(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function Lm(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function Em(e){return Lm(e.qMatrix,(e=>e[0].qElemNumber))-1}var Nm={inTotal:function({layoutService:e}){const t=Am(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=Am(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=Am(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=Em(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const km=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function Im(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return km(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:km(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return km(e,n);return Lm(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var Pm={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=Im(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:u}=n,c=Im(t).area(e(),l,a.qArea),d=Em(a),f=a.qArea.qHeight+d,p=u===o?(r.inView-f)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[p,r.inView>=r.inTotal?p+1:p+f/r.inView]}};function jm({rect:e,dockService:t,itemWidths:n,dimensionAxis:r,inTotal:i,isMajorVisible:o,isMajorLabelless:a,maxDataRows:s}){const{DEFAULT:l,SQUEEZE:u,LABELLESS:c}=n[t.meta.chart.mode],{axisDisplayMode:d="auto",maxVisibleItems:f=10}=r,p="horizontal"===t.meta.major.orientation?e.width:e.height,m=p/i>=u;switch(d){case"max":return Math.min(i,s);case"custom":return Math.min(f,s);case"auto":default:return!o||a?p/c:m?i:p/l}}function Rm({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,areaBuffer:s,rtl:l}){const{inTotal:u,area:c,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?Om:n?r?Nm:Pm:Tm}({layoutService:r}),f=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?f()/e:0,m=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),s=u({layoutService:r}),l=e.component(a),c=!a||!l||l.isVisible();return{inTotal:s,inView:jm({rect:t(),dockService:i,itemWidths:o(),dimensionAxis:n,inTotal:s,isMajorVisible:c,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,m(n,r)));return{pixel:i,item:r?Math.abs(r*i/f()):0}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return m(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,o+e/i]}({viewSize:f(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>c({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:s}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:f(),upperBound:m(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&l?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=m(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function Fm({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,areaBuffer:c,viewState:d,rtl:f}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const p=Rm({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,areaBuffer:c,rtl:f}),m=()=>{const e=p.getItems();return n.set("items",e),e},h=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},g=e=>{const t=Date.now(),r=m(),a=h({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:r})||d.get("scrollOffset")!==a.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a,items:r})),d.preventSet("viewRange",p.getViewRange({pixelOffset:a.pixel,items:r})),d.set("scrollOffset",a.item)));d.preventSet("viewRange",p.getViewRange({pixelOffset:a.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a,items:r})),d.set("scrollOffset",a.item))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=m();n.set("itemSize",p.getItemSize({items:a}));const u=void 0===d.get("scrollOffset")?(({items:e})=>1===o.getLayoutValue("scrollStartPos")?p.getUpperBound({items:e}):0)({items:a}):p.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:a}),c=h({pixelOffset:u,items:a});d.preventSet("viewRange",p.getViewRange({pixelOffset:c.pixel,items:a}));const f=p.getArea({itemOffset:c.item,items:a});return new Promise((e=>{i(f,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:c,items:a})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll(e){const t=n.get("offsets").pixel+e;g(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});g(r)}}}function zm({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:f,areaBuffer:p,processDataPage:m=(()=>{})}={}}){const h=yu(),g=function({qMode:e}){switch(e){case"S":default:return ym;case"K":return vm;case"T":return bm}}({qMode:i.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(xm,[]),{add:t=>{const n=e.get(xm);n.length=0,n.push(t)},getCurrent:()=>e.get(xm)[0],getAll:()=>e.get(xm),contains:n=>t(e.get(xm)[0],n)}}({state:h,contains:g.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:y,composition:g});const v=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),b=wm({dataStore:y,composition:g,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,areaBuffer:v,processDataPage:m}),x=Fm({chart:e,componentKey:n,state:h,dataStore:y,pageData:b,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,areaBuffer:v,viewState:l,rtl:u}),q=function({layoutService:e,dataStore:t}){return function(n){const r=hu(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:y});return{interactions:function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[qm({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:Mm({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:x}),query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>q(e)}}}var Hm="AVERAGE",Vm="LINEAR",Bm="POLYNOMIAL2",_m="POLYNOMIAL3",Um="POLYNOMIAL4",Wm="EXPONENTIAL",Km="LOG",Gm="POWER";function $m({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){default:case Bm:return o;case _m:return o.y+=i[3]*t**3,o;case Um:return o.y+=i[4]*t**4+i[3]*t**3,o}}var Ym={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:$m,polynomial3:$m,polynomial4:$m,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function Xm(e,t){const n=Ym[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function Jm(e){return Ym[e.qType.toLowerCase()]}function Zm(e,t){return e.meta.isContinuous?function(e,t){return{generate:(e,n,r)=>{const i=[],o=Jm(e),{min:a,max:s}=t.get("zoom"),l=(s-a)/100;if(l>0){const t=t=>{const a=o({dimValue:t,value:t,qTrendLine:e});a.layerId=n,a.measureIndex=r,a.dimValue=t,i.push(a)};let u=a;for(let e=a;e<=s;e+=l)t(e),u=e;u!==s&&t(s)}return i},calculate:(e,t)=>Jm(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map((({y:e})=>e));return{min:Math.min(...n),max:Math.max(...n)}}}}(0,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=Ym[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],u=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});u.layerId=n,u.measureIndex=r,u.dimValue=o.qText,i.push(u)}return i},findMinMax:Xm}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=Ym[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e][0],u=e+s+1,c=l({dimValue:o.qElemNumber,value:u,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},calculate:(e,t,n)=>(0,Ym[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:Xm}}(e)}var Qm={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},eh={color:"#f93f17",index:9};const{isDark:th}=ft,nh={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},rh=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=(()=>!1)})=>{const{translator:s}=i,l=[nh],u=[],c=[],d=Zm(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(((e,t)=>{Array.isArray(e.qTrendLines)&&(u.push(...e.qTrendLines),c.push(...e.qTrendLines.map((()=>t))))}));return{query:{hasTrendLines:()=>!!u.length&&a(),getData:()=>l,getStroke:vu((e=>{const{style:t}=u[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=c[e],n=r.scale(o)(t);return th(n)?function(e){const t=ut(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=ut(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(eh)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"})),getLineDash:e=>{const{style:t}=u[e]||{};return t.lineDash},getLabel:e=>(u[e]||{}).label,getType:e=>{const{qType:t}=u[e]||{};return s.get(Qm.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return u.forEach((r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)})),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=u[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,u.forEach(((e,t)=>{const n=d.generate(e,t,c[t]);l.push(...n)}))}}}};var ih={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const oh=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,ah=(e,{layoutService:t,trendLineModel:n,dockService:r})=>{if(!n.query.hasTrendLines())return[];return[(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i})=>{const o=oh(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:ih,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:o},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}}}})(e,{trendLineModel:n,layoutService:t,dockService:r}),(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=oh(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:ih,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r})]};function sh(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function lh(e,{h:t,style:n}){return e.map((e=>{const r={style:{direction:"string"==typeof e.content?xe.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map((t=>e("span",{style:t.style,direction:xe.detectTextDirection(t.content)},t.content)))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)}))}function uh(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter((e=>e.title===o)),s=[function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:xe.detectTextDirection(t)},t);return e("tr",{},n)}(n,o)];if(a.slice(0,2).forEach((e=>{s.push(n("tr",{},lh(e.row,{h:n,style:i})))})),r.length>2){const i=r.length-2;s.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=xe.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return s}}function ch(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=ge({key:e.tooltip,rtl:i});return K(!0,o,{settings:{extract:sh(e,t),content:uh(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function dh(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function fh(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=dh(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=dh(r,t),u=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(u.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),c=(null!=s&&s.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);u.forEach((e=>{e.data.dimValue.value=r,e.data.dimValue.label=c,e.data.minor.value=i(e.data.layer.value,r).y}))}return u}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.clientX,y:n.clientY}).some((t=>t.key===e.tooltipOverlay)))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const ph=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},mh=e=>{ph(e),e.qMultiDimMode="Sum",e.qXColIx=0};function hh(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!ue.dimensionless(n)&&!ue.groupedByDimension(n)&&(r||!ue.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:Qm.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(Qm.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:Qm.ADD_BUTTON,add:mh,globalChange:e=>{const t=hu(e,"qHyperCubeDef.qMeasures",[]).reduce(((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e)),[]),r=(e=>!hu(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach((e=>{e.qContinuousXAxis=r})),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:Qm.TYPE,options:[{value:Hm,translation:Qm.TYPES.AVERAGE},{value:Vm,translation:Qm.TYPES.LINEAR},{value:Bm,translation:Qm.TYPES.POLYNOMIAL2},{value:_m,translation:Qm.TYPES.POLYNOMIAL3},{value:Um,translation:Qm.TYPES.POLYNOMIAL4},{value:Wm,translation:Qm.TYPES.EXPONENTIAL},{value:Km,translation:Qm.TYPES.LOG},{value:Gm,translation:Qm.TYPES.POWER}],defaultValue:Hm},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:eh,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:Qm.STYLE.DASHED,type:"boolean",defaultValue:!0,change:ph}}}}var gh={};function yh(){yh.init.call(this)}gh.isObject=function(e){return"object"==typeof e&&null!==e},gh.isNumber=function(e){return"number"==typeof e},gh.isUndefined=function(e){return void 0===e},gh.isFunction=function(e){return"function"==typeof e};var vh=yh;yh.EventEmitter=yh,yh.prototype._events=void 0,yh.prototype._maxListeners=void 0,yh.defaultMaxListeners=10,yh.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},yh.prototype.setMaxListeners=function(e){if(!gh.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},yh.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],gh.isUndefined(n))return!1;if(gh.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(gh.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},yh.prototype.addListener=function(e,t){var n;if(!gh.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,gh.isFunction(t.listener)?t.listener:t),this._events[e]?gh.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,gh.isObject(this._events[e])&&!this._events[e].warned)&&((n=gh.isUndefined(this._maxListeners)?yh.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,gh.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),gh.isFunction(console.trace)&&console.trace()));return this},yh.prototype.on=yh.prototype.addListener,yh.prototype.once=function(e,t){if(!gh.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},yh.prototype.removeListener=function(e,t){var n,r,i,o;if(!gh.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||gh.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(gh.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},yh.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],gh.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},yh.prototype.listeners=function(e){return this._events&&this._events[e]?gh.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},yh.listenerCount=function(e,t){return e._events&&e._events[t]?gh.isFunction(e._events[t])?1:e._events[t].length:0};const bh={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function xh(){const[e]=v({}),[t]=v({}),n=function(){var e,t,n,r;const i=D(),o=!(null==i||null===(e=i.qSelectionInfo)||void 0===e||!e.qInSelections),a=!(null==i||null===(t=i.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qIsOneAndOnlyOne),[s,l]=v(!1),[u,c]=v(!1),[d,f]=v({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),p=e=>{c("boolean"==typeof e?e:!u)};return C((()=>(f({key:"lasso",action:p,enabled:()=>s,active:()=>u}),{key:"lasso",label:"Lasso",icon:bh,hidden:!s||!o||a,active:u,action:p})),[o,a,u,s]),{get:()=>d,setAllows:e=>{l(!!e)}}}(),[r,i]=v();return q((()=>{const r={};r.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:n,discrete:r}=e;return t.allowScroll&&((null==n?void 0:n.meta.isContinuous)||(null==r?void 0:r.query.getCanScroll()))}},r.interact={key:"interact",isEnabled:!0,enabled:()=>t.allowInteract},r.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>t.allowTooltip},r.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>t.allowSelect},r.lasso=n.get(),Object.keys(r).forEach((e=>{return t=r[e],Object.keys(vh.prototype).forEach((e=>{t[e]=vh.prototype[e]})),vh.init(t),t;var t})),i(r)}),[]),q((()=>{r&&n&&(r.lasso={...r.lasso,...n.get()})}),[n]),{get:()=>r,setAllows:e=>{Object.assign(t,e),n.setAllows(null==e?void 0:e.allowSelect)},setContext:t=>{Object.assign(e,t)},destroy:()=>{Object.keys(r).forEach((e=>r[e].removeAllListeners()))}}}var qh={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},Mh={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",MAJOR_NUM:"majorNum",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",GHOST_BAR_OOB:"ghost-bar",STACK:"stack",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};function Sh({layout:e}){const t=ne.canBeContinuous(e),n=ue.continuous(e),r=ue.dimensionless(e);return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:ne.isTime(n,e),isDimensionless:r,isSimple:ue.simple(e),isGrouped:ue.grouped(e),isGroupedByMeasure:ue.groupedByMeasure(e),isGroupedByDimension:ue.groupedByDimension(e),isStacked:ue.stacked(e),isStackedByDimension:ue.stackedByDimension(e),isStackedByMeasure:ue.stackedByMeasure(e),isSnapshot:ue.snapshot(e)}}const Dh="QlikView Sans, sans-serif";var Ch=[["object.barChart","","fontFamily"],["object.barChart","outOfRange","color","#999"],["object.barChart","axis.title","color"],["object.barChart","axis.title","fontSize","13px"],["object.barChart","axis.title","fontFamily",Dh],["object.barChart","axis.label.name","color","#595959"],["object.barChart","axis.label.name","fontSize","12px"],["object.barChart","axis.label.name","fontFamily",Dh],["object.barChart","axis.line.major","color","#cccccc"],["object.barChart","axis.line.minor","color","#e6e6e6"],["object.barChart","label.value","color","#333333"],["object.barChart","label.value","fontSize","11px",e=>parseInt(e,10)],["object.barChart","label.value","fontFamily",Dh],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]];const wh={extractDimsAndNode(e){const t=[];let n;return e.forEach((e=>{if(e.key===Mh.COMPONENT.BAR){n=e;const r=hu(e,"data.selectionDimension",!1);r&&(t.push(r.label),r.label!==e.data.label&&t.push(e.data.label))}})),{nodeDims:t,node:n}}};function Oh(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(de).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function Th({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=Oh(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),u=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),c={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>c,update(e){var r;u.should(e)&&u(e),c.mode=K(c.mode,t.meta),c.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,c.mode.isStackedByDimension=c.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),c.mode.isStackedByMeasure=c.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),c.fields={major:c.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:c.mode.isStackedByDimension?e.qMeasureInfo.map(((e,t)=>"qMeasureInfo/"+t)):n.fields.minor},c.scales={major:Mh.SCALE.REDUCED.MAJOR,minor:Mh.SCALE.REDUCED.MINOR},c.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=K(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then((e=>e))},setSnapshotData(e){e.reducedHyperCube=c.cube}}}function Ah({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function Lh({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function Eh({picasso:e,chart:t,environment:n,viewState:r,viewCache:i}){const o=w(),a=O(),s=T(),l=A(),u=L(),c=S(),[d,f]=v(),[p,m]=v(),[h,g]=v(),y=E(),b=xh();return q((()=>{if(!t)return()=>{};const e=b.get(),n=function({chart:e,actions:t,selections:n}){const r=e.scale(Mh.SCALE.MAIN.MAJOR);return Vd({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{clear:Ah},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}})}({chart:t,actions:e,selections:u});return m(e),g(n),()=>{n.destroy(),b.destroy()}}),[t]),q((()=>{if(!y)return;const e={allowScroll:!y.active,allowInteract:!y.active,allowTooltip:!y.passive,allowSelect:!y.select&&!y.active};b.setAllows(e)}),[y]),q((()=>{if(!h||!n)return;const{theme:u,translator:d,localeInfo:m,flags:g,embed:y}=n,{direction:v="ltr"}=c,x=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(o)?Su({source:o}):void 0,q=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:o,options:c}),M=Su({source:o,metaAdditionsFn:Sh}),S=function(e){const t={};return t.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map(((e,t)=>"qDimensionInfo/"+t)),minor:e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>"qMeasureInfo/"+t))};return n.majorNumeric=(t.isStackedByDimension?n.majorStack:n.major)+":numeric",n}(e),t.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),t.selectionDimensionProp=e=>void 0===t.selectionDimensionIdx||void 0!==e&&t.selectionDimensionIdx!==e?{}:{selectionDimension:{field:t.selectionDimensionIdx}},t}(M),D=mu({chart:t,layoutService:M,config:{logicalSize:q,rtl:"rtl"===v},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),C=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:Kd(void 0===n?[]:n),styles:void 0};return r.styles=Gd(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=Gd(r.styleMatrix,e)}}}({theme:u,styleMatrix:Ch}),w=Ff.model({model:a,layoutService:M,viewCache:i,viewState:r}),O=Th({enigma:a,layoutService:M,viewModel:S});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:M,viewState:r,viewStateOptions:null==c?void 0:c.viewState});const T=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:u}){const{isContinuous:c,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const p=[],{isReduced:m}=u.model().mode,h=c||m||d,g=!c&&(m||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=iu({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:Lh,key:Mh.SCALE.MAIN.COLOR},createConfig:()=>({hc:h?g||s.getHyperCube():u.model().cube,source:h?y:"miniCube",theme:o})}),p.push(f.main.initialize()),c&&(f.mini=iu({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:Lh,key:Mh.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),p.push(f.mini.initialize())),Promise.all(p)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:e,model:a,app:s,translator:d,localeInfo:m,theme:u,continuousDataModel:w,layoutService:M,legendLayoutService:x,reducedDataModel:O}),A=rh({layoutService:M,viewState:r,colorModel:{settings:()=>T.getMain().getSettings(),resolveUIColor:e=>T.getMain().getPaletteColor(e)},chart:t,env:n,keys:{colorScale:Mh.SCALE.MAIN.COLOR},isEnabled:()=>!M.meta.isGroupedByDimension&&(!M.meta.isStackedByDimension||g.isEnabled("TRENDLINES_STACKED_DIM"))&&!M.meta.isDimensionless});em.attrExpr.updateProperties(a,o,g);const L=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Gp,miniChartToken:{},embed:s}}({layout:o,app:s,model:a,picasso:e,chart:t,translator:d,localeInfo:m,embed:y,extractDimsAndNode:wh.extractDimsAndNode});let E;M.meta.isDiscrete&&(E=zm({chart:t,actions:p,componentKey:Mh.COMPONENT.BAR,enigmaModel:a,layoutService:M,dockService:D,trendLineModel:A,itemWidths:qh,viewState:r,rtl:"rtl"===v,options:{axisKey:Mh.COMPONENT.BAR_AXIS}}));const N=aa({layoutService:M,discreteModel:E}),k=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:Mh.SCALE.MAIN.MINOR,MAJOR:Mh.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:Mh.COMPONENT.BAR,BAR_AXIS:Mh.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:Mh.COLLECTION.MAIN}}}}(M),I=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return ws(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=ws(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(As({},i));case 4:if("object"===Ds(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(As({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,Ns(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=Es(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=_s(!0,{},n.brush);_s(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===Ds(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Du({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Du({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e,plugins:l||[],pluginArgs:k});b.setContext({discrete:E,layoutService:M}),f({discrete:E,continuous:Ff,legendLayoutService:x,layoutService:M,viewModel:S,dockService:D,themeService:C,continuousDataModel:w,reducedDataModel:O,colorService:T,trendLineModel:A,refLineModel:N,pluginService:I,customTooltipModel:L,selectionService:h,logicalSize:q})}),[h,c,n,o]),d}function Nh(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function kh(e){return e.some(Nh)}function Ih(e,t){let n=NaN,r=NaN;return e.forEach((e=>{kh(e)||e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))}))})),{min:n,max:r}}function Ph(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function jh(e,t){let n=NaN,r=NaN;return e.forEach((e=>{if(!kh(e)){let i=0,o=0;e.slice(-t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)})),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}})),{min:n,max:r}}function Rh(e,t){const n={};e.forEach((e=>{if(!kh(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach((e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)}))}}));let r=NaN,i=NaN;return Object.keys(n).forEach((e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)})),{min:r,max:i}}function Fh(e){return"number"==typeof e&&!Number.isNaN(e)}function zh(e){const t=e.getHyperCubeValue("qMeasureInfo");return{min:Math.min(...t.filter((e=>Fh(e.qMin))).map((e=>e.qMin))),max:Math.max(...t.filter((e=>Fh(e.qMax))).map((e=>e.qMax)))}}function Hh(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function Vh(e){return!Number.isNaN(+e.qNum)}function Bh(e){return e.qNum}function _h(e){return!Number.isNaN(+e.qNum)}function Uh(e){return e.qNum}function Wh(e,t){return e.push(...t),e}const{getValueWithOffset:Kh,isNumber:Gh}=mo;function $h(e,t){return Math.abs(e/t)<5||0===t}function Yh({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=jh,stackedByDimensionExtractor:i=Rh,straightExtractor:o=Ih,measureInfoExtractor:a=zh,explicitExtractor:s=Ph}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),u=this.extractExplicit(),c=[0,o,a].filter((e=>Gh(e)));let d=Math.min(...c),f=Math.max(...c);d=$h(s,d)?Math.min(d,s):d,f=$h(l,f)?Math.max(f,l):f;const p=[u.explicitMin,u.explicitMax,d,f].filter((e=>Gh(e)));return o=Number.isNaN(u.explicitMin)?Math.min(...p):u.explicitMin,a=Number.isNaN(u.explicitMax)?Math.max(...p):u.explicitMax,o===a&&(Number.isNaN(u.explicitMin)?o=Kh(o,-.2):Number.isNaN(u.explicitMax)&&(a=Kh(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...u}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked(e){const t=e.length?e[0].qData:[];return(n=t).length?{min:Math.min(...n[0].qSubNodes.map((e=>e.qMinNeg))),max:Math.max(...n[0].qSubNodes.map((e=>e.qMaxPos)))}:{min:0,max:0};var n},extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=Hh(hu(e,"0.qData.0.qSubNodes",[]),Nh,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=hu(e,"0.qMatrix",[]).filter(kh).reduce(Wh,[]).filter(_h).map(Uh);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=Hh(hu(e,"0.qMatrix",[]),kh,[]).filter(Vh).map(Bh);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function Xh(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then((t=>({qDataPages:t,count:e})))}const u=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then((e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:u,others:t}}))}}}(e),n=Yh(e);return t.resolve().then((e=>n.extract(e)))}const Jh=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:"lasso",enable(e,n){if("lasso"===this.started||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),"lasso"!==this.started&&(i.actions.select.emit("start","lasso"),this.chart.component(e).emit("lassoStart",t),this.started="lasso")},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end","lasso")}}});const Zh=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),f=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i)}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else p&&f.emit("hide")}}}};const Qh=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const eg=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(i,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(a+"Start",n),this.started=e},[e+"move"](e){e.preventDefault(),this.chart.component(t).emit(a+"Move",e)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),o.actions.select.emit("end",e),this.started=!1}}});function tg(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=eg(e,t,"range");return{interactions:[e.onEdited?Qh(e,t):null,r].filter(Boolean),components:[n]}}const ng={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}};const rg={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){var t;const n=null==e||null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal,{qLocked:r=0,qOption:i=0,qSelected:o=0}=(null==e?void 0:e.qStateCounts)||{};return[void 0,0].includes(n)?r+i+o:n}},ig={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=rg.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach((e=>{n=Math.max(n,e.qFallbackTitle.length)}));return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?hu(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=ig.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=ig.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return me.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=ig.getAxisData(e),n=rg.getMaxGlyphCount(e,0);return me.getAdjustedMaxGlyphCount(n,t,0)}};var og=3,ag=13;function sg(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),{auto:s,spacing:l}=t.layoutService.getLayoutValue("gridLine",{}),u=[],c="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,d=ng[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode,f={type:"grid-line",x:{},layout:{minimumLayoutMode:ng.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(c){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:o.label.name.color,fontSize:o.label.name.fontSize,fontFamily:o.label.name.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},c={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},preferredSize:()=>({size:2*parseFloat(o.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a};u.push(K(!0,{},c,{key:"inner-time-axis",scale:Mh.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!s&&0===l}},style:K(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(K(!0,{},c,{key:"outer-time-axis",scale:Mh.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:Mh.SCALE.MAIN.MAJOR,layout:{dock:"@outer-time-axis",minimumLayoutMode:d}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:Mh.SCALE.MAIN.MAJOR_INNER,layout:{dock:"@inner-time-axis",minimumLayoutMode:d}}),u.push(p)}return u.push(K(!0,{},f,{key:"inner-time-grid",x:{scale:Mh.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(K(!0,{},f,{key:"outer-time-grid",x:{scale:Mh.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";c&&(u.push({type:"axis",key:e,scale:Mh.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:d},settings:{labels:{align:0,offset:4,fill:o.label.name.color,fontSize:o.label.name.fontSize,fontFamily:o.label.name.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:Mh.SCALE.MAIN.MAJOR,layout:{dock:"@"+e,minimumLayoutMode:d}}),u.push(p)),u.push(K(!0,{},f,{key:"continuous-grid",x:{scale:Mh.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),u="horizontal"===t.dockService.meta.major.orientation,c=u?e.dimensionAxis.label:"auto",d="horizontal"===c?void 0:t.dockService.meta.minor.size/4,f={type:"axis",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:ng[t.dockService.meta.major.orientation+"DimensionAxis"].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:c,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,fill:o.axis.label.name.color,fontSize:o.axis.label.name.fontSize,fontFamily:o.axis.label.name.fontFamily},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension"],style:{inactive:{opacity:.3}}}]}};l&&a.push(K(!0,{},f,{key:"group-axis",scale:Mh.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":f.settings.labels.mode,maxGlyphCount:ig.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(u||!s)&&f.settings.line.show}}}));const p=ig.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(K(!0,{},f,{key:Mh.COMPONENT.BAR_AXIS,scale:Mh.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>og&&p<ag?1:void 0},line:{show:!(u&&l)&&f.settings.line.show}}})),u||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles();return a&&o.push({type:"axis",key:"y-axis",formatter:Mh.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:ng.measureAxis.minimumLayoutMode},scale:Mh.SCALE.MAIN.MINOR,settings:{labels:{show:s,fill:l.axis.label.name.color,fontSize:l.axis.label.name.fontSize,fontFamily:l.axis.label.name.fontFamily},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}}}),o}var lg={BAR:{WIDTH:.7,STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function ug({layoutService:e,discrete:t,componentKey:n}){const{isContinuous:r,isGrouped:i}=e.meta;if(r)return 1;const o=(e.getLayoutValue("components",[])||[]).filter((e=>e.key===n))[0];if(o){const{style:e}=o;return e.strokeWidth&&"none"!==e.strokeWidth?function(){const n=lg.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return i?.9:.7}const cg={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function dg(e,t,n={}){return({data:r})=>{const i=e.chart.component(t).rect;if(!r.items.length||!i)return 2;const{min:o,max:a}=e.viewState.get("zoom");if(n[[o,a]])return n[[o,a]];const s=cg[Z.getLayoutMode(i.width,Number.MAX_VALUE)];n={};const l=Math.abs(a-o),u=Math.abs(e.viewCache.get("continuousMax")-e.viewCache.get("continuousMin"));if(0===u)return s;const c=function(e,t,n){return e*(1-n)+t*n}(2,s,1-Math.min(l/u/.2,1));return n[[o,a]]=Math.max(2,Math.min(s,c)),n[[o,a]]}}function fg(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function pg(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function mg(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function hg(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const gg="max",yg="min",vg={min:"Min",max:"Max"};function bg(e,t,n){return void 0===n?fg(e,t)||pg(e,t):n===gg?fg(e,t):pg(e,t)}function xg({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e["hasExplicit"+vg[t]]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===gg?e.implicitMax:e.implicitMin;return!bg(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function qg(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===gg?s.implicitMax:s.implicitMin;if(!bg(Number(l.toFixed(13)),s,n))return!1;const u=n===gg?o.meta.minor.end:o.meta.minor.start;let c="end";r&&(c=n===gg?"sumOfPositives":"sumOfNegatives");const d=a.getStyles();return{type:"box-out-of-bounds",key:"bar-oob-"+n,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,dockValue:fe.getDockValue(u),oob:K({},t.settings.box,{fill:d.outOfRange.color,alignment:1,opacity:1,show:function(e){var t;return!0!==(null===(t=e.datum.null)||void 0===t?void 0:t.value)&&((!r||0!==e.datum[c].value)&&bg(e.datum[c].value,s,n))}})}}}function Mg(e){return Math.min(Math.max(0,e),1)}const Sg=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,u=s.get("minorMinMax"),{meta:c}=e.layoutService;if(!xg({minorMinMax:u,type:n}))return!1;let d;c.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:c.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);return{type:"box",key:`${Mh.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:Mh.SCALE.MAIN.MAJOR,fn:d},minor:{scale:Mh.SCALE.MAIN.MINOR,start(e){var n,r;return Mg(t.scale(Mh.SCALE.MAIN.MINOR)((null==e||null===(n=e.datum)||void 0===n||null===(r=n.start)||void 0===r?void 0:r.value)||0))},end(e){const r=t.scale(Mh.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return Mg(r(o))}},box:{width:ug({layoutService:e.layoutService,discrete:e.discrete,componentKey:r}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(Mh.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Dg(e){return function(t){return ft.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}function Cg(e){const t="horizontal"===e.dockService.meta.major.orientation;return{placements:e.simplifiedPlacements.map((n=>function(e,t,n){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:Dg(t),overflow:e.overflow,background:e.background,padding:r}}(n,e.style,t))),label:e.label}}function wg(e,t){if(t){if(function(e,t){return fg(e,t)}(e,t))return-1;if(function(e,t){return pg(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}function Og(e,t,n,r){const i=wg(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function Tg(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function Ag(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function Lg(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function Eg({layout:e,component:t,minorScale:n},r,i){if(!Tg(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:u,themeService:c}=r,{meta:d}=l,f=s.get("minorMinMax"),p=c.getStyles();let m;!d.isStacked&&(m=d.isStacked?1:0);const h=0===m?1:0,g=d.isStacked?.5:1,y=o.fields.minor[0],v=void 0===y?void 0:a.field(y).formatter();let b,x=-1;b=d.isStacked?d.isStackedByMeasure||!v?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>x?v(e.data.segment.value):""}:function(e){return e.data.end.label};const q={label:b,simplifiedPlacements:Lg(m,h,g,d.isContinuous),style:p.label.value},M=[Cg(K(r,q))],S={key:"bar-labels",type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Og(e.data.end.value,u.meta.minor.orientation,i,f),labels:M,fontSize:p.label.value.fontSize,fontFamily:p.label.value.fontFamily}}}]}};return d.isStackedByDimension&&v&&(S.beforeRender=()=>{x=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),S}const Ng={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const o=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:o.measureIndex.value]:void 0,s=n.isStacked?{source:{key:o.source.key,field:a},label:!0===(null===(l=o.null)||void 0===l?void 0:l.value)?"":n.isStackedByDimension&&i?i(o.segment.value):o.segment.label}:o.end;var l;return qe.getMeasure(e,s)},getMeasures(e,t,n,r,i){const o=e.resources.dataset;return t.map((e=>Ng.getMeasure(o,e,n,r,i))).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return Jp({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,i){const o={title:Ng.getTitle(t,n),color:qe.getColor(e,t,r),measures:Ng.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(Ng.useCustomTooltip(r)){var a,s,l,u;const n=Ng.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=n.customTooltipAttrExpsArr,o.customTitle=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===Pp.CUSTOM.TITLE)),o.customDescription=n.customTooltipInfoAttrExpsArr.filter((e=>e.id===Pp.CUSTOM.DESCRIPTION));let i=[];(t.childrenNodes?t.childrenNodes:[t]).forEach((e=>{var t;(null===(t=e.data.customTooltipImages)||void 0===t?void 0:t.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(i=e.data.customTooltipImages)})),i.length>0&&(o.customImages=i);const m=r.layoutService.getLayout();var c,d,f,p;if(r.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(a=m.tooltip)&&void 0!==a&&null!==(s=a.chart)&&void 0!==s&&null!==(l=s.object)&&void 0!==l&&l.refId&&r.customTooltipModel.embed&&"function"==typeof(null===(u=r.customTooltipModel.model)||void 0===u?void 0:u.getEffectiveProperties))if(null!==(c=(d=r.app).isInModalSelection)&&void 0!==c&&c.call(d)){if((null==m||null===(f=m.qHyperCube)||void 0===f||null===(p=f.qDimensionInfo)||void 0===p?void 0:p.length)>0){_p.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=e}}else{const t=_p.createContainer({ctx:e,layout:m});o.customChart=t}}return o},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData:(e,t,n)=>({title:e.data.label,measures:[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter((e=>0!==e)).map((e=>({label:""+Ng.getTotalStackTitle(e,t),value:n?n(e):e})))}),extractTooltipData(e,t){const n=t.chart.formatter(Mh.FORMATTER.MINOR),{meta:r}=t.layoutService,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map((e=>Ng.extractStackTotalBarTooltipData(e,t.translator,n))):[];return{barTooltipData:i.map((i=>Ng.extractBarTooltipData(e,i,r,t,n))),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData(e,t,n,r,i,o,a){let s=!i&&qe.getTitleRow(t,r);const l=qe.hideColorRow(t,n),u=!o&&!l&&qe.getColorRow(e,t,r),c=t.measures.map((i=>!a&&qe.getMeasureRow(i,e,t,r,l&&i.field===n.coloring.field))).filter((e=>!Ng.isSameMeasureAndColorRow(e,u,r)));if(Ng.useCustomTooltip(n)){const o=i?[]:t.customMeasures.map((n=>qe.getMeasureRow(n,e,t,r,!1))),a=!(!t.customTitle[0]||i)&&qe.getTitleRow(t.customTitle[0],r),l=!(!t.customDescription[0]||i)&&qe.getDescriptionRow(t.customDescription[0],r);s=!Ng.shouldIgnoreTitleRowForCtt(a,l,c,o)&&s;const d=[a,l,s,u,...c,...o];if(n.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&t.customChart&&d.push(t.customChart),t.customLimitation&&d.push(Gp.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map((t=>Gp.getImageRow(t,e)));d.push(...n)}return d.filter(Boolean)}return[s,u,...c].filter(Boolean)},extractStackTotalBarNodeData:(e,t,n)=>[!!t.measures.length&&qe.getTitleRow(t,n),...t.measures.map((r=>qe.getMeasureRow(r,e,t,n,!1)))].filter(Boolean),useCustomTooltip:e=>hu(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some((e=>e.field===n.coloring.field)),shouldIgnoreDefaultRows:(e,t)=>Ng.useCustomTooltip(t)&&hu(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:i}=t.layoutService,o=t.layoutService.getLayout(),a=r.length;let s,l,u=[];const c=Ng.shouldIgnoreDefaultRows(o,t);for(s=0;s<a;s++){l=r[s];const o=Ng.shouldIgnoreTitleRow(i,s),d=c||Ng.shouldIgnoreColorRow(i,s),f=c||Ng.shouldIgnoreMeasureRow(d,l,t);if(u=u.concat(Ng.extractBarNodeData(e,l,t,n,o,d,f)),u.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:u,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:u,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some((e=>e.measures.length))&&n.forEach((n=>{r=r.concat(Ng.extractStackTotalBarNodeData(e,n,t))})),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:i,stackTotalBarTooltipData:o}=Ng.extractTooltipData(e,t),a=Ng.extractStackTotalBarsData(e,n,o);a.length&&a.push(qe.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=Ng.extractBarsData(e,t,n,r),u=a.concat(s),c=i+l;return c&&u.push(qe.getNMoreRow(c,t.translator,n)),u},calculateBoundsFromBars(e){const t=e.filter((e=>{const t=e.bounds;return t.width>0&&t.height>0})),n=t.length?t:e;return sa.combineBounds(n.map((e=>e.bounds)))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:i,groupProp:o}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",u=e.chart.scale(n).pxScale(a[l]);let c,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;c=i.value,d=n===r&&void 0!==c?(u([c,0])+u([c,t-1]))/2:0,f=n===r&&void 0!==c?u.bandwidth([c,0]):0}else{const{value:e}=i;c=i[o]?i[o].value:void 0,d=u(n===r&&void 0!==c?[c,e]:e),f=n===r&&void 0!==c?u.bandwidth([c,e]):u.bandwidth(e)}const p=(d+f/2)*a[l],m={width:0,height:0};return"horizontal"===s?(m.x=p,m.y=a.height):(m.y=p,m.x=0),m},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:i,majorScale:o,majorInnerScale:a,groupProp:s}){const l=n.filter((e=>e.children&&e.children.length));let u;return u=l.length?Ng.calculateBoundsFromBars(l):Ng.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===i?o:a,majorScale:o,data:t[0].data,groupProp:s}),u},filterNodesOnKeys:(e,t)=>e.filter((e=>e.data&&t.indexOf(e.key)>-1)),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels:(e,t,n,r)=>e.filter((e=>t.some((t=>n(e,t,r))))),findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=Ng.isBarMatchingLabelOnProp;return Ng.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter((e=>t.some((t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)))),findBarsFromLabelsInSingleDim(e,t){const n=Ng.isBarMatchingLabel;return Ng.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const i=t.filter((e=>e.key===n)),o=t.filter((e=>e.key!==n)),a=Ng.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=Ng.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=Ng.isBarMatchingLabel;return Ng.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=Ng.isBarMatchingLabel;return Ng.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=Ng.isBarMatchingLabelOnProp;return Ng.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>Ng.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:i,stackProp:o}){const{meta:a}=t.layoutService,s=Ng.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?Ng.findBarsFromLabelsInStackedByDim(s,e,o):a.isStackedByMeasure?Ng.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?Ng.findBarsFromLabelsInGroupedByDim(s,e,r,i):Ng.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const i=Ng.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?Ng.findStackTotalBarsFromLabelsInStackedByDim(i,e):Ng.findStackTotalBarsFromLabelsInStackedByMeasure(i,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:u,majorInnerScale:c,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let p=Ng.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(p=p.filter(d)),Ng.isSingleBarMode(f,p))return[p[0]];if(p.length){let f=Ng.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,o,a],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const m=Ng.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:i,groupProp:s,majorScale:u,majorInnerScale:c}),h=Ng.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r});return[{key:n,bounds:m,childrenNodes:p,data:p.map((e=>e.data)),stackTotalBarNodes:h}]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,groupAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d}){let f=Ng.filterNodesOnKeys(e,[i,o]),p=f&&f.length?[f[0]]:[];const m=Ng.filterNodesOnLabels({labels:p,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d});if(m&&m.length)return m;const{meta:h}=t.layoutService;if(h.isStackedByMeasure){f=Ng.filterNodesOnKeys(e,[a,s]),p=f&&f.length?[f[0]]:[];const o=e=>Ng.filterNodesForOob(e,n,a),m=Ng.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d,filterFn:o});if(m&&m.length)return m[0].stackTotalBarNodes=void 0,m}if(h.isStackedByDimension){f=Ng.filterNodesOnKeys(e,[a,s]),p=f&&f.length?[f[0]]:[];const o=e=>Ng.filterNodesForOob(e,n,a),m=Ng.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:u,majorScale:c,majorInnerScale:d,filterFn:o});if(m&&m.length)return m[0].stackTotalBarNodes=void 0,m}const g=Ng.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function kg(e,t={},n){let r=[];const i=ge({key:Mh.COMPONENT.BASE_TOOLTIP,rtl:n});return K(!0,i,{scale:Mh.SCALE.MAIN.COLOR,settings:{filter:e=>Ng.filterNodes({nodes:e,opts:t,barKey:Mh.COMPONENT.BAR,stackTotalBarKey:Mh.COMPONENT.STACK_TOTAL_BAR,barAxisKey:Mh.COMPONENT.BAR_AXIS,groupAxisKey:Mh.COMPONENT.GROUP_AXIS,barOobMaxKey:Mh.COMPONENT.BAR_OOB_MAX,barOobMinKey:Mh.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],Ng.extractData(e,t,n)),placement:"bounds",afterShow:()=>{var e,i;const{app:o,properties:a,customTooltipModel:s}=t;t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=(i=t.app).isInModalSelection)||void 0===e||!e.call(i))&&s.useCustomTooltip&&s.embed&&_p.show({app:o,properties:a,selectedNodes:r,customTooltipModel:s,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const Ig={extractData:(e,t)=>[qe.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter((e=>e.data&&e.key===t));return n.length?[n[0]]:[]}};function Pg(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=ge({key:Mh.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return K(!0,r,{scale:Mh.SCALE.MAIN.COLOR,settings:{filter:e=>Ig.filterNodes(e,Mh.COMPONENT.LEGEND_COLOR_CAT),extract:e=>Ig.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function jg(e){return"NaN"===e.qMin&&"NaN"===e.qMax}function Rg({layout:e},t,n){return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:Y[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:i}}}(function(e,t){if(e.qHyperCube.qSize.qcx*e.qHyperCube.qSize.qcy==0)return"NoDataExist";if(e.qHyperCube.qMeasureInfo.every(jg))return"OnlyNanData";let n=!1;if(t.layoutService.meta.isContinuous&&2===e.qHyperCube.qDimensionInfo.length){const t=e.qHyperCube.qDimensionInfo[1];n=rg.getDimensionSize(t)>ne.maxNumberOfLines}return!!n&&"LimitedData"}(e,t),t,{rtl:n})}function Fg(e,{fill:t}){return{[Mh.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[Mh.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const zg=1,Hg=3;function Vg(e){return e.getLayoutValue("gridLine.auto")}function Bg(e){return!Vg(e)&&e.getLayoutValue("gridLine.spacing")===zg}function _g(e){return!Vg(e)&&e.getLayoutValue("gridLine.spacing")===Hg}const Ug=(e,{themeService:t,layoutService:n,dockService:r})=>{if(!Vg(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:i}=t.getStyles(),o={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:ng.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!Bg(n)||((e,t)=>t%2==0),stroke:i.line.major.color},minorTicks:{show:_g(n),stroke:i.line.minor.color}};return o["horizontal"===r.meta.major.orientation?"y":"x"]=Mh.SCALE.MAIN.MINOR,o};function Wg(e,t){const n=[Ug(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n})=>{const r=n.get("minorMinMax");if(r.min>0||r.max<0)return!1;const i=t.getStyles(),o={};return o["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:Mh.SCALE.MAIN.MINOR,line:{stroke:i.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:Mh.SCALE.MAIN.MINOR,lines:o}})(t)),n}const Kg=e=>({type:"Pan",key:"panorama",options:{event:"areaPan",pointers:1,threshold:10,enable(t,n){return"areaPan"===this.started||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===Mh.COMPONENT.BAR))}},events:{areaPanstart(t){t.preventDefault(),this.started="areaPan";const n=e.viewState.get("zoom");this.areaPan={min:n.min,max:n.max,size:e.chart.component(Mh.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this.areaPan,a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function Gg(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=Ff.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:Mh.COMPONENT.BAR}),s={last:0,diff:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>e.key===Mh.COMPONENT.BAR))},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function $g({chart:e},t,n){const r=e.component(Mh.COMPONENT.BASE_TOOLTIP);var i;r&&r.show&&(r.emit("hide"),null!=n&&null!==(i=n.customTooltipModel)&&void 0!==i&&i.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const o=e.component(Mh.COMPONENT.LEGEND_CAT_TOOLTIP);o&&o.show&&o.emit("hide");const a=e.component(Mh.COMPONENT.TREND_LINES_TOOLTIP);a&&a.show&&a.emit("hide")}function Yg(e,t){const{viewCache:n,viewState:r,chart:i,trendLineModel:o,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?Ff.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:Mh.COMPONENT.BAR}):void 0,u=fh({majorInnerScale:Mh.SCALE.MAIN.MAJOR_INNER,tooltip:Mh.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:Mh.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),c=[Mh.COMPONENT.BAR,Mh.COMPONENT.BAR_AXIS,Mh.COMPONENT.GROUP_AXIS,Mh.COMPONENT.BAR_OOB_MAX,Mh.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter((e=>e.key===Mh.COMPONENT.BAR)),n&&(e.layoutService.meta.isContinuous&&l(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter((e=>e.key===Mh.COMPONENT.LEGEND_COLOR_CAT)),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),$g(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(u(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(Mh.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some((e=>c.indexOf(e.key)>-1))){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const i=d.getNodes(t,this.chart);f(t,r,{nodes:i,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const i=this.chart.component(Mh.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&(n.some((e=>e.key===Mh.COMPONENT.LEGEND_COLOR_CAT))?i.emit("show",t):i.emit("hide"))}},mouseup(t){2===t.button&&$g(this,f,e)},mouseleave(){$g(this,f,e)}}}}const Xg=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...np({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[Kg(e,t.rtl),Gg(e,t)]]});function Jg(e,t){const{actions:n}=e;if(!n.interact.enabled())return[];const r=[Xg(e,t),Yg(e,t),np({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const Zg=(e,t,n,r,{ds:i,colorService:o})=>{const a=o.getMain();if("measure"===a.getSettings().mode||"field"===a.getSettings().mode||/qAttrDimInfo/.test(a.getSettings().field))return r.map((r=>{return i=r.label,e.measureText({text:i,fontSize:t,fontFamily:n});var i})).reduce(((e,t)=>t&&t.width>e.width?t:e),{width:0});let s=i.field(a.getSettings().field).raw().qApprMaxGlyphCount;s=me.getAdjustedMaxGlyphCount(s,r,void 0,"label");const l=new Array(s+1).join("m");return e.measureText({text:l,fontSize:t,fontFamily:n})};const Qg=(e,t,{collectionKey:n})=>{if(!Uf({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,{reducedDataModel:t,colorService:n,continuousDataModel:r},{collectionKey:i}){return{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:i},settings:{box:K(!0,{},e.settings.box,{minWidthPx:2,fill:n.getMini().getColor(),strokeWidth:0}),major:K(!0,{},e.settings.major,{scale:t.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:"mini-marker",layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}},{measureText:ey}=e.renderer("svg")();function ty(e,t,n){return{reducedMinor:function(e){const t=K(!0,{},e);return delete t.data,t}(t.minor),reducedMajor:function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map(((e,t)=>({field:e,value:t}))):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=K(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=K(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n)}}const ny=50,ry=100,iy=200;function oy(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return ny;case 1:return ry;case 2:return iy;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function ay(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function sy(e,t,n){return 0===t||0===e||t===n.length-1}function ly(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function uy(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),u=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}(s),c=u?sy:ay;s=s.filter(c),l&&!u&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(Mh.FORMATTER.MINOR):void 0;return ly(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function cy(e,t,n,r,i,o,a,s){const l=o.formatter(Mh.FORMATTER.MINOR),u=s.getStyles(),c="horizontal"===a.meta.major.orientation?"height":"width",d=e=>ey({text:e,fontSize:u.axis.label.name.fontSize,fontFamily:u.axis.label.name.fontFamily})[c];let[f,p]=e.domain(),m=e.ticks(r);function h(){const e=m.map(l);return!ly(e)&&function(e){const t=i/m.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!h();i--)e.domain([t,n]),e.nice(i),[f,p]=e.domain(),m=e.ticks(i);return{roundedMin:f,roundedMax:p,ticks:m}}const dy=(e,t)=>e.value-t.value,fy=e=>({value:e,isMinor:!1}),py=e=>({value:e,isMinor:!0});function my(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter((e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e))).length<=r}function hy({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i}){const{explicitMin:o,explicitMax:a,hasExplicitMin:s,hasExplicitMax:l}=t.get("minorMinMax"),{min:u,max:c}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),d=vu((()=>{const d=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(Mh.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=oy(d,r),p=function(e,t,n){const r=ur().domain([e,t]);return r.nice(n),r}(u,c,f);let m,h,g=[];"SPARK"===n.meta.chart.mode?({roundedMin:m,roundedMax:h}=function(e,t){return{roundedMin:e,roundedMax:t}}(u,c)):(({roundedMin:m,roundedMax:h,ticks:g}=cy(p,u,c,f,d,e,n,i)),my(g,o,a)&&({roundedMin:m,roundedMax:h,ticks:g}=uy(p,u,c,s||l,e)));const y=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(g,1);g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.unshift(t),n.filter((e=>e>=t))):n}(s,o,g),g=function(e,t,n){return e&&n.length&&!n.some((e=>e===t))?(n.push(t),n.filter((e=>e<=t))):n}(l,a,g);return{roundedMin:m,roundedMax:h,ticks:function(e,t){return[...e.map(fy),...t.map(py)].sort(dy)}(g,y)}}),(()=>t.get("isPreRender")));return{values:()=>d().ticks,min:()=>s?o:d().roundedMin,max:()=>l?a:d().roundedMax}}function gy(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:u,viewState:c,chart:d},{localeInfo:f,rtl:p}){const{meta:m}=r,{fields:h}=o,g=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},y=!("none"===r.getLayoutValue("measureAxis.show"))?(v=i.meta.minor.orientation,b=i.meta.minor.dock,"vertical"===v?"near"===b||"left"===b?0:1:"near"===b||"bottom"===b?1:0):.5;var v,b;const x={},q="vertical"===i.meta.minor.orientation&&p,M=l.getMain().getScales(),S=l.getMini().getScales();if(Object.assign(x,M,{reducedFill:S.reducedFill}),x[Mh.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,layoutService:i,themeService:o},{rtl:a}){const s=hy({chart:e,dockService:n,viewCache:r,layoutService:i,themeService:o}),l={invert:"vertical"===n.meta.minor.orientation||a,ticks:{values:s.values},minorTicks:{count:1},min:s.min,max:s.max};return i.meta.isStacked||(l.data={source:"qHyperCube",fields:t.minor}),l}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:u},{rtl:p}),m.isGroupedByDimension)[Mh.SCALE.MAIN.MAJOR_INNER,Mh.SCALE.MAIN.MAJOR].forEach(((e,t)=>{x[e]={invert:q,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:m.isGroupedByDimension?{field:h.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:g,align:y}}));else if(m.isGroupedByMeasure)x[Mh.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:q,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{...o.selectionDimensionProp(0)}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:g,align:y};else if(m.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,u=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),c=o.formatter("q-time"),d=l.getStyles(),f=e=>ey({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const p={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=u().map((e=>e.qName));return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:u,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:p},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:u,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:c,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:p}}}({picasso:t,localeInfo:f,viewState:c,viewModel:o,viewCache:a,themeService:u,layoutService:r},p);x[Mh.SCALE.MAIN.MAJOR_INNER]=e,x[Mh.SCALE.MAIN.MAJOR]=n}else m.isContinuous?x[Mh.SCALE.MAIN.MAJOR]={type:"linear",invert:q,data:{extract:{key:"qHyperCube",field:h.majorNumeric}},ticks:{forceBounds:!0,count:c.get("zoom").min===c.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>c.get("zoom").min,max:()=>c.get("zoom").max}:x[Mh.SCALE.MAIN.MAJOR]={invert:q,data:{extract:m.isDimensionless?h.minor.map(((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n}))):{source:"qHyperCube",field:"qDimensionInfo/0",props:{...o.selectionDimensionProp(0)}}},type:m.isDimensionless?"band":void 0,maxPxStep:g,align:y};const{reducedMinor:D,reducedMajor:C}=ty(s,{major:x[Mh.SCALE.MAIN.MAJOR],minor:x[Mh.SCALE.MAIN.MINOR]},{majorScaleInvert:q,maxPxStep:g,align:y,getProp:a.get});return m.isDiscrete&&(x[Mh.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,m.isGroupedByDimension&&(x[Mh.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),x[s.scales.major]=C,x[s.scales.minor]=D,x}function yy(e,t,n){const{layoutService:r,colorService:i}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[Zh(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?Mh.COMPONENT.STACK_TOTAL_BAR:Mh.COMPONENT.BAR,Mh.COMPONENT.BAR_AXIS,Mh.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",Mh.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return[Mh.COMPONENT.BAR,Mh.COMPONENT.BAR_AXIS,Mh.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some((e=>e.key===Mh.COMPONENT.LEGEND_COLOR_CAT))?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function vy(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[Jh(n,t)],components:[r]}}({key:"lasso",componentTargetKey:Mh.COMPONENT.BAR,components:[t?{key:Mh.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:Mh.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function by(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[eg(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:Mh.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",Mh.COMPONENT.BAR_AXIS,Mh.COMPONENT.BAR],fillTargets:["group-axis",Mh.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function xy(e,t){const{selectionService:n}=e,r=void 0===t,i=n.getIsSingleSelect(t),o=yy(e,r,i);if(r||i)return{components:[...o.components],gestures:[...o.interactions]};const a=vy(e),s=function(e){return e.layoutService.meta.isStacked?{components:[],interactions:[]}:tg({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",Mh.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:Mh.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e),l=function(e){return e.layoutService.meta.isContinuous?tg({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",Mh.COMPONENT.BAR]:["continuous-axis",Mh.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?Mh.SCALE.MAIN.MAJOR_INNER:Mh.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const i=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(Mh.FORMATTER.MINOR),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`}},e):{components:[],interactions:[]}}(e),u=by(e);return{components:[...o.components,...a.components,...s.components,...u.components,...l.components],gestures:[...a.interactions,...o.interactions,...s.interactions,...u.interactions,...l.interactions]}}function qy({layoutService:e,viewModel:t,dockService:n}){const{meta:r}=e;if(!r.isStackedByDimension||r.isContinuous)return!1;const{fields:i}=t,o=e.getLayoutValue("components",null),a=o?o.filter((e=>"bar"===e.key))[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMaxPos)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMaxPos.toFixed(13))}}},{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>{return t=e.qSubNodes,Number(t.map((e=>e.qMinNeg)).reduce(((e,t)=>e+t),0).toFixed(13));var t}},end:{value:e=>Number(e.qMinNeg.toFixed(13))}}}]},settings:{major:{scale:Mh.SCALE.MAIN.MAJOR},minor:{scale:Mh.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:a&&a.style.width>0?a.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}}const My={min:"Min",max:"Max"};function Sy(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?mg(e,t)||hg(e,t):n===gg?mg(e,t):hg(e,t)}(Number(r.toFixed(13)),e,t)}function Dy(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,layoutService:o,dockService:a}=e,s=i.get("minorMinMax"),l=n===gg;if(function(e,t){return!e["hasOther"+My[t]]}(s,n)){if(function(e,t){return!e["hasExplicit"+My[t]]}(s,n))return!1;if(Sy(s,n,l))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e["hasExplicit"+My[t]]&&r(e["explicit"+My[t]])}(s,n,l))return!1;let u="end";r&&(u=l?"sumOfPositives":"sumOfNegatives");const c=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.chart.scale(Mh.SCALE.MAIN.MINOR)[n]())),d=l?e=>e.datum[u].value>c():e=>e.datum[u].value<c(),f=Mh.COMPONENT.BAR,p=e.layoutService.getLayoutValue("components",[]),m=p?p.filter((e=>e.key===f))[0]:null;return{type:"box-sliced-hat",key:"sliced-hat-"+n,layout:{dock:l?a.meta.minor.end:a.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:K({},t.settings.box,{fill:o.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:d,width:ug({layoutService:e.layoutService,discrete:e.discrete,componentKey:f}),strokeWidth:m?lg.BAR.STROKE.WIDTH[m.style.strokeWidth.toUpperCase()]:lg.BAR.STROKE.WIDTH.NONE,stroke:m?m.style.strokeColor.color:lg.BAR.STROKE.COLOR})}}}function Cy(e,t){let n;return n=e.isContinuous?1:.7,!e.isContinuous&&t&&t.style.width>0?t.style.width:n}function wy(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum",a=e=>"NaN"===e[o]?0:e[o];function s(t){const n=e.ds.field(t).raw(),r=e.ds.field(t).formatter(),i=!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType);return{field:t,reduceLabel:"none",value:a,label:e=>i?(e=>"NaN"===e[o]?"-":r(e[o]))(e):e.qText}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;const u={key:t,data:{extract:i.minor.map(((t,o)=>{const a=e.colorService.getMain().getDatumProps(o),u=e.colorService.getMini().getDatumProps(o),c=a[Object.keys(a)[0]],d=null==c?void 0:c.field,f=d?{field:d,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,p={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),start:0,end:s(t),null:(m=t,{field:m,reduceLabel:"none",reduce:"first",value:l}),segment:r.isStacked?s(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:f,...a,...u,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?Yp.getNode(e.layoutService.getLayout(),r):void 0}};var m;return r.isDimensionless&&(p.value=o),void 0!==n&&(p.source=n),oe(p.props),p}))}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}function Oy({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map((e=>({field:e}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},null:{fields:t.minor.map((e=>({field:e}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>Number(e.qMaxPos.toFixed(13))},sumOfNegatives:{value:e=>Number(e.qMinNeg.toFixed(13))},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every((e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue))}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t>0?e+t:e),0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce(((e,t)=>t<0?e+t:e),0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const Ty="main-collection",Ay="stack-total-collection";const Ly="mini-collection",Ey="mini-stack-collection",Ny="mini-continuous-collection",ky="miniCube",Iy=(e,t)=>{const n=(e=>{const t=[wy(e,{collectionKey:Ty})];return e.layoutService.meta.isStacked&&t.push(Oy(e,{collectionKey:Ay})),t})(t),r=((e,t)=>{const n=[];return Uf({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(wy(t,{collectionKey:Ny},ky)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}})),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:Ey})):n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map(((e,t)=>{const o=i.isReduced?{}:n.getMain().getDatumProps(t),a={end:{field:e},start:0,group:{field:r.majorGroup},measureIndex:t,...o},s={source:"miniCube",field:i.isDimensionless?e:r.major,props:a};return i.isDimensionless&&(s.value=t),s}))}}}(t,{collectionKey:Ly}))),n})(0,t);return n.concat(r)};function Py(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function jy({layout:e,component:t},n,r){if(!Ag(e,n))return!1;const{meta:i}=n.layoutService,o=!Tg(e,n),a=n.themeService.getStyles();function s(e){const t=n.chart.formatter(Mh.FORMATTER.MINOR);return t?t(e):e}const l={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":s(e.data.sumOfPositives.value)},simplifiedPlacements:Py("outside",o,i.isContinuous),style:a.label.value},u={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":s(e.data.sumOfNegatives.value)},simplifiedPlacements:Py("opposite",o,i.isContinuous),style:a.label.value};return{key:"stack-total-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Og(e.data.sumOfPositives.value,n.dockService.meta.minor.orientation,r),labels:[Cg(K(n,l)),Cg(K(n,u))],fontSize:a.label.value.fontSize,fontFamily:a.label.value.fontFamily}}}]}}}function Ry(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function Fy({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o}=n,{meta:a}=r,{isStacked:s}=a;if(!s&&!Tg(e,n)||s&&!Ag(e,n))return!1;const l=i.get("minorMinMax");if(!l.hasExplicitMinMax||t===gg&&0===l.max||t===yg&&0===l.min)return!1;if(!bg(t===gg?l.implicitMax:l.implicitMin,l,t))return!1;const u=o.getStyles();let c=e=>e.data.end.label;a.isStacked&&(c=t===gg?function(e){if(bg(e.data.sumOfNegatives.value,l,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(Mh.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(bg(e.data.sumOfPositives.value,l,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(Mh.FORMATTER.MINOR);return r?r(t):t}return""});const d={color:"#595959",lightColor:"#E6E6E6",darkColor:"#595959",fontSize:13,fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'"},f={label:c,simplifiedPlacements:Ry("outside",true,a.isContinuous),style:d},p={label:c,simplifiedPlacements:Ry("opposite",true,a.isContinuous),style:d},m=[Cg(K(n,f)),Cg(K(n,p))],h="vertical"===n.dockService.meta.minor.orientation?"down":"right",g={component:`${Mh.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:h,labels:m,fontSize:u.label.value.fontSize,fontFamily:u.label.value.fontFamily}}};return{key:"bar-oob-labels-"+t,type:"labels",layout:{minimumLayoutMode:"XSMALL"},settings:{sources:[g]}}}function zy(e){return"all"===e||"title"===e}function Hy(e,t,n){if(!zy(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const{actions:r,properties:i}=t,o=t.themeService.getStyles(),a={hyperCube:e.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:()=>{var e;return!(null!=r&&null!==(e=r.interact)&&void 0!==e&&e.enabled())},model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleDimensions&&(a.padding="0",a.minWidth="auto"),{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:ng[t.dockService.meta.major.orientation+"DimensionAxisTitle"].minimumLayoutMode,dock:t.dockService.meta.major.dock},settings:a,style:{fontFamily:o.axis.title.fontFamily,fontSize:o.axis.title.fontSize,color:o.axis.title.color}}}function Vy(e,t,n){if(!zy(e.measureAxis.show))return!1;const{layoutService:r,actions:i}=t,o=t.properties,a=r.getLayoutValue("qUndoExclude")?"qUndoExclude.qHyperCubeDef":"qHyperCubeDef",s=t.themeService.getStyles(),l={hyperCube:r.getHyperCube(),hyperCubeDef:hu(o,a),isDimension:!1,disabled:()=>!i.interact.enabled(),model:t.model,app:t.app,translator:t.translator,rtl:n,selections:t.selections};return t.layoutService.meta.hasMultipleMeasures&&(l.padding="0",l.minWidth="auto"),{key:"measure-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},settings:l,style:{fontFamily:s.axis.title.fontFamily,fontSize:s.axis.title.fontSize,color:s.axis.title.color}}}function By({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,chart:s}){const{theme:l,localeInfo:u}=e,c={resolveUIColor:i.getMain().getPaletteColor},d=a.getStyles();return[ra({refLineModel:n,layoutService:r,colorModel:c,dockService:o,chart:s,scale:Mh.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:Mh.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:ng.refLines.minimumLayoutMode}),ra({isDimension:!0,refLineModel:n,layoutService:r,colorModel:c,dockService:o,chart:s,scale:Mh.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:Mh.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:Mh.COMPONENT.BAR,minimumLayoutMode:ng.refLines.minimumLayoutMode}),...oa({refLineModel:n,layoutService:r,colorModel:c,dock:o.meta.minor.opposite,scale:Mh.SCALE.MAIN.MINOR,style:d,formatter:Mh.FORMATTER.MINOR,theme:l,localeInfo:u,rtl:t,key:Mh.COMPONENT.MEASURE_REF_LINE_LABEL}),...oa({isDimension:!0,refLineModel:n,layoutService:r,colorModel:c,dock:o.meta.major.opposite,scale:Mh.SCALE.MAIN.MAJOR,style:d,theme:l,localeInfo:u,rtl:t,key:Mh.COMPONENT.DIMENSION_REF_LINE_LABEL})]}const _y=(e,t,n)=>{var r;const{layoutService:i,dockService:o,colorService:a,chart:s,actions:l,discrete:u,continuousDataModel:c,reducedDataModel:d,viewModel:f,viewState:p,viewCache:m,themeService:h,refLineModel:g,pluginService:y,rtl:v,logicalSize:b}=t,{localeInfo:x}=n,q=Rg({layout:e},t,v);if(q&&"center"===q.layout.dock)return{components:[q]};const M=gy(e,t,{localeInfo:x,rtl:v}),S=!(null!=l&&null!==(r=l.interact)&&void 0!==r&&r.enabled()),D=a.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:p,chart:s,styleReference:"object.barChart",rtl:v,settings:{item:{shape:{size:10}}}},{actions:l,navigationDisabled:S}),C=D.components[0];if(C){const{dock:e}=C.layout;if(M.fillRange&&(["right","left"].includes(e)||v)&&(M.fillRange.invert=!0),"legend-seq"===C.type&&void 0!==f.selectionDimensionIdx&&M.fillRange&&M.fillRange.min<M.fillRange.max){const e=tg({eventName:"legendRange",key:"legendRangeBrush",targets:[C.key],fillTargets:[C.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:C.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{l.select.emit("end","legendRange")}},t);D.components.push(...e.components),D.interactions.unshift(...e.interactions)}if("legend-cat"===C.type){const e=((e,t)=>{const n=["top","bottom"].indexOf(e.layout.dock)>-1,r=hu(t,"properties.legend.showTitle"),i=t.chart.theme().style("$font-family"),o=t.picasso.renderer(e.renderer)(),a=((e,t,n,r)=>e.measureText({text:r,fontSize:t,fontFamily:n}))(o,hu(e,"settings.title.fontSize","16px"),i,t.colorService.getMain().getSettings().label),s=n&&!r?0:Math.min(135,a.width),l=((e,{ds:t,picasso:n,colorService:r})=>{let i;const o=r.getMain(),a=o.getData().map((e=>e.key)).indexOf("attrDim");return i="field"===o.getSettings().mode&&"measure"===o.getSettings().fieldType?((e,t)=>{const n=[],r=e.field(t.data.field).formatter(),{domain:i}=t;for(let e=1;e<i.length;e++)n.push({label:`${r(i[e-1])} - < ${r(i[e])}`});return n})(t,o.getScales()[e]):"measure"===o.getSettings().mode?t.fields().filter((e=>"measure"===e.type())).map((e=>({label:e.title()}))):a>-1?n.data("q")({data:o.getData()[a].data}).extract({field:"qDimensionInfo/0"}):t.field(o.getSettings().field).items(),i})(e.scale,t),u=Zg(o,hu(e,"settings.item.label.fontSize","12px"),i,l,t),c=Math.min(117,u.width),d=Math.min(151,Math.max(s+16,c+24+10));let f=d-10-24,p={key:e.key,preferredSize:()=>d,settings:{title:{maxWidth:()=>d-16},item:{label:{maxWidth:()=>f,wordBreak:"break-word",maxLines:2}}}};return n&&(f=136,p={key:e.key,settings:{item:{label:{maxWidth:()=>f}}},beforeRender:({size:e})=>{const t=hu(e,"computedInner.width",0);f=(t-s-16)/l.length-10-16,f=Math.max(f,136)}}),p})(C,t);D.components.forEach((t=>{t.key===e.key&&K(!0,t,e)}))}}else M.fillRange&&v&&(M.fillRange.invert=!0);const w=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;let i,o;r.isGroupedByDimension?i=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(i=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let a=2;r.isContinuous?(o={start:"timeStart",end:"timeEnd"},a=dg(e,t)):r.isStacked&&(o="stack");const s=r.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,l=e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)},u=e.layoutService.getLayoutValue("components",null),c=u?u.filter((e=>e.key===t))[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:r.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:r.isContinuous||s?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:Mh.SCALE.MAIN.MAJOR,fn:i,ref:o},minor:{scale:Mh.SCALE.MAIN.MINOR},orientation:e.dockService.meta.minor.orientation,box:{width:ug({layoutService:e.layoutService,discrete:e.discrete,componentKey:t}),minWidthPx:a,fill:e.colorService.getMain().getColor(),opacity:e=>l(e)?0:void 0,minHeightPx:function(e){return r.isStacked?.1:l(e)?.01:.3},strokeWidth:c?lg.BAR.STROKE.WIDTH[c.style.strokeWidth.toUpperCase()]:lg.BAR.STROKE.WIDTH.NONE,stroke:c?c.style.strokeColor.color:lg.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}})(t,{componentKey:Mh.COMPONENT.BAR,collectionKey:Mh.COLLECTION.MAIN}),O=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=dg(e,t));const o=e.layoutService.getLayoutValue("components",null),a=o?o.filter((e=>e.key===t))[0]:null,s={key:t,type:"box",data:{collection:n},settings:{major:{scale:Mh.SCALE.MAIN.MAJOR},minor:{scale:Mh.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:Cy(r,a),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1}},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:.3}}}}]}};return r.isContinuous&&(s.settings.major.ref={start:"timeStart",end:"timeEnd"}),s})(t,{componentKey:Mh.COMPONENT.STACK_TOTAL_BAR,collectionKey:Mh.COLLECTION.STACK_TOTAL}),T=xy(t,f.selectionDimensionIdx),{isStacked:A}=i.meta;let L;L=d.mode.isContinuous?Mh.COLLECTION.MINI_CONTINUOUS:A?Mh.COLLECTION.MINI_STACK:Mh.COLLECTION.MINI;const E=A?O:w,N=Wg(0,t),k=[...N,Dy(t,{barComponent:E,type:"max",isStacked:A}),Dy(t,{barComponent:E,type:"min",isStacked:A}),qg(t,{barComponent:E,type:"max",isStacked:A}),qg(t,{barComponent:E,type:"min",isStacked:A}),Sg(t,{chart:s,barComponent:E,type:"max",scales:M,collectionKey:A?Mh.COLLECTION.STACK_TOTAL:Mh.COLLECTION.MAIN}),Sg(t,{chart:s,barComponent:E,type:"min",scales:M,collectionKey:A?Mh.COLLECTION.STACK_TOTAL:Mh.COLLECTION.MAIN}),...sg(e,t,v,!!N[0]),w,O,qy({layoutService:i,viewModel:f,layout:e,dockService:o}),Hy(e,t,v),Vy(e,t,v),...By({environment:n,rtl:v,refLineModel:g,layoutService:i,colorService:a,dockService:o,themeService:h,chart:s}),Zi({viewState:p,viewCache:m,layoutService:i,dockService:o,rtl:v}),Qg(w,t,{collectionKey:L}),Wf({layoutService:i,dockService:o,discrete:u,continuousDataModel:c,viewState:p,viewCache:m,themeService:h,rtl:v}),...ah({majorScale:Mh.SCALE.MAIN.MAJOR,minorScale:Mh.SCALE.MAIN.MINOR,tooltipOverlay:Mh.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},t),...D.components,Eg({layout:e,component:Mh.COMPONENT.BAR,minorScale:M.minor},t,v),jy({layout:e,component:Mh.COMPONENT.STACK_TOTAL_BAR},t,v),Fy({layout:e,component:"bar-oob-max",type:"max"},t),Fy({layout:e,component:"bar-oob-min",type:"min"},t),...T.components,kg(0,{...t,coloring:a.getMain().getSettings()},v),Pg(0,{...t,coloring:a.getMain().getSettings()},v),(!1!==e.showDisclaimer||!t.flags.isEnabled("SHOW_DISCLAIMER"))&&q,ch({tooltip:Mh.COMPONENT.TREND_LINES_TOOLTIP,formatter:Mh.FORMATTER.MINOR,majorScale:Mh.SCALE.MAIN.MAJOR},t,{rtl:v})].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(k);return{interactions:Jg(t,{rtl:v,hammer:{gestures:[...D.interactions,...T.gestures].sort(((e,t)=>(t.prio||0)-(e.prio||0)))}}),scales:M,palettes:a.getMain().getPalettes(),components:y.extendComponents(k),strategy:Q(0,{logicalSize:b,minCenterRatio:0}),formatters:Fg(t,M),collections:Iy(0,t)}};function Uy({picasso:e,chart:t,services:n,environment:r,viewState:i,viewCache:o}){const{width:a,height:s}=N(),l=O(),u=L(),c=S(),[d,f]=v(),[p,m]=v(),[h,g]=v(),[y,b]=v(),x=T();function M(){if(!t.update)return Promise.resolve();const{discrete:a,layoutService:s}=n;o.set("isPreRender",!0);const f=function(a={}){const{selectionService:s,refLineModel:f,discrete:p,reducedDataModel:m,continuousDataModel:h,trendLineModel:g,pluginService:y,colorService:v,viewModel:b,dockService:q,themeService:M,customTooltipModel:S,layoutService:D,logicalSize:C}=n,w=s.custom.getActions(),O=e.data("q")(d.prepPicassoDataSet()),T={picasso:e,ds:O,rtl:"rtl"===(null==c?void 0:c.direction),model:l,app:x,chart:t,actions:w,localeInfo:r.localeInfo,logicalSize:C,flags:r.flags,translator:r.translator,selections:u,isLocked:s.getIsSelectionLocked,viewCache:o,viewState:i,layoutService:D,dockService:q,viewModel:b,colorService:v,selectionService:s,themeService:M,trendLineModel:g,discrete:p,continuousDataModel:h,reducedDataModel:m.model(),customTooltipModel:S,debouncer:bu,refLineModel:f,pluginService:y,...a};return _y(D.getLayout(),T,r)}(p);d.extractDataPages(),t.update({settings:f,data:h}),o.set("isPreRender",!1),d.insertDataPages();const m=[];return 1!==f.components.length&&s.meta.isDiscrete&&m.push(a.command.initialize()),Promise.all(m)}const[D]=k((()=>{var a;if(!(e&&t&&n&&r&&i&&o))return Promise.resolve();const{layoutService:s,selectionService:u,refLineModel:c,discrete:d,continuous:f,reducedDataModel:p,continuousDataModel:m,trendLineModel:h,legendLayoutService:g}=n;if(null==u||null===(a=u.custom)||void 0===a||!a.getActions())return Promise.resolve();const y=()=>{b(Date.now())};i.onChanged("scrollOffset",(()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),c&&c.update(),y()})),i.onChanged("legendScrollOffset",y),i.intercept("zoom",f.event.onZoomIntercept({viewCache:o})),i.onChanged("zoom",f.event.onZoomChange({layoutService:s,continuousDataModel:m},y)),u.setLayout(s.getLayout());const v=[];return s.meta.isContinuous&&(m.update(s.getLayout()),v.push(m.initialFetch())),h.command.update(),v.push(p.fetch().then((({reducedCube:e})=>{p.update(e)}))),v.push(function({layout:e,model:t}){return ue.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:s.getLayout(),model:l,env:r})),Promise.all(v)}),[n]),[C]=k((()=>{if(null==D||!D.length)return Promise.resolve();const{layoutService:e,reducedDataModel:t,continuousDataModel:r,trendLineModel:i,colorService:o}=n;return Promise.all([n.pluginService.initialize(),o.initialize(),Xh({reducedDataModel:t,layoutService:e,continuousDataModel:r,trendLineModel:i})]).then((e=>e.pop()))}),[D]);q((()=>{var e;if(null==n||null===(e=n.colorService)||void 0===e||!e.getMain()||!C)return;const{layoutService:t,selectionService:i,reducedDataModel:a,continuousDataModel:s,trendLineModel:l,legendLayoutService:u,colorService:c,viewModel:d}=n;o.set("minorMinMax",C);const p=t.getHyperCube(),h=t.meta.isContinuous?s.getInitialCube():a.model().cube,{field:g}=c.getMain().getSettings(),y=!t.meta.isContinuous&&(a.model().mode.isReduced||t.meta.isStacked)&&u,v=y?u.getHyperCube():void 0;i.setBrushAliases({colorField:g,useLegendCube:y,legendAlias:"legendCube/"+g});const b=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],u=[];const c=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:c}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:c}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:c}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:c}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],u=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=u}}}({mainCube:p,miniCube:h,legendCube:v,localeInfo:r.localeInfo,layoutService:t,viewModel:d,trendLineModel:l}),x=D[D.length-1];m({localeInfo:r.localeInfo,...x}),f(b)}),[C]),q((()=>{if(!n||!p||!d)return;const e=n.colorService.getMain();if(!e)return;d.prepPicassoDataSet();const t=d.prepPicassoData(e.getData());g(t)}),[p]),q((()=>{var e;null!=n&&null!==(e=n.colorService)&&void 0!==e&&e.getMain()&&t.update&&d&&h&&M().then((()=>{const{layoutService:e,discrete:r,legendLayoutService:i}=n;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([r.query.getCurrentDataPage()])}t.update()}))}),[h]),q((()=>{if(!(a&&s&&d&&null!=t&&t.update&&null!=n&&n.colorService.getMain()))return;const{dockService:e,themeService:i}=n;e.update({width:a,height:s}),i.setTheme(r.theme),M().then((()=>{t.update&&t.update()}))}),[a,s]),q((()=>{null!=t&&t.update&&t.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]})}),[y])}var Wy,Ky={exports:{}};Wy=Ky,function(e,t){Wy.exports=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
10
10
  /*!***************************************!*\
11
11
  !*** ../node_modules/extend/index.js ***!
12
12
  \***************************************/
13
13
  /*! no static exports found */
14
- function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,f=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof f&&(m=f,f=arguments[1]||{},d=2),(null==f||"object"!==F(f)&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(i=c(t,n))&&(m&&i&&(s(i)||(o=u(i)))?(o?(o=!1,a=r&&u(r)?r:[]):a=r&&s(r)?r:{},l(f,{name:n,newValue:e(m,a,i)})):void 0!==i&&l(f,{name:n,newValue:i}));return f}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
14
+ function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(m&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
15
15
  /*!*************************************************************!*\
16
16
  !*** ../node_modules/qlik-modifiers/dist/qlik-modifiers.js ***!
17
17
  \*************************************************************/
18
18
  /*! no static exports found */
19
- function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==F(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,f=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof f&&(m=f,f=arguments[1]||{},d=2),(null==f||"object"!=F(f)&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(i=c(t,n))&&(m&&i&&(s(i)||(o=u(i)))?(o?(o=!1,a=r&&u(r)?r:[]):a=r&&s(r)?r:{},l(f,{name:n,newValue:e(m,a,i)})):void 0!==i&&l(f,{name:n,newValue:i}));return f}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o={setValue:function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var u=a[o];return a[o]=n,{updated:n,previous:u}}return delete a[o],!1},getValue:function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o}},a="".concat(" ","(").concat(" "),u="".concat(" ",")").concat(" ");function s(e){return a+e+u}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],u=0;u<a.qFieldDefs.length;++u){var s=a.qFieldDefs[u];if(s.qName===i)return s}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function d(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function h(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function g(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,u=e.valueComp,s=void 0===u?"0":u;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(l(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(s,")")}if(r&&2===r.length){var f=l(r[0],i),d=l(r[1],i),m=p(0),h=p(1),g=v(f,m),y=v(d,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(s,")")}return"".concat(a,"({1}").concat(s,")")}function y(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,n=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:c,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=s(d(t));if(!n.showExcludedValues)return a;var u=g({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=p(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(u).concat(l,")")}if(r&&2===r.length){var f=p(0),m=p(1);return"If(Count(".concat(f,") * Count(").concat(m,") > 0, ").concat(a," + ").concat(u).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!c(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:h,getAboveComp:function(e,t,n,r){return m(e,t)+n+h(r)},getFunctionPrefix:y,getFunctionSuffix:b,getRangeComp:function(e,t){return y(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:g,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:d,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(a);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+a.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:l,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var u=x({properties:t,layout:n});return u>=i&&u<=a},getExpressionWithMarkers:s,canExtract:function(e){var t=e.indexOf(a),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function M(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function S(e){return(S="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var D=i.a.bind(null,!0),C={},w=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function T(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function E(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}})),e}function L(e,t){var n=!0;if(O(e)&&O(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){L(e[r],t[r])||(n=!1)})),n);if(w(e)&&w(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!L(e[r],t[r]))return!1;return!0}return e===t}C.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?D({},{val:e}).val:e}(t[i]),a=e[i],u="".concat(n,"/").concat(i);L(o,a)||A(t,i)||(T(a)?r.push({op:"add",path:u,value:o}):O(o)&&O(a)?r=r.concat(C.generate(a,o,u)):w(o)&&w(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(L(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var u=i.length-1;u>=0;u-=1)-1===(o=a(t,i[u].qInfo&&i[u].qInfo.qId,u))?(r.push({op:"remove",path:"".concat(n,"/").concat(u)}),i.splice(u,1)):r=r.concat(C.generate(i[u],t[o],"".concat(n,"/").concat(u)));for(var s=0,l=t.length;s<l;s+=1)-1===(o=a(i,t[s].qInfo&&t[s].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(s),value:t[s]}),i.splice(s,0,t[s])):o!==s&&(r.push({op:"move",path:"".concat(n,"/").concat(s),from:"".concat(n,"/").concat(o)}),i.splice(s,0,i.splice(o,1)[0]));return r}(a,o,u)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){T(t[i])&&!A(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},C.apply=function(e,t){t.forEach((function(t){var n,r=E(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(w(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(w(o)&&w(t.value)){var u,s=t.value.slice();o.length=0,(u=o).push.apply(u,M(s))}else if(O(o)&&O(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]})),D(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=E(e,t.from);w(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(w(r)?r.splice(+i,1):delete r[i])}))},C.clone=function(e){return D({},e)},C.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},C.updateObject=function(e,t){Object.keys(e).length?C.apply(e,C.generate(e,t)):D(e,t)};var k=C,N={saveSoftProperties:function(e,t,n){if(!e)return Promise.resolve();var r=k.generate(t,n);return i()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()}},I="accumulation";function j(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===I)return n[r]}function P(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===I)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},z={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,u=e.dimensionAndFieldList;if(!n)return t;var s=a;void 0===s&&(s=q.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:u}),f=q.getNumStepComp(n,s),d=q.getAboveComp(n,s,c,f),p=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:n,properties:r,layout:i})){var m=q.getDimComp(l,1),h=q.getDimComp(l,0),v=q.getAggrComp(p,m,h);p=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:u,valueComp:v}):v}return p},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(P(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(P(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=j(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=j(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(I))return!1;var o=j(t,e);return o&&!o.disabled}}}},H="movingAverage";function V(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===H)return n[r]}function B(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===H)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var _={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},U={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,u=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return n;var l=u;void 0===l&&(l=q.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),f=r.showExcludedValues&&r.nullSuppression,d=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:s,treatMissingAsNull:f}),p=q.getNumStepComp(r,l),m=q.getAboveComp(r,l,d,p);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),v=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,l);t="".concat(h," / ").concat(v)}var g=t;if(q.needDimension({modifier:r,properties:i,layout:a})){var y=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(g,y,b);g=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:x}):x}return g},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,_)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=V(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=V(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(H))return!1;var o=V(t,e);return o&&!o.disabled}}}},W="difference";function K(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function G(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},X={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,u=e.dimensionAndFieldList;if(!n)return t;var s=a;void 0===s&&(s=q.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:u}),f=q.getAboveComp(n,s,c),d="".concat(c," - ").concat(f);if(q.needDimension({modifier:n,properties:r,layout:i})){var p=q.getDimComp(l,1),m=q.getDimComp(l,0),h=q.getAggrComp(d,p,m);d=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:u,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(Y).forEach((function(t){void 0===e[t]&&(e[t]=Y[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(G(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(G(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(G(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=K(t,e);return o&&!o.disabled}}}},J={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},$="normalization";function Z(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===$)return n[r]}function Q(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===$)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ee(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function te(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:J.DIMENSION.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.DIMENSION.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=ee(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=ee(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function ne(e,t,n){var r=[{value:J.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:J.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:J.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=ee(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:J.SELECTION.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}function se(e,t,n,r,i,o,a){var u=ie(t),s=oe(t,n,r),l=""===u&&""===s?"":u||s,c=ae(i,o),f=ue(i,o,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(f," Aggr(").concat(l," ").concat(e,", ").concat(d,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,u=e.dimensionAndFieldList;if(!n)return t;var s=a;void 0===s&&(s=q.getNumDimensions({properties:r,layout:i}));var l=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:u}),f=n.selectionScope,d=n.dimensionalScope;return se(c,f,n.field,n.value,d,s,n.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.SELECTION.DISREGARD_SELECTION,options:function(n){return ne(n,t,e)}},field:{refFn:function(t){return"".concat(Q(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===J.SELECTION.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===J.SELECTION.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return te(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(Z(t,e).dimensionalScope||0)===J.DIMENSION.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf($))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:ue};function ce(e){var t=e.model,n=e.callback,r={},i={},a={},u={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},n=o.getValue(e,"qInfo.qType");return n&&u[n]&&u[n].forEach((function(n){t[n]=o.getValue(e,n)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(r[t]){var i=s(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:s(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,u=[];return function(e){var t=e.measureLibraryIds,n=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},n.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&u.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!r[e]&&u.push(c(e,"getDimension"))}))),Promise.all(u)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}var fe={getExpression:function(e){return o.getValue(e,"qDef.base.qDef")||o.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return o.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return o.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return o.getValue(e,"qDef.base.qLibraryId")||o.getValue(e,"qLibraryId")},getLabelRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},de={initBase:function(e,t){(t||de.isValid(e))&&(o.setValue(e,"qDef.base.qDef",o.getValue(e,"qDef.qDef")),o.setValue(e,"qDef.base.qLibraryId",o.getValue(e,"qLibraryId")),o.setValue(e,"qDef.base.qLabel",o.getValue(e,"qDef.qLabel")),o.setValue(e,"qDef.base.qLabelExpression",o.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){de.isValid(e)&&(o.setValue(e,"qDef.qDef",o.getValue(e,"qDef.base.qDef")),o.setValue(e,"qLibraryId",o.getValue(e,"qDef.base.qLibraryId")),o.setValue(e,"qDef.qLabel",o.getValue(e,"qDef.base.qLabel")),o.setValue(e,"qDef.qLabelExpression",o.getValue(e,"qDef.base.qLabelExpression")),o.getValue(e,"qDef.qAggrFunc")&&o.getValue(e,"qDef.base.qAggrFunc")&&o.setValue(e,"qDef.qAggrFunc",o.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=o.getValue(e,"qDef.base.qDef"),n=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},pe=de;function me(e){return(me="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var he={accumulation:z,movingAverage:U,difference:X,normalization:le},ve=(t.default={modifiers:he,apply:ge,applyModifiers:ye,cleanUpMeasure:be,destroy:function(e){e&&ve[e.id]&&ve[e.id].masterItemSubscriber&&(ve[e.id].masterItemSubscriber&&ve[e.id].masterItemSubscriber.unsubscribe(),delete ve[e.id])},hasActiveModifiers:xe,getActiveModifier:qe,initBase:pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return he[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return he[e]&&he[e].isApplicable({properties:n,layout:r})}))},measureBase:fe,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=De(e);Le({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Pe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:Me},{});function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,a=void 0!==r&&r,u=e.masterItem;ve[t.id]=ve[t.id]||{isFirstTime:!0};var s=ve[t.id].isFirstTime;if(ve[t.id].isFirstTime=!1,n&&"object"===me(n))return ye({model:t,properties:n});var l=t?t.layout:void 0,c=o.getValue(l,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var f=o.getValue(l,"qHyperCube.qMeasureInfo"),d=ve[t.id].lastReloadTime;if(ve[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),xe({measures:f,layout:l})){var p=function(e){var t=e.measures,n=e.layout,r=e.model,i=e.lastReloadTime;return o.getValue(r,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:l,model:t,lastReloadTime:d});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Le({modifiers:De(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:l,masterItem:u,isFirstTime:s})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);we(n);var r=Re(n);return ke({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return p&&function(e){var t=e.properties;Se(t).forEach((function(e){return function(e){var t=e.measure,n=e.properties;if(Ee({measure:t,properties:n})){var r=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===me(e)&&!e.disabled){if(r++,"object"!==me(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=he[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Te(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ye({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:u,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===me(e.base)}))}(f)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Re(n);return Fe({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return Se(n).forEach((function(e){return be(e)})),je({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ye(e){var t=e.model,n=e.oldProperties,r=e.properties,a=e.measures,u=e.runUpdateIfChange,s=void 0!==u&&u,l=e.masterItem,c=e.libraryItemsProps,f=e.dimensionAndFieldList;void 0===n&&(n=s?i()(!0,{},r):r),we(r);var d=Re(r);return Fe({model:t,libraryIds:d,masterItem:l}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,a=e.libraryItemsProps,u=e.dimensionAndFieldList;if(t||(t=Se(n)),!t.length)return Promise.resolve();if(!xe({measures:t,properties:n}))return t.forEach((function(e){return be(e)})),Promise.resolve();var s=a?void 0:Re(n);return ke({model:r,dimensionAndFieldList:u}).then((function(e){return Ne({libraryIds:s,model:r,libraryItemsProps:a}).then((function(r){t.forEach((function(t){Le({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,a=e.dimensionAndFieldList,u=0;pe.isValid(t)||pe.initBase(t,!0);var s=t.qDef,l=s.modifiers,c=s.base;Array.isArray(l)&&l.forEach((function(e){if("object"===me(e)&&!e.disabled){if(u++,"object"!==me(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(u>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");he[e.type].initModifier(e);var s=t.qLibraryId||c&&c.qLibraryId;s?function(e){var t=e.measure,n=e.modifier,r=e.libraryId,o=e.properties,a=e.libraryItemsProps,u=e.dimensionAndFieldList,s=a[r],l=s.qMeasure.qDef,c=he[n.type].generateExpression({expression:l,modifier:n,properties:o,dimensionAndFieldList:u});n.outputExpression=c,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||s.qMeasure.qLabel)&&(t.qDef.qLabel=s.qMeasure.qLabel),(t.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=s.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(t.qDef.qNumFormat=s.qMeasure.qNumFormat,t.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=s.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:s,properties:n,libraryItemsProps:r,dimensionAndFieldList:a}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof he[n.type].updateModifier&&he[n.type].updateModifier(n,r.qHyperCubeDef);var a=fe.getExpression(t),u=he[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=u,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||Me(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Me(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Oe(t)):be(t)}))}))}))}({measures:a,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:f}).then((function(){return s?je({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function be(e){!function(e){var t=De(e);return Array.isArray(t)&&t.some((function(e){return"object"===me(e)&&!e.disabled&&!he[e.type]}))}(e)?pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Oe(e)}function xe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Le({modifiers:De(e),properties:n,layout:r})}))}function qe(e){var t=De(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(he[r.type]&&!r.disabled)return r}}function Me(e){var t=qe(e);return!t||he[t.type].enableTotalsFunction(e)}function Se(e){return o.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(o.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function De(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function we(e){Se(e).forEach((function(e){return function(e){var t=qe(e);t&&(void 0!==t.outputExpression&&Ce(t)!==e.qDef.qDef?delete e.qDef.base:!pe.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Oe(e){var t=De(e);Array.isArray(t)&&t.forEach((function(t){"object"===me(t)&&(t.disabled||!he[t.type]&&Ce(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Te(e){return e.base||e.qDef&&e.qDef.base}function Ae(e){var t=Te(e);return e.qLibraryId||t&&t.qLibraryId}function Ee(e){var t=e.measure,n=e.properties,r=e.layout;return!Ae(t)&&Le({modifiers:De(t),properties:n,layout:r})}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==me(e)||e.disabled||!he[e.type])&&(void 0===i[e.type]&&(i[e.type]=he[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function ke(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ne(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},u=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));u.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));u.push(t)})),Promise.all(u).then((function(){return a}))}function Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):N.saveSoftProperties(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===me(e)&&!e.disabled&&he[e.type]&&he[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Re(e){var t=Se(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=De(t);if(Le({modifiers:r,properties:e})){var o=Ae(t);o&&n.push(o),i=i||Pe({modifiers:r,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Fe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(ve[t.id].masterItemSubscriber=ve[t.id].masterItemSubscriber||ce({model:t,callback:function(e){return ge({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ve[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
19
+ function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],f=1,p=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=c(d,n),d!==(i=c(t,n))&&(m&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o={setValue:function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},getValue:function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function l(e){return a+e+s}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function h(e){return void 0===e?")":", 0, ".concat(e,")")}function g(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=g(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),m=p(0),h=p(1),y=g(d,m),v=g(f,h);return"".concat(a,"({1<").concat(y,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,n=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:c,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=l(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:i}),u=o?"":", 0";if(r&&1===r.length){var c=p(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(r&&2===r.length){var d=p(0),m=p(1);return"If(Count(".concat(d,") * Count(").concat(m,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!c(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:h,getAboveComp:function(e,t,n,r){return m(e,t)+n+h(r)},getFunctionPrefix:v,getFunctionSuffix:b,getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(a);if(-1!==n){var r=t.indexOf(s);if(-1!==r)return t.substring(n+a.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:l,canExtract:function(e){var t=e.indexOf(a),n=e.indexOf(s);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function M(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D=i.a.bind(null,!0),C={},w=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function T(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function L(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}})),e}function E(e,t){var n=!0;if(O(e)&&O(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){E(e[r],t[r])||(n=!1)})),n);if(w(e)&&w(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!E(e[r],t[r]))return!1;return!0}return e===t}C.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?D({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);E(o,a)||A(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):O(o)&&O(a)?r=r.concat(C.generate(a,o,s)):w(o)&&w(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(E(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(C.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){T(t[i])&&!A(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},C.apply=function(e,t){t.forEach((function(t){var n,r=L(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(w(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(w(o)&&w(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,M(l))}else if(O(o)&&O(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]})),D(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var u=L(e,t.from);w(r)?r.splice(+i,0,u.splice(+a,1)[0]):(r[i]=u[a],delete u[a])}else"remove"===t.op&&(w(r)?r.splice(+i,1):delete r[i])}))},C.clone=function(e){return D({},e)},C.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},C.updateObject=function(e,t){Object.keys(e).length?C.apply(e,C.generate(e,t)):D(e,t)};var N=C,k={saveSoftProperties:function(e,t,n){if(!e)return Promise.resolve();var r=N.generate(t,n);return i()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()}},I="accumulation";function P(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===I)return n[r]}function j(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===I)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getNumStepComp(n,l),f=q.getAboveComp(n,l,c,d),p=q.getRangeComp("RangeSum",f);if(q.needDimension({modifier:n,properties:r,layout:i})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(p,m,h);p=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return p},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(I))return!1;var o=P(t,e);return o&&!o.disabled}}}},z="movingAverage";function H(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function V(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},_={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),p=q.getNumStepComp(r,u),m=q.getAboveComp(r,u,f,p);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:i,layout:a})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=H(t,e);return o&&!o.disabled}}}},U="difference";function W(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function K(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var G={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},$={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getAboveComp(n,l,c),f="".concat(c," - ").concat(d);if(q.needDimension({modifier:n,properties:r,layout:i})){var p=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(f,p,m);f=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return f},initModifier:function(e){Object.keys(G).forEach((function(t){void 0===e[t]&&(e[t]=G[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(K(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(K(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(K(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=W(t,e);return o&&!o.disabled}}}},Y={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},X="normalization";function J(e,t){var n=o.getValue(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o.getValue(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:Y.DIMENSION.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:Y.DIMENSION.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:Y.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(J(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:Y.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:Y.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:Y.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(J(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:Y.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:Y.SELECTION.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}function se(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),u=""===s&&""===l?"":s||l,c=oe(i,o),d=ae(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(f,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=o.getValue(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return se(c,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Z(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.SELECTION.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(Z(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return J(t,e).selectionScope===Y.SELECTION.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Z(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return J(t,e).selectionScope===Y.SELECTION.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Z(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(J(t,e).dimensionalScope||0)===Y.DIMENSION.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae};function ue(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o.getValue(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=o.getValue(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,n=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},n.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}var ce={getExpression:function(e){return o.getValue(e,"qDef.base.qDef")||o.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return o.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return o.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return o.getValue(e,"qDef.base.qLibraryId")||o.getValue(e,"qLibraryId")},getLabelRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},de={initBase:function(e,t){(t||de.isValid(e))&&(o.setValue(e,"qDef.base.qDef",o.getValue(e,"qDef.qDef")),o.setValue(e,"qDef.base.qLibraryId",o.getValue(e,"qLibraryId")),o.setValue(e,"qDef.base.qLabel",o.getValue(e,"qDef.qLabel")),o.setValue(e,"qDef.base.qLabelExpression",o.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){de.isValid(e)&&(o.setValue(e,"qDef.qDef",o.getValue(e,"qDef.base.qDef")),o.setValue(e,"qLibraryId",o.getValue(e,"qDef.base.qLibraryId")),o.setValue(e,"qDef.qLabel",o.getValue(e,"qDef.base.qLabel")),o.setValue(e,"qDef.qLabelExpression",o.getValue(e,"qDef.base.qLabelExpression")),o.getValue(e,"qDef.qAggrFunc")&&o.getValue(e,"qDef.base.qAggrFunc")&&o.setValue(e,"qDef.qAggrFunc",o.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=o.getValue(e,"qDef.base.qDef"),n=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},fe=de;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var me={accumulation:F,movingAverage:_,difference:$,normalization:le},he=(t.default={modifiers:me,apply:ge,applyModifiers:ye,cleanUpMeasure:ve,destroy:function(e){e&&he[e.id]&&he[e.id].masterItemSubscriber&&(he[e.id].masterItemSubscriber&&he[e.id].masterItemSubscriber.unsubscribe(),delete he[e.id])},hasActiveModifiers:be,getActiveModifier:xe,initBase:fe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return me[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return me[e]&&me[e].isApplicable({properties:n,layout:r})}))},measureBase:ce,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Se(e);Le({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Pe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:qe},{});function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,a=void 0!==r&&r,s=e.masterItem;he[t.id]=he[t.id]||{isFirstTime:!0};var l=he[t.id].isFirstTime;if(he[t.id].isFirstTime=!1,n&&"object"===pe(n))return ye({model:t,properties:n});var u=t?t.layout:void 0,c=o.getValue(u,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var d=o.getValue(u,"qHyperCube.qMeasureInfo"),f=he[t.id].lastReloadTime;if(he[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),be({measures:d,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.model,i=e.lastReloadTime;return o.getValue(r,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:u,model:t,lastReloadTime:f});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Le({modifiers:Se(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Ce(n);var r=je(n);return Ee({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return p&&function(e){var t=e.properties;Me(t).forEach((function(e){return function(e){var t=e.measure,n=e.properties;if(Ae({measure:t,properties:n})){var r=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=me[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Oe(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ye({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=je(n);return Re({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return Me(n).forEach((function(e){return ve(e)})),Ie({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ye(e){var t=e.model,n=e.oldProperties,r=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),Ce(r);var f=je(r);return Re({model:t,libraryIds:f,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=Me(n)),!t.length)return Promise.resolve();if(!be({measures:t,properties:n}))return t.forEach((function(e){return ve(e)})),Promise.resolve();var l=a?void 0:je(n);return Ee({model:r,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:r,libraryItemsProps:a}).then((function(r){t.forEach((function(t){Le({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;fe.isValid(t)||fe.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");me[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.libraryId,o=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,l=a[r],u=l.qMeasure.qDef,c=me[n.type].generateExpression({expression:u,modifier:n,properties:o,dimensionAndFieldList:s});n.outputExpression=c,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||l.qMeasure.qLabel)&&(t.qDef.qLabel=l.qMeasure.qLabel),(t.qDef.qLabelExpression||l.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=l.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&l.qMeasure.qNumFormat&&(t.qDef.qNumFormat=l.qMeasure.qNumFormat,t.qDef.isCustomFormatted=l.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=l.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:a}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof me[n.type].updateModifier&&me[n.type].updateModifier(n,r.qHyperCubeDef);var a=ce.getExpression(t),s=me[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||qe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&qe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),we(t)):ve(t)}))}))}))}({measures:a,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Ie({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ve(e){!function(e){var t=Se(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!me[e.type]}))}(e)?fe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,we(e)}function be(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Le({modifiers:Se(e),properties:n,layout:r})}))}function xe(e){var t=Se(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(me[r.type]&&!r.disabled)return r}}function qe(e){var t=xe(e);return!t||me[t.type].enableTotalsFunction(e)}function Me(e){return o.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(o.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Se(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function Ce(e){Me(e).forEach((function(e){return function(e){var t=xe(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!fe.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function we(e){var t=Se(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!me[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Oe(e){return e.base||e.qDef&&e.qDef.base}function Te(e){var t=Oe(e);return e.qLibraryId||t&&t.qLibraryId}function Ae(e){var t=e.measure,n=e.properties,r=e.layout;return!Te(t)&&Le({modifiers:Se(t),properties:n,layout:r})}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!me[e.type])&&(void 0===i[e.type]&&(i[e.type]=me[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ee(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ne(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ie(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(o.getValue(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):k.saveSoftProperties(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&me[e.type]&&me[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function je(e){var t=Me(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=Se(t);if(Le({modifiers:r,properties:e})){var o=Te(t);o&&n.push(o),i=i||Pe({modifiers:r,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Re(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(he[t.id].masterItemSubscriber=he[t.id].masterItemSubscriber||ue({model:t,callback:function(e){return ge({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),he[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
20
20
  /*!***********************************************!*\
21
21
  !*** ./axis-chart/export-properties/index.js ***!
22
22
  \***********************************************/
@@ -25,7 +25,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
25
25
  /*! ../../quarantine/quarantine-property */
26
26
  "./quarantine/quarantine-property.js"),i=n(
27
27
  /*! ../../color-chart */
28
- "./color-chart/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,u=void 0===a||a,s=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),l=s.properties;return u?(Object(r.default)(l,"measureAxis.min","supportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","supportedAutoMinMax")):(Object(r.default)(l,"measureAxis.min","unsupportedAutoMinMax"),Object(r.default)(l,"measureAxis.max","unsupportedAutoMinMax")),s}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
28
+ "./color-chart/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,l=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),u=l.properties;return s?(Object(r.default)(u,"measureAxis.min","supportedAutoMinMax"),Object(r.default)(u,"measureAxis.max","supportedAutoMinMax")):(Object(r.default)(u,"measureAxis.min","unsupportedAutoMinMax"),Object(r.default)(u,"measureAxis.max","unsupportedAutoMinMax")),l}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
29
29
  /*!***********************************************************************!*\
30
30
  !*** ./axis-chart/import-properties/helpers/get-measures-per-axis.js ***!
31
31
  \***********************************************************************/
@@ -44,13 +44,13 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
44
44
  !*** ./axis-chart/import-properties/helpers/handle-measures-axis.js ***!
45
45
  \**********************************************************************/
46
46
  /*! exports provided: default */
47
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
47
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
48
48
  /*! extend */
49
49
  "../node_modules/extend/index.js"),i=n.n(r),o=n(
50
50
  /*! ./should-update-measure-axis */
51
51
  "./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=n(
52
52
  /*! ./get-measures-per-axis */
53
- "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function u(e){var t,n=e.exportFormat,r=e.initialProperties,u=e.properties,s=e.measureType,l=u.qHyperCubeDef,c=u.measureAxis;if(Object(o.default)({exportFormat:n,initialProperties:r})){var f=Object(a.default)(l);f.length?(s&&(t=f.filter((function(e){return e.type[s]>0})).sort((function(e,t){return t.type[s]-e.type[s]}))),t&&t.length||(t=f.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,n.properties.measureAxes[t[0].axis])):i()(c,n.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
53
+ "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,n=e.exportFormat,r=e.initialProperties,s=e.properties,l=e.measureType,u=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:n,initialProperties:r})){var d=Object(a.default)(u);d.length?(l&&(t=d.filter((function(e){return e.type[l]>0})).sort((function(e,t){return t.type[l]-e.type[l]}))),t&&t.length||(t=d.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,n.properties.measureAxes[t[0].axis])):i()(c,n.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
54
54
  /*!*******************************************************!*\
55
55
  !*** ./axis-chart/import-properties/helpers/index.js ***!
56
56
  \*******************************************************/
@@ -80,7 +80,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
80
80
  /*! ./helpers */
81
81
  "./axis-chart/import-properties/helpers/index.js"),i=n(
82
82
  /*! ../../color-chart */
83
- "./color-chart/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,u=e.hypercubePath,s=e.measureType,l=i.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:u}),c=l.qProperty;return r.default.handleAutoMinMax({initialProperties:n,properties:c}),r.default.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:s}),r.default.setInterColumnSortOrder(c.qHyperCubeDef),l}},"./axis-chart/index.js":
83
+ "./color-chart/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,l=e.measureType,u=i.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s}),c=u.qProperty;return r.default.handleAutoMinMax({initialProperties:n,properties:c}),r.default.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:l}),r.default.setInterColumnSortOrder(c.qHyperCubeDef),u}},"./axis-chart/index.js":
84
84
  /*!*****************************!*\
85
85
  !*** ./axis-chart/index.js ***!
86
86
  \*****************************/
@@ -98,7 +98,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
98
98
  /*! ../../utils/attribute-expression-util */
99
99
  "./utils/attribute-expression-util/index.js"),i=n(
100
100
  /*! ../../hypercube */
101
- "./hypercube/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),u=a.data[0],s=u.dimensions.concat(u.excludedDimensions),l=u.measures.concat(u.excludedMeasures),c=r.default.IDMAP,f=c.COLOR_BY_ALTERNATIVE,d=c.COLOR_BY_EXPRESSION;return r.default.moveByIdFromGroup(s,[],"qAttributeDimensions",f),r.default.moveByIdFromGroup(s,[],"qAttributeExpressions",f),r.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
101
+ "./hypercube/index.js");function o(e){var t=e.propertyTree,n=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:o}),s=a.data[0],l=s.dimensions.concat(s.excludedDimensions),u=s.measures.concat(s.excludedMeasures),c=r.default.IDMAP,d=c.COLOR_BY_ALTERNATIVE,f=c.COLOR_BY_EXPRESSION;return r.default.moveByIdFromGroup(l,[],"qAttributeDimensions",d),r.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),r.default.moveByIdFromGroup(u,[],"qAttributeExpressions",f),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
102
102
  /*!**************************************************************************!*\
103
103
  !*** ./color-chart/import-properties/helpers/add-color-by-expression.js ***!
104
104
  \**************************************************************************/
@@ -147,7 +147,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
147
147
  !*** ./color-chart/import-properties/helpers/get-color-by-definition.js ***!
148
148
  \**************************************************************************/
149
149
  /*! exports provided: default */
150
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
150
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
151
151
  /*! ./get-expression */
152
152
  "./color-chart/import-properties/helpers/get-expression.js"),i=n(
153
153
  /*! ./get-dimension-label */
@@ -155,7 +155,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
155
155
  /*! ./get-measure-label */
156
156
  "./color-chart/import-properties/helpers/get-measure-label.js"),a=n(
157
157
  /*! ./get-measure-library-id */
158
- "./color-chart/import-properties/helpers/get-measure-library-id.js");function u(e,t,n,u){var s,l,c={};switch(e){case"dimension":n.qLibraryId?(c.type="dimension",c.name=n.qLibraryId,c.id=n.qLibraryId):(c.type="field",t?(c.name=n.label||n.qDef,c.id=n.qDef):(c.name=n.qDef.qFieldDefs[0],c.label=Object(i.default)(n)));break;case"measure":(s=Object(a.default)(n,t))?(c.type="measure",c.name=s,c.id=s,(l=Object(r.default)(n,u))&&(c.expression=l)):(c.type="expression",t?(c.name=n.label||n.qExpression,c.id=n.qExpression):(c.name=n.qDef.qDef,c.label=Object(o.default)(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
158
+ "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,n,s){var l,u,c={};switch(e){case"dimension":n.qLibraryId?(c.type="dimension",c.name=n.qLibraryId,c.id=n.qLibraryId):(c.type="field",t?(c.name=n.label||n.qDef,c.id=n.qDef):(c.name=n.qDef.qFieldDefs[0],c.label=Object(i.default)(n)));break;case"measure":(l=Object(a.default)(n,t))?(c.type="measure",c.name=l,c.id=l,(u=Object(r.default)(n,s))&&(c.expression=u)):(c.type="expression",t?(c.name=n.label||n.qExpression,c.id=n.qExpression):(c.name=n.qDef.qDef,c.label=Object(o.default)(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
159
159
  /*!********************************************************************!*\
160
160
  !*** ./color-chart/import-properties/helpers/get-color-options.js ***!
161
161
  \********************************************************************/
@@ -168,11 +168,11 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
168
168
  /*! ./patches/pie-chart */
169
169
  "./color-chart/import-properties/helpers/patches/pie-chart.js"),a=n(
170
170
  /*! ./patches/line-chart */
171
- "./color-chart/import-properties/helpers/patches/line-chart.js"),u=n(
171
+ "./color-chart/import-properties/helpers/patches/line-chart.js"),s=n(
172
172
  /*! ./patches/map */
173
- "./color-chart/import-properties/helpers/patches/map.js"),s=n(
173
+ "./color-chart/import-properties/helpers/patches/map.js"),l=n(
174
174
  /*! ./patches/distribution-plot */
175
- "./color-chart/import-properties/helpers/patches/distribution-plot.js"),l={scatterplot:i.default,piechart:o.default,linechart:a.default,map:u.default,distributionplot:s.default};function c(e){return(l[e]||r.default).colorModeOptions||r.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
175
+ "./color-chart/import-properties/helpers/patches/distribution-plot.js"),u={scatterplot:i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:l.default};function c(e){return(u[e]||r.default).colorModeOptions||r.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
176
176
  /*!**********************************************************************!*\
177
177
  !*** ./color-chart/import-properties/helpers/get-dimension-label.js ***!
178
178
  \**********************************************************************/
@@ -209,24 +209,24 @@ function(e,t,n){n.r(t);var r=n(
209
209
  /*! ./should-update-color-by */
210
210
  "./color-chart/import-properties/helpers/should-update-color-by.js"),a=n(
211
211
  /*! ./update-color-by */
212
- "./color-chart/import-properties/helpers/update-color-by.js"),u=n(
212
+ "./color-chart/import-properties/helpers/update-color-by.js"),s=n(
213
213
  /*! ./delete-total-mode */
214
- "./color-chart/import-properties/helpers/delete-total-mode.js"),s=n(
214
+ "./color-chart/import-properties/helpers/delete-total-mode.js"),l=n(
215
215
  /*! ./should-add-color-by-expression */
216
- "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),l=n(
216
+ "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),u=n(
217
217
  /*! ./add-color-by-expression */
218
218
  "./color-chart/import-properties/helpers/add-color-by-expression.js"),c=n(
219
219
  /*! ./switch-to-auto-color */
220
- "./color-chart/import-properties/helpers/switch-to-auto-color.js"),f=n(
220
+ "./color-chart/import-properties/helpers/switch-to-auto-color.js"),d=n(
221
221
  /*! ./should-switch-to-color-persistent */
222
- "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:r.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:u.default,shouldAddColorByExpression:s.default,addColorByExpression:l.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:f.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
222
+ "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:r.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:l.default,addColorByExpression:u.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:d.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
223
223
  /*!*********************************************************************!*\
224
224
  !*** ./color-chart/import-properties/helpers/is-map-point-layer.js ***!
225
225
  \*********************************************************************/
226
226
  /*! exports provided: default */
227
227
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
228
228
  /*! ../../../utils */
229
- "./utils/index.js");function i(e,t,n){var i=r.default.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),u=r.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===u}},"./color-chart/import-properties/helpers/patches/default.js":
229
+ "./utils/index.js");function i(e,t,n){var i=r.default.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=r.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
230
230
  /*!******************************************************************!*\
231
231
  !*** ./color-chart/import-properties/helpers/patches/default.js ***!
232
232
  \******************************************************************/
@@ -273,7 +273,7 @@ function(e,t,n){n.r(t);var r=n(
273
273
  !*** ./color-chart/import-properties/helpers/resolve-color-by-property-def.js ***!
274
274
  \********************************************************************************/
275
275
  /*! exports provided: default */
276
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
276
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
277
277
  /*! ../../../utils */
278
278
  "./utils/index.js"),i=n(
279
279
  /*! ../../../utils/attribute-expression-util */
@@ -281,9 +281,9 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
281
281
  /*! ./clear-color-by-item */
282
282
  "./color-chart/import-properties/helpers/clear-color-by-item.js"),a=n(
283
283
  /*! ./set-attribute-by-expression */
284
- "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),u=n(
284
+ "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=n(
285
285
  /*! ./set-attribute-by-library */
286
- "./color-chart/import-properties/helpers/set-attribute-by-library.js");function s(e){var t=e.properties,n=e.isDimension,s=e.dimensions,l=e.excludedDimensions,c=e.measures,f=e.label;Object(o.default)(s,l);var d=s[s.length-1];if(d){var p=n?r.default.getValue(t,"color.byDimDef"):r.default.getValue(t,"color.byMeasureDef"),m=r.default.getValue(t,"color.formatting.qNumFormat"),h=r.default.getValue(t,"color.formatting.isCustomFormatted");if(p){var v=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(p.type){case"expression":Object(a.default)({attributeExpression:v,label:f,item:p,isDimension:n,qNumFormat:m,isCustomFormatted:h});break;case"libraryItem":Object(u.default)({attributeExpression:v,measures:c,item:p,isDimension:n,qNumFormat:m,isCustomFormatted:h})}n?(v.qSortBy={qSortByAscii:1},d.qAttributeDimensions.push(v)):d.qAttributeExpressions.push(v)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
286
+ "./color-chart/import-properties/helpers/set-attribute-by-library.js");function l(e){var t=e.properties,n=e.isDimension,l=e.dimensions,u=e.excludedDimensions,c=e.measures,d=e.label;Object(o.default)(l,u);var f=l[l.length-1];if(f){var p=n?r.default.getValue(t,"color.byDimDef"):r.default.getValue(t,"color.byMeasureDef"),m=r.default.getValue(t,"color.formatting.qNumFormat"),h=r.default.getValue(t,"color.formatting.isCustomFormatted");if(p){var g=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(p.type){case"expression":Object(a.default)({attributeExpression:g,label:d,item:p,isDimension:n,qNumFormat:m,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:g,measures:c,item:p,isDimension:n,qNumFormat:m,isCustomFormatted:h})}n?(g.qSortBy={qSortByAscii:1},f.qAttributeDimensions.push(g)):f.qAttributeExpressions.push(g)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
287
287
  /*!****************************************************************!*\
288
288
  !*** ./color-chart/import-properties/helpers/set-alt-label.js ***!
289
289
  \****************************************************************/
@@ -300,7 +300,7 @@ function(e,t,n){function r(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e
300
300
  /*! exports provided: default */
301
301
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
302
302
  /*! ../../../utils/array-util */
303
- "./utils/array-util.js");function i(e){var t=e.attributeExpression,n=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,u=e.isCustomFormatted;o||(t.matchMeasure=r.default.findIndexByPropertyValue(n,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=u)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
303
+ "./utils/array-util.js");function i(e){var t=e.attributeExpression,n=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=r.default.findIndexByPropertyValue(n,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
304
304
  /*!***************************************************************************!*\
305
305
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-1.js ***!
306
306
  \***************************************************************************/
@@ -311,12 +311,12 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
311
311
  /*! ./get-color-by-definition */
312
312
  "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
313
313
  /*! ./set-color-by-property-def */
314
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,n.length-1);var u=n[a.activeDimensionIndex],s=Object(i.default)("dimension",!1,u);s.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,s)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
314
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,n.length-1);var s=n[a.activeDimensionIndex],l=Object(i.default)("dimension",!1,s);l.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,l)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
315
315
  /*!***************************************************************************!*\
316
316
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-2.js ***!
317
317
  \***************************************************************************/
318
318
  /*! exports provided: default */
319
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
319
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
320
320
  /*! ../../../utils */
321
321
  "./utils/index.js"),i=n(
322
322
  /*! ../../../utils/array-util */
@@ -324,11 +324,11 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
324
324
  /*! ../../../utils/attribute-expression-util */
325
325
  "./utils/attribute-expression-util/index.js"),a=n(
326
326
  /*! ./get-color-by-definition */
327
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),u=n(
327
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
328
328
  /*! ./set-color-by-property-def */
329
- "./color-chart/import-properties/helpers/set-color-by-property-def.js"),s=n(
329
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js"),l=n(
330
330
  /*! ./is-map-point-layer */
331
- "./color-chart/import-properties/helpers/is-map-point-layer.js");function l(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),l=n[Object(s.default)(n,e,t)?0:n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeDimensions,"id",c);return Object(u.default)(e,Object(a.default)("dimension",!!f,f||l)),!!f}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
331
+ "./color-chart/import-properties/helpers/is-map-point-layer.js");function u(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),u=n[Object(l.default)(n,e,t)?0:n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,d=i.default.findItemByPropertyValue(u.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!d,d||u)),!!d}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
332
332
  /*!*************************************************************************!*\
333
333
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-1.js ***!
334
334
  \*************************************************************************/
@@ -339,12 +339,12 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
339
339
  /*! ./get-color-by-definition */
340
340
  "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=n(
341
341
  /*! ./set-color-by-property-def */
342
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qMeasures"),[]),a=r.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,n.length-1),a.activeMeasureIndex>-1){var u=n[a.activeMeasureIndex],s=Object(i.default)("measure",!1,u,!0);s.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,s)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
342
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var n=r.default.getValue(e,"".concat(t,"qMeasures"),[]),a=r.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,n.length-1),a.activeMeasureIndex>-1){var s=n[a.activeMeasureIndex],l=Object(i.default)("measure",!1,s,!0);l.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,l)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
343
343
  /*!*************************************************************************!*\
344
344
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-2.js ***!
345
345
  \*************************************************************************/
346
346
  /*! exports provided: default */
347
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
347
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return l}));var r=n(
348
348
  /*! ../../../utils */
349
349
  "./utils/index.js"),i=n(
350
350
  /*! ../../../utils/array-util */
@@ -352,9 +352,9 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
352
352
  /*! ../../../utils/attribute-expression-util */
353
353
  "./utils/attribute-expression-util/index.js"),a=n(
354
354
  /*! ./get-color-by-definition */
355
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),u=n(
355
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=n(
356
356
  /*! ./set-color-by-property-def */
357
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function s(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),s=r.default.getValue(e,"".concat(t,"qMeasures"),[]),l=n[n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,f=i.default.findItemByPropertyValue(l.qAttributeExpressions,"id",c);return Object(u.default)(e,Object(a.default)("measure",!!f,f||s[0])),!!f}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
357
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function l(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),l=r.default.getValue(e,"".concat(t,"qMeasures"),[]),u=n[n.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,d=i.default.findItemByPropertyValue(u.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!d,d||l[0])),!!d}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
358
358
  /*!****************************************************************************!*\
359
359
  !*** ./color-chart/import-properties/helpers/set-color-by-property-def.js ***!
360
360
  \****************************************************************************/
@@ -365,7 +365,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
365
365
  /*! ../../../utils/number-format-util */
366
366
  "./utils/number-format-util.js"),o=n(
367
367
  /*! ./set-alt-label */
368
- "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,n,a){var u=n?"expression":t.type,s=e.color,l=s.mode,c=r.default.getItemLabel(t);switch(Object(o.default)(e,c||""),u){case"field":l="byDimension",s.byDimDef={label:t.label||r.default.wrapFieldName(t.name),key:r.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":l="byMeasure",s.byMeasureDef={label:n||c,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":l="byDimension",s.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":l="byMeasure",s.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},s.formatting&&i.default.useMasterNumberFormat(s.formatting)}a||(s.auto=!1,s.mode=l)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
368
+ "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,n,a){var s=n?"expression":t.type,l=e.color,u=l.mode,c=r.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":u="byDimension",l.byDimDef={label:t.label||r.default.wrapFieldName(t.name),key:r.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":u="byMeasure",l.byMeasureDef={label:n||c,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":u="byDimension",l.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":u="byMeasure",l.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},l.formatting&&i.default.useMasterNumberFormat(l.formatting)}a||(l.auto=!1,l.mode=u)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
369
369
  /*!*********************************************************************************!*\
370
370
  !*** ./color-chart/import-properties/helpers/should-add-color-by-expression.js ***!
371
371
  \*********************************************************************************/
@@ -411,7 +411,7 @@ function(e,t,n){function r(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t
411
411
  /*! exports provided: default */
412
412
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
413
413
  /*! ../../../utils */
414
- "./utils/index.js");function i(e){var t=e.auto,n=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,u=r.default.getValue(a,"visualization");return!(t||"byMeasure"!==n||!i.length||"map"!==u&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
414
+ "./utils/index.js");function i(e){var t=e.auto,n=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=r.default.getValue(a,"visualization");return!(t||"byMeasure"!==n||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
415
415
  /*!*************************************************************************!*\
416
416
  !*** ./color-chart/import-properties/helpers/should-update-color-by.js ***!
417
417
  \*************************************************************************/
@@ -436,13 +436,13 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
436
436
  /*! ./resolve-color-by-property-def */
437
437
  "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
438
438
  /*! ./should-set-color-by-dimension-1 */
439
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),u=n(
439
+ "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=n(
440
440
  /*! ./should-set-color-by-dimension-2 */
441
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),s=n(
441
+ "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),l=n(
442
442
  /*! ./set-color-by-dimension-1 */
443
- "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),l=n(
443
+ "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),u=n(
444
444
  /*! ./set-color-by-dimension-2 */
445
- "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byDimDef");if(d&&Object(i.default)(e,d.label),Object(a.default)(d))Object(s.default)(e,t);else if(Object(u.default)(d)&&Object(l.default)(e,t))return;var p=r.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:n,excludedDimensions:f,measures:c,label:p})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
445
+ "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),d=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),f=r.default.getValue(e,"color.byDimDef");if(f&&Object(i.default)(e,f.label),Object(a.default)(f))Object(l.default)(e,t);else if(Object(s.default)(f)&&Object(u.default)(e,t))return;var p=r.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:n,excludedDimensions:d,measures:c,label:p})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
446
446
  /*!**************************************************************************!*\
447
447
  !*** ./color-chart/import-properties/helpers/update-color-by-measure.js ***!
448
448
  \**************************************************************************/
@@ -455,13 +455,13 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
455
455
  /*! ./resolve-color-by-property-def */
456
456
  "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=n(
457
457
  /*! ./set-color-by-measure-1 */
458
- "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),u=n(
458
+ "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=n(
459
459
  /*! ./set-color-by-measure-2 */
460
- "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),s=n(
460
+ "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),l=n(
461
461
  /*! ./should-set-color-by-measure-1 */
462
- "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),l=n(
462
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),u=n(
463
463
  /*! ./should-set-color-by-measure-2 */
464
- "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),f=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=r.default.getValue(e,"color.byMeasureDef");if(d&&Object(i.default)(e,d.label),Object(s.default)(d))Object(a.default)(e,t);else if(Object(l.default)(d,c)&&Object(u.default)(e,t))return;var p=r.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:n,excludedDimensions:f,measures:c,label:p})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
464
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var n=r.default.getValue(e,"".concat(t,"qDimensions"),[]),c=r.default.getValue(e,"".concat(t,"qMeasures"),[]),d=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),f=r.default.getValue(e,"color.byMeasureDef");if(f&&Object(i.default)(e,f.label),Object(l.default)(f))Object(a.default)(e,t);else if(Object(u.default)(f,c)&&Object(s.default)(e,t))return;var p=r.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:n,excludedDimensions:d,measures:c,label:p})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
465
465
  /*!************************************************************************!*\
466
466
  !*** ./color-chart/import-properties/helpers/update-color-by-other.js ***!
467
467
  \************************************************************************/
@@ -470,7 +470,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
470
470
  /*! ../../../utils */
471
471
  "./utils/index.js"),i=n(
472
472
  /*! ./clear-color-by-item */
473
- "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var n=r.default.getValue(e,"color.mode"),o=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"".concat(t,"qMeasures"),[]),u=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&a.length<2&&r.default.setValue(e,"color.mode","primary"),Object(i.default)(o,u)}},"./color-chart/import-properties/helpers/update-color-by.js":
473
+ "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var n=r.default.getValue(e,"color.mode"),o=r.default.getValue(e,"".concat(t,"qDimensions"),[]),a=r.default.getValue(e,"".concat(t,"qMeasures"),[]),s=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&a.length<2&&r.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
474
474
  /*!******************************************************************!*\
475
475
  !*** ./color-chart/import-properties/helpers/update-color-by.js ***!
476
476
  \******************************************************************/
@@ -483,13 +483,13 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return c}));var r=n(
483
483
  /*! ./should-update-color-by-dimension */
484
484
  "./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=n(
485
485
  /*! ./should-update-color-by-measure */
486
- "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),u=n(
486
+ "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=n(
487
487
  /*! ./update-color-by-dimension */
488
- "./color-chart/import-properties/helpers/update-color-by-dimension.js"),s=n(
488
+ "./color-chart/import-properties/helpers/update-color-by-dimension.js"),l=n(
489
489
  /*! ./update-color-by-measure */
490
- "./color-chart/import-properties/helpers/update-color-by-measure.js"),l=n(
490
+ "./color-chart/import-properties/helpers/update-color-by-measure.js"),u=n(
491
491
  /*! ./update-color-by-other */
492
- "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var n=r.default.getValue(e,"color.mode"),c=r.default.getValue(e,"color.auto"),f=r.default.getValue(e,"".concat(t,"qDimensions"),[]),d=r.default.getValue(e,"".concat(t,"qMeasures"),[]),p=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(f,p):Object(o.default)({auto:c,colorMode:n,dimensions:f})?Object(u.default)(e,t):Object(a.default)({auto:c,colorMode:n,dimensions:f,measures:d,properties:e})?Object(s.default)(e,t):Object(l.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
492
+ "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var n=r.default.getValue(e,"color.mode"),c=r.default.getValue(e,"color.auto"),d=r.default.getValue(e,"".concat(t,"qDimensions"),[]),f=r.default.getValue(e,"".concat(t,"qMeasures"),[]),p=r.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(d,p):Object(o.default)({auto:c,colorMode:n,dimensions:d})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:n,dimensions:d,measures:f,properties:e})?Object(l.default)(e,t):Object(u.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
493
493
  /*!************************************************************************!*\
494
494
  !*** ./color-chart/import-properties/helpers/update-layout-exclude.js ***!
495
495
  \************************************************************************/
@@ -507,7 +507,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
507
507
  /*! ./helpers */
508
508
  "./color-chart/import-properties/helpers/index.js"),o=n(
509
509
  /*! ../../hypercube */
510
- "./hypercube/index.js");function a(e){var t=e.exportFormat,n=e.initialProperties,a=e.dataDefinition,u=e.defaultPropertyValues,s=e.hypercubePath,l=o.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:a,defaultPropertyValues:u,hypercubePath:s}),c=l.qProperty,f=r.default.getValue(c,"visualization"),d=r.default.getValue(c,"qHyperCubeDef.qDimensions",[]),p=r.default.getValue(c,"color.mode",""),m=r.default.getValue(c,"color.auto",""),h=i.default.getCanColorBy(c,f),v=i.default.shouldUpdateColorBy({canColorBy:h,autoColor:m,colorMode:p,dimensions:d});return h[p]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),v&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(d),l}},"./color-chart/index.js":
510
+ "./hypercube/index.js");function a(e){var t=e.exportFormat,n=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,l=e.hypercubePath,u=o.default.importProperties({exportFormat:t,initialProperties:n,dataDefinition:a,defaultPropertyValues:s,hypercubePath:l}),c=u.qProperty,d=r.default.getValue(c,"visualization"),f=r.default.getValue(c,"qHyperCubeDef.qDimensions",[]),p=r.default.getValue(c,"color.mode",""),m=r.default.getValue(c,"color.auto",""),h=i.default.getCanColorBy(c,d),g=i.default.shouldUpdateColorBy({canColorBy:h,autoColor:m,colorMode:p,dimensions:f});return h[p]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:g,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),g&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(f),u}},"./color-chart/index.js":
511
511
  /*!******************************!*\
512
512
  !*** ./color-chart/index.js ***!
513
513
  \******************************/
@@ -525,7 +525,7 @@ function(e,t,n){n.r(t);var r=n(
525
525
  /*! ./quarantine/quarantine-array-prop */
526
526
  "./quarantine/quarantine-array-prop.js"),i=n(
527
527
  /*! ./quarantine/unquarantine-array-prop */
528
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",u="measures",s="qDef.conditionalColoring";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:u,itemPath:s})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:s,arrayName:u,quarantineName:a})}}},"./conditional-show.js":
528
+ "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",l="qDef.conditionalColoring";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:l,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
529
529
  /*!*****************************!*\
530
530
  !*** ./conditional-show.js ***!
531
531
  \*****************************/
@@ -534,7 +534,7 @@ function(e,t,n){n.r(t);var r=n(
534
534
  /*! ./quarantine/quarantine-array-prop */
535
535
  "./quarantine/quarantine-array-prop.js"),i=n(
536
536
  /*! ./quarantine/unquarantine-array-prop */
537
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",u="qHyperCubeDef.qDimensions",s="dimensions",l="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(r.default)({properties:e,arrayPath:u,quarantineName:c,arrayName:s,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(i.default)({properties:e,arrayPath:u,quarantineName:c,arrayName:s,itemPath:l})}}},"./export-format.js":
537
+ "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",l="dimensions",u="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(r.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:u}),Object(r.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:u}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})}}},"./export-format.js":
538
538
  /*!**************************!*\
539
539
  !*** ./export-format.js ***!
540
540
  \**************************/
@@ -546,14 +546,14 @@ function(e,t,n){function r(){for(var e=arguments.length>0&&void 0!==arguments[0]
546
546
  /*! exports provided: default */
547
547
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
548
548
  /*! ../../../utils */
549
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var u,s=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");s&&(u=a.excludedDimensions).push.apply(u,i(s))}},"./hypercube/export-properties/helpers/add-measures.js":
549
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,l=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=a.excludedDimensions).push.apply(s,i(l))}},"./hypercube/export-properties/helpers/add-measures.js":
550
550
  /*!*************************************************************!*\
551
551
  !*** ./hypercube/export-properties/helpers/add-measures.js ***!
552
552
  \*************************************************************/
553
553
  /*! exports provided: default */
554
554
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
555
555
  /*! ../../../utils */
556
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var u,s=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(u=a.excludedMeasures).push.apply(u,i(s))}},"./hypercube/export-properties/helpers/copy-properties.js":
556
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=e.exportFormat,o=e.qHyperCubeDef,a=n.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,l=r.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");l&&(s=a.excludedMeasures).push.apply(s,i(l))}},"./hypercube/export-properties/helpers/copy-properties.js":
557
557
  /*!****************************************************************!*\
558
558
  !*** ./hypercube/export-properties/helpers/copy-properties.js ***!
559
559
  \****************************************************************/
@@ -571,11 +571,11 @@ function(e,t,n){n.r(t);var r=n(
571
571
  /*! ./set-inter-column-sort-order */
572
572
  "./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=n(
573
573
  /*! ./copy-properties */
574
- "./hypercube/export-properties/helpers/copy-properties.js"),u=n(
574
+ "./hypercube/export-properties/helpers/copy-properties.js"),s=n(
575
575
  /*! ./update-layout-exclude */
576
- "./hypercube/export-properties/helpers/update-layout-exclude.js"),s=n(
576
+ "./hypercube/export-properties/helpers/update-layout-exclude.js"),l=n(
577
577
  /*! ./store-measures-modifiers */
578
- "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:r.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:u.default,storeMeasuresModifiers:s.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
578
+ "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:r.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:l.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
579
579
  /*!***************************************************************************!*\
580
580
  !*** ./hypercube/export-properties/helpers/restore-changed-properties.js ***!
581
581
  \***************************************************************************/
@@ -618,21 +618,21 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
618
618
  /*! ../../utils */
619
619
  "./utils/index.js"),o=n(
620
620
  /*! ./helpers */
621
- "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,n=e.hypercubePath,a=e.viewDataMode,u=Object(r.default)(),s=t.qProperty,l=i.default.getValue(s,n||""),c=l.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:u,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:u,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:u,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:u,properties:s}),n&&(u.properties.qHyperCubeDef=c,delete l.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:u,properties:s}),a||o.default.storeMeasuresModifiers(u.properties.qHyperCubeDef.qMeasures),u}},"./hypercube/import-properties/helpers/add-dimensions.js":
621
+ "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,n=e.hypercubePath,a=e.viewDataMode,s=Object(r.default)(),l=t.qProperty,u=i.default.getValue(l,n||""),c=u.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:s,properties:l}),n&&(s.properties.qHyperCubeDef=c,delete u.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:s,properties:l}),a||o.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
622
622
  /*!***************************************************************!*\
623
623
  !*** ./hypercube/import-properties/helpers/add-dimensions.js ***!
624
624
  \***************************************************************/
625
625
  /*! exports provided: default */
626
626
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
627
627
  /*! ./create-dimension */
628
- "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,n=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,u=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=Object(r.default)(s.dimensions[t],u);a.qDimensions.length<i?a.qDimensions.push(l):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=Object(r.default)(s.excludedDimensions[t],u);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
628
+ "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,n=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,l=n.data[0];for(t=0;t<l.dimensions.length;++t){var u=Object(r.default)(l.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(u):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}for(t=0;t<l.excludedDimensions.length;++t){var c=Object(r.default)(l.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
629
629
  /*!*************************************************************!*\
630
630
  !*** ./hypercube/import-properties/helpers/add-measures.js ***!
631
631
  \*************************************************************/
632
632
  /*! exports provided: default */
633
633
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
634
634
  /*! ./create-measure */
635
- "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,n=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,u=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=Object(r.default)(s.measures[t],u);a.qMeasures.length<i?a.qMeasures.push(l):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=Object(r.default)(s.excludedMeasures[t],u);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
635
+ "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,n=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,l=n.data[0];for(t=0;t<l.measures.length;++t){var u=Object(r.default)(l.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(u):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}for(t=0;t<l.excludedMeasures.length;++t){var c=Object(r.default)(l.excludedMeasures[t],s);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
636
636
  /*!***********************************************************************!*\
637
637
  !*** ./hypercube/import-properties/helpers/copy-property-if-exist.js ***!
638
638
  \***********************************************************************/
@@ -647,13 +647,13 @@ function(e,t,n){function r(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r}n.r(t),
647
647
  !*** ./hypercube/import-properties/helpers/create-dimension.js ***!
648
648
  \*****************************************************************/
649
649
  /*! exports provided: default */
650
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
650
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
651
651
  /*! extend */
652
652
  "../node_modules/extend/index.js"),i=n.n(r),o=n(
653
653
  /*! ../../../utils */
654
654
  "./utils/index.js"),a=n(
655
655
  /*! ./get-others-label */
656
- "./hypercube/import-properties/helpers/get-others-label.js");function u(e,t){var n=i()(!0,{},t,e);return o.default.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel=Object(a.default)()),n}},"./hypercube/import-properties/helpers/create-measure.js":
656
+ "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var n=i()(!0,{},t,e);return o.default.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel=Object(a.default)()),n}},"./hypercube/import-properties/helpers/create-measure.js":
657
657
  /*!***************************************************************!*\
658
658
  !*** ./hypercube/import-properties/helpers/create-measure.js ***!
659
659
  \***************************************************************/
@@ -665,13 +665,13 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
665
665
  !*** ./hypercube/import-properties/helpers/create-new-properties.js ***!
666
666
  \**********************************************************************/
667
667
  /*! exports provided: default */
668
- function(e,t,n){n.r(t),n.d(t,"default",(function(){return u}));var r=n(
668
+ function(e,t,n){n.r(t),n.d(t,"default",(function(){return s}));var r=n(
669
669
  /*! extend */
670
670
  "../node_modules/extend/index.js"),i=n.n(r),o=n(
671
671
  /*! ../../../utils */
672
672
  "./utils/index.js"),a=n(
673
673
  /*! ./is-master-item-property */
674
- "./hypercube/import-properties/helpers/is-master-item-property.js");function u(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,u={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(u.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.default.setValue(u,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Object(a.default)(e)?u[e]=t.properties[e]:u.qLayoutExclude.disabled[e]=t.properties[e]})),null===(u=i()(!0,{},n,u)).components&&(u.components=[]),u}},"./hypercube/import-properties/helpers/get-default-dimension.js":
674
+ "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.default.setValue(s,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},n,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
675
675
  /*!**********************************************************************!*\
676
676
  !*** ./hypercube/import-properties/helpers/get-default-dimension.js ***!
677
677
  \**********************************************************************/
@@ -690,7 +690,7 @@ function(e,t,n){function r(){return{qDef:{autoSort:!0,cId:"",numFormatFromTempla
690
690
  /*! exports provided: default */
691
691
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
692
692
  /*! ./resolve-value */
693
- "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,n=e.dataDefinition,o=void 0===n?{}:n,a=t.data[0],u=o.dimensions||{max:0},s=o.measures||{max:0},l=Object(r.default)(s.max,a.dimensions.length,i),c=Object(r.default)(s.min,a.dimensions.length,0);return{maxDimensions:Object(r.default)(u.max,l,i),minDimensions:Object(r.default)(u.min,c,0),maxMeasures:l,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
693
+ "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,n=e.dataDefinition,o=void 0===n?{}:n,a=t.data[0],s=o.dimensions||{max:0},l=o.measures||{max:0},u=Object(r.default)(l.max,a.dimensions.length,i),c=Object(r.default)(l.min,a.dimensions.length,0);return{maxDimensions:Object(r.default)(s.max,u,i),minDimensions:Object(r.default)(s.min,c,0),maxMeasures:u,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
694
694
  /*!*****************************************************************!*\
695
695
  !*** ./hypercube/import-properties/helpers/get-others-label.js ***!
696
696
  \*****************************************************************/
@@ -715,17 +715,17 @@ function(e,t,n){n.r(t);var r=n(
715
715
  /*! ./copy-property-or-set-default */
716
716
  "./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=n(
717
717
  /*! ./get-default-dimension */
718
- "./hypercube/import-properties/helpers/get-default-dimension.js"),u=n(
718
+ "./hypercube/import-properties/helpers/get-default-dimension.js"),s=n(
719
719
  /*! ./get-default-measure */
720
- "./hypercube/import-properties/helpers/get-default-measure.js"),s=n(
720
+ "./hypercube/import-properties/helpers/get-default-measure.js"),l=n(
721
721
  /*! ./add-dimensions */
722
- "./hypercube/import-properties/helpers/add-dimensions.js"),l=n(
722
+ "./hypercube/import-properties/helpers/add-dimensions.js"),u=n(
723
723
  /*! ./add-measures */
724
724
  "./hypercube/import-properties/helpers/add-measures.js"),c=n(
725
725
  /*! ./get-max-min-dimension-measure */
726
- "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),f=n(
726
+ "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),d=n(
727
727
  /*! ./set-inter-column-sort-order */
728
- "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),d=n(
728
+ "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),f=n(
729
729
  /*! ./create-new-properties */
730
730
  "./hypercube/import-properties/helpers/create-new-properties.js"),p=n(
731
731
  /*! ./should-init-layout-exclude */
@@ -733,14 +733,14 @@ function(e,t,n){n.r(t);var r=n(
733
733
  /*! ./init-layout-exclude */
734
734
  "./hypercube/import-properties/helpers/init-layout-exclude.js"),h=n(
735
735
  /*! ./update-dimensions-on-added */
736
- "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),v=n(
736
+ "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),g=n(
737
737
  /*! ./update-measures-on-added */
738
- "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:r.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:u.default,addDimensions:s.default,addMeasures:l.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:f.default,createNewProperties:d.default,shouldInitLayoutExclude:p.default,initLayoutExclude:m.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:v.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
738
+ "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:r.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:l.default,addMeasures:u.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:d.default,createNewProperties:f.default,shouldInitLayoutExclude:p.default,initLayoutExclude:m.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:g.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
739
739
  /*!********************************************************************!*\
740
740
  !*** ./hypercube/import-properties/helpers/init-layout-exclude.js ***!
741
741
  \********************************************************************/
742
742
  /*! exports provided: default */
743
- function(e,t,n){function r(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,u=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(u.dimensions.length>n&&n>0||u.excludedDimensions&&u.excludedDimensions.length&&u.dimensions.length+u.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(u.measures.length>i&&i>0||u.excludedMeasures&&u.excludedMeasures.length&&u.measures.length+u.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&u.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&u.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
743
+ function(e,t,n){function r(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}n.r(t),n.d(t,"default",(function(){return r}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
744
744
  /*!************************************************************************!*\
745
745
  !*** ./hypercube/import-properties/helpers/is-master-item-property.js ***!
746
746
  \************************************************************************/
@@ -769,14 +769,14 @@ function(e,t,n){function r(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDime
769
769
  /*! exports provided: default */
770
770
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
771
771
  /*! ../../../utils */
772
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,u=i(a.qDimensions);a.qDimensions=[],u.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
772
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
773
773
  /*!*************************************************************************!*\
774
774
  !*** ./hypercube/import-properties/helpers/update-measures-on-added.js ***!
775
775
  \*************************************************************************/
776
776
  /*! exports provided: default */
777
777
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return a}));var r=n(
778
778
  /*! ../../../utils */
779
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,u=i(a.qMeasures);a.qMeasures=[],u.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
779
+ "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=r.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
780
780
  /*!**********************************************!*\
781
781
  !*** ./hypercube/import-properties/index.js ***!
782
782
  \**********************************************/
@@ -785,7 +785,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
785
785
  /*! ../../utils */
786
786
  "./utils/index.js"),i=n(
787
787
  /*! ./helpers */
788
- "./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=void 0===n?{}:n,a=e.dataDefinition,u=void 0===a?{}:a,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,f={qChildren:[]},d=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),p=r.default.getValue(o,c||"").qHyperCubeDef,m=r.default.getValue(d,c||"").qHyperCubeDef,h=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:u}),v=h.maxDimensions,g=h.minDimensions,y=h.maxMeasures,b=h.minMeasures,x=l.defaultDimension,q=void 0===x?i.default.getDefaultDimension():x,M=l.defaultMeasure,S=void 0===M?i.default.getDefaultMeasure():M;return m.qDimensions.length=0,m.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b,newHyperCubeDef:m}),i.default.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:g,newHyperCubeDef:m,defaultDimension:q}),i.default.addMeasures({exportFormat:t,maxMeasures:y,minMeasures:b,newHyperCubeDef:m,defaultMeasure:S}),i.default.updateDimensionsOnAdded({newProperties:d,dataDefinition:u,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:d,dataDefinition:u,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:m}),i.default.copyPropertyIfExist("qMaxStackedCells",p,m),i.default.copyPropertyIfExist("qNoOfLeftDims",p,m),i.default.copyPropertyOrSetDefault("qInitialDataFetch",p,m,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",p,m,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",p,m,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",p,m),i.default.copyPropertyOrSetDefault("qIndentMode",p,m),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",p,m),i.default.importCommonProperties(d,t,o),f.qProperty=d,f}},"./hypercube/index.js":
788
+ "./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,n=e.initialProperties,o=void 0===n?{}:n,a=e.dataDefinition,s=void 0===a?{}:a,l=e.defaultPropertyValues,u=void 0===l?{}:l,c=e.hypercubePath,d={qChildren:[]},f=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),p=r.default.getValue(o,c||"").qHyperCubeDef,m=r.default.getValue(f,c||"").qHyperCubeDef,h=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),g=h.maxDimensions,y=h.minDimensions,v=h.maxMeasures,b=h.minMeasures,x=u.defaultDimension,q=void 0===x?i.default.getDefaultDimension():x,M=u.defaultMeasure,S=void 0===M?i.default.getDefaultMeasure():M;return m.qDimensions.length=0,m.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:g,minDimensions:y,maxMeasures:v,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:g,minDimensions:y,maxMeasures:v,minMeasures:b,newHyperCubeDef:m}),i.default.addDimensions({exportFormat:t,maxDimensions:g,minDimensions:y,newHyperCubeDef:m,defaultDimension:q}),i.default.addMeasures({exportFormat:t,maxMeasures:v,minMeasures:b,newHyperCubeDef:m,defaultMeasure:S}),i.default.updateDimensionsOnAdded({newProperties:f,dataDefinition:s,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:f,dataDefinition:s,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:m}),i.default.copyPropertyIfExist("qMaxStackedCells",p,m),i.default.copyPropertyIfExist("qNoOfLeftDims",p,m),i.default.copyPropertyOrSetDefault("qInitialDataFetch",p,m,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",p,m,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",p,m,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",p,m),i.default.copyPropertyOrSetDefault("qIndentMode",p,m),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",p,m),i.default.importCommonProperties(f,t,o),d.qProperty=f,d}},"./hypercube/index.js":
789
789
  /*!****************************!*\
790
790
  !*** ./hypercube/index.js ***!
791
791
  \****************************/
@@ -807,17 +807,17 @@ function(e,t,n){n.r(t);var r=n(
807
807
  /*! ./axis-chart */
808
808
  "./axis-chart/index.js"),a=n(
809
809
  /*! ./quarantine/quarantine-property */
810
- "./quarantine/quarantine-property.js"),u=n(
810
+ "./quarantine/quarantine-property.js"),s=n(
811
811
  /*! ./quarantine/unquarantine-property */
812
- "./quarantine/unquarantine-property.js"),s=n(
812
+ "./quarantine/unquarantine-property.js"),l=n(
813
813
  /*! ./quarantine/quarantine-array-prop */
814
- "./quarantine/quarantine-array-prop.js"),l=n(
814
+ "./quarantine/quarantine-array-prop.js"),u=n(
815
815
  /*! ./quarantine/unquarantine-array-prop */
816
816
  "./quarantine/unquarantine-array-prop.js"),c=n(
817
817
  /*! ./conditional-coloring */
818
- "./conditional-coloring.js"),f=n(
818
+ "./conditional-coloring.js"),d=n(
819
819
  /*! ./conditional-show */
820
- "./conditional-show.js");t.default={hypercube:r.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:u.default,quarantineArrayProp:s.default,unquarantineArrayProp:l.default,conditionalColoring:c.default,conditionalShow:f.default}},"./quarantine/get-quarantine-path.js":
820
+ "./conditional-show.js");t.default={hypercube:r.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:l.default,unquarantineArrayProp:u.default,conditionalColoring:c.default,conditionalShow:d.default}},"./quarantine/get-quarantine-path.js":
821
821
  /*!*******************************************!*\
822
822
  !*** ./quarantine/get-quarantine-path.js ***!
823
823
  \*******************************************/
@@ -831,7 +831,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
831
831
  /*! ../utils */
832
832
  "./utils/index.js"),i=n(
833
833
  /*! ./get-quarantine-path */
834
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,u=e.itemPath,s=r.default.getValue(a,u);if(void 0!==s){var l=r.default.getValue(a,"qDef.cId");l||(l=r.default.generateId(),r.default.setValue(a,"qDef.cId",l));var c=Object(i.default)(n,o,l);r.default.setValue(t,c,s),r.default.setValue(a,u,void 0)}}},"./quarantine/quarantine-array-prop.js":
834
+ "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,l=r.default.getValue(a,s);if(void 0!==l){var u=r.default.getValue(a,"qDef.cId");u||(u=r.default.generateId(),r.default.setValue(a,"qDef.cId",u));var c=Object(i.default)(n,o,u);r.default.setValue(t,c,l),r.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
835
835
  /*!*********************************************!*\
836
836
  !*** ./quarantine/quarantine-array-prop.js ***!
837
837
  \*********************************************/
@@ -840,14 +840,14 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
840
840
  /*! ../utils */
841
841
  "./utils/index.js"),i=n(
842
842
  /*! ./quarantine-array-item */
843
- "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,u=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:u})}))}},"./quarantine/quarantine-property.js":
843
+ "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
844
844
  /*!*******************************************!*\
845
845
  !*** ./quarantine/quarantine-property.js ***!
846
846
  \*******************************************/
847
847
  /*! exports provided: default */
848
848
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
849
849
  /*! ../utils */
850
- "./utils/index.js");function i(e,t,n){var i,o,a=r.default.getValue(e,t);if(!r.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}r.default.getValue(e,"qLayoutExclude.quarantine")||r.default.setValue(e,"qLayoutExclude.quarantine",{});var u=r.default.getValue(e,"qLayoutExclude.quarantine");u[n]||(u[n]={}),u[n][t]=a}},"./quarantine/unquarantine-array-item.js":
850
+ "./utils/index.js");function i(e,t,n){var i,o,a=r.default.getValue(e,t);if(!r.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}r.default.getValue(e,"qLayoutExclude.quarantine")||r.default.setValue(e,"qLayoutExclude.quarantine",{});var s=r.default.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}},"./quarantine/unquarantine-array-item.js":
851
851
  /*!***********************************************!*\
852
852
  !*** ./quarantine/unquarantine-array-item.js ***!
853
853
  \***********************************************/
@@ -856,7 +856,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
856
856
  /*! ../utils */
857
857
  "./utils/index.js"),i=n(
858
858
  /*! ./get-quarantine-path */
859
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,u=e.itemPath,s=r.default.getValue(a,"qDef.cId");if(s){var l=Object(i.default)(n,o,s),c=r.default.getValue(t,l);void 0!==c&&(r.default.setValue(a,u,c),r.default.setValue(t,l,void 0))}}},"./quarantine/unquarantine-array-prop.js":
859
+ "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,n=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,l=r.default.getValue(a,"qDef.cId");if(l){var u=Object(i.default)(n,o,l),c=r.default.getValue(t,u);void 0!==c&&(r.default.setValue(a,s,c),r.default.setValue(t,u,void 0))}}},"./quarantine/unquarantine-array-prop.js":
860
860
  /*!***********************************************!*\
861
861
  !*** ./quarantine/unquarantine-array-prop.js ***!
862
862
  \***********************************************/
@@ -865,7 +865,7 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
865
865
  /*! ../utils */
866
866
  "./utils/index.js"),i=n(
867
867
  /*! ./unquarantine-array-item */
868
- "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,u=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:u})}))}},"./quarantine/unquarantine-property.js":
868
+ "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,n=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;r.default.getValue(t,n,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
869
869
  /*!*********************************************!*\
870
870
  !*** ./quarantine/unquarantine-property.js ***!
871
871
  \*********************************************/
@@ -909,14 +909,14 @@ function(e,t,n){n.r(t),n.d(t,"default",(function(){return o}));var r=n(
909
909
  /*! ./move-by-id */
910
910
  "./utils/attribute-expression-util/move-by-id.js"),i=n(
911
911
  /*! ./is-size-changed */
912
- "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,n,o,a){n=n||"qAttributeExpressions",a=a||"id";for(var u=0;u<e.length;u++){var s=e[u][n],l=t.length;if(Object(r.default)(s,t,o,a),Object(i.default)(t,l))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
912
+ "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,n,o,a){n=n||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var l=e[s][n],u=t.length;if(Object(r.default)(l,t,o,a),Object(i.default)(t,u))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
913
913
  /*!*******************************************************!*\
914
914
  !*** ./utils/attribute-expression-util/move-by-id.js ***!
915
915
  \*******************************************************/
916
916
  /*! exports provided: default */
917
917
  function(e,t,n){n.r(t),n.d(t,"default",(function(){return i}));var r=n(
918
918
  /*! ../find-index-by-property-value */
919
- "./utils/find-index-by-property-value.js");function i(e,t,n,i){t=t||[];var o=Object(r.default)(e,i,n),a=Object(r.default)(t,i,n);if(-1!==o&&-1===a){var u=e.splice(o,1);t.push(u[0])}return t}},"./utils/find-index-by-property-value.js":
919
+ "./utils/find-index-by-property-value.js");function i(e,t,n,i){t=t||[];var o=Object(r.default)(e,i,n),a=Object(r.default)(t,i,n);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
920
920
  /*!***********************************************!*\
921
921
  !*** ./utils/find-index-by-property-value.js ***!
922
922
  \***********************************************/
@@ -961,7 +961,7 @@ function(e,t,n){n.r(t);var r=n(
961
961
  /*! exports provided: default */
962
962
  function(e,t,n){n.r(t);var r=n(
963
963
  /*! ./generate-id */
964
- "./utils/generate-id.js");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var u=r[a];void 0!==o[u]&&null!==o[u]||(o[u]=Number.isNaN(+r[a+1])?{}:[]),o=o[u]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:r.default}},"./utils/number-format-util.js":
964
+ "./utils/generate-id.js");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:r.default}},"./utils/number-format-util.js":
965
965
  /*!*************************************!*\
966
966
  !*** ./utils/number-format-util.js ***!
967
967
  \*************************************/
@@ -971,4 +971,4 @@ function(e,t,n){n.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
971
971
  !*** ./utils/wrap-file-name.js ***!
972
972
  \*********************************/
973
973
  /*! exports provided: default */
974
- function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}));var Jb=re(Xb.exports);function $b(e){if("custom"===e.dimensionAxis.axisDisplayMode){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(n+t)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(n+t))))}}var Zb=function(e){return{get:function(t,n,r){return Ee.continuous(r.layout)?e:t(n.type)},set:function(e,t,n){var r=je(n.type,n);t(n.type,e,r)}}},Qb=function(e){return e&&!Ee.continuous(e)&&Ee.stacked(e)},ex=function(e){var t=e.translator,n=e.flags,r={uses:"settings",items:{general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return{key:"bar",style:{width:"grouped"===e.barGrouping.grouping&&n>0&&t+n>2?.9:.7,strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}},items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:function(e){return"none"!==e.style.strokeWidth}},width:{show:function(e,t,n){return!Ee.continuous(n.layout)},component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return n>0&&t+n>2},change:function(e,t){t.getDimensions().length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:function(e,t,n){return Ee.continuous(n.layout)},convertFunctions:Zb("stacked")},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:function(e,t,n){return Ee.continuous(n.layout)},convertFunctions:Zb("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(zp.OPTIONS).map((function(e){return zp.OPTIONS[e]})),defaultValue:zp.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:function(e,t,n){return!Ee.continuous(n.layout)}}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:function(e){return e.gridLine&&!e.gridLine.auto}}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:function(e,n){return function(e,t,n){return n&&n.get(Qb(t.layout)?"properties.on":"Common.Auto")}(0,n,t)}},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:function(e,t,n){return e.dataPoint.showLabels&&Qb(n.layout)}},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:function(e,t,n){return e.dataPoint.showLabels&&Qb(n.layout)}}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:function(e,t,r){return n&&n.isEnabled("BC_XAXIS_MODE")&&!Ee.continuous(r.layout)},items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid:function(e){var t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;return r<0||r>1e4/(n+t)},globalChange:$b,defaultValue:10,show:function(e){return"custom"===e.dimensionAxis.axisDisplayMode}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:function(e){return["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{items:{miniChart:null}}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=n&&n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(r.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),r},tx={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:function(e,t,n){return 1===n.getMeasures().length&&2===n.getDimensions().length&&0===e},items:{autoSort:{change:function(e){It(e)}}}}}}}},nx=function(e){var t=e.translator,n=e.flags;return{uses:"data",items:{dimensions:{items:{nullSuppression:{show:function(e,t,n){var r=function(e,t){return t.properties&&t.properties.qHyperCubeDef.qDimensions[0]===e}(e,t),i=Ee.continuous(n.layout);return!(r&&i)}}}},measures:{items:{trendLines:fg({translator:t,allowStackedByDimension:n&&n.isEnabled("TRENDLINES_STACKED_DIM")})}}}}};function rx(e){var t=e.translator,n=e.flags,r=function(e){return{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:e&&e.isEnabled("DIM_REF_LINES")?{uses:"dimReflines"}:void 0}}}(n);return{type:"items",component:"accordion",items:{data:nx({translator:t,flags:n}),sorting:tx,addons:r,settings:ex({translator:t,flags:n})}}}function ix(e){var t={},n=fc(e,"components"),r=fc(e,"dimensionAxis.axisDisplayMode"),i=fc(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter((function(e){return"bar"===e.key}))[0]:void 0,a=fc(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach((function(e){t["chart_style_".concat(e)]=o.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;var u=fc(a,"chart.object.refId");!a.auto&&u&&(t.chart_tooltip_custom_mini_chart=u)}return t}var ox=function(e){return!!(e&&e.qHyperCube.qSize.qcy>0)},ax={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function ux(e){var t=[];return Object.keys(ax).forEach((function(n){e.isEnabled(n)&&t.push(ax[n])})),t}function sx(e){var t=e.flags;return{definition:rx(e),softDefinition:{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked:function(e,t){var n=t.qHyperCubeDef.qMeasures.length,r=t.qHyperCubeDef.qDimensions.length;return 1===n&&2===r&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:function(e,t){return e.qHyperCubeDef.qMeasures.length+e.qHyperCubeDef.qDimensions.length>2&&!Ee.continuous(t)},change:function(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:function(e,t){return!Ee.continuous(t)}}}},color:{uses:"color"}}},support:{snapshot:ox,export:ox,exportData:!0,sharing:ox,viewData:!0,effects:!0,modifiers:ux(t)},importProperties:function(t,n,r,i){var o={layout:{templateId:n.templateId}};r.mapProperties(o);var a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},u=Jb.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:rv(e),defaultPropertyValues:a,hypercubePath:i}),s=u.qProperty;return s.qHyperCubeDef.qDimensions.length>1&&"stacked"===s.barGrouping.grouping&&(s.qHyperCubeDef.qMode="K"),u},exportProperties:function(e,t,n){return Jb.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:function(e){return e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(It)}(e),function(e){var t=e.properties,n=t.scrollbar,r=t.dimensionAxis,i=t.preferContinuousAxis,o=t.showMiniChartForContinuousAxis;if(!n&&!1===o){var a=r.continuousAuto;(a||!a&&i)&&(t.scrollbar=zp.OPTIONS.NONE.value)}}({properties:e})),e}},extendMetrics:ix}}function lx(i){var o=function(){var i=e();return i.use(t),i.use(n(r)),i.use(es()),i.use(sh),i.component("box-sliced-hat",Nm),i.component("box-out-of-bounds",Om),i.component("scrollbar",qm),i.component("scroll-hint",xo),i.component("reference-line-labels",ka),i.component("axis-overlay",Rp.picassoComponents.axisOverlay),i.component("time-axis",Rp.picassoComponents.timeAxis),i.scale("q-time-axis",Rp.picassoScales.time),i}();return{qae:iv(i),ext:sx(i),component:function(){var e=av({env:i}),t=uv(),n=t.viewState,r=t.viewCache,a=function(e){var t=e.picasso,n=M(),r=S(),i=Q(y(),2),o=i[0],a=i[1];return q((function(){if(!t)return function(){};n.style.overflow="hidden";var e=t({renderer:{prio:[(null==r?void 0:r.renderer)||"canvas"]},style:{"$font-family":"QlikView Sans, sans-serif"}}).chart({element:n,data:[],settings:{}});a(e);var i=e.destroy;return function(){i()}}),[r.renderer]),o}({picasso:o}),u=Lg({picasso:o,chart:a,environment:e,viewState:n,viewCache:r});Gb({picasso:o,chart:a,services:u,environment:e,viewState:n,viewCache:r}),function(e){var t=e.services,n=e.chart,r=e.viewState;I((function(e){if(t){var i=t.layoutService,o=t.dockService,a=t.colorService,u=t.discrete,s=t.continuousDataModel,l=t.reducedDataModel,c=o.meta.chart.size,f=c.width,d=c.height;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:f,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:Le(n,yg.COMPONENT.LEGEND_COLOR_CAT)},i.meta.isDiscrete?(u.command.setSnapshotData(e),l.setSnapshotData(e)):s.setSnapshotData(e),a.getMain().getSnapshotData().then((function(t){e.snapshotData.content.chartData=R(R({},e.snapshotData.content.chartData),t)})).catch((function(){})))}})),j((function(){return{getViewState:function(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:Le(n,yg.COMPONENT.LEGEND_COLOR_CAT)}}}}),[r,n])}({services:u,chart:a,viewState:n})}}}export default lx;
974
+ function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}));var Gy=R(Ky.exports);function $y(e){if("custom"===e.dimensionAxis.axisDisplayMode){const t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(n+t)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(n+t))))}}const Yy=e=>({get:(t,n,r)=>ue.continuous(r.layout)?e:t(n.type),set(e,t,n){const r=pe(n.type,n);t(n.type,e,r)}}),Xy=e=>e&&!ue.continuous(e)&&ue.stacked(e),Jy=({translator:e,flags:t})=>{const n={uses:"settings",items:{general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"bar",ref:"components",defaultValues(e){const t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return{key:"bar",style:{width:"grouped"===e.barGrouping.grouping&&n>0&&t+n>2?.9:.7,strokeColor:{index:-1,color:"#205891"},strokeWidth:"none"}}},items:{bar:{components:"items",type:"items",uses:"styling.box",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},width:{show:(e,t,n)=>!ue.continuous(n.layout),component:"slider",min:.01,max:1,step:.01,defaultValue:.7}}}}},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e){const t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length;return n>0&&t+n>2},change(e,t){t.getDimensions().length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>ue.continuous(n.layout),convertFunctions:Yy("stacked")},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>ue.continuous(n.layout),convertFunctions:Yy("vertical")},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(Hf.OPTIONS).map((e=>Hf.OPTIONS[e])),defaultValue:Hf.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!ue.continuous(n.layout)}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(Xy(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&Xy(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&Xy(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,n,r)=>t&&t.isEnabled("BC_XAXIS_MODE")&&!ue.continuous(r.layout),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e){const t=e.qHyperCubeDef.qMeasures.length,n=e.qHyperCubeDef.qDimensions.length,r=e.dimensionAxis.maxVisibleItems;return r<0||r>1e4/(n+t)},globalChange:$y,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null}}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};return null!=t&&t.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(n.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),n},Zy={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){pt(e)}}}}}}}},Qy=({translator:e,flags:t})=>({uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){const r=((e,t)=>t.properties&&t.properties.qHyperCubeDef.qDimensions[0]===e)(e,t),i=ue.continuous(n.layout);return!(r&&i)}}}},measures:{items:{trendLines:hh({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}});function ev({translator:e,flags:t}){const n=(e=>({type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:e&&e.isEnabled("DIM_REF_LINES")?{uses:"dimReflines"}:void 0}}))(t);return{type:"items",component:"accordion",items:{data:Qy({translator:e,flags:t}),sorting:Zy,addons:n,settings:Jy({translator:e,flags:t})}}}function tv(e){const t={},n=hu(e,"components"),r=hu(e,"dimensionAxis.axisDisplayMode"),i=hu(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter((e=>"bar"===e.key))[0]:void 0,a=hu(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=hu(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const nv=e=>!!(e&&e.qHyperCube.qSize.qcy>0),rv={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function iv(e){const t=[];return Object.keys(rv).forEach((n=>{e.isEnabled(n)&&t.push(rv[n])})),t}function ov(e){const{flags:t}=e;return{definition:ev(e),softDefinition:{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t){const n=t.qHyperCubeDef.qMeasures.length,r=t.qHyperCubeDef.qDimensions.length;return 1===n&&2===r&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t)=>e.qHyperCubeDef.qMeasures.length+e.qHyperCubeDef.qDimensions.length>2&&!ue.continuous(t),change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!ue.continuous(t)}}},color:{uses:"color"}}},support:{snapshot:nv,export:nv,exportData:!0,sharing:nv,viewData:!0,effects:!0,modifiers:iv(t)},importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Gy.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:lm(e),defaultPropertyValues:a,hypercubePath:i}),l=s.qProperty;return l.qHyperCubeDef.qDimensions.length>1&&"stacked"===l.barGrouping.grouping&&(l.qHyperCubeDef.qMode="K"),s},exportProperties:(e,t,n)=>Gy.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n}),migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(pt)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=Hf.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:tv}}function av(i){const o=function(){const i=e();return i.use(t),i.use(n(r)),i.use(ps()),i.use(Ip),i.component("box-sliced-hat",Np),i.component("box-out-of-bounds",Op),i.component("scrollbar",Mp),i.component("scroll-hint",Ji),i.component("reference-line-labels",Zo),i.component("axis-overlay",Ff.picassoComponents.axisOverlay),i.component("time-axis",Ff.picassoComponents.timeAxis),i.scale("q-time-axis",Ff.picassoScales.time),i}();return{qae:um(i),ext:ov(i),component(){const e=dm({env:i}),{viewState:t,viewCache:n}=fm(),r=function({picasso:e}){const t=M(),n=S(),[r,i]=v();return q((()=>{if(!e)return()=>{};t.style.overflow="hidden";const r=e({renderer:{prio:[(null==n?void 0:n.renderer)||"canvas"]},style:{"$font-family":"QlikView Sans, sans-serif"}}).chart({element:t,data:[],settings:{}});i(r);const{destroy:o}=r;return()=>{o()}}),[n.renderer]),r}({picasso:o}),a=Eh({picasso:o,chart:r,environment:e,viewState:t,viewCache:n});Uy({picasso:o,chart:r,services:a,environment:e,viewState:t,viewCache:n}),(({services:e,chart:t,viewState:n})=>{I((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discrete:s,continuousDataModel:l,reducedDataModel:u}=e,{width:c,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ce(t,Mh.COMPONENT.LEGEND_COLOR_CAT)},i.meta.isDiscrete?(s.command.setSnapshotData(r),u.setSnapshotData(r)):l.setSnapshotData(r),a.getMain().getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),P((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ce(t,Mh.COMPONENT.LEGEND_COLOR_CAT)}}})),[n,t])})({services:a,chart:r,viewState:t})}}}export{av as default};